From a43447731eab434eb8d661dc40d6c8e7c256596e Mon Sep 17 00:00:00 2001 From: wanlce Date: Mon, 29 Jul 2024 12:36:55 +0000 Subject: [PATCH] deploy: 2c6593b5426c51a8605905f5bc783d094c7d7826 --- ...5eca.js => SchemaReference.es-5f2e28e7.js} | 2 +- ...ssMode-476dcd26.js => cssMode-23f8cfa4.js} | 2 +- ...r2-71c0b7fd.js => freemarker2-5a543fc1.js} | 2 +- ...ars-f41bb875.js => handlebars-48f0b00c.js} | 2 +- ...int.es-37fdb462.js => hint.es-96364e2e.js} | 2 +- ...t.es2-e6bfba5e.js => hint.es2-f357329b.js} | 2 +- assets/{html-3ea238d3.js => html-08d3ca77.js} | 2 +- ...lMode-c7f55510.js => htmlMode-e8ba8f80.js} | 2 +- .../{index-5482a1c3.js => index-f73309ce.js} | 212 +++++++++--------- ...nfo.es-3d43dc0b.js => info.es-4f84d003.js} | 2 +- ...ipt-edf6de70.js => javascript-c886ed23.js} | 2 +- ...nMode-132600a1.js => jsonMode-728df4b3.js} | 2 +- ...ump.es-8a00e13d.js => jump.es-3da96504.js} | 2 +- ...t.es2-0fdd8b3c.js => lint.es2-0a1cb552.js} | 2 +- ...t.es3-772416c3.js => lint.es3-437bc8f0.js} | 2 +- ...{liquid-5f4f03ad.js => liquid-109c0bcd.js} | 2 +- assets/{mdx-4632e9a4.js => mdx-73755bf2.js} | 2 +- ...ode.es-a1c28541.js => mode.es-8d6b92d4.js} | 2 +- ...e.es2-69ebd2a9.js => mode.es2-9a0e7fa4.js} | 2 +- ...e.es3-666bdda0.js => mode.es3-91b27d8c.js} | 2 +- ...{python-1d0103e1.js => python-de82f2f3.js} | 2 +- .../{razor-343a2f14.js => razor-59d1607c.js} | 2 +- ...{tsMode-7da4817d.js => tsMode-07ff9492.js} | 2 +- ...ipt-06b5296a.js => typescript-7ecfa68d.js} | 2 +- assets/{xml-dc74cb95.js => xml-d6213659.js} | 2 +- assets/{yaml-646d4ecb.js => yaml-2410ac7e.js} | 2 +- index.html | 2 +- 27 files changed, 132 insertions(+), 132 deletions(-) rename assets/{SchemaReference.es-2d405eca.js => SchemaReference.es-5f2e28e7.js} (97%) rename assets/{cssMode-476dcd26.js => cssMode-23f8cfa4.js} (99%) rename assets/{freemarker2-71c0b7fd.js => freemarker2-5a543fc1.js} (99%) rename assets/{handlebars-f41bb875.js => handlebars-48f0b00c.js} (99%) rename assets/{hint.es-37fdb462.js => hint.es-96364e2e.js} (91%) rename assets/{hint.es2-e6bfba5e.js => hint.es2-f357329b.js} (97%) rename assets/{html-3ea238d3.js => html-08d3ca77.js} (98%) rename assets/{htmlMode-c7f55510.js => htmlMode-e8ba8f80.js} (99%) rename assets/{index-5482a1c3.js => index-f73309ce.js} (97%) rename assets/{info.es-3d43dc0b.js => info.es-4f84d003.js} (94%) rename assets/{javascript-edf6de70.js => javascript-c886ed23.js} (89%) rename assets/{jsonMode-132600a1.js => jsonMode-728df4b3.js} (99%) rename assets/{jump.es-8a00e13d.js => jump.es-3da96504.js} (95%) rename assets/{lint.es2-0fdd8b3c.js => lint.es2-0a1cb552.js} (99%) rename assets/{lint.es3-772416c3.js => lint.es3-437bc8f0.js} (98%) rename assets/{liquid-5f4f03ad.js => liquid-109c0bcd.js} (98%) rename assets/{mdx-4632e9a4.js => mdx-73755bf2.js} (98%) rename assets/{mode.es-a1c28541.js => mode.es-8d6b92d4.js} (89%) rename assets/{mode.es2-69ebd2a9.js => mode.es2-9a0e7fa4.js} (95%) rename assets/{mode.es3-666bdda0.js => mode.es3-91b27d8c.js} (95%) rename assets/{python-1d0103e1.js => python-de82f2f3.js} (98%) rename assets/{razor-343a2f14.js => razor-59d1607c.js} (99%) rename assets/{tsMode-7da4817d.js => tsMode-07ff9492.js} (99%) rename assets/{typescript-06b5296a.js => typescript-7ecfa68d.js} (98%) rename assets/{xml-dc74cb95.js => xml-d6213659.js} (97%) rename assets/{yaml-646d4ecb.js => yaml-2410ac7e.js} (98%) diff --git a/assets/SchemaReference.es-2d405eca.js b/assets/SchemaReference.es-5f2e28e7.js similarity index 97% rename from assets/SchemaReference.es-2d405eca.js rename to assets/SchemaReference.es-5f2e28e7.js index faf40134..c6961ae6 100644 --- a/assets/SchemaReference.es-2d405eca.js +++ b/assets/SchemaReference.es-5f2e28e7.js @@ -1 +1 @@ -import{s as b}from"./forEachState.es-b2033c2b.js";import{o as l,Z as k,I as F,Y as h,_ as S,$ as g,a0 as D,a1 as T,e as Q}from"./index-5482a1c3.js";var j=Object.defineProperty,r=(t,n)=>j(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;ej(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;en in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/freemarker2-71c0b7fd.js b/assets/freemarker2-5a543fc1.js similarity index 99% rename from assets/freemarker2-71c0b7fd.js rename to assets/freemarker2-5a543fc1.js index 1db735af..ac9d606c 100644 --- a/assets/freemarker2-71c0b7fd.js +++ b/assets/freemarker2-5a543fc1.js @@ -1,4 +1,4 @@ -import{m as F}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/handlebars-f41bb875.js b/assets/handlebars-48f0b00c.js similarity index 99% rename from assets/handlebars-f41bb875.js rename to assets/handlebars-48f0b00c.js index fe8f626d..8afe30df 100644 --- a/assets/handlebars-f41bb875.js +++ b/assets/handlebars-48f0b00c.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/hint.es-37fdb462.js b/assets/hint.es-96364e2e.js similarity index 91% rename from assets/hint.es-37fdb462.js rename to assets/hint.es-96364e2e.js index 9390c181..b403f751 100644 --- a/assets/hint.es-37fdb462.js +++ b/assets/hint.es-96364e2e.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-5482a1c3.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); +import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-f73309ce.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); diff --git a/assets/hint.es2-e6bfba5e.js b/assets/hint.es2-f357329b.js similarity index 97% rename from assets/hint.es2-e6bfba5e.js rename to assets/hint.es2-f357329b.js index fc49df19..3f596d33 100644 --- a/assets/hint.es2-e6bfba5e.js +++ b/assets/hint.es2-f357329b.js @@ -1 +1 @@ -import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-5482a1c3.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); +import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-f73309ce.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); diff --git a/assets/html-3ea238d3.js b/assets/html-08d3ca77.js similarity index 98% rename from assets/html-3ea238d3.js rename to assets/html-08d3ca77.js index a3f2bba8..116b2801 100644 --- a/assets/html-3ea238d3.js +++ b/assets/html-08d3ca77.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/htmlMode-c7f55510.js b/assets/htmlMode-e8ba8f80.js similarity index 99% rename from assets/htmlMode-c7f55510.js rename to assets/htmlMode-e8ba8f80.js index 079b3ad0..a8719687 100644 --- a/assets/htmlMode-c7f55510.js +++ b/assets/htmlMode-e8ba8f80.js @@ -1,4 +1,4 @@ -var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/index-5482a1c3.js b/assets/index-f73309ce.js similarity index 97% rename from assets/index-5482a1c3.js rename to assets/index-f73309ce.js index 80859b1c..ca6c95cb 100644 --- a/assets/index-5482a1c3.js +++ b/assets/index-f73309ce.js @@ -6,7 +6,7 @@ var IKe=Object.defineProperty;var OKe=(u,e,t)=>e in u?IKe(u,e,{enumerable:!0,con * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Yy=Symbol.for("react.element"),VKe=Symbol.for("react.portal"),$Ke=Symbol.for("react.fragment"),KKe=Symbol.for("react.strict_mode"),WKe=Symbol.for("react.profiler"),GKe=Symbol.for("react.provider"),UKe=Symbol.for("react.context"),qKe=Symbol.for("react.forward_ref"),JKe=Symbol.for("react.suspense"),ZKe=Symbol.for("react.memo"),YKe=Symbol.for("react.lazy"),Tre=Symbol.iterator;function QKe(u){return u===null||typeof u!="object"?null:(u=Tre&&u[Tre]||u["@@iterator"],typeof u=="function"?u:null)}var Txe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nxe=Object.assign,Pxe={};function a6(u,e,t){this.props=u,this.context=e,this.refs=Pxe,this.updater=t||Txe}a6.prototype.isReactComponent={};a6.prototype.setState=function(u,e){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,e,"setState")};a6.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function Rxe(){}Rxe.prototype=a6.prototype;function FQ(u,e,t){this.props=u,this.context=e,this.refs=Pxe,this.updater=t||Txe}var yQ=FQ.prototype=new Rxe;yQ.constructor=FQ;Nxe(yQ,a6.prototype);yQ.isPureReactComponent=!0;var Nre=Array.isArray,Ixe=Object.prototype.hasOwnProperty,AQ={current:null},Oxe={key:!0,ref:!0,__self:!0,__source:!0};function jxe(u,e,t){var n,i={},r=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(r=""+e.key),e)Ixe.call(e,n)&&!Oxe.hasOwnProperty(n)&&(i[n]=e[n]);var o=arguments.length-2;if(o===1)i.children=t;else if(1{n.current=!1}:u,e)}var E0=iGe;function Ub(){}function i5(u,e,t,n){return rGe(u,n)||aGe(u,e,t,n)}function rGe(u,e){return u.editor.getModel(qxe(u,e))}function aGe(u,e,t,n){return u.editor.createModel(e,t,n?qxe(u,n):void 0)}function qxe(u,e){return u.Uri.parse(e)}function oGe({original:u,modified:e,language:t,originalLanguage:n,modifiedLanguage:i,originalModelPath:r,modifiedModelPath:a,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:s=!1,theme:l="light",loading:c="Loading...",options:d={},height:h="100%",width:E="100%",className:m,wrapperProps:g={},beforeMount:f=Ub,onMount:p=Ub}){let[D,x]=C.useState(!1),[b,k]=C.useState(!0),A=C.useRef(null),F=C.useRef(null),S=C.useRef(null),w=C.useRef(p),z=C.useRef(f),N=C.useRef(!1);Uxe(()=>{let L=oB.init();return L.then(T=>(F.current=T)&&k(!1)).catch(T=>(T==null?void 0:T.type)!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>A.current?_():L.cancel()}),E0(()=>{if(A.current&&F.current){let L=A.current.getOriginalEditor(),T=i5(F.current,u||"",n||t||"text",r||"");T!==L.getModel()&&L.setModel(T)}},[r],D),E0(()=>{if(A.current&&F.current){let L=A.current.getModifiedEditor(),T=i5(F.current,e||"",i||t||"text",a||"");T!==L.getModel()&&L.setModel(T)}},[a],D),E0(()=>{let L=A.current.getModifiedEditor();L.getOption(F.current.editor.EditorOption.readOnly)?L.setValue(e||""):e!==L.getValue()&&(L.executeEdits("",[{range:L.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),L.pushUndoStop())},[e],D),E0(()=>{var L,T;(T=(L=A.current)==null?void 0:L.getModel())==null||T.original.setValue(u||"")},[u],D),E0(()=>{let{original:L,modified:T}=A.current.getModel();F.current.editor.setModelLanguage(L,n||t||"text"),F.current.editor.setModelLanguage(T,i||t||"text")},[t,n,i],D),E0(()=>{var L;(L=F.current)==null||L.editor.setTheme(l)},[l],D),E0(()=>{var L;(L=A.current)==null||L.updateOptions(d)},[d],D);let O=C.useCallback(()=>{var R;if(!F.current)return;z.current(F.current);let L=i5(F.current,u||"",n||t||"text",r||""),T=i5(F.current,e||"",i||t||"text",a||"");(R=A.current)==null||R.setModel({original:L,modified:T})},[t,e,i,u,n,r,a]),y=C.useCallback(()=>{var L;!N.current&&S.current&&(A.current=F.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),O(),(L=F.current)==null||L.editor.setTheme(l),x(!0),N.current=!0)},[d,l,O]);C.useEffect(()=>{D&&w.current(A.current,F.current)},[D]),C.useEffect(()=>{!b&&!D&&y()},[b,D,y]);function _(){var T,R,I,H;let L=(T=A.current)==null?void 0:T.getModel();o||((R=L==null?void 0:L.original)==null||R.dispose()),s||((I=L==null?void 0:L.modified)==null||I.dispose()),(H=A.current)==null||H.dispose()}return M.createElement(Gxe,{width:E,height:h,isEditorReady:D,loading:c,_ref:S,className:m,wrapperProps:g})}var sGe=oGe;C.memo(sGe);function lGe(u){let e=C.useRef();return C.useEffect(()=>{e.current=u},[u]),e.current}var cGe=lGe,j7=new Map;function dGe({defaultValue:u,defaultLanguage:e,defaultPath:t,value:n,language:i,path:r,theme:a="light",line:o,loading:s="Loading...",options:l={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:h=!1,width:E="100%",height:m="100%",className:g,wrapperProps:f={},beforeMount:p=Ub,onMount:D=Ub,onChange:x,onValidate:b=Ub}){let[k,A]=C.useState(!1),[F,S]=C.useState(!0),w=C.useRef(null),z=C.useRef(null),N=C.useRef(null),O=C.useRef(D),y=C.useRef(p),_=C.useRef(),L=C.useRef(n),T=cGe(r),R=C.useRef(!1),I=C.useRef(!1);Uxe(()=>{let U=oB.init();return U.then(J=>(w.current=J)&&S(!1)).catch(J=>(J==null?void 0:J.type)!=="cancelation"&&console.error("Monaco initialization: error:",J)),()=>z.current?V():U.cancel()}),E0(()=>{var J,Y,X,re;let U=i5(w.current,u||n||"",e||i||"",r||t||"");U!==((J=z.current)==null?void 0:J.getModel())&&(d&&j7.set(T,(Y=z.current)==null?void 0:Y.saveViewState()),(X=z.current)==null||X.setModel(U),d&&((re=z.current)==null||re.restoreViewState(j7.get(r))))},[r],k),E0(()=>{var U;(U=z.current)==null||U.updateOptions(l)},[l],k),E0(()=>{!z.current||n===void 0||(z.current.getOption(w.current.editor.EditorOption.readOnly)?z.current.setValue(n):n!==z.current.getValue()&&(I.current=!0,z.current.executeEdits("",[{range:z.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),z.current.pushUndoStop(),I.current=!1))},[n],k),E0(()=>{var J,Y;let U=(J=z.current)==null?void 0:J.getModel();U&&i&&((Y=w.current)==null||Y.editor.setModelLanguage(U,i))},[i],k),E0(()=>{var U;o!==void 0&&((U=z.current)==null||U.revealLine(o))},[o],k),E0(()=>{var U;(U=w.current)==null||U.editor.setTheme(a)},[a],k);let H=C.useCallback(()=>{var U;if(!(!N.current||!w.current)&&!R.current){y.current(w.current);let J=r||t,Y=i5(w.current,n||u||"",e||i||"",J||"");z.current=(U=w.current)==null?void 0:U.editor.create(N.current,{model:Y,automaticLayout:!0,...l},c),d&&z.current.restoreViewState(j7.get(J)),w.current.editor.setTheme(a),o!==void 0&&z.current.revealLine(o),A(!0),R.current=!0}},[u,e,t,n,i,r,l,c,d,a,o]);C.useEffect(()=>{k&&O.current(z.current,w.current)},[k]),C.useEffect(()=>{!F&&!k&&H()},[F,k,H]),L.current=n,C.useEffect(()=>{var U,J;k&&x&&((U=_.current)==null||U.dispose(),_.current=(J=z.current)==null?void 0:J.onDidChangeModelContent(Y=>{I.current||x(z.current.getValue(),Y)}))},[k,x]),C.useEffect(()=>{if(k){let U=w.current.editor.onDidChangeMarkers(J=>{var X;let Y=(X=z.current.getModel())==null?void 0:X.uri;if(Y&&J.find(re=>re.path===Y.path)){let re=w.current.editor.getModelMarkers({resource:Y});b==null||b(re)}});return()=>{U==null||U.dispose()}}return()=>{}},[k,b]);function V(){var U,J;(U=_.current)==null||U.dispose(),h?d&&j7.set(r,z.current.saveViewState()):(J=z.current.getModel())==null||J.dispose(),z.current.dispose()}return M.createElement(Gxe,{width:E,height:m,isEditorReady:k,loading:s,_ref:N,className:g,wrapperProps:f})}var hGe=dGe,Jxe=C.memo(hGe),EGe=Jxe,Zxe={exports:{}};(function(u,e){(function(t,n){u.exports=n()})(bl,function(){var t=1e3,n=6e4,i=36e5,r="millisecond",a="second",o="minute",s="hour",l="day",c="week",d="month",h="quarter",E="year",m="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var L=["th","st","nd","rd"],T=_%100;return"["+_+(L[(T-20)%10]||L[T]||L[0])+"]"}},x=function(_,L,T){var R=String(_);return!R||R.length>=L?_:""+Array(L+1-R.length).join(T)+_},b={s:x,z:function(_){var L=-_.utcOffset(),T=Math.abs(L),R=Math.floor(T/60),I=T%60;return(L<=0?"+":"-")+x(R,2,"0")+":"+x(I,2,"0")},m:function _(L,T){if(L.date()1)return _(V[0])}else{var U=L.name;A[U]=L,I=U}return!R&&I&&(k=I),I||!R&&k},z=function(_,L){if(S(_))return _.clone();var T=typeof L=="object"?L:{};return T.date=_,T.args=arguments,new O(T)},N=b;N.l=w,N.i=S,N.w=function(_,L){return z(_,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var O=function(){function _(T){this.$L=w(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[F]=!0}var L=_.prototype;return L.parse=function(T){this.$d=function(R){var I=R.date,H=R.utc;if(I===null)return new Date(NaN);if(N.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var V=I.match(f);if(V){var U=V[2]-1||0,J=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],U,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)):new Date(V[1],U,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)}}return new Date(I)}(T),this.init()},L.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},L.$utils=function(){return N},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(T,R){var I=z(T);return this.startOf(R)<=I&&I<=this.endOf(R)},L.isAfter=function(T,R){return z(T)n===i){if(u===e)return!0;if(!u||!e||u.length!==e.length)return!1;for(let n=0,i=u.length;nt(u[n],e))}function xGe(u,e){let t=0,n=u-1;for(;t<=n;){const i=(t+n)/2|0,r=e(i);if(r<0)t=i+1;else if(r>0)n=i-1;else return i}return-(t+1)}function oK(u,e,t){if(u=u|0,u>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],i=[],r=[],a=[];for(const o of e){const s=t(o,n);s<0?i.push(o):s>0?r.push(o):a.push(o)}return u!!e)}function Kre(u){let e=0;for(let t=0;t0}function Lm(u,e=t=>t){const t=new Set;return u.filter(n=>{const i=e(n);return t.has(i)?!1:(t.add(i),!0)})}function tve(u,e){return u.length>0?u[0]:e}function Wa(u,e){let t=typeof e=="number"?u:0;typeof e=="number"?t=u:(t=0,e=u);const n=[];if(t<=e)for(let i=t;ie;i--)n.push(i);return n}function TN(u,e,t){const n=u.slice(0,e),i=u.slice(e);return n.concat(t,i)}function ZO(u,e){const t=u.indexOf(e);t>-1&&(u.splice(t,1),u.unshift(e))}function H7(u,e){const t=u.indexOf(e);t>-1&&(u.splice(t,1),u.push(e))}function sK(u,e){for(const t of e)u.push(t)}function SQ(u){return Array.isArray(u)?u:[u]}function CGe(u,e,t){const n=uve(u,e),i=u.length,r=t.length;u.length=i+r;for(let a=i-1;a>=n;a--)u[a+r]=u[a];for(let a=0;a0}u.isGreaterThan=n;function i(r){return r===0}u.isNeitherLessOrGreaterThan=i,u.greaterThan=1,u.lessThan=-1,u.neitherLessOrGreaterThan=0})(ek||(ek={}));function y0(u,e){return(t,n)=>e(u(t),u(n))}function bGe(...u){return(e,t)=>{for(const n of u){const i=n(e,t);if(!ek.isNeitherLessOrGreaterThan(i))return i}return ek.neitherLessOrGreaterThan}}const Uh=(u,e)=>u-e,kGe=(u,e)=>Uh(u?1:0,e?1:0);function nve(u){return(e,t)=>-u(e,t)}class s4{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class h1{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new h1(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new h1(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(i=>((n||ek.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0)),t}}h1.empty=new h1(u=>{});function io(u){return typeof u=="string"}function eo(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}function FGe(u){const e=Object.getPrototypeOf(Uint8Array);return typeof u=="object"&&u instanceof e}function zm(u){return typeof u=="number"&&!isNaN(u)}function Gre(u){return!!u&&typeof u[Symbol.iterator]=="function"}function ive(u){return u===!0||u===!1}function is(u){return typeof u>"u"}function tk(u){return!zs(u)}function zs(u){return is(u)||u===null}function Ru(u,e){if(!u)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Nf(u){if(zs(u))throw new Error("Assertion Failed: argument is undefined or null");return u}function uk(u){return typeof u=="function"}function yGe(u,e){const t=Math.min(u.length,e.length);for(let n=0;n{e[t]=n&&typeof n=="object"?xh(n):n}),e}function _Ge(u){if(!u||typeof u!="object")return u;const e=[u];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const n in t)if(rve.call(t,n)){const i=t[n];typeof i=="object"&&!Object.isFrozen(i)&&!FGe(i)&&e.push(i)}}return u}const rve=Object.prototype.hasOwnProperty;function ave(u,e){return lK(u,e,new Set)}function lK(u,e,t){if(zs(u))return u;const n=e(u);if(typeof n<"u")return n;if(Array.isArray(u)){const i=[];for(const r of u)i.push(lK(r,e,t));return i}if(eo(u)){if(t.has(u))throw new Error("Cannot clone recursive data-structure");t.add(u);const i={};for(const r in u)rve.call(u,r)&&(i[r]=lK(u[r],e,t));return t.delete(u),i}return u}function NN(u,e,t=!0){return eo(u)?(eo(e)&&Object.keys(e).forEach(n=>{n in u?t&&(eo(u[n])&&eo(e[n])?NN(u[n],e[n],t):u[n]=e[n]):u[n]=e[n]}),u):e}function $s(u,e){if(u===e)return!0;if(u==null||e===null||e===void 0||typeof u!=typeof e||typeof u!="object"||Array.isArray(u)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(u)){if(u.length!==e.length)return!1;for(t=0;tfunction(){const r=Array.prototype.slice.call(arguments,0);return e(i,r)},n={};for(const i of u)n[i]=t(i);return n}globalThis&&globalThis.__awaiter;let wGe=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function LGe(u,e){let t;return e.length===0?t=u:t=u.replace(/\{(\d+)\}/g,(n,i)=>{const r=i[0],a=e[r];let o=n;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),wGe&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function v(u,e,...t){return LGe(e,t)}var YO;const r5="en";let sB=!1,lB=!1,TS=!1,ove=!1,wQ=!1,LQ=!1,sve=!1,V7,NS=r5,Ure=r5,zGe,ic;const kl=typeof self=="object"?self:typeof global=="object"?global:{};let Ua;typeof kl.vscode<"u"&&typeof kl.vscode.process<"u"?Ua=kl.vscode.process:typeof process<"u"&&(Ua=process);const MGe=typeof((YO=Ua==null?void 0:Ua.versions)===null||YO===void 0?void 0:YO.electron)=="string",TGe=MGe&&(Ua==null?void 0:Ua.type)==="renderer";if(typeof navigator=="object"&&!TGe)ic=navigator.userAgent,sB=ic.indexOf("Windows")>=0,lB=ic.indexOf("Macintosh")>=0,LQ=(ic.indexOf("Macintosh")>=0||ic.indexOf("iPad")>=0||ic.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,TS=ic.indexOf("Linux")>=0,sve=(ic==null?void 0:ic.indexOf("Mobi"))>=0,wQ=!0,v({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),V7=r5,NS=V7,Ure=navigator.language;else if(typeof Ua=="object"){sB=Ua.platform==="win32",lB=Ua.platform==="darwin",TS=Ua.platform==="linux",TS&&Ua.env.SNAP&&Ua.env.SNAP_REVISION,Ua.env.CI||Ua.env.BUILD_ARTIFACTSTAGINGDIRECTORY,V7=r5,NS=r5;const u=Ua.env.VSCODE_NLS_CONFIG;if(u)try{const e=JSON.parse(u),t=e.availableLanguages["*"];V7=e.locale,Ure=e.osLocale,NS=t||r5,zGe=e._translationsConfigFile}catch{}ove=!0}else console.error("Unable to resolve platform.");const na=sB,iu=lB,Pa=TS,Oc=ove,dg=wQ,NGe=wQ&&typeof kl.importScripts=="function",Zc=LQ,PGe=sve,k1=ic,RGe=NS,IGe=typeof kl.postMessage=="function"&&!kl.importScripts,lve=(()=>{if(IGe){const u=[];kl.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=u.length;n{const n=++e;u.push({id:n,callback:t}),kl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return u=>setTimeout(u)})(),Is=lB||LQ?2:sB?1:3;let qre=!0,Jre=!1;function cve(){if(!Jre){Jre=!0;const u=new Uint8Array(2);u[0]=1,u[1]=2,qre=new Uint16Array(u.buffer)[0]===512+1}return qre}const dve=!!(k1&&k1.indexOf("Chrome")>=0),OGe=!!(k1&&k1.indexOf("Firefox")>=0),jGe=!!(!dve&&k1&&k1.indexOf("Safari")>=0),HGe=!!(k1&&k1.indexOf("Edg/")>=0);k1&&k1.indexOf("Android")>=0;const Ea={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var $t;(function(u){function e(D){return D&&typeof D=="object"&&typeof D[Symbol.iterator]=="function"}u.is=e;const t=Object.freeze([]);function n(){return t}u.empty=n;function*i(D){yield D}u.single=i;function r(D){return e(D)?D:i(D)}u.wrap=r;function a(D){return D||t}u.from=a;function*o(D){for(let x=D.length-1;x>=0;x--)yield D[x]}u.reverse=o;function s(D){return!D||D[Symbol.iterator]().next().done===!0}u.isEmpty=s;function l(D){return D[Symbol.iterator]().next().value}u.first=l;function c(D,x){for(const b of D)if(x(b))return!0;return!1}u.some=c;function d(D,x){for(const b of D)if(x(b))return b}u.find=d;function*h(D,x){for(const b of D)x(b)&&(yield b)}u.filter=h;function*E(D,x){let b=0;for(const k of D)yield x(k,b++)}u.map=E;function*m(...D){for(const x of D)for(const b of x)yield b}u.concat=m;function g(D,x,b){let k=b;for(const A of D)k=x(k,A);return k}u.reduce=g;function*f(D,x,b=D.length){for(x<0&&(x+=D.length),b<0?b+=D.length:b>D.length&&(b=D.length);x{i||(i=!0,this._remove(n))}}shift(){if(this._first!==Ri.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ri.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ri.Undefined&&e.next!==Ri.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ri.Undefined&&e.next===Ri.Undefined?(this._first=Ri.Undefined,this._last=Ri.Undefined):e.next===Ri.Undefined?(this._last=this._last.prev,this._last.next=Ri.Undefined):e.prev===Ri.Undefined&&(this._first=this._first.next,this._first.prev=Ri.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ri.Undefined;)yield e.element,e=e.next}}const hve="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function VGe(u=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of hve)u.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const zQ=VGe();function Eve(u){let e=zQ;if(u&&u instanceof RegExp)if(u.global)e=u;else{let t="g";u.ignoreCase&&(t+="i"),u.multiline&&(t+="m"),u.unicode&&(t+="u"),e=new RegExp(u.source,t)}return e.lastIndex=0,e}const mve=new to;mve.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function nk(u,e,t,n,i){if(i||(i=$t.first(mve)),t.length>i.maxLen){let l=u-i.maxLen/2;return l<0?l=0:n+=l,t=t.substring(l,u+i.maxLen/2),nk(u,e,t,n,i)}const r=Date.now(),a=u-1-n;let o=-1,s=null;for(let l=1;!(Date.now()-r>=i.timeBudget);l++){const c=a-i.windowSize*l;e.lastIndex=Math.max(0,c);const d=$Ge(e,t,a,o);if(!d&&s||(s=d,c<=0))break;o=c}if(s){const l={word:s[0],startColumn:n+1+s.index,endColumn:n+1+s.index+s[0].length};return e.lastIndex=0,l}return null}function $Ge(u,e,t,n){let i;for(;i=u.exec(e);){const r=i.index||0;if(r<=t&&u.lastIndex>=t)return i;if(n>0&&r>n)return null}return null}const Y4=8;class gve{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class fve{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class On{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return PN(e,t)}compute(e,t,n){return n}}class qb{constructor(e,t){this.newValue=e,this.didChange=t}}function PN(u,e){if(typeof u!="object"||typeof e!="object"||!u||!e)return new qb(e,u!==e);if(Array.isArray(u)||Array.isArray(e)){const n=Array.isArray(u)&&Array.isArray(e)&&di(u,e);return new qb(e,!n)}let t=!1;for(const n in e)if(e.hasOwnProperty(n)){const i=PN(u[n],e[n]);i.didChange&&(u[n]=i.newValue,t=!0)}return new qb(u,t)}class Xy{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return PN(e,t)}validate(e){return this.defaultValue}}class o6{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return PN(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}}function ut(u,e){return typeof u>"u"?e:u==="false"?!1:!!u}class lu extends o6{constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return ut(e,this.defaultValue)}}function rf(u,e,t,n){if(typeof u>"u")return e;let i=parseInt(u,10);return isNaN(i)?e:(i=Math.max(t,i),i=Math.min(n,i),i|0)}class Ku extends o6{static clampedInt(e,t,n,i){return rf(e,t,n,i)}constructor(e,t,n,i,r,a=void 0){typeof a<"u"&&(a.type="integer",a.default=n,a.minimum=i,a.maximum=r),super(e,t,n,a),this.minimum=i,this.maximum=r}validate(e){return Ku.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function KGe(u,e,t,n){if(typeof u>"u")return e;const i=El.float(u,e);return El.clamp(i,t,n)}class El extends o6{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,i,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=i}validate(e){return this.validationFn(El.float(e,this.defaultValue))}}class Qo extends o6{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return Qo.string(e,this.defaultValue)}}function Di(u,e,t,n){return typeof u!="string"?e:n&&u in n?n[u]:t.indexOf(u)===-1?e:u}class Qn extends o6{constructor(e,t,n,i,r=void 0){typeof r<"u"&&(r.type="string",r.enum=i,r.default=n),super(e,t,n,r),this._allowedValues=i}validate(e){return Di(e,this.defaultValue,this._allowedValues)}}class $7 extends On{constructor(e,t,n,i,r,a,o=void 0){typeof o<"u"&&(o.type="string",o.enum=r,o.default=i),super(e,t,n,o),this._allowedValues=r,this._convert=a}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function WGe(u){switch(u){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class GGe extends On{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[v("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),v("accessibilitySupport.on","Optimize for usage with a Screen Reader"),v("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:v("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}}class UGe extends On{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:v("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:v("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ut(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ut(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function qGe(u){switch(u){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Sr;(function(u){u[u.Line=1]="Line",u[u.Block=2]="Block",u[u.Underline=3]="Underline",u[u.LineThin=4]="LineThin",u[u.BlockOutline=5]="BlockOutline",u[u.UnderlineThin=6]="UnderlineThin"})(Sr||(Sr={}));function JGe(u){switch(u){case"line":return Sr.Line;case"block":return Sr.Block;case"underline":return Sr.Underline;case"line-thin":return Sr.LineThin;case"block-outline":return Sr.BlockOutline;case"underline-thin":return Sr.UnderlineThin}}class ZGe extends Xy{constructor(){super(140)}compute(e,t,n){const i=["monaco-editor"];return t.get(39)&&i.push(t.get(39)),e.extraEditorClassName&&i.push(e.extraEditorClassName),t.get(73)==="default"?i.push("mouse-default"):t.get(73)==="copy"&&i.push("mouse-copy"),t.get(110)&&i.push("showUnused"),t.get(138)&&i.push("showDeprecated"),i.join(" ")}}class YGe extends lu{constructor(){super(37,"emptySelectionClipboard",!0,{description:v("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class QGe extends On{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:v("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[v("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),v("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),v("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:v("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[v("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),v("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),v("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:v("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:v("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:iu},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:v("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:v("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ut(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Di(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Di(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ut(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ut(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ut(t.loop,this.defaultValue.loop)}}}class Ms extends On{constructor(){super(51,"fontLigatures",Ms.OFF,{anyOf:[{type:"boolean",description:v("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:v("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:v("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Ms.OFF:e==="true"?Ms.ON:e:e?Ms.ON:Ms.OFF}}Ms.OFF='"liga" off, "calt" off';Ms.ON='"liga" on, "calt" on';class _c extends On{constructor(){super(54,"fontVariations",_c.OFF,{anyOf:[{type:"boolean",description:v("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:v("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:v("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_c.OFF:e==="true"?_c.TRANSLATE:e:e?_c.TRANSLATE:_c.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}}_c.OFF="normal";_c.TRANSLATE="translate";class XGe extends Xy{constructor(){super(50)}compute(e,t,n){return e.fontInfo}}class eUe extends o6{constructor(){super(52,"fontSize",os.fontSize,{type:"number",minimum:6,maximum:100,default:os.fontSize,description:v("fontSize","Controls the font size in pixels.")})}validate(e){const t=El.float(e,this.defaultValue);return t===0?os.fontSize:El.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Vd extends On{constructor(){super(53,"fontWeight",os.fontWeight,{anyOf:[{type:"number",minimum:Vd.MINIMUM_VALUE,maximum:Vd.MAXIMUM_VALUE,errorMessage:v("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Vd.SUGGESTION_VALUES}],default:os.fontWeight,description:v("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Ku.clampedInt(e,os.fontWeight,Vd.MINIMUM_VALUE,Vd.MAXIMUM_VALUE))}}Vd.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Vd.MINIMUM_VALUE=1;Vd.MAXIMUM_VALUE=1e3;class tUe extends On{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[v("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),v("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),v("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:v("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:v("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:v("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:v("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:v("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:v("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:v("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:v("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:v("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:v("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:v("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,r,a;if(!e||typeof e!="object")return this.defaultValue;const o=e;return{multiple:Di(o.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=o.multipleDefinitions)!==null&&t!==void 0?t:Di(o.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=o.multipleTypeDefinitions)!==null&&n!==void 0?n:Di(o.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(i=o.multipleDeclarations)!==null&&i!==void 0?i:Di(o.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=o.multipleImplementations)!==null&&r!==void 0?r:Di(o.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(a=o.multipleReferences)!==null&&a!==void 0?a:Di(o.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Qo.string(o.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Qo.string(o.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Qo.string(o.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Qo.string(o.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Qo.string(o.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class uUe extends On{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:v("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:v("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:v("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:v("hover.hidingDelay","Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:v("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),delay:Ku.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ut(t.sticky,this.defaultValue.sticky),hidingDelay:Ku.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:ut(t.above,this.defaultValue.above)}}}class Q5 extends Xy{constructor(){super(143)}compute(e,t,n){return Q5.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let i=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(i=Math.max(i,t-1));const r=(n+e.viewLineCount+i)/(e.pixelRatio*e.height),a=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:i,desiredRatio:r,minimapLineCount:a}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const a=t.stableMinimapLayoutInput,o=a&&e.outerHeight===a.outerHeight&&e.lineHeight===a.lineHeight&&e.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&e.pixelRatio===a.pixelRatio&&e.scrollBeyondLastLine===a.scrollBeyondLastLine&&e.paddingTop===a.paddingTop&&e.paddingBottom===a.paddingBottom&&e.minimap.enabled===a.minimap.enabled&&e.minimap.side===a.minimap.side&&e.minimap.size===a.minimap.size&&e.minimap.showSlider===a.minimap.showSlider&&e.minimap.renderCharacters===a.minimap.renderCharacters&&e.minimap.maxColumn===a.minimap.maxColumn&&e.minimap.scale===a.minimap.scale&&e.verticalScrollbarWidth===a.verticalScrollbarWidth&&e.isViewportWrapping===a.isViewportWrapping,s=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const E=e.minimap.maxColumn,m=e.minimap.size,g=e.minimap.side,f=e.verticalScrollbarWidth,p=e.viewLineCount,D=e.remainingWidth,x=e.isViewportWrapping,b=d?2:3;let k=Math.floor(r*i);const A=k/r;let F=!1,S=!1,w=b*h,z=h/r,N=1;if(m==="fill"||m==="fit"){const{typicalViewportLineCount:I,extraLinesBeforeFirstLine:H,extraLinesBeyondLastLine:V,desiredRatio:U,minimapLineCount:J}=Q5.computeContainedMinimapLineCount({viewLineCount:p,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:i,lineHeight:s,pixelRatio:r});if(p/J>1)F=!0,S=!0,h=1,w=1,z=h/r;else{let X=!1,re=h+1;if(m==="fit"){const ge=Math.ceil((H+p+V)*w);x&&o&&D<=t.stableFitRemainingWidth?(X=!0,re=t.stableFitMaxMinimapScale):X=ge>k}if(m==="fill"||X){F=!0;const ge=h;w=Math.min(s*r,Math.max(1,Math.floor(1/U))),x&&o&&D<=t.stableFitRemainingWidth&&(re=t.stableFitMaxMinimapScale),h=Math.min(re,Math.max(1,Math.floor(w/b))),h>ge&&(N=Math.min(2,h/ge)),z=h/r/N,k=Math.ceil(Math.max(I,H+p+V)*w),x?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=D,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const O=Math.floor(E*z),y=Math.min(O,Math.max(0,Math.floor((D-f-2)*z/(l+z)))+Y4);let _=Math.floor(r*y);const L=_/r;_=Math.floor(_*N);const T=d?1:2,R=g==="left"?0:n-y-f;return{renderMinimap:T,minimapLeft:R,minimapWidth:y,minimapHeightIsEditorHeight:F,minimapIsSampling:S,minimapScale:h,minimapLineHeight:w,minimapCanvasInnerWidth:_,minimapCanvasInnerHeight:k,minimapCanvasOuterWidth:L,minimapCanvasOuterHeight:A}}static computeLayout(e,t){const n=t.outerWidth|0,i=t.outerHeight|0,r=t.lineHeight|0,a=t.lineNumbersDigitCount|0,o=t.typicalHalfwidthCharacterWidth,s=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(135),h=d==="inherit"?e.get(134):d,E=h==="inherit"?e.get(130):h,m=e.get(133),g=t.isDominatedByLongLines,f=e.get(57),p=e.get(67).renderType!==0,D=e.get(68),x=e.get(104),b=e.get(83),k=e.get(72),A=e.get(102),F=A.verticalScrollbarSize,S=A.verticalHasArrows,w=A.arrowSize,z=A.horizontalScrollbarSize,N=e.get(43),O=e.get(109)!=="never";let y=e.get(65);N&&O&&(y+=16);let _=0;if(p){const Ve=Math.max(a,D);_=Math.round(Ve*s)}let L=0;f&&(L=r*t.glyphMarginDecorationLaneCount);let T=0,R=T+L,I=R+_,H=I+y;const V=n-L-_-y;let U=!1,J=!1,Y=-1;h==="inherit"&&g?(U=!0,J=!0):E==="on"||E==="bounded"?J=!0:E==="wordWrapColumn"&&(Y=m);const X=Q5._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:r,typicalHalfwidthCharacterWidth:o,pixelRatio:l,scrollBeyondLastLine:x,paddingTop:b.top,paddingBottom:b.bottom,minimap:k,verticalScrollbarWidth:F,viewLineCount:c,remainingWidth:V,isViewportWrapping:J},t.memory||new fve);X.renderMinimap!==0&&X.minimapLeft===0&&(T+=X.minimapWidth,R+=X.minimapWidth,I+=X.minimapWidth,H+=X.minimapWidth);const re=V-X.minimapWidth,ge=Math.max(1,Math.floor((re-F-2)/o)),_e=S?w:0;return J&&(Y=Math.max(1,ge),E==="bounded"&&(Y=Math.min(Y,m))),{width:n,height:i,glyphMarginLeft:T,glyphMarginWidth:L,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:R,lineNumbersWidth:_,decorationsLeft:I,decorationsWidth:y,contentLeft:H,contentWidth:re,minimap:X,viewportColumn:ge,isWordWrapMinified:U,isViewportWrapping:J,wrappingColumn:Y,verticalScrollbarWidth:F,horizontalScrollbarHeight:z,overviewRuler:{top:_e,width:F,height:i-2*_e,right:0}}}}class nUe extends On{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[v("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),v("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:v("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Di(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}}class iUe extends On{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:v("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ut(e.enabled,this.defaultValue.enabled)}}}class rUe extends On{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:v("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:v("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:v("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:v("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),maxLineCount:Ku.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Di(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:ut(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class aUe extends On{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:v("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[v("editor.inlayHints.on","Inlay hints are enabled"),v("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",iu?"Ctrl+Option":"Ctrl+Alt"),v("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",iu?"Ctrl+Option":"Ctrl+Alt"),v("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:v("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:v("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:v("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Di(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Ku.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Qo.string(t.fontFamily,this.defaultValue.fontFamily),padding:ut(t.padding,this.defaultValue.padding)}}}class oUe extends On{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Ku.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Ku.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class sUe extends El{constructor(){super(66,"lineHeight",os.lineHeight,e=>El.clamp(e,0,150),{markdownDescription:v("lineHeight",`Controls the line height. + `},Vre=MWe(RWe)(Vxe),IWe={config:NWe},OWe=function(){for(var e=arguments.length,t=new Array(e),n=0;n{n.current=!1}:u,e)}var m0=iGe;function Ub(){}function i5(u,e,t,n){return rGe(u,n)||aGe(u,e,t,n)}function rGe(u,e){return u.editor.getModel(qxe(u,e))}function aGe(u,e,t,n){return u.editor.createModel(e,t,n?qxe(u,n):void 0)}function qxe(u,e){return u.Uri.parse(e)}function oGe({original:u,modified:e,language:t,originalLanguage:n,modifiedLanguage:i,originalModelPath:r,modifiedModelPath:a,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:s=!1,theme:l="light",loading:c="Loading...",options:d={},height:h="100%",width:E="100%",className:m,wrapperProps:g={},beforeMount:f=Ub,onMount:p=Ub}){let[D,x]=C.useState(!1),[b,k]=C.useState(!0),A=C.useRef(null),F=C.useRef(null),S=C.useRef(null),w=C.useRef(p),z=C.useRef(f),N=C.useRef(!1);Uxe(()=>{let L=oB.init();return L.then(T=>(F.current=T)&&k(!1)).catch(T=>(T==null?void 0:T.type)!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>A.current?_():L.cancel()}),m0(()=>{if(A.current&&F.current){let L=A.current.getOriginalEditor(),T=i5(F.current,u||"",n||t||"text",r||"");T!==L.getModel()&&L.setModel(T)}},[r],D),m0(()=>{if(A.current&&F.current){let L=A.current.getModifiedEditor(),T=i5(F.current,e||"",i||t||"text",a||"");T!==L.getModel()&&L.setModel(T)}},[a],D),m0(()=>{let L=A.current.getModifiedEditor();L.getOption(F.current.editor.EditorOption.readOnly)?L.setValue(e||""):e!==L.getValue()&&(L.executeEdits("",[{range:L.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),L.pushUndoStop())},[e],D),m0(()=>{var L,T;(T=(L=A.current)==null?void 0:L.getModel())==null||T.original.setValue(u||"")},[u],D),m0(()=>{let{original:L,modified:T}=A.current.getModel();F.current.editor.setModelLanguage(L,n||t||"text"),F.current.editor.setModelLanguage(T,i||t||"text")},[t,n,i],D),m0(()=>{var L;(L=F.current)==null||L.editor.setTheme(l)},[l],D),m0(()=>{var L;(L=A.current)==null||L.updateOptions(d)},[d],D);let O=C.useCallback(()=>{var R;if(!F.current)return;z.current(F.current);let L=i5(F.current,u||"",n||t||"text",r||""),T=i5(F.current,e||"",i||t||"text",a||"");(R=A.current)==null||R.setModel({original:L,modified:T})},[t,e,i,u,n,r,a]),y=C.useCallback(()=>{var L;!N.current&&S.current&&(A.current=F.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),O(),(L=F.current)==null||L.editor.setTheme(l),x(!0),N.current=!0)},[d,l,O]);C.useEffect(()=>{D&&w.current(A.current,F.current)},[D]),C.useEffect(()=>{!b&&!D&&y()},[b,D,y]);function _(){var T,R,I,H;let L=(T=A.current)==null?void 0:T.getModel();o||((R=L==null?void 0:L.original)==null||R.dispose()),s||((I=L==null?void 0:L.modified)==null||I.dispose()),(H=A.current)==null||H.dispose()}return M.createElement(Gxe,{width:E,height:h,isEditorReady:D,loading:c,_ref:S,className:m,wrapperProps:g})}var sGe=oGe;C.memo(sGe);function lGe(u){let e=C.useRef();return C.useEffect(()=>{e.current=u},[u]),e.current}var cGe=lGe,j7=new Map;function dGe({defaultValue:u,defaultLanguage:e,defaultPath:t,value:n,language:i,path:r,theme:a="light",line:o,loading:s="Loading...",options:l={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:h=!1,width:E="100%",height:m="100%",className:g,wrapperProps:f={},beforeMount:p=Ub,onMount:D=Ub,onChange:x,onValidate:b=Ub}){let[k,A]=C.useState(!1),[F,S]=C.useState(!0),w=C.useRef(null),z=C.useRef(null),N=C.useRef(null),O=C.useRef(D),y=C.useRef(p),_=C.useRef(),L=C.useRef(n),T=cGe(r),R=C.useRef(!1),I=C.useRef(!1);Uxe(()=>{let U=oB.init();return U.then(J=>(w.current=J)&&S(!1)).catch(J=>(J==null?void 0:J.type)!=="cancelation"&&console.error("Monaco initialization: error:",J)),()=>z.current?V():U.cancel()}),m0(()=>{var J,Y,X,re;let U=i5(w.current,u||n||"",e||i||"",r||t||"");U!==((J=z.current)==null?void 0:J.getModel())&&(d&&j7.set(T,(Y=z.current)==null?void 0:Y.saveViewState()),(X=z.current)==null||X.setModel(U),d&&((re=z.current)==null||re.restoreViewState(j7.get(r))))},[r],k),m0(()=>{var U;(U=z.current)==null||U.updateOptions(l)},[l],k),m0(()=>{!z.current||n===void 0||(z.current.getOption(w.current.editor.EditorOption.readOnly)?z.current.setValue(n):n!==z.current.getValue()&&(I.current=!0,z.current.executeEdits("",[{range:z.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),z.current.pushUndoStop(),I.current=!1))},[n],k),m0(()=>{var J,Y;let U=(J=z.current)==null?void 0:J.getModel();U&&i&&((Y=w.current)==null||Y.editor.setModelLanguage(U,i))},[i],k),m0(()=>{var U;o!==void 0&&((U=z.current)==null||U.revealLine(o))},[o],k),m0(()=>{var U;(U=w.current)==null||U.editor.setTheme(a)},[a],k);let H=C.useCallback(()=>{var U;if(!(!N.current||!w.current)&&!R.current){y.current(w.current);let J=r||t,Y=i5(w.current,n||u||"",e||i||"",J||"");z.current=(U=w.current)==null?void 0:U.editor.create(N.current,{model:Y,automaticLayout:!0,...l},c),d&&z.current.restoreViewState(j7.get(J)),w.current.editor.setTheme(a),o!==void 0&&z.current.revealLine(o),A(!0),R.current=!0}},[u,e,t,n,i,r,l,c,d,a,o]);C.useEffect(()=>{k&&O.current(z.current,w.current)},[k]),C.useEffect(()=>{!F&&!k&&H()},[F,k,H]),L.current=n,C.useEffect(()=>{var U,J;k&&x&&((U=_.current)==null||U.dispose(),_.current=(J=z.current)==null?void 0:J.onDidChangeModelContent(Y=>{I.current||x(z.current.getValue(),Y)}))},[k,x]),C.useEffect(()=>{if(k){let U=w.current.editor.onDidChangeMarkers(J=>{var X;let Y=(X=z.current.getModel())==null?void 0:X.uri;if(Y&&J.find(re=>re.path===Y.path)){let re=w.current.editor.getModelMarkers({resource:Y});b==null||b(re)}});return()=>{U==null||U.dispose()}}return()=>{}},[k,b]);function V(){var U,J;(U=_.current)==null||U.dispose(),h?d&&j7.set(r,z.current.saveViewState()):(J=z.current.getModel())==null||J.dispose(),z.current.dispose()}return M.createElement(Gxe,{width:E,height:m,isEditorReady:k,loading:s,_ref:N,className:g,wrapperProps:f})}var hGe=dGe,Jxe=C.memo(hGe),EGe=Jxe,Zxe={exports:{}};(function(u,e){(function(t,n){u.exports=n()})(bl,function(){var t=1e3,n=6e4,i=36e5,r="millisecond",a="second",o="minute",s="hour",l="day",c="week",d="month",h="quarter",E="year",m="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var L=["th","st","nd","rd"],T=_%100;return"["+_+(L[(T-20)%10]||L[T]||L[0])+"]"}},x=function(_,L,T){var R=String(_);return!R||R.length>=L?_:""+Array(L+1-R.length).join(T)+_},b={s:x,z:function(_){var L=-_.utcOffset(),T=Math.abs(L),R=Math.floor(T/60),I=T%60;return(L<=0?"+":"-")+x(R,2,"0")+":"+x(I,2,"0")},m:function _(L,T){if(L.date()1)return _(V[0])}else{var U=L.name;A[U]=L,I=U}return!R&&I&&(k=I),I||!R&&k},z=function(_,L){if(S(_))return _.clone();var T=typeof L=="object"?L:{};return T.date=_,T.args=arguments,new O(T)},N=b;N.l=w,N.i=S,N.w=function(_,L){return z(_,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var O=function(){function _(T){this.$L=w(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[F]=!0}var L=_.prototype;return L.parse=function(T){this.$d=function(R){var I=R.date,H=R.utc;if(I===null)return new Date(NaN);if(N.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var V=I.match(f);if(V){var U=V[2]-1||0,J=(V[7]||"0").substring(0,3);return H?new Date(Date.UTC(V[1],U,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)):new Date(V[1],U,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)}}return new Date(I)}(T),this.init()},L.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},L.$utils=function(){return N},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(T,R){var I=z(T);return this.startOf(R)<=I&&I<=this.endOf(R)},L.isAfter=function(T,R){return z(T)n===i){if(u===e)return!0;if(!u||!e||u.length!==e.length)return!1;for(let n=0,i=u.length;nt(u[n],e))}function xGe(u,e){let t=0,n=u-1;for(;t<=n;){const i=(t+n)/2|0,r=e(i);if(r<0)t=i+1;else if(r>0)n=i-1;else return i}return-(t+1)}function oK(u,e,t){if(u=u|0,u>=e.length)throw new TypeError("invalid index");const n=e[Math.floor(e.length*Math.random())],i=[],r=[],a=[];for(const o of e){const s=t(o,n);s<0?i.push(o):s>0?r.push(o):a.push(o)}return u!!e)}function Kre(u){let e=0;for(let t=0;t0}function Lm(u,e=t=>t){const t=new Set;return u.filter(n=>{const i=e(n);return t.has(i)?!1:(t.add(i),!0)})}function tve(u,e){return u.length>0?u[0]:e}function Wa(u,e){let t=typeof e=="number"?u:0;typeof e=="number"?t=u:(t=0,e=u);const n=[];if(t<=e)for(let i=t;ie;i--)n.push(i);return n}function TN(u,e,t){const n=u.slice(0,e),i=u.slice(e);return n.concat(t,i)}function ZO(u,e){const t=u.indexOf(e);t>-1&&(u.splice(t,1),u.unshift(e))}function H7(u,e){const t=u.indexOf(e);t>-1&&(u.splice(t,1),u.push(e))}function sK(u,e){for(const t of e)u.push(t)}function SQ(u){return Array.isArray(u)?u:[u]}function CGe(u,e,t){const n=uve(u,e),i=u.length,r=t.length;u.length=i+r;for(let a=i-1;a>=n;a--)u[a+r]=u[a];for(let a=0;a0}u.isGreaterThan=n;function i(r){return r===0}u.isNeitherLessOrGreaterThan=i,u.greaterThan=1,u.lessThan=-1,u.neitherLessOrGreaterThan=0})(ek||(ek={}));function A0(u,e){return(t,n)=>e(u(t),u(n))}function bGe(...u){return(e,t)=>{for(const n of u){const i=n(e,t);if(!ek.isNeitherLessOrGreaterThan(i))return i}return ek.neitherLessOrGreaterThan}}const Uh=(u,e)=>u-e,kGe=(u,e)=>Uh(u?1:0,e?1:0);function nve(u){return(e,t)=>-u(e,t)}class s4{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const n=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,n}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class h1{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new h1(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new h1(t=>this.iterate(n=>t(e(n))))}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(i=>((n||ek.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0)),t}}h1.empty=new h1(u=>{});function io(u){return typeof u=="string"}function eo(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}function FGe(u){const e=Object.getPrototypeOf(Uint8Array);return typeof u=="object"&&u instanceof e}function zm(u){return typeof u=="number"&&!isNaN(u)}function Gre(u){return!!u&&typeof u[Symbol.iterator]=="function"}function ive(u){return u===!0||u===!1}function rs(u){return typeof u>"u"}function tk(u){return!Ms(u)}function Ms(u){return rs(u)||u===null}function Ru(u,e){if(!u)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Nf(u){if(Ms(u))throw new Error("Assertion Failed: argument is undefined or null");return u}function uk(u){return typeof u=="function"}function yGe(u,e){const t=Math.min(u.length,e.length);for(let n=0;n{e[t]=n&&typeof n=="object"?xh(n):n}),e}function _Ge(u){if(!u||typeof u!="object")return u;const e=[u];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const n in t)if(rve.call(t,n)){const i=t[n];typeof i=="object"&&!Object.isFrozen(i)&&!FGe(i)&&e.push(i)}}return u}const rve=Object.prototype.hasOwnProperty;function ave(u,e){return lK(u,e,new Set)}function lK(u,e,t){if(Ms(u))return u;const n=e(u);if(typeof n<"u")return n;if(Array.isArray(u)){const i=[];for(const r of u)i.push(lK(r,e,t));return i}if(eo(u)){if(t.has(u))throw new Error("Cannot clone recursive data-structure");t.add(u);const i={};for(const r in u)rve.call(u,r)&&(i[r]=lK(u[r],e,t));return t.delete(u),i}return u}function NN(u,e,t=!0){return eo(u)?(eo(e)&&Object.keys(e).forEach(n=>{n in u?t&&(eo(u[n])&&eo(e[n])?NN(u[n],e[n],t):u[n]=e[n]):u[n]=e[n]}),u):e}function Ks(u,e){if(u===e)return!0;if(u==null||e===null||e===void 0||typeof u!=typeof e||typeof u!="object"||Array.isArray(u)!==Array.isArray(e))return!1;let t,n;if(Array.isArray(u)){if(u.length!==e.length)return!1;for(t=0;tfunction(){const r=Array.prototype.slice.call(arguments,0);return e(i,r)},n={};for(const i of u)n[i]=t(i);return n}globalThis&&globalThis.__awaiter;let wGe=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function LGe(u,e){let t;return e.length===0?t=u:t=u.replace(/\{(\d+)\}/g,(n,i)=>{const r=i[0],a=e[r];let o=n;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),wGe&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function v(u,e,...t){return LGe(e,t)}var YO;const r5="en";let sB=!1,lB=!1,TS=!1,ove=!1,wQ=!1,LQ=!1,sve=!1,V7,NS=r5,Ure=r5,zGe,ic;const kl=typeof self=="object"?self:typeof global=="object"?global:{};let Ua;typeof kl.vscode<"u"&&typeof kl.vscode.process<"u"?Ua=kl.vscode.process:typeof process<"u"&&(Ua=process);const MGe=typeof((YO=Ua==null?void 0:Ua.versions)===null||YO===void 0?void 0:YO.electron)=="string",TGe=MGe&&(Ua==null?void 0:Ua.type)==="renderer";if(typeof navigator=="object"&&!TGe)ic=navigator.userAgent,sB=ic.indexOf("Windows")>=0,lB=ic.indexOf("Macintosh")>=0,LQ=(ic.indexOf("Macintosh")>=0||ic.indexOf("iPad")>=0||ic.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,TS=ic.indexOf("Linux")>=0,sve=(ic==null?void 0:ic.indexOf("Mobi"))>=0,wQ=!0,v({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),V7=r5,NS=V7,Ure=navigator.language;else if(typeof Ua=="object"){sB=Ua.platform==="win32",lB=Ua.platform==="darwin",TS=Ua.platform==="linux",TS&&Ua.env.SNAP&&Ua.env.SNAP_REVISION,Ua.env.CI||Ua.env.BUILD_ARTIFACTSTAGINGDIRECTORY,V7=r5,NS=r5;const u=Ua.env.VSCODE_NLS_CONFIG;if(u)try{const e=JSON.parse(u),t=e.availableLanguages["*"];V7=e.locale,Ure=e.osLocale,NS=t||r5,zGe=e._translationsConfigFile}catch{}ove=!0}else console.error("Unable to resolve platform.");const na=sB,iu=lB,Pa=TS,Oc=ove,dg=wQ,NGe=wQ&&typeof kl.importScripts=="function",Zc=LQ,PGe=sve,k1=ic,RGe=NS,IGe=typeof kl.postMessage=="function"&&!kl.importScripts,lve=(()=>{if(IGe){const u=[];kl.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=u.length;n{const n=++e;u.push({id:n,callback:t}),kl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return u=>setTimeout(u)})(),Os=lB||LQ?2:sB?1:3;let qre=!0,Jre=!1;function cve(){if(!Jre){Jre=!0;const u=new Uint8Array(2);u[0]=1,u[1]=2,qre=new Uint16Array(u.buffer)[0]===512+1}return qre}const dve=!!(k1&&k1.indexOf("Chrome")>=0),OGe=!!(k1&&k1.indexOf("Firefox")>=0),jGe=!!(!dve&&k1&&k1.indexOf("Safari")>=0),HGe=!!(k1&&k1.indexOf("Edg/")>=0);k1&&k1.indexOf("Android")>=0;const Ea={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var $t;(function(u){function e(D){return D&&typeof D=="object"&&typeof D[Symbol.iterator]=="function"}u.is=e;const t=Object.freeze([]);function n(){return t}u.empty=n;function*i(D){yield D}u.single=i;function r(D){return e(D)?D:i(D)}u.wrap=r;function a(D){return D||t}u.from=a;function*o(D){for(let x=D.length-1;x>=0;x--)yield D[x]}u.reverse=o;function s(D){return!D||D[Symbol.iterator]().next().done===!0}u.isEmpty=s;function l(D){return D[Symbol.iterator]().next().value}u.first=l;function c(D,x){for(const b of D)if(x(b))return!0;return!1}u.some=c;function d(D,x){for(const b of D)if(x(b))return b}u.find=d;function*h(D,x){for(const b of D)x(b)&&(yield b)}u.filter=h;function*E(D,x){let b=0;for(const k of D)yield x(k,b++)}u.map=E;function*m(...D){for(const x of D)for(const b of x)yield b}u.concat=m;function g(D,x,b){let k=b;for(const A of D)k=x(k,A);return k}u.reduce=g;function*f(D,x,b=D.length){for(x<0&&(x+=D.length),b<0?b+=D.length:b>D.length&&(b=D.length);x{i||(i=!0,this._remove(n))}}shift(){if(this._first!==Ri.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ri.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ri.Undefined&&e.next!==Ri.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ri.Undefined&&e.next===Ri.Undefined?(this._first=Ri.Undefined,this._last=Ri.Undefined):e.next===Ri.Undefined?(this._last=this._last.prev,this._last.next=Ri.Undefined):e.prev===Ri.Undefined&&(this._first=this._first.next,this._first.prev=Ri.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ri.Undefined;)yield e.element,e=e.next}}const hve="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function VGe(u=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of hve)u.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const zQ=VGe();function Eve(u){let e=zQ;if(u&&u instanceof RegExp)if(u.global)e=u;else{let t="g";u.ignoreCase&&(t+="i"),u.multiline&&(t+="m"),u.unicode&&(t+="u"),e=new RegExp(u.source,t)}return e.lastIndex=0,e}const mve=new to;mve.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function nk(u,e,t,n,i){if(i||(i=$t.first(mve)),t.length>i.maxLen){let l=u-i.maxLen/2;return l<0?l=0:n+=l,t=t.substring(l,u+i.maxLen/2),nk(u,e,t,n,i)}const r=Date.now(),a=u-1-n;let o=-1,s=null;for(let l=1;!(Date.now()-r>=i.timeBudget);l++){const c=a-i.windowSize*l;e.lastIndex=Math.max(0,c);const d=$Ge(e,t,a,o);if(!d&&s||(s=d,c<=0))break;o=c}if(s){const l={word:s[0],startColumn:n+1+s.index,endColumn:n+1+s.index+s[0].length};return e.lastIndex=0,l}return null}function $Ge(u,e,t,n){let i;for(;i=u.exec(e);){const r=i.index||0;if(r<=t&&u.lastIndex>=t)return i;if(n>0&&r>n)return null}return null}const Y4=8;class gve{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class fve{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class On{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return PN(e,t)}compute(e,t,n){return n}}class qb{constructor(e,t){this.newValue=e,this.didChange=t}}function PN(u,e){if(typeof u!="object"||typeof e!="object"||!u||!e)return new qb(e,u!==e);if(Array.isArray(u)||Array.isArray(e)){const n=Array.isArray(u)&&Array.isArray(e)&&di(u,e);return new qb(e,!n)}let t=!1;for(const n in e)if(e.hasOwnProperty(n)){const i=PN(u[n],e[n]);i.didChange&&(u[n]=i.newValue,t=!0)}return new qb(u,t)}class Xy{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return PN(e,t)}validate(e){return this.defaultValue}}class o6{constructor(e,t,n,i){this.id=e,this.name=t,this.defaultValue=n,this.schema=i}applyUpdate(e,t){return PN(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,n){return n}}function ut(u,e){return typeof u>"u"?e:u==="false"?!1:!!u}class lu extends o6{constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="boolean",i.default=n),super(e,t,n,i)}validate(e){return ut(e,this.defaultValue)}}function rf(u,e,t,n){if(typeof u>"u")return e;let i=parseInt(u,10);return isNaN(i)?e:(i=Math.max(t,i),i=Math.min(n,i),i|0)}class Ku extends o6{static clampedInt(e,t,n,i){return rf(e,t,n,i)}constructor(e,t,n,i,r,a=void 0){typeof a<"u"&&(a.type="integer",a.default=n,a.minimum=i,a.maximum=r),super(e,t,n,a),this.minimum=i,this.maximum=r}validate(e){return Ku.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function KGe(u,e,t,n){if(typeof u>"u")return e;const i=El.float(u,e);return El.clamp(i,t,n)}class El extends o6{static clamp(e,t,n){return en?n:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const n=parseFloat(e);return isNaN(n)?t:n}constructor(e,t,n,i,r){typeof r<"u"&&(r.type="number",r.default=n),super(e,t,n,r),this.validationFn=i}validate(e){return this.validationFn(El.float(e,this.defaultValue))}}class Xo extends o6{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,n,i=void 0){typeof i<"u"&&(i.type="string",i.default=n),super(e,t,n,i)}validate(e){return Xo.string(e,this.defaultValue)}}function Di(u,e,t,n){return typeof u!="string"?e:n&&u in n?n[u]:t.indexOf(u)===-1?e:u}class Qn extends o6{constructor(e,t,n,i,r=void 0){typeof r<"u"&&(r.type="string",r.enum=i,r.default=n),super(e,t,n,r),this._allowedValues=i}validate(e){return Di(e,this.defaultValue,this._allowedValues)}}class $7 extends On{constructor(e,t,n,i,r,a,o=void 0){typeof o<"u"&&(o.type="string",o.enum=r,o.default=i),super(e,t,n,o),this._allowedValues=r,this._convert=a}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function WGe(u){switch(u){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class GGe extends On{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[v("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),v("accessibilitySupport.on","Optimize for usage with a Screen Reader"),v("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:v("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,n){return n===0?e.accessibilitySupport:n}}class UGe extends On{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:v("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:v("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ut(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ut(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function qGe(u){switch(u){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var Sr;(function(u){u[u.Line=1]="Line",u[u.Block=2]="Block",u[u.Underline=3]="Underline",u[u.LineThin=4]="LineThin",u[u.BlockOutline=5]="BlockOutline",u[u.UnderlineThin=6]="UnderlineThin"})(Sr||(Sr={}));function JGe(u){switch(u){case"line":return Sr.Line;case"block":return Sr.Block;case"underline":return Sr.Underline;case"line-thin":return Sr.LineThin;case"block-outline":return Sr.BlockOutline;case"underline-thin":return Sr.UnderlineThin}}class ZGe extends Xy{constructor(){super(140)}compute(e,t,n){const i=["monaco-editor"];return t.get(39)&&i.push(t.get(39)),e.extraEditorClassName&&i.push(e.extraEditorClassName),t.get(73)==="default"?i.push("mouse-default"):t.get(73)==="copy"&&i.push("mouse-copy"),t.get(110)&&i.push("showUnused"),t.get(138)&&i.push("showDeprecated"),i.join(" ")}}class YGe extends lu{constructor(){super(37,"emptySelectionClipboard",!0,{description:v("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,n){return n&&e.emptySelectionClipboard}}class QGe extends On{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:v("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[v("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),v("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),v("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:v("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[v("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),v("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),v("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:v("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:v("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:iu},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:v("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:v("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ut(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Di(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Di(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ut(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ut(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ut(t.loop,this.defaultValue.loop)}}}class Ts extends On{constructor(){super(51,"fontLigatures",Ts.OFF,{anyOf:[{type:"boolean",description:v("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:v("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:v("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Ts.OFF:e==="true"?Ts.ON:e:e?Ts.ON:Ts.OFF}}Ts.OFF='"liga" off, "calt" off';Ts.ON='"liga" on, "calt" on';class _c extends On{constructor(){super(54,"fontVariations",_c.OFF,{anyOf:[{type:"boolean",description:v("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:v("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:v("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?_c.OFF:e==="true"?_c.TRANSLATE:e:e?_c.TRANSLATE:_c.OFF}compute(e,t,n){return e.fontInfo.fontVariationSettings}}_c.OFF="normal";_c.TRANSLATE="translate";class XGe extends Xy{constructor(){super(50)}compute(e,t,n){return e.fontInfo}}class eUe extends o6{constructor(){super(52,"fontSize",ss.fontSize,{type:"number",minimum:6,maximum:100,default:ss.fontSize,description:v("fontSize","Controls the font size in pixels.")})}validate(e){const t=El.float(e,this.defaultValue);return t===0?ss.fontSize:El.clamp(t,6,100)}compute(e,t,n){return e.fontInfo.fontSize}}class Vd extends On{constructor(){super(53,"fontWeight",ss.fontWeight,{anyOf:[{type:"number",minimum:Vd.MINIMUM_VALUE,maximum:Vd.MAXIMUM_VALUE,errorMessage:v("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Vd.SUGGESTION_VALUES}],default:ss.fontWeight,description:v("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Ku.clampedInt(e,ss.fontWeight,Vd.MINIMUM_VALUE,Vd.MAXIMUM_VALUE))}}Vd.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Vd.MINIMUM_VALUE=1;Vd.MAXIMUM_VALUE=1e3;class tUe extends On{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[v("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),v("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),v("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},n=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:v("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:v("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:v("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:v("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:v("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:v("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:n,description:v("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:n,description:v("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:n,description:v("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:n,description:v("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:n,description:v("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,n,i,r,a;if(!e||typeof e!="object")return this.defaultValue;const o=e;return{multiple:Di(o.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=o.multipleDefinitions)!==null&&t!==void 0?t:Di(o.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(n=o.multipleTypeDefinitions)!==null&&n!==void 0?n:Di(o.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(i=o.multipleDeclarations)!==null&&i!==void 0?i:Di(o.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(r=o.multipleImplementations)!==null&&r!==void 0?r:Di(o.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(a=o.multipleReferences)!==null&&a!==void 0?a:Di(o.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Xo.string(o.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Xo.string(o.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Xo.string(o.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Xo.string(o.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Xo.string(o.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class uUe extends On{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:v("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:v("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:v("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:v("hover.hidingDelay","Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:v("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),delay:Ku.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ut(t.sticky,this.defaultValue.sticky),hidingDelay:Ku.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:ut(t.above,this.defaultValue.above)}}}class Q5 extends Xy{constructor(){super(143)}compute(e,t,n){return Q5.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,n=Math.floor(e.paddingTop/e.lineHeight);let i=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(i=Math.max(i,t-1));const r=(n+e.viewLineCount+i)/(e.pixelRatio*e.height),a=Math.floor(e.viewLineCount/r);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:n,extraLinesBeyondLastLine:i,desiredRatio:r,minimapLineCount:a}}static _computeMinimapLayout(e,t){const n=e.outerWidth,i=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};const a=t.stableMinimapLayoutInput,o=a&&e.outerHeight===a.outerHeight&&e.lineHeight===a.lineHeight&&e.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&e.pixelRatio===a.pixelRatio&&e.scrollBeyondLastLine===a.scrollBeyondLastLine&&e.paddingTop===a.paddingTop&&e.paddingBottom===a.paddingBottom&&e.minimap.enabled===a.minimap.enabled&&e.minimap.side===a.minimap.side&&e.minimap.size===a.minimap.size&&e.minimap.showSlider===a.minimap.showSlider&&e.minimap.renderCharacters===a.minimap.renderCharacters&&e.minimap.maxColumn===a.minimap.maxColumn&&e.minimap.scale===a.minimap.scale&&e.verticalScrollbarWidth===a.verticalScrollbarWidth&&e.isViewportWrapping===a.isViewportWrapping,s=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let h=r>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const E=e.minimap.maxColumn,m=e.minimap.size,g=e.minimap.side,f=e.verticalScrollbarWidth,p=e.viewLineCount,D=e.remainingWidth,x=e.isViewportWrapping,b=d?2:3;let k=Math.floor(r*i);const A=k/r;let F=!1,S=!1,w=b*h,z=h/r,N=1;if(m==="fill"||m==="fit"){const{typicalViewportLineCount:I,extraLinesBeforeFirstLine:H,extraLinesBeyondLastLine:V,desiredRatio:U,minimapLineCount:J}=Q5.computeContainedMinimapLineCount({viewLineCount:p,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:i,lineHeight:s,pixelRatio:r});if(p/J>1)F=!0,S=!0,h=1,w=1,z=h/r;else{let X=!1,re=h+1;if(m==="fit"){const ge=Math.ceil((H+p+V)*w);x&&o&&D<=t.stableFitRemainingWidth?(X=!0,re=t.stableFitMaxMinimapScale):X=ge>k}if(m==="fill"||X){F=!0;const ge=h;w=Math.min(s*r,Math.max(1,Math.floor(1/U))),x&&o&&D<=t.stableFitRemainingWidth&&(re=t.stableFitMaxMinimapScale),h=Math.min(re,Math.max(1,Math.floor(w/b))),h>ge&&(N=Math.min(2,h/ge)),z=h/r/N,k=Math.ceil(Math.max(I,H+p+V)*w),x?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=D,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const O=Math.floor(E*z),y=Math.min(O,Math.max(0,Math.floor((D-f-2)*z/(l+z)))+Y4);let _=Math.floor(r*y);const L=_/r;_=Math.floor(_*N);const T=d?1:2,R=g==="left"?0:n-y-f;return{renderMinimap:T,minimapLeft:R,minimapWidth:y,minimapHeightIsEditorHeight:F,minimapIsSampling:S,minimapScale:h,minimapLineHeight:w,minimapCanvasInnerWidth:_,minimapCanvasInnerHeight:k,minimapCanvasOuterWidth:L,minimapCanvasOuterHeight:A}}static computeLayout(e,t){const n=t.outerWidth|0,i=t.outerHeight|0,r=t.lineHeight|0,a=t.lineNumbersDigitCount|0,o=t.typicalHalfwidthCharacterWidth,s=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(135),h=d==="inherit"?e.get(134):d,E=h==="inherit"?e.get(130):h,m=e.get(133),g=t.isDominatedByLongLines,f=e.get(57),p=e.get(67).renderType!==0,D=e.get(68),x=e.get(104),b=e.get(83),k=e.get(72),A=e.get(102),F=A.verticalScrollbarSize,S=A.verticalHasArrows,w=A.arrowSize,z=A.horizontalScrollbarSize,N=e.get(43),O=e.get(109)!=="never";let y=e.get(65);N&&O&&(y+=16);let _=0;if(p){const Ve=Math.max(a,D);_=Math.round(Ve*s)}let L=0;f&&(L=r*t.glyphMarginDecorationLaneCount);let T=0,R=T+L,I=R+_,H=I+y;const V=n-L-_-y;let U=!1,J=!1,Y=-1;h==="inherit"&&g?(U=!0,J=!0):E==="on"||E==="bounded"?J=!0:E==="wordWrapColumn"&&(Y=m);const X=Q5._computeMinimapLayout({outerWidth:n,outerHeight:i,lineHeight:r,typicalHalfwidthCharacterWidth:o,pixelRatio:l,scrollBeyondLastLine:x,paddingTop:b.top,paddingBottom:b.bottom,minimap:k,verticalScrollbarWidth:F,viewLineCount:c,remainingWidth:V,isViewportWrapping:J},t.memory||new fve);X.renderMinimap!==0&&X.minimapLeft===0&&(T+=X.minimapWidth,R+=X.minimapWidth,I+=X.minimapWidth,H+=X.minimapWidth);const re=V-X.minimapWidth,ge=Math.max(1,Math.floor((re-F-2)/o)),_e=S?w:0;return J&&(Y=Math.max(1,ge),E==="bounded"&&(Y=Math.min(Y,m))),{width:n,height:i,glyphMarginLeft:T,glyphMarginWidth:L,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:R,lineNumbersWidth:_,decorationsLeft:I,decorationsWidth:y,contentLeft:H,contentWidth:re,minimap:X,viewportColumn:ge,isWordWrapMinified:U,isViewportWrapping:J,wrappingColumn:Y,verticalScrollbarWidth:F,horizontalScrollbarHeight:z,overviewRuler:{top:_e,width:F,height:i-2*_e,right:0}}}}class nUe extends On{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[v("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),v("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:v("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return Di(e,"simple",["simple","advanced"])}compute(e,t,n){return t.get(2)===2?"advanced":n}}class iUe extends On{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:v("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ut(e.enabled,this.defaultValue.enabled)}}}class rUe extends On{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:v("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:10,description:v("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:v("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:v("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),maxLineCount:Ku.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Di(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:ut(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class aUe extends On{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:v("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[v("editor.inlayHints.on","Inlay hints are enabled"),v("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",iu?"Ctrl+Option":"Ctrl+Alt"),v("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",iu?"Ctrl+Option":"Ctrl+Alt"),v("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:v("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:v("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:v("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Di(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Ku.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Xo.string(t.fontFamily,this.defaultValue.fontFamily),padding:ut(t.padding,this.defaultValue.padding)}}}class oUe extends On{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Ku.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,n){return n<0?Ku.clampedInt(-n*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):n}}class sUe extends El{constructor(){super(66,"lineHeight",ss.lineHeight,e=>El.clamp(e,0,150),{markdownDescription:v("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}}class lUe extends On{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:v("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:v("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[v("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),v("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),v("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:v("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:v("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:v("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:v("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:v("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:v("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),autohide:ut(t.autohide,this.defaultValue.autohide),size:Di(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Di(t.side,this.defaultValue.side,["right","left"]),showSlider:Di(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:ut(t.renderCharacters,this.defaultValue.renderCharacters),scale:Ku.clampedInt(t.scale,1,1,3),maxColumn:Ku.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function cUe(u){return u==="ctrlCmd"?iu?"metaKey":"ctrlKey":"altKey"}class dUe extends On{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:v("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:v("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Ku.clampedInt(t.top,0,0,1e3),bottom:Ku.clampedInt(t.bottom,0,0,1e3)}}}class hUe extends On{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:v("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:v("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),cycle:ut(t.cycle,this.defaultValue.cycle)}}}class EUe extends Xy{constructor(){super(141)}compute(e,t,n){return e.pixelRatio}}class mUe extends On{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[v("on","Quick suggestions show inside the suggest widget"),v("inline","Quick suggestions show as ghost text"),v("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:v("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:v("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:v("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:v("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const l=e?"on":"off";return{comments:l,strings:l,other:l}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:n,strings:i}=e,r=["on","inline","off"];let a,o,s;return typeof t=="boolean"?a=t?"on":"off":a=Di(t,this.defaultValue.other,r),typeof n=="boolean"?o=n?"on":"off":o=Di(n,this.defaultValue.comments,r),typeof i=="boolean"?s=i?"on":"off":s=Di(i,this.defaultValue.strings,r),{other:a,comments:o,strings:s}}}class gUe extends On{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[v("lineNumbers.off","Line numbers are not rendered."),v("lineNumbers.on","Line numbers are rendered as absolute number."),v("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),v("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:v("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}}function cB(u){const e=u.get(97);return e==="editable"?u.get(90):e!=="on"}class fUe extends On{constructor(){const e=[],t={type:"number",description:v("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:v("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:v("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="number")t.push({column:Ku.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const i=n;t.push({column:Ku.clampedInt(i.column,0,0,1e4),color:i.color})}return t.sort((n,i)=>n.column-i.column),t}return this.defaultValue}}class pUe extends On{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function Zre(u,e){if(typeof u!="string")return e;switch(u){case"hidden":return 2;case"visible":return 3;default:return 1}}let DUe=class extends On{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),v("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),v("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:v("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),v("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),v("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:v("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:v("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:v("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:v("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,n=Ku.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=Ku.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Ku.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Zre(t.vertical,this.defaultValue.vertical),horizontal:Zre(t.horizontal,this.defaultValue.horizontal),useShadows:ut(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:ut(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:ut(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:ut(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:ut(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Ku.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:Ku.clampedInt(t.verticalSliderSize,i,0,1e3),scrollByPage:ut(t.scrollByPage,this.defaultValue.scrollByPage)}}};const _s="inUntrustedWorkspace",yo={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class xUe extends On{constructor(){const e={nonBasicASCII:_s,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:_s,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[yo.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,_s],default:e.nonBasicASCII,description:v("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[yo.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:v("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[yo.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:v("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[yo.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,_s],default:e.includeComments,description:v("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[yo.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,_s],default:e.includeStrings,description:v("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[yo.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:v("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[yo.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:v("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&($s(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),n=!0)),t.allowedLocales&&e&&($s(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),n=!0));const i=super.applyUpdate(e,t);return n?new qb(i.newValue,!0):i}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:X5(t.nonBasicASCII,_s,[!0,!1,_s]),invisibleCharacters:ut(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:ut(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:X5(t.includeComments,_s,[!0,!1,_s]),includeStrings:X5(t.includeStrings,_s,[!0,!1,_s]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const n={};for(const[i,r]of Object.entries(e))r===!0&&(n[i]=!0);return n}}class vUe extends On{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:v("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[v("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),v("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:v("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:v("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),mode:Di(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Di(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:ut(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:ut(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class CUe extends On{constructor(){const e={enabled:Ea.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Ea.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:v("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:ut(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class bUe extends On{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v("editor.guides.bracketPairs.true","Enables bracket pair guides."),v("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),v("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:v("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),v("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),v("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:v("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:v("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:v("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[v("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),v("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),v("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:v("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:X5(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:X5(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:ut(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:ut(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:X5(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function X5(u,e,t){const n=t.indexOf(u);return n===-1?e:t[n]}class kUe extends On{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[v("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),v("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:v("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:v("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:v("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:v("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[v("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),v("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),v("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),v("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:v("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:v("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:v("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:v("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:v("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:v("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:v("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:v("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Di(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:ut(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:ut(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:ut(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:ut(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Di(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:ut(t.showIcons,this.defaultValue.showIcons),showStatusBar:ut(t.showStatusBar,this.defaultValue.showStatusBar),preview:ut(t.preview,this.defaultValue.preview),previewMode:Di(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:ut(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:ut(t.showMethods,this.defaultValue.showMethods),showFunctions:ut(t.showFunctions,this.defaultValue.showFunctions),showConstructors:ut(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:ut(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:ut(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:ut(t.showFields,this.defaultValue.showFields),showVariables:ut(t.showVariables,this.defaultValue.showVariables),showClasses:ut(t.showClasses,this.defaultValue.showClasses),showStructs:ut(t.showStructs,this.defaultValue.showStructs),showInterfaces:ut(t.showInterfaces,this.defaultValue.showInterfaces),showModules:ut(t.showModules,this.defaultValue.showModules),showProperties:ut(t.showProperties,this.defaultValue.showProperties),showEvents:ut(t.showEvents,this.defaultValue.showEvents),showOperators:ut(t.showOperators,this.defaultValue.showOperators),showUnits:ut(t.showUnits,this.defaultValue.showUnits),showValues:ut(t.showValues,this.defaultValue.showValues),showConstants:ut(t.showConstants,this.defaultValue.showConstants),showEnums:ut(t.showEnums,this.defaultValue.showEnums),showEnumMembers:ut(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:ut(t.showKeywords,this.defaultValue.showKeywords),showWords:ut(t.showWords,this.defaultValue.showWords),showColors:ut(t.showColors,this.defaultValue.showColors),showFiles:ut(t.showFiles,this.defaultValue.showFiles),showReferences:ut(t.showReferences,this.defaultValue.showReferences),showFolders:ut(t.showFolders,this.defaultValue.showFolders),showTypeParameters:ut(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:ut(t.showSnippets,this.defaultValue.showSnippets),showUsers:ut(t.showUsers,this.defaultValue.showUsers),showIssues:ut(t.showIssues,this.defaultValue.showIssues)}}}class FUe extends On{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:v("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:v("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:ut(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:ut(e.selectSubwords,this.defaultValue.selectSubwords)}}}class yUe extends On{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[v("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),v("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),v("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),v("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:v("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}}class AUe extends Xy{constructor(){super(144)}compute(e,t,n){const i=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}}class _Ue extends On{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:v("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[v("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),v("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),showDropSelector:Di(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class SUe extends On{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:v("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[v("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),v("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),showPasteSelector:Di(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const BUe="Consolas, 'Courier New', monospace",wUe="Menlo, Monaco, 'Courier New', monospace",LUe="'Droid Sans Mono', 'monospace', monospace",os={fontFamily:iu?wUe:Pa?LUe:BUe,fontWeight:"normal",fontSize:iu?12:14,lineHeight:0,letterSpacing:0},a5=[];function Ce(u){return a5[u.id]=u,u}const cd={acceptSuggestionOnCommitCharacter:Ce(new lu(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:v("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Ce(new Qn(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",v("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:v("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Ce(new GGe),accessibilityPageSize:Ce(new Ku(3,"accessibilityPageSize",10,1,1073741824,{description:v("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Ce(new Qo(4,"ariaLabel",v("editorViewAccessibleLabel","Editor content"))),ariaRequired:Ce(new lu(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Ce(new lu(8,"screenReaderAnnounceInlineSuggestion",!0,{description:v("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Ce(new Qn(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),v("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:v("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Ce(new Qn(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),v("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:v("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Ce(new Qn(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",v("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:v("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Ce(new Qn(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",v("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:v("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Ce(new Qn(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),v("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:v("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Ce(new $7(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],WGe,{enumDescriptions:[v("editor.autoIndent.none","The editor will not insert indentation automatically."),v("editor.autoIndent.keep","The editor will keep the current line's indentation."),v("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),v("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),v("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:v("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Ce(new lu(13,"automaticLayout",!1)),autoSurround:Ce(new Qn(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[v("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),v("editor.autoSurround.quotes","Surround with quotes but not brackets."),v("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:v("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Ce(new CUe),bracketPairGuides:Ce(new bUe),stickyTabStops:Ce(new lu(115,"stickyTabStops",!1,{description:v("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Ce(new lu(17,"codeLens",!0,{description:v("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Ce(new Qo(18,"codeLensFontFamily","",{description:v("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Ce(new Ku(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:v("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Ce(new lu(20,"colorDecorators",!0,{description:v("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Ce(new Qn(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[v("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),v("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),v("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:v("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Ce(new Ku(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:v("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Ce(new lu(22,"columnSelection",!1,{description:v("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Ce(new UGe),contextmenu:Ce(new lu(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Ce(new lu(25,"copyWithSyntaxHighlighting",!0,{description:v("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Ce(new $7(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],qGe,{description:v("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Ce(new Qn(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[v("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),v("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),v("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:v("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Ce(new $7(28,"cursorStyle",Sr.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],JGe,{description:v("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Ce(new Ku(29,"cursorSurroundingLines",0,0,1073741824,{description:v("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Ce(new Qn(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[v("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),v("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:v("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:Ce(new Ku(31,"cursorWidth",0,0,1073741824,{markdownDescription:v("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Ce(new lu(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Ce(new lu(33,"disableMonospaceOptimizations",!1)),domReadOnly:Ce(new lu(34,"domReadOnly",!1)),dragAndDrop:Ce(new lu(35,"dragAndDrop",!0,{description:v("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Ce(new YGe),dropIntoEditor:Ce(new _Ue),stickyScroll:Ce(new rUe),experimentalWhitespaceRendering:Ce(new Qn(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[v("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),v("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),v("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:v("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Ce(new Qo(39,"extraEditorClassName","")),fastScrollSensitivity:Ce(new El(40,"fastScrollSensitivity",5,u=>u<=0?5:u,{markdownDescription:v("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Ce(new QGe),fixedOverflowWidgets:Ce(new lu(42,"fixedOverflowWidgets",!1)),folding:Ce(new lu(43,"folding",!0,{description:v("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Ce(new Qn(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[v("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),v("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:v("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Ce(new lu(45,"foldingHighlight",!0,{description:v("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Ce(new lu(46,"foldingImportsByDefault",!1,{description:v("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Ce(new Ku(47,"foldingMaximumRegions",5e3,10,65e3,{description:v("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Ce(new lu(48,"unfoldOnClickAfterEndOfLine",!1,{description:v("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Ce(new Qo(49,"fontFamily",os.fontFamily,{description:v("fontFamily","Controls the font family.")})),fontInfo:Ce(new XGe),fontLigatures2:Ce(new Ms),fontSize:Ce(new eUe),fontWeight:Ce(new Vd),fontVariations:Ce(new _c),formatOnPaste:Ce(new lu(55,"formatOnPaste",!1,{description:v("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Ce(new lu(56,"formatOnType",!1,{description:v("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Ce(new lu(57,"glyphMargin",!0,{description:v("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Ce(new tUe),hideCursorInOverviewRuler:Ce(new lu(59,"hideCursorInOverviewRuler",!1,{description:v("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Ce(new uUe),inDiffEditor:Ce(new lu(61,"inDiffEditor",!1)),letterSpacing:Ce(new El(63,"letterSpacing",os.letterSpacing,u=>El.clamp(u,-5,20),{description:v("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Ce(new iUe),lineDecorationsWidth:Ce(new oUe),lineHeight:Ce(new sUe),lineNumbers:Ce(new gUe),lineNumbersMinChars:Ce(new Ku(68,"lineNumbersMinChars",5,1,300)),linkedEditing:Ce(new lu(69,"linkedEditing",!1,{description:v("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Ce(new lu(70,"links",!0,{description:v("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Ce(new Qn(71,"matchBrackets","always",["always","near","never"],{description:v("matchBrackets","Highlight matching brackets.")})),minimap:Ce(new lUe),mouseStyle:Ce(new Qn(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Ce(new El(74,"mouseWheelScrollSensitivity",1,u=>u===0?1:u,{markdownDescription:v("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Ce(new lu(75,"mouseWheelZoom",!1,{markdownDescription:v("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Ce(new lu(76,"multiCursorMergeOverlapping",!0,{description:v("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Ce(new $7(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],cUe,{markdownEnumDescriptions:[v("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),v("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:v({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Ce(new Qn(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[v("multiCursorPaste.spread","Each cursor pastes a single line of the text."),v("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:v("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Ce(new Ku(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:v("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Ce(new lu(80,"occurrencesHighlight",!0,{description:v("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Ce(new lu(81,"overviewRulerBorder",!0,{description:v("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Ce(new Ku(82,"overviewRulerLanes",3,0,3)),padding:Ce(new dUe),pasteAs:Ce(new SUe),parameterHints:Ce(new hUe),peekWidgetDefaultFocus:Ce(new Qn(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[v("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),v("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:v("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Ce(new lu(87,"definitionLinkOpensInPeek",!1,{description:v("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Ce(new mUe),quickSuggestionsDelay:Ce(new Ku(89,"quickSuggestionsDelay",10,0,1073741824,{description:v("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Ce(new lu(90,"readOnly",!1)),readOnlyMessage:Ce(new pUe),renameOnType:Ce(new lu(92,"renameOnType",!1,{description:v("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:v("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Ce(new lu(93,"renderControlCharacters",!0,{description:v("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Ce(new Qn(94,"renderFinalNewline",Pa?"dimmed":"on",["off","on","dimmed"],{description:v("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Ce(new Qn(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",v("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:v("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Ce(new lu(96,"renderLineHighlightOnlyWhenFocus",!1,{description:v("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Ce(new Qn(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Ce(new Qn(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",v("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),v("renderWhitespace.selection","Render whitespace characters only on selected text."),v("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:v("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Ce(new Ku(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Ce(new lu(100,"roundedSelection",!0,{description:v("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Ce(new fUe),scrollbar:Ce(new DUe),scrollBeyondLastColumn:Ce(new Ku(103,"scrollBeyondLastColumn",4,0,1073741824,{description:v("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Ce(new lu(104,"scrollBeyondLastLine",!0,{description:v("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Ce(new lu(105,"scrollPredominantAxis",!0,{description:v("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Ce(new lu(106,"selectionClipboard",!0,{description:v("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Pa})),selectionHighlight:Ce(new lu(107,"selectionHighlight",!0,{description:v("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Ce(new lu(108,"selectOnLineNumbers",!0)),showFoldingControls:Ce(new Qn(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[v("showFoldingControls.always","Always show the folding controls."),v("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),v("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:v("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Ce(new lu(110,"showUnused",!0,{description:v("showUnused","Controls fading out of unused code.")})),showDeprecated:Ce(new lu(138,"showDeprecated",!0,{description:v("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Ce(new aUe),snippetSuggestions:Ce(new Qn(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[v("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),v("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),v("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),v("snippetSuggestions.none","Do not show snippet suggestions.")],description:v("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Ce(new FUe),smoothScrolling:Ce(new lu(113,"smoothScrolling",!1,{description:v("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Ce(new Ku(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Ce(new kUe),inlineSuggest:Ce(new vUe),inlineCompletionsAccessibilityVerbose:Ce(new lu(147,"inlineCompletionsAccessibilityVerbose",!1,{description:v("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Ce(new Ku(118,"suggestFontSize",0,0,1e3,{markdownDescription:v("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Ce(new Ku(119,"suggestLineHeight",0,0,1e3,{markdownDescription:v("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Ce(new lu(120,"suggestOnTriggerCharacters",!0,{description:v("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Ce(new Qn(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[v("suggestSelection.first","Always select the first suggestion."),v("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),v("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:v("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Ce(new Qn(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[v("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),v("tabCompletion.off","Disable tab completions."),v("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:v("tabCompletion","Enables tab completions.")})),tabIndex:Ce(new Ku(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:Ce(new xUe),unusualLineTerminators:Ce(new Qn(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[v("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),v("unusualLineTerminators.off","Unusual line terminators are ignored."),v("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:v("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Ce(new lu(126,"useShadowDOM",!0)),useTabStops:Ce(new lu(127,"useTabStops",!0,{description:v("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:Ce(new Qn(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[v("wordBreak.normal","Use the default line break rule."),v("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:v("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:Ce(new Qo(129,"wordSeparators",hve,{description:v("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Ce(new Qn(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[v("wordWrap.off","Lines will never wrap."),v("wordWrap.on","Lines will wrap at the viewport width."),v({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),v({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:v({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Ce(new Qo(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Ce(new Qo(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Ce(new Ku(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:v({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Ce(new Qn(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Ce(new Qn(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Ce(new ZGe),defaultColorDecorators:Ce(new lu(145,"defaultColorDecorators",!1,{markdownDescription:v("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Ce(new EUe),tabFocusMode:Ce(new lu(142,"tabFocusMode",!1,{markdownDescription:v("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Ce(new Q5),wrappingInfo:Ce(new AUe),wrappingIndent:Ce(new yUe),wrappingStrategy:Ce(new nUe)};class zUe{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Kx.isErrorNoTelemetry(e)?new Kx(e.message+` + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,n){return e.fontInfo.lineHeight}}class lUe extends On{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:v("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:v("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[v("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),v("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),v("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:v("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:v("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:v("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:v("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:v("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:v("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),autohide:ut(t.autohide,this.defaultValue.autohide),size:Di(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Di(t.side,this.defaultValue.side,["right","left"]),showSlider:Di(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:ut(t.renderCharacters,this.defaultValue.renderCharacters),scale:Ku.clampedInt(t.scale,1,1,3),maxColumn:Ku.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function cUe(u){return u==="ctrlCmd"?iu?"metaKey":"ctrlKey":"altKey"}class dUe extends On{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:v("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:v("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Ku.clampedInt(t.top,0,0,1e3),bottom:Ku.clampedInt(t.bottom,0,0,1e3)}}}class hUe extends On{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:v("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:v("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),cycle:ut(t.cycle,this.defaultValue.cycle)}}}class EUe extends Xy{constructor(){super(141)}compute(e,t,n){return e.pixelRatio}}class mUe extends On{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[v("on","Quick suggestions show inside the suggest widget"),v("inline","Quick suggestions show as ghost text"),v("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:v("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:v("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:v("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:v("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const l=e?"on":"off";return{comments:l,strings:l,other:l}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:n,strings:i}=e,r=["on","inline","off"];let a,o,s;return typeof t=="boolean"?a=t?"on":"off":a=Di(t,this.defaultValue.other,r),typeof n=="boolean"?o=n?"on":"off":o=Di(n,this.defaultValue.comments,r),typeof i=="boolean"?s=i?"on":"off":s=Di(i,this.defaultValue.strings,r),{other:a,comments:o,strings:s}}}class gUe extends On{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[v("lineNumbers.off","Line numbers are not rendered."),v("lineNumbers.on","Line numbers are rendered as absolute number."),v("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),v("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:v("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,n=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:n}}}function cB(u){const e=u.get(97);return e==="editable"?u.get(90):e!=="on"}class fUe extends On{constructor(){const e=[],t={type:"number",description:v("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:v("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:v("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="number")t.push({column:Ku.clampedInt(n,0,0,1e4),color:null});else if(n&&typeof n=="object"){const i=n;t.push({column:Ku.clampedInt(i.column,0,0,1e4),color:i.color})}return t.sort((n,i)=>n.column-i.column),t}return this.defaultValue}}class pUe extends On{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function Zre(u,e){if(typeof u!="string")return e;switch(u){case"hidden":return 2;case"visible":return 3;default:return 1}}let DUe=class extends On{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),v("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),v("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:v("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),v("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),v("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:v("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:v("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:v("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:v("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,n=Ku.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),i=Ku.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Ku.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Zre(t.vertical,this.defaultValue.vertical),horizontal:Zre(t.horizontal,this.defaultValue.horizontal),useShadows:ut(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:ut(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:ut(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:ut(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:ut(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:Ku.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:i,verticalSliderSize:Ku.clampedInt(t.verticalSliderSize,i,0,1e3),scrollByPage:ut(t.scrollByPage,this.defaultValue.scrollByPage)}}};const Ss="inUntrustedWorkspace",yo={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class xUe extends On{constructor(){const e={nonBasicASCII:Ss,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Ss,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[yo.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ss],default:e.nonBasicASCII,description:v("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[yo.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:v("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[yo.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:v("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[yo.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ss],default:e.includeComments,description:v("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[yo.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ss],default:e.includeStrings,description:v("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[yo.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:v("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[yo.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:v("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let n=!1;t.allowedCharacters&&e&&(Ks(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),n=!0)),t.allowedLocales&&e&&(Ks(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),n=!0));const i=super.applyUpdate(e,t);return n?new qb(i.newValue,!0):i}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:X5(t.nonBasicASCII,Ss,[!0,!1,Ss]),invisibleCharacters:ut(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:ut(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:X5(t.includeComments,Ss,[!0,!1,Ss]),includeStrings:X5(t.includeStrings,Ss,[!0,!1,Ss]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const n={};for(const[i,r]of Object.entries(e))r===!0&&(n[i]=!0);return n}}class vUe extends On{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:v("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[v("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),v("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:v("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:v("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),mode:Di(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Di(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:ut(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:ut(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class CUe extends On{constructor(){const e={enabled:Ea.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Ea.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:v("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:ut(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class bUe extends On{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v("editor.guides.bracketPairs.true","Enables bracket pair guides."),v("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),v("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:v("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),v("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),v("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:v("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:v("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:v("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[v("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),v("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),v("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:v("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:X5(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:X5(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:ut(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:ut(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:X5(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function X5(u,e,t){const n=t.indexOf(u);return n===-1?e:t[n]}class kUe extends On{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[v("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),v("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:v("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:v("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:v("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:v("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[v("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),v("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),v("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),v("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:v("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:v("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:v("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:v("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:v("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:v("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:v("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:v("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:v("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Di(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:ut(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:ut(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:ut(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:ut(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Di(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:ut(t.showIcons,this.defaultValue.showIcons),showStatusBar:ut(t.showStatusBar,this.defaultValue.showStatusBar),preview:ut(t.preview,this.defaultValue.preview),previewMode:Di(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:ut(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:ut(t.showMethods,this.defaultValue.showMethods),showFunctions:ut(t.showFunctions,this.defaultValue.showFunctions),showConstructors:ut(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:ut(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:ut(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:ut(t.showFields,this.defaultValue.showFields),showVariables:ut(t.showVariables,this.defaultValue.showVariables),showClasses:ut(t.showClasses,this.defaultValue.showClasses),showStructs:ut(t.showStructs,this.defaultValue.showStructs),showInterfaces:ut(t.showInterfaces,this.defaultValue.showInterfaces),showModules:ut(t.showModules,this.defaultValue.showModules),showProperties:ut(t.showProperties,this.defaultValue.showProperties),showEvents:ut(t.showEvents,this.defaultValue.showEvents),showOperators:ut(t.showOperators,this.defaultValue.showOperators),showUnits:ut(t.showUnits,this.defaultValue.showUnits),showValues:ut(t.showValues,this.defaultValue.showValues),showConstants:ut(t.showConstants,this.defaultValue.showConstants),showEnums:ut(t.showEnums,this.defaultValue.showEnums),showEnumMembers:ut(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:ut(t.showKeywords,this.defaultValue.showKeywords),showWords:ut(t.showWords,this.defaultValue.showWords),showColors:ut(t.showColors,this.defaultValue.showColors),showFiles:ut(t.showFiles,this.defaultValue.showFiles),showReferences:ut(t.showReferences,this.defaultValue.showReferences),showFolders:ut(t.showFolders,this.defaultValue.showFolders),showTypeParameters:ut(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:ut(t.showSnippets,this.defaultValue.showSnippets),showUsers:ut(t.showUsers,this.defaultValue.showUsers),showIssues:ut(t.showIssues,this.defaultValue.showIssues)}}}class FUe extends On{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:v("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:v("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:ut(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:ut(e.selectSubwords,this.defaultValue.selectSubwords)}}}class yUe extends On{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[v("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),v("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),v("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),v("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:v("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,n){return t.get(2)===2?0:n}}class AUe extends Xy{constructor(){super(144)}compute(e,t,n){const i=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:i.isWordWrapMinified,isViewportWrapping:i.isViewportWrapping,wrappingColumn:i.wrappingColumn}}}class _Ue extends On{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:v("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[v("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),v("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),showDropSelector:Di(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class SUe extends On{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:v("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:v("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[v("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),v("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ut(t.enabled,this.defaultValue.enabled),showPasteSelector:Di(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const BUe="Consolas, 'Courier New', monospace",wUe="Menlo, Monaco, 'Courier New', monospace",LUe="'Droid Sans Mono', 'monospace', monospace",ss={fontFamily:iu?wUe:Pa?LUe:BUe,fontWeight:"normal",fontSize:iu?12:14,lineHeight:0,letterSpacing:0},a5=[];function Ce(u){return a5[u.id]=u,u}const cd={acceptSuggestionOnCommitCharacter:Ce(new lu(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:v("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Ce(new Qn(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",v("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:v("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Ce(new GGe),accessibilityPageSize:Ce(new Ku(3,"accessibilityPageSize",10,1,1073741824,{description:v("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:Ce(new Xo(4,"ariaLabel",v("editorViewAccessibleLabel","Editor content"))),ariaRequired:Ce(new lu(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Ce(new lu(8,"screenReaderAnnounceInlineSuggestion",!0,{description:v("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:Ce(new Qn(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),v("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:v("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:Ce(new Qn(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),v("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:v("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:Ce(new Qn(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",v("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:v("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Ce(new Qn(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",v("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:v("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Ce(new Qn(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),v("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:v("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Ce(new $7(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],WGe,{enumDescriptions:[v("editor.autoIndent.none","The editor will not insert indentation automatically."),v("editor.autoIndent.keep","The editor will keep the current line's indentation."),v("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),v("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),v("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:v("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Ce(new lu(13,"automaticLayout",!1)),autoSurround:Ce(new Qn(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[v("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),v("editor.autoSurround.quotes","Surround with quotes but not brackets."),v("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:v("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Ce(new CUe),bracketPairGuides:Ce(new bUe),stickyTabStops:Ce(new lu(115,"stickyTabStops",!1,{description:v("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Ce(new lu(17,"codeLens",!0,{description:v("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Ce(new Xo(18,"codeLensFontFamily","",{description:v("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Ce(new Ku(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:v("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:Ce(new lu(20,"colorDecorators",!0,{description:v("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:Ce(new Qn(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[v("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),v("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),v("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:v("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:Ce(new Ku(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:v("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:Ce(new lu(22,"columnSelection",!1,{description:v("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Ce(new UGe),contextmenu:Ce(new lu(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Ce(new lu(25,"copyWithSyntaxHighlighting",!0,{description:v("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Ce(new $7(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],qGe,{description:v("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Ce(new Qn(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[v("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),v("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),v("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:v("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Ce(new $7(28,"cursorStyle",Sr.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],JGe,{description:v("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Ce(new Ku(29,"cursorSurroundingLines",0,0,1073741824,{description:v("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Ce(new Qn(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[v("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),v("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:v("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:Ce(new Ku(31,"cursorWidth",0,0,1073741824,{markdownDescription:v("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Ce(new lu(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Ce(new lu(33,"disableMonospaceOptimizations",!1)),domReadOnly:Ce(new lu(34,"domReadOnly",!1)),dragAndDrop:Ce(new lu(35,"dragAndDrop",!0,{description:v("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Ce(new YGe),dropIntoEditor:Ce(new _Ue),stickyScroll:Ce(new rUe),experimentalWhitespaceRendering:Ce(new Qn(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[v("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),v("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),v("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:v("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:Ce(new Xo(39,"extraEditorClassName","")),fastScrollSensitivity:Ce(new El(40,"fastScrollSensitivity",5,u=>u<=0?5:u,{markdownDescription:v("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Ce(new QGe),fixedOverflowWidgets:Ce(new lu(42,"fixedOverflowWidgets",!1)),folding:Ce(new lu(43,"folding",!0,{description:v("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Ce(new Qn(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[v("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),v("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:v("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Ce(new lu(45,"foldingHighlight",!0,{description:v("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Ce(new lu(46,"foldingImportsByDefault",!1,{description:v("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:Ce(new Ku(47,"foldingMaximumRegions",5e3,10,65e3,{description:v("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:Ce(new lu(48,"unfoldOnClickAfterEndOfLine",!1,{description:v("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Ce(new Xo(49,"fontFamily",ss.fontFamily,{description:v("fontFamily","Controls the font family.")})),fontInfo:Ce(new XGe),fontLigatures2:Ce(new Ts),fontSize:Ce(new eUe),fontWeight:Ce(new Vd),fontVariations:Ce(new _c),formatOnPaste:Ce(new lu(55,"formatOnPaste",!1,{description:v("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Ce(new lu(56,"formatOnType",!1,{description:v("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Ce(new lu(57,"glyphMargin",!0,{description:v("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Ce(new tUe),hideCursorInOverviewRuler:Ce(new lu(59,"hideCursorInOverviewRuler",!1,{description:v("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Ce(new uUe),inDiffEditor:Ce(new lu(61,"inDiffEditor",!1)),letterSpacing:Ce(new El(63,"letterSpacing",ss.letterSpacing,u=>El.clamp(u,-5,20),{description:v("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Ce(new iUe),lineDecorationsWidth:Ce(new oUe),lineHeight:Ce(new sUe),lineNumbers:Ce(new gUe),lineNumbersMinChars:Ce(new Ku(68,"lineNumbersMinChars",5,1,300)),linkedEditing:Ce(new lu(69,"linkedEditing",!1,{description:v("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:Ce(new lu(70,"links",!0,{description:v("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Ce(new Qn(71,"matchBrackets","always",["always","near","never"],{description:v("matchBrackets","Highlight matching brackets.")})),minimap:Ce(new lUe),mouseStyle:Ce(new Qn(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Ce(new El(74,"mouseWheelScrollSensitivity",1,u=>u===0?1:u,{markdownDescription:v("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Ce(new lu(75,"mouseWheelZoom",!1,{markdownDescription:v("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Ce(new lu(76,"multiCursorMergeOverlapping",!0,{description:v("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Ce(new $7(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],cUe,{markdownEnumDescriptions:[v("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),v("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:v({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Ce(new Qn(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[v("multiCursorPaste.spread","Each cursor pastes a single line of the text."),v("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:v("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:Ce(new Ku(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:v("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:Ce(new lu(80,"occurrencesHighlight",!0,{description:v("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Ce(new lu(81,"overviewRulerBorder",!0,{description:v("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Ce(new Ku(82,"overviewRulerLanes",3,0,3)),padding:Ce(new dUe),pasteAs:Ce(new SUe),parameterHints:Ce(new hUe),peekWidgetDefaultFocus:Ce(new Qn(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[v("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),v("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:v("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Ce(new lu(87,"definitionLinkOpensInPeek",!1,{description:v("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Ce(new mUe),quickSuggestionsDelay:Ce(new Ku(89,"quickSuggestionsDelay",10,0,1073741824,{description:v("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Ce(new lu(90,"readOnly",!1)),readOnlyMessage:Ce(new pUe),renameOnType:Ce(new lu(92,"renameOnType",!1,{description:v("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:v("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Ce(new lu(93,"renderControlCharacters",!0,{description:v("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Ce(new Qn(94,"renderFinalNewline",Pa?"dimmed":"on",["off","on","dimmed"],{description:v("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Ce(new Qn(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",v("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:v("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Ce(new lu(96,"renderLineHighlightOnlyWhenFocus",!1,{description:v("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Ce(new Qn(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Ce(new Qn(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",v("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),v("renderWhitespace.selection","Render whitespace characters only on selected text."),v("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:v("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Ce(new Ku(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Ce(new lu(100,"roundedSelection",!0,{description:v("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Ce(new fUe),scrollbar:Ce(new DUe),scrollBeyondLastColumn:Ce(new Ku(103,"scrollBeyondLastColumn",4,0,1073741824,{description:v("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Ce(new lu(104,"scrollBeyondLastLine",!0,{description:v("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Ce(new lu(105,"scrollPredominantAxis",!0,{description:v("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Ce(new lu(106,"selectionClipboard",!0,{description:v("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Pa})),selectionHighlight:Ce(new lu(107,"selectionHighlight",!0,{description:v("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Ce(new lu(108,"selectOnLineNumbers",!0)),showFoldingControls:Ce(new Qn(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[v("showFoldingControls.always","Always show the folding controls."),v("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),v("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:v("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Ce(new lu(110,"showUnused",!0,{description:v("showUnused","Controls fading out of unused code.")})),showDeprecated:Ce(new lu(138,"showDeprecated",!0,{description:v("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Ce(new aUe),snippetSuggestions:Ce(new Qn(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[v("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),v("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),v("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),v("snippetSuggestions.none","Do not show snippet suggestions.")],description:v("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Ce(new FUe),smoothScrolling:Ce(new lu(113,"smoothScrolling",!1,{description:v("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Ce(new Ku(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Ce(new kUe),inlineSuggest:Ce(new vUe),inlineCompletionsAccessibilityVerbose:Ce(new lu(147,"inlineCompletionsAccessibilityVerbose",!1,{description:v("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:Ce(new Ku(118,"suggestFontSize",0,0,1e3,{markdownDescription:v("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:Ce(new Ku(119,"suggestLineHeight",0,0,1e3,{markdownDescription:v("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Ce(new lu(120,"suggestOnTriggerCharacters",!0,{description:v("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Ce(new Qn(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[v("suggestSelection.first","Always select the first suggestion."),v("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),v("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:v("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Ce(new Qn(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[v("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),v("tabCompletion.off","Disable tab completions."),v("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:v("tabCompletion","Enables tab completions.")})),tabIndex:Ce(new Ku(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:Ce(new xUe),unusualLineTerminators:Ce(new Qn(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[v("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),v("unusualLineTerminators.off","Unusual line terminators are ignored."),v("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:v("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Ce(new lu(126,"useShadowDOM",!0)),useTabStops:Ce(new lu(127,"useTabStops",!0,{description:v("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:Ce(new Qn(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[v("wordBreak.normal","Use the default line break rule."),v("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:v("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:Ce(new Xo(129,"wordSeparators",hve,{description:v("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Ce(new Qn(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[v("wordWrap.off","Lines will never wrap."),v("wordWrap.on","Lines will wrap at the viewport width."),v({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),v({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:v({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Ce(new Xo(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Ce(new Xo(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Ce(new Ku(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:v({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Ce(new Qn(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Ce(new Qn(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Ce(new ZGe),defaultColorDecorators:Ce(new lu(145,"defaultColorDecorators",!1,{markdownDescription:v("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:Ce(new EUe),tabFocusMode:Ce(new lu(142,"tabFocusMode",!1,{markdownDescription:v("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:Ce(new Q5),wrappingInfo:Ce(new AUe),wrappingIndent:Ce(new yUe),wrappingStrategy:Ce(new nUe)};class zUe{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Kx.isErrorNoTelemetry(e)?new Kx(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const pve=new zUe;function zt(u){dd(u)||pve.onUnexpectedError(u)}function Mi(u){dd(u)||pve.onUnexpectedExternalError(u)}function Yre(u){if(u instanceof Error){const{name:e,message:t}=u,n=u.stacktrace||u.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:Kx.isErrorNoTelemetry(u)}}return u}const dB="Canceled";function dd(u){return u instanceof hg?!0:u instanceof Error&&u.name===dB&&u.message===dB}class hg extends Error{constructor(){super(dB),this.name=this.message}}function MUe(){const u=new Error(dB);return u.name=u.message,u}function A0(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}function MQ(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}class TUe extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Kx extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Kx)return e;const t=new Kx;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Si extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Si.prototype)}}function Mm(u){const e=this;let t=!1,n;return function(){return t||(t=!0,n=u.apply(e,arguments)),n}}function TQ(u){return typeof u.dispose=="function"&&u.dispose.length===0}function Su(u){if($t.is(u)){const e=[];for(const t of u)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(u)?[]:u}else if(u)return u.dispose(),u}function Fl(...u){return ft(()=>Su(u))}function ft(u){return{dispose:Mm(()=>{u()})}}class pe{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{Su(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?pe.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}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}}pe.DISABLE_DISPOSED_WARNING=!1;class ne{constructor(){this._store=new pe,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)}}ne.None=Object.freeze({dispose(){}});class Ir{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}}class NUe{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class PUe{constructor(e){this.object=e}dispose(){}}class NQ{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Su(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){var i;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(i=this._store.get(e))===null||i===void 0||i.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const RUe=globalThis.performance&&typeof globalThis.performance.now=="function";class va{static create(e){return new va(e)}constructor(e){this._now=RUe&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Ne;(function(u){u.None=()=>ne.None;function e(O,y){return d(O,()=>{},0,void 0,!0,void 0,y)}u.defer=e;function t(O){return(y,_=null,L)=>{let T=!1,R;return R=O(I=>{if(!T)return R?R.dispose():T=!0,y.call(_,I)},null,L),T&&R.dispose(),R}}u.once=t;function n(O,y,_){return l((L,T=null,R)=>O(I=>L.call(T,y(I)),null,R),_)}u.map=n;function i(O,y,_){return l((L,T=null,R)=>O(I=>{y(I),L.call(T,I)},null,R),_)}u.forEach=i;function r(O,y,_){return l((L,T=null,R)=>O(I=>y(I)&&L.call(T,I),null,R),_)}u.filter=r;function a(O){return O}u.signal=a;function o(...O){return(y,_=null,L)=>{const T=Fl(...O.map(R=>R(I=>y.call(_,I))));return c(T,L)}}u.any=o;function s(O,y,_,L){let T=_;return n(O,R=>(T=y(T,R),T),L)}u.reduce=s;function l(O,y){let _;const L={onWillAddFirstListener(){_=O(T.fire,T)},onDidRemoveLastListener(){_==null||_.dispose()}},T=new Q(L);return y==null||y.add(T),T.event}function c(O,y){return y instanceof Array?y.push(O):y&&y.add(O),O}function d(O,y,_=100,L=!1,T=!1,R,I){let H,V,U,J=0,Y;const X={leakWarningThreshold:R,onWillAddFirstListener(){H=O(ge=>{J++,V=y(V,ge),L&&!U&&(re.fire(V),V=void 0),Y=()=>{const _e=V;V=void 0,U=void 0,(!L||J>1)&&re.fire(_e),J=0},typeof _=="number"?(clearTimeout(U),U=setTimeout(Y,_)):U===void 0&&(U=0,queueMicrotask(Y))})},onWillRemoveListener(){T&&J>0&&(Y==null||Y())},onDidRemoveLastListener(){Y=void 0,H.dispose()}},re=new Q(X);return I==null||I.add(re),re.event}u.debounce=d;function h(O,y=0,_){return u.debounce(O,(L,T)=>L?(L.push(T),L):[T],y,void 0,!0,void 0,_)}u.accumulate=h;function E(O,y=(L,T)=>L===T,_){let L=!0,T;return r(O,R=>{const I=L||!y(R,T);return L=!1,T=R,I},_)}u.latch=E;function m(O,y,_){return[u.filter(O,y,_),u.filter(O,L=>!y(L),_)]}u.split=m;function g(O,y=!1,_=[],L){let T=_.slice(),R=O(V=>{T?T.push(V):H.fire(V)});L&&L.add(R);const I=()=>{T==null||T.forEach(V=>H.fire(V)),T=null},H=new Q({onWillAddFirstListener(){R||(R=O(V=>H.fire(V)),L&&L.add(R))},onDidAddFirstListener(){T&&(y?setTimeout(I):I())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return L&&L.add(H),H.event}u.buffer=g;function f(O,y){return(L,T,R)=>{const I=y(new D);return O(function(H){const V=I.evaluate(H);V!==p&&L.call(T,V)},void 0,R)}}u.chain=f;const p=Symbol("HaltChainable");class D{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(_=>(y(_),_)),this}filter(y){return this.steps.push(_=>y(_)?_:p),this}reduce(y,_){let L=_;return this.steps.push(T=>(L=y(L,T),L)),this}latch(y=(_,L)=>_===L){let _=!0,L;return this.steps.push(T=>{const R=_||!y(T,L);return _=!1,L=T,R?T:p}),this}evaluate(y){for(const _ of this.steps)if(y=_(y),y===p)break;return y}}function x(O,y,_=L=>L){const L=(...H)=>I.fire(_(...H)),T=()=>O.on(y,L),R=()=>O.removeListener(y,L),I=new Q({onWillAddFirstListener:T,onDidRemoveLastListener:R});return I.event}u.fromNodeEventEmitter=x;function b(O,y,_=L=>L){const L=(...H)=>I.fire(_(...H)),T=()=>O.addEventListener(y,L),R=()=>O.removeEventListener(y,L),I=new Q({onWillAddFirstListener:T,onDidRemoveLastListener:R});return I.event}u.fromDOMEventEmitter=b;function k(O){return new Promise(y=>t(O)(y))}u.toPromise=k;function A(O){const y=new Q;return O.then(_=>{y.fire(_)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}u.fromPromise=A;function F(O,y){return y(void 0),O(_=>y(_))}u.runAndSubscribe=F;function S(O,y){let _=null;function L(R){_==null||_.dispose(),_=new pe,y(R,_)}L(void 0);const T=O(R=>L(R));return ft(()=>{T.dispose(),_==null||_.dispose()})}u.runAndSubscribeWithStore=S;class w{constructor(y,_){this._observable=y,this._counter=0,this._hasChanged=!1;const L={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};this.emitter=new Q(L),_&&_.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,_){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(O,y){return new w(O,y).emitter.event}u.fromObservable=z;function N(O){return y=>{let _=0,L=!1;const T={beginUpdate(){_++},endUpdate(){_--,_===0&&(O.reportChanges(),L&&(L=!1,y()))},handlePossibleChange(){},handleChange(){L=!0}};return O.addObserver(T),O.reportChanges(),{dispose(){O.removeObserver(T)}}}}u.fromObservableLight=N})(Ne||(Ne={}));class Wx{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Wx._idPool++}`,Wx.all.add(this)}start(e){this._stopWatch=new va,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}Wx.all=new Set;Wx._idPool=0;let IUe=-1;class OUe{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}}class PQ{static create(){var e;return new PQ((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` +`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const pve=new zUe;function zt(u){dd(u)||pve.onUnexpectedError(u)}function Mi(u){dd(u)||pve.onUnexpectedExternalError(u)}function Yre(u){if(u instanceof Error){const{name:e,message:t}=u,n=u.stacktrace||u.stack;return{$isError:!0,name:e,message:t,stack:n,noTelemetry:Kx.isErrorNoTelemetry(u)}}return u}const dB="Canceled";function dd(u){return u instanceof hg?!0:u instanceof Error&&u.name===dB&&u.message===dB}class hg extends Error{constructor(){super(dB),this.name=this.message}}function MUe(){const u=new Error(dB);return u.name=u.message,u}function _0(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}function MQ(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}class TUe extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Kx extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Kx)return e;const t=new Kx;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Si extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Si.prototype)}}function Mm(u){const e=this;let t=!1,n;return function(){return t||(t=!0,n=u.apply(e,arguments)),n}}function TQ(u){return typeof u.dispose=="function"&&u.dispose.length===0}function Su(u){if($t.is(u)){const e=[];for(const t of u)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(u)?[]:u}else if(u)return u.dispose(),u}function Fl(...u){return ft(()=>Su(u))}function ft(u){return{dispose:Mm(()=>{u()})}}class pe{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{Su(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?pe.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}deleteAndLeak(e){e&&this._toDispose.has(e)&&this._toDispose.delete(e)}}pe.DISABLE_DISPOSED_WARNING=!1;class ne{constructor(){this._store=new pe,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)}}ne.None=Object.freeze({dispose(){}});class Ir{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}}class NUe{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class PUe{constructor(e){this.object=e}dispose(){}}class NQ{constructor(){this._store=new Map,this._isDisposed=!1}dispose(){this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Su(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,n=!1){var i;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),n||(i=this._store.get(e))===null||i===void 0||i.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;(t=this._store.get(e))===null||t===void 0||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}const RUe=globalThis.performance&&typeof globalThis.performance.now=="function";class va{static create(e){return new va(e)}constructor(e){this._now=RUe&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Ne;(function(u){u.None=()=>ne.None;function e(O,y){return d(O,()=>{},0,void 0,!0,void 0,y)}u.defer=e;function t(O){return(y,_=null,L)=>{let T=!1,R;return R=O(I=>{if(!T)return R?R.dispose():T=!0,y.call(_,I)},null,L),T&&R.dispose(),R}}u.once=t;function n(O,y,_){return l((L,T=null,R)=>O(I=>L.call(T,y(I)),null,R),_)}u.map=n;function i(O,y,_){return l((L,T=null,R)=>O(I=>{y(I),L.call(T,I)},null,R),_)}u.forEach=i;function r(O,y,_){return l((L,T=null,R)=>O(I=>y(I)&&L.call(T,I),null,R),_)}u.filter=r;function a(O){return O}u.signal=a;function o(...O){return(y,_=null,L)=>{const T=Fl(...O.map(R=>R(I=>y.call(_,I))));return c(T,L)}}u.any=o;function s(O,y,_,L){let T=_;return n(O,R=>(T=y(T,R),T),L)}u.reduce=s;function l(O,y){let _;const L={onWillAddFirstListener(){_=O(T.fire,T)},onDidRemoveLastListener(){_==null||_.dispose()}},T=new Q(L);return y==null||y.add(T),T.event}function c(O,y){return y instanceof Array?y.push(O):y&&y.add(O),O}function d(O,y,_=100,L=!1,T=!1,R,I){let H,V,U,J=0,Y;const X={leakWarningThreshold:R,onWillAddFirstListener(){H=O(ge=>{J++,V=y(V,ge),L&&!U&&(re.fire(V),V=void 0),Y=()=>{const _e=V;V=void 0,U=void 0,(!L||J>1)&&re.fire(_e),J=0},typeof _=="number"?(clearTimeout(U),U=setTimeout(Y,_)):U===void 0&&(U=0,queueMicrotask(Y))})},onWillRemoveListener(){T&&J>0&&(Y==null||Y())},onDidRemoveLastListener(){Y=void 0,H.dispose()}},re=new Q(X);return I==null||I.add(re),re.event}u.debounce=d;function h(O,y=0,_){return u.debounce(O,(L,T)=>L?(L.push(T),L):[T],y,void 0,!0,void 0,_)}u.accumulate=h;function E(O,y=(L,T)=>L===T,_){let L=!0,T;return r(O,R=>{const I=L||!y(R,T);return L=!1,T=R,I},_)}u.latch=E;function m(O,y,_){return[u.filter(O,y,_),u.filter(O,L=>!y(L),_)]}u.split=m;function g(O,y=!1,_=[],L){let T=_.slice(),R=O(V=>{T?T.push(V):H.fire(V)});L&&L.add(R);const I=()=>{T==null||T.forEach(V=>H.fire(V)),T=null},H=new Q({onWillAddFirstListener(){R||(R=O(V=>H.fire(V)),L&&L.add(R))},onDidAddFirstListener(){T&&(y?setTimeout(I):I())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return L&&L.add(H),H.event}u.buffer=g;function f(O,y){return(L,T,R)=>{const I=y(new D);return O(function(H){const V=I.evaluate(H);V!==p&&L.call(T,V)},void 0,R)}}u.chain=f;const p=Symbol("HaltChainable");class D{constructor(){this.steps=[]}map(y){return this.steps.push(y),this}forEach(y){return this.steps.push(_=>(y(_),_)),this}filter(y){return this.steps.push(_=>y(_)?_:p),this}reduce(y,_){let L=_;return this.steps.push(T=>(L=y(L,T),L)),this}latch(y=(_,L)=>_===L){let _=!0,L;return this.steps.push(T=>{const R=_||!y(T,L);return _=!1,L=T,R?T:p}),this}evaluate(y){for(const _ of this.steps)if(y=_(y),y===p)break;return y}}function x(O,y,_=L=>L){const L=(...H)=>I.fire(_(...H)),T=()=>O.on(y,L),R=()=>O.removeListener(y,L),I=new Q({onWillAddFirstListener:T,onDidRemoveLastListener:R});return I.event}u.fromNodeEventEmitter=x;function b(O,y,_=L=>L){const L=(...H)=>I.fire(_(...H)),T=()=>O.addEventListener(y,L),R=()=>O.removeEventListener(y,L),I=new Q({onWillAddFirstListener:T,onDidRemoveLastListener:R});return I.event}u.fromDOMEventEmitter=b;function k(O){return new Promise(y=>t(O)(y))}u.toPromise=k;function A(O){const y=new Q;return O.then(_=>{y.fire(_)},()=>{y.fire(void 0)}).finally(()=>{y.dispose()}),y.event}u.fromPromise=A;function F(O,y){return y(void 0),O(_=>y(_))}u.runAndSubscribe=F;function S(O,y){let _=null;function L(R){_==null||_.dispose(),_=new pe,y(R,_)}L(void 0);const T=O(R=>L(R));return ft(()=>{T.dispose(),_==null||_.dispose()})}u.runAndSubscribeWithStore=S;class w{constructor(y,_){this._observable=y,this._counter=0,this._hasChanged=!1;const L={onWillAddFirstListener:()=>{y.addObserver(this)},onDidRemoveLastListener:()=>{y.removeObserver(this)}};this.emitter=new Q(L),_&&_.add(this.emitter)}beginUpdate(y){this._counter++}handlePossibleChange(y){}handleChange(y,_){this._hasChanged=!0}endUpdate(y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(O,y){return new w(O,y).emitter.event}u.fromObservable=z;function N(O){return y=>{let _=0,L=!1;const T={beginUpdate(){_++},endUpdate(){_--,_===0&&(O.reportChanges(),L&&(L=!1,y()))},handlePossibleChange(){},handleChange(){L=!0}};return O.addObserver(T),O.reportChanges(),{dispose(){O.removeObserver(T)}}}}u.fromObservableLight=N})(Ne||(Ne={}));class Wx{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Wx._idPool++}`,Wx.all.add(this)}start(e){this._stopWatch=new va,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}Wx.all=new Set;Wx._idPool=0;let IUe=-1;class OUe{constructor(e,t=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=t,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,t){const n=this.threshold;if(n<=0||t{const r=this._stacks.get(e.value)||0;this._stacks.set(e.value,r-1)}}}class PQ{static create(){var e;return new PQ((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` `).slice(2).join(` -`))}}class QO{constructor(e){this.value=e}}const jUe=2;let Q=class{constructor(e){var t,n,i,r,a;this._size=0,this._options=e,this._leakageMon=!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new OUe((i=(n=this._options)===null||n===void 0?void 0:n.leakWarningThreshold)!==null&&i!==void 0?i:IUe):void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Wx(this._options._profName):void 0,this._deliveryQueue=(a=this._options)===null||a===void 0?void 0:a.deliveryQueue}dispose(){var e,t,n,i;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||n===void 0||n.call(t),(i=this._leakageMon)===null||i===void 0||i.dispose())}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,n,i)=>{var r,a,o,s,l;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),ne.None;if(this._disposed)return ne.None;n&&(t=t.bind(n));const c=new QO(t);let d;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(c.stack=PQ.create(),d=this._leakageMon.check(c.stack,this._size+1)),this._listeners?this._listeners instanceof QO?((l=this._deliveryQueue)!==null&&l!==void 0||(this._deliveryQueue=new Dve),this._listeners=[this._listeners,c]):this._listeners.push(c):((a=(r=this._options)===null||r===void 0?void 0:r.onWillAddFirstListener)===null||a===void 0||a.call(r,this),this._listeners=c,(s=(o=this._options)===null||o===void 0?void 0:o.onDidAddFirstListener)===null||s===void 0||s.call(o,this)),this._size++;const h=ft(()=>{d==null||d(),this._removeListener(c)});return i instanceof pe?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}_removeListener(e){var t,n,i,r;if((n=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||n===void 0||n.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(r=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||r===void 0||r.call(i,this),this._size=0;return}const a=this._listeners,o=a.indexOf(e);if(o===-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--,a[o]=void 0;const s=this._deliveryQueue.current===this;if(this._size*jUe<=a.length){let l=0;for(let c=0;c0}};const HUe=()=>new Dve;class Dve{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class F3 extends Q{constructor(e){super(e),this._isPaused=0,this._eventQueue=new to,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class xve extends F3{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class VUe extends Q{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}}class $Ue{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new Q({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),ft(Mm(()=>{this.hasListeners&&this.unhook(t);const i=this.events.indexOf(t);this.events.splice(i,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class RQ{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(r=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>t.call(n,r)):t.call(n,r)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(i=>i()),n}}class Qre{constructor(){this.listening=!1,this.inputEvent=Ne.None,this.inputEventListener=ne.None,this.emitter=new Q({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const vve=Object.freeze(function(u,e){const t=setTimeout(u.bind(e),0);return{dispose(){clearTimeout(t)}}});var Kt;(function(u){function e(t){return t===u.None||t===u.Cancelled||t instanceof PS?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}u.isCancellationToken=e,u.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ne.None}),u.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:vve})})(Kt||(Kt={}));class PS{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?vve:(this._emitter||(this._emitter=new Q),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let vi=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new PS),this._token}cancel(){this._token?this._token instanceof PS&&this._token.cancel():this._token=Kt.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof PS&&this._token.dispose():this._token=Kt.None}};class IQ{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const RS=new IQ,dK=new IQ,hK=new IQ,Cve=new Array(230),KUe=Object.create(null),WUe=Object.create(null),OQ=[];for(let u=0;u<=193;u++)OQ[u]=-1;(function(){const u="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",u,u],[1,1,"Hyper",0,u,0,u,u,u],[1,2,"Super",0,u,0,u,u,u],[1,3,"Fn",0,u,0,u,u,u],[1,4,"FnLock",0,u,0,u,u,u],[1,5,"Suspend",0,u,0,u,u,u],[1,6,"Resume",0,u,0,u,u,u],[1,7,"Turbo",0,u,0,u,u,u],[1,8,"Sleep",0,u,0,"VK_SLEEP",u,u],[1,9,"WakeUp",0,u,0,u,u,u],[0,10,"KeyA",31,"A",65,"VK_A",u,u],[0,11,"KeyB",32,"B",66,"VK_B",u,u],[0,12,"KeyC",33,"C",67,"VK_C",u,u],[0,13,"KeyD",34,"D",68,"VK_D",u,u],[0,14,"KeyE",35,"E",69,"VK_E",u,u],[0,15,"KeyF",36,"F",70,"VK_F",u,u],[0,16,"KeyG",37,"G",71,"VK_G",u,u],[0,17,"KeyH",38,"H",72,"VK_H",u,u],[0,18,"KeyI",39,"I",73,"VK_I",u,u],[0,19,"KeyJ",40,"J",74,"VK_J",u,u],[0,20,"KeyK",41,"K",75,"VK_K",u,u],[0,21,"KeyL",42,"L",76,"VK_L",u,u],[0,22,"KeyM",43,"M",77,"VK_M",u,u],[0,23,"KeyN",44,"N",78,"VK_N",u,u],[0,24,"KeyO",45,"O",79,"VK_O",u,u],[0,25,"KeyP",46,"P",80,"VK_P",u,u],[0,26,"KeyQ",47,"Q",81,"VK_Q",u,u],[0,27,"KeyR",48,"R",82,"VK_R",u,u],[0,28,"KeyS",49,"S",83,"VK_S",u,u],[0,29,"KeyT",50,"T",84,"VK_T",u,u],[0,30,"KeyU",51,"U",85,"VK_U",u,u],[0,31,"KeyV",52,"V",86,"VK_V",u,u],[0,32,"KeyW",53,"W",87,"VK_W",u,u],[0,33,"KeyX",54,"X",88,"VK_X",u,u],[0,34,"KeyY",55,"Y",89,"VK_Y",u,u],[0,35,"KeyZ",56,"Z",90,"VK_Z",u,u],[0,36,"Digit1",22,"1",49,"VK_1",u,u],[0,37,"Digit2",23,"2",50,"VK_2",u,u],[0,38,"Digit3",24,"3",51,"VK_3",u,u],[0,39,"Digit4",25,"4",52,"VK_4",u,u],[0,40,"Digit5",26,"5",53,"VK_5",u,u],[0,41,"Digit6",27,"6",54,"VK_6",u,u],[0,42,"Digit7",28,"7",55,"VK_7",u,u],[0,43,"Digit8",29,"8",56,"VK_8",u,u],[0,44,"Digit9",30,"9",57,"VK_9",u,u],[0,45,"Digit0",21,"0",48,"VK_0",u,u],[1,46,"Enter",3,"Enter",13,"VK_RETURN",u,u],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",u,u],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",u,u],[1,49,"Tab",2,"Tab",9,"VK_TAB",u,u],[1,50,"Space",10,"Space",32,"VK_SPACE",u,u],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,u,0,u,u,u],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",u,u],[1,64,"F1",59,"F1",112,"VK_F1",u,u],[1,65,"F2",60,"F2",113,"VK_F2",u,u],[1,66,"F3",61,"F3",114,"VK_F3",u,u],[1,67,"F4",62,"F4",115,"VK_F4",u,u],[1,68,"F5",63,"F5",116,"VK_F5",u,u],[1,69,"F6",64,"F6",117,"VK_F6",u,u],[1,70,"F7",65,"F7",118,"VK_F7",u,u],[1,71,"F8",66,"F8",119,"VK_F8",u,u],[1,72,"F9",67,"F9",120,"VK_F9",u,u],[1,73,"F10",68,"F10",121,"VK_F10",u,u],[1,74,"F11",69,"F11",122,"VK_F11",u,u],[1,75,"F12",70,"F12",123,"VK_F12",u,u],[1,76,"PrintScreen",0,u,0,u,u,u],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",u,u],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",u,u],[1,79,"Insert",19,"Insert",45,"VK_INSERT",u,u],[1,80,"Home",14,"Home",36,"VK_HOME",u,u],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",u,u],[1,82,"Delete",20,"Delete",46,"VK_DELETE",u,u],[1,83,"End",13,"End",35,"VK_END",u,u],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",u,u],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",u],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",u],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",u],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",u],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",u,u],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",u,u],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",u,u],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",u,u],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",u,u],[1,94,"NumpadEnter",3,u,0,u,u,u],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",u,u],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",u,u],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",u,u],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",u,u],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",u,u],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",u,u],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",u,u],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",u,u],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",u,u],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",u,u],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",u,u],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",u,u],[1,107,"ContextMenu",58,"ContextMenu",93,u,u,u],[1,108,"Power",0,u,0,u,u,u],[1,109,"NumpadEqual",0,u,0,u,u,u],[1,110,"F13",71,"F13",124,"VK_F13",u,u],[1,111,"F14",72,"F14",125,"VK_F14",u,u],[1,112,"F15",73,"F15",126,"VK_F15",u,u],[1,113,"F16",74,"F16",127,"VK_F16",u,u],[1,114,"F17",75,"F17",128,"VK_F17",u,u],[1,115,"F18",76,"F18",129,"VK_F18",u,u],[1,116,"F19",77,"F19",130,"VK_F19",u,u],[1,117,"F20",78,"F20",131,"VK_F20",u,u],[1,118,"F21",79,"F21",132,"VK_F21",u,u],[1,119,"F22",80,"F22",133,"VK_F22",u,u],[1,120,"F23",81,"F23",134,"VK_F23",u,u],[1,121,"F24",82,"F24",135,"VK_F24",u,u],[1,122,"Open",0,u,0,u,u,u],[1,123,"Help",0,u,0,u,u,u],[1,124,"Select",0,u,0,u,u,u],[1,125,"Again",0,u,0,u,u,u],[1,126,"Undo",0,u,0,u,u,u],[1,127,"Cut",0,u,0,u,u,u],[1,128,"Copy",0,u,0,u,u,u],[1,129,"Paste",0,u,0,u,u,u],[1,130,"Find",0,u,0,u,u,u],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",u,u],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",u,u],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",u,u],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",u,u],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",u,u],[1,136,"KanaMode",0,u,0,u,u,u],[0,137,"IntlYen",0,u,0,u,u,u],[1,138,"Convert",0,u,0,u,u,u],[1,139,"NonConvert",0,u,0,u,u,u],[1,140,"Lang1",0,u,0,u,u,u],[1,141,"Lang2",0,u,0,u,u,u],[1,142,"Lang3",0,u,0,u,u,u],[1,143,"Lang4",0,u,0,u,u,u],[1,144,"Lang5",0,u,0,u,u,u],[1,145,"Abort",0,u,0,u,u,u],[1,146,"Props",0,u,0,u,u,u],[1,147,"NumpadParenLeft",0,u,0,u,u,u],[1,148,"NumpadParenRight",0,u,0,u,u,u],[1,149,"NumpadBackspace",0,u,0,u,u,u],[1,150,"NumpadMemoryStore",0,u,0,u,u,u],[1,151,"NumpadMemoryRecall",0,u,0,u,u,u],[1,152,"NumpadMemoryClear",0,u,0,u,u,u],[1,153,"NumpadMemoryAdd",0,u,0,u,u,u],[1,154,"NumpadMemorySubtract",0,u,0,u,u,u],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",u,u],[1,156,"NumpadClearEntry",0,u,0,u,u,u],[1,0,u,5,"Ctrl",17,"VK_CONTROL",u,u],[1,0,u,4,"Shift",16,"VK_SHIFT",u,u],[1,0,u,6,"Alt",18,"VK_MENU",u,u],[1,0,u,57,"Meta",91,"VK_COMMAND",u,u],[1,157,"ControlLeft",5,u,0,"VK_LCONTROL",u,u],[1,158,"ShiftLeft",4,u,0,"VK_LSHIFT",u,u],[1,159,"AltLeft",6,u,0,"VK_LMENU",u,u],[1,160,"MetaLeft",57,u,0,"VK_LWIN",u,u],[1,161,"ControlRight",5,u,0,"VK_RCONTROL",u,u],[1,162,"ShiftRight",4,u,0,"VK_RSHIFT",u,u],[1,163,"AltRight",6,u,0,"VK_RMENU",u,u],[1,164,"MetaRight",57,u,0,"VK_RWIN",u,u],[1,165,"BrightnessUp",0,u,0,u,u,u],[1,166,"BrightnessDown",0,u,0,u,u,u],[1,167,"MediaPlay",0,u,0,u,u,u],[1,168,"MediaRecord",0,u,0,u,u,u],[1,169,"MediaFastForward",0,u,0,u,u,u],[1,170,"MediaRewind",0,u,0,u,u,u],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",u,u],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",u,u],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",u,u],[1,174,"Eject",0,u,0,u,u,u],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",u,u],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",u,u],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",u,u],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",u,u],[1,179,"LaunchApp1",0,u,0,"VK_MEDIA_LAUNCH_APP1",u,u],[1,180,"SelectTask",0,u,0,u,u,u],[1,181,"LaunchScreenSaver",0,u,0,u,u,u],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",u,u],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",u,u],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",u,u],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",u,u],[1,186,"BrowserStop",0,u,0,"VK_BROWSER_STOP",u,u],[1,187,"BrowserRefresh",0,u,0,"VK_BROWSER_REFRESH",u,u],[1,188,"BrowserFavorites",0,u,0,"VK_BROWSER_FAVORITES",u,u],[1,189,"ZoomToggle",0,u,0,u,u,u],[1,190,"MailReply",0,u,0,u,u,u],[1,191,"MailForward",0,u,0,u,u,u],[1,192,"MailSend",0,u,0,u,u,u],[1,0,u,114,"KeyInComposition",229,u,u,u],[1,0,u,116,"ABNT_C2",194,"VK_ABNT_C2",u,u],[1,0,u,96,"OEM_8",223,"VK_OEM_8",u,u],[1,0,u,0,u,0,"VK_KANA",u,u],[1,0,u,0,u,0,"VK_HANGUL",u,u],[1,0,u,0,u,0,"VK_JUNJA",u,u],[1,0,u,0,u,0,"VK_FINAL",u,u],[1,0,u,0,u,0,"VK_HANJA",u,u],[1,0,u,0,u,0,"VK_KANJI",u,u],[1,0,u,0,u,0,"VK_CONVERT",u,u],[1,0,u,0,u,0,"VK_NONCONVERT",u,u],[1,0,u,0,u,0,"VK_ACCEPT",u,u],[1,0,u,0,u,0,"VK_MODECHANGE",u,u],[1,0,u,0,u,0,"VK_SELECT",u,u],[1,0,u,0,u,0,"VK_PRINT",u,u],[1,0,u,0,u,0,"VK_EXECUTE",u,u],[1,0,u,0,u,0,"VK_SNAPSHOT",u,u],[1,0,u,0,u,0,"VK_HELP",u,u],[1,0,u,0,u,0,"VK_APPS",u,u],[1,0,u,0,u,0,"VK_PROCESSKEY",u,u],[1,0,u,0,u,0,"VK_PACKET",u,u],[1,0,u,0,u,0,"VK_DBE_SBCSCHAR",u,u],[1,0,u,0,u,0,"VK_DBE_DBCSCHAR",u,u],[1,0,u,0,u,0,"VK_ATTN",u,u],[1,0,u,0,u,0,"VK_CRSEL",u,u],[1,0,u,0,u,0,"VK_EXSEL",u,u],[1,0,u,0,u,0,"VK_EREOF",u,u],[1,0,u,0,u,0,"VK_PLAY",u,u],[1,0,u,0,u,0,"VK_ZOOM",u,u],[1,0,u,0,u,0,"VK_NONAME",u,u],[1,0,u,0,u,0,"VK_PA1",u,u],[1,0,u,0,u,0,"VK_OEM_CLEAR",u,u]],t=[],n=[];for(const i of e){const[r,a,o,s,l,c,d,h,E]=i;if(n[a]||(n[a]=!0,KUe[o]=a,WUe[o.toLowerCase()]=a,r&&(OQ[a]=s)),!t[s]){if(t[s]=!0,!l)throw new Error(`String representation missing for key code ${s} around scan code ${o}`);RS.define(s,l),dK.define(s,h||l),hK.define(s,E||h||l)}c&&(Cve[c]=s)}})();var Sh;(function(u){function e(o){return RS.keyCodeToStr(o)}u.toString=e;function t(o){return RS.strToKeyCode(o)}u.fromString=t;function n(o){return dK.keyCodeToStr(o)}u.toUserSettingsUS=n;function i(o){return hK.keyCodeToStr(o)}u.toUserSettingsGeneral=i;function r(o){return dK.strToKeyCode(o)||hK.strToKeyCode(o)}u.fromUserSettings=r;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return RS.keyCodeToStr(o)}u.toElectronAccelerator=a})(Sh||(Sh={}));function Vi(u,e){const t=(e&65535)<<16>>>0;return(u|t)>>>0}let ex;if(typeof kl.vscode<"u"&&typeof kl.vscode.process<"u"){const u=kl.vscode.process;ex={get platform(){return u.platform},get arch(){return u.arch},get env(){return u.env},cwd(){return u.cwd()}}}else typeof process<"u"?ex={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:ex={get platform(){return na?"win32":iu?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const hB=ex.cwd,bve=ex.env,GUe=ex.platform,UUe=65,qUe=97,JUe=90,ZUe=122,YE=46,Aa=47,As=92,I4=58,YUe=63;class kve extends Error{constructor(e,t,n){let i;typeof t=="string"&&t.indexOf("not ")===0?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${r} ${i} of type ${t}`;a+=`. Received type ${typeof n}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function QUe(u,e){if(u===null||typeof u!="object")throw new kve(e,"Object",u)}function dr(u,e){if(typeof u!="string")throw new kve(e,"string",u)}const Eg=GUe==="win32";function Lu(u){return u===Aa||u===As}function EK(u){return u===Aa}function O4(u){return u>=UUe&&u<=JUe||u>=qUe&&u<=ZUe}function EB(u,e,t,n){let i="",r=0,a=-1,o=0,s=0;for(let l=0;l<=u.length;++l){if(l2){const c=i.lastIndexOf(t);c===-1?(i="",r=0):(i=i.slice(0,c),r=i.length-1-i.lastIndexOf(t)),a=l,o=0;continue}else if(i.length!==0){i="",r=0,a=l,o=0;continue}}e&&(i+=i.length>0?`${t}..`:"..",r=2)}else i.length>0?i+=`${t}${u.slice(a+1,l)}`:i=u.slice(a+1,l),r=l-a-1;a=l,o=0}else s===YE&&o!==-1?++o:o=-1}return i}function Fve(u,e){QUe(e,"pathObject");const t=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${n}`:`${t}${u}${n}`:n}const rs={resolve(...u){let e="",t="",n=!1;for(let i=u.length-1;i>=-1;i--){let r;if(i>=0){if(r=u[i],dr(r,"path"),r.length===0)continue}else e.length===0?r=hB():(r=bve[`=${e}`]||hB(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===As)&&(r=`${e}\\`));const a=r.length;let o=0,s="",l=!1;const c=r.charCodeAt(0);if(a===1)Lu(c)&&(o=1,l=!0);else if(Lu(c))if(l=!0,Lu(r.charCodeAt(1))){let d=2,h=d;for(;d2&&Lu(r.charCodeAt(2))&&(l=!0,o=3));if(s.length>0)if(e.length>0){if(s.toLowerCase()!==e.toLowerCase())continue}else e=s;if(n){if(e.length>0)break}else if(t=`${r.slice(o)}\\${t}`,n=l,l&&e.length>0)break}return t=EB(t,!n,"\\",Lu),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(u){dr(u,"path");const e=u.length;if(e===0)return".";let t=0,n,i=!1;const r=u.charCodeAt(0);if(e===1)return EK(r)?"\\":u;if(Lu(r))if(i=!0,Lu(u.charCodeAt(1))){let o=2,s=o;for(;o2&&Lu(u.charCodeAt(2))&&(i=!0,t=3));let a=t0&&Lu(u.charCodeAt(e-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(u){dr(u,"path");const e=u.length;if(e===0)return!1;const t=u.charCodeAt(0);return Lu(t)||e>2&&O4(t)&&u.charCodeAt(1)===I4&&Lu(u.charCodeAt(2))},join(...u){if(u.length===0)return".";let e,t;for(let r=0;r0&&(e===void 0?e=t=a:e+=`\\${a}`)}if(e===void 0)return".";let n=!0,i=0;if(typeof t=="string"&&Lu(t.charCodeAt(0))){++i;const r=t.length;r>1&&Lu(t.charCodeAt(1))&&(++i,r>2&&(Lu(t.charCodeAt(2))?++i:n=!1))}if(n){for(;i=2&&(e=`\\${e.slice(i)}`)}return rs.normalize(e)},relative(u,e){if(dr(u,"from"),dr(e,"to"),u===e)return"";const t=rs.resolve(u),n=rs.resolve(e);if(t===n||(u=t.toLowerCase(),e=n.toLowerCase(),u===e))return"";let i=0;for(;ii&&u.charCodeAt(r-1)===As;)r--;const a=r-i;let o=0;for(;oo&&e.charCodeAt(s-1)===As;)s--;const l=s-o,c=ac){if(e.charCodeAt(o+h)===As)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(u.charCodeAt(i+h)===As?d=h:h===2&&(d=3)),d===-1&&(d=0)}let E="";for(h=i+d+1;h<=r;++h)(h===r||u.charCodeAt(h)===As)&&(E+=E.length===0?"..":"\\..");return o+=d,E.length>0?`${E}${n.slice(o,s)}`:(n.charCodeAt(o)===As&&++o,n.slice(o,s))},toNamespacedPath(u){if(typeof u!="string"||u.length===0)return u;const e=rs.resolve(u);if(e.length<=2)return u;if(e.charCodeAt(0)===As){if(e.charCodeAt(1)===As){const t=e.charCodeAt(2);if(t!==YUe&&t!==YE)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(O4(e.charCodeAt(0))&&e.charCodeAt(1)===I4&&e.charCodeAt(2)===As)return`\\\\?\\${e}`;return u},dirname(u){dr(u,"path");const e=u.length;if(e===0)return".";let t=-1,n=0;const i=u.charCodeAt(0);if(e===1)return Lu(i)?u:".";if(Lu(i)){if(t=n=1,Lu(u.charCodeAt(1))){let o=2,s=o;for(;o2&&Lu(u.charCodeAt(2))?3:2,n=t);let r=-1,a=!0;for(let o=e-1;o>=n;--o)if(Lu(u.charCodeAt(o))){if(!a){r=o;break}}else a=!1;if(r===-1){if(t===-1)return".";r=t}return u.slice(0,r)},basename(u,e){e!==void 0&&dr(e,"ext"),dr(u,"path");let t=0,n=-1,i=!0,r;if(u.length>=2&&O4(u.charCodeAt(0))&&u.charCodeAt(1)===I4&&(t=2),e!==void 0&&e.length>0&&e.length<=u.length){if(e===u)return"";let a=e.length-1,o=-1;for(r=u.length-1;r>=t;--r){const s=u.charCodeAt(r);if(Lu(s)){if(!i){t=r+1;break}}else o===-1&&(i=!1,o=r+1),a>=0&&(s===e.charCodeAt(a)?--a===-1&&(n=r):(a=-1,n=o))}return t===n?n=o:n===-1&&(n=u.length),u.slice(t,n)}for(r=u.length-1;r>=t;--r)if(Lu(u.charCodeAt(r))){if(!i){t=r+1;break}}else n===-1&&(i=!1,n=r+1);return n===-1?"":u.slice(t,n)},extname(u){dr(u,"path");let e=0,t=-1,n=0,i=-1,r=!0,a=0;u.length>=2&&u.charCodeAt(1)===I4&&O4(u.charCodeAt(0))&&(e=n=2);for(let o=u.length-1;o>=e;--o){const s=u.charCodeAt(o);if(Lu(s)){if(!r){n=o+1;break}continue}i===-1&&(r=!1,i=o+1),s===YE?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||i===-1||a===0||a===1&&t===i-1&&t===n+1?"":u.slice(t,i)},format:Fve.bind(null,"\\"),parse(u){dr(u,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return e;const t=u.length;let n=0,i=u.charCodeAt(0);if(t===1)return Lu(i)?(e.root=e.dir=u,e):(e.base=e.name=u,e);if(Lu(i)){if(n=1,Lu(u.charCodeAt(1))){let d=2,h=d;for(;d0&&(e.root=u.slice(0,n));let r=-1,a=n,o=-1,s=!0,l=u.length-1,c=0;for(;l>=n;--l){if(i=u.charCodeAt(l),Lu(i)){if(!s){a=l+1;break}continue}o===-1&&(s=!1,o=l+1),i===YE?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return o!==-1&&(r===-1||c===0||c===1&&r===o-1&&r===a+1?e.base=e.name=u.slice(a,o):(e.name=u.slice(a,r),e.base=u.slice(a,o),e.ext=u.slice(r,o))),a>0&&a!==n?e.dir=u.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},XUe=(()=>{if(Eg){const u=/\\/g;return()=>{const e=hB().replace(u,"/");return e.slice(e.indexOf("/"))}}return()=>hB()})(),Oi={resolve(...u){let e="",t=!1;for(let n=u.length-1;n>=-1&&!t;n--){const i=n>=0?u[n]:XUe();dr(i,"path"),i.length!==0&&(e=`${i}/${e}`,t=i.charCodeAt(0)===Aa)}return e=EB(e,!t,"/",EK),t?`/${e}`:e.length>0?e:"."},normalize(u){if(dr(u,"path"),u.length===0)return".";const e=u.charCodeAt(0)===Aa,t=u.charCodeAt(u.length-1)===Aa;return u=EB(u,!e,"/",EK),u.length===0?e?"/":t?"./":".":(t&&(u+="/"),e?`/${u}`:u)},isAbsolute(u){return dr(u,"path"),u.length>0&&u.charCodeAt(0)===Aa},join(...u){if(u.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Oi.normalize(e)},relative(u,e){if(dr(u,"from"),dr(e,"to"),u===e||(u=Oi.resolve(u),e=Oi.resolve(e),u===e))return"";const t=1,n=u.length,i=n-t,r=1,a=e.length-r,o=io){if(e.charCodeAt(r+l)===Aa)return e.slice(r+l+1);if(l===0)return e.slice(r+l)}else i>o&&(u.charCodeAt(t+l)===Aa?s=l:l===0&&(s=0));let c="";for(l=t+s+1;l<=n;++l)(l===n||u.charCodeAt(l)===Aa)&&(c+=c.length===0?"..":"/..");return`${c}${e.slice(r+s)}`},toNamespacedPath(u){return u},dirname(u){if(dr(u,"path"),u.length===0)return".";const e=u.charCodeAt(0)===Aa;let t=-1,n=!0;for(let i=u.length-1;i>=1;--i)if(u.charCodeAt(i)===Aa){if(!n){t=i;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":u.slice(0,t)},basename(u,e){e!==void 0&&dr(e,"ext"),dr(u,"path");let t=0,n=-1,i=!0,r;if(e!==void 0&&e.length>0&&e.length<=u.length){if(e===u)return"";let a=e.length-1,o=-1;for(r=u.length-1;r>=0;--r){const s=u.charCodeAt(r);if(s===Aa){if(!i){t=r+1;break}}else o===-1&&(i=!1,o=r+1),a>=0&&(s===e.charCodeAt(a)?--a===-1&&(n=r):(a=-1,n=o))}return t===n?n=o:n===-1&&(n=u.length),u.slice(t,n)}for(r=u.length-1;r>=0;--r)if(u.charCodeAt(r)===Aa){if(!i){t=r+1;break}}else n===-1&&(i=!1,n=r+1);return n===-1?"":u.slice(t,n)},extname(u){dr(u,"path");let e=-1,t=0,n=-1,i=!0,r=0;for(let a=u.length-1;a>=0;--a){const o=u.charCodeAt(a);if(o===Aa){if(!i){t=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===YE?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":u.slice(e,n)},format:Fve.bind(null,"/"),parse(u){dr(u,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return e;const t=u.charCodeAt(0)===Aa;let n;t?(e.root="/",n=1):n=0;let i=-1,r=0,a=-1,o=!0,s=u.length-1,l=0;for(;s>=n;--s){const c=u.charCodeAt(s);if(c===Aa){if(!o){r=s+1;break}continue}a===-1&&(o=!1,a=s+1),c===YE?i===-1?i=s:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=r===0&&t?1:r;i===-1||l===0||l===1&&i===a-1&&i===r+1?e.base=e.name=u.slice(c,a):(e.name=u.slice(c,i),e.base=u.slice(c,a),e.ext=u.slice(i,a))}return r>0?e.dir=u.slice(0,r-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Oi.win32=rs.win32=rs;Oi.posix=rs.posix=Oi;const yve=Eg?rs.normalize:Oi.normalize,eqe=Eg?rs.resolve:Oi.resolve,tqe=Eg?rs.relative:Oi.relative,Ave=Eg?rs.dirname:Oi.dirname,QE=Eg?rs.basename:Oi.basename,uqe=Eg?rs.extname:Oi.extname,jc=Eg?rs.sep:Oi.sep,nqe=/^\w[\w\d+.-]*$/,iqe=/^\//,rqe=/^\/\//;function aqe(u,e){if(!u.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${u.authority}", path: "${u.path}", query: "${u.query}", fragment: "${u.fragment}"}`);if(u.scheme&&!nqe.test(u.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(u.path){if(u.authority){if(!iqe.test(u.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(rqe.test(u.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function oqe(u,e){return!u&&!e?"file":u}function sqe(u,e){switch(u){case"https":case"http":case"file":e?e[0]!==xc&&(e=xc+e):e=xc;break}return e}const mi="",xc="/",lqe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let dt=class IS{static isUri(e){return e instanceof IS?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,i,r,a=!1){typeof e=="object"?(this.scheme=e.scheme||mi,this.authority=e.authority||mi,this.path=e.path||mi,this.query=e.query||mi,this.fragment=e.fragment||mi):(this.scheme=oqe(e,a),this.authority=t||mi,this.path=sqe(this.scheme,n||mi),this.query=i||mi,this.fragment=r||mi,aqe(this,a))}get fsPath(){return mB(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=mi),n===void 0?n=this.authority:n===null&&(n=mi),i===void 0?i=this.path:i===null&&(i=mi),r===void 0?r=this.query:r===null&&(r=mi),a===void 0?a=this.fragment:a===null&&(a=mi),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&a===this.fragment?this:new oD(t,n,i,r,a)}static parse(e,t=!1){const n=lqe.exec(e);return n?new oD(n[2]||mi,K7(n[4]||mi),K7(n[5]||mi),K7(n[7]||mi),K7(n[9]||mi),t):new oD(mi,mi,mi,mi,mi)}static file(e){let t=mi;if(na&&(e=e.replace(/\\/g,xc)),e[0]===xc&&e[1]===xc){const n=e.indexOf(xc,2);n===-1?(t=e.substring(2),e=xc):(t=e.substring(2,n),e=e.substring(n)||xc)}return new oD("file",t,e,mi,mi)}static from(e,t){return new oD(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return na&&e.scheme==="file"?n=IS.file(rs.join(mB(e,!0),...t)).path:n=Oi.join(e.path,...t),e.with({path:n})}toString(e=!1){return mK(this,e)}toJSON(){return this}static revive(e){var t,n;if(e){if(e instanceof IS)return e;{const i=new oD(e);return i._formatted=(t=e.external)!==null&&t!==void 0?t:null,i._fsPath=e._sep===_ve&&(n=e.fsPath)!==null&&n!==void 0?n:null,i}}else return e}};const _ve=na?1:void 0;let oD=class extends dt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=mB(this,!1)),this._fsPath}toString(e=!1){return e?mK(this,!0):(this._formatted||(this._formatted=mK(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_ve),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const Sve={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Xre(u,e,t){let n,i=-1;for(let r=0;r=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||t&&a===91||t&&a===93||t&&a===58)i!==-1&&(n+=encodeURIComponent(u.substring(i,r)),i=-1),n!==void 0&&(n+=u.charAt(r));else{n===void 0&&(n=u.substr(0,r));const o=Sve[a];o!==void 0?(i!==-1&&(n+=encodeURIComponent(u.substring(i,r)),i=-1),n+=o):i===-1&&(i=r)}}return i!==-1&&(n+=encodeURIComponent(u.substring(i))),n!==void 0?n:u}function cqe(u){let e;for(let t=0;t1&&u.scheme==="file"?t=`//${u.authority}${u.path}`:u.path.charCodeAt(0)===47&&(u.path.charCodeAt(1)>=65&&u.path.charCodeAt(1)<=90||u.path.charCodeAt(1)>=97&&u.path.charCodeAt(1)<=122)&&u.path.charCodeAt(2)===58?e?t=u.path.substr(1):t=u.path[1].toLowerCase()+u.path.substr(2):t=u.path,na&&(t=t.replace(/\//g,"\\")),t}function mK(u,e){const t=e?cqe:Xre;let n="",{scheme:i,authority:r,path:a,query:o,fragment:s}=u;if(i&&(n+=i,n+=":"),(r||i==="file")&&(n+=xc,n+=xc),r){let l=r.indexOf("@");if(l!==-1){const c=r.substr(0,l);r=r.substr(l+1),l=c.lastIndexOf(":"),l===-1?n+=t(c,!1,!1):(n+=t(c.substr(0,l),!1,!1),n+=":",n+=t(c.substr(l+1),!1,!0)),n+="@"}r=r.toLowerCase(),l=r.lastIndexOf(":"),l===-1?n+=t(r,!1,!0):(n+=t(r.substr(0,l),!1,!0),n+=r.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=t(a,!0,!1)}return o&&(n+="?",n+=t(o,!1,!1)),s&&(n+="#",n+=e?s:Xre(s,!1,!1)),n}function Bve(u){try{return decodeURIComponent(u)}catch{return u.length>3?u.substr(0,3)+Bve(u.substr(3)):u}}const eae=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function K7(u){return u.match(eae)?u.replace(eae,e=>Bve(e)):u}let ee=class af{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new af(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return af.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return af.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return Cr.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Cr.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return Cr.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return Cr.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Cr.plusRange(this,e)}static plusRange(e,t){let n,i,r,a;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,a=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,a=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,a=e.endColumn),new Cr(n,i,r,a)}intersectRanges(e){return Cr.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,a=e.endColumn;const o=t.startLineNumber,s=t.startColumn,l=t.endLineNumber,c=t.endColumn;return nl?(r=l,a=c):r===l&&(a=Math.min(a,c)),n>r||n===r&&i>a?null:new Cr(n,i,r,a)}equalsRange(e){return Cr.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Cr.getEndPosition(this)}static getEndPosition(e){return new ee(e.endLineNumber,e.endColumn)}getStartPosition(){return Cr.getStartPosition(this)}static getStartPosition(e){return new ee(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Cr(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Cr(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Cr.collapseToStart(this)}static collapseToStart(e){return new Cr(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Cr.collapseToEnd(this)}static collapseToEnd(e){return new Cr(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Cr(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Cr(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Cr(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}},Ye=class tl extends j{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return tl.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new tl(this.startLineNumber,this.startColumn,e,t):new tl(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new ee(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ee(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new tl(e,t,this.endLineNumber,this.endColumn):new tl(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new tl(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new tl(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new tl(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new tl(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();const i=new hqe(this,e,t);return this._factories.set(e,i),ft(()=>{const r=this._factories.get(e);!r||r!==i||(this._factories.delete(e),r.dispose())})}getOrCreate(e){return fK(this,void 0,void 0,function*(){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(yield n.resolve(),this.get(e))})}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class hqe extends ne{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return fK(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return fK(this,void 0,void 0,function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}let ik=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class jQ{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class RN{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var rk;(function(u){const e=new Map;e.set(0,we.symbolMethod),e.set(1,we.symbolFunction),e.set(2,we.symbolConstructor),e.set(3,we.symbolField),e.set(4,we.symbolVariable),e.set(5,we.symbolClass),e.set(6,we.symbolStruct),e.set(7,we.symbolInterface),e.set(8,we.symbolModule),e.set(9,we.symbolProperty),e.set(10,we.symbolEvent),e.set(11,we.symbolOperator),e.set(12,we.symbolUnit),e.set(13,we.symbolValue),e.set(15,we.symbolEnum),e.set(14,we.symbolConstant),e.set(15,we.symbolEnum),e.set(16,we.symbolEnumMember),e.set(17,we.symbolKeyword),e.set(27,we.symbolSnippet),e.set(18,we.symbolText),e.set(19,we.symbolColor),e.set(20,we.symbolFile),e.set(21,we.symbolReference),e.set(22,we.symbolCustomColor),e.set(23,we.symbolFolder),e.set(24,we.symbolTypeParameter),e.set(25,we.account),e.set(26,we.issues);function t(r){let a=e.get(r);return a||(console.info("No codicon found for CompletionItemKind "+r),a=we.symbolProperty),a}u.toIcon=t;const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function i(r,a){let o=n.get(r);return typeof o>"u"&&!a&&(o=9),o}u.fromString=i})(rk||(rk={}));var qh;(function(u){u[u.Automatic=0]="Automatic",u[u.Explicit=1]="Explicit"})(qh||(qh={}));class Lve{constructor(e,t,n,i){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=i}equals(e){return j.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var E1;(function(u){u[u.Invoke=1]="Invoke",u[u.TriggerCharacter=2]="TriggerCharacter",u[u.ContentChange=3]="ContentChange"})(E1||(E1={}));var ak;(function(u){u[u.Text=0]="Text",u[u.Read=1]="Read",u[u.Write=2]="Write"})(ak||(ak={}));function Eqe(u){return u&&dt.isUri(u.uri)&&j.isIRange(u.range)&&(j.isIRange(u.originSelectionRange)||j.isIRange(u.targetSelectionRange))}const mqe={17:v("Array","array"),16:v("Boolean","boolean"),4:v("Class","class"),13:v("Constant","constant"),8:v("Constructor","constructor"),9:v("Enum","enumeration"),21:v("EnumMember","enumeration member"),23:v("Event","event"),7:v("Field","field"),0:v("File","file"),11:v("Function","function"),10:v("Interface","interface"),19:v("Key","key"),5:v("Method","method"),1:v("Module","module"),2:v("Namespace","namespace"),20:v("Null","null"),15:v("Number","number"),18:v("Object","object"),24:v("Operator","operator"),3:v("Package","package"),6:v("Property","property"),14:v("String","string"),22:v("Struct","struct"),25:v("TypeParameter","type parameter"),12:v("Variable","variable")};function gqe(u,e){return v("symbolAriaLabel","{0} ({1})",u,mqe[e])}var gB;(function(u){const e=new Map;e.set(0,we.symbolFile),e.set(1,we.symbolModule),e.set(2,we.symbolNamespace),e.set(3,we.symbolPackage),e.set(4,we.symbolClass),e.set(5,we.symbolMethod),e.set(6,we.symbolProperty),e.set(7,we.symbolField),e.set(8,we.symbolConstructor),e.set(9,we.symbolEnum),e.set(10,we.symbolInterface),e.set(11,we.symbolFunction),e.set(12,we.symbolVariable),e.set(13,we.symbolConstant),e.set(14,we.symbolString),e.set(15,we.symbolNumber),e.set(16,we.symbolBoolean),e.set(17,we.symbolArray),e.set(18,we.symbolObject),e.set(19,we.symbolKey),e.set(20,we.symbolNull),e.set(21,we.symbolEnumMember),e.set(22,we.symbolStruct),e.set(23,we.symbolEvent),e.set(24,we.symbolOperator),e.set(25,we.symbolTypeParameter);function t(n){let i=e.get(n);return i||(console.info("No codicon found for SymbolKind "+n),i=we.symbolProperty),i}u.toIcon=t})(gB||(gB={}));let Ll=class cb{static fromValue(e){switch(e){case"comment":return cb.Comment;case"imports":return cb.Imports;case"region":return cb.Region}return new cb(e)}constructor(e){this.value=e}};Ll.Comment=new Ll("comment");Ll.Imports=new Ll("imports");Ll.Region=new Ll("region");var pK;(function(u){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}u.is=e})(pK||(pK={}));var fB;(function(u){u[u.Type=1]="Type",u[u.Parameter=2]="Parameter"})(fB||(fB={}));class fqe{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const qn=new dqe;var DK;(function(u){u[u.Unknown=0]="Unknown",u[u.Disabled=1]="Disabled",u[u.Enabled=2]="Enabled"})(DK||(DK={}));var xK;(function(u){u[u.Invoke=1]="Invoke",u[u.Auto=2]="Auto"})(xK||(xK={}));var vK;(function(u){u[u.None=0]="None",u[u.KeepWhitespace=1]="KeepWhitespace",u[u.InsertAsSnippet=4]="InsertAsSnippet"})(vK||(vK={}));var CK;(function(u){u[u.Method=0]="Method",u[u.Function=1]="Function",u[u.Constructor=2]="Constructor",u[u.Field=3]="Field",u[u.Variable=4]="Variable",u[u.Class=5]="Class",u[u.Struct=6]="Struct",u[u.Interface=7]="Interface",u[u.Module=8]="Module",u[u.Property=9]="Property",u[u.Event=10]="Event",u[u.Operator=11]="Operator",u[u.Unit=12]="Unit",u[u.Value=13]="Value",u[u.Constant=14]="Constant",u[u.Enum=15]="Enum",u[u.EnumMember=16]="EnumMember",u[u.Keyword=17]="Keyword",u[u.Text=18]="Text",u[u.Color=19]="Color",u[u.File=20]="File",u[u.Reference=21]="Reference",u[u.Customcolor=22]="Customcolor",u[u.Folder=23]="Folder",u[u.TypeParameter=24]="TypeParameter",u[u.User=25]="User",u[u.Issue=26]="Issue",u[u.Snippet=27]="Snippet"})(CK||(CK={}));var bK;(function(u){u[u.Deprecated=1]="Deprecated"})(bK||(bK={}));var kK;(function(u){u[u.Invoke=0]="Invoke",u[u.TriggerCharacter=1]="TriggerCharacter",u[u.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(kK||(kK={}));var FK;(function(u){u[u.EXACT=0]="EXACT",u[u.ABOVE=1]="ABOVE",u[u.BELOW=2]="BELOW"})(FK||(FK={}));var yK;(function(u){u[u.NotSet=0]="NotSet",u[u.ContentFlush=1]="ContentFlush",u[u.RecoverFromMarkers=2]="RecoverFromMarkers",u[u.Explicit=3]="Explicit",u[u.Paste=4]="Paste",u[u.Undo=5]="Undo",u[u.Redo=6]="Redo"})(yK||(yK={}));var AK;(function(u){u[u.LF=1]="LF",u[u.CRLF=2]="CRLF"})(AK||(AK={}));var _K;(function(u){u[u.Text=0]="Text",u[u.Read=1]="Read",u[u.Write=2]="Write"})(_K||(_K={}));var SK;(function(u){u[u.None=0]="None",u[u.Keep=1]="Keep",u[u.Brackets=2]="Brackets",u[u.Advanced=3]="Advanced",u[u.Full=4]="Full"})(SK||(SK={}));var BK;(function(u){u[u.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",u[u.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",u[u.accessibilitySupport=2]="accessibilitySupport",u[u.accessibilityPageSize=3]="accessibilityPageSize",u[u.ariaLabel=4]="ariaLabel",u[u.ariaRequired=5]="ariaRequired",u[u.autoClosingBrackets=6]="autoClosingBrackets",u[u.autoClosingComments=7]="autoClosingComments",u[u.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",u[u.autoClosingDelete=9]="autoClosingDelete",u[u.autoClosingOvertype=10]="autoClosingOvertype",u[u.autoClosingQuotes=11]="autoClosingQuotes",u[u.autoIndent=12]="autoIndent",u[u.automaticLayout=13]="automaticLayout",u[u.autoSurround=14]="autoSurround",u[u.bracketPairColorization=15]="bracketPairColorization",u[u.guides=16]="guides",u[u.codeLens=17]="codeLens",u[u.codeLensFontFamily=18]="codeLensFontFamily",u[u.codeLensFontSize=19]="codeLensFontSize",u[u.colorDecorators=20]="colorDecorators",u[u.colorDecoratorsLimit=21]="colorDecoratorsLimit",u[u.columnSelection=22]="columnSelection",u[u.comments=23]="comments",u[u.contextmenu=24]="contextmenu",u[u.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",u[u.cursorBlinking=26]="cursorBlinking",u[u.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",u[u.cursorStyle=28]="cursorStyle",u[u.cursorSurroundingLines=29]="cursorSurroundingLines",u[u.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",u[u.cursorWidth=31]="cursorWidth",u[u.disableLayerHinting=32]="disableLayerHinting",u[u.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",u[u.domReadOnly=34]="domReadOnly",u[u.dragAndDrop=35]="dragAndDrop",u[u.dropIntoEditor=36]="dropIntoEditor",u[u.emptySelectionClipboard=37]="emptySelectionClipboard",u[u.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",u[u.extraEditorClassName=39]="extraEditorClassName",u[u.fastScrollSensitivity=40]="fastScrollSensitivity",u[u.find=41]="find",u[u.fixedOverflowWidgets=42]="fixedOverflowWidgets",u[u.folding=43]="folding",u[u.foldingStrategy=44]="foldingStrategy",u[u.foldingHighlight=45]="foldingHighlight",u[u.foldingImportsByDefault=46]="foldingImportsByDefault",u[u.foldingMaximumRegions=47]="foldingMaximumRegions",u[u.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",u[u.fontFamily=49]="fontFamily",u[u.fontInfo=50]="fontInfo",u[u.fontLigatures=51]="fontLigatures",u[u.fontSize=52]="fontSize",u[u.fontWeight=53]="fontWeight",u[u.fontVariations=54]="fontVariations",u[u.formatOnPaste=55]="formatOnPaste",u[u.formatOnType=56]="formatOnType",u[u.glyphMargin=57]="glyphMargin",u[u.gotoLocation=58]="gotoLocation",u[u.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",u[u.hover=60]="hover",u[u.inDiffEditor=61]="inDiffEditor",u[u.inlineSuggest=62]="inlineSuggest",u[u.letterSpacing=63]="letterSpacing",u[u.lightbulb=64]="lightbulb",u[u.lineDecorationsWidth=65]="lineDecorationsWidth",u[u.lineHeight=66]="lineHeight",u[u.lineNumbers=67]="lineNumbers",u[u.lineNumbersMinChars=68]="lineNumbersMinChars",u[u.linkedEditing=69]="linkedEditing",u[u.links=70]="links",u[u.matchBrackets=71]="matchBrackets",u[u.minimap=72]="minimap",u[u.mouseStyle=73]="mouseStyle",u[u.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",u[u.mouseWheelZoom=75]="mouseWheelZoom",u[u.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",u[u.multiCursorModifier=77]="multiCursorModifier",u[u.multiCursorPaste=78]="multiCursorPaste",u[u.multiCursorLimit=79]="multiCursorLimit",u[u.occurrencesHighlight=80]="occurrencesHighlight",u[u.overviewRulerBorder=81]="overviewRulerBorder",u[u.overviewRulerLanes=82]="overviewRulerLanes",u[u.padding=83]="padding",u[u.pasteAs=84]="pasteAs",u[u.parameterHints=85]="parameterHints",u[u.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",u[u.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",u[u.quickSuggestions=88]="quickSuggestions",u[u.quickSuggestionsDelay=89]="quickSuggestionsDelay",u[u.readOnly=90]="readOnly",u[u.readOnlyMessage=91]="readOnlyMessage",u[u.renameOnType=92]="renameOnType",u[u.renderControlCharacters=93]="renderControlCharacters",u[u.renderFinalNewline=94]="renderFinalNewline",u[u.renderLineHighlight=95]="renderLineHighlight",u[u.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",u[u.renderValidationDecorations=97]="renderValidationDecorations",u[u.renderWhitespace=98]="renderWhitespace",u[u.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",u[u.roundedSelection=100]="roundedSelection",u[u.rulers=101]="rulers",u[u.scrollbar=102]="scrollbar",u[u.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",u[u.scrollBeyondLastLine=104]="scrollBeyondLastLine",u[u.scrollPredominantAxis=105]="scrollPredominantAxis",u[u.selectionClipboard=106]="selectionClipboard",u[u.selectionHighlight=107]="selectionHighlight",u[u.selectOnLineNumbers=108]="selectOnLineNumbers",u[u.showFoldingControls=109]="showFoldingControls",u[u.showUnused=110]="showUnused",u[u.snippetSuggestions=111]="snippetSuggestions",u[u.smartSelect=112]="smartSelect",u[u.smoothScrolling=113]="smoothScrolling",u[u.stickyScroll=114]="stickyScroll",u[u.stickyTabStops=115]="stickyTabStops",u[u.stopRenderingLineAfter=116]="stopRenderingLineAfter",u[u.suggest=117]="suggest",u[u.suggestFontSize=118]="suggestFontSize",u[u.suggestLineHeight=119]="suggestLineHeight",u[u.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",u[u.suggestSelection=121]="suggestSelection",u[u.tabCompletion=122]="tabCompletion",u[u.tabIndex=123]="tabIndex",u[u.unicodeHighlighting=124]="unicodeHighlighting",u[u.unusualLineTerminators=125]="unusualLineTerminators",u[u.useShadowDOM=126]="useShadowDOM",u[u.useTabStops=127]="useTabStops",u[u.wordBreak=128]="wordBreak",u[u.wordSeparators=129]="wordSeparators",u[u.wordWrap=130]="wordWrap",u[u.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",u[u.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",u[u.wordWrapColumn=133]="wordWrapColumn",u[u.wordWrapOverride1=134]="wordWrapOverride1",u[u.wordWrapOverride2=135]="wordWrapOverride2",u[u.wrappingIndent=136]="wrappingIndent",u[u.wrappingStrategy=137]="wrappingStrategy",u[u.showDeprecated=138]="showDeprecated",u[u.inlayHints=139]="inlayHints",u[u.editorClassName=140]="editorClassName",u[u.pixelRatio=141]="pixelRatio",u[u.tabFocusMode=142]="tabFocusMode",u[u.layoutInfo=143]="layoutInfo",u[u.wrappingInfo=144]="wrappingInfo",u[u.defaultColorDecorators=145]="defaultColorDecorators",u[u.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",u[u.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(BK||(BK={}));var wK;(function(u){u[u.TextDefined=0]="TextDefined",u[u.LF=1]="LF",u[u.CRLF=2]="CRLF"})(wK||(wK={}));var LK;(function(u){u[u.LF=0]="LF",u[u.CRLF=1]="CRLF"})(LK||(LK={}));var zK;(function(u){u[u.Left=1]="Left",u[u.Right=2]="Right"})(zK||(zK={}));var MK;(function(u){u[u.None=0]="None",u[u.Indent=1]="Indent",u[u.IndentOutdent=2]="IndentOutdent",u[u.Outdent=3]="Outdent"})(MK||(MK={}));var TK;(function(u){u[u.Both=0]="Both",u[u.Right=1]="Right",u[u.Left=2]="Left",u[u.None=3]="None"})(TK||(TK={}));var NK;(function(u){u[u.Type=1]="Type",u[u.Parameter=2]="Parameter"})(NK||(NK={}));var PK;(function(u){u[u.Automatic=0]="Automatic",u[u.Explicit=1]="Explicit"})(PK||(PK={}));var RK;(function(u){u[u.DependsOnKbLayout=-1]="DependsOnKbLayout",u[u.Unknown=0]="Unknown",u[u.Backspace=1]="Backspace",u[u.Tab=2]="Tab",u[u.Enter=3]="Enter",u[u.Shift=4]="Shift",u[u.Ctrl=5]="Ctrl",u[u.Alt=6]="Alt",u[u.PauseBreak=7]="PauseBreak",u[u.CapsLock=8]="CapsLock",u[u.Escape=9]="Escape",u[u.Space=10]="Space",u[u.PageUp=11]="PageUp",u[u.PageDown=12]="PageDown",u[u.End=13]="End",u[u.Home=14]="Home",u[u.LeftArrow=15]="LeftArrow",u[u.UpArrow=16]="UpArrow",u[u.RightArrow=17]="RightArrow",u[u.DownArrow=18]="DownArrow",u[u.Insert=19]="Insert",u[u.Delete=20]="Delete",u[u.Digit0=21]="Digit0",u[u.Digit1=22]="Digit1",u[u.Digit2=23]="Digit2",u[u.Digit3=24]="Digit3",u[u.Digit4=25]="Digit4",u[u.Digit5=26]="Digit5",u[u.Digit6=27]="Digit6",u[u.Digit7=28]="Digit7",u[u.Digit8=29]="Digit8",u[u.Digit9=30]="Digit9",u[u.KeyA=31]="KeyA",u[u.KeyB=32]="KeyB",u[u.KeyC=33]="KeyC",u[u.KeyD=34]="KeyD",u[u.KeyE=35]="KeyE",u[u.KeyF=36]="KeyF",u[u.KeyG=37]="KeyG",u[u.KeyH=38]="KeyH",u[u.KeyI=39]="KeyI",u[u.KeyJ=40]="KeyJ",u[u.KeyK=41]="KeyK",u[u.KeyL=42]="KeyL",u[u.KeyM=43]="KeyM",u[u.KeyN=44]="KeyN",u[u.KeyO=45]="KeyO",u[u.KeyP=46]="KeyP",u[u.KeyQ=47]="KeyQ",u[u.KeyR=48]="KeyR",u[u.KeyS=49]="KeyS",u[u.KeyT=50]="KeyT",u[u.KeyU=51]="KeyU",u[u.KeyV=52]="KeyV",u[u.KeyW=53]="KeyW",u[u.KeyX=54]="KeyX",u[u.KeyY=55]="KeyY",u[u.KeyZ=56]="KeyZ",u[u.Meta=57]="Meta",u[u.ContextMenu=58]="ContextMenu",u[u.F1=59]="F1",u[u.F2=60]="F2",u[u.F3=61]="F3",u[u.F4=62]="F4",u[u.F5=63]="F5",u[u.F6=64]="F6",u[u.F7=65]="F7",u[u.F8=66]="F8",u[u.F9=67]="F9",u[u.F10=68]="F10",u[u.F11=69]="F11",u[u.F12=70]="F12",u[u.F13=71]="F13",u[u.F14=72]="F14",u[u.F15=73]="F15",u[u.F16=74]="F16",u[u.F17=75]="F17",u[u.F18=76]="F18",u[u.F19=77]="F19",u[u.F20=78]="F20",u[u.F21=79]="F21",u[u.F22=80]="F22",u[u.F23=81]="F23",u[u.F24=82]="F24",u[u.NumLock=83]="NumLock",u[u.ScrollLock=84]="ScrollLock",u[u.Semicolon=85]="Semicolon",u[u.Equal=86]="Equal",u[u.Comma=87]="Comma",u[u.Minus=88]="Minus",u[u.Period=89]="Period",u[u.Slash=90]="Slash",u[u.Backquote=91]="Backquote",u[u.BracketLeft=92]="BracketLeft",u[u.Backslash=93]="Backslash",u[u.BracketRight=94]="BracketRight",u[u.Quote=95]="Quote",u[u.OEM_8=96]="OEM_8",u[u.IntlBackslash=97]="IntlBackslash",u[u.Numpad0=98]="Numpad0",u[u.Numpad1=99]="Numpad1",u[u.Numpad2=100]="Numpad2",u[u.Numpad3=101]="Numpad3",u[u.Numpad4=102]="Numpad4",u[u.Numpad5=103]="Numpad5",u[u.Numpad6=104]="Numpad6",u[u.Numpad7=105]="Numpad7",u[u.Numpad8=106]="Numpad8",u[u.Numpad9=107]="Numpad9",u[u.NumpadMultiply=108]="NumpadMultiply",u[u.NumpadAdd=109]="NumpadAdd",u[u.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",u[u.NumpadSubtract=111]="NumpadSubtract",u[u.NumpadDecimal=112]="NumpadDecimal",u[u.NumpadDivide=113]="NumpadDivide",u[u.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",u[u.ABNT_C1=115]="ABNT_C1",u[u.ABNT_C2=116]="ABNT_C2",u[u.AudioVolumeMute=117]="AudioVolumeMute",u[u.AudioVolumeUp=118]="AudioVolumeUp",u[u.AudioVolumeDown=119]="AudioVolumeDown",u[u.BrowserSearch=120]="BrowserSearch",u[u.BrowserHome=121]="BrowserHome",u[u.BrowserBack=122]="BrowserBack",u[u.BrowserForward=123]="BrowserForward",u[u.MediaTrackNext=124]="MediaTrackNext",u[u.MediaTrackPrevious=125]="MediaTrackPrevious",u[u.MediaStop=126]="MediaStop",u[u.MediaPlayPause=127]="MediaPlayPause",u[u.LaunchMediaPlayer=128]="LaunchMediaPlayer",u[u.LaunchMail=129]="LaunchMail",u[u.LaunchApp2=130]="LaunchApp2",u[u.Clear=131]="Clear",u[u.MAX_VALUE=132]="MAX_VALUE"})(RK||(RK={}));var IK;(function(u){u[u.Hint=1]="Hint",u[u.Info=2]="Info",u[u.Warning=4]="Warning",u[u.Error=8]="Error"})(IK||(IK={}));var OK;(function(u){u[u.Unnecessary=1]="Unnecessary",u[u.Deprecated=2]="Deprecated"})(OK||(OK={}));var jK;(function(u){u[u.Inline=1]="Inline",u[u.Gutter=2]="Gutter"})(jK||(jK={}));var HK;(function(u){u[u.UNKNOWN=0]="UNKNOWN",u[u.TEXTAREA=1]="TEXTAREA",u[u.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",u[u.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",u[u.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",u[u.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",u[u.CONTENT_TEXT=6]="CONTENT_TEXT",u[u.CONTENT_EMPTY=7]="CONTENT_EMPTY",u[u.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",u[u.CONTENT_WIDGET=9]="CONTENT_WIDGET",u[u.OVERVIEW_RULER=10]="OVERVIEW_RULER",u[u.SCROLLBAR=11]="SCROLLBAR",u[u.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",u[u.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(HK||(HK={}));var VK;(function(u){u[u.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",u[u.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",u[u.TOP_CENTER=2]="TOP_CENTER"})(VK||(VK={}));var $K;(function(u){u[u.Left=1]="Left",u[u.Center=2]="Center",u[u.Right=4]="Right",u[u.Full=7]="Full"})($K||($K={}));var KK;(function(u){u[u.Left=0]="Left",u[u.Right=1]="Right",u[u.None=2]="None",u[u.LeftOfInjectedText=3]="LeftOfInjectedText",u[u.RightOfInjectedText=4]="RightOfInjectedText"})(KK||(KK={}));var WK;(function(u){u[u.Off=0]="Off",u[u.On=1]="On",u[u.Relative=2]="Relative",u[u.Interval=3]="Interval",u[u.Custom=4]="Custom"})(WK||(WK={}));var GK;(function(u){u[u.None=0]="None",u[u.Text=1]="Text",u[u.Blocks=2]="Blocks"})(GK||(GK={}));var UK;(function(u){u[u.Smooth=0]="Smooth",u[u.Immediate=1]="Immediate"})(UK||(UK={}));var qK;(function(u){u[u.Auto=1]="Auto",u[u.Hidden=2]="Hidden",u[u.Visible=3]="Visible"})(qK||(qK={}));var JK;(function(u){u[u.LTR=0]="LTR",u[u.RTL=1]="RTL"})(JK||(JK={}));var ZK;(function(u){u[u.Invoke=1]="Invoke",u[u.TriggerCharacter=2]="TriggerCharacter",u[u.ContentChange=3]="ContentChange"})(ZK||(ZK={}));var YK;(function(u){u[u.File=0]="File",u[u.Module=1]="Module",u[u.Namespace=2]="Namespace",u[u.Package=3]="Package",u[u.Class=4]="Class",u[u.Method=5]="Method",u[u.Property=6]="Property",u[u.Field=7]="Field",u[u.Constructor=8]="Constructor",u[u.Enum=9]="Enum",u[u.Interface=10]="Interface",u[u.Function=11]="Function",u[u.Variable=12]="Variable",u[u.Constant=13]="Constant",u[u.String=14]="String",u[u.Number=15]="Number",u[u.Boolean=16]="Boolean",u[u.Array=17]="Array",u[u.Object=18]="Object",u[u.Key=19]="Key",u[u.Null=20]="Null",u[u.EnumMember=21]="EnumMember",u[u.Struct=22]="Struct",u[u.Event=23]="Event",u[u.Operator=24]="Operator",u[u.TypeParameter=25]="TypeParameter"})(YK||(YK={}));var QK;(function(u){u[u.Deprecated=1]="Deprecated"})(QK||(QK={}));var XK;(function(u){u[u.Hidden=0]="Hidden",u[u.Blink=1]="Blink",u[u.Smooth=2]="Smooth",u[u.Phase=3]="Phase",u[u.Expand=4]="Expand",u[u.Solid=5]="Solid"})(XK||(XK={}));var eW;(function(u){u[u.Line=1]="Line",u[u.Block=2]="Block",u[u.Underline=3]="Underline",u[u.LineThin=4]="LineThin",u[u.BlockOutline=5]="BlockOutline",u[u.UnderlineThin=6]="UnderlineThin"})(eW||(eW={}));var tW;(function(u){u[u.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",u[u.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",u[u.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",u[u.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(tW||(tW={}));var uW;(function(u){u[u.None=0]="None",u[u.Same=1]="Same",u[u.Indent=2]="Indent",u[u.DeepIndent=3]="DeepIndent"})(uW||(uW={}));let eA=class{static chord(e,t){return Vi(e,t)}};eA.CtrlCmd=2048;eA.Shift=1024;eA.Alt=512;eA.WinCtrl=256;function zve(){return{editor:void 0,languages:void 0,CancellationTokenSource:vi,Emitter:Q,KeyCode:RK,KeyMod:eA,Position:ee,Range:j,Selection:Ye,SelectionDirection:JK,MarkerSeverity:IK,MarkerTag:OK,Uri:dt,Token:ik}}class pqe{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class tae{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class mg{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var Gx;function Mve(u){return!u||typeof u!="string"?!0:u.trim().length===0}const Dqe=/{(\d+)}/g;function y3(u,...e){return e.length===0?u:u.replace(Dqe,function(t,n){const i=parseInt(n,10);return isNaN(i)||i<0||i>=e.length?t:e[i]})}function pB(u){return u.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function qs(u){return u.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function xqe(u,e=" "){const t=tA(u,e);return Tve(t,e)}function tA(u,e){if(!u||!e)return u;const t=e.length;if(t===0||u.length===0)return u;let n=0;for(;u.indexOf(e,n)===n;)n=n+t;return u.substring(n)}function Tve(u,e){if(!u||!e)return u;const t=e.length,n=u.length;if(t===0||n===0)return u;let i=n,r=-1;for(;r=u.lastIndexOf(e,i-1),!(r===-1||r+t!==i);){if(r===0)return"";i=r}return u.substring(0,i)}function vqe(u){return u.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Cqe(u){return u.replace(/\*/g,"")}function Nve(u,e,t={}){if(!u)throw new Error("Cannot create regex from empty string");e||(u=qs(u)),t.wholeWord&&(/\B/.test(u.charAt(0))||(u="\\b"+u),/\B/.test(u.charAt(u.length-1))||(u=u+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(u,n)}function bqe(u){return u.source==="^"||u.source==="^$"||u.source==="$"||u.source==="^\\s*$"?!1:!!(u.exec("")&&u.lastIndex===0)}function F1(u){return u.split(/\r\n|\r|\n/)}function Ta(u){for(let e=0,t=u.length;e=0;t--){const n=u.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function ok(u,e){return ue?1:0}function HQ(u,e,t=0,n=u.length,i=0,r=e.length){for(;tl)return 1}const a=n-t,o=r-i;return ao?1:0}function nW(u,e){return uA(u,e,0,u.length,0,e.length)}function uA(u,e,t=0,n=u.length,i=0,r=e.length){for(;t=128||l>=128)return HQ(u.toLowerCase(),e.toLowerCase(),t,n,i,r);_E(s)&&(s-=32),_E(l)&&(l-=32);const c=s-l;if(c!==0)return c}const a=n-t,o=r-i;return ao?1:0}function W7(u){return u>=48&&u<=57}function _E(u){return u>=97&&u<=122}function Pd(u){return u>=65&&u<=90}function o5(u,e){return u.length===e.length&&uA(u,e)===0}function VQ(u,e){const t=e.length;return e.length>u.length?!1:uA(u,e,0,t)===0}function A3(u,e){const t=Math.min(u.length,e.length);let n;for(n=0;n1){const n=u.charCodeAt(e-2);if(ur(n))return $Q(n,t)}return t}class KQ{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=kqe(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=xB(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class vB{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new KQ(e,t)}nextGraphemeLength(){const e=SE.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const r=t.offset,a=e.getGraphemeBreakType(t.nextCodePoint());if(uae(i,a)){t.setOffset(r);break}i=a}return t.offset-n}prevGraphemeLength(){const e=SE.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const r=t.offset,a=e.getGraphemeBreakType(t.prevCodePoint());if(uae(a,i)){t.setOffset(r);break}i=a}return n-t.offset}eol(){return this._iterator.eol()}}function WQ(u,e){return new vB(u,e).nextGraphemeLength()}function Pve(u,e){return new vB(u,e).prevGraphemeLength()}function Fqe(u,e){e>0&&_3(u.charCodeAt(e))&&e--;const t=e+WQ(u,e);return[t-Pve(u,t),t]}let XO;function yqe(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Ux(u){return XO||(XO=yqe()),XO.test(u)}const Aqe=/^[\t\n\r\x20-\x7E]*$/;function nA(u){return Aqe.test(u)}const Rve=/[\u2028\u2029]/;function Ive(u){return Rve.test(u)}function Tm(u){return u>=11904&&u<=55215||u>=63744&&u<=64255||u>=65281&&u<=65374}function GQ(u){return u>=127462&&u<=127487||u===8986||u===8987||u===9200||u===9203||u>=9728&&u<=10175||u===11088||u===11093||u>=127744&&u<=128591||u>=128640&&u<=128764||u>=128992&&u<=129008||u>=129280&&u<=129535||u>=129648&&u<=129782}const _qe=String.fromCharCode(65279);function UQ(u){return!!(u&&u.length>0&&u.charCodeAt(0)===65279)}function Sqe(u,e=!1){return u?(e&&(u=u.replace(/\\./g,"")),u.toLowerCase()!==u):!1}function Ove(u){return u=u%(2*26),u<26?String.fromCharCode(97+u):String.fromCharCode(65+u-26)}function uae(u,e){return u===0?e!==5&&e!==7:u===2&&e===3?!1:u===4||u===2||u===3||e===4||e===2||e===3?!0:!(u===8&&(e===8||e===9||e===11||e===12)||(u===11||u===9)&&(e===9||e===10)||(u===12||u===10)&&e===10||e===5||e===13||e===7||u===1||u===13&&e===14||u===6&&e===6)}class SE{static getInstance(){return SE._INSTANCE||(SE._INSTANCE=new SE),SE._INSTANCE}constructor(){this._data=Bqe()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(et[3*i+1])i=2*i+1;else return t[3*i+2];return 0}}SE._INSTANCE=null;function Bqe(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function wqe(u,e){if(u===0)return 0;const t=Lqe(u,e);if(t!==void 0)return t;const n=new KQ(e,u);return n.prevCodePoint(),n.offset}function Lqe(u,e){const t=new KQ(e,u);let n=t.prevCodePoint();for(;zqe(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!GQ(n))return;let i=t.offset;return i>0&&t.prevCodePoint()===8205&&(i=t.offset),i}function zqe(u){return 127995<=u&&u<=127999}const jve=" ";class S3{static getInstance(e){return Gx.cache.get(Array.from(e))}static getLocales(){return Gx._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Gx=S3;S3.ambiguousCharacterData=new mg(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));S3.cache=new pqe(u=>{function e(l){const c=new Map;for(let d=0;d!l.startsWith("_")&&l in i);r.length===0&&(r=["_default"]);let a;for(const l of r){const c=e(i[l]);a=n(a,c)}const o=e(i._common),s=t(o,a);return new Gx(s)});S3._locales=new mg(()=>Object.keys(Gx.ambiguousCharacterData.value).filter(u=>!u.startsWith("_")));class m1{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(m1.getRawData())),this._data}static isInvisibleCharacter(e){return m1.getData().has(e)}static get codePoints(){return m1.getData()}}m1._data=void 0;class iW{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}iW.INSTANCE=new iW;class Mqe extends ne{constructor(){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class Tqe extends ne{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Mqe);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}}class Nqe{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new Tqe),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function Hve(u,e){typeof u=="string"&&(u=window.matchMedia(u)),u.addEventListener("change",e)}const sk=new Nqe;function Pqe(){return iW.INSTANCE.getZoomFactor()}const s6=navigator.userAgent,M0=s6.indexOf("Firefox")>=0,t3=s6.indexOf("AppleWebKit")>=0,qQ=s6.indexOf("Chrome")>=0,l4=!qQ&&s6.indexOf("Safari")>=0,Vve=!qQ&&!l4&&t3;s6.indexOf("Electron/")>=0;const nae=s6.indexOf("Android")>=0;let OS=!1;if(window.matchMedia){const u=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=window.matchMedia("(display-mode: fullscreen)");OS=u.matches,Hve(u,({matches:t})=>{OS&&e.matches||(OS=t)})}function Rqe(){return OS}class $ve{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=Xl(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=Xl(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=Xl(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=Xl(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=Xl(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=Xl(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=Xl(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=Xl(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=Xl(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=Xl(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=Xl(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function Xl(u){return typeof u=="number"?`${u}px`:u}function ku(u){return new $ve(u)}function ea(u,e){u instanceof $ve?(u.setFontFamily(e.getMassagedFontFamily()),u.setFontWeight(e.fontWeight),u.setFontSize(e.fontSize),u.setFontFeatureSettings(e.fontFeatureSettings),u.setFontVariationSettings(e.fontVariationSettings),u.setLineHeight(e.lineHeight),u.setLetterSpacing(e.letterSpacing)):(u.style.fontFamily=e.getMassagedFontFamily(),u.style.fontWeight=e.fontWeight,u.style.fontSize=e.fontSize+"px",u.style.fontFeatureSettings=e.fontFeatureSettings,u.style.fontVariationSettings=e.fontVariationSettings,u.style.lineHeight=e.lineHeight+"px",u.style.letterSpacing=e.letterSpacing+"px")}class Iqe{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class JQ{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");ea(t,this._bareFontInfo),e.appendChild(t);const n=document.createElement("div");ea(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const i=document.createElement("div");ea(i,this._bareFontInfo),i.style.fontStyle="italic",e.appendChild(i);const r=[];for(const a of this._requests){let o;a.type===0&&(o=t),a.type===2&&(o=n),a.type===1&&(o=i),o.appendChild(document.createElement("br"));const s=document.createElement("span");JQ._render(s,a),o.appendChild(s),r.push(s)}this._container=e,this._testElements=r}static _render(e,t){if(t.chr===" "){let n=" ";for(let i=0;i<8;i++)n+=n;e.innerText=n}else{let n=t.chr;for(let i=0;i<8;i++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const n of e)n.isTrusted||(t=!0,this._cache.remove(n));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new rW({pixelRatio:sk.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,n,i){const r=new Iqe(e,t);return n.push(r),i==null||i.push(r),r}_actualReadFontInfo(e){const t=[],n=[],i=this._createRequest("n",0,t,n),r=this._createRequest("m",0,t,null),a=this._createRequest(" ",0,t,n),o=this._createRequest("0",0,t,n),s=this._createRequest("1",0,t,n),l=this._createRequest("2",0,t,n),c=this._createRequest("3",0,t,n),d=this._createRequest("4",0,t,n),h=this._createRequest("5",0,t,n),E=this._createRequest("6",0,t,n),m=this._createRequest("7",0,t,n),g=this._createRequest("8",0,t,n),f=this._createRequest("9",0,t,n),p=this._createRequest("→",0,t,n),D=this._createRequest("→",0,t,null),x=this._createRequest("·",0,t,n),b=this._createRequest(String.fromCharCode(11825),0,t,null),k="|/-_ilm%";for(let z=0,N=k.length;z.001){F=!1;break}}let w=!0;return F&&D.width!==S&&(w=!1),D.width>p.width&&(w=!1),new rW({pixelRatio:sk.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:F,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:w,spaceWidth:a.width,middotWidth:x.width,wsmiddotWidth:b.width,maxDigitWidth:A},!0)}}class iae{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const aW=new Vqe;var Lc;(function(u){u.serviceIds=new Map,u.DI_TARGET="$di$target",u.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[u.DI_DEPENDENCIES]||[]}u.getServiceDependencies=e})(Lc||(Lc={}));const mt=Ut("instantiationService");function $qe(u,e,t){e[Lc.DI_TARGET]===e?e[Lc.DI_DEPENDENCIES].push({id:u,index:t}):(e[Lc.DI_DEPENDENCIES]=[{id:u,index:t}],e[Lc.DI_TARGET]=e)}function Ut(u){if(Lc.serviceIds.has(u))return Lc.serviceIds.get(u);const e=function(t,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");$qe(e,t,i)};return e.toString=()=>u,Lc.serviceIds.set(u,e),e}const Cu=Ut("codeEditorService"),_n=Ut("modelService"),Vo=Ut("textModelService");var qx=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let ro=class extends ne{constructor(e,t="",n="",i=!0,r){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return qx(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(e))})}};class Jx extends ne{constructor(){super(...arguments),this._onWillRun=this._register(new Q),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new Q),this.onDidRun=this._onDidRun.event}run(e,t){return qx(this,void 0,void 0,function*(){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{yield this.runAction(e,t)}catch(i){n=i}this._onDidRun.fire({action:e,error:n})})}runAction(e,t){return qx(this,void 0,void 0,function*(){yield e.run(t)})}}class Dr{constructor(){this.id=Dr.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const n of e)n.length&&(t.length?t=[...t,new Dr,...n]:t=n);return t}run(){return qx(this,void 0,void 0,function*(){})}}Dr.ID="vs.actions.separator";class Zx{get actions(){return this._actions}constructor(e,t,n,i){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=i,this._actions=n}run(){return qx(this,void 0,void 0,function*(){})}}class IN extends ro{constructor(){super(IN.ID,v("submenu.empty","(empty)"),void 0,!1)}}IN.ID="vs.actions.empty";function tx(u){var e,t;return{id:u.id,label:u.label,class:void 0,enabled:(e=u.enabled)!==null&&e!==void 0?e:!0,checked:(t=u.checked)!==null&&t!==void 0?t:!1,run:(...n)=>qx(this,void 0,void 0,function*(){return u.run(...n)}),tooltip:u.label}}var oW;(function(u){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}u.isThemeColor=e})(oW||(oW={}));var st;(function(u){u.iconNameSegment="[A-Za-z0-9]+",u.iconNameExpression="[A-Za-z0-9-]+",u.iconModifierExpression="~[A-Za-z]+",u.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${u.iconNameExpression})(${u.iconModifierExpression})?$`);function t(h){const E=e.exec(h.id);if(!E)return t(we.error);const[,m,g]=E,f=["codicon","codicon-"+m];return g&&f.push("codicon-modifier-"+g.substring(1)),f}u.asClassNameArray=t;function n(h){return t(h).join(" ")}u.asClassName=n;function i(h){return"."+t(h).join(".")}u.asCSSSelector=i;function r(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||oW.isThemeColor(h.color))}u.isThemeIcon=r;const a=new RegExp(`^\\$\\((${u.iconNameExpression}(?:${u.iconModifierExpression})?)\\)$`);function o(h){const E=a.exec(h);if(!E)return;const[,m]=E;return{id:m}}u.fromString=o;function s(h){return{id:h}}u.fromId=s;function l(h,E){let m=h.id;const g=m.lastIndexOf("~");return g!==-1&&(m=m.substring(0,g)),E&&(m=`${m}~${E}`),{id:m}}u.modify=l;function c(h){const E=h.id.lastIndexOf("~");if(E!==-1)return h.id.substring(E+1)}u.getModifier=c;function d(h,E){var m,g;return h.id===E.id&&((m=h.color)===null||m===void 0?void 0:m.id)===((g=E.color)===null||g===void 0?void 0:g.id)}u.isEqual=d})(st||(st={}));const ni=Ut("commandService"),ru=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Q,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(u,e){if(!u)throw new Error("invalid command");if(typeof u=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:u,handler:e})}if(u.description){const a=[];for(const s of u.description.args)a.push(s.constraint);const o=u.handler;u.handler=function(s,...l){return yGe(l,a),o(s,...l)}}const{id:t}=u;let n=this._commands.get(t);n||(n=new to,this._commands.set(t,n));const i=n.unshift(u),r=ft(()=>{i();const a=this._commands.get(t);a!=null&&a.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),r}registerCommandAlias(u,e){return ru.registerCommand(u,(t,...n)=>t.get(ni).executeCommand(e,...n))}getCommand(u){const e=this._commands.get(u);if(!(!e||e.isEmpty()))return $t.first(e)}getCommands(){const u=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&u.set(e,t)}return u}};ru.registerCommand("noop",()=>{});function tj(...u){switch(u.length){case 1:return v("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",u[0]);case 2:return v("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",u[0],u[1]);case 3:return v("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",u[0],u[1],u[2]);default:return}}const Kqe=v("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Wqe=v("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");let vf=class sW{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw MQ(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(tj("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(tj("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(tj("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=sW._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Kqe);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Wqe);return}const r=this._input.charCodeAt(e);if(t)t=!1;else if(r===47&&!n){e++;break}else r===91?n=!0:r===92?t=!0:r===93&&(n=!1);e++}for(;e=this._input.length}};vf._regexFlags=new Set(["i","g","s","m","y","u"].map(u=>u.charCodeAt(0)));vf._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const Ca=new Map;Ca.set("false",!1);Ca.set("true",!0);Ca.set("isMac",iu);Ca.set("isLinux",Pa);Ca.set("isWindows",na);Ca.set("isWeb",dg);Ca.set("isMacNative",iu&&!dg);Ca.set("isEdge",HGe);Ca.set("isFirefox",OGe);Ca.set("isChrome",dve);Ca.set("isSafari",jGe);const Gqe=Object.prototype.hasOwnProperty,Uqe={regexParsingWithErrorRecovery:!0},qqe=v("contextkey.parser.error.emptyString","Empty context key expression"),Jqe=v("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Zqe=v("contextkey.parser.error.noInAfterNot","'in' after 'not'."),rae=v("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),Yqe=v("contextkey.parser.error.unexpectedToken","Unexpected token"),Qqe=v("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Xqe=v("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),eJe=v("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");let Kve=class db{constructor(e=Uqe){this._config=e,this._scanner=new vf,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:qqe,offset:0,lexeme:"",additionalInfo:Jqe});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const t=this._expr();if(!this._isAtEnd()){const n=this._peek(),i=n.type===17?Qqe:void 0;throw this._parsingErrors.push({message:Yqe,offset:n.offset,lexeme:vf.getLexeme(n),additionalInfo:i}),db._parseError}return t}catch(t){if(t!==db._parseError)throw t;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return e.length===1?e[0]:Ee.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return e.length===1?e[0]:Ee.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),oo.INSTANCE;case 12:return this._advance(),No.INSTANCE;case 0:{this._advance();const t=this._expr();return this._consume(1,rae),t==null?void 0:t.negate()}case 17:return this._advance(),_p.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),Ee.true();case 12:return this._advance(),Ee.false();case 0:{this._advance();const t=this._expr();return this._consume(1,rae),t}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const i=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),i.type!==10)throw this._errExpectedButGot("REGEX",i);const r=i.lexeme,a=r.lastIndexOf("/"),o=a===r.length-1?void 0:this._removeFlagsGY(r.substring(a+1));let s;try{s=new RegExp(r.substring(1,a),o)}catch{throw this._errExpectedButGot("REGEX",i)}return lk.create(t,s)}switch(i.type){case 10:case 19:{const r=[i.lexeme];this._advance();let a=this._peek(),o=0;for(let h=0;h=0){const l=r.slice(o+1,s),c=r[s+1]==="i"?"i":"";try{a=new RegExp(l,c)}catch{throw this._errExpectedButGot("REGEX",i)}}}if(a===null)throw this._errExpectedButGot("REGEX",i);return lk.create(t,a)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Zqe);const i=this._value();return Ee.notIn(t,i)}switch(this._peek().type){case 3:{this._advance();const i=this._value();if(this._previous().type===18)return Ee.equals(t,i);switch(i){case"true":return Ee.has(t);case"false":return Ee.not(t);default:return Ee.equals(t,i)}}case 4:{this._advance();const i=this._value();if(this._previous().type===18)return Ee.notEquals(t,i);switch(i){case"true":return Ee.not(t);case"false":return Ee.has(t);default:return Ee.notEquals(t,i)}}case 5:return this._advance(),WN.create(t,this._value());case 6:return this._advance(),GN.create(t,this._value());case 7:return this._advance(),$N.create(t,this._value());case 8:return this._advance(),KN.create(t,this._value());case 13:return this._advance(),Ee.in(t,this._value());default:return Ee.has(t)}}case 20:throw this._parsingErrors.push({message:Xqe,offset:e.offset,lexeme:"",additionalInfo:eJe}),db._parseError;default:throw this._errExpectedButGot(`true | false | KEY +`))}}class QO{constructor(e){this.value=e}}const jUe=2;let Q=class{constructor(e){var t,n,i,r,a;this._size=0,this._options=e,this._leakageMon=!((t=this._options)===null||t===void 0)&&t.leakWarningThreshold?new OUe((i=(n=this._options)===null||n===void 0?void 0:n.leakWarningThreshold)!==null&&i!==void 0?i:IUe):void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Wx(this._options._profName):void 0,this._deliveryQueue=(a=this._options)===null||a===void 0?void 0:a.deliveryQueue}dispose(){var e,t,n,i;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)===null||t===void 0?void 0:t.onDidRemoveLastListener)===null||n===void 0||n.call(t),(i=this._leakageMon)===null||i===void 0||i.dispose())}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(t,n,i)=>{var r,a,o,s,l;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),ne.None;if(this._disposed)return ne.None;n&&(t=t.bind(n));const c=new QO(t);let d;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(c.stack=PQ.create(),d=this._leakageMon.check(c.stack,this._size+1)),this._listeners?this._listeners instanceof QO?((l=this._deliveryQueue)!==null&&l!==void 0||(this._deliveryQueue=new Dve),this._listeners=[this._listeners,c]):this._listeners.push(c):((a=(r=this._options)===null||r===void 0?void 0:r.onWillAddFirstListener)===null||a===void 0||a.call(r,this),this._listeners=c,(s=(o=this._options)===null||o===void 0?void 0:o.onDidAddFirstListener)===null||s===void 0||s.call(o,this)),this._size++;const h=ft(()=>{d==null||d(),this._removeListener(c)});return i instanceof pe?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}_removeListener(e){var t,n,i,r;if((n=(t=this._options)===null||t===void 0?void 0:t.onWillRemoveListener)===null||n===void 0||n.call(t,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(r=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||r===void 0||r.call(i,this),this._size=0;return}const a=this._listeners,o=a.indexOf(e);if(o===-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--,a[o]=void 0;const s=this._deliveryQueue.current===this;if(this._size*jUe<=a.length){let l=0;for(let c=0;c0}};const HUe=()=>new Dve;class Dve{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class F3 extends Q{constructor(e){super(e),this._isPaused=0,this._eventQueue=new to,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class xve extends F3{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class VUe extends Q{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e==null?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(t=>super.fire(t)),this._queuedEvents=[]}))}}class $Ue{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new Q({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),ft(Mm(()=>{this.hasListeners&&this.unhook(t);const i=this.events.indexOf(t);this.events.splice(i,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(t=>this.emitter.fire(t))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}class RQ{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(r=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>t.call(n,r)):t.call(n,r)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(i=>i()),n}}class Qre{constructor(){this.listening=!1,this.inputEvent=Ne.None,this.inputEventListener=ne.None,this.emitter=new Q({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const vve=Object.freeze(function(u,e){const t=setTimeout(u.bind(e),0);return{dispose(){clearTimeout(t)}}});var Kt;(function(u){function e(t){return t===u.None||t===u.Cancelled||t instanceof PS?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}u.isCancellationToken=e,u.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ne.None}),u.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:vve})})(Kt||(Kt={}));class PS{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?vve:(this._emitter||(this._emitter=new Q),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}let vi=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new PS),this._token}cancel(){this._token?this._token instanceof PS&&this._token.cancel():this._token=Kt.Cancelled}dispose(e=!1){var t;e&&this.cancel(),(t=this._parentListener)===null||t===void 0||t.dispose(),this._token?this._token instanceof PS&&this._token.dispose():this._token=Kt.None}};class IQ{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const RS=new IQ,dK=new IQ,hK=new IQ,Cve=new Array(230),KUe=Object.create(null),WUe=Object.create(null),OQ=[];for(let u=0;u<=193;u++)OQ[u]=-1;(function(){const u="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",u,u],[1,1,"Hyper",0,u,0,u,u,u],[1,2,"Super",0,u,0,u,u,u],[1,3,"Fn",0,u,0,u,u,u],[1,4,"FnLock",0,u,0,u,u,u],[1,5,"Suspend",0,u,0,u,u,u],[1,6,"Resume",0,u,0,u,u,u],[1,7,"Turbo",0,u,0,u,u,u],[1,8,"Sleep",0,u,0,"VK_SLEEP",u,u],[1,9,"WakeUp",0,u,0,u,u,u],[0,10,"KeyA",31,"A",65,"VK_A",u,u],[0,11,"KeyB",32,"B",66,"VK_B",u,u],[0,12,"KeyC",33,"C",67,"VK_C",u,u],[0,13,"KeyD",34,"D",68,"VK_D",u,u],[0,14,"KeyE",35,"E",69,"VK_E",u,u],[0,15,"KeyF",36,"F",70,"VK_F",u,u],[0,16,"KeyG",37,"G",71,"VK_G",u,u],[0,17,"KeyH",38,"H",72,"VK_H",u,u],[0,18,"KeyI",39,"I",73,"VK_I",u,u],[0,19,"KeyJ",40,"J",74,"VK_J",u,u],[0,20,"KeyK",41,"K",75,"VK_K",u,u],[0,21,"KeyL",42,"L",76,"VK_L",u,u],[0,22,"KeyM",43,"M",77,"VK_M",u,u],[0,23,"KeyN",44,"N",78,"VK_N",u,u],[0,24,"KeyO",45,"O",79,"VK_O",u,u],[0,25,"KeyP",46,"P",80,"VK_P",u,u],[0,26,"KeyQ",47,"Q",81,"VK_Q",u,u],[0,27,"KeyR",48,"R",82,"VK_R",u,u],[0,28,"KeyS",49,"S",83,"VK_S",u,u],[0,29,"KeyT",50,"T",84,"VK_T",u,u],[0,30,"KeyU",51,"U",85,"VK_U",u,u],[0,31,"KeyV",52,"V",86,"VK_V",u,u],[0,32,"KeyW",53,"W",87,"VK_W",u,u],[0,33,"KeyX",54,"X",88,"VK_X",u,u],[0,34,"KeyY",55,"Y",89,"VK_Y",u,u],[0,35,"KeyZ",56,"Z",90,"VK_Z",u,u],[0,36,"Digit1",22,"1",49,"VK_1",u,u],[0,37,"Digit2",23,"2",50,"VK_2",u,u],[0,38,"Digit3",24,"3",51,"VK_3",u,u],[0,39,"Digit4",25,"4",52,"VK_4",u,u],[0,40,"Digit5",26,"5",53,"VK_5",u,u],[0,41,"Digit6",27,"6",54,"VK_6",u,u],[0,42,"Digit7",28,"7",55,"VK_7",u,u],[0,43,"Digit8",29,"8",56,"VK_8",u,u],[0,44,"Digit9",30,"9",57,"VK_9",u,u],[0,45,"Digit0",21,"0",48,"VK_0",u,u],[1,46,"Enter",3,"Enter",13,"VK_RETURN",u,u],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",u,u],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",u,u],[1,49,"Tab",2,"Tab",9,"VK_TAB",u,u],[1,50,"Space",10,"Space",32,"VK_SPACE",u,u],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,u,0,u,u,u],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",u,u],[1,64,"F1",59,"F1",112,"VK_F1",u,u],[1,65,"F2",60,"F2",113,"VK_F2",u,u],[1,66,"F3",61,"F3",114,"VK_F3",u,u],[1,67,"F4",62,"F4",115,"VK_F4",u,u],[1,68,"F5",63,"F5",116,"VK_F5",u,u],[1,69,"F6",64,"F6",117,"VK_F6",u,u],[1,70,"F7",65,"F7",118,"VK_F7",u,u],[1,71,"F8",66,"F8",119,"VK_F8",u,u],[1,72,"F9",67,"F9",120,"VK_F9",u,u],[1,73,"F10",68,"F10",121,"VK_F10",u,u],[1,74,"F11",69,"F11",122,"VK_F11",u,u],[1,75,"F12",70,"F12",123,"VK_F12",u,u],[1,76,"PrintScreen",0,u,0,u,u,u],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",u,u],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",u,u],[1,79,"Insert",19,"Insert",45,"VK_INSERT",u,u],[1,80,"Home",14,"Home",36,"VK_HOME",u,u],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",u,u],[1,82,"Delete",20,"Delete",46,"VK_DELETE",u,u],[1,83,"End",13,"End",35,"VK_END",u,u],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",u,u],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",u],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",u],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",u],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",u],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",u,u],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",u,u],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",u,u],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",u,u],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",u,u],[1,94,"NumpadEnter",3,u,0,u,u,u],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",u,u],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",u,u],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",u,u],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",u,u],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",u,u],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",u,u],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",u,u],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",u,u],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",u,u],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",u,u],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",u,u],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",u,u],[1,107,"ContextMenu",58,"ContextMenu",93,u,u,u],[1,108,"Power",0,u,0,u,u,u],[1,109,"NumpadEqual",0,u,0,u,u,u],[1,110,"F13",71,"F13",124,"VK_F13",u,u],[1,111,"F14",72,"F14",125,"VK_F14",u,u],[1,112,"F15",73,"F15",126,"VK_F15",u,u],[1,113,"F16",74,"F16",127,"VK_F16",u,u],[1,114,"F17",75,"F17",128,"VK_F17",u,u],[1,115,"F18",76,"F18",129,"VK_F18",u,u],[1,116,"F19",77,"F19",130,"VK_F19",u,u],[1,117,"F20",78,"F20",131,"VK_F20",u,u],[1,118,"F21",79,"F21",132,"VK_F21",u,u],[1,119,"F22",80,"F22",133,"VK_F22",u,u],[1,120,"F23",81,"F23",134,"VK_F23",u,u],[1,121,"F24",82,"F24",135,"VK_F24",u,u],[1,122,"Open",0,u,0,u,u,u],[1,123,"Help",0,u,0,u,u,u],[1,124,"Select",0,u,0,u,u,u],[1,125,"Again",0,u,0,u,u,u],[1,126,"Undo",0,u,0,u,u,u],[1,127,"Cut",0,u,0,u,u,u],[1,128,"Copy",0,u,0,u,u,u],[1,129,"Paste",0,u,0,u,u,u],[1,130,"Find",0,u,0,u,u,u],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",u,u],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",u,u],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",u,u],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",u,u],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",u,u],[1,136,"KanaMode",0,u,0,u,u,u],[0,137,"IntlYen",0,u,0,u,u,u],[1,138,"Convert",0,u,0,u,u,u],[1,139,"NonConvert",0,u,0,u,u,u],[1,140,"Lang1",0,u,0,u,u,u],[1,141,"Lang2",0,u,0,u,u,u],[1,142,"Lang3",0,u,0,u,u,u],[1,143,"Lang4",0,u,0,u,u,u],[1,144,"Lang5",0,u,0,u,u,u],[1,145,"Abort",0,u,0,u,u,u],[1,146,"Props",0,u,0,u,u,u],[1,147,"NumpadParenLeft",0,u,0,u,u,u],[1,148,"NumpadParenRight",0,u,0,u,u,u],[1,149,"NumpadBackspace",0,u,0,u,u,u],[1,150,"NumpadMemoryStore",0,u,0,u,u,u],[1,151,"NumpadMemoryRecall",0,u,0,u,u,u],[1,152,"NumpadMemoryClear",0,u,0,u,u,u],[1,153,"NumpadMemoryAdd",0,u,0,u,u,u],[1,154,"NumpadMemorySubtract",0,u,0,u,u,u],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",u,u],[1,156,"NumpadClearEntry",0,u,0,u,u,u],[1,0,u,5,"Ctrl",17,"VK_CONTROL",u,u],[1,0,u,4,"Shift",16,"VK_SHIFT",u,u],[1,0,u,6,"Alt",18,"VK_MENU",u,u],[1,0,u,57,"Meta",91,"VK_COMMAND",u,u],[1,157,"ControlLeft",5,u,0,"VK_LCONTROL",u,u],[1,158,"ShiftLeft",4,u,0,"VK_LSHIFT",u,u],[1,159,"AltLeft",6,u,0,"VK_LMENU",u,u],[1,160,"MetaLeft",57,u,0,"VK_LWIN",u,u],[1,161,"ControlRight",5,u,0,"VK_RCONTROL",u,u],[1,162,"ShiftRight",4,u,0,"VK_RSHIFT",u,u],[1,163,"AltRight",6,u,0,"VK_RMENU",u,u],[1,164,"MetaRight",57,u,0,"VK_RWIN",u,u],[1,165,"BrightnessUp",0,u,0,u,u,u],[1,166,"BrightnessDown",0,u,0,u,u,u],[1,167,"MediaPlay",0,u,0,u,u,u],[1,168,"MediaRecord",0,u,0,u,u,u],[1,169,"MediaFastForward",0,u,0,u,u,u],[1,170,"MediaRewind",0,u,0,u,u,u],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",u,u],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",u,u],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",u,u],[1,174,"Eject",0,u,0,u,u,u],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",u,u],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",u,u],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",u,u],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",u,u],[1,179,"LaunchApp1",0,u,0,"VK_MEDIA_LAUNCH_APP1",u,u],[1,180,"SelectTask",0,u,0,u,u,u],[1,181,"LaunchScreenSaver",0,u,0,u,u,u],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",u,u],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",u,u],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",u,u],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",u,u],[1,186,"BrowserStop",0,u,0,"VK_BROWSER_STOP",u,u],[1,187,"BrowserRefresh",0,u,0,"VK_BROWSER_REFRESH",u,u],[1,188,"BrowserFavorites",0,u,0,"VK_BROWSER_FAVORITES",u,u],[1,189,"ZoomToggle",0,u,0,u,u,u],[1,190,"MailReply",0,u,0,u,u,u],[1,191,"MailForward",0,u,0,u,u,u],[1,192,"MailSend",0,u,0,u,u,u],[1,0,u,114,"KeyInComposition",229,u,u,u],[1,0,u,116,"ABNT_C2",194,"VK_ABNT_C2",u,u],[1,0,u,96,"OEM_8",223,"VK_OEM_8",u,u],[1,0,u,0,u,0,"VK_KANA",u,u],[1,0,u,0,u,0,"VK_HANGUL",u,u],[1,0,u,0,u,0,"VK_JUNJA",u,u],[1,0,u,0,u,0,"VK_FINAL",u,u],[1,0,u,0,u,0,"VK_HANJA",u,u],[1,0,u,0,u,0,"VK_KANJI",u,u],[1,0,u,0,u,0,"VK_CONVERT",u,u],[1,0,u,0,u,0,"VK_NONCONVERT",u,u],[1,0,u,0,u,0,"VK_ACCEPT",u,u],[1,0,u,0,u,0,"VK_MODECHANGE",u,u],[1,0,u,0,u,0,"VK_SELECT",u,u],[1,0,u,0,u,0,"VK_PRINT",u,u],[1,0,u,0,u,0,"VK_EXECUTE",u,u],[1,0,u,0,u,0,"VK_SNAPSHOT",u,u],[1,0,u,0,u,0,"VK_HELP",u,u],[1,0,u,0,u,0,"VK_APPS",u,u],[1,0,u,0,u,0,"VK_PROCESSKEY",u,u],[1,0,u,0,u,0,"VK_PACKET",u,u],[1,0,u,0,u,0,"VK_DBE_SBCSCHAR",u,u],[1,0,u,0,u,0,"VK_DBE_DBCSCHAR",u,u],[1,0,u,0,u,0,"VK_ATTN",u,u],[1,0,u,0,u,0,"VK_CRSEL",u,u],[1,0,u,0,u,0,"VK_EXSEL",u,u],[1,0,u,0,u,0,"VK_EREOF",u,u],[1,0,u,0,u,0,"VK_PLAY",u,u],[1,0,u,0,u,0,"VK_ZOOM",u,u],[1,0,u,0,u,0,"VK_NONAME",u,u],[1,0,u,0,u,0,"VK_PA1",u,u],[1,0,u,0,u,0,"VK_OEM_CLEAR",u,u]],t=[],n=[];for(const i of e){const[r,a,o,s,l,c,d,h,E]=i;if(n[a]||(n[a]=!0,KUe[o]=a,WUe[o.toLowerCase()]=a,r&&(OQ[a]=s)),!t[s]){if(t[s]=!0,!l)throw new Error(`String representation missing for key code ${s} around scan code ${o}`);RS.define(s,l),dK.define(s,h||l),hK.define(s,E||h||l)}c&&(Cve[c]=s)}})();var Sh;(function(u){function e(o){return RS.keyCodeToStr(o)}u.toString=e;function t(o){return RS.strToKeyCode(o)}u.fromString=t;function n(o){return dK.keyCodeToStr(o)}u.toUserSettingsUS=n;function i(o){return hK.keyCodeToStr(o)}u.toUserSettingsGeneral=i;function r(o){return dK.strToKeyCode(o)||hK.strToKeyCode(o)}u.fromUserSettings=r;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return RS.keyCodeToStr(o)}u.toElectronAccelerator=a})(Sh||(Sh={}));function Vi(u,e){const t=(e&65535)<<16>>>0;return(u|t)>>>0}let ex;if(typeof kl.vscode<"u"&&typeof kl.vscode.process<"u"){const u=kl.vscode.process;ex={get platform(){return u.platform},get arch(){return u.arch},get env(){return u.env},cwd(){return u.cwd()}}}else typeof process<"u"?ex={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:ex={get platform(){return na?"win32":iu?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const hB=ex.cwd,bve=ex.env,GUe=ex.platform,UUe=65,qUe=97,JUe=90,ZUe=122,YE=46,Aa=47,_s=92,I4=58,YUe=63;class kve extends Error{constructor(e,t,n){let i;typeof t=="string"&&t.indexOf("not ")===0?(i="must not be",t=t.replace(/^not /,"")):i="must be";const r=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${r} ${i} of type ${t}`;a+=`. Received type ${typeof n}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function QUe(u,e){if(u===null||typeof u!="object")throw new kve(e,"Object",u)}function dr(u,e){if(typeof u!="string")throw new kve(e,"string",u)}const Eg=GUe==="win32";function Lu(u){return u===Aa||u===_s}function EK(u){return u===Aa}function O4(u){return u>=UUe&&u<=JUe||u>=qUe&&u<=ZUe}function EB(u,e,t,n){let i="",r=0,a=-1,o=0,s=0;for(let l=0;l<=u.length;++l){if(l2){const c=i.lastIndexOf(t);c===-1?(i="",r=0):(i=i.slice(0,c),r=i.length-1-i.lastIndexOf(t)),a=l,o=0;continue}else if(i.length!==0){i="",r=0,a=l,o=0;continue}}e&&(i+=i.length>0?`${t}..`:"..",r=2)}else i.length>0?i+=`${t}${u.slice(a+1,l)}`:i=u.slice(a+1,l),r=l-a-1;a=l,o=0}else s===YE&&o!==-1?++o:o=-1}return i}function Fve(u,e){QUe(e,"pathObject");const t=e.dir||e.root,n=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${n}`:`${t}${u}${n}`:n}const as={resolve(...u){let e="",t="",n=!1;for(let i=u.length-1;i>=-1;i--){let r;if(i>=0){if(r=u[i],dr(r,"path"),r.length===0)continue}else e.length===0?r=hB():(r=bve[`=${e}`]||hB(),(r===void 0||r.slice(0,2).toLowerCase()!==e.toLowerCase()&&r.charCodeAt(2)===_s)&&(r=`${e}\\`));const a=r.length;let o=0,s="",l=!1;const c=r.charCodeAt(0);if(a===1)Lu(c)&&(o=1,l=!0);else if(Lu(c))if(l=!0,Lu(r.charCodeAt(1))){let d=2,h=d;for(;d2&&Lu(r.charCodeAt(2))&&(l=!0,o=3));if(s.length>0)if(e.length>0){if(s.toLowerCase()!==e.toLowerCase())continue}else e=s;if(n){if(e.length>0)break}else if(t=`${r.slice(o)}\\${t}`,n=l,l&&e.length>0)break}return t=EB(t,!n,"\\",Lu),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(u){dr(u,"path");const e=u.length;if(e===0)return".";let t=0,n,i=!1;const r=u.charCodeAt(0);if(e===1)return EK(r)?"\\":u;if(Lu(r))if(i=!0,Lu(u.charCodeAt(1))){let o=2,s=o;for(;o2&&Lu(u.charCodeAt(2))&&(i=!0,t=3));let a=t0&&Lu(u.charCodeAt(e-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(u){dr(u,"path");const e=u.length;if(e===0)return!1;const t=u.charCodeAt(0);return Lu(t)||e>2&&O4(t)&&u.charCodeAt(1)===I4&&Lu(u.charCodeAt(2))},join(...u){if(u.length===0)return".";let e,t;for(let r=0;r0&&(e===void 0?e=t=a:e+=`\\${a}`)}if(e===void 0)return".";let n=!0,i=0;if(typeof t=="string"&&Lu(t.charCodeAt(0))){++i;const r=t.length;r>1&&Lu(t.charCodeAt(1))&&(++i,r>2&&(Lu(t.charCodeAt(2))?++i:n=!1))}if(n){for(;i=2&&(e=`\\${e.slice(i)}`)}return as.normalize(e)},relative(u,e){if(dr(u,"from"),dr(e,"to"),u===e)return"";const t=as.resolve(u),n=as.resolve(e);if(t===n||(u=t.toLowerCase(),e=n.toLowerCase(),u===e))return"";let i=0;for(;ii&&u.charCodeAt(r-1)===_s;)r--;const a=r-i;let o=0;for(;oo&&e.charCodeAt(s-1)===_s;)s--;const l=s-o,c=ac){if(e.charCodeAt(o+h)===_s)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(u.charCodeAt(i+h)===_s?d=h:h===2&&(d=3)),d===-1&&(d=0)}let E="";for(h=i+d+1;h<=r;++h)(h===r||u.charCodeAt(h)===_s)&&(E+=E.length===0?"..":"\\..");return o+=d,E.length>0?`${E}${n.slice(o,s)}`:(n.charCodeAt(o)===_s&&++o,n.slice(o,s))},toNamespacedPath(u){if(typeof u!="string"||u.length===0)return u;const e=as.resolve(u);if(e.length<=2)return u;if(e.charCodeAt(0)===_s){if(e.charCodeAt(1)===_s){const t=e.charCodeAt(2);if(t!==YUe&&t!==YE)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(O4(e.charCodeAt(0))&&e.charCodeAt(1)===I4&&e.charCodeAt(2)===_s)return`\\\\?\\${e}`;return u},dirname(u){dr(u,"path");const e=u.length;if(e===0)return".";let t=-1,n=0;const i=u.charCodeAt(0);if(e===1)return Lu(i)?u:".";if(Lu(i)){if(t=n=1,Lu(u.charCodeAt(1))){let o=2,s=o;for(;o2&&Lu(u.charCodeAt(2))?3:2,n=t);let r=-1,a=!0;for(let o=e-1;o>=n;--o)if(Lu(u.charCodeAt(o))){if(!a){r=o;break}}else a=!1;if(r===-1){if(t===-1)return".";r=t}return u.slice(0,r)},basename(u,e){e!==void 0&&dr(e,"ext"),dr(u,"path");let t=0,n=-1,i=!0,r;if(u.length>=2&&O4(u.charCodeAt(0))&&u.charCodeAt(1)===I4&&(t=2),e!==void 0&&e.length>0&&e.length<=u.length){if(e===u)return"";let a=e.length-1,o=-1;for(r=u.length-1;r>=t;--r){const s=u.charCodeAt(r);if(Lu(s)){if(!i){t=r+1;break}}else o===-1&&(i=!1,o=r+1),a>=0&&(s===e.charCodeAt(a)?--a===-1&&(n=r):(a=-1,n=o))}return t===n?n=o:n===-1&&(n=u.length),u.slice(t,n)}for(r=u.length-1;r>=t;--r)if(Lu(u.charCodeAt(r))){if(!i){t=r+1;break}}else n===-1&&(i=!1,n=r+1);return n===-1?"":u.slice(t,n)},extname(u){dr(u,"path");let e=0,t=-1,n=0,i=-1,r=!0,a=0;u.length>=2&&u.charCodeAt(1)===I4&&O4(u.charCodeAt(0))&&(e=n=2);for(let o=u.length-1;o>=e;--o){const s=u.charCodeAt(o);if(Lu(s)){if(!r){n=o+1;break}continue}i===-1&&(r=!1,i=o+1),s===YE?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||i===-1||a===0||a===1&&t===i-1&&t===n+1?"":u.slice(t,i)},format:Fve.bind(null,"\\"),parse(u){dr(u,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return e;const t=u.length;let n=0,i=u.charCodeAt(0);if(t===1)return Lu(i)?(e.root=e.dir=u,e):(e.base=e.name=u,e);if(Lu(i)){if(n=1,Lu(u.charCodeAt(1))){let d=2,h=d;for(;d0&&(e.root=u.slice(0,n));let r=-1,a=n,o=-1,s=!0,l=u.length-1,c=0;for(;l>=n;--l){if(i=u.charCodeAt(l),Lu(i)){if(!s){a=l+1;break}continue}o===-1&&(s=!1,o=l+1),i===YE?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return o!==-1&&(r===-1||c===0||c===1&&r===o-1&&r===a+1?e.base=e.name=u.slice(a,o):(e.name=u.slice(a,r),e.base=u.slice(a,o),e.ext=u.slice(r,o))),a>0&&a!==n?e.dir=u.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},XUe=(()=>{if(Eg){const u=/\\/g;return()=>{const e=hB().replace(u,"/");return e.slice(e.indexOf("/"))}}return()=>hB()})(),Oi={resolve(...u){let e="",t=!1;for(let n=u.length-1;n>=-1&&!t;n--){const i=n>=0?u[n]:XUe();dr(i,"path"),i.length!==0&&(e=`${i}/${e}`,t=i.charCodeAt(0)===Aa)}return e=EB(e,!t,"/",EK),t?`/${e}`:e.length>0?e:"."},normalize(u){if(dr(u,"path"),u.length===0)return".";const e=u.charCodeAt(0)===Aa,t=u.charCodeAt(u.length-1)===Aa;return u=EB(u,!e,"/",EK),u.length===0?e?"/":t?"./":".":(t&&(u+="/"),e?`/${u}`:u)},isAbsolute(u){return dr(u,"path"),u.length>0&&u.charCodeAt(0)===Aa},join(...u){if(u.length===0)return".";let e;for(let t=0;t0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":Oi.normalize(e)},relative(u,e){if(dr(u,"from"),dr(e,"to"),u===e||(u=Oi.resolve(u),e=Oi.resolve(e),u===e))return"";const t=1,n=u.length,i=n-t,r=1,a=e.length-r,o=io){if(e.charCodeAt(r+l)===Aa)return e.slice(r+l+1);if(l===0)return e.slice(r+l)}else i>o&&(u.charCodeAt(t+l)===Aa?s=l:l===0&&(s=0));let c="";for(l=t+s+1;l<=n;++l)(l===n||u.charCodeAt(l)===Aa)&&(c+=c.length===0?"..":"/..");return`${c}${e.slice(r+s)}`},toNamespacedPath(u){return u},dirname(u){if(dr(u,"path"),u.length===0)return".";const e=u.charCodeAt(0)===Aa;let t=-1,n=!0;for(let i=u.length-1;i>=1;--i)if(u.charCodeAt(i)===Aa){if(!n){t=i;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":u.slice(0,t)},basename(u,e){e!==void 0&&dr(e,"ext"),dr(u,"path");let t=0,n=-1,i=!0,r;if(e!==void 0&&e.length>0&&e.length<=u.length){if(e===u)return"";let a=e.length-1,o=-1;for(r=u.length-1;r>=0;--r){const s=u.charCodeAt(r);if(s===Aa){if(!i){t=r+1;break}}else o===-1&&(i=!1,o=r+1),a>=0&&(s===e.charCodeAt(a)?--a===-1&&(n=r):(a=-1,n=o))}return t===n?n=o:n===-1&&(n=u.length),u.slice(t,n)}for(r=u.length-1;r>=0;--r)if(u.charCodeAt(r)===Aa){if(!i){t=r+1;break}}else n===-1&&(i=!1,n=r+1);return n===-1?"":u.slice(t,n)},extname(u){dr(u,"path");let e=-1,t=0,n=-1,i=!0,r=0;for(let a=u.length-1;a>=0;--a){const o=u.charCodeAt(a);if(o===Aa){if(!i){t=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===YE?e===-1?e=a:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||n===-1||r===0||r===1&&e===n-1&&e===t+1?"":u.slice(e,n)},format:Fve.bind(null,"/"),parse(u){dr(u,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return e;const t=u.charCodeAt(0)===Aa;let n;t?(e.root="/",n=1):n=0;let i=-1,r=0,a=-1,o=!0,s=u.length-1,l=0;for(;s>=n;--s){const c=u.charCodeAt(s);if(c===Aa){if(!o){r=s+1;break}continue}a===-1&&(o=!1,a=s+1),c===YE?i===-1?i=s:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=r===0&&t?1:r;i===-1||l===0||l===1&&i===a-1&&i===r+1?e.base=e.name=u.slice(c,a):(e.name=u.slice(c,i),e.base=u.slice(c,a),e.ext=u.slice(i,a))}return r>0?e.dir=u.slice(0,r-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Oi.win32=as.win32=as;Oi.posix=as.posix=Oi;const yve=Eg?as.normalize:Oi.normalize,eqe=Eg?as.resolve:Oi.resolve,tqe=Eg?as.relative:Oi.relative,Ave=Eg?as.dirname:Oi.dirname,QE=Eg?as.basename:Oi.basename,uqe=Eg?as.extname:Oi.extname,jc=Eg?as.sep:Oi.sep,nqe=/^\w[\w\d+.-]*$/,iqe=/^\//,rqe=/^\/\//;function aqe(u,e){if(!u.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${u.authority}", path: "${u.path}", query: "${u.query}", fragment: "${u.fragment}"}`);if(u.scheme&&!nqe.test(u.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(u.path){if(u.authority){if(!iqe.test(u.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(rqe.test(u.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function oqe(u,e){return!u&&!e?"file":u}function sqe(u,e){switch(u){case"https":case"http":case"file":e?e[0]!==xc&&(e=xc+e):e=xc;break}return e}const mi="",xc="/",lqe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let dt=class IS{static isUri(e){return e instanceof IS?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,t,n,i,r,a=!1){typeof e=="object"?(this.scheme=e.scheme||mi,this.authority=e.authority||mi,this.path=e.path||mi,this.query=e.query||mi,this.fragment=e.fragment||mi):(this.scheme=oqe(e,a),this.authority=t||mi,this.path=sqe(this.scheme,n||mi),this.query=i||mi,this.fragment=r||mi,aqe(this,a))}get fsPath(){return mB(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:r,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=mi),n===void 0?n=this.authority:n===null&&(n=mi),i===void 0?i=this.path:i===null&&(i=mi),r===void 0?r=this.query:r===null&&(r=mi),a===void 0?a=this.fragment:a===null&&(a=mi),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&a===this.fragment?this:new oD(t,n,i,r,a)}static parse(e,t=!1){const n=lqe.exec(e);return n?new oD(n[2]||mi,K7(n[4]||mi),K7(n[5]||mi),K7(n[7]||mi),K7(n[9]||mi),t):new oD(mi,mi,mi,mi,mi)}static file(e){let t=mi;if(na&&(e=e.replace(/\\/g,xc)),e[0]===xc&&e[1]===xc){const n=e.indexOf(xc,2);n===-1?(t=e.substring(2),e=xc):(t=e.substring(2,n),e=e.substring(n)||xc)}return new oD("file",t,e,mi,mi)}static from(e,t){return new oD(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return na&&e.scheme==="file"?n=IS.file(as.join(mB(e,!0),...t)).path:n=Oi.join(e.path,...t),e.with({path:n})}toString(e=!1){return mK(this,e)}toJSON(){return this}static revive(e){var t,n;if(e){if(e instanceof IS)return e;{const i=new oD(e);return i._formatted=(t=e.external)!==null&&t!==void 0?t:null,i._fsPath=e._sep===_ve&&(n=e.fsPath)!==null&&n!==void 0?n:null,i}}else return e}};const _ve=na?1:void 0;let oD=class extends dt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=mB(this,!1)),this._fsPath}toString(e=!1){return e?mK(this,!0):(this._formatted||(this._formatted=mK(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_ve),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const Sve={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Xre(u,e,t){let n,i=-1;for(let r=0;r=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||t&&a===91||t&&a===93||t&&a===58)i!==-1&&(n+=encodeURIComponent(u.substring(i,r)),i=-1),n!==void 0&&(n+=u.charAt(r));else{n===void 0&&(n=u.substr(0,r));const o=Sve[a];o!==void 0?(i!==-1&&(n+=encodeURIComponent(u.substring(i,r)),i=-1),n+=o):i===-1&&(i=r)}}return i!==-1&&(n+=encodeURIComponent(u.substring(i))),n!==void 0?n:u}function cqe(u){let e;for(let t=0;t1&&u.scheme==="file"?t=`//${u.authority}${u.path}`:u.path.charCodeAt(0)===47&&(u.path.charCodeAt(1)>=65&&u.path.charCodeAt(1)<=90||u.path.charCodeAt(1)>=97&&u.path.charCodeAt(1)<=122)&&u.path.charCodeAt(2)===58?e?t=u.path.substr(1):t=u.path[1].toLowerCase()+u.path.substr(2):t=u.path,na&&(t=t.replace(/\//g,"\\")),t}function mK(u,e){const t=e?cqe:Xre;let n="",{scheme:i,authority:r,path:a,query:o,fragment:s}=u;if(i&&(n+=i,n+=":"),(r||i==="file")&&(n+=xc,n+=xc),r){let l=r.indexOf("@");if(l!==-1){const c=r.substr(0,l);r=r.substr(l+1),l=c.lastIndexOf(":"),l===-1?n+=t(c,!1,!1):(n+=t(c.substr(0,l),!1,!1),n+=":",n+=t(c.substr(l+1),!1,!0)),n+="@"}r=r.toLowerCase(),l=r.lastIndexOf(":"),l===-1?n+=t(r,!1,!0):(n+=t(r.substr(0,l),!1,!0),n+=r.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=t(a,!0,!1)}return o&&(n+="?",n+=t(o,!1,!1)),s&&(n+="#",n+=e?s:Xre(s,!1,!1)),n}function Bve(u){try{return decodeURIComponent(u)}catch{return u.length>3?u.substr(0,3)+Bve(u.substr(3)):u}}const eae=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function K7(u){return u.match(eae)?u.replace(eae,e=>Bve(e)):u}let ee=class af{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new af(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return af.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return af.isBefore(this,e)}static isBefore(e,t){return e.lineNumbern||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return Cr.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Cr.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return Cr.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return Cr.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return Cr.plusRange(this,e)}static plusRange(e,t){let n,i,r,a;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,a=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,a=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,a=e.endColumn),new Cr(n,i,r,a)}intersectRanges(e){return Cr.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,a=e.endColumn;const o=t.startLineNumber,s=t.startColumn,l=t.endLineNumber,c=t.endColumn;return nl?(r=l,a=c):r===l&&(a=Math.min(a,c)),n>r||n===r&&i>a?null:new Cr(n,i,r,a)}equalsRange(e){return Cr.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Cr.getEndPosition(this)}static getEndPosition(e){return new ee(e.endLineNumber,e.endColumn)}getStartPosition(){return Cr.getStartPosition(this)}static getStartPosition(e){return new ee(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Cr(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Cr(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Cr.collapseToStart(this)}static collapseToStart(e){return new Cr(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return Cr.collapseToEnd(this)}static collapseToEnd(e){return new Cr(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new Cr(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new Cr(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Cr(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}},Ye=class ul extends j{constructor(e,t,n,i){super(e,t,n,i),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ul.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return this.getDirection()===0?new ul(this.startLineNumber,this.startColumn,e,t):new ul(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new ee(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ee(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return this.getDirection()===0?new ul(e,t,this.endLineNumber,this.endColumn):new ul(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new ul(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return t===0?new ul(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new ul(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new ul(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var n;(n=this._factories.get(e))===null||n===void 0||n.dispose();const i=new hqe(this,e,t);return this._factories.set(e,i),ft(()=>{const r=this._factories.get(e);!r||r!==i||(this._factories.delete(e),r.dispose())})}getOrCreate(e){return fK(this,void 0,void 0,function*(){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(yield n.resolve(),this.get(e))})}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class hqe extends ne{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return fK(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return fK(this,void 0,void 0,function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}let ik=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class jQ{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class RN{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var rk;(function(u){const e=new Map;e.set(0,we.symbolMethod),e.set(1,we.symbolFunction),e.set(2,we.symbolConstructor),e.set(3,we.symbolField),e.set(4,we.symbolVariable),e.set(5,we.symbolClass),e.set(6,we.symbolStruct),e.set(7,we.symbolInterface),e.set(8,we.symbolModule),e.set(9,we.symbolProperty),e.set(10,we.symbolEvent),e.set(11,we.symbolOperator),e.set(12,we.symbolUnit),e.set(13,we.symbolValue),e.set(15,we.symbolEnum),e.set(14,we.symbolConstant),e.set(15,we.symbolEnum),e.set(16,we.symbolEnumMember),e.set(17,we.symbolKeyword),e.set(27,we.symbolSnippet),e.set(18,we.symbolText),e.set(19,we.symbolColor),e.set(20,we.symbolFile),e.set(21,we.symbolReference),e.set(22,we.symbolCustomColor),e.set(23,we.symbolFolder),e.set(24,we.symbolTypeParameter),e.set(25,we.account),e.set(26,we.issues);function t(r){let a=e.get(r);return a||(console.info("No codicon found for CompletionItemKind "+r),a=we.symbolProperty),a}u.toIcon=t;const n=new Map;n.set("method",0),n.set("function",1),n.set("constructor",2),n.set("field",3),n.set("variable",4),n.set("class",5),n.set("struct",6),n.set("interface",7),n.set("module",8),n.set("property",9),n.set("event",10),n.set("operator",11),n.set("unit",12),n.set("value",13),n.set("constant",14),n.set("enum",15),n.set("enum-member",16),n.set("enumMember",16),n.set("keyword",17),n.set("snippet",27),n.set("text",18),n.set("color",19),n.set("file",20),n.set("reference",21),n.set("customcolor",22),n.set("folder",23),n.set("type-parameter",24),n.set("typeParameter",24),n.set("account",25),n.set("issue",26);function i(r,a){let o=n.get(r);return typeof o>"u"&&!a&&(o=9),o}u.fromString=i})(rk||(rk={}));var qh;(function(u){u[u.Automatic=0]="Automatic",u[u.Explicit=1]="Explicit"})(qh||(qh={}));class Lve{constructor(e,t,n,i){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=i}equals(e){return j.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var E1;(function(u){u[u.Invoke=1]="Invoke",u[u.TriggerCharacter=2]="TriggerCharacter",u[u.ContentChange=3]="ContentChange"})(E1||(E1={}));var ak;(function(u){u[u.Text=0]="Text",u[u.Read=1]="Read",u[u.Write=2]="Write"})(ak||(ak={}));function Eqe(u){return u&&dt.isUri(u.uri)&&j.isIRange(u.range)&&(j.isIRange(u.originSelectionRange)||j.isIRange(u.targetSelectionRange))}const mqe={17:v("Array","array"),16:v("Boolean","boolean"),4:v("Class","class"),13:v("Constant","constant"),8:v("Constructor","constructor"),9:v("Enum","enumeration"),21:v("EnumMember","enumeration member"),23:v("Event","event"),7:v("Field","field"),0:v("File","file"),11:v("Function","function"),10:v("Interface","interface"),19:v("Key","key"),5:v("Method","method"),1:v("Module","module"),2:v("Namespace","namespace"),20:v("Null","null"),15:v("Number","number"),18:v("Object","object"),24:v("Operator","operator"),3:v("Package","package"),6:v("Property","property"),14:v("String","string"),22:v("Struct","struct"),25:v("TypeParameter","type parameter"),12:v("Variable","variable")};function gqe(u,e){return v("symbolAriaLabel","{0} ({1})",u,mqe[e])}var gB;(function(u){const e=new Map;e.set(0,we.symbolFile),e.set(1,we.symbolModule),e.set(2,we.symbolNamespace),e.set(3,we.symbolPackage),e.set(4,we.symbolClass),e.set(5,we.symbolMethod),e.set(6,we.symbolProperty),e.set(7,we.symbolField),e.set(8,we.symbolConstructor),e.set(9,we.symbolEnum),e.set(10,we.symbolInterface),e.set(11,we.symbolFunction),e.set(12,we.symbolVariable),e.set(13,we.symbolConstant),e.set(14,we.symbolString),e.set(15,we.symbolNumber),e.set(16,we.symbolBoolean),e.set(17,we.symbolArray),e.set(18,we.symbolObject),e.set(19,we.symbolKey),e.set(20,we.symbolNull),e.set(21,we.symbolEnumMember),e.set(22,we.symbolStruct),e.set(23,we.symbolEvent),e.set(24,we.symbolOperator),e.set(25,we.symbolTypeParameter);function t(n){let i=e.get(n);return i||(console.info("No codicon found for SymbolKind "+n),i=we.symbolProperty),i}u.toIcon=t})(gB||(gB={}));let Ll=class cb{static fromValue(e){switch(e){case"comment":return cb.Comment;case"imports":return cb.Imports;case"region":return cb.Region}return new cb(e)}constructor(e){this.value=e}};Ll.Comment=new Ll("comment");Ll.Imports=new Ll("imports");Ll.Region=new Ll("region");var pK;(function(u){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}u.is=e})(pK||(pK={}));var fB;(function(u){u[u.Type=1]="Type",u[u.Parameter=2]="Parameter"})(fB||(fB={}));class fqe{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const qn=new dqe;var DK;(function(u){u[u.Unknown=0]="Unknown",u[u.Disabled=1]="Disabled",u[u.Enabled=2]="Enabled"})(DK||(DK={}));var xK;(function(u){u[u.Invoke=1]="Invoke",u[u.Auto=2]="Auto"})(xK||(xK={}));var vK;(function(u){u[u.None=0]="None",u[u.KeepWhitespace=1]="KeepWhitespace",u[u.InsertAsSnippet=4]="InsertAsSnippet"})(vK||(vK={}));var CK;(function(u){u[u.Method=0]="Method",u[u.Function=1]="Function",u[u.Constructor=2]="Constructor",u[u.Field=3]="Field",u[u.Variable=4]="Variable",u[u.Class=5]="Class",u[u.Struct=6]="Struct",u[u.Interface=7]="Interface",u[u.Module=8]="Module",u[u.Property=9]="Property",u[u.Event=10]="Event",u[u.Operator=11]="Operator",u[u.Unit=12]="Unit",u[u.Value=13]="Value",u[u.Constant=14]="Constant",u[u.Enum=15]="Enum",u[u.EnumMember=16]="EnumMember",u[u.Keyword=17]="Keyword",u[u.Text=18]="Text",u[u.Color=19]="Color",u[u.File=20]="File",u[u.Reference=21]="Reference",u[u.Customcolor=22]="Customcolor",u[u.Folder=23]="Folder",u[u.TypeParameter=24]="TypeParameter",u[u.User=25]="User",u[u.Issue=26]="Issue",u[u.Snippet=27]="Snippet"})(CK||(CK={}));var bK;(function(u){u[u.Deprecated=1]="Deprecated"})(bK||(bK={}));var kK;(function(u){u[u.Invoke=0]="Invoke",u[u.TriggerCharacter=1]="TriggerCharacter",u[u.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(kK||(kK={}));var FK;(function(u){u[u.EXACT=0]="EXACT",u[u.ABOVE=1]="ABOVE",u[u.BELOW=2]="BELOW"})(FK||(FK={}));var yK;(function(u){u[u.NotSet=0]="NotSet",u[u.ContentFlush=1]="ContentFlush",u[u.RecoverFromMarkers=2]="RecoverFromMarkers",u[u.Explicit=3]="Explicit",u[u.Paste=4]="Paste",u[u.Undo=5]="Undo",u[u.Redo=6]="Redo"})(yK||(yK={}));var AK;(function(u){u[u.LF=1]="LF",u[u.CRLF=2]="CRLF"})(AK||(AK={}));var _K;(function(u){u[u.Text=0]="Text",u[u.Read=1]="Read",u[u.Write=2]="Write"})(_K||(_K={}));var SK;(function(u){u[u.None=0]="None",u[u.Keep=1]="Keep",u[u.Brackets=2]="Brackets",u[u.Advanced=3]="Advanced",u[u.Full=4]="Full"})(SK||(SK={}));var BK;(function(u){u[u.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",u[u.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",u[u.accessibilitySupport=2]="accessibilitySupport",u[u.accessibilityPageSize=3]="accessibilityPageSize",u[u.ariaLabel=4]="ariaLabel",u[u.ariaRequired=5]="ariaRequired",u[u.autoClosingBrackets=6]="autoClosingBrackets",u[u.autoClosingComments=7]="autoClosingComments",u[u.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",u[u.autoClosingDelete=9]="autoClosingDelete",u[u.autoClosingOvertype=10]="autoClosingOvertype",u[u.autoClosingQuotes=11]="autoClosingQuotes",u[u.autoIndent=12]="autoIndent",u[u.automaticLayout=13]="automaticLayout",u[u.autoSurround=14]="autoSurround",u[u.bracketPairColorization=15]="bracketPairColorization",u[u.guides=16]="guides",u[u.codeLens=17]="codeLens",u[u.codeLensFontFamily=18]="codeLensFontFamily",u[u.codeLensFontSize=19]="codeLensFontSize",u[u.colorDecorators=20]="colorDecorators",u[u.colorDecoratorsLimit=21]="colorDecoratorsLimit",u[u.columnSelection=22]="columnSelection",u[u.comments=23]="comments",u[u.contextmenu=24]="contextmenu",u[u.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",u[u.cursorBlinking=26]="cursorBlinking",u[u.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",u[u.cursorStyle=28]="cursorStyle",u[u.cursorSurroundingLines=29]="cursorSurroundingLines",u[u.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",u[u.cursorWidth=31]="cursorWidth",u[u.disableLayerHinting=32]="disableLayerHinting",u[u.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",u[u.domReadOnly=34]="domReadOnly",u[u.dragAndDrop=35]="dragAndDrop",u[u.dropIntoEditor=36]="dropIntoEditor",u[u.emptySelectionClipboard=37]="emptySelectionClipboard",u[u.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",u[u.extraEditorClassName=39]="extraEditorClassName",u[u.fastScrollSensitivity=40]="fastScrollSensitivity",u[u.find=41]="find",u[u.fixedOverflowWidgets=42]="fixedOverflowWidgets",u[u.folding=43]="folding",u[u.foldingStrategy=44]="foldingStrategy",u[u.foldingHighlight=45]="foldingHighlight",u[u.foldingImportsByDefault=46]="foldingImportsByDefault",u[u.foldingMaximumRegions=47]="foldingMaximumRegions",u[u.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",u[u.fontFamily=49]="fontFamily",u[u.fontInfo=50]="fontInfo",u[u.fontLigatures=51]="fontLigatures",u[u.fontSize=52]="fontSize",u[u.fontWeight=53]="fontWeight",u[u.fontVariations=54]="fontVariations",u[u.formatOnPaste=55]="formatOnPaste",u[u.formatOnType=56]="formatOnType",u[u.glyphMargin=57]="glyphMargin",u[u.gotoLocation=58]="gotoLocation",u[u.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",u[u.hover=60]="hover",u[u.inDiffEditor=61]="inDiffEditor",u[u.inlineSuggest=62]="inlineSuggest",u[u.letterSpacing=63]="letterSpacing",u[u.lightbulb=64]="lightbulb",u[u.lineDecorationsWidth=65]="lineDecorationsWidth",u[u.lineHeight=66]="lineHeight",u[u.lineNumbers=67]="lineNumbers",u[u.lineNumbersMinChars=68]="lineNumbersMinChars",u[u.linkedEditing=69]="linkedEditing",u[u.links=70]="links",u[u.matchBrackets=71]="matchBrackets",u[u.minimap=72]="minimap",u[u.mouseStyle=73]="mouseStyle",u[u.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",u[u.mouseWheelZoom=75]="mouseWheelZoom",u[u.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",u[u.multiCursorModifier=77]="multiCursorModifier",u[u.multiCursorPaste=78]="multiCursorPaste",u[u.multiCursorLimit=79]="multiCursorLimit",u[u.occurrencesHighlight=80]="occurrencesHighlight",u[u.overviewRulerBorder=81]="overviewRulerBorder",u[u.overviewRulerLanes=82]="overviewRulerLanes",u[u.padding=83]="padding",u[u.pasteAs=84]="pasteAs",u[u.parameterHints=85]="parameterHints",u[u.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",u[u.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",u[u.quickSuggestions=88]="quickSuggestions",u[u.quickSuggestionsDelay=89]="quickSuggestionsDelay",u[u.readOnly=90]="readOnly",u[u.readOnlyMessage=91]="readOnlyMessage",u[u.renameOnType=92]="renameOnType",u[u.renderControlCharacters=93]="renderControlCharacters",u[u.renderFinalNewline=94]="renderFinalNewline",u[u.renderLineHighlight=95]="renderLineHighlight",u[u.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",u[u.renderValidationDecorations=97]="renderValidationDecorations",u[u.renderWhitespace=98]="renderWhitespace",u[u.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",u[u.roundedSelection=100]="roundedSelection",u[u.rulers=101]="rulers",u[u.scrollbar=102]="scrollbar",u[u.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",u[u.scrollBeyondLastLine=104]="scrollBeyondLastLine",u[u.scrollPredominantAxis=105]="scrollPredominantAxis",u[u.selectionClipboard=106]="selectionClipboard",u[u.selectionHighlight=107]="selectionHighlight",u[u.selectOnLineNumbers=108]="selectOnLineNumbers",u[u.showFoldingControls=109]="showFoldingControls",u[u.showUnused=110]="showUnused",u[u.snippetSuggestions=111]="snippetSuggestions",u[u.smartSelect=112]="smartSelect",u[u.smoothScrolling=113]="smoothScrolling",u[u.stickyScroll=114]="stickyScroll",u[u.stickyTabStops=115]="stickyTabStops",u[u.stopRenderingLineAfter=116]="stopRenderingLineAfter",u[u.suggest=117]="suggest",u[u.suggestFontSize=118]="suggestFontSize",u[u.suggestLineHeight=119]="suggestLineHeight",u[u.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",u[u.suggestSelection=121]="suggestSelection",u[u.tabCompletion=122]="tabCompletion",u[u.tabIndex=123]="tabIndex",u[u.unicodeHighlighting=124]="unicodeHighlighting",u[u.unusualLineTerminators=125]="unusualLineTerminators",u[u.useShadowDOM=126]="useShadowDOM",u[u.useTabStops=127]="useTabStops",u[u.wordBreak=128]="wordBreak",u[u.wordSeparators=129]="wordSeparators",u[u.wordWrap=130]="wordWrap",u[u.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",u[u.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",u[u.wordWrapColumn=133]="wordWrapColumn",u[u.wordWrapOverride1=134]="wordWrapOverride1",u[u.wordWrapOverride2=135]="wordWrapOverride2",u[u.wrappingIndent=136]="wrappingIndent",u[u.wrappingStrategy=137]="wrappingStrategy",u[u.showDeprecated=138]="showDeprecated",u[u.inlayHints=139]="inlayHints",u[u.editorClassName=140]="editorClassName",u[u.pixelRatio=141]="pixelRatio",u[u.tabFocusMode=142]="tabFocusMode",u[u.layoutInfo=143]="layoutInfo",u[u.wrappingInfo=144]="wrappingInfo",u[u.defaultColorDecorators=145]="defaultColorDecorators",u[u.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",u[u.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(BK||(BK={}));var wK;(function(u){u[u.TextDefined=0]="TextDefined",u[u.LF=1]="LF",u[u.CRLF=2]="CRLF"})(wK||(wK={}));var LK;(function(u){u[u.LF=0]="LF",u[u.CRLF=1]="CRLF"})(LK||(LK={}));var zK;(function(u){u[u.Left=1]="Left",u[u.Right=2]="Right"})(zK||(zK={}));var MK;(function(u){u[u.None=0]="None",u[u.Indent=1]="Indent",u[u.IndentOutdent=2]="IndentOutdent",u[u.Outdent=3]="Outdent"})(MK||(MK={}));var TK;(function(u){u[u.Both=0]="Both",u[u.Right=1]="Right",u[u.Left=2]="Left",u[u.None=3]="None"})(TK||(TK={}));var NK;(function(u){u[u.Type=1]="Type",u[u.Parameter=2]="Parameter"})(NK||(NK={}));var PK;(function(u){u[u.Automatic=0]="Automatic",u[u.Explicit=1]="Explicit"})(PK||(PK={}));var RK;(function(u){u[u.DependsOnKbLayout=-1]="DependsOnKbLayout",u[u.Unknown=0]="Unknown",u[u.Backspace=1]="Backspace",u[u.Tab=2]="Tab",u[u.Enter=3]="Enter",u[u.Shift=4]="Shift",u[u.Ctrl=5]="Ctrl",u[u.Alt=6]="Alt",u[u.PauseBreak=7]="PauseBreak",u[u.CapsLock=8]="CapsLock",u[u.Escape=9]="Escape",u[u.Space=10]="Space",u[u.PageUp=11]="PageUp",u[u.PageDown=12]="PageDown",u[u.End=13]="End",u[u.Home=14]="Home",u[u.LeftArrow=15]="LeftArrow",u[u.UpArrow=16]="UpArrow",u[u.RightArrow=17]="RightArrow",u[u.DownArrow=18]="DownArrow",u[u.Insert=19]="Insert",u[u.Delete=20]="Delete",u[u.Digit0=21]="Digit0",u[u.Digit1=22]="Digit1",u[u.Digit2=23]="Digit2",u[u.Digit3=24]="Digit3",u[u.Digit4=25]="Digit4",u[u.Digit5=26]="Digit5",u[u.Digit6=27]="Digit6",u[u.Digit7=28]="Digit7",u[u.Digit8=29]="Digit8",u[u.Digit9=30]="Digit9",u[u.KeyA=31]="KeyA",u[u.KeyB=32]="KeyB",u[u.KeyC=33]="KeyC",u[u.KeyD=34]="KeyD",u[u.KeyE=35]="KeyE",u[u.KeyF=36]="KeyF",u[u.KeyG=37]="KeyG",u[u.KeyH=38]="KeyH",u[u.KeyI=39]="KeyI",u[u.KeyJ=40]="KeyJ",u[u.KeyK=41]="KeyK",u[u.KeyL=42]="KeyL",u[u.KeyM=43]="KeyM",u[u.KeyN=44]="KeyN",u[u.KeyO=45]="KeyO",u[u.KeyP=46]="KeyP",u[u.KeyQ=47]="KeyQ",u[u.KeyR=48]="KeyR",u[u.KeyS=49]="KeyS",u[u.KeyT=50]="KeyT",u[u.KeyU=51]="KeyU",u[u.KeyV=52]="KeyV",u[u.KeyW=53]="KeyW",u[u.KeyX=54]="KeyX",u[u.KeyY=55]="KeyY",u[u.KeyZ=56]="KeyZ",u[u.Meta=57]="Meta",u[u.ContextMenu=58]="ContextMenu",u[u.F1=59]="F1",u[u.F2=60]="F2",u[u.F3=61]="F3",u[u.F4=62]="F4",u[u.F5=63]="F5",u[u.F6=64]="F6",u[u.F7=65]="F7",u[u.F8=66]="F8",u[u.F9=67]="F9",u[u.F10=68]="F10",u[u.F11=69]="F11",u[u.F12=70]="F12",u[u.F13=71]="F13",u[u.F14=72]="F14",u[u.F15=73]="F15",u[u.F16=74]="F16",u[u.F17=75]="F17",u[u.F18=76]="F18",u[u.F19=77]="F19",u[u.F20=78]="F20",u[u.F21=79]="F21",u[u.F22=80]="F22",u[u.F23=81]="F23",u[u.F24=82]="F24",u[u.NumLock=83]="NumLock",u[u.ScrollLock=84]="ScrollLock",u[u.Semicolon=85]="Semicolon",u[u.Equal=86]="Equal",u[u.Comma=87]="Comma",u[u.Minus=88]="Minus",u[u.Period=89]="Period",u[u.Slash=90]="Slash",u[u.Backquote=91]="Backquote",u[u.BracketLeft=92]="BracketLeft",u[u.Backslash=93]="Backslash",u[u.BracketRight=94]="BracketRight",u[u.Quote=95]="Quote",u[u.OEM_8=96]="OEM_8",u[u.IntlBackslash=97]="IntlBackslash",u[u.Numpad0=98]="Numpad0",u[u.Numpad1=99]="Numpad1",u[u.Numpad2=100]="Numpad2",u[u.Numpad3=101]="Numpad3",u[u.Numpad4=102]="Numpad4",u[u.Numpad5=103]="Numpad5",u[u.Numpad6=104]="Numpad6",u[u.Numpad7=105]="Numpad7",u[u.Numpad8=106]="Numpad8",u[u.Numpad9=107]="Numpad9",u[u.NumpadMultiply=108]="NumpadMultiply",u[u.NumpadAdd=109]="NumpadAdd",u[u.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",u[u.NumpadSubtract=111]="NumpadSubtract",u[u.NumpadDecimal=112]="NumpadDecimal",u[u.NumpadDivide=113]="NumpadDivide",u[u.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",u[u.ABNT_C1=115]="ABNT_C1",u[u.ABNT_C2=116]="ABNT_C2",u[u.AudioVolumeMute=117]="AudioVolumeMute",u[u.AudioVolumeUp=118]="AudioVolumeUp",u[u.AudioVolumeDown=119]="AudioVolumeDown",u[u.BrowserSearch=120]="BrowserSearch",u[u.BrowserHome=121]="BrowserHome",u[u.BrowserBack=122]="BrowserBack",u[u.BrowserForward=123]="BrowserForward",u[u.MediaTrackNext=124]="MediaTrackNext",u[u.MediaTrackPrevious=125]="MediaTrackPrevious",u[u.MediaStop=126]="MediaStop",u[u.MediaPlayPause=127]="MediaPlayPause",u[u.LaunchMediaPlayer=128]="LaunchMediaPlayer",u[u.LaunchMail=129]="LaunchMail",u[u.LaunchApp2=130]="LaunchApp2",u[u.Clear=131]="Clear",u[u.MAX_VALUE=132]="MAX_VALUE"})(RK||(RK={}));var IK;(function(u){u[u.Hint=1]="Hint",u[u.Info=2]="Info",u[u.Warning=4]="Warning",u[u.Error=8]="Error"})(IK||(IK={}));var OK;(function(u){u[u.Unnecessary=1]="Unnecessary",u[u.Deprecated=2]="Deprecated"})(OK||(OK={}));var jK;(function(u){u[u.Inline=1]="Inline",u[u.Gutter=2]="Gutter"})(jK||(jK={}));var HK;(function(u){u[u.UNKNOWN=0]="UNKNOWN",u[u.TEXTAREA=1]="TEXTAREA",u[u.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",u[u.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",u[u.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",u[u.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",u[u.CONTENT_TEXT=6]="CONTENT_TEXT",u[u.CONTENT_EMPTY=7]="CONTENT_EMPTY",u[u.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",u[u.CONTENT_WIDGET=9]="CONTENT_WIDGET",u[u.OVERVIEW_RULER=10]="OVERVIEW_RULER",u[u.SCROLLBAR=11]="SCROLLBAR",u[u.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",u[u.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(HK||(HK={}));var VK;(function(u){u[u.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",u[u.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",u[u.TOP_CENTER=2]="TOP_CENTER"})(VK||(VK={}));var $K;(function(u){u[u.Left=1]="Left",u[u.Center=2]="Center",u[u.Right=4]="Right",u[u.Full=7]="Full"})($K||($K={}));var KK;(function(u){u[u.Left=0]="Left",u[u.Right=1]="Right",u[u.None=2]="None",u[u.LeftOfInjectedText=3]="LeftOfInjectedText",u[u.RightOfInjectedText=4]="RightOfInjectedText"})(KK||(KK={}));var WK;(function(u){u[u.Off=0]="Off",u[u.On=1]="On",u[u.Relative=2]="Relative",u[u.Interval=3]="Interval",u[u.Custom=4]="Custom"})(WK||(WK={}));var GK;(function(u){u[u.None=0]="None",u[u.Text=1]="Text",u[u.Blocks=2]="Blocks"})(GK||(GK={}));var UK;(function(u){u[u.Smooth=0]="Smooth",u[u.Immediate=1]="Immediate"})(UK||(UK={}));var qK;(function(u){u[u.Auto=1]="Auto",u[u.Hidden=2]="Hidden",u[u.Visible=3]="Visible"})(qK||(qK={}));var JK;(function(u){u[u.LTR=0]="LTR",u[u.RTL=1]="RTL"})(JK||(JK={}));var ZK;(function(u){u[u.Invoke=1]="Invoke",u[u.TriggerCharacter=2]="TriggerCharacter",u[u.ContentChange=3]="ContentChange"})(ZK||(ZK={}));var YK;(function(u){u[u.File=0]="File",u[u.Module=1]="Module",u[u.Namespace=2]="Namespace",u[u.Package=3]="Package",u[u.Class=4]="Class",u[u.Method=5]="Method",u[u.Property=6]="Property",u[u.Field=7]="Field",u[u.Constructor=8]="Constructor",u[u.Enum=9]="Enum",u[u.Interface=10]="Interface",u[u.Function=11]="Function",u[u.Variable=12]="Variable",u[u.Constant=13]="Constant",u[u.String=14]="String",u[u.Number=15]="Number",u[u.Boolean=16]="Boolean",u[u.Array=17]="Array",u[u.Object=18]="Object",u[u.Key=19]="Key",u[u.Null=20]="Null",u[u.EnumMember=21]="EnumMember",u[u.Struct=22]="Struct",u[u.Event=23]="Event",u[u.Operator=24]="Operator",u[u.TypeParameter=25]="TypeParameter"})(YK||(YK={}));var QK;(function(u){u[u.Deprecated=1]="Deprecated"})(QK||(QK={}));var XK;(function(u){u[u.Hidden=0]="Hidden",u[u.Blink=1]="Blink",u[u.Smooth=2]="Smooth",u[u.Phase=3]="Phase",u[u.Expand=4]="Expand",u[u.Solid=5]="Solid"})(XK||(XK={}));var eW;(function(u){u[u.Line=1]="Line",u[u.Block=2]="Block",u[u.Underline=3]="Underline",u[u.LineThin=4]="LineThin",u[u.BlockOutline=5]="BlockOutline",u[u.UnderlineThin=6]="UnderlineThin"})(eW||(eW={}));var tW;(function(u){u[u.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",u[u.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",u[u.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",u[u.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(tW||(tW={}));var uW;(function(u){u[u.None=0]="None",u[u.Same=1]="Same",u[u.Indent=2]="Indent",u[u.DeepIndent=3]="DeepIndent"})(uW||(uW={}));let eA=class{static chord(e,t){return Vi(e,t)}};eA.CtrlCmd=2048;eA.Shift=1024;eA.Alt=512;eA.WinCtrl=256;function zve(){return{editor:void 0,languages:void 0,CancellationTokenSource:vi,Emitter:Q,KeyCode:RK,KeyMod:eA,Position:ee,Range:j,Selection:Ye,SelectionDirection:JK,MarkerSeverity:IK,MarkerTag:OK,Uri:dt,Token:ik}}class pqe{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.fn(e)),this.lastCache}}class tae{get cachedValues(){return this._map}constructor(e){this.fn=e,this._map=new Map}get(e){if(this._map.has(e))return this._map.get(e);const t=this.fn(e);return this._map.set(e,t),t}}class mg{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var Gx;function Mve(u){return!u||typeof u!="string"?!0:u.trim().length===0}const Dqe=/{(\d+)}/g;function y3(u,...e){return e.length===0?u:u.replace(Dqe,function(t,n){const i=parseInt(n,10);return isNaN(i)||i<0||i>=e.length?t:e[i]})}function pB(u){return u.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function Js(u){return u.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function xqe(u,e=" "){const t=tA(u,e);return Tve(t,e)}function tA(u,e){if(!u||!e)return u;const t=e.length;if(t===0||u.length===0)return u;let n=0;for(;u.indexOf(e,n)===n;)n=n+t;return u.substring(n)}function Tve(u,e){if(!u||!e)return u;const t=e.length,n=u.length;if(t===0||n===0)return u;let i=n,r=-1;for(;r=u.lastIndexOf(e,i-1),!(r===-1||r+t!==i);){if(r===0)return"";i=r}return u.substring(0,i)}function vqe(u){return u.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Cqe(u){return u.replace(/\*/g,"")}function Nve(u,e,t={}){if(!u)throw new Error("Cannot create regex from empty string");e||(u=Js(u)),t.wholeWord&&(/\B/.test(u.charAt(0))||(u="\\b"+u),/\B/.test(u.charAt(u.length-1))||(u=u+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(u,n)}function bqe(u){return u.source==="^"||u.source==="^$"||u.source==="$"||u.source==="^\\s*$"?!1:!!(u.exec("")&&u.lastIndex===0)}function F1(u){return u.split(/\r\n|\r|\n/)}function Ta(u){for(let e=0,t=u.length;e=0;t--){const n=u.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function ok(u,e){return ue?1:0}function HQ(u,e,t=0,n=u.length,i=0,r=e.length){for(;tl)return 1}const a=n-t,o=r-i;return ao?1:0}function nW(u,e){return uA(u,e,0,u.length,0,e.length)}function uA(u,e,t=0,n=u.length,i=0,r=e.length){for(;t=128||l>=128)return HQ(u.toLowerCase(),e.toLowerCase(),t,n,i,r);_E(s)&&(s-=32),_E(l)&&(l-=32);const c=s-l;if(c!==0)return c}const a=n-t,o=r-i;return ao?1:0}function W7(u){return u>=48&&u<=57}function _E(u){return u>=97&&u<=122}function Pd(u){return u>=65&&u<=90}function o5(u,e){return u.length===e.length&&uA(u,e)===0}function VQ(u,e){const t=e.length;return e.length>u.length?!1:uA(u,e,0,t)===0}function A3(u,e){const t=Math.min(u.length,e.length);let n;for(n=0;n1){const n=u.charCodeAt(e-2);if(ur(n))return $Q(n,t)}return t}class KQ{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){const e=kqe(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=xB(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class vB{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new KQ(e,t)}nextGraphemeLength(){const e=SE.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const r=t.offset,a=e.getGraphemeBreakType(t.nextCodePoint());if(uae(i,a)){t.setOffset(r);break}i=a}return t.offset-n}prevGraphemeLength(){const e=SE.getInstance(),t=this._iterator,n=t.offset;let i=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const r=t.offset,a=e.getGraphemeBreakType(t.prevCodePoint());if(uae(a,i)){t.setOffset(r);break}i=a}return n-t.offset}eol(){return this._iterator.eol()}}function WQ(u,e){return new vB(u,e).nextGraphemeLength()}function Pve(u,e){return new vB(u,e).prevGraphemeLength()}function Fqe(u,e){e>0&&_3(u.charCodeAt(e))&&e--;const t=e+WQ(u,e);return[t-Pve(u,t),t]}let XO;function yqe(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function Ux(u){return XO||(XO=yqe()),XO.test(u)}const Aqe=/^[\t\n\r\x20-\x7E]*$/;function nA(u){return Aqe.test(u)}const Rve=/[\u2028\u2029]/;function Ive(u){return Rve.test(u)}function Tm(u){return u>=11904&&u<=55215||u>=63744&&u<=64255||u>=65281&&u<=65374}function GQ(u){return u>=127462&&u<=127487||u===8986||u===8987||u===9200||u===9203||u>=9728&&u<=10175||u===11088||u===11093||u>=127744&&u<=128591||u>=128640&&u<=128764||u>=128992&&u<=129008||u>=129280&&u<=129535||u>=129648&&u<=129782}const _qe=String.fromCharCode(65279);function UQ(u){return!!(u&&u.length>0&&u.charCodeAt(0)===65279)}function Sqe(u,e=!1){return u?(e&&(u=u.replace(/\\./g,"")),u.toLowerCase()!==u):!1}function Ove(u){return u=u%(2*26),u<26?String.fromCharCode(97+u):String.fromCharCode(65+u-26)}function uae(u,e){return u===0?e!==5&&e!==7:u===2&&e===3?!1:u===4||u===2||u===3||e===4||e===2||e===3?!0:!(u===8&&(e===8||e===9||e===11||e===12)||(u===11||u===9)&&(e===9||e===10)||(u===12||u===10)&&e===10||e===5||e===13||e===7||u===1||u===13&&e===14||u===6&&e===6)}class SE{static getInstance(){return SE._INSTANCE||(SE._INSTANCE=new SE),SE._INSTANCE}constructor(){this._data=Bqe()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,n=t.length/3;let i=1;for(;i<=n;)if(et[3*i+1])i=2*i+1;else return t[3*i+2];return 0}}SE._INSTANCE=null;function Bqe(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function wqe(u,e){if(u===0)return 0;const t=Lqe(u,e);if(t!==void 0)return t;const n=new KQ(e,u);return n.prevCodePoint(),n.offset}function Lqe(u,e){const t=new KQ(e,u);let n=t.prevCodePoint();for(;zqe(n)||n===65039||n===8419;){if(t.offset===0)return;n=t.prevCodePoint()}if(!GQ(n))return;let i=t.offset;return i>0&&t.prevCodePoint()===8205&&(i=t.offset),i}function zqe(u){return 127995<=u&&u<=127999}const jve=" ";class S3{static getInstance(e){return Gx.cache.get(Array.from(e))}static getLocales(){return Gx._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}Gx=S3;S3.ambiguousCharacterData=new mg(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'));S3.cache=new pqe(u=>{function e(l){const c=new Map;for(let d=0;d!l.startsWith("_")&&l in i);r.length===0&&(r=["_default"]);let a;for(const l of r){const c=e(i[l]);a=n(a,c)}const o=e(i._common),s=t(o,a);return new Gx(s)});S3._locales=new mg(()=>Object.keys(Gx.ambiguousCharacterData.value).filter(u=>!u.startsWith("_")));class m1{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(m1.getRawData())),this._data}static isInvisibleCharacter(e){return m1.getData().has(e)}static get codePoints(){return m1.getData()}}m1._data=void 0;class iW{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}iW.INSTANCE=new iW;class Mqe extends ne{constructor(){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class Tqe extends ne{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Mqe);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}}class Nqe{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new Tqe),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function Hve(u,e){typeof u=="string"&&(u=window.matchMedia(u)),u.addEventListener("change",e)}const sk=new Nqe;function Pqe(){return iW.INSTANCE.getZoomFactor()}const s6=navigator.userAgent,T0=s6.indexOf("Firefox")>=0,t3=s6.indexOf("AppleWebKit")>=0,qQ=s6.indexOf("Chrome")>=0,l4=!qQ&&s6.indexOf("Safari")>=0,Vve=!qQ&&!l4&&t3;s6.indexOf("Electron/")>=0;const nae=s6.indexOf("Android")>=0;let OS=!1;if(window.matchMedia){const u=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),e=window.matchMedia("(display-mode: fullscreen)");OS=u.matches,Hve(u,({matches:t})=>{OS&&e.matches||(OS=t)})}function Rqe(){return OS}class $ve{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=Xl(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=Xl(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=Xl(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=Xl(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=Xl(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=Xl(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=Xl(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=Xl(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=Xl(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=Xl(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=Xl(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function Xl(u){return typeof u=="number"?`${u}px`:u}function ku(u){return new $ve(u)}function ea(u,e){u instanceof $ve?(u.setFontFamily(e.getMassagedFontFamily()),u.setFontWeight(e.fontWeight),u.setFontSize(e.fontSize),u.setFontFeatureSettings(e.fontFeatureSettings),u.setFontVariationSettings(e.fontVariationSettings),u.setLineHeight(e.lineHeight),u.setLetterSpacing(e.letterSpacing)):(u.style.fontFamily=e.getMassagedFontFamily(),u.style.fontWeight=e.fontWeight,u.style.fontSize=e.fontSize+"px",u.style.fontFeatureSettings=e.fontFeatureSettings,u.style.fontVariationSettings=e.fontVariationSettings,u.style.lineHeight=e.lineHeight+"px",u.style.letterSpacing=e.letterSpacing+"px")}class Iqe{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class JQ{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");ea(t,this._bareFontInfo),e.appendChild(t);const n=document.createElement("div");ea(n,this._bareFontInfo),n.style.fontWeight="bold",e.appendChild(n);const i=document.createElement("div");ea(i,this._bareFontInfo),i.style.fontStyle="italic",e.appendChild(i);const r=[];for(const a of this._requests){let o;a.type===0&&(o=t),a.type===2&&(o=n),a.type===1&&(o=i),o.appendChild(document.createElement("br"));const s=document.createElement("span");JQ._render(s,a),o.appendChild(s),r.push(s)}this._container=e,this._testElements=r}static _render(e,t){if(t.chr===" "){let n=" ";for(let i=0;i<8;i++)n+=n;e.innerText=n}else{let n=t.chr;for(let i=0;i<8;i++)n+=n;e.textContent=n}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const n of e)n.isTrusted||(t=!0,this._cache.remove(n));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new rW({pixelRatio:sk.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,n,i){const r=new Iqe(e,t);return n.push(r),i==null||i.push(r),r}_actualReadFontInfo(e){const t=[],n=[],i=this._createRequest("n",0,t,n),r=this._createRequest("m",0,t,null),a=this._createRequest(" ",0,t,n),o=this._createRequest("0",0,t,n),s=this._createRequest("1",0,t,n),l=this._createRequest("2",0,t,n),c=this._createRequest("3",0,t,n),d=this._createRequest("4",0,t,n),h=this._createRequest("5",0,t,n),E=this._createRequest("6",0,t,n),m=this._createRequest("7",0,t,n),g=this._createRequest("8",0,t,n),f=this._createRequest("9",0,t,n),p=this._createRequest("→",0,t,n),D=this._createRequest("→",0,t,null),x=this._createRequest("·",0,t,n),b=this._createRequest(String.fromCharCode(11825),0,t,null),k="|/-_ilm%";for(let z=0,N=k.length;z.001){F=!1;break}}let w=!0;return F&&D.width!==S&&(w=!1),D.width>p.width&&(w=!1),new rW({pixelRatio:sk.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,fontVariationSettings:e.fontVariationSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:F,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:w,spaceWidth:a.width,middotWidth:x.width,wsmiddotWidth:b.width,maxDigitWidth:A},!0)}}class iae{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const n=e.getId();this._keys[n]=e,this._values[n]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const aW=new Vqe;var Lc;(function(u){u.serviceIds=new Map,u.DI_TARGET="$di$target",u.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[u.DI_DEPENDENCIES]||[]}u.getServiceDependencies=e})(Lc||(Lc={}));const mt=Ut("instantiationService");function $qe(u,e,t){e[Lc.DI_TARGET]===e?e[Lc.DI_DEPENDENCIES].push({id:u,index:t}):(e[Lc.DI_DEPENDENCIES]=[{id:u,index:t}],e[Lc.DI_TARGET]=e)}function Ut(u){if(Lc.serviceIds.has(u))return Lc.serviceIds.get(u);const e=function(t,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");$qe(e,t,i)};return e.toString=()=>u,Lc.serviceIds.set(u,e),e}const Cu=Ut("codeEditorService"),_n=Ut("modelService"),Vo=Ut("textModelService");var qx=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let ro=class extends ne{constructor(e,t="",n="",i=!0,r){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=r}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return qx(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(e))})}};class Jx extends ne{constructor(){super(...arguments),this._onWillRun=this._register(new Q),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new Q),this.onDidRun=this._onDidRun.event}run(e,t){return qx(this,void 0,void 0,function*(){if(!e.enabled)return;this._onWillRun.fire({action:e});let n;try{yield this.runAction(e,t)}catch(i){n=i}this._onDidRun.fire({action:e,error:n})})}runAction(e,t){return qx(this,void 0,void 0,function*(){yield e.run(t)})}}class Dr{constructor(){this.id=Dr.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const n of e)n.length&&(t.length?t=[...t,new Dr,...n]:t=n);return t}run(){return qx(this,void 0,void 0,function*(){})}}Dr.ID="vs.actions.separator";class Zx{get actions(){return this._actions}constructor(e,t,n,i){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=i,this._actions=n}run(){return qx(this,void 0,void 0,function*(){})}}class IN extends ro{constructor(){super(IN.ID,v("submenu.empty","(empty)"),void 0,!1)}}IN.ID="vs.actions.empty";function tx(u){var e,t;return{id:u.id,label:u.label,class:void 0,enabled:(e=u.enabled)!==null&&e!==void 0?e:!0,checked:(t=u.checked)!==null&&t!==void 0?t:!1,run:(...n)=>qx(this,void 0,void 0,function*(){return u.run(...n)}),tooltip:u.label}}var oW;(function(u){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}u.isThemeColor=e})(oW||(oW={}));var st;(function(u){u.iconNameSegment="[A-Za-z0-9]+",u.iconNameExpression="[A-Za-z0-9-]+",u.iconModifierExpression="~[A-Za-z]+",u.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp(`^(${u.iconNameExpression})(${u.iconModifierExpression})?$`);function t(h){const E=e.exec(h.id);if(!E)return t(we.error);const[,m,g]=E,f=["codicon","codicon-"+m];return g&&f.push("codicon-modifier-"+g.substring(1)),f}u.asClassNameArray=t;function n(h){return t(h).join(" ")}u.asClassName=n;function i(h){return"."+t(h).join(".")}u.asCSSSelector=i;function r(h){return h&&typeof h=="object"&&typeof h.id=="string"&&(typeof h.color>"u"||oW.isThemeColor(h.color))}u.isThemeIcon=r;const a=new RegExp(`^\\$\\((${u.iconNameExpression}(?:${u.iconModifierExpression})?)\\)$`);function o(h){const E=a.exec(h);if(!E)return;const[,m]=E;return{id:m}}u.fromString=o;function s(h){return{id:h}}u.fromId=s;function l(h,E){let m=h.id;const g=m.lastIndexOf("~");return g!==-1&&(m=m.substring(0,g)),E&&(m=`${m}~${E}`),{id:m}}u.modify=l;function c(h){const E=h.id.lastIndexOf("~");if(E!==-1)return h.id.substring(E+1)}u.getModifier=c;function d(h,E){var m,g;return h.id===E.id&&((m=h.color)===null||m===void 0?void 0:m.id)===((g=E.color)===null||g===void 0?void 0:g.id)}u.isEqual=d})(st||(st={}));const ni=Ut("commandService"),ru=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Q,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(u,e){if(!u)throw new Error("invalid command");if(typeof u=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:u,handler:e})}if(u.description){const a=[];for(const s of u.description.args)a.push(s.constraint);const o=u.handler;u.handler=function(s,...l){return yGe(l,a),o(s,...l)}}const{id:t}=u;let n=this._commands.get(t);n||(n=new to,this._commands.set(t,n));const i=n.unshift(u),r=ft(()=>{i();const a=this._commands.get(t);a!=null&&a.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),r}registerCommandAlias(u,e){return ru.registerCommand(u,(t,...n)=>t.get(ni).executeCommand(e,...n))}getCommand(u){const e=this._commands.get(u);if(!(!e||e.isEmpty()))return $t.first(e)}getCommands(){const u=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&u.set(e,t)}return u}};ru.registerCommand("noop",()=>{});function tj(...u){switch(u.length){case 1:return v("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",u[0]);case 2:return v("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",u[0],u[1]);case 3:return v("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",u[0],u[1],u[2]);default:return}}const Kqe=v("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),Wqe=v("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");let vf=class sW{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw MQ(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(tj("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(tj("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(tj("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),n=sW._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(Kqe);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(Wqe);return}const r=this._input.charCodeAt(e);if(t)t=!1;else if(r===47&&!n){e++;break}else r===91?n=!0:r===92?t=!0:r===93&&(n=!1);e++}for(;e=this._input.length}};vf._regexFlags=new Set(["i","g","s","m","y","u"].map(u=>u.charCodeAt(0)));vf._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const Ca=new Map;Ca.set("false",!1);Ca.set("true",!0);Ca.set("isMac",iu);Ca.set("isLinux",Pa);Ca.set("isWindows",na);Ca.set("isWeb",dg);Ca.set("isMacNative",iu&&!dg);Ca.set("isEdge",HGe);Ca.set("isFirefox",OGe);Ca.set("isChrome",dve);Ca.set("isSafari",jGe);const Gqe=Object.prototype.hasOwnProperty,Uqe={regexParsingWithErrorRecovery:!0},qqe=v("contextkey.parser.error.emptyString","Empty context key expression"),Jqe=v("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Zqe=v("contextkey.parser.error.noInAfterNot","'in' after 'not'."),rae=v("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),Yqe=v("contextkey.parser.error.unexpectedToken","Unexpected token"),Qqe=v("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),Xqe=v("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),eJe=v("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");let Kve=class db{constructor(e=Uqe){this._config=e,this._scanner=new vf,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(e===""){this._parsingErrors.push({message:qqe,offset:0,lexeme:"",additionalInfo:Jqe});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const t=this._expr();if(!this._isAtEnd()){const n=this._peek(),i=n.type===17?Qqe:void 0;throw this._parsingErrors.push({message:Yqe,offset:n.offset,lexeme:vf.getLexeme(n),additionalInfo:i}),db._parseError}return t}catch(t){if(t!==db._parseError)throw t;return}}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return e.length===1?e[0]:Ee.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return e.length===1?e[0]:Ee.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),oo.INSTANCE;case 12:return this._advance(),No.INSTANCE;case 0:{this._advance();const t=this._expr();return this._consume(1,rae),t==null?void 0:t.negate()}case 17:return this._advance(),_p.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),Ee.true();case 12:return this._advance(),Ee.false();case 0:{this._advance();const t=this._expr();return this._consume(1,rae),t}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const i=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),i.type!==10)throw this._errExpectedButGot("REGEX",i);const r=i.lexeme,a=r.lastIndexOf("/"),o=a===r.length-1?void 0:this._removeFlagsGY(r.substring(a+1));let s;try{s=new RegExp(r.substring(1,a),o)}catch{throw this._errExpectedButGot("REGEX",i)}return lk.create(t,s)}switch(i.type){case 10:case 19:{const r=[i.lexeme];this._advance();let a=this._peek(),o=0;for(let h=0;h=0){const l=r.slice(o+1,s),c=r[s+1]==="i"?"i":"";try{a=new RegExp(l,c)}catch{throw this._errExpectedButGot("REGEX",i)}}}if(a===null)throw this._errExpectedButGot("REGEX",i);return lk.create(t,a)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Zqe);const i=this._value();return Ee.notIn(t,i)}switch(this._peek().type){case 3:{this._advance();const i=this._value();if(this._previous().type===18)return Ee.equals(t,i);switch(i){case"true":return Ee.has(t);case"false":return Ee.not(t);default:return Ee.equals(t,i)}}case 4:{this._advance();const i=this._value();if(this._previous().type===18)return Ee.notEquals(t,i);switch(i){case"true":return Ee.not(t);case"false":return Ee.has(t);default:return Ee.notEquals(t,i)}}case 5:return this._advance(),WN.create(t,this._value());case 6:return this._advance(),GN.create(t,this._value());case 7:return this._advance(),$N.create(t,this._value());case 8:return this._advance(),KN.create(t,this._value());case 13:return this._advance(),Ee.in(t,this._value());default:return Ee.has(t)}}case 20:throw this._parsingErrors.push({message:Xqe,offset:e.offset,lexeme:"",additionalInfo:eJe}),db._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){const i=v("contextkey.parser.error.expectedButGot",`Expected: {0} -Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:a,additionalInfo:n}),db._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};Kve._parseError=new Error;class Ee{static false(){return oo.INSTANCE}static true(){return No.INSTANCE}static has(e){return Ap.create(e)}static equals(e,t){return l6.create(e,t)}static notEquals(e,t){return HN.create(e,t)}static regex(e,t){return lk.create(e,t)}static in(e,t){return ON.create(e,t)}static notIn(e,t){return jN.create(e,t)}static not(e){return _p.create(e)}static and(...e){return Pf.create(e,null,!0)}static or(...e){return Bh.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}}Ee._parser=new Kve({regexParsingWithErrorRecovery:!1});function tJe(u,e){const t=u?u.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function Jb(u,e){return u.cmp(e)}class oo{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return No.INSTANCE}}oo.INSTANCE=new oo;class No{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return oo.INSTANCE}}No.INSTANCE=new No;class Ap{static create(e,t=null){const n=Ca.get(e);return typeof n=="boolean"?n?No.INSTANCE:oo.INSTANCE:new Ap(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:Gve(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Ca.get(this.key);return typeof e=="boolean"?e?No.INSTANCE:oo.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=_p.create(this.key,this)),this.negated}}class l6{static create(e,t,n=null){if(typeof t=="boolean")return t?Ap.create(e,n):_p.create(e,n);const i=Ca.get(e);return typeof i=="boolean"?t===(i?"true":"false")?No.INSTANCE:oo.INSTANCE:new l6(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ca.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?No.INSTANCE:oo.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=HN.create(this.key,this.value,this)),this.negated}}class ON{static create(e,t){return new ON(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?Gqe.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=jN.create(this.key,this.valueKey)),this.negated}}class jN{static create(e,t){return new jN(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=ON.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class HN{static create(e,t,n=null){if(typeof t=="boolean")return t?_p.create(e,n):Ap.create(e,n);const i=Ca.get(e);return typeof i=="boolean"?t===(i?"true":"false")?oo.INSTANCE:No.INSTANCE:new HN(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ca.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?oo.INSTANCE:No.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l6.create(this.key,this.value,this)),this.negated}}class _p{static create(e,t=null){const n=Ca.get(e);return typeof n=="boolean"?n?oo.INSTANCE:No.INSTANCE:new _p(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:Gve(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Ca.get(this.key);return typeof e=="boolean"?e?oo.INSTANCE:No.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ap.create(this.key,this)),this.negated}}function VN(u,e){if(typeof u=="string"){const t=parseFloat(u);isNaN(t)||(u=t)}return typeof u=="string"||typeof u=="number"?e(u):oo.INSTANCE}class $N{static create(e,t,n=null){return VN(t,i=>new $N(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=GN.create(this.key,this.value,this)),this.negated}}class KN{static create(e,t,n=null){return VN(t,i=>new KN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=WN.create(this.key,this.value,this)),this.negated}}class WN{static create(e,t,n=null){return VN(t,i=>new WN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new GN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$N.create(this.key,this.value,this)),this.negated}}class lk{static create(e,t){return new lk(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZQ.create(this)),this.negated}}class ZQ{static create(e){return new ZQ(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function Wve(u){let e=null;for(let t=0,n=u.length;te.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const a=i[i.length-1];if(a.type!==9)break;i.pop();const o=i.pop(),s=i.length===0,l=Bh.create(a.expr.map(c=>Pf.create([c,o],null,n)),null,s);l&&(i.push(l),i.sort(Jb))}if(i.length===1)return i[0];if(n){for(let a=0;ae.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=Bh.create(e,this,!0)}return this.negated}}class Bh{static create(e,t,n){return Bh._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),n=e.shift(),i=[];for(const r of oae(t))for(const a of oae(n))i.push(Pf.create([r,a],null,!1));e.unshift(Bh.create(i,null,!1))}this.negated=Bh.create(e,this,!0)}return this.negated}}class Pe extends Ap{static all(){return Pe._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?Pe._info.push(Object.assign(Object.assign({},n),{key:e})):n!==!0&&Pe._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return l6.create(this.key,e)}}Pe._info=[];const pt=Ut("contextKeyService");function Gve(u,e){return ue?1:0}function Sp(u,e,t,n){return ut?1:en?1:0}function lW(u,e){if(u.type===0||e.type===1)return!0;if(u.type===9)return e.type===9?aae(u.expr,e.expr):!1;if(e.type===9){for(const t of e.expr)if(lW(u,t))return!0;return!1}if(u.type===6){if(e.type===6)return aae(e.expr,u.expr);for(const t of u.expr)if(lW(t,e))return!0;return!1}return u.equals(e)}function aae(u,e){let t=0,n=0;for(;t>>0,n=(u&4294901760)>>>16;return n!==0?new uj([G7(t,e),G7(n,e)]):new uj([G7(t,e)])}else{const t=[];for(let n=0;n{o(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(aJe)),this._cachedMergedKeybindings.slice(0)}}const Po=new YQ,rJe={EditorModes:"platform.keybindingsRegistry"};jn.add(rJe.EditorModes,Po);function aJe(u,e){if(u.weight1!==e.weight1)return u.weight1-e.weight1;if(u.command&&e.command){if(u.commande.command)return 1}return u.weight2-e.weight2}var oJe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sae=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sJe=globalThis&&globalThis.__rest||function(u,e){var t={};for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(u);it===e}}wh._all=new Map;const Lr=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new VUe({merge:wh.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(u){return this._commands.set(u.id,u),this._onDidChangeMenu.fire(wh.for(K.CommandPalette)),ft(()=>{this._commands.delete(u.id)&&this._onDidChangeMenu.fire(wh.for(K.CommandPalette))})}getCommand(u){return this._commands.get(u)}getCommands(){const u=new Map;return this._commands.forEach((e,t)=>u.set(t,e)),u}appendMenuItem(u,e){let t=this._menuItems.get(u);t||(t=new to,this._menuItems.set(u,t));const n=t.push(e);return this._onDidChangeMenu.fire(wh.for(u)),ft(()=>{n(),this._onDidChangeMenu.fire(wh.for(u))})}appendMenuItems(u){const e=new pe;for(const{id:t,item:n}of u)e.add(this.appendMenuItem(t,n));return e}getMenuItems(u){let e;return this._menuItems.has(u)?e=[...this._menuItems.get(u)]:e=[],u===K.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(u){const e=new Set;for(const t of u)s5(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||u.push({command:t})})}};class dk extends Zx{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}}let zl=jS=class{static label(e,t){return t!=null&&t.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,i,r,a){var o,s;this.hideActions=i,this._commandService=a,this.id=e.id,this.label=jS.label(e,n),this.tooltip=(s=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0;let l;if(e.toggled){const c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&st.isThemeIcon(c.icon)&&(l=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}l||(l=st.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new jS(t,void 0,n,i,r,a):void 0,this._options=n,this.class=l&&st.asClassName(l)}run(...e){var t,n;let i=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(i=[...i,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(i=[...i,...e]),this._commandService.executeCommand(this.id,...i)}};zl=jS=oJe([sae(4,pt),sae(5,ni)],zl);class u0{constructor(e){this.desc=e}}function gn(u){const e=new pe,t=new u,n=t.desc,{f1:i,menu:r,keybinding:a,description:o}=n,s=sJe(n,["f1","menu","keybinding","description"]);if(e.add(ru.registerCommand({id:s.id,handler:(l,...c)=>t.run(l,...c),description:o})),Array.isArray(r))for(const l of r)e.add(Lr.appendMenuItem(l.id,Object.assign({command:Object.assign(Object.assign({},s),{precondition:l.precondition===null?void 0:s.precondition})},l)));else r&&e.add(Lr.appendMenuItem(r.id,Object.assign({command:Object.assign(Object.assign({},s),{precondition:r.precondition===null?void 0:s.precondition})},r)));if(i&&(e.add(Lr.appendMenuItem(K.CommandPalette,{command:s,when:s.precondition})),e.add(Lr.addCommand(s))),Array.isArray(a))for(const l of a)e.add(Po.registerKeybindingRule(Object.assign(Object.assign({},l),{id:s.id,when:s.precondition?Ee.and(s.precondition,l.when):l.when})));else a&&e.add(Po.registerKeybindingRule(Object.assign(Object.assign({},a),{id:s.id,when:s.precondition?Ee.and(s.precondition,a.when):a.when})));return e}const n0=Ut("telemetryService"),i0=Ut("logService");var qr;(function(u){u[u.Off=0]="Off",u[u.Trace=1]="Trace",u[u.Debug=2]="Debug",u[u.Info=3]="Info",u[u.Warning=4]="Warning",u[u.Error=5]="Error"})(qr||(qr={}));const qve=qr.Info;class Jve extends ne{constructor(){super(...arguments),this.level=qve,this._onDidChangeLogLevel=this._register(new Q),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==qr.Off&&this.level<=e}}class cJe extends Jve{constructor(e=qve,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(qr.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(qr.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(qr.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(qr.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(qr.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class dJe extends Jve{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const n of this.loggers)n.trace(e,...t)}debug(e,...t){for(const n of this.loggers)n.debug(e,...t)}info(e,...t){for(const n of this.loggers)n.info(e,...t)}warn(e,...t){for(const n of this.loggers)n.warn(e,...t)}error(e,...t){for(const n of this.loggers)n.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}function hJe(u){switch(u){case qr.Trace:return"trace";case qr.Debug:return"debug";case qr.Info:return"info";case qr.Warning:return"warn";case qr.Error:return"error";case qr.Off:return"off"}}new Pe("logLevel",hJe(qr.Info));const QQ={clipboard:{writeText:Oc||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Oc||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>Oc||Rqe()?0:navigator.keyboard||l4?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function EJe(u){if(u.charCode){const t=String.fromCharCode(u.charCode).toUpperCase();return Sh.fromString(t)}const e=u.keyCode;if(e===3)return 7;if(M0)switch(e){case 59:return 85;case 60:if(Pa)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(iu)return 57;break}else if(t3){if(iu&&e===93)return 57;if(!iu&&e===92)return 57}return Cve[e]||0}const mJe=iu?256:2048,gJe=512,fJe=1024,pJe=iu?2048:256;class ln{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=EJe(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=mJe),this.altKey&&(t|=gJe),this.shiftKey&&(t|=fJe),this.metaKey&&(t|=pJe),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new c4(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let lae=!1,tC=null;function DJe(u){if(!u.parent||u.parent===u)return null;try{const e=u.location,t=u.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return lae=!0,null}catch{return lae=!0,null}return u.parent}class xJe{static getSameOriginWindowChain(){if(!tC){tC=[];let e=window,t;do t=DJe(e),t?tC.push({window:e,iframeElement:e.frameElement||null}):tC.push({window:e,iframeElement:null}),e=t;while(e)}return tC.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,i=0;const r=this.getSameOriginWindowChain();for(const a of r){if(n+=a.window.scrollY,i+=a.window.scrollX,a.window===t||!a.iframeElement)break;const o=a.iframeElement.getBoundingClientRect();n+=o.top,i+=o.left}return{top:n,left:i}}}class D0{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=e.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const t=xJe.getPositionOfChildWindowRelativeToAncestorWindow(window,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class B3{constructor(e,t=0,n=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){const i=e,r=e;if(typeof i.wheelDeltaY<"u")this.deltaY=i.wheelDeltaY/120;else if(typeof r.VERTICAL_AXIS<"u"&&r.axis===r.VERTICAL_AXIS)this.deltaY=-r.detail/3;else if(e.type==="wheel"){const a=e;a.deltaMode===a.DOM_DELTA_LINE?M0&&!iu?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof i.wheelDeltaX<"u")l4&&na?this.deltaX=-(i.wheelDeltaX/120):this.deltaX=i.wheelDeltaX/120;else if(typeof r.HORIZONTAL_AXIS<"u"&&r.axis===r.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const a=e;a.deltaMode===a.DOM_DELTA_LINE?M0&&!iu?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)===null||e===void 0||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)===null||e===void 0||e.stopPropagation()}}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:Zve,setPrototypeOf:cae,isFrozen:vJe,getPrototypeOf:CJe,getOwnPropertyDescriptor:bJe}=Object;let{freeze:ms,seal:Yc,create:kJe}=Object,{apply:dW,construct:hW}=typeof Reflect<"u"&&Reflect;dW||(dW=function(e,t,n){return e.apply(t,n)});ms||(ms=function(e){return e});Yc||(Yc=function(e){return e});hW||(hW=function(e,t){return new e(...t)});const FJe=Ml(Array.prototype.forEach),dae=Ml(Array.prototype.pop),uC=Ml(Array.prototype.push),HS=Ml(String.prototype.toLowerCase),ij=Ml(String.prototype.toString),yJe=Ml(String.prototype.match),ec=Ml(String.prototype.replace),AJe=Ml(String.prototype.indexOf),_Je=Ml(String.prototype.trim),s0=Ml(RegExp.prototype.test),nC=SJe(TypeError);function Ml(u){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i/gm),MJe=Yc(/\${[\w\W]*}/gm),TJe=Yc(/^data-[\-\w.\u00B7-\uFFFF]/),NJe=Yc(/^aria-[\-\w]+$/),Yve=Yc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PJe=Yc(/^(?:\w+script|data):/i),RJe=Yc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qve=Yc(/^html$/i);var fae=Object.freeze({__proto__:null,MUSTACHE_EXPR:LJe,ERB_EXPR:zJe,TMPLIT_EXPR:MJe,DATA_ATTR:TJe,ARIA_ATTR:NJe,IS_ALLOWED_URI:Yve,IS_SCRIPT_OR_DATA:PJe,ATTR_WHITESPACE:RJe,DOCTYPE_NAME:Qve});const IJe=()=>typeof window>"u"?null:window,OJe=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function Xve(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IJe();const e=Xe=>Xve(Xe);if(e.version="3.0.5",e.removed=[],!u||!u.document||u.document.nodeType!==9)return e.isSupported=!1,e;const t=u.document,n=t.currentScript;let{document:i}=u;const{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:s,NodeFilter:l,NamedNodeMap:c=u.NamedNodeMap||u.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:E}=u,m=s.prototype,g=U7(m,"cloneNode"),f=U7(m,"nextSibling"),p=U7(m,"childNodes"),D=U7(m,"parentNode");if(typeof a=="function"){const Xe=i.createElement("template");Xe.content&&Xe.content.ownerDocument&&(i=Xe.content.ownerDocument)}let x,b="";const{implementation:k,createNodeIterator:A,createDocumentFragment:F,getElementsByTagName:S}=i,{importNode:w}=t;let z={};e.isSupported=typeof Zve=="function"&&typeof D=="function"&&k&&k.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:O,TMPLIT_EXPR:y,DATA_ATTR:_,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:T,ATTR_WHITESPACE:R}=fae;let{IS_ALLOWED_URI:I}=fae,H=null;const V=Nu({},[...hae,...rj,...aj,...oj,...Eae]);let U=null;const J=Nu({},[...mae,...sj,...gae,...q7]);let Y=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,re=null,ge=!0,_e=!0,Ve=!1,Ue=!0,qe=!1,Se=!1,de=!1,he=!1,Be=!1,je=!1,bt=!1,qt=!0,ou=!1;const Vt="user-content-";let oe=!0,se=!1,ie={},$=null;const Z=Nu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const te=Nu({},["audio","video","img","source","image","track"]);let fe=null;const Le=Nu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",it="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let xt=ct,Jt=!1,Ze=null;const Ie=Nu({},[Je,it,ct],ij);let Tu;const gu=["application/xhtml+xml","text/html"],fn="text/html";let Wt,Ln=null;const Vu=i.createElement("form"),un=function(le){return le instanceof RegExp||le instanceof Function},zn=function(le){if(!(Ln&&Ln===le)){if((!le||typeof le!="object")&&(le={}),le=sD(le),Tu=gu.indexOf(le.PARSER_MEDIA_TYPE)===-1?Tu=fn:Tu=le.PARSER_MEDIA_TYPE,Wt=Tu==="application/xhtml+xml"?ij:HS,H="ALLOWED_TAGS"in le?Nu({},le.ALLOWED_TAGS,Wt):V,U="ALLOWED_ATTR"in le?Nu({},le.ALLOWED_ATTR,Wt):J,Ze="ALLOWED_NAMESPACES"in le?Nu({},le.ALLOWED_NAMESPACES,ij):Ie,fe="ADD_URI_SAFE_ATTR"in le?Nu(sD(Le),le.ADD_URI_SAFE_ATTR,Wt):Le,ue="ADD_DATA_URI_TAGS"in le?Nu(sD(te),le.ADD_DATA_URI_TAGS,Wt):te,$="FORBID_CONTENTS"in le?Nu({},le.FORBID_CONTENTS,Wt):Z,X="FORBID_TAGS"in le?Nu({},le.FORBID_TAGS,Wt):{},re="FORBID_ATTR"in le?Nu({},le.FORBID_ATTR,Wt):{},ie="USE_PROFILES"in le?le.USE_PROFILES:!1,ge=le.ALLOW_ARIA_ATTR!==!1,_e=le.ALLOW_DATA_ATTR!==!1,Ve=le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=le.SAFE_FOR_TEMPLATES||!1,Se=le.WHOLE_DOCUMENT||!1,Be=le.RETURN_DOM||!1,je=le.RETURN_DOM_FRAGMENT||!1,bt=le.RETURN_TRUSTED_TYPE||!1,he=le.FORCE_BODY||!1,qt=le.SANITIZE_DOM!==!1,ou=le.SANITIZE_NAMED_PROPS||!1,oe=le.KEEP_CONTENT!==!1,se=le.IN_PLACE||!1,I=le.ALLOWED_URI_REGEXP||Yve,xt=le.NAMESPACE||ct,Y=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&un(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&un(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(_e=!1),je&&(Be=!0),ie&&(H=Nu({},[...Eae]),U=[],ie.html===!0&&(Nu(H,hae),Nu(U,mae)),ie.svg===!0&&(Nu(H,rj),Nu(U,sj),Nu(U,q7)),ie.svgFilters===!0&&(Nu(H,aj),Nu(U,sj),Nu(U,q7)),ie.mathMl===!0&&(Nu(H,oj),Nu(U,gae),Nu(U,q7))),le.ADD_TAGS&&(H===V&&(H=sD(H)),Nu(H,le.ADD_TAGS,Wt)),le.ADD_ATTR&&(U===J&&(U=sD(U)),Nu(U,le.ADD_ATTR,Wt)),le.ADD_URI_SAFE_ATTR&&Nu(fe,le.ADD_URI_SAFE_ATTR,Wt),le.FORBID_CONTENTS&&($===Z&&($=sD($)),Nu($,le.FORBID_CONTENTS,Wt)),oe&&(H["#text"]=!0),Se&&Nu(H,["html","head","body"]),H.table&&(Nu(H,["tbody"]),delete X.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw nC('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nC('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=le.TRUSTED_TYPES_POLICY,b=x.createHTML("")}else x===void 0&&(x=OJe(E,n)),x!==null&&typeof b=="string"&&(b=x.createHTML(""));ms&&ms(le),Ln=le}},bn=Nu({},["mi","mo","mn","ms","mtext"]),$u=Nu({},["foreignobject","desc","title","annotation-xml"]),wu=Nu({},["title","style","font","a","script"]),Ou=Nu({},rj);Nu(Ou,aj),Nu(Ou,BJe);const ki=Nu({},oj);Nu(ki,wJe);const $i=function(le){let Ge=D(le);(!Ge||!Ge.tagName)&&(Ge={namespaceURI:xt,tagName:"template"});const Et=HS(le.tagName),Kn=HS(Ge.tagName);return Ze[le.namespaceURI]?le.namespaceURI===it?Ge.namespaceURI===ct?Et==="svg":Ge.namespaceURI===Je?Et==="svg"&&(Kn==="annotation-xml"||bn[Kn]):!!Ou[Et]:le.namespaceURI===Je?Ge.namespaceURI===ct?Et==="math":Ge.namespaceURI===it?Et==="math"&&$u[Kn]:!!ki[Et]:le.namespaceURI===ct?Ge.namespaceURI===it&&!$u[Kn]||Ge.namespaceURI===Je&&!bn[Kn]?!1:!ki[Et]&&(wu[Et]||!Ou[Et]):!!(Tu==="application/xhtml+xml"&&Ze[le.namespaceURI]):!1},Vn=function(le){uC(e.removed,{element:le});try{le.parentNode.removeChild(le)}catch{le.remove()}},Ni=function(le,Ge){try{uC(e.removed,{attribute:Ge.getAttributeNode(le),from:Ge})}catch{uC(e.removed,{attribute:null,from:Ge})}if(Ge.removeAttribute(le),le==="is"&&!U[le])if(Be||je)try{Vn(Ge)}catch{}else try{Ge.setAttribute(le,"")}catch{}},ka=function(le){let Ge,Et;if(he)le=""+le;else{const Wn=yJe(le,/^[\r\n\t ]+/);Et=Wn&&Wn[0]}Tu==="application/xhtml+xml"&&xt===ct&&(le=''+le+"");const Kn=x?x.createHTML(le):le;if(xt===ct)try{Ge=new h().parseFromString(Kn,Tu)}catch{}if(!Ge||!Ge.documentElement){Ge=k.createDocument(xt,"template",null);try{Ge.documentElement.innerHTML=Jt?b:Kn}catch{}}const Vr=Ge.body||Ge.documentElement;return le&&Et&&Vr.insertBefore(i.createTextNode(Et),Vr.childNodes[0]||null),xt===ct?S.call(Ge,Se?"html":"body")[0]:Se?Ge.documentElement:Vr},fo=function(le){return A.call(le.ownerDocument||le,le,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},eh=function(le){return le instanceof d&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof c)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},Va=function(le){return typeof o=="object"?le instanceof o:le&&typeof le=="object"&&typeof le.nodeType=="number"&&typeof le.nodeName=="string"},Hr=function(le,Ge,Et){z[le]&&FJe(z[le],Kn=>{Kn.call(e,Ge,Et,Ln)})},Cd=function(le){let Ge;if(Hr("beforeSanitizeElements",le,null),eh(le))return Vn(le),!0;const Et=Wt(le.nodeName);if(Hr("uponSanitizeElement",le,{tagName:Et,allowedTags:H}),le.hasChildNodes()&&!Va(le.firstElementChild)&&(!Va(le.content)||!Va(le.content.firstElementChild))&&s0(/<[/\w]/g,le.innerHTML)&&s0(/<[/\w]/g,le.textContent))return Vn(le),!0;if(!H[Et]||X[Et]){if(!X[Et]&&Mt(Et)&&(Y.tagNameCheck instanceof RegExp&&s0(Y.tagNameCheck,Et)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Et)))return!1;if(oe&&!$[Et]){const Kn=D(le)||le.parentNode,Vr=p(le)||le.childNodes;if(Vr&&Kn){const Wn=Vr.length;for(let Mn=Wn-1;Mn>=0;--Mn)Kn.insertBefore(g(Vr[Mn],!0),f(le))}}return Vn(le),!0}return le instanceof s&&!$i(le)||(Et==="noscript"||Et==="noembed"||Et==="noframes")&&s0(/<\/no(script|embed|frames)/i,le.innerHTML)?(Vn(le),!0):(qe&&le.nodeType===3&&(Ge=le.textContent,Ge=ec(Ge,N," "),Ge=ec(Ge,O," "),Ge=ec(Ge,y," "),le.textContent!==Ge&&(uC(e.removed,{element:le.cloneNode()}),le.textContent=Ge)),Hr("afterSanitizeElements",le,null),!1)},Og=function(le,Ge,Et){if(qt&&(Ge==="id"||Ge==="name")&&(Et in i||Et in Vu))return!1;if(!(_e&&!re[Ge]&&s0(_,Ge))){if(!(ge&&s0(L,Ge))){if(!U[Ge]||re[Ge]){if(!(Mt(le)&&(Y.tagNameCheck instanceof RegExp&&s0(Y.tagNameCheck,le)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(le))&&(Y.attributeNameCheck instanceof RegExp&&s0(Y.attributeNameCheck,Ge)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(Ge))||Ge==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&s0(Y.tagNameCheck,Et)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Et))))return!1}else if(!fe[Ge]){if(!s0(I,ec(Et,R,""))){if(!((Ge==="src"||Ge==="xlink:href"||Ge==="href")&&le!=="script"&&AJe(Et,"data:")===0&&ue[le])){if(!(Ve&&!s0(T,ec(Et,R,"")))){if(Et)return!1}}}}}}return!0},Mt=function(le){return le.indexOf("-")>0},$n=function(le){let Ge,Et,Kn,Vr;Hr("beforeSanitizeAttributes",le,null);const{attributes:Wn}=le;if(!Wn)return;const Mn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};for(Vr=Wn.length;Vr--;){Ge=Wn[Vr];const{name:a0,namespaceURI:P4}=Ge;if(Et=a0==="value"?Ge.value:_Je(Ge.value),Kn=Wt(a0),Mn.attrName=Kn,Mn.attrValue=Et,Mn.keepAttr=!0,Mn.forceKeepAttr=void 0,Hr("uponSanitizeAttribute",le,Mn),Et=Mn.attrValue,Mn.forceKeepAttr||(Ni(a0,le),!Mn.keepAttr))continue;if(!Ue&&s0(/\/>/i,Et)){Ni(a0,le);continue}qe&&(Et=ec(Et,N," "),Et=ec(Et,O," "),Et=ec(Et,y," "));const P7=Wt(le.nodeName);if(Og(P7,Kn,Et)){if(ou&&(Kn==="id"||Kn==="name")&&(Ni(a0,le),Et=Vt+Et),x&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!P4)switch(E.getAttributeType(P7,Kn)){case"TrustedHTML":{Et=x.createHTML(Et);break}case"TrustedScriptURL":{Et=x.createScriptURL(Et);break}}try{P4?le.setAttributeNS(P4,a0,Et):le.setAttribute(a0,Et),dae(e.removed)}catch{}}}Hr("afterSanitizeAttributes",le,null)},ia=function Xe(le){let Ge;const Et=fo(le);for(Hr("beforeSanitizeShadowDOM",le,null);Ge=Et.nextNode();)Hr("uponSanitizeShadowNode",Ge,null),!Cd(Ge)&&(Ge.content instanceof r&&Xe(Ge.content),$n(Ge));Hr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(Xe){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ge,Et,Kn,Vr;if(Jt=!Xe,Jt&&(Xe=""),typeof Xe!="string"&&!Va(Xe))if(typeof Xe.toString=="function"){if(Xe=Xe.toString(),typeof Xe!="string")throw nC("dirty is not a string, aborting")}else throw nC("toString is not a function");if(!e.isSupported)return Xe;if(de||zn(le),e.removed=[],typeof Xe=="string"&&(se=!1),se){if(Xe.nodeName){const a0=Wt(Xe.nodeName);if(!H[a0]||X[a0])throw nC("root node is forbidden and cannot be sanitized in-place")}}else if(Xe instanceof o)Ge=ka(""),Et=Ge.ownerDocument.importNode(Xe,!0),Et.nodeType===1&&Et.nodeName==="BODY"||Et.nodeName==="HTML"?Ge=Et:Ge.appendChild(Et);else{if(!Be&&!qe&&!Se&&Xe.indexOf("<")===-1)return x&&bt?x.createHTML(Xe):Xe;if(Ge=ka(Xe),!Ge)return Be?null:bt?b:""}Ge&&he&&Vn(Ge.firstChild);const Wn=fo(se?Xe:Ge);for(;Kn=Wn.nextNode();)Cd(Kn)||(Kn.content instanceof r&&ia(Kn.content),$n(Kn));if(se)return Xe;if(Be){if(je)for(Vr=F.call(Ge.ownerDocument);Ge.firstChild;)Vr.appendChild(Ge.firstChild);else Vr=Ge;return(U.shadowroot||U.shadowrootmode)&&(Vr=w.call(t,Vr,!0)),Vr}let Mn=Se?Ge.outerHTML:Ge.innerHTML;return Se&&H["!doctype"]&&Ge.ownerDocument&&Ge.ownerDocument.doctype&&Ge.ownerDocument.doctype.name&&s0(Qve,Ge.ownerDocument.doctype.name)&&(Mn=" -`+Mn),qe&&(Mn=ec(Mn,N," "),Mn=ec(Mn,O," "),Mn=ec(Mn,y," ")),x&&bt?x.createHTML(Mn):Mn},e.setConfig=function(Xe){zn(Xe),de=!0},e.clearConfig=function(){Ln=null,de=!1},e.isValidAttribute=function(Xe,le,Ge){Ln||zn({});const Et=Wt(Xe),Kn=Wt(le);return Og(Et,Kn,Ge)},e.addHook=function(Xe,le){typeof le=="function"&&(z[Xe]=z[Xe]||[],uC(z[Xe],le))},e.removeHook=function(Xe){if(z[Xe])return dae(z[Xe])},e.removeHooks=function(Xe){z[Xe]&&(z[Xe]=[])},e.removeAllHooks=function(){z={}},e}var K1=Xve();K1.version;K1.isSupported;const e6e=K1.sanitize;K1.setConfig;K1.clearConfig;K1.isValidAttribute;const t6e=K1.addHook,u6e=K1.removeHook;K1.removeHooks;K1.removeAllHooks;var Ot;(function(u){u.inMemory="inmemory",u.vscode="vscode",u.internal="private",u.walkThrough="walkThrough",u.walkThroughSnippet="walkThroughSnippet",u.http="http",u.https="https",u.file="file",u.mailto="mailto",u.untitled="untitled",u.data="data",u.command="command",u.vscodeRemote="vscode-remote",u.vscodeRemoteResource="vscode-remote-resource",u.vscodeManagedRemoteResource="vscode-managed-remote-resource",u.vscodeUserData="vscode-userdata",u.vscodeCustomEditor="vscode-custom-editor",u.vscodeNotebookCell="vscode-notebook-cell",u.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",u.vscodeNotebookCellOutput="vscode-notebook-cell-output",u.vscodeInteractiveInput="vscode-interactive-input",u.vscodeSettings="vscode-settings",u.vscodeWorkspaceTrust="vscode-workspace-trust",u.vscodeTerminal="vscode-terminal",u.vscodeChatSesssion="vscode-chat-editor",u.webviewPanel="webview-panel",u.vscodeWebview="vscode-webview",u.extension="extension",u.vscodeFileResource="vscode-file",u.tmp="tmp",u.vsls="vsls",u.vscodeSourceControl="vscode-scm"})(Ot||(Ot={}));const jJe="tkn";class HJe{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${Ot.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(o){return zt(o),e}const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const i=this._ports[t],r=this._connectionTokens[t];let a=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(a+=`&${jJe}=${encodeURIComponent(r)}`),dt.from({scheme:dg?this._preferredWebSchema:Ot.vscodeRemoteResource,authority:`${n}:${i}`,path:this._remoteResourcesPath,query:a})}}const n6e=new HJe;class hk{uriToBrowserUri(e){return e.scheme===Ot.vscodeRemote?n6e.rewrite(e):e.scheme===Ot.file&&(Oc||NGe&&kl.origin===`${Ot.vscodeFileResource}://${hk.FALLBACK_AUTHORITY}`)?e.with({scheme:Ot.vscodeFileResource,authority:e.authority||hk.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}hk.FALLBACK_AUTHORITY="vscode-app";const i6e=new hk;var pae;(function(u){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);u.CoopAndCoep=Object.freeze(e.get("3"));const t="vscode-coi";function n(r){let a;typeof r=="string"?a=new URL(r).searchParams:r instanceof URL?a=r.searchParams:dt.isUri(r)&&(a=new URL(r.toString(!0)).searchParams);const o=a==null?void 0:a.get(t);if(o)return e.get(o)}u.getHeadersFromQuery=n;function i(r,a,o){if(!globalThis.crossOriginIsolated)return;const s=a&&o?"3":o?"2":"1";r instanceof URLSearchParams?r.set(t,s):r[t]=s}u.addSearchParam=i})(pae||(pae={}));const{registerWindow:w$n,getWindows:VJe,onDidCreateWindow:L$n}=function(){const u=[],e=new Q;return{onDidCreateWindow:e.event,registerWindow(t){u.push(t);const n=new pe;return n.add(ft(()=>{const i=u.indexOf(t);i!==-1&&u.splice(i,1)})),e.fire({window:t,disposableStore:n}),n},getWindows(){return u}}}();function Nr(u){for(;u.firstChild;)u.firstChild.remove()}function XQ(u){var e;return(e=u==null?void 0:u.isConnected)!==null&&e!==void 0?e:!1}class $Je{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function ce(u,e,t,n){return new $Je(u,e,t,n)}function r6e(u){return function(e){return u(new D0(e))}}function KJe(u){return function(e){return u(new ln(e))}}const xi=function(e,t,n,i){let r=n;return t==="click"||t==="mousedown"?r=r6e(n):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=KJe(n)),ce(e,t,r,i)},WJe=function(e,t,n){const i=r6e(t);return GJe(e,i,n)};function GJe(u,e,t){return ce(u,Zc&&QQ.pointerEvents?Me.POINTER_DOWN:Me.MOUSE_DOWN,e,t)}let CB,T0;class lj{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){zt(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let u=[],e=null,t=!1,n=!1;const i=()=>{for(t=!1,e=u,u=[],n=!0;e.length>0;)e.sort(lj.sort),e.shift().execute();n=!1};T0=(r,a=0)=>{const o=new lj(r,a);return u.push(o),t||(t=!0,requestAnimationFrame(i)),o},CB=(r,a)=>{if(n){const o=new lj(r,a);return e.push(o),o}else return T0(r,a)}})();function qN(u){return u.ownerDocument.defaultView.getComputedStyle(u,null)}function c6(u){var e;const t=u.ownerDocument,n=(e=t.defaultView)===null||e===void 0?void 0:e.window;if(u!==t.body)return new pu(u.clientWidth,u.clientHeight);if(Zc&&(n!=null&&n.visualViewport))return new pu(n.visualViewport.width,n.visualViewport.height);if(n!=null&&n.innerWidth&&n.innerHeight)return new pu(n.innerWidth,n.innerHeight);if(t.body&&t.body.clientWidth&&t.body.clientHeight)return new pu(t.body.clientWidth,t.body.clientHeight);if(t.documentElement&&t.documentElement.clientWidth&&t.documentElement.clientHeight)return new pu(t.documentElement.clientWidth,t.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class oi{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){const i=qN(e),r=i?i.getPropertyValue(t):"0";return oi.convertToPixels(e,r)}static getBorderLeftWidth(e){return oi.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return oi.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return oi.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return oi.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return oi.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return oi.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return oi.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return oi.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return oi.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return oi.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return oi.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return oi.getDimension(e,"margin-bottom","marginBottom")}}class pu{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new pu(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof pu?e:new pu(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}pu.None=new pu(0,0);function a6e(u){let e=u.offsetParent,t=u.offsetTop,n=u.offsetLeft;for(;(u=u.parentNode)!==null&&u!==u.ownerDocument.body&&u!==u.ownerDocument.documentElement;){t-=u.scrollTop;const i=o6e(u)?null:qN(u);i&&(n-=i.direction!=="rtl"?u.scrollLeft:-u.scrollLeft),u===e&&(n+=oi.getBorderLeftWidth(u),t+=oi.getBorderTopWidth(u),t+=u.offsetTop,n+=u.offsetLeft,e=u.offsetParent)}return{left:n,top:t}}function UJe(u,e,t){typeof e=="number"&&(u.style.width=`${e}px`),typeof t=="number"&&(u.style.height=`${t}px`)}function ji(u){var e,t,n,i;const r=u.getBoundingClientRect();return{left:r.left+((t=(e=u.ownerDocument.defaultView)===null||e===void 0?void 0:e.scrollX)!==null&&t!==void 0?t:0),top:r.top+((i=(n=u.ownerDocument.defaultView)===null||n===void 0?void 0:n.scrollY)!==null&&i!==void 0?i:0),width:r.width,height:r.height}}function qJe(u){let e=u,t=1;do{const n=qN(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function ko(u){const e=oi.getMarginLeft(u)+oi.getMarginRight(u);return u.offsetWidth+e}function cj(u){const e=oi.getBorderLeftWidth(u)+oi.getBorderRightWidth(u),t=oi.getPaddingLeft(u)+oi.getPaddingRight(u);return u.offsetWidth-e-t}function JJe(u){const e=oi.getBorderTopWidth(u)+oi.getBorderBottomWidth(u),t=oi.getPaddingTop(u)+oi.getPaddingBottom(u);return u.offsetHeight-e-t}function Rf(u){const e=oi.getMarginTop(u)+oi.getMarginBottom(u);return u.offsetHeight+e}function Qr(u,e){for(;u;){if(u===e)return!0;u=u.parentNode}return!1}function ZJe(u,e,t){for(;u&&u.nodeType===u.ELEMENT_NODE;){if(u.classList.contains(e))return u;if(t){if(typeof t=="string"){if(u.classList.contains(t))return null}else if(u===t)return null}u=u.parentNode}return null}function dj(u,e,t){return!!ZJe(u,e,t)}function o6e(u){return u&&!!u.host&&!!u.mode}function bB(u){return!!w3(u)}function w3(u){for(var e;u.parentNode;){if(u===((e=u.ownerDocument)===null||e===void 0?void 0:e.body))return null;u=u.parentNode}return o6e(u)?u:null}function yl(){let u=JN().activeElement;for(;u!=null&&u.shadowRoot;)u=u.shadowRoot.activeElement;return u}function JN(){var u;return(u=[document,...VJe().map(t=>t.document)].find(t=>t.hasFocus()))!==null&&u!==void 0?u:document}function N0(u=document.getElementsByTagName("head")[0],e){const t=document.createElement("style");return t.type="text/css",t.media="screen",e==null||e(t),u.appendChild(t),t}let hj=null;function s6e(){return hj||(hj=N0()),hj}function YJe(u){var e,t;return!((e=u==null?void 0:u.sheet)===null||e===void 0)&&e.rules?u.sheet.rules:!((t=u==null?void 0:u.sheet)===null||t===void 0)&&t.cssRules?u.sheet.cssRules:[]}function EW(u,e,t=s6e()){!t||!e||t.sheet.insertRule(u+"{"+e+"}",0)}function Dae(u,e=s6e()){if(!e)return;const t=YJe(e),n=[];for(let i=0;i=0;i--)e.sheet.deleteRule(n[i])}function eX(u){return typeof HTMLElement=="object"?u instanceof HTMLElement:u&&typeof u=="object"&&u.nodeType===1&&typeof u.nodeName=="string"}const Me={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:t3?"webkitAnimationStart":"animationstart",ANIMATION_END:t3?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:t3?"webkitAnimationIteration":"animationiteration"};function QJe(u){const e=u;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const It={stop:(u,e)=>(u.preventDefault(),e&&u.stopPropagation(),u)};function XJe(u){const e=[];for(let t=0;u&&u.nodeType===u.ELEMENT_NODE;t++)e[t]=u.scrollTop,u=u.parentNode;return e}function eZe(u,e){for(let t=0;u&&u.nodeType===u.ELEMENT_NODE;t++)u.scrollTop!==e[t]&&(u.scrollTop=e[t]),u=u.parentNode}class kB extends ne{static hasFocusWithin(e){if(eX(e)){const t=w3(e),n=t?t.activeElement:e.ownerDocument.activeElement;return Qr(n,e)}else return Qr(window.document.activeElement,window.document)}constructor(e){super(),this._onDidFocus=this._register(new Q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event;let t=kB.hasFocusWithin(e),n=!1;const i=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(n=!0,window.setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{kB.hasFocusWithin(e)!==t&&(t?r():i())},this._register(ce(e,Me.FOCUS,i,!0)),this._register(ce(e,Me.BLUR,r,!0)),e instanceof HTMLElement&&(this._register(ce(e,Me.FOCUS_IN,()=>this._refreshStateHandler())),this._register(ce(e,Me.FOCUS_OUT,()=>this._refreshStateHandler())))}}function y1(u){return new kB(u)}function me(u,...e){if(u.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function l6e(u,e){return u.insertBefore(e,u.firstChild),e}function Pr(u,...e){u.innerText="",me(u,...e)}const tZe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ek;(function(u){u.HTML="http://www.w3.org/1999/xhtml",u.SVG="http://www.w3.org/2000/svg"})(Ek||(Ek={}));function c6e(u,e,t,...n){const i=tZe.exec(e);if(!i)throw new Error("Bad use of emmet");const r=i[1]||"div";let a;return u!==Ek.HTML?a=document.createElementNS(u,r):a=document.createElement(r),i[3]&&(a.id=i[3]),i[4]&&(a.className=i[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([o,s])=>{typeof s>"u"||(/^on\w+$/.test(o)?a[o]=s:o==="selected"?s&&a.setAttribute(o,"true"):a.setAttribute(o,s))}),a.append(...n),a}function ve(u,e,...t){return c6e(Ek.HTML,u,e,...t)}ve.SVG=function(u,e,...t){return c6e(Ek.SVG,u,e,...t)};function uZe(u,...e){u?us(...e):Ya(...e)}function us(...u){for(const e of u)e.style.display="",e.removeAttribute("aria-hidden")}function Ya(...u){for(const e of u)e.style.display="none",e.setAttribute("aria-hidden","true")}function xae(u){const e=window.devicePixelRatio*u;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function d6e(u){window.open(u,"_blank","noopener")}function nZe(u){const e=()=>{u(),t=T0(e)};let t=T0(e);return ft(()=>t.dispose())}n6e.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Nm(u){return u?`url('${i6e.uriToBrowserUri(u).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function vae(u){return`'${u.replace(/'/g,"%27")}'`}function n3(u,e){if(u!==void 0){const t=u.match(/^\s*var\((.+)\)$/);if(t){const n=t[1].split(",",2);return n.length===2&&(e=n3(n[1].trim(),e)),`var(${n[0]}, ${e})`}return u}return e}function iZe(u,e=!1){const t=document.createElement("a");return t6e("afterSanitizeAttributes",n=>{for(const i of["href","src"])if(n.hasAttribute(i)){const r=n.getAttribute(i);if(i==="href"&&r.startsWith("#"))continue;if(t.href=r,!u.includes(t.protocol.replace(/:$/,""))){if(e&&i==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(i)}}}),ft(()=>{u6e("afterSanitizeAttributes")})}const rZe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class Nh extends Q{constructor(){super(),this._subscriptions=new pe,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(ce(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new ln(e);if(!(t.keyCode===6&&e.repeat)){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(t.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(ce(window,"keyup",e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(ce(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(ce(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(ce(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(ce(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Nh.instance||(Nh.instance=new Nh),Nh.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class aZe extends ne{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(ce(this.element,Me.DRAG_ENTER,e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)})),this._register(ce(this.element,Me.DRAG_OVER,e=>{var t,n;e.preventDefault(),(n=(t=this.callbacks).onDragOver)===null||n===void 0||n.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(ce(this.element,Me.DRAG_LEAVE,e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))})),this._register(ce(this.element,Me.DRAG_END,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)})),this._register(ce(this.element,Me.DROP,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)}))}}const oZe=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function yr(u,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);const i=oZe.exec(u);if(!i||!i.groups)throw new Error("Bad use of h");const r=i.groups.tag||"div",a=document.createElement(r);i.groups.id&&(a.id=i.groups.id);const o=[];if(i.groups.class)for(const l of i.groups.class.split("."))l!==""&&o.push(l);if(t.className!==void 0)for(const l of t.className.split("."))l!==""&&o.push(l);o.length>0&&(a.className=o.join(" "));const s={};if(i.groups.name&&(s[i.groups.name]=a),n)for(const l of n)l instanceof HTMLElement?a.appendChild(l):typeof l=="string"?a.append(l):"root"in l&&(Object.assign(s,l),a.appendChild(l.root));for(const[l,c]of Object.entries(t))if(l!=="className")if(l==="style")for(const[d,h]of Object.entries(c))a.style.setProperty(Cae(d),typeof h=="number"?h+"px":""+h);else l==="tabIndex"?a.tabIndex=c:a.setAttribute(Cae(l),c.toString());return s.root=a,s}function Cae(u){return u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}let ZN=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let n=t.kbExpr;this.precondition&&(n?n=Ee.and(n,this.precondition):n=this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Po.registerKeybindingRule(i)}}ru.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){Lr.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}};class d6 extends ZN{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,i){return this._implementations.push({priority:e,name:t,implementation:n,when:i}),this._implementations.sort((r,a)=>a.priority-r.priority),{dispose:()=>{for(let r=0;r{if(o.get(pt).contextMatchesRules(n??void 0))return i(o,a,t)})}runCommand(e,t){return xr.runEditorCommand(e,t,this.precondition,(n,i,r)=>this.runEditorCommand(n,i,r))}}class $e extends xr{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(i){return i.menuId||(i.menuId=K.EditorContext),i.title||(i.title=e.label),i.when=Ee.and(e.precondition,i.when),i}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super($e.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(n0).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class E6e extends $e{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,i)=>i[0]-n[0]),{dispose:()=>{for(let n=0;n{var a,o;const s=r.get(pt),l=r.get(i0);if(!s.contextMatchesRules((a=this.desc.precondition)!==null&&a!==void 0?a:void 0)){l.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(o=this.desc.precondition)===null||o===void 0?void 0:o.serialize());return}return this.runEditorCommand(r,i,...t)})}}function W1(u,e){ru.registerCommand(u,function(t,...n){const i=t.get(mt),[r,a]=n;Ru(dt.isUri(r)),Ru(ee.isIPosition(a));const o=t.get(_n).getModel(r);if(o){const s=ee.lift(a);return i.invokeFunction(e,o,s,...n.slice(2))}return t.get(Vo).createModelReference(r).then(s=>new Promise((l,c)=>{try{const d=i.invokeFunction(e,s.object.textEditorModel,ee.lift(a),n.slice(2));l(d)}catch(d){c(d)}}).finally(()=>{s.dispose()}))})}function ze(u){return f0.INSTANCE.registerEditorCommand(u),u}function be(u){const e=new u;return f0.INSTANCE.registerEditorAction(e),e}function m6e(u){return f0.INSTANCE.registerEditorAction(u),u}function sZe(u){f0.INSTANCE.registerEditorAction(u)}function fu(u,e,t){f0.INSTANCE.registerEditorContribution(u,e,t)}var ux;(function(u){function e(a){return f0.INSTANCE.getEditorCommand(a)}u.getEditorCommand=e;function t(){return f0.INSTANCE.getEditorActions()}u.getEditorActions=t;function n(){return f0.INSTANCE.getEditorContributions()}u.getEditorContributions=n;function i(a){return f0.INSTANCE.getEditorContributions().filter(o=>a.indexOf(o.id)>=0)}u.getSomeEditorContributions=i;function r(){return f0.INSTANCE.getDiffEditorContributions()}u.getDiffEditorContributions=r})(ux||(ux={}));const lZe={EditorCommonContributions:"editor.contributions"};class f0{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}f0.INSTANCE=new f0;jn.add(lZe.EditorCommonContributions,f0.INSTANCE);function iA(u){return u.register(),u}const g6e=iA(new d6({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:K.MenubarEditMenu,group:"1_do",title:v({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:K.CommandPalette,group:"",title:v("undo","Undo"),order:1}]}));iA(new h6e(g6e,{id:"default:undo",precondition:void 0}));const f6e=iA(new d6({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:K.MenubarEditMenu,group:"1_do",title:v({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:K.CommandPalette,group:"",title:v("redo","Redo"),order:1}]}));iA(new h6e(f6e,{id:"default:redo",precondition:void 0}));const cZe=iA(new d6({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:K.CommandPalette,group:"",title:v("selectAll","Select All"),order:1}]})),p6e=Symbol("MicrotaskDelay");var l0=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hb=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};function mW(u){return!!u&&typeof u.then=="function"}function Ui(u){const e=new vi,t=u(e.token),n=new Promise((i,r)=>{const a=e.token.onCancellationRequested(()=>{a.dispose(),e.dispose(),r(new hg)});Promise.resolve(t).then(o=>{a.dispose(),e.dispose(),i(o)},o=>{a.dispose(),e.dispose(),r(o)})});return new class{cancel(){e.cancel()}then(i,r){return n.then(i,r)}catch(i){return this.then(void 0,i)}finally(i){return n.finally(i)}}}function YN(u,e,t){return new Promise((n,i)=>{const r=e.onCancellationRequested(()=>{r.dispose(),n(t)});u.then(n,i).finally(()=>r.dispose())})}class dZe{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{if(this.queuedPromise=null,this.isDisposed)return;const n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(i=>{this.activePromise=null,t(i)},i=>{this.activePromise=null,n(i)})})}dispose(){this.isDisposed=!0}}const hZe=(u,e)=>{let t=!0;const n=setTimeout(()=>{t=!1,e()},u);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},EZe=u=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,u())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class Tl{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,r)=>{this.doResolve=i,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const i=this.task;return this.task=null,i()}}));const n=()=>{var i;this.deferred=null,(i=this.doResolve)===null||i===void 0||i.call(this,null)};return this.deferred=t===p6e?EZe(n):hZe(t,n),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new hg),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class D6e{constructor(e){this.delayer=new Tl(e),this.throttler=new dZe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function Pm(u,e){return e?new Promise((t,n)=>{const i=setTimeout(()=>{r.dispose(),t()},u),r=e.onCancellationRequested(()=>{clearTimeout(i),r.dispose(),n(new hg)})}):Ui(t=>Pm(u,t))}function Rm(u,e=0,t){const n=setTimeout(()=>{u(),t&&i.dispose()},e),i=ft(()=>{clearTimeout(n),t==null||t.deleteAndLeak(i)});return t==null||t.add(i),i}function x6e(u,e=n=>!!n,t=null){let n=0;const i=u.length,r=()=>{if(n>=i)return Promise.resolve(t);const a=u[n++];return Promise.resolve(a()).then(s=>e(s)?Promise.resolve(s):r())};return r()}class Vl{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class rA{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class Hu{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let Ph;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?Ph=u=>{lve(()=>{if(e)return;const t=Date.now()+15;u(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,t-Date.now())}}))});let e=!1;return{dispose(){e||(e=!0)}}}:Ph=(u,e)=>{const t=requestIdleCallback(u,typeof e=="number"?{timeout:e}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(t))}}}})();class VS{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=Ph(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class QN{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new hg)}}var gW;(function(u){function e(n){return l0(this,void 0,void 0,function*(){let i;const r=yield Promise.all(n.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return r})}u.settled=e;function t(n){return new Promise((i,r)=>l0(this,void 0,void 0,function*(){try{yield n(i,r)}catch(a){r(a)}}))}u.withAsyncBody=t})(gW||(gW={}));class _i{static fromArray(e){return new _i(t=>{t.emitMany(e)})}static fromPromise(e){return new _i(t=>l0(this,void 0,void 0,function*(){t.emitMany(yield e)}))}static fromPromises(e){return new _i(t=>l0(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>l0(this,void 0,void 0,function*(){return t.emitOne(yield n)})))}))}static merge(e){return new _i(t=>l0(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>{var i,r,a;return l0(this,void 0,void 0,function*(){var o,s,l,c;try{for(i=!0,r=hb(n);a=yield r.next(),o=a.done,!o;i=!0){c=a.value,i=!1;const d=c;t.emitOne(d)}}catch(d){s={error:d}}finally{try{!i&&!o&&(l=r.return)&&(yield l.call(r))}finally{if(s)throw s.error}}})}))}))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new Q,queueMicrotask(()=>l0(this,void 0,void 0,function*(){const t={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{yield Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:()=>l0(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(el0(this,void 0,void 0,function*(){var i,r,a,o;try{for(var s=!0,l=hb(e),c;c=yield l.next(),i=c.done,!i;s=!0){o=c.value,s=!1;const d=o;n.emitOne(t(d))}}catch(d){r={error:d}}finally{try{!s&&!i&&(a=l.return)&&(yield a.call(l))}finally{if(r)throw r.error}}}))}map(e){return _i.map(this,e)}static filter(e,t){return new _i(n=>l0(this,void 0,void 0,function*(){var i,r,a,o;try{for(var s=!0,l=hb(e),c;c=yield l.next(),i=c.done,!i;s=!0){o=c.value,s=!1;const d=o;t(d)&&n.emitOne(d)}}catch(d){r={error:d}}finally{try{!s&&!i&&(a=l.return)&&(yield a.call(l))}finally{if(r)throw r.error}}}))}filter(e){return _i.filter(this,e)}static coalesce(e){return _i.filter(e,t=>!!t)}coalesce(){return _i.coalesce(this)}static toPromise(e){var t,n,i,r,a,o,s;return l0(this,void 0,void 0,function*(){const l=[];try{for(t=!0,n=hb(e);i=yield n.next(),r=i.done,!r;t=!0){s=i.value,t=!1;const c=s;l.push(c)}}catch(c){a={error:c}}finally{try{!t&&!r&&(o=n.return)&&(yield o.call(n))}finally{if(a)throw a.error}}return l})}toPromise(){return _i.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}_i.EMPTY=_i.fromArray([]);class mZe extends _i{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function gZe(u){const e=new vi,t=u(e.token);return new mZe(e,n=>l0(this,void 0,void 0,function*(){var i,r,a,o;const s=e.token.onCancellationRequested(()=>{s.dispose(),e.dispose(),n.reject(new hg)});try{try{for(var l=!0,c=hb(t),d;d=yield c.next(),i=d.done,!i;l=!0){o=d.value,l=!1;const h=o;if(e.token.isCancellationRequested)return;n.emitOne(h)}}catch(h){r={error:h}}finally{try{!l&&!i&&(a=c.return)&&(yield a.call(c))}finally{if(r)throw r.error}}s.dispose(),e.dispose()}catch(h){s.dispose(),e.dispose(),n.reject(h)}}))}const fZe="$initialize";let bae=!1;function fW(u){dg&&(bae||(bae=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(u.message))}class pZe{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.method=n,this.args=i,this.type=0}}class kae{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class DZe{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=i,this.type=2}}class xZe{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class vZe{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class CZe{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const n=String(++this._lastSentReq);return new Promise((i,r)=>{this._pendingReplies[n]={resolve:i,reject:r},this._send(new pZe(this._workerId,n,e,t))})}listen(e,t){let n=null;const i=new Q({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,i),this._send(new DZe(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new vZe(this._workerId,n)),n=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then(i=>{this._send(new kae(this._workerId,t,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Yre(i.detail)),this._send(new kae(this._workerId,t,void 0,Yre(i)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(i=>{this._send(new xZe(this._workerId,t,i))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(c)},c=>{i==null||i(c)})),this._protocol=new CZe({sendMessage:(c,d)=>{this._worker.postMessage(c,d)},handleMessage:(c,d)=>{if(typeof n[c]!="function")return Promise.reject(new Error("Missing method "+c+" on main thread host."));try{return Promise.resolve(n[c].apply(n,d))}catch(h){return Promise.reject(h)}},handleEvent:(c,d)=>{if(C6e(c)){const h=n[c].call(n,d);if(typeof h!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return h}if(v6e(c)){const h=n[c];if(typeof h!="function")throw new Error(`Missing event ${c} on main thread host.`);return h}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let r=null;const a=globalThis.require;typeof a<"u"&&typeof a.getConfig=="function"?r=a.getConfig():typeof globalThis.requirejs<"u"&&(r=globalThis.requirejs.s.contexts._.config);const o=BQ(n);this._onModuleLoaded=this._protocol.sendMessage(fZe,[this._worker.getId(),JSON.parse(JSON.stringify(r)),t,o]);const s=(c,d)=>this._request(c,d),l=(c,d)=>this._protocol.listen(c,d);this._lazyProxy=new Promise((c,d)=>{i=d,this._onModuleLoaded.then(h=>{c(kZe(h,s,l))},h=>{d(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,i)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,i)},i)})}_onError(e,t){console.error(e),console.info(t)}}function v6e(u){return u[0]==="o"&&u[1]==="n"&&Pd(u.charCodeAt(2))}function C6e(u){return/^onDynamic/.test(u)&&Pd(u.charCodeAt(9))}function kZe(u,e,t){const n=a=>function(){const o=Array.prototype.slice.call(arguments,0);return e(a,o)},i=a=>function(o){return t(a,o)},r={};for(const a of u){if(C6e(a)){r[a]=i(a);continue}if(v6e(a)){r[a]=t(a,void 0);continue}r[a]=n(a)}return r}function b4(u,e){var t;const n=globalThis.MonacoEnvironment;if(n!=null&&n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(u,e)}catch(i){zt(i);return}try{return(t=window.trustedTypes)===null||t===void 0?void 0:t.createPolicy(u,e)}catch(i){zt(i);return}}const Fae=b4("defaultWorkerFactory",{createScriptURL:u=>u});function FZe(u){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",u);if(typeof e.getWorkerUrl=="function"){const t=e.getWorkerUrl("workerMain.js",u);return new Worker(Fae?Fae.createScriptURL(t):t,{name:u})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function yZe(u){return typeof u.then=="function"}class AZe{constructor(e,t,n,i,r){this.id=t,this.label=n;const a=FZe(n);yZe(a)?this.worker=a:this.worker=Promise.resolve(a),this.postMessage(e,[]),this.worker.then(o=>{o.onmessage=function(s){i(s.data)},o.onmessageerror=r,typeof o.addEventListener=="function"&&o.addEventListener("error",r)})}getId(){return this.id}postMessage(e,t){var n;(n=this.worker)===null||n===void 0||n.then(i=>{try{i.postMessage(e,t)}catch(r){zt(r),zt(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:r}))}})}dispose(){var e;(e=this.worker)===null||e===void 0||e.then(t=>t.terminate()),this.worker=null}}class XN{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){const i=++XN.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new AZe(e,i,this._label||"anonymous"+i,t,r=>{fW(r),this._webWorkerFailedBeforeError=r,n(r)})}}XN.LAST_WORKER_ID=0;var wi;(function(u){u[u.None=0]="None",u[u.Indent=1]="Indent",u[u.IndentOutdent=2]="IndentOutdent",u[u.Outdent=3]="Outdent"})(wi||(wi={}));class Ej{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t0&&u.getLanguageId(a-1)===i;)a--;return new SZe(u,i,a,r+1,u.getStartOffset(a),u.getEndOffset(r))}class SZe{constructor(e,t,n,i,r,a){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=r,this._lastCharOffset=a}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function _d(u){return(u&3)!==0}class Yx{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new Ej(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new Ej({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Ej({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> +Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._parsingErrors.push({message:i,offset:r,lexeme:a,additionalInfo:n}),db._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};Kve._parseError=new Error;class Ee{static false(){return oo.INSTANCE}static true(){return No.INSTANCE}static has(e){return Ap.create(e)}static equals(e,t){return l6.create(e,t)}static notEquals(e,t){return HN.create(e,t)}static regex(e,t){return lk.create(e,t)}static in(e,t){return ON.create(e,t)}static notIn(e,t){return jN.create(e,t)}static not(e){return _p.create(e)}static and(...e){return Pf.create(e,null,!0)}static or(...e){return Bh.create(e,null,!0)}static deserialize(e){return e==null?void 0:this._parser.parse(e)}}Ee._parser=new Kve({regexParsingWithErrorRecovery:!1});function tJe(u,e){const t=u?u.substituteConstants():void 0,n=e?e.substituteConstants():void 0;return!t&&!n?!0:!t||!n?!1:t.equals(n)}function Jb(u,e){return u.cmp(e)}class oo{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return No.INSTANCE}}oo.INSTANCE=new oo;class No{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return oo.INSTANCE}}No.INSTANCE=new No;class Ap{static create(e,t=null){const n=Ca.get(e);return typeof n=="boolean"?n?No.INSTANCE:oo.INSTANCE:new Ap(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:Gve(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Ca.get(this.key);return typeof e=="boolean"?e?No.INSTANCE:oo.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=_p.create(this.key,this)),this.negated}}class l6{static create(e,t,n=null){if(typeof t=="boolean")return t?Ap.create(e,n):_p.create(e,n);const i=Ca.get(e);return typeof i=="boolean"?t===(i?"true":"false")?No.INSTANCE:oo.INSTANCE:new l6(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ca.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?No.INSTANCE:oo.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=HN.create(this.key,this.value,this)),this.negated}}class ON{static create(e,t){return new ON(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.includes(n):typeof n=="string"&&typeof t=="object"&&t!==null?Gqe.call(t,n):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=jN.create(this.key,this.valueKey)),this.negated}}class jN{static create(e,t){return new jN(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=ON.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class HN{static create(e,t,n=null){if(typeof t=="boolean")return t?_p.create(e,n):Ap.create(e,n);const i=Ca.get(e);return typeof i=="boolean"?t===(i?"true":"false")?oo.INSTANCE:No.INSTANCE:new HN(e,t,n)}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=Ca.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?oo.INSTANCE:No.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l6.create(this.key,this.value,this)),this.negated}}class _p{static create(e,t=null){const n=Ca.get(e);return typeof n=="boolean"?n?oo.INSTANCE:No.INSTANCE:new _p(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:Gve(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=Ca.get(this.key);return typeof e=="boolean"?e?oo.INSTANCE:No.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ap.create(this.key,this)),this.negated}}function VN(u,e){if(typeof u=="string"){const t=parseFloat(u);isNaN(t)||(u=t)}return typeof u=="string"||typeof u=="number"?e(u):oo.INSTANCE}class $N{static create(e,t,n=null){return VN(t,i=>new $N(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=GN.create(this.key,this.value,this)),this.negated}}class KN{static create(e,t,n=null){return VN(t,i=>new KN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=WN.create(this.key,this.value,this)),this.negated}}class WN{static create(e,t,n=null){return VN(t,i=>new WN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))new GN(e,i,n))}constructor(e,t,n){this.key=e,this.value=t,this.negated=n,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:Sp(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$N.create(this.key,this.value,this)),this.negated}}class lk{static create(e,t){return new lk(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZQ.create(this)),this.negated}}class ZQ{static create(e){return new ZQ(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function Wve(u){let e=null;for(let t=0,n=u.length;te.expr.length)return 1;for(let t=0,n=this.expr.length;t1;){const a=i[i.length-1];if(a.type!==9)break;i.pop();const o=i.pop(),s=i.length===0,l=Bh.create(a.expr.map(c=>Pf.create([c,o],null,n)),null,s);l&&(i.push(l),i.sort(Jb))}if(i.length===1)return i[0];if(n){for(let a=0;ae.serialize()).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=Bh.create(e,this,!0)}return this.negated}}class Bh{static create(e,t,n){return Bh._normalizeArr(e,t,n)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,n=this.expr.length;te.serialize()).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),n=e.shift(),i=[];for(const r of oae(t))for(const a of oae(n))i.push(Pf.create([r,a],null,!1));e.unshift(Bh.create(i,null,!1))}this.negated=Bh.create(e,this,!0)}return this.negated}}class Pe extends Ap{static all(){return Pe._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?Pe._info.push(Object.assign(Object.assign({},n),{key:e})):n!==!0&&Pe._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return l6.create(this.key,e)}}Pe._info=[];const pt=Ut("contextKeyService");function Gve(u,e){return ue?1:0}function Sp(u,e,t,n){return ut?1:en?1:0}function lW(u,e){if(u.type===0||e.type===1)return!0;if(u.type===9)return e.type===9?aae(u.expr,e.expr):!1;if(e.type===9){for(const t of e.expr)if(lW(u,t))return!0;return!1}if(u.type===6){if(e.type===6)return aae(e.expr,u.expr);for(const t of u.expr)if(lW(t,e))return!0;return!1}return u.equals(e)}function aae(u,e){let t=0,n=0;for(;t>>0,n=(u&4294901760)>>>16;return n!==0?new uj([G7(t,e),G7(n,e)]):new uj([G7(t,e)])}else{const t=[];for(let n=0;n{o(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(aJe)),this._cachedMergedKeybindings.slice(0)}}const Po=new YQ,rJe={EditorModes:"platform.keybindingsRegistry"};jn.add(rJe.EditorModes,Po);function aJe(u,e){if(u.weight1!==e.weight1)return u.weight1-e.weight1;if(u.command&&e.command){if(u.commande.command)return 1}return u.weight2-e.weight2}var oJe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sae=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sJe=globalThis&&globalThis.__rest||function(u,e){var t={};for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(u);it===e}}wh._all=new Map;const Lr=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new VUe({merge:wh.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(u){return this._commands.set(u.id,u),this._onDidChangeMenu.fire(wh.for(K.CommandPalette)),ft(()=>{this._commands.delete(u.id)&&this._onDidChangeMenu.fire(wh.for(K.CommandPalette))})}getCommand(u){return this._commands.get(u)}getCommands(){const u=new Map;return this._commands.forEach((e,t)=>u.set(t,e)),u}appendMenuItem(u,e){let t=this._menuItems.get(u);t||(t=new to,this._menuItems.set(u,t));const n=t.push(e);return this._onDidChangeMenu.fire(wh.for(u)),ft(()=>{n(),this._onDidChangeMenu.fire(wh.for(u))})}appendMenuItems(u){const e=new pe;for(const{id:t,item:n}of u)e.add(this.appendMenuItem(t,n));return e}getMenuItems(u){let e;return this._menuItems.has(u)?e=[...this._menuItems.get(u)]:e=[],u===K.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(u){const e=new Set;for(const t of u)s5(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,n)=>{e.has(n)||u.push({command:t})})}};class dk extends Zx{constructor(e,t,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,n,"submenu"),this.item=e,this.hideActions=t}}let zl=jS=class{static label(e,t){return t!=null&&t.renderShortTitle&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value}constructor(e,t,n,i,r,a){var o,s;this.hideActions=i,this._commandService=a,this.id=e.id,this.label=jS.label(e,n),this.tooltip=(s=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0;let l;if(e.toggled){const c=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),this.checked&&st.isThemeIcon(c.icon)&&(l=c.icon),this.checked&&c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}l||(l=st.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new jS(t,void 0,n,i,r,a):void 0,this._options=n,this.class=l&&st.asClassName(l)}run(...e){var t,n;let i=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(i=[...i,this._options.arg]),!((n=this._options)===null||n===void 0)&&n.shouldForwardArgs&&(i=[...i,...e]),this._commandService.executeCommand(this.id,...i)}};zl=jS=oJe([sae(4,pt),sae(5,ni)],zl);class n0{constructor(e){this.desc=e}}function gn(u){const e=new pe,t=new u,n=t.desc,{f1:i,menu:r,keybinding:a,description:o}=n,s=sJe(n,["f1","menu","keybinding","description"]);if(e.add(ru.registerCommand({id:s.id,handler:(l,...c)=>t.run(l,...c),description:o})),Array.isArray(r))for(const l of r)e.add(Lr.appendMenuItem(l.id,Object.assign({command:Object.assign(Object.assign({},s),{precondition:l.precondition===null?void 0:s.precondition})},l)));else r&&e.add(Lr.appendMenuItem(r.id,Object.assign({command:Object.assign(Object.assign({},s),{precondition:r.precondition===null?void 0:s.precondition})},r)));if(i&&(e.add(Lr.appendMenuItem(K.CommandPalette,{command:s,when:s.precondition})),e.add(Lr.addCommand(s))),Array.isArray(a))for(const l of a)e.add(Po.registerKeybindingRule(Object.assign(Object.assign({},l),{id:s.id,when:s.precondition?Ee.and(s.precondition,l.when):l.when})));else a&&e.add(Po.registerKeybindingRule(Object.assign(Object.assign({},a),{id:s.id,when:s.precondition?Ee.and(s.precondition,a.when):a.when})));return e}const i0=Ut("telemetryService"),r0=Ut("logService");var qr;(function(u){u[u.Off=0]="Off",u[u.Trace=1]="Trace",u[u.Debug=2]="Debug",u[u.Info=3]="Info",u[u.Warning=4]="Warning",u[u.Error=5]="Error"})(qr||(qr={}));const qve=qr.Info;class Jve extends ne{constructor(){super(...arguments),this.level=qve,this._onDidChangeLogLevel=this._register(new Q),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==qr.Off&&this.level<=e}}class cJe extends Jve{constructor(e=qve,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(qr.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(qr.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(qr.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(qr.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(qr.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}dispose(){}}class dJe extends Jve{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const n of this.loggers)n.trace(e,...t)}debug(e,...t){for(const n of this.loggers)n.debug(e,...t)}info(e,...t){for(const n of this.loggers)n.info(e,...t)}warn(e,...t){for(const n of this.loggers)n.warn(e,...t)}error(e,...t){for(const n of this.loggers)n.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose()}}function hJe(u){switch(u){case qr.Trace:return"trace";case qr.Debug:return"debug";case qr.Info:return"info";case qr.Warning:return"warn";case qr.Error:return"error";case qr.Off:return"off"}}new Pe("logLevel",hJe(qr.Info));const QQ={clipboard:{writeText:Oc||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:Oc||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>Oc||Rqe()?0:navigator.keyboard||l4?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};function EJe(u){if(u.charCode){const t=String.fromCharCode(u.charCode).toUpperCase();return Sh.fromString(t)}const e=u.keyCode;if(e===3)return 7;if(T0)switch(e){case 59:return 85;case 60:if(Pa)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(iu)return 57;break}else if(t3){if(iu&&e===93)return 57;if(!iu&&e===92)return 57}return Cve[e]||0}const mJe=iu?256:2048,gJe=512,fJe=1024,pJe=iu?2048:256;class ln{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=EJe(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=mJe),this.altKey&&(t|=gJe),this.shiftKey&&(t|=fJe),this.metaKey&&(t|=pJe),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new c4(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let lae=!1,tC=null;function DJe(u){if(!u.parent||u.parent===u)return null;try{const e=u.location,t=u.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return lae=!0,null}catch{return lae=!0,null}return u.parent}class xJe{static getSameOriginWindowChain(){if(!tC){tC=[];let e=window,t;do t=DJe(e),t?tC.push({window:e,iframeElement:e.frameElement||null}):tC.push({window:e,iframeElement:null}),e=t;while(e)}return tC.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,i=0;const r=this.getSameOriginWindowChain();for(const a of r){if(n+=a.window.scrollY,i+=a.window.scrollX,a.window===t||!a.iframeElement)break;const o=a.iframeElement.getBoundingClientRect();n+=o.top,i+=o.left}return{top:n,left:i}}}class x0{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=e.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const t=xJe.getPositionOfChildWindowRelativeToAncestorWindow(window,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class B3{constructor(e,t=0,n=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){const i=e,r=e;if(typeof i.wheelDeltaY<"u")this.deltaY=i.wheelDeltaY/120;else if(typeof r.VERTICAL_AXIS<"u"&&r.axis===r.VERTICAL_AXIS)this.deltaY=-r.detail/3;else if(e.type==="wheel"){const a=e;a.deltaMode===a.DOM_DELTA_LINE?T0&&!iu?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof i.wheelDeltaX<"u")l4&&na?this.deltaX=-(i.wheelDeltaX/120):this.deltaX=i.wheelDeltaX/120;else if(typeof r.HORIZONTAL_AXIS<"u"&&r.axis===r.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const a=e;a.deltaMode===a.DOM_DELTA_LINE?T0&&!iu?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)===null||e===void 0||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)===null||e===void 0||e.stopPropagation()}}/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:Zve,setPrototypeOf:cae,isFrozen:vJe,getPrototypeOf:CJe,getOwnPropertyDescriptor:bJe}=Object;let{freeze:gs,seal:Yc,create:kJe}=Object,{apply:dW,construct:hW}=typeof Reflect<"u"&&Reflect;dW||(dW=function(e,t,n){return e.apply(t,n)});gs||(gs=function(e){return e});Yc||(Yc=function(e){return e});hW||(hW=function(e,t){return new e(...t)});const FJe=Ml(Array.prototype.forEach),dae=Ml(Array.prototype.pop),uC=Ml(Array.prototype.push),HS=Ml(String.prototype.toLowerCase),ij=Ml(String.prototype.toString),yJe=Ml(String.prototype.match),ec=Ml(String.prototype.replace),AJe=Ml(String.prototype.indexOf),_Je=Ml(String.prototype.trim),l0=Ml(RegExp.prototype.test),nC=SJe(TypeError);function Ml(u){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i/gm),MJe=Yc(/\${[\w\W]*}/gm),TJe=Yc(/^data-[\-\w.\u00B7-\uFFFF]/),NJe=Yc(/^aria-[\-\w]+$/),Yve=Yc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PJe=Yc(/^(?:\w+script|data):/i),RJe=Yc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qve=Yc(/^html$/i);var fae=Object.freeze({__proto__:null,MUSTACHE_EXPR:LJe,ERB_EXPR:zJe,TMPLIT_EXPR:MJe,DATA_ATTR:TJe,ARIA_ATTR:NJe,IS_ALLOWED_URI:Yve,IS_SCRIPT_OR_DATA:PJe,ATTR_WHITESPACE:RJe,DOCTYPE_NAME:Qve});const IJe=()=>typeof window>"u"?null:window,OJe=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function Xve(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IJe();const e=Xe=>Xve(Xe);if(e.version="3.0.5",e.removed=[],!u||!u.document||u.document.nodeType!==9)return e.isSupported=!1,e;const t=u.document,n=t.currentScript;let{document:i}=u;const{DocumentFragment:r,HTMLTemplateElement:a,Node:o,Element:s,NodeFilter:l,NamedNodeMap:c=u.NamedNodeMap||u.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:E}=u,m=s.prototype,g=U7(m,"cloneNode"),f=U7(m,"nextSibling"),p=U7(m,"childNodes"),D=U7(m,"parentNode");if(typeof a=="function"){const Xe=i.createElement("template");Xe.content&&Xe.content.ownerDocument&&(i=Xe.content.ownerDocument)}let x,b="";const{implementation:k,createNodeIterator:A,createDocumentFragment:F,getElementsByTagName:S}=i,{importNode:w}=t;let z={};e.isSupported=typeof Zve=="function"&&typeof D=="function"&&k&&k.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:O,TMPLIT_EXPR:y,DATA_ATTR:_,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:T,ATTR_WHITESPACE:R}=fae;let{IS_ALLOWED_URI:I}=fae,H=null;const V=Nu({},[...hae,...rj,...aj,...oj,...Eae]);let U=null;const J=Nu({},[...mae,...sj,...gae,...q7]);let Y=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,re=null,ge=!0,_e=!0,Ve=!1,Ue=!0,qe=!1,Se=!1,de=!1,he=!1,Be=!1,je=!1,bt=!1,qt=!0,ou=!1;const Vt="user-content-";let oe=!0,se=!1,ie={},$=null;const Z=Nu({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const te=Nu({},["audio","video","img","source","image","track"]);let fe=null;const Le=Nu({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",it="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let xt=ct,Jt=!1,Ze=null;const Ie=Nu({},[Je,it,ct],ij);let Tu;const gu=["application/xhtml+xml","text/html"],fn="text/html";let Wt,Ln=null;const Vu=i.createElement("form"),un=function(le){return le instanceof RegExp||le instanceof Function},zn=function(le){if(!(Ln&&Ln===le)){if((!le||typeof le!="object")&&(le={}),le=sD(le),Tu=gu.indexOf(le.PARSER_MEDIA_TYPE)===-1?Tu=fn:Tu=le.PARSER_MEDIA_TYPE,Wt=Tu==="application/xhtml+xml"?ij:HS,H="ALLOWED_TAGS"in le?Nu({},le.ALLOWED_TAGS,Wt):V,U="ALLOWED_ATTR"in le?Nu({},le.ALLOWED_ATTR,Wt):J,Ze="ALLOWED_NAMESPACES"in le?Nu({},le.ALLOWED_NAMESPACES,ij):Ie,fe="ADD_URI_SAFE_ATTR"in le?Nu(sD(Le),le.ADD_URI_SAFE_ATTR,Wt):Le,ue="ADD_DATA_URI_TAGS"in le?Nu(sD(te),le.ADD_DATA_URI_TAGS,Wt):te,$="FORBID_CONTENTS"in le?Nu({},le.FORBID_CONTENTS,Wt):Z,X="FORBID_TAGS"in le?Nu({},le.FORBID_TAGS,Wt):{},re="FORBID_ATTR"in le?Nu({},le.FORBID_ATTR,Wt):{},ie="USE_PROFILES"in le?le.USE_PROFILES:!1,ge=le.ALLOW_ARIA_ATTR!==!1,_e=le.ALLOW_DATA_ATTR!==!1,Ve=le.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=le.SAFE_FOR_TEMPLATES||!1,Se=le.WHOLE_DOCUMENT||!1,Be=le.RETURN_DOM||!1,je=le.RETURN_DOM_FRAGMENT||!1,bt=le.RETURN_TRUSTED_TYPE||!1,he=le.FORCE_BODY||!1,qt=le.SANITIZE_DOM!==!1,ou=le.SANITIZE_NAMED_PROPS||!1,oe=le.KEEP_CONTENT!==!1,se=le.IN_PLACE||!1,I=le.ALLOWED_URI_REGEXP||Yve,xt=le.NAMESPACE||ct,Y=le.CUSTOM_ELEMENT_HANDLING||{},le.CUSTOM_ELEMENT_HANDLING&&un(le.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=le.CUSTOM_ELEMENT_HANDLING.tagNameCheck),le.CUSTOM_ELEMENT_HANDLING&&un(le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=le.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Y.allowCustomizedBuiltInElements=le.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qe&&(_e=!1),je&&(Be=!0),ie&&(H=Nu({},[...Eae]),U=[],ie.html===!0&&(Nu(H,hae),Nu(U,mae)),ie.svg===!0&&(Nu(H,rj),Nu(U,sj),Nu(U,q7)),ie.svgFilters===!0&&(Nu(H,aj),Nu(U,sj),Nu(U,q7)),ie.mathMl===!0&&(Nu(H,oj),Nu(U,gae),Nu(U,q7))),le.ADD_TAGS&&(H===V&&(H=sD(H)),Nu(H,le.ADD_TAGS,Wt)),le.ADD_ATTR&&(U===J&&(U=sD(U)),Nu(U,le.ADD_ATTR,Wt)),le.ADD_URI_SAFE_ATTR&&Nu(fe,le.ADD_URI_SAFE_ATTR,Wt),le.FORBID_CONTENTS&&($===Z&&($=sD($)),Nu($,le.FORBID_CONTENTS,Wt)),oe&&(H["#text"]=!0),Se&&Nu(H,["html","head","body"]),H.table&&(Nu(H,["tbody"]),delete X.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw nC('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nC('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=le.TRUSTED_TYPES_POLICY,b=x.createHTML("")}else x===void 0&&(x=OJe(E,n)),x!==null&&typeof b=="string"&&(b=x.createHTML(""));gs&&gs(le),Ln=le}},bn=Nu({},["mi","mo","mn","ms","mtext"]),$u=Nu({},["foreignobject","desc","title","annotation-xml"]),wu=Nu({},["title","style","font","a","script"]),Ou=Nu({},rj);Nu(Ou,aj),Nu(Ou,BJe);const ki=Nu({},oj);Nu(ki,wJe);const $i=function(le){let Ge=D(le);(!Ge||!Ge.tagName)&&(Ge={namespaceURI:xt,tagName:"template"});const Et=HS(le.tagName),Kn=HS(Ge.tagName);return Ze[le.namespaceURI]?le.namespaceURI===it?Ge.namespaceURI===ct?Et==="svg":Ge.namespaceURI===Je?Et==="svg"&&(Kn==="annotation-xml"||bn[Kn]):!!Ou[Et]:le.namespaceURI===Je?Ge.namespaceURI===ct?Et==="math":Ge.namespaceURI===it?Et==="math"&&$u[Kn]:!!ki[Et]:le.namespaceURI===ct?Ge.namespaceURI===it&&!$u[Kn]||Ge.namespaceURI===Je&&!bn[Kn]?!1:!ki[Et]&&(wu[Et]||!Ou[Et]):!!(Tu==="application/xhtml+xml"&&Ze[le.namespaceURI]):!1},Vn=function(le){uC(e.removed,{element:le});try{le.parentNode.removeChild(le)}catch{le.remove()}},Ni=function(le,Ge){try{uC(e.removed,{attribute:Ge.getAttributeNode(le),from:Ge})}catch{uC(e.removed,{attribute:null,from:Ge})}if(Ge.removeAttribute(le),le==="is"&&!U[le])if(Be||je)try{Vn(Ge)}catch{}else try{Ge.setAttribute(le,"")}catch{}},ka=function(le){let Ge,Et;if(he)le=""+le;else{const Wn=yJe(le,/^[\r\n\t ]+/);Et=Wn&&Wn[0]}Tu==="application/xhtml+xml"&&xt===ct&&(le=''+le+"");const Kn=x?x.createHTML(le):le;if(xt===ct)try{Ge=new h().parseFromString(Kn,Tu)}catch{}if(!Ge||!Ge.documentElement){Ge=k.createDocument(xt,"template",null);try{Ge.documentElement.innerHTML=Jt?b:Kn}catch{}}const Vr=Ge.body||Ge.documentElement;return le&&Et&&Vr.insertBefore(i.createTextNode(Et),Vr.childNodes[0]||null),xt===ct?S.call(Ge,Se?"html":"body")[0]:Se?Ge.documentElement:Vr},fo=function(le){return A.call(le.ownerDocument||le,le,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},eh=function(le){return le instanceof d&&(typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||!(le.attributes instanceof c)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function")},Va=function(le){return typeof o=="object"?le instanceof o:le&&typeof le=="object"&&typeof le.nodeType=="number"&&typeof le.nodeName=="string"},Hr=function(le,Ge,Et){z[le]&&FJe(z[le],Kn=>{Kn.call(e,Ge,Et,Ln)})},Cd=function(le){let Ge;if(Hr("beforeSanitizeElements",le,null),eh(le))return Vn(le),!0;const Et=Wt(le.nodeName);if(Hr("uponSanitizeElement",le,{tagName:Et,allowedTags:H}),le.hasChildNodes()&&!Va(le.firstElementChild)&&(!Va(le.content)||!Va(le.content.firstElementChild))&&l0(/<[/\w]/g,le.innerHTML)&&l0(/<[/\w]/g,le.textContent))return Vn(le),!0;if(!H[Et]||X[Et]){if(!X[Et]&&Mt(Et)&&(Y.tagNameCheck instanceof RegExp&&l0(Y.tagNameCheck,Et)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Et)))return!1;if(oe&&!$[Et]){const Kn=D(le)||le.parentNode,Vr=p(le)||le.childNodes;if(Vr&&Kn){const Wn=Vr.length;for(let Mn=Wn-1;Mn>=0;--Mn)Kn.insertBefore(g(Vr[Mn],!0),f(le))}}return Vn(le),!0}return le instanceof s&&!$i(le)||(Et==="noscript"||Et==="noembed"||Et==="noframes")&&l0(/<\/no(script|embed|frames)/i,le.innerHTML)?(Vn(le),!0):(qe&&le.nodeType===3&&(Ge=le.textContent,Ge=ec(Ge,N," "),Ge=ec(Ge,O," "),Ge=ec(Ge,y," "),le.textContent!==Ge&&(uC(e.removed,{element:le.cloneNode()}),le.textContent=Ge)),Hr("afterSanitizeElements",le,null),!1)},Og=function(le,Ge,Et){if(qt&&(Ge==="id"||Ge==="name")&&(Et in i||Et in Vu))return!1;if(!(_e&&!re[Ge]&&l0(_,Ge))){if(!(ge&&l0(L,Ge))){if(!U[Ge]||re[Ge]){if(!(Mt(le)&&(Y.tagNameCheck instanceof RegExp&&l0(Y.tagNameCheck,le)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(le))&&(Y.attributeNameCheck instanceof RegExp&&l0(Y.attributeNameCheck,Ge)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(Ge))||Ge==="is"&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&l0(Y.tagNameCheck,Et)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(Et))))return!1}else if(!fe[Ge]){if(!l0(I,ec(Et,R,""))){if(!((Ge==="src"||Ge==="xlink:href"||Ge==="href")&&le!=="script"&&AJe(Et,"data:")===0&&ue[le])){if(!(Ve&&!l0(T,ec(Et,R,"")))){if(Et)return!1}}}}}}return!0},Mt=function(le){return le.indexOf("-")>0},$n=function(le){let Ge,Et,Kn,Vr;Hr("beforeSanitizeAttributes",le,null);const{attributes:Wn}=le;if(!Wn)return;const Mn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};for(Vr=Wn.length;Vr--;){Ge=Wn[Vr];const{name:o0,namespaceURI:P4}=Ge;if(Et=o0==="value"?Ge.value:_Je(Ge.value),Kn=Wt(o0),Mn.attrName=Kn,Mn.attrValue=Et,Mn.keepAttr=!0,Mn.forceKeepAttr=void 0,Hr("uponSanitizeAttribute",le,Mn),Et=Mn.attrValue,Mn.forceKeepAttr||(Ni(o0,le),!Mn.keepAttr))continue;if(!Ue&&l0(/\/>/i,Et)){Ni(o0,le);continue}qe&&(Et=ec(Et,N," "),Et=ec(Et,O," "),Et=ec(Et,y," "));const P7=Wt(le.nodeName);if(Og(P7,Kn,Et)){if(ou&&(Kn==="id"||Kn==="name")&&(Ni(o0,le),Et=Vt+Et),x&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!P4)switch(E.getAttributeType(P7,Kn)){case"TrustedHTML":{Et=x.createHTML(Et);break}case"TrustedScriptURL":{Et=x.createScriptURL(Et);break}}try{P4?le.setAttributeNS(P4,o0,Et):le.setAttribute(o0,Et),dae(e.removed)}catch{}}}Hr("afterSanitizeAttributes",le,null)},ia=function Xe(le){let Ge;const Et=fo(le);for(Hr("beforeSanitizeShadowDOM",le,null);Ge=Et.nextNode();)Hr("uponSanitizeShadowNode",Ge,null),!Cd(Ge)&&(Ge.content instanceof r&&Xe(Ge.content),$n(Ge));Hr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(Xe){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ge,Et,Kn,Vr;if(Jt=!Xe,Jt&&(Xe=""),typeof Xe!="string"&&!Va(Xe))if(typeof Xe.toString=="function"){if(Xe=Xe.toString(),typeof Xe!="string")throw nC("dirty is not a string, aborting")}else throw nC("toString is not a function");if(!e.isSupported)return Xe;if(de||zn(le),e.removed=[],typeof Xe=="string"&&(se=!1),se){if(Xe.nodeName){const o0=Wt(Xe.nodeName);if(!H[o0]||X[o0])throw nC("root node is forbidden and cannot be sanitized in-place")}}else if(Xe instanceof o)Ge=ka(""),Et=Ge.ownerDocument.importNode(Xe,!0),Et.nodeType===1&&Et.nodeName==="BODY"||Et.nodeName==="HTML"?Ge=Et:Ge.appendChild(Et);else{if(!Be&&!qe&&!Se&&Xe.indexOf("<")===-1)return x&&bt?x.createHTML(Xe):Xe;if(Ge=ka(Xe),!Ge)return Be?null:bt?b:""}Ge&&he&&Vn(Ge.firstChild);const Wn=fo(se?Xe:Ge);for(;Kn=Wn.nextNode();)Cd(Kn)||(Kn.content instanceof r&&ia(Kn.content),$n(Kn));if(se)return Xe;if(Be){if(je)for(Vr=F.call(Ge.ownerDocument);Ge.firstChild;)Vr.appendChild(Ge.firstChild);else Vr=Ge;return(U.shadowroot||U.shadowrootmode)&&(Vr=w.call(t,Vr,!0)),Vr}let Mn=Se?Ge.outerHTML:Ge.innerHTML;return Se&&H["!doctype"]&&Ge.ownerDocument&&Ge.ownerDocument.doctype&&Ge.ownerDocument.doctype.name&&l0(Qve,Ge.ownerDocument.doctype.name)&&(Mn=" +`+Mn),qe&&(Mn=ec(Mn,N," "),Mn=ec(Mn,O," "),Mn=ec(Mn,y," ")),x&&bt?x.createHTML(Mn):Mn},e.setConfig=function(Xe){zn(Xe),de=!0},e.clearConfig=function(){Ln=null,de=!1},e.isValidAttribute=function(Xe,le,Ge){Ln||zn({});const Et=Wt(Xe),Kn=Wt(le);return Og(Et,Kn,Ge)},e.addHook=function(Xe,le){typeof le=="function"&&(z[Xe]=z[Xe]||[],uC(z[Xe],le))},e.removeHook=function(Xe){if(z[Xe])return dae(z[Xe])},e.removeHooks=function(Xe){z[Xe]&&(z[Xe]=[])},e.removeAllHooks=function(){z={}},e}var K1=Xve();K1.version;K1.isSupported;const e6e=K1.sanitize;K1.setConfig;K1.clearConfig;K1.isValidAttribute;const t6e=K1.addHook,u6e=K1.removeHook;K1.removeHooks;K1.removeAllHooks;var Ot;(function(u){u.inMemory="inmemory",u.vscode="vscode",u.internal="private",u.walkThrough="walkThrough",u.walkThroughSnippet="walkThroughSnippet",u.http="http",u.https="https",u.file="file",u.mailto="mailto",u.untitled="untitled",u.data="data",u.command="command",u.vscodeRemote="vscode-remote",u.vscodeRemoteResource="vscode-remote-resource",u.vscodeManagedRemoteResource="vscode-managed-remote-resource",u.vscodeUserData="vscode-userdata",u.vscodeCustomEditor="vscode-custom-editor",u.vscodeNotebookCell="vscode-notebook-cell",u.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",u.vscodeNotebookCellOutput="vscode-notebook-cell-output",u.vscodeInteractiveInput="vscode-interactive-input",u.vscodeSettings="vscode-settings",u.vscodeWorkspaceTrust="vscode-workspace-trust",u.vscodeTerminal="vscode-terminal",u.vscodeChatSesssion="vscode-chat-editor",u.webviewPanel="webview-panel",u.vscodeWebview="vscode-webview",u.extension="extension",u.vscodeFileResource="vscode-file",u.tmp="tmp",u.vsls="vsls",u.vscodeSourceControl="vscode-scm"})(Ot||(Ot={}));const jJe="tkn";class HJe{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${Ot.vscodeRemoteResource}`}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(o){return zt(o),e}const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const i=this._ports[t],r=this._connectionTokens[t];let a=`path=${encodeURIComponent(e.path)}`;return typeof r=="string"&&(a+=`&${jJe}=${encodeURIComponent(r)}`),dt.from({scheme:dg?this._preferredWebSchema:Ot.vscodeRemoteResource,authority:`${n}:${i}`,path:this._remoteResourcesPath,query:a})}}const n6e=new HJe;class hk{uriToBrowserUri(e){return e.scheme===Ot.vscodeRemote?n6e.rewrite(e):e.scheme===Ot.file&&(Oc||NGe&&kl.origin===`${Ot.vscodeFileResource}://${hk.FALLBACK_AUTHORITY}`)?e.with({scheme:Ot.vscodeFileResource,authority:e.authority||hk.FALLBACK_AUTHORITY,query:null,fragment:null}):e}}hk.FALLBACK_AUTHORITY="vscode-app";const i6e=new hk;var pae;(function(u){const e=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);u.CoopAndCoep=Object.freeze(e.get("3"));const t="vscode-coi";function n(r){let a;typeof r=="string"?a=new URL(r).searchParams:r instanceof URL?a=r.searchParams:dt.isUri(r)&&(a=new URL(r.toString(!0)).searchParams);const o=a==null?void 0:a.get(t);if(o)return e.get(o)}u.getHeadersFromQuery=n;function i(r,a,o){if(!globalThis.crossOriginIsolated)return;const s=a&&o?"3":o?"2":"1";r instanceof URLSearchParams?r.set(t,s):r[t]=s}u.addSearchParam=i})(pae||(pae={}));const{registerWindow:w$n,getWindows:VJe,onDidCreateWindow:L$n}=function(){const u=[],e=new Q;return{onDidCreateWindow:e.event,registerWindow(t){u.push(t);const n=new pe;return n.add(ft(()=>{const i=u.indexOf(t);i!==-1&&u.splice(i,1)})),e.fire({window:t,disposableStore:n}),n},getWindows(){return u}}}();function Nr(u){for(;u.firstChild;)u.firstChild.remove()}function XQ(u){var e;return(e=u==null?void 0:u.isConnected)!==null&&e!==void 0?e:!1}class $Je{constructor(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._options=i||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function ce(u,e,t,n){return new $Je(u,e,t,n)}function r6e(u){return function(e){return u(new x0(e))}}function KJe(u){return function(e){return u(new ln(e))}}const xi=function(e,t,n,i){let r=n;return t==="click"||t==="mousedown"?r=r6e(n):(t==="keydown"||t==="keypress"||t==="keyup")&&(r=KJe(n)),ce(e,t,r,i)},WJe=function(e,t,n){const i=r6e(t);return GJe(e,i,n)};function GJe(u,e,t){return ce(u,Zc&&QQ.pointerEvents?Me.POINTER_DOWN:Me.MOUSE_DOWN,e,t)}let CB,N0;class lj{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){zt(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let u=[],e=null,t=!1,n=!1;const i=()=>{for(t=!1,e=u,u=[],n=!0;e.length>0;)e.sort(lj.sort),e.shift().execute();n=!1};N0=(r,a=0)=>{const o=new lj(r,a);return u.push(o),t||(t=!0,requestAnimationFrame(i)),o},CB=(r,a)=>{if(n){const o=new lj(r,a);return e.push(o),o}else return N0(r,a)}})();function qN(u){return u.ownerDocument.defaultView.getComputedStyle(u,null)}function c6(u){var e;const t=u.ownerDocument,n=(e=t.defaultView)===null||e===void 0?void 0:e.window;if(u!==t.body)return new pu(u.clientWidth,u.clientHeight);if(Zc&&(n!=null&&n.visualViewport))return new pu(n.visualViewport.width,n.visualViewport.height);if(n!=null&&n.innerWidth&&n.innerHeight)return new pu(n.innerWidth,n.innerHeight);if(t.body&&t.body.clientWidth&&t.body.clientHeight)return new pu(t.body.clientWidth,t.body.clientHeight);if(t.documentElement&&t.documentElement.clientWidth&&t.documentElement.clientHeight)return new pu(t.documentElement.clientWidth,t.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class oi{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,n){const i=qN(e),r=i?i.getPropertyValue(t):"0";return oi.convertToPixels(e,r)}static getBorderLeftWidth(e){return oi.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return oi.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return oi.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return oi.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return oi.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return oi.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return oi.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return oi.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return oi.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return oi.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return oi.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return oi.getDimension(e,"margin-bottom","marginBottom")}}class pu{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new pu(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof pu?e:new pu(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}pu.None=new pu(0,0);function a6e(u){let e=u.offsetParent,t=u.offsetTop,n=u.offsetLeft;for(;(u=u.parentNode)!==null&&u!==u.ownerDocument.body&&u!==u.ownerDocument.documentElement;){t-=u.scrollTop;const i=o6e(u)?null:qN(u);i&&(n-=i.direction!=="rtl"?u.scrollLeft:-u.scrollLeft),u===e&&(n+=oi.getBorderLeftWidth(u),t+=oi.getBorderTopWidth(u),t+=u.offsetTop,n+=u.offsetLeft,e=u.offsetParent)}return{left:n,top:t}}function UJe(u,e,t){typeof e=="number"&&(u.style.width=`${e}px`),typeof t=="number"&&(u.style.height=`${t}px`)}function ji(u){var e,t,n,i;const r=u.getBoundingClientRect();return{left:r.left+((t=(e=u.ownerDocument.defaultView)===null||e===void 0?void 0:e.scrollX)!==null&&t!==void 0?t:0),top:r.top+((i=(n=u.ownerDocument.defaultView)===null||n===void 0?void 0:n.scrollY)!==null&&i!==void 0?i:0),width:r.width,height:r.height}}function qJe(u){let e=u,t=1;do{const n=qN(e).zoom;n!=null&&n!=="1"&&(t*=n),e=e.parentElement}while(e!==null&&e!==e.ownerDocument.documentElement);return t}function ko(u){const e=oi.getMarginLeft(u)+oi.getMarginRight(u);return u.offsetWidth+e}function cj(u){const e=oi.getBorderLeftWidth(u)+oi.getBorderRightWidth(u),t=oi.getPaddingLeft(u)+oi.getPaddingRight(u);return u.offsetWidth-e-t}function JJe(u){const e=oi.getBorderTopWidth(u)+oi.getBorderBottomWidth(u),t=oi.getPaddingTop(u)+oi.getPaddingBottom(u);return u.offsetHeight-e-t}function Rf(u){const e=oi.getMarginTop(u)+oi.getMarginBottom(u);return u.offsetHeight+e}function Qr(u,e){for(;u;){if(u===e)return!0;u=u.parentNode}return!1}function ZJe(u,e,t){for(;u&&u.nodeType===u.ELEMENT_NODE;){if(u.classList.contains(e))return u;if(t){if(typeof t=="string"){if(u.classList.contains(t))return null}else if(u===t)return null}u=u.parentNode}return null}function dj(u,e,t){return!!ZJe(u,e,t)}function o6e(u){return u&&!!u.host&&!!u.mode}function bB(u){return!!w3(u)}function w3(u){for(var e;u.parentNode;){if(u===((e=u.ownerDocument)===null||e===void 0?void 0:e.body))return null;u=u.parentNode}return o6e(u)?u:null}function yl(){let u=JN().activeElement;for(;u!=null&&u.shadowRoot;)u=u.shadowRoot.activeElement;return u}function JN(){var u;return(u=[document,...VJe().map(t=>t.document)].find(t=>t.hasFocus()))!==null&&u!==void 0?u:document}function P0(u=document.getElementsByTagName("head")[0],e){const t=document.createElement("style");return t.type="text/css",t.media="screen",e==null||e(t),u.appendChild(t),t}let hj=null;function s6e(){return hj||(hj=P0()),hj}function YJe(u){var e,t;return!((e=u==null?void 0:u.sheet)===null||e===void 0)&&e.rules?u.sheet.rules:!((t=u==null?void 0:u.sheet)===null||t===void 0)&&t.cssRules?u.sheet.cssRules:[]}function EW(u,e,t=s6e()){!t||!e||t.sheet.insertRule(u+"{"+e+"}",0)}function Dae(u,e=s6e()){if(!e)return;const t=YJe(e),n=[];for(let i=0;i=0;i--)e.sheet.deleteRule(n[i])}function eX(u){return typeof HTMLElement=="object"?u instanceof HTMLElement:u&&typeof u=="object"&&u.nodeType===1&&typeof u.nodeName=="string"}const Me={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:t3?"webkitAnimationStart":"animationstart",ANIMATION_END:t3?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:t3?"webkitAnimationIteration":"animationiteration"};function QJe(u){const e=u;return!!(e&&typeof e.preventDefault=="function"&&typeof e.stopPropagation=="function")}const It={stop:(u,e)=>(u.preventDefault(),e&&u.stopPropagation(),u)};function XJe(u){const e=[];for(let t=0;u&&u.nodeType===u.ELEMENT_NODE;t++)e[t]=u.scrollTop,u=u.parentNode;return e}function eZe(u,e){for(let t=0;u&&u.nodeType===u.ELEMENT_NODE;t++)u.scrollTop!==e[t]&&(u.scrollTop=e[t]),u=u.parentNode}class kB extends ne{static hasFocusWithin(e){if(eX(e)){const t=w3(e),n=t?t.activeElement:e.ownerDocument.activeElement;return Qr(n,e)}else return Qr(window.document.activeElement,window.document)}constructor(e){super(),this._onDidFocus=this._register(new Q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event;let t=kB.hasFocusWithin(e),n=!1;const i=()=>{n=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(n=!0,window.setTimeout(()=>{n&&(n=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{kB.hasFocusWithin(e)!==t&&(t?r():i())},this._register(ce(e,Me.FOCUS,i,!0)),this._register(ce(e,Me.BLUR,r,!0)),e instanceof HTMLElement&&(this._register(ce(e,Me.FOCUS_IN,()=>this._refreshStateHandler())),this._register(ce(e,Me.FOCUS_OUT,()=>this._refreshStateHandler())))}}function y1(u){return new kB(u)}function me(u,...e){if(u.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function l6e(u,e){return u.insertBefore(e,u.firstChild),e}function Pr(u,...e){u.innerText="",me(u,...e)}const tZe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ek;(function(u){u.HTML="http://www.w3.org/1999/xhtml",u.SVG="http://www.w3.org/2000/svg"})(Ek||(Ek={}));function c6e(u,e,t,...n){const i=tZe.exec(e);if(!i)throw new Error("Bad use of emmet");const r=i[1]||"div";let a;return u!==Ek.HTML?a=document.createElementNS(u,r):a=document.createElement(r),i[3]&&(a.id=i[3]),i[4]&&(a.className=i[4].replace(/\./g," ").trim()),t&&Object.entries(t).forEach(([o,s])=>{typeof s>"u"||(/^on\w+$/.test(o)?a[o]=s:o==="selected"?s&&a.setAttribute(o,"true"):a.setAttribute(o,s))}),a.append(...n),a}function ve(u,e,...t){return c6e(Ek.HTML,u,e,...t)}ve.SVG=function(u,e,...t){return c6e(Ek.SVG,u,e,...t)};function uZe(u,...e){u?ns(...e):Ya(...e)}function ns(...u){for(const e of u)e.style.display="",e.removeAttribute("aria-hidden")}function Ya(...u){for(const e of u)e.style.display="none",e.setAttribute("aria-hidden","true")}function xae(u){const e=window.devicePixelRatio*u;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function d6e(u){window.open(u,"_blank","noopener")}function nZe(u){const e=()=>{u(),t=N0(e)};let t=N0(e);return ft(()=>t.dispose())}n6e.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Nm(u){return u?`url('${i6e.uriToBrowserUri(u).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function vae(u){return`'${u.replace(/'/g,"%27")}'`}function n3(u,e){if(u!==void 0){const t=u.match(/^\s*var\((.+)\)$/);if(t){const n=t[1].split(",",2);return n.length===2&&(e=n3(n[1].trim(),e)),`var(${n[0]}, ${e})`}return u}return e}function iZe(u,e=!1){const t=document.createElement("a");return t6e("afterSanitizeAttributes",n=>{for(const i of["href","src"])if(n.hasAttribute(i)){const r=n.getAttribute(i);if(i==="href"&&r.startsWith("#"))continue;if(t.href=r,!u.includes(t.protocol.replace(/:$/,""))){if(e&&i==="src"&&t.href.startsWith("data:"))continue;n.removeAttribute(i)}}}),ft(()=>{u6e("afterSanitizeAttributes")})}const rZe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);class Nh extends Q{constructor(){super(),this._subscriptions=new pe,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(ce(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new ln(e);if(!(t.keyCode===6&&e.repeat)){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(t.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(ce(window,"keyup",e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(ce(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(ce(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(ce(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(ce(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Nh.instance||(Nh.instance=new Nh),Nh.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class aZe extends ne{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(ce(this.element,Me.DRAG_ENTER,e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter(e)})),this._register(ce(this.element,Me.DRAG_OVER,e=>{var t,n;e.preventDefault(),(n=(t=this.callbacks).onDragOver)===null||n===void 0||n.call(t,e,e.timeStamp-this.dragStartTime)})),this._register(ce(this.element,Me.DRAG_LEAVE,e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(e))})),this._register(ce(this.element,Me.DRAG_END,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(e)})),this._register(ce(this.element,Me.DROP,e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(e)}))}}const oZe=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function yr(u,...e){let t,n;Array.isArray(e[0])?(t={},n=e[0]):(t=e[0]||{},n=e[1]);const i=oZe.exec(u);if(!i||!i.groups)throw new Error("Bad use of h");const r=i.groups.tag||"div",a=document.createElement(r);i.groups.id&&(a.id=i.groups.id);const o=[];if(i.groups.class)for(const l of i.groups.class.split("."))l!==""&&o.push(l);if(t.className!==void 0)for(const l of t.className.split("."))l!==""&&o.push(l);o.length>0&&(a.className=o.join(" "));const s={};if(i.groups.name&&(s[i.groups.name]=a),n)for(const l of n)l instanceof HTMLElement?a.appendChild(l):typeof l=="string"?a.append(l):"root"in l&&(Object.assign(s,l),a.appendChild(l.root));for(const[l,c]of Object.entries(t))if(l!=="className")if(l==="style")for(const[d,h]of Object.entries(c))a.style.setProperty(Cae(d),typeof h=="number"?h+"px":""+h);else l==="tabIndex"?a.tabIndex=c:a.setAttribute(Cae(l),c.toString());return s.root=a,s}function Cae(u){return u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}let ZN=class{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let n=t.kbExpr;this.precondition&&(n?n=Ee.and(n,this.precondition):n=this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:n,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Po.registerKeybindingRule(i)}}ru.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){Lr.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}};class d6 extends ZN{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,n,i){return this._implementations.push({priority:e,name:t,implementation:n,when:i}),this._implementations.sort((r,a)=>a.priority-r.priority),{dispose:()=>{for(let r=0;r{if(o.get(pt).contextMatchesRules(n??void 0))return i(o,a,t)})}runCommand(e,t){return xr.runEditorCommand(e,t,this.precondition,(n,i,r)=>this.runEditorCommand(n,i,r))}}class $e extends xr{static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function n(i){return i.menuId||(i.menuId=K.EditorContext),i.title||(i.title=e.label),i.when=Ee.and(e.precondition,i.when),i}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(n)):e.contextMenuOpts&&t.push(n(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super($e.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})}reportTelemetry(e,t){e.get(i0).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class E6e extends $e{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((n,i)=>i[0]-n[0]),{dispose:()=>{for(let n=0;n{var a,o;const s=r.get(pt),l=r.get(r0);if(!s.contextMatchesRules((a=this.desc.precondition)!==null&&a!==void 0?a:void 0)){l.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(o=this.desc.precondition)===null||o===void 0?void 0:o.serialize());return}return this.runEditorCommand(r,i,...t)})}}function W1(u,e){ru.registerCommand(u,function(t,...n){const i=t.get(mt),[r,a]=n;Ru(dt.isUri(r)),Ru(ee.isIPosition(a));const o=t.get(_n).getModel(r);if(o){const s=ee.lift(a);return i.invokeFunction(e,o,s,...n.slice(2))}return t.get(Vo).createModelReference(r).then(s=>new Promise((l,c)=>{try{const d=i.invokeFunction(e,s.object.textEditorModel,ee.lift(a),n.slice(2));l(d)}catch(d){c(d)}}).finally(()=>{s.dispose()}))})}function ze(u){return p0.INSTANCE.registerEditorCommand(u),u}function be(u){const e=new u;return p0.INSTANCE.registerEditorAction(e),e}function m6e(u){return p0.INSTANCE.registerEditorAction(u),u}function sZe(u){p0.INSTANCE.registerEditorAction(u)}function fu(u,e,t){p0.INSTANCE.registerEditorContribution(u,e,t)}var ux;(function(u){function e(a){return p0.INSTANCE.getEditorCommand(a)}u.getEditorCommand=e;function t(){return p0.INSTANCE.getEditorActions()}u.getEditorActions=t;function n(){return p0.INSTANCE.getEditorContributions()}u.getEditorContributions=n;function i(a){return p0.INSTANCE.getEditorContributions().filter(o=>a.indexOf(o.id)>=0)}u.getSomeEditorContributions=i;function r(){return p0.INSTANCE.getDiffEditorContributions()}u.getDiffEditorContributions=r})(ux||(ux={}));const lZe={EditorCommonContributions:"editor.contributions"};class p0{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,n){this.editorContributions.push({id:e,ctor:t,instantiation:n})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}p0.INSTANCE=new p0;jn.add(lZe.EditorCommonContributions,p0.INSTANCE);function iA(u){return u.register(),u}const g6e=iA(new d6({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:K.MenubarEditMenu,group:"1_do",title:v({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:K.CommandPalette,group:"",title:v("undo","Undo"),order:1}]}));iA(new h6e(g6e,{id:"default:undo",precondition:void 0}));const f6e=iA(new d6({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:K.MenubarEditMenu,group:"1_do",title:v({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:K.CommandPalette,group:"",title:v("redo","Redo"),order:1}]}));iA(new h6e(f6e,{id:"default:redo",precondition:void 0}));const cZe=iA(new d6({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:K.CommandPalette,group:"",title:v("selectAll","Select All"),order:1}]})),p6e=Symbol("MicrotaskDelay");var c0=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hb=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};function mW(u){return!!u&&typeof u.then=="function"}function Ui(u){const e=new vi,t=u(e.token),n=new Promise((i,r)=>{const a=e.token.onCancellationRequested(()=>{a.dispose(),e.dispose(),r(new hg)});Promise.resolve(t).then(o=>{a.dispose(),e.dispose(),i(o)},o=>{a.dispose(),e.dispose(),r(o)})});return new class{cancel(){e.cancel()}then(i,r){return n.then(i,r)}catch(i){return this.then(void 0,i)}finally(i){return n.finally(i)}}}function YN(u,e,t){return new Promise((n,i)=>{const r=e.onCancellationRequested(()=>{r.dispose(),n(t)});u.then(n,i).finally(()=>r.dispose())})}class dZe{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{if(this.queuedPromise=null,this.isDisposed)return;const n=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,n};this.queuedPromise=new Promise(n=>{this.activePromise.then(t,t).then(n)})}return new Promise((t,n)=>{this.queuedPromise.then(t,n)})}return this.activePromise=e(),new Promise((t,n)=>{this.activePromise.then(i=>{this.activePromise=null,t(i)},i=>{this.activePromise=null,n(i)})})}dispose(){this.isDisposed=!0}}const hZe=(u,e)=>{let t=!0;const n=setTimeout(()=>{t=!1,e()},u);return{isTriggered:()=>t,dispose:()=>{clearTimeout(n),t=!1}}},EZe=u=>{let e=!0;return queueMicrotask(()=>{e&&(e=!1,u())}),{isTriggered:()=>e,dispose:()=>{e=!1}}};class Tl{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,r)=>{this.doResolve=i,this.doReject=r}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const i=this.task;return this.task=null,i()}}));const n=()=>{var i;this.deferred=null,(i=this.doResolve)===null||i===void 0||i.call(this,null)};return this.deferred=t===p6e?EZe(n):hZe(t,n),this.completionPromise}isTriggered(){var e;return!!(!((e=this.deferred)===null||e===void 0)&&e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&((e=this.doReject)===null||e===void 0||e.call(this,new hg),this.completionPromise=null)}cancelTimeout(){var e;(e=this.deferred)===null||e===void 0||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class D6e{constructor(e){this.delayer=new Tl(e),this.throttler=new dZe}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function Pm(u,e){return e?new Promise((t,n)=>{const i=setTimeout(()=>{r.dispose(),t()},u),r=e.onCancellationRequested(()=>{clearTimeout(i),r.dispose(),n(new hg)})}):Ui(t=>Pm(u,t))}function Rm(u,e=0,t){const n=setTimeout(()=>{u(),t&&i.dispose()},e),i=ft(()=>{clearTimeout(n),t==null||t.deleteAndLeak(i)});return t==null||t.add(i),i}function x6e(u,e=n=>!!n,t=null){let n=0;const i=u.length,r=()=>{if(n>=i)return Promise.resolve(t);const a=u[n++];return Promise.resolve(a()).then(s=>e(s)?Promise.resolve(s):r())};return r()}class Vl{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class rA{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class Hu{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;(e=this.runner)===null||e===void 0||e.call(this)}}let Ph;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?Ph=u=>{lve(()=>{if(e)return;const t=Date.now()+15;u(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,t-Date.now())}}))});let e=!1;return{dispose(){e||(e=!0)}}}:Ph=(u,e)=>{const t=requestIdleCallback(u,typeof e=="number"?{timeout:e}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(t))}}}})();class VS{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=Ph(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class QN{get isRejected(){var e;return((e=this.outcome)===null||e===void 0?void 0:e.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new hg)}}var gW;(function(u){function e(n){return c0(this,void 0,void 0,function*(){let i;const r=yield Promise.all(n.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return r})}u.settled=e;function t(n){return new Promise((i,r)=>c0(this,void 0,void 0,function*(){try{yield n(i,r)}catch(a){r(a)}}))}u.withAsyncBody=t})(gW||(gW={}));class _i{static fromArray(e){return new _i(t=>{t.emitMany(e)})}static fromPromise(e){return new _i(t=>c0(this,void 0,void 0,function*(){t.emitMany(yield e)}))}static fromPromises(e){return new _i(t=>c0(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>c0(this,void 0,void 0,function*(){return t.emitOne(yield n)})))}))}static merge(e){return new _i(t=>c0(this,void 0,void 0,function*(){yield Promise.all(e.map(n=>{var i,r,a;return c0(this,void 0,void 0,function*(){var o,s,l,c;try{for(i=!0,r=hb(n);a=yield r.next(),o=a.done,!o;i=!0){c=a.value,i=!1;const d=c;t.emitOne(d)}}catch(d){s={error:d}}finally{try{!i&&!o&&(l=r.return)&&(yield l.call(r))}finally{if(s)throw s.error}}})}))}))}constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new Q,queueMicrotask(()=>c0(this,void 0,void 0,function*(){const t={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{yield Promise.resolve(e(t)),this.resolve()}catch(n){this.reject(n)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:()=>c0(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(ec0(this,void 0,void 0,function*(){var i,r,a,o;try{for(var s=!0,l=hb(e),c;c=yield l.next(),i=c.done,!i;s=!0){o=c.value,s=!1;const d=o;n.emitOne(t(d))}}catch(d){r={error:d}}finally{try{!s&&!i&&(a=l.return)&&(yield a.call(l))}finally{if(r)throw r.error}}}))}map(e){return _i.map(this,e)}static filter(e,t){return new _i(n=>c0(this,void 0,void 0,function*(){var i,r,a,o;try{for(var s=!0,l=hb(e),c;c=yield l.next(),i=c.done,!i;s=!0){o=c.value,s=!1;const d=o;t(d)&&n.emitOne(d)}}catch(d){r={error:d}}finally{try{!s&&!i&&(a=l.return)&&(yield a.call(l))}finally{if(r)throw r.error}}}))}filter(e){return _i.filter(this,e)}static coalesce(e){return _i.filter(e,t=>!!t)}coalesce(){return _i.coalesce(this)}static toPromise(e){var t,n,i,r,a,o,s;return c0(this,void 0,void 0,function*(){const l=[];try{for(t=!0,n=hb(e);i=yield n.next(),r=i.done,!r;t=!0){s=i.value,t=!1;const c=s;l.push(c)}}catch(c){a={error:c}}finally{try{!t&&!r&&(o=n.return)&&(yield o.call(n))}finally{if(a)throw a.error}}return l})}toPromise(){return _i.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}}_i.EMPTY=_i.fromArray([]);class mZe extends _i{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function gZe(u){const e=new vi,t=u(e.token);return new mZe(e,n=>c0(this,void 0,void 0,function*(){var i,r,a,o;const s=e.token.onCancellationRequested(()=>{s.dispose(),e.dispose(),n.reject(new hg)});try{try{for(var l=!0,c=hb(t),d;d=yield c.next(),i=d.done,!i;l=!0){o=d.value,l=!1;const h=o;if(e.token.isCancellationRequested)return;n.emitOne(h)}}catch(h){r={error:h}}finally{try{!l&&!i&&(a=c.return)&&(yield a.call(c))}finally{if(r)throw r.error}}s.dispose(),e.dispose()}catch(h){s.dispose(),e.dispose(),n.reject(h)}}))}const fZe="$initialize";let bae=!1;function fW(u){dg&&(bae||(bae=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(u.message))}class pZe{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.method=n,this.args=i,this.type=0}}class kae{constructor(e,t,n,i){this.vsWorker=e,this.seq=t,this.res=n,this.err=i,this.type=1}}class DZe{constructor(e,t,n,i){this.vsWorker=e,this.req=t,this.eventName=n,this.arg=i,this.type=2}}class xZe{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class vZe{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class CZe{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const n=String(++this._lastSentReq);return new Promise((i,r)=>{this._pendingReplies[n]={resolve:i,reject:r},this._send(new pZe(this._workerId,n,e,t))})}listen(e,t){let n=null;const i=new Q({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,i),this._send(new DZe(this._workerId,n,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new vZe(this._workerId,n)),n=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then(i=>{this._send(new kae(this._workerId,t,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Yre(i.detail)),this._send(new kae(this._workerId,t,void 0,Yre(i)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.eventName,e.arg)(i=>{this._send(new xZe(this._workerId,t,i))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(c)},c=>{i==null||i(c)})),this._protocol=new CZe({sendMessage:(c,d)=>{this._worker.postMessage(c,d)},handleMessage:(c,d)=>{if(typeof n[c]!="function")return Promise.reject(new Error("Missing method "+c+" on main thread host."));try{return Promise.resolve(n[c].apply(n,d))}catch(h){return Promise.reject(h)}},handleEvent:(c,d)=>{if(C6e(c)){const h=n[c].call(n,d);if(typeof h!="function")throw new Error(`Missing dynamic event ${c} on main thread host.`);return h}if(v6e(c)){const h=n[c];if(typeof h!="function")throw new Error(`Missing event ${c} on main thread host.`);return h}throw new Error(`Malformed event name ${c}`)}}),this._protocol.setWorkerId(this._worker.getId());let r=null;const a=globalThis.require;typeof a<"u"&&typeof a.getConfig=="function"?r=a.getConfig():typeof globalThis.requirejs<"u"&&(r=globalThis.requirejs.s.contexts._.config);const o=BQ(n);this._onModuleLoaded=this._protocol.sendMessage(fZe,[this._worker.getId(),JSON.parse(JSON.stringify(r)),t,o]);const s=(c,d)=>this._request(c,d),l=(c,d)=>this._protocol.listen(c,d);this._lazyProxy=new Promise((c,d)=>{i=d,this._onModuleLoaded.then(h=>{c(kZe(h,s,l))},h=>{d(h),this._onError("Worker failed to load "+t,h)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((n,i)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(n,i)},i)})}_onError(e,t){console.error(e),console.info(t)}}function v6e(u){return u[0]==="o"&&u[1]==="n"&&Pd(u.charCodeAt(2))}function C6e(u){return/^onDynamic/.test(u)&&Pd(u.charCodeAt(9))}function kZe(u,e,t){const n=a=>function(){const o=Array.prototype.slice.call(arguments,0);return e(a,o)},i=a=>function(o){return t(a,o)},r={};for(const a of u){if(C6e(a)){r[a]=i(a);continue}if(v6e(a)){r[a]=t(a,void 0);continue}r[a]=n(a)}return r}function b4(u,e){var t;const n=globalThis.MonacoEnvironment;if(n!=null&&n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(u,e)}catch(i){zt(i);return}try{return(t=window.trustedTypes)===null||t===void 0?void 0:t.createPolicy(u,e)}catch(i){zt(i);return}}const Fae=b4("defaultWorkerFactory",{createScriptURL:u=>u});function FZe(u){const e=globalThis.MonacoEnvironment;if(e){if(typeof e.getWorker=="function")return e.getWorker("workerMain.js",u);if(typeof e.getWorkerUrl=="function"){const t=e.getWorkerUrl("workerMain.js",u);return new Worker(Fae?Fae.createScriptURL(t):t,{name:u})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function yZe(u){return typeof u.then=="function"}class AZe{constructor(e,t,n,i,r){this.id=t,this.label=n;const a=FZe(n);yZe(a)?this.worker=a:this.worker=Promise.resolve(a),this.postMessage(e,[]),this.worker.then(o=>{o.onmessage=function(s){i(s.data)},o.onmessageerror=r,typeof o.addEventListener=="function"&&o.addEventListener("error",r)})}getId(){return this.id}postMessage(e,t){var n;(n=this.worker)===null||n===void 0||n.then(i=>{try{i.postMessage(e,t)}catch(r){zt(r),zt(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:r}))}})}dispose(){var e;(e=this.worker)===null||e===void 0||e.then(t=>t.terminate()),this.worker=null}}class XN{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,n){const i=++XN.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new AZe(e,i,this._label||"anonymous"+i,t,r=>{fW(r),this._webWorkerFailedBeforeError=r,n(r)})}}XN.LAST_WORKER_ID=0;var wi;(function(u){u[u.None=0]="None",u[u.Indent=1]="Indent",u[u.IndentOutdent=2]="IndentOutdent",u[u.Outdent=3]="Outdent"})(wi||(wi={}));class Ej{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,n=e.notIn.length;t0&&u.getLanguageId(a-1)===i;)a--;return new SZe(u,i,a,r+1,u.getStartOffset(a),u.getEndOffset(r))}class SZe{constructor(e,t,n,i,r,a){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=r,this._lastCharOffset=a}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function _d(u){return(u&3)!==0}class Yx{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new Ej(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new Ej({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Ej({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `;Yx.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> - `;const yae=typeof Buffer<"u";let mj;class tP{static wrap(e){return yae&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new tP(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return yae?this.buffer.toString():(mj||(mj=new TextDecoder),mj.decode(this.buffer))}}function BZe(u,e){return u[e+0]<<0>>>0|u[e+1]<<8>>>0}function wZe(u,e,t){u[t+0]=e&255,e=e>>>8,u[t+1]=e&255}function lc(u,e){return u[e]*Math.pow(2,24)+u[e+1]*Math.pow(2,16)+u[e+2]*Math.pow(2,8)+u[e+3]}function cc(u,e,t){u[t+3]=e,e=e>>>8,u[t+2]=e,e=e>>>8,u[t+1]=e,e=e>>>8,u[t]=e}function Aae(u,e){return u[e]}function _ae(u,e,t){u[t]=e}let gj;function b6e(){return gj||(gj=new TextDecoder("UTF-16LE")),gj}let fj;function LZe(){return fj||(fj=new TextDecoder("UTF-16BE")),fj}let pj;function k6e(){return pj||(pj=cve()?b6e():LZe()),pj}function zZe(u,e,t){const n=new Uint16Array(u.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?MZe(u,e,t):b6e().decode(n)}function MZe(u,e,t){const n=[];let i=0;for(let r=0;r=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[a[0].toLowerCase(),a[1].toLowerCase()]);const t=[];for(let a=0;a{const[s,l]=a,[c,d]=o;return s===c||s===d||l===c||l===d},i=(a,o)=>{const s=Math.min(a,o),l=Math.max(a,o);for(let c=0;c0&&r.push({open:o,close:s})}return r}class NZe{constructor(e,t){this._richEditBracketsBrand=void 0;const n=TZe(t);this.brackets=n.map((i,r)=>new FB(e,r,i.open,i.close,PZe(i.open,i.close,n,r),RZe(i.open,i.close,n,r))),this.forwardRegex=IZe(this.brackets),this.reversedRegex=OZe(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const i of this.brackets){for(const r of i.open)this.textIsBracket[r]=i,this.textIsOpenBracket[r]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,r.length);for(const r of i.close)this.textIsBracket[r]=i,this.textIsOpenBracket[r]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,r.length)}}}function F6e(u,e,t,n){for(let i=0,r=e.length;i=0&&n.push(o);for(const o of a.close)o.indexOf(u)>=0&&n.push(o)}}function y6e(u,e){return u.length-e.length}function uP(u){if(u.length<=1)return u;const e=[],t=new Set;for(const n of u)t.has(n)||(e.push(n),t.add(n));return e}function PZe(u,e,t,n){let i=[];i=i.concat(u),i=i.concat(e);for(let r=0,a=i.length;r=0;a--)i[r++]=n.charCodeAt(a);return k6e().decode(i)}let e=null,t=null;return function(i){return e!==i&&(e=i,t=u(e)),t}}();class ul{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const a=n.length-(r.index||0),o=r[0].length,s=i+a;return new j(t,s-o+1,t,s+1)}static findPrevBracketInRange(e,t,n,i,r){const o=tX(n).substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const a=r.index||0,o=r[0].length;if(o===0)return null;const s=i+a;return new j(t,s+1,t,s+1+o)}static findNextBracketInRange(e,t,n,i,r){const a=n.substring(i,r);return this.findNextBracketInText(e,t,a,i)}}class HZe{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const i=n.charAt(n.length-1);e.push(i)}return Lm(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const i=t.findTokenIndexAtOffset(n-1);if(_d(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,a=t.getLineContent().substring(0,n-1)+e,o=ul.findPrevBracketInRange(r,1,a,0,a.length);if(!o)return null;const s=a.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;const c=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:s}:null}}function J7(u){return u.global&&(u.lastIndex=0),!0}class VZe{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&J7(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&J7(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&J7(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&J7(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class l5{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const n=l5._createOpenBracketRegExp(t[0]),i=l5._createCloseBracketRegExp(t[1]);n&&i&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let r=0,a=this._regExpRules.length;rl.reg?(l.reg.lastIndex=0,l.reg.test(l.text)):!0))return o.action}if(e>=2&&n.length>0&&i.length>0)for(let r=0,a=this._brackets.length;r=2&&n.length>0){for(let r=0,a=this._brackets.length;r"u"?t:r}function KZe(u){return u.replace(/[\[\]]/g,"")}const vn=Ut("languageService");class Rd{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const S6e=[];function au(u,e,t){e instanceof Rd||(e=new Rd(e,[],!!t)),S6e.push([u,e])}function Bae(){return S6e}const ci=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),iP={JSONContribution:"base.contributions.json"};function WZe(u){return u.length>0&&u.charAt(u.length-1)==="#"?u.substring(0,u.length-1):u}class GZe{constructor(){this._onDidChangeSchema=new Q,this.schemasById={}}registerSchema(e,t){this.schemasById[WZe(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const UZe=new GZe;jn.add(iP.JSONContribution,UZe);const Ed={Configuration:"base.contributions.configuration"},rC="vscode://schemas/settings/resourceLanguage",wae=jn.as(iP.JSONContribution);class qZe{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new Q,this._onDidUpdateConfiguration=new Q,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:v("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},wae.registerSchema(rC,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),wae.registerSchema(rC,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var n;const i=[];for(const{overrides:r,source:a}of e)for(const o in r)if(t.add(o),Im.test(o)){const s=this.configurationDefaultsOverrides.get(o),l=(n=s==null?void 0:s.valuesSources)!==null&&n!==void 0?n:new Map;if(a)for(const E of Object.keys(r[o]))l.set(E,a);const c=Object.assign(Object.assign({},(s==null?void 0:s.value)||{}),r[o]);this.configurationDefaultsOverrides.set(o,{source:a,value:c,valuesSources:l});const d=KZe(o),h={type:"object",default:c,description:v("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",d),$ref:rC,defaultDefaultValue:c,source:io(a)?void 0:a,defaultValueSource:a};i.push(...yB(o)),this.configurationProperties[o]=h,this.defaultLanguageConfigurationOverridesNode.properties[o]=h}else{this.configurationDefaultsOverrides.set(o,{value:r[o],source:a});const s=this.configurationProperties[o];s&&(this.updatePropertyDefaultValue(o,s),this.updateSchema(o,s))}this.doRegisterOverrideIdentifiers(i)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(i=>{this.validateAndRegisterProperties(i,t,i.extensionInfo,i.restrictedProperties,void 0,n),this.configurationContributors.push(i),this.registerJSONConfiguration(i)})}validateAndRegisterProperties(e,t=!0,n,i,r=3,a){var o;r=zs(e.scope)?r:e.scope;const s=e.properties;if(s)for(const c in s){const d=s[c];if(t&&YZe(c,d)){delete s[c];continue}if(d.source=n,d.defaultDefaultValue=s[c].default,this.updatePropertyDefaultValue(c,d),Im.test(c)?d.scope=void 0:(d.scope=zs(d.scope)?r:d.scope,d.restricted=zs(d.restricted)?!!(i!=null&&i.includes(c)):d.restricted),s[c].hasOwnProperty("included")&&!s[c].included){this.excludedConfigurationProperties[c]=s[c],delete s[c];continue}else this.configurationProperties[c]=s[c],!((o=s[c].policy)===null||o===void 0)&&o.name&&this.policyConfigurations.set(s[c].policy.name,c);!s[c].deprecationMessage&&s[c].markdownDeprecationMessage&&(s[c].deprecationMessage=s[c].markdownDeprecationMessage),a.add(c)}const l=e.allOf;if(l)for(const c of l)this.validateAndRegisterProperties(c,t,n,i,r,a)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=n=>{const i=n.properties;if(i)for(const a in i)this.updateSchema(a,i[a]);const r=n.allOf;r==null||r.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:v("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:v("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:rC};this.updatePropertyDefaultValue(t,n)}}registerOverridePropertyPatternKey(){v("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),v("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e);let i=n==null?void 0:n.value,r=n==null?void 0:n.source;is(i)&&(i=t.defaultDefaultValue,r=void 0),is(i)&&(i=ZZe(t.type)),t.default=i,t.defaultValueSource=r}}const B6e="\\[([^\\]]+)\\]",Lae=new RegExp(B6e,"g"),JZe=`^(${B6e})+$`,Im=new RegExp(JZe);function yB(u){const e=[];if(Im.test(u)){let t=Lae.exec(u);for(;t!=null&&t.length;){const n=t[1].trim();n&&e.push(n),t=Lae.exec(u)}}return Lm(e)}function ZZe(u){switch(Array.isArray(u)?u[0]:u){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const $S=new qZe;jn.add(Ed.Configuration,$S);function YZe(u,e){var t,n,i,r;return u.trim()?Im.test(u)?v("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",u):$S.getConfigurationProperties()[u]!==void 0?v("config.property.duplicate","Cannot register '{0}'. This property is already registered.",u):!((t=e.policy)===null||t===void 0)&&t.name&&$S.getPolicyConfigurations().get((n=e.policy)===null||n===void 0?void 0:n.name)!==void 0?v("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",u,(i=e.policy)===null||i===void 0?void 0:i.name,$S.getPolicyConfigurations().get((r=e.policy)===null||r===void 0?void 0:r.name)):null:v("config.property.empty","Cannot register an empty property")}const QZe={ModesRegistry:"editor.modesRegistry"};class XZe{constructor(){this._onDidChangeLanguages=new Q,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{const s=new Set;return{info:new uYe(this,o,s),closing:s}}),r=new tae(o=>{const s=new Set,l=new Set;return{info:new nYe(this,o,s,l),opening:s,openingColorized:l}});for(const[o,s]of n){const l=i.get(o),c=r.get(s);l.closing.add(c.info),c.opening.add(l.info)}const a=t.colorizedBracketPairs?zae(t.colorizedBracketPairs):n.filter(o=>!(o[0]==="<"&&o[1]===">"));for(const[o,s]of a){const l=i.get(o),c=r.get(s);l.closing.add(c.info),c.openingColorized.add(l.info),c.opening.add(l.info)}this._openingBrackets=new Map([...i.cachedValues].map(([o,s])=>[o,s.info])),this._closingBrackets=new Map([...r.cachedValues].map(([o,s])=>[o,s.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function zae(u){return u.filter(([e,t])=>e!==""&&t!=="")}class w6e{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class uYe extends w6e{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class nYe extends w6e{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var iYe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Mae=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Dj{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const tn=Ut("languageConfigurationService");let DW=class extends ne{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new sYe),this.onDidChangeEmitter=this._register(new Q),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(xW));this._register(this.configurationService.onDidChangeConfiguration(i=>{const r=i.change.keys.some(o=>n.has(o)),a=i.change.overrides.filter(([o,s])=>s.some(l=>n.has(l))).map(([o])=>o);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new Dj(void 0));else for(const o of a)this.languageService.isRegisteredLanguageId(o)&&(this.configurations.delete(o),this.onDidChangeEmitter.fire(new Dj(o)))})),this._register(this._registry.onDidChange(i=>{this.configurations.delete(i.languageId),this.onDidChangeEmitter.fire(new Dj(i.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=rYe(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};DW=iYe([Mae(0,tu),Mae(1,vn)],DW);function rYe(u,e,t,n){let i=e.getLanguageConfiguration(u);if(!i){if(!n.isRegisteredLanguageId(u))return new ix(u,{});i=new ix(u,{})}const r=aYe(i.languageId,t),a=z6e([i.underlyingConfig,r]);return new ix(i.languageId,a)}const xW={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function aYe(u,e){const t=e.getValue(xW.brackets,{overrideIdentifier:u}),n=e.getValue(xW.colorizedBracketPairs,{overrideIdentifier:u});return{brackets:Tae(t),colorizedBracketPairs:Tae(n)}}function Tae(u){if(Array.isArray(u))return u.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function L6e(u,e,t){const n=u.getLineContent(e);let i=Wu(n);return i.length>t-1&&(i=i.substring(0,t-1)),i}function nx(u,e,t){u.tokenization.forceTokenization(e);const n=u.tokenization.getLineTokens(e),i=typeof t>"u"?u.getLineMaxColumn(e)-1:t-1;return eP(n,i)}class oYe{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Nae(e,t,++this._order);return this._entries.push(n),this._resolved=null,ft(()=>{for(let i=0;ie.configuration)))}}function z6e(u){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const t of u)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}class Nae{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Pae{constructor(e){this.languageId=e}}class sYe extends ne{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._register(this.register(Ks,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new oYe(e),this._entries.set(e,i));const r=i.register(t,n);return this._onDidChange.fire(new Pae(e)),ft(()=>{r.dispose(),this._onDidChange.fire(new Pae(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}}class ix{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new l5(this.underlyingConfig):null,this.comments=ix._handleComments(this.underlyingConfig),this.characterPair=new Yx(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||zQ,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new VZe(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new tYe(e,this.underlyingConfig)}getWordDefinition(){return Eve(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new NZe(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new HZe(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new _Ze(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[i,r]=t.blockComment;n.blockCommentStartToken=i,n.blockCommentEndToken=r}return n}}au(tn,DW,1);class Q4{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function M6e(u){return rP(u,0)}function rP(u,e){switch(typeof u){case"object":return u===null?Rh(349,e):Array.isArray(u)?cYe(u,e):dYe(u,e);case"string":return uX(u,e);case"boolean":return lYe(u,e);case"number":return Rh(u,e);case"undefined":return Rh(937,e);default:return Rh(617,e)}}function Rh(u,e){return(e<<5)-e+u|0}function lYe(u,e){return Rh(u?433:863,e)}function uX(u,e){e=Rh(149417,e);for(let t=0,n=u.length;trP(n,t),e)}function dYe(u,e){return e=Rh(181387,e),Object.keys(u).sort().reduce((t,n)=>(t=uX(n,t),rP(u[n],t)),e)}function xj(u,e,t=32){const n=t-e,i=~((1<>>n)>>>0}function Rae(u,e=0,t=u.byteLength,n=0){for(let i=0;it.toString(16).padStart(2,"0")).join(""):hYe((u>>>0).toString(16),e/4)}class aP{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(t===0)return;const n=this._buff;let i=this._buffLen,r=this._leftoverHighSurrogate,a,o;for(r!==0?(a=r,o=-1,r=0):(a=e.charCodeAt(0),o=0);;){let s=a;if(ur(a))if(o+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64+0],e[1]=e[64+1],e[2]=e[64+2]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),aC(this._h0)+aC(this._h1)+aC(this._h2)+aC(this._h3)+aC(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Rae(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Rae(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=aP._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,xj(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,i=this._h1,r=this._h2,a=this._h3,o=this._h4,s,l,c;for(let d=0;d<80;d++)d<20?(s=i&r|~i&a,l=1518500249):d<40?(s=i^r^a,l=1859775393):d<60?(s=i&r|i&a|r&a,l=2400959708):(s=i^r^a,l=3395469782),c=xj(n,5)+s+o+l+e.getUint32(d*4,!1)&4294967295,o=a,a=r,r=xj(i,30),i=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+o&4294967295}}aP._bigBlock32=new DataView(new ArrayBuffer(320));class Iae{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new Q4(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class $d{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,a]=$d._getElements(e),[o,s,l]=$d._getElements(t);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=s,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if($d._isStringArray(t)){const n=new Int32Array(t.length);for(let i=0,r=t.length;i=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let d;return n<=i?(lD.Assert(e===t+1,"originalStart should only be one more than originalEnd"),d=[new Q4(e,0,n,i-n+1)]):e<=t?(lD.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[new Q4(e,t-e+1,n,0)]):(lD.Assert(e===t+1,"originalStart should only be one more than originalEnd"),lD.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const a=[0],o=[0],s=this.ComputeRecursionPoint(e,t,n,i,a,o,r),l=a[0],c=o[0];if(s!==null)return s;if(!r[0]){const d=this.ComputeDiffRecursive(e,l,n,c,r);let h=[];return r[0]?h=[new Q4(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,t,c+1,i,r),this.ConcatenateChanges(d,h)}return[new Q4(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D){let x=null,b=null,k=new Oae,A=t,F=n,S=E[0]-f[0]-i,w=-1073741824,z=this.m_forwardHistory.length-1;do{const N=S+e;N===A||N=0&&(l=this.m_forwardHistory[z],e=l[0],A=1,F=l.length-1)}while(--z>=-1);if(x=k.getReverseChanges(),D[0]){let N=E[0]+1,O=f[0]+1;if(x!==null&&x.length>0){const y=x[x.length-1];N=Math.max(N,y.getOriginalEnd()),O=Math.max(O,y.getModifiedEnd())}b=[new Q4(N,h-N+1,O,g-O+1)]}else{k=new Oae,A=a,F=o,S=E[0]-f[0]-s,w=1073741824,z=p?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const N=S+r;N===A||N=c[N+1]?(d=c[N+1]-1,m=d-S-s,d>w&&k.MarkNextChange(),w=d+1,k.AddOriginalElement(d+1,m+1),S=N+1-r):(d=c[N-1],m=d-S-s,d>w&&k.MarkNextChange(),w=d,k.AddModifiedElement(d+1,m+1),S=N-1-r),z>=0&&(c=this.m_reverseHistory[z],r=c[0],A=1,F=c.length-1)}while(--z>=-1);b=k.getChanges()}return this.ConcatenateChanges(x,b)}ComputeRecursionPoint(e,t,n,i,r,a,o){let s=0,l=0,c=0,d=0,h=0,E=0;e--,n--,r[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(i-n),g=m+1,f=new Int32Array(g),p=new Int32Array(g),D=i-n,x=t-e,b=e-n,k=t-i,F=(x-D)%2===0;f[D]=e,p[x]=t,o[0]=!1;for(let S=1;S<=m/2+1;S++){let w=0,z=0;c=this.ClipDiagonalBound(D-S,S,D,g),d=this.ClipDiagonalBound(D+S,S,D,g);for(let O=c;O<=d;O+=2){O===c||Ow+z&&(w=s,z=l),!F&&Math.abs(O-x)<=S-1&&s>=p[O])return r[0]=s,a[0]=l,y<=p[O]&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):null}const N=(w-e+(z-n)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(w,N))return o[0]=!0,r[0]=w,a[0]=z,N>0&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):(e++,n++,[new Q4(e,t-e+1,n,i-n+1)]);h=this.ClipDiagonalBound(x-S,S,x,g),E=this.ClipDiagonalBound(x+S,S,x,g);for(let O=h;O<=E;O+=2){O===h||O=p[O+1]?s=p[O+1]-1:s=p[O-1],l=s-(O-x)-k;const y=s;for(;s>e&&l>n&&this.ElementsAreEqual(s,l);)s--,l--;if(p[O]=s,F&&Math.abs(O-D)<=S&&s<=f[O])return r[0]=s,a[0]=l,y>=f[O]&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):null}if(S<=1447){let O=new Int32Array(d-c+2);O[0]=D-c+1,cD.Copy2(f,c,O,1,d-c+1),this.m_forwardHistory.push(O),O=new Int32Array(E-h+2),O[0]=x-h+1,cD.Copy2(p,h,O,1,E-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const d=e[t-1];i=d.originalStart+d.originalLength,r=d.modifiedStart+d.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let s=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){const h=n.originalStart-d,E=n.modifiedStart-d;if(hl&&(l=g,s=d)}n.originalStart-=s,n.modifiedStart-=s;const c=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],c)){e[t-1]=c[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&E>s&&(s=E,l=d,c=h)}return s>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+a}ConcatenateChanges(e,t){const n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return cD.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],cD.Copy(t,1,i,e.length,t.length-1),i}else{const i=new Array(e.length+t.length);return cD.Copy(e,0,i,0,e.length),cD.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,n){if(lD.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),lD.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const i=e.originalStart;let r=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Q4(i,r,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e255?255:u|0}function dD(u){return u<0?0:u>4294967295?4294967295:u|0}class mYe{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=dD(e);const n=this.values,i=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=dD(e),t=dD(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=dD(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,a=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],a=r-this.values[i],e=r)t=i+1;else break;return new T6e(i,e-a)}}class gYe{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new T6e(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=TN(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+n;for(let r=0;r=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class _B{constructor(){this._actual=new E6(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class pYe{constructor(e,t,n){const i=new Uint8Array(e*t);for(let r=0,a=e*t;rt&&(t=s),o>n&&(n=o),l>n&&(n=l)}t++,n++;const i=new pYe(n,t,0);for(let r=0,a=e.length;r=this._maxCharCode?0:this._states.get(e,t)}}let vj=null;function xYe(){return vj===null&&(vj=new DYe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),vj}let oC=null;function vYe(){if(oC===null){oC=new E6(0);const u=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let t=0;ti);if(i>0){const o=t.charCodeAt(i-1),s=t.charCodeAt(a);(o===40&&s===41||o===91&&s===93||o===123&&s===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:t.substring(i,a+1)}}static computeLinks(e,t=xYe()){const n=vYe(),i=[];for(let r=1,a=e.getLineCount();r<=a;r++){const o=e.getLineContent(r),s=o.length;let l=0,c=0,d=0,h=1,E=!1,m=!1,g=!1,f=!1;for(;l=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}vW.INSTANCE=new vW;class bYe extends E6{constructor(e){super(0);for(let t=0,n=e.length;t(e.hasOwnProperty(t)||(e[t]=u(t)),e[t])}const P0=kYe(u=>new bYe(u));var Js;(function(u){u[u.Left=1]="Left",u[u.Center=2]="Center",u[u.Right=4]="Right",u[u.Full=7]="Full"})(Js||(Js={}));var rx;(function(u){u[u.Left=1]="Left",u[u.Right=2]="Right"})(rx||(rx={}));var ss;(function(u){u[u.Inline=1]="Inline",u[u.Gutter=2]="Gutter"})(ss||(ss={}));var zc;(function(u){u[u.Both=0]="Both",u[u.Right=1]="Right",u[u.Left=2]="Left",u[u.None=3]="None"})(zc||(zc={}));class KS{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&$s(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class mk{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function FYe(u){return u&&typeof u.read=="function"}class Cj{constructor(e,t,n,i,r,a){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=a}}class yYe{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class AYe{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function _Ye(u){return!u.isTooLargeForSyncing()&&!u.isForSimpleWidget}const SYe=999;class of{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=BYe(this.searchString):e=this.searchString.indexOf(` -`)>=0;let t=null;try{t=Nve(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new yYe(t,this.wordSeparators?P0(this.wordSeparators):null,n?this.searchString:null)}}function BYe(u){if(!u||u.length===0)return!1;for(let e=0,t=u.length;e=t)break;const i=u.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function Cf(u,e,t){if(!t)return new mk(u,null);const n=[];for(let i=0,r=e.length;i>0);t[r]>=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class Z7{static findMatches(e,t,n,i,r){const a=t.parseSearchRequest();return a?a.regex.multiline?this._doFindMatchesMultiline(e,n,new c5(a.wordSeparators,a.regex),i,r):this._doFindMatchesLineByLine(e,n,a,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,a){let o,s=0;i?(s=i.findLineFeedCountBeforeOffset(r),o=t+r+s):o=t+r;let l;if(i){const E=i.findLineFeedCountBeforeOffset(r+a.length)-s;l=o+a.length+E}else l=o+a.length;const c=e.getPositionAt(o),d=e.getPositionAt(l);return new j(c.lineNumber,c.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,i,r){const a=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),s=e.getEOL()===`\r + `;const yae=typeof Buffer<"u";let mj;class tP{static wrap(e){return yae&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new tP(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return yae?this.buffer.toString():(mj||(mj=new TextDecoder),mj.decode(this.buffer))}}function BZe(u,e){return u[e+0]<<0>>>0|u[e+1]<<8>>>0}function wZe(u,e,t){u[t+0]=e&255,e=e>>>8,u[t+1]=e&255}function lc(u,e){return u[e]*Math.pow(2,24)+u[e+1]*Math.pow(2,16)+u[e+2]*Math.pow(2,8)+u[e+3]}function cc(u,e,t){u[t+3]=e,e=e>>>8,u[t+2]=e,e=e>>>8,u[t+1]=e,e=e>>>8,u[t]=e}function Aae(u,e){return u[e]}function _ae(u,e,t){u[t]=e}let gj;function b6e(){return gj||(gj=new TextDecoder("UTF-16LE")),gj}let fj;function LZe(){return fj||(fj=new TextDecoder("UTF-16BE")),fj}let pj;function k6e(){return pj||(pj=cve()?b6e():LZe()),pj}function zZe(u,e,t){const n=new Uint16Array(u.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?MZe(u,e,t):b6e().decode(n)}function MZe(u,e,t){const n=[];let i=0;for(let r=0;r=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let n=0;n[a[0].toLowerCase(),a[1].toLowerCase()]);const t=[];for(let a=0;a{const[s,l]=a,[c,d]=o;return s===c||s===d||l===c||l===d},i=(a,o)=>{const s=Math.min(a,o),l=Math.max(a,o);for(let c=0;c0&&r.push({open:o,close:s})}return r}class NZe{constructor(e,t){this._richEditBracketsBrand=void 0;const n=TZe(t);this.brackets=n.map((i,r)=>new FB(e,r,i.open,i.close,PZe(i.open,i.close,n,r),RZe(i.open,i.close,n,r))),this.forwardRegex=IZe(this.brackets),this.reversedRegex=OZe(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const i of this.brackets){for(const r of i.open)this.textIsBracket[r]=i,this.textIsOpenBracket[r]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,r.length);for(const r of i.close)this.textIsBracket[r]=i,this.textIsOpenBracket[r]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,r.length)}}}function F6e(u,e,t,n){for(let i=0,r=e.length;i=0&&n.push(o);for(const o of a.close)o.indexOf(u)>=0&&n.push(o)}}function y6e(u,e){return u.length-e.length}function uP(u){if(u.length<=1)return u;const e=[],t=new Set;for(const n of u)t.has(n)||(e.push(n),t.add(n));return e}function PZe(u,e,t,n){let i=[];i=i.concat(u),i=i.concat(e);for(let r=0,a=i.length;r=0;a--)i[r++]=n.charCodeAt(a);return k6e().decode(i)}let e=null,t=null;return function(i){return e!==i&&(e=i,t=u(e)),t}}();class nl{static _findPrevBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const a=n.length-(r.index||0),o=r[0].length,s=i+a;return new j(t,s-o+1,t,s+1)}static findPrevBracketInRange(e,t,n,i,r){const o=tX(n).substring(n.length-r,n.length-i);return this._findPrevBracketInText(e,t,o,i)}static findNextBracketInText(e,t,n,i){const r=n.match(e);if(!r)return null;const a=r.index||0,o=r[0].length;if(o===0)return null;const s=i+a;return new j(t,s+1,t,s+1+o)}static findNextBracketInRange(e,t,n,i,r){const a=n.substring(i,r);return this.findNextBracketInText(e,t,a,i)}}class HZe{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const n of t.close){const i=n.charAt(n.length-1);e.push(i)}return Lm(e)}onElectricCharacter(e,t,n){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const i=t.findTokenIndexAtOffset(n-1);if(_d(t.getStandardTokenType(i)))return null;const r=this._richEditBrackets.reversedRegex,a=t.getLineContent().substring(0,n-1)+e,o=nl.findPrevBracketInRange(r,1,a,0,a.length);if(!o)return null;const s=a.substring(o.startColumn-1,o.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;const c=t.getActualLineContentBefore(o.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:s}:null}}function J7(u){return u.global&&(u.lastIndex=0),!0}class VZe{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&J7(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&J7(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&J7(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&J7(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class l5{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const n=l5._createOpenBracketRegExp(t[0]),i=l5._createCloseBracketRegExp(t[1]);n&&i&&this._brackets.push({open:t[0],openRegExp:n,close:t[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,n,i){if(e>=3)for(let r=0,a=this._regExpRules.length;rl.reg?(l.reg.lastIndex=0,l.reg.test(l.text)):!0))return o.action}if(e>=2&&n.length>0&&i.length>0)for(let r=0,a=this._brackets.length;r=2&&n.length>0){for(let r=0,a=this._brackets.length;r"u"?t:r}function KZe(u){return u.replace(/[\[\]]/g,"")}const vn=Ut("languageService");class Rd{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}const S6e=[];function au(u,e,t){e instanceof Rd||(e=new Rd(e,[],!!t)),S6e.push([u,e])}function Bae(){return S6e}const ci=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"}),iP={JSONContribution:"base.contributions.json"};function WZe(u){return u.length>0&&u.charAt(u.length-1)==="#"?u.substring(0,u.length-1):u}class GZe{constructor(){this._onDidChangeSchema=new Q,this.schemasById={}}registerSchema(e,t){this.schemasById[WZe(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const UZe=new GZe;jn.add(iP.JSONContribution,UZe);const Ed={Configuration:"base.contributions.configuration"},rC="vscode://schemas/settings/resourceLanguage",wae=jn.as(iP.JSONContribution);class qZe{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new Q,this._onDidUpdateConfiguration=new Q,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:v("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},wae.registerSchema(rC,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=new Set;this.doRegisterConfigurations(e,t,n),wae.registerSchema(rC,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var n;const i=[];for(const{overrides:r,source:a}of e)for(const o in r)if(t.add(o),Im.test(o)){const s=this.configurationDefaultsOverrides.get(o),l=(n=s==null?void 0:s.valuesSources)!==null&&n!==void 0?n:new Map;if(a)for(const E of Object.keys(r[o]))l.set(E,a);const c=Object.assign(Object.assign({},(s==null?void 0:s.value)||{}),r[o]);this.configurationDefaultsOverrides.set(o,{source:a,value:c,valuesSources:l});const d=KZe(o),h={type:"object",default:c,description:v("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",d),$ref:rC,defaultDefaultValue:c,source:io(a)?void 0:a,defaultValueSource:a};i.push(...yB(o)),this.configurationProperties[o]=h,this.defaultLanguageConfigurationOverridesNode.properties[o]=h}else{this.configurationDefaultsOverrides.set(o,{value:r[o],source:a});const s=this.configurationProperties[o];s&&(this.updatePropertyDefaultValue(o,s),this.updateSchema(o,s))}this.doRegisterOverrideIdentifiers(i)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,n){e.forEach(i=>{this.validateAndRegisterProperties(i,t,i.extensionInfo,i.restrictedProperties,void 0,n),this.configurationContributors.push(i),this.registerJSONConfiguration(i)})}validateAndRegisterProperties(e,t=!0,n,i,r=3,a){var o;r=Ms(e.scope)?r:e.scope;const s=e.properties;if(s)for(const c in s){const d=s[c];if(t&&YZe(c,d)){delete s[c];continue}if(d.source=n,d.defaultDefaultValue=s[c].default,this.updatePropertyDefaultValue(c,d),Im.test(c)?d.scope=void 0:(d.scope=Ms(d.scope)?r:d.scope,d.restricted=Ms(d.restricted)?!!(i!=null&&i.includes(c)):d.restricted),s[c].hasOwnProperty("included")&&!s[c].included){this.excludedConfigurationProperties[c]=s[c],delete s[c];continue}else this.configurationProperties[c]=s[c],!((o=s[c].policy)===null||o===void 0)&&o.name&&this.policyConfigurations.set(s[c].policy.name,c);!s[c].deprecationMessage&&s[c].markdownDeprecationMessage&&(s[c].deprecationMessage=s[c].markdownDeprecationMessage),a.add(c)}const l=e.allOf;if(l)for(const c of l)this.validateAndRegisterProperties(c,t,n,i,r,a)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=n=>{const i=n.properties;if(i)for(const a in i)this.updateSchema(a,i[a]);const r=n.allOf;r==null||r.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:break;case 2:break;case 6:break;case 3:break;case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,n={type:"object",description:v("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:v("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:rC};this.updatePropertyDefaultValue(t,n)}}registerOverridePropertyPatternKey(){v("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),v("overrideSettings.errorMessage","This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const n=this.configurationDefaultsOverrides.get(e);let i=n==null?void 0:n.value,r=n==null?void 0:n.source;rs(i)&&(i=t.defaultDefaultValue,r=void 0),rs(i)&&(i=ZZe(t.type)),t.default=i,t.defaultValueSource=r}}const B6e="\\[([^\\]]+)\\]",Lae=new RegExp(B6e,"g"),JZe=`^(${B6e})+$`,Im=new RegExp(JZe);function yB(u){const e=[];if(Im.test(u)){let t=Lae.exec(u);for(;t!=null&&t.length;){const n=t[1].trim();n&&e.push(n),t=Lae.exec(u)}}return Lm(e)}function ZZe(u){switch(Array.isArray(u)?u[0]:u){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const $S=new qZe;jn.add(Ed.Configuration,$S);function YZe(u,e){var t,n,i,r;return u.trim()?Im.test(u)?v("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",u):$S.getConfigurationProperties()[u]!==void 0?v("config.property.duplicate","Cannot register '{0}'. This property is already registered.",u):!((t=e.policy)===null||t===void 0)&&t.name&&$S.getPolicyConfigurations().get((n=e.policy)===null||n===void 0?void 0:n.name)!==void 0?v("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",u,(i=e.policy)===null||i===void 0?void 0:i.name,$S.getPolicyConfigurations().get((r=e.policy)===null||r===void 0?void 0:r.name)):null:v("config.property.empty","Cannot register an empty property")}const QZe={ModesRegistry:"editor.modesRegistry"};class XZe{constructor(){this._onDidChangeLanguages=new Q,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,n=this._languages.length;t{const s=new Set;return{info:new uYe(this,o,s),closing:s}}),r=new tae(o=>{const s=new Set,l=new Set;return{info:new nYe(this,o,s,l),opening:s,openingColorized:l}});for(const[o,s]of n){const l=i.get(o),c=r.get(s);l.closing.add(c.info),c.opening.add(l.info)}const a=t.colorizedBracketPairs?zae(t.colorizedBracketPairs):n.filter(o=>!(o[0]==="<"&&o[1]===">"));for(const[o,s]of a){const l=i.get(o),c=r.get(s);l.closing.add(c.info),c.openingColorized.add(l.info),c.opening.add(l.info)}this._openingBrackets=new Map([...i.cachedValues].map(([o,s])=>[o,s.info])),this._closingBrackets=new Map([...r.cachedValues].map(([o,s])=>[o,s.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}}function zae(u){return u.filter(([e,t])=>e!==""&&t!=="")}class w6e{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class uYe extends w6e{constructor(e,t,n){super(e,t),this.openedBrackets=n,this.isOpeningBracket=!0}}class nYe extends w6e{constructor(e,t,n,i){super(e,t),this.openingBrackets=n,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(e){return e.config!==this.config?!1:this.openingBrackets.has(e)}closesColorized(e){return e.config!==this.config?!1:this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var iYe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Mae=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Dj{constructor(e){this.languageId=e}affects(e){return this.languageId?this.languageId===e:!0}}const tn=Ut("languageConfigurationService");let DW=class extends ne{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new sYe),this.onDidChangeEmitter=this._register(new Q),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const n=new Set(Object.values(xW));this._register(this.configurationService.onDidChangeConfiguration(i=>{const r=i.change.keys.some(o=>n.has(o)),a=i.change.overrides.filter(([o,s])=>s.some(l=>n.has(l))).map(([o])=>o);if(r)this.configurations.clear(),this.onDidChangeEmitter.fire(new Dj(void 0));else for(const o of a)this.languageService.isRegisteredLanguageId(o)&&(this.configurations.delete(o),this.onDidChangeEmitter.fire(new Dj(o)))})),this._register(this._registry.onDidChange(i=>{this.configurations.delete(i.languageId),this.onDidChangeEmitter.fire(new Dj(i.languageId))}))}register(e,t,n){return this._registry.register(e,t,n)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=rYe(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};DW=iYe([Mae(0,tu),Mae(1,vn)],DW);function rYe(u,e,t,n){let i=e.getLanguageConfiguration(u);if(!i){if(!n.isRegisteredLanguageId(u))return new ix(u,{});i=new ix(u,{})}const r=aYe(i.languageId,t),a=z6e([i.underlyingConfig,r]);return new ix(i.languageId,a)}const xW={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function aYe(u,e){const t=e.getValue(xW.brackets,{overrideIdentifier:u}),n=e.getValue(xW.colorizedBracketPairs,{overrideIdentifier:u});return{brackets:Tae(t),colorizedBracketPairs:Tae(n)}}function Tae(u){if(Array.isArray(u))return u.map(e=>{if(!(!Array.isArray(e)||e.length!==2))return[e[0],e[1]]}).filter(e=>!!e)}function L6e(u,e,t){const n=u.getLineContent(e);let i=Wu(n);return i.length>t-1&&(i=i.substring(0,t-1)),i}function nx(u,e,t){u.tokenization.forceTokenization(e);const n=u.tokenization.getLineTokens(e),i=typeof t>"u"?u.getLineMaxColumn(e)-1:t-1;return eP(n,i)}class oYe{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const n=new Nae(e,t,++this._order);return this._entries.push(n),this._resolved=null,ft(()=>{for(let i=0;ie.configuration)))}}function z6e(u){let e={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const t of u)e={comments:t.comments||e.comments,brackets:t.brackets||e.brackets,wordPattern:t.wordPattern||e.wordPattern,indentationRules:t.indentationRules||e.indentationRules,onEnterRules:t.onEnterRules||e.onEnterRules,autoClosingPairs:t.autoClosingPairs||e.autoClosingPairs,surroundingPairs:t.surroundingPairs||e.surroundingPairs,autoCloseBefore:t.autoCloseBefore||e.autoCloseBefore,folding:t.folding||e.folding,colorizedBracketPairs:t.colorizedBracketPairs||e.colorizedBracketPairs,__electricCharacterSupport:t.__electricCharacterSupport||e.__electricCharacterSupport};return e}class Nae{constructor(e,t,n){this.configuration=e,this.priority=t,this.order=n}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Pae{constructor(e){this.languageId=e}}class sYe extends ne{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._register(this.register(Ws,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,n=0){let i=this._entries.get(e);i||(i=new oYe(e),this._entries.set(e,i));const r=i.register(t,n);return this._onDidChange.fire(new Pae(e)),ft(()=>{r.dispose(),this._onDidChange.fire(new Pae(e))})}getLanguageConfiguration(e){const t=this._entries.get(e);return(t==null?void 0:t.getResolvedConfiguration())||null}}class ix{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new l5(this.underlyingConfig):null,this.comments=ix._handleComments(this.underlyingConfig),this.characterPair=new Yx(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||zQ,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new VZe(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new tYe(e,this.underlyingConfig)}getWordDefinition(){return Eve(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new NZe(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new HZe(this.brackets)),this._electricCharacter}onEnter(e,t,n,i){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,n,i):null}getAutoClosingPairs(){return new _Ze(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){const[i,r]=t.blockComment;n.blockCommentStartToken=i,n.blockCommentEndToken=r}return n}}au(tn,DW,1);class Q4{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function M6e(u){return rP(u,0)}function rP(u,e){switch(typeof u){case"object":return u===null?Rh(349,e):Array.isArray(u)?cYe(u,e):dYe(u,e);case"string":return uX(u,e);case"boolean":return lYe(u,e);case"number":return Rh(u,e);case"undefined":return Rh(937,e);default:return Rh(617,e)}}function Rh(u,e){return(e<<5)-e+u|0}function lYe(u,e){return Rh(u?433:863,e)}function uX(u,e){e=Rh(149417,e);for(let t=0,n=u.length;trP(n,t),e)}function dYe(u,e){return e=Rh(181387,e),Object.keys(u).sort().reduce((t,n)=>(t=uX(n,t),rP(u[n],t)),e)}function xj(u,e,t=32){const n=t-e,i=~((1<>>n)>>>0}function Rae(u,e=0,t=u.byteLength,n=0){for(let i=0;it.toString(16).padStart(2,"0")).join(""):hYe((u>>>0).toString(16),e/4)}class aP{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(t===0)return;const n=this._buff;let i=this._buffLen,r=this._leftoverHighSurrogate,a,o;for(r!==0?(a=r,o=-1,r=0):(a=e.charCodeAt(0),o=0);;){let s=a;if(ur(a))if(o+1>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64+0],e[1]=e[64+1],e[2]=e[64+2]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),aC(this._h0)+aC(this._h1)+aC(this._h2)+aC(this._h3)+aC(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Rae(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Rae(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=aP._bigBlock32,t=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,t.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,xj(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let n=this._h0,i=this._h1,r=this._h2,a=this._h3,o=this._h4,s,l,c;for(let d=0;d<80;d++)d<20?(s=i&r|~i&a,l=1518500249):d<40?(s=i^r^a,l=1859775393):d<60?(s=i&r|i&a|r&a,l=2400959708):(s=i^r^a,l=3395469782),c=xj(n,5)+s+o+l+e.getUint32(d*4,!1)&4294967295,o=a,a=r,r=xj(i,30),i=n,n=c;this._h0=this._h0+n&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+o&4294967295}}aP._bigBlock32=new DataView(new ArrayBuffer(320));class Iae{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new Q4(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class $d{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[i,r,a]=$d._getElements(e),[o,s,l]=$d._getElements(t);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=r,this._modifiedStringElements=o,this._modifiedElementsOrHash=s,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if($d._isStringArray(t)){const n=new Int32Array(t.length);for(let i=0,r=t.length;i=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let d;return n<=i?(lD.Assert(e===t+1,"originalStart should only be one more than originalEnd"),d=[new Q4(e,0,n,i-n+1)]):e<=t?(lD.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[new Q4(e,t-e+1,n,0)]):(lD.Assert(e===t+1,"originalStart should only be one more than originalEnd"),lD.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const a=[0],o=[0],s=this.ComputeRecursionPoint(e,t,n,i,a,o,r),l=a[0],c=o[0];if(s!==null)return s;if(!r[0]){const d=this.ComputeDiffRecursive(e,l,n,c,r);let h=[];return r[0]?h=[new Q4(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,t,c+1,i,r),this.ConcatenateChanges(d,h)}return[new Q4(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D){let x=null,b=null,k=new Oae,A=t,F=n,S=E[0]-f[0]-i,w=-1073741824,z=this.m_forwardHistory.length-1;do{const N=S+e;N===A||N=0&&(l=this.m_forwardHistory[z],e=l[0],A=1,F=l.length-1)}while(--z>=-1);if(x=k.getReverseChanges(),D[0]){let N=E[0]+1,O=f[0]+1;if(x!==null&&x.length>0){const y=x[x.length-1];N=Math.max(N,y.getOriginalEnd()),O=Math.max(O,y.getModifiedEnd())}b=[new Q4(N,h-N+1,O,g-O+1)]}else{k=new Oae,A=a,F=o,S=E[0]-f[0]-s,w=1073741824,z=p?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const N=S+r;N===A||N=c[N+1]?(d=c[N+1]-1,m=d-S-s,d>w&&k.MarkNextChange(),w=d+1,k.AddOriginalElement(d+1,m+1),S=N+1-r):(d=c[N-1],m=d-S-s,d>w&&k.MarkNextChange(),w=d,k.AddModifiedElement(d+1,m+1),S=N-1-r),z>=0&&(c=this.m_reverseHistory[z],r=c[0],A=1,F=c.length-1)}while(--z>=-1);b=k.getChanges()}return this.ConcatenateChanges(x,b)}ComputeRecursionPoint(e,t,n,i,r,a,o){let s=0,l=0,c=0,d=0,h=0,E=0;e--,n--,r[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(i-n),g=m+1,f=new Int32Array(g),p=new Int32Array(g),D=i-n,x=t-e,b=e-n,k=t-i,F=(x-D)%2===0;f[D]=e,p[x]=t,o[0]=!1;for(let S=1;S<=m/2+1;S++){let w=0,z=0;c=this.ClipDiagonalBound(D-S,S,D,g),d=this.ClipDiagonalBound(D+S,S,D,g);for(let O=c;O<=d;O+=2){O===c||Ow+z&&(w=s,z=l),!F&&Math.abs(O-x)<=S-1&&s>=p[O])return r[0]=s,a[0]=l,y<=p[O]&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):null}const N=(w-e+(z-n)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(w,N))return o[0]=!0,r[0]=w,a[0]=z,N>0&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):(e++,n++,[new Q4(e,t-e+1,n,i-n+1)]);h=this.ClipDiagonalBound(x-S,S,x,g),E=this.ClipDiagonalBound(x+S,S,x,g);for(let O=h;O<=E;O+=2){O===h||O=p[O+1]?s=p[O+1]-1:s=p[O-1],l=s-(O-x)-k;const y=s;for(;s>e&&l>n&&this.ElementsAreEqual(s,l);)s--,l--;if(p[O]=s,F&&Math.abs(O-D)<=S&&s<=f[O])return r[0]=s,a[0]=l,y>=f[O]&&1447>0&&S<=1447+1?this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o):null}if(S<=1447){let O=new Int32Array(d-c+2);O[0]=D-c+1,cD.Copy2(f,c,O,1,d-c+1),this.m_forwardHistory.push(O),O=new Int32Array(E-h+2),O[0]=x-h+1,cD.Copy2(p,h,O,1,E-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(D,c,d,b,x,h,E,k,f,p,s,t,r,l,i,a,F,o)}PrettifyChanges(e){for(let t=0;t0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let i=0,r=0;if(t>0){const d=e[t-1];i=d.originalStart+d.originalLength,r=d.modifiedStart+d.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let s=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){const h=n.originalStart-d,E=n.modifiedStart-d;if(hl&&(l=g,s=d)}n.originalStart-=s,n.modifiedStart-=s;const c=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],c)){e[t-1]=c[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&E>s&&(s=E,l=d,c=h)}return s>0?[l,c]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){const r=this._OriginalRegionIsBoundary(e,t)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return r+a}ConcatenateChanges(e,t){const n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const i=new Array(e.length+t.length-1);return cD.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],cD.Copy(t,1,i,e.length,t.length-1),i}else{const i=new Array(e.length+t.length);return cD.Copy(e,0,i,0,e.length),cD.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,n){if(lD.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),lD.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const i=e.originalStart;let r=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(o=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new Q4(i,r,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e255?255:u|0}function dD(u){return u<0?0:u>4294967295?4294967295:u|0}class mYe{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=dD(e);const n=this.values,i=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=dD(e),t=dD(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=dD(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,r=0,a=0;for(;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],a=r-this.values[i],e=r)t=i+1;else break;return new T6e(i,e-a)}}class gYe{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new T6e(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=TN(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+n;for(let r=0;r=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class _B{constructor(){this._actual=new E6(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}clear(){return this._actual.clear()}}class pYe{constructor(e,t,n){const i=new Uint8Array(e*t);for(let r=0,a=e*t;rt&&(t=s),o>n&&(n=o),l>n&&(n=l)}t++,n++;const i=new pYe(n,t,0);for(let r=0,a=e.length;r=this._maxCharCode?0:this._states.get(e,t)}}let vj=null;function xYe(){return vj===null&&(vj=new DYe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),vj}let oC=null;function vYe(){if(oC===null){oC=new E6(0);const u=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let t=0;ti);if(i>0){const o=t.charCodeAt(i-1),s=t.charCodeAt(a);(o===40&&s===41||o===91&&s===93||o===123&&s===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:t.substring(i,a+1)}}static computeLinks(e,t=xYe()){const n=vYe(),i=[];for(let r=1,a=e.getLineCount();r<=a;r++){const o=e.getLineContent(r),s=o.length;let l=0,c=0,d=0,h=1,E=!1,m=!1,g=!1,f=!1;for(;l=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}vW.INSTANCE=new vW;class bYe extends E6{constructor(e){super(0);for(let t=0,n=e.length;t(e.hasOwnProperty(t)||(e[t]=u(t)),e[t])}const R0=kYe(u=>new bYe(u));var Zs;(function(u){u[u.Left=1]="Left",u[u.Center=2]="Center",u[u.Right=4]="Right",u[u.Full=7]="Full"})(Zs||(Zs={}));var rx;(function(u){u[u.Left=1]="Left",u[u.Right=2]="Right"})(rx||(rx={}));var ls;(function(u){u[u.Inline=1]="Inline",u[u.Gutter=2]="Gutter"})(ls||(ls={}));var zc;(function(u){u[u.Both=0]="Both",u[u.Right=1]="Right",u[u.Left=2]="Left",u[u.None=3]="None"})(zc||(zc={}));class KS{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),e.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,e.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&Ks(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class mk{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function FYe(u){return u&&typeof u.read=="function"}class Cj{constructor(e,t,n,i,r,a){this.identifier=e,this.range=t,this.text=n,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=r,this._isTracked=a}}class yYe{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}class AYe{constructor(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}}function _Ye(u){return!u.isTooLargeForSyncing()&&!u.isForSimpleWidget}const SYe=999;class of{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=BYe(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=Nve(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new yYe(t,this.wordSeparators?R0(this.wordSeparators):null,n?this.searchString:null)}}function BYe(u){if(!u||u.length===0)return!1;for(let e=0,t=u.length;e=t)break;const i=u.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function Cf(u,e,t){if(!t)return new mk(u,null);const n=[];for(let i=0,r=e.length;i>0);t[r]>=e?i=r-1:t[r+1]>=e?(n=r,i=r):n=r+1}return n+1}}class Z7{static findMatches(e,t,n,i,r){const a=t.parseSearchRequest();return a?a.regex.multiline?this._doFindMatchesMultiline(e,n,new c5(a.wordSeparators,a.regex),i,r):this._doFindMatchesLineByLine(e,n,a,i,r):[]}static _getMultilineMatchRange(e,t,n,i,r,a){let o,s=0;i?(s=i.findLineFeedCountBeforeOffset(r),o=t+r+s):o=t+r;let l;if(i){const E=i.findLineFeedCountBeforeOffset(r+a.length)-s;l=o+a.length+E}else l=o+a.length;const c=e.getPositionAt(o),d=e.getPositionAt(l);return new j(c.lineNumber,c.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,n,i,r){const a=e.getOffsetAt(t.getStartPosition()),o=e.getValueInRange(t,1),s=e.getEOL()===`\r `?new jae(o):null,l=[];let c=0,d;for(n.reset(0);d=n.next(o);)if(l[c++]=Cf(this._getMultilineMatchRange(e,a,o,s,d.index,d[0]),d,i),c>=r)return l;return l}static _doFindMatchesLineByLine(e,t,n,i,r){const a=[];let o=0;if(t.startLineNumber===t.endLineNumber){const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return o=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,o,a,i,r),a}const s=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);o=this._findMatchesInLine(n,s,t.startLineNumber,t.startColumn-1,o,a,i,r);for(let l=t.startLineNumber+1;l=s))return r;return r}const c=new c5(e.wordSeparators,e.regex);let d;c.reset(0);do if(d=c.next(t),d&&(a[r++]=Cf(new j(n,d.index+1+i,n,d.index+1+d[0].length+i),d,o),r>=s))return r;while(d);return r}static findNextMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const a=new c5(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,a,i):this._doFindNextMatchLineByLine(e,n,a,i)}static _doFindNextMatchMultiline(e,t,n,i){const r=new ee(t.lineNumber,1),a=e.getOffsetAt(r),o=e.getLineCount(),s=e.getValueInRange(new j(r.lineNumber,r.column,o,e.getLineMaxColumn(o)),1),l=e.getEOL()===`\r -`?new jae(s):null;n.reset(t.column-1);const c=n.next(s);return c?Cf(this._getMultilineMatchRange(e,a,s,l,c.index,c[0]),c,i):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new ee(1,1),n,i):null}static _doFindNextMatchLineByLine(e,t,n,i){const r=e.getLineCount(),a=t.lineNumber,o=e.getLineContent(a),s=this._findFirstMatchInLine(n,o,a,t.column,i);if(s)return s;for(let l=1;l<=r;l++){const c=(a+l-1)%r,d=e.getLineContent(c+1),h=this._findFirstMatchInLine(n,d,c+1,1,i);if(h)return h}return null}static _findFirstMatchInLine(e,t,n,i,r){e.reset(i-1);const a=e.next(t);return a?Cf(new j(n,a.index+1,n,a.index+1+a[0].length),a,r):null}static findPreviousMatch(e,t,n,i){const r=t.parseSearchRequest();if(!r)return null;const a=new c5(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,a,i):this._doFindPreviousMatchLineByLine(e,n,a,i)}static _doFindPreviousMatchMultiline(e,t,n,i){const r=this._doFindMatchesMultiline(e,new j(1,1,t.lineNumber,t.column),n,i,10*SYe);if(r.length>0)return r[r.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new ee(a,e.getLineMaxColumn(a)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),a=t.lineNumber,o=e.getLineContent(a).substring(0,t.column-1),s=this._findLastMatchInLine(n,o,a,i);if(s)return s;for(let l=1;l<=r;l++){const c=(r+a-l-1)%r,d=e.getLineContent(c+1),h=this._findLastMatchInLine(n,d,c+1,i);if(h)return h}return null}static _findLastMatchInLine(e,t,n,i){let r=null,a;for(e.reset(0);a=e.next(t);)r=Cf(new j(n,a.index+1,n,a.index+1+a[0].length),a,i);return r}}function wYe(u,e,t,n,i){if(n===0)return!0;const r=e.charCodeAt(n-1);if(u.get(r)!==0||r===13||r===10)return!0;if(i>0){const a=e.charCodeAt(n);if(u.get(a)!==0)return!0}return!1}function LYe(u,e,t,n,i){if(n+i===t)return!0;const r=e.charCodeAt(n+i);if(u.get(r)!==0||r===13||r===10)return!0;if(i>0){const a=e.charCodeAt(n+i-1);if(u.get(a)!==0)return!0}return!1}function nX(u,e,t,n,i){return wYe(u,e,t,n,i)&&LYe(u,e,t,n,i)}class c5{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const i=n.index,r=n[0].length;if(i===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){xB(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=r,!this._wordSeparators||nX(this._wordSeparators,e,t,i,r))return n}while(n);return null}}class iX{static computeUnicodeHighlights(e,t,n){const i=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),a=new Hae(t),o=a.getCandidateCodePoints();let s;o==="allNonBasicAscii"?s=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):s=new RegExp(`${zYe(Array.from(o))}`,"g");const l=new c5(null,s),c=[];let d=!1,h,E=0,m=0,g=0;e:for(let f=i,p=r;f<=p;f++){const D=e.getLineContent(f),x=D.length;l.reset(0);do if(h=l.next(D),h){let b=h.index,k=h.index+h[0].length;if(b>0){const w=D.charCodeAt(b-1);ur(w)&&b--}if(k+1=w){d=!0;break e}c.push(new j(f,b+1,f,k+1))}}while(h)}return{ranges:c,hasMore:d,ambiguousCharacterCount:E,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){const n=new Hae(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),a=n.ambiguousCharacters.getPrimaryConfusable(r),o=S3.getLocales().filter(s=>!S3.getInstance(new Set([...t.allowedLocales,s])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function zYe(u,e){return`[${qs(u.map(n=>String.fromCodePoint(n)).join(""))}]`}class Hae{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=S3.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of m1.codePoints)Vae(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const a of t){const o=a.codePointAt(0),s=nA(a);i=i||s,!s&&!this.ambiguousCharacters.isAmbiguous(o)&&!m1.isInvisibleCharacter(o)&&(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!Vae(e)&&m1.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function Vae(u){return u===" "||u===` -`||u===" "}class WS{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class N6e{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class Gt{static addRange(e,t){let n=0;for(;nt))return new Gt(e,t)}static ofLength(e){return new Gt(0,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new Si(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Gt(this.start+e,this.endExclusive+e)}deltaStart(e){return new Gt(this.start+e,this.endExclusive)}deltaEnd(e){return new Gt(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}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}function BB(u,e,t){const n=MYe(u,e);if(n!==-1)return u[n]}function MYe(u,e,t=u.length-1){for(let n=t;n>=0;n--){const i=u[n];if(e(i))return n}return-1}function gk(u,e){const t=fk(u,e);return t===-1?void 0:u[t]}function fk(u,e,t=0,n=u.length){let i=t,r=n;for(;i0&&(t=i)}return t}function NYe(u,e){if(u.length===0)return;let t=u[0];for(let n=1;n=0&&(t=i)}return t}function PYe(u,e){return P6e(u,(t,n)=>-e(t,n))}function RYe(u,e){if(u.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function IYe(u,e){for(const t of u){const n=e(t);if(n!==void 0)return n}}let Xt=class X4{static fromRange(e){return new X4(e.startLineNumber,e.endLineNumber)}static joinMany(e){if(e.length===0)return[];let t=new Kd(e[0].slice());for(let n=1;nt)throw new Si(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&ei.endLineNumberExclusive>=e.startLineNumber),n=fk(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=gk(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const t=[];let n=0,i=0,r=null;for(;n=a.startLineNumber?r=new Xt(r.startLineNumber,Math.max(r.endLineNumberExclusive,a.endLineNumberExclusive)):(t.push(r),r=a)}return r!==null&&t.push(r),new Kd(t)}subtractFrom(e){const t=pk(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),n=fk(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new Kd([e]);const i=[];let r=e.startLineNumber;for(let a=t;ar&&i.push(new Xt(r,o.startLineNumber)),r=o.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){const t=[];let n=0,i=0;for(;nt.delta(e)))}}class A1{static inverse(e,t,n){const i=[];let r=1,a=1;for(const s of e){const l=new R0(new Xt(r,s.original.startLineNumber),new Xt(a,s.modified.startLineNumber),void 0);l.modified.isEmpty||i.push(l),r=s.original.endLineNumberExclusive,a=s.modified.endLineNumberExclusive}const o=new R0(new Xt(r,t+1),new Xt(a,n+1),void 0);return o.modified.isEmpty||i.push(o),i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new A1(this.modified,this.original)}join(e){return new A1(this.original.join(e.original),this.modified.join(e.modified))}}class R0 extends A1{constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){var e;return new R0(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}}class Om{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Om(this.modifiedRange,this.originalRange)}}const OYe=3;class jYe{computeDiff(e,t,n){var i;const a=new $Ye(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let s=null;for(const l of a.changes){let c;l.originalEndLineNumber===0?c=new Xt(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Xt(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new Xt(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new Xt(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let h=new R0(c,d,(i=l.charChanges)===null||i===void 0?void 0:i.map(E=>new Om(new j(E.originalStartLineNumber,E.originalStartColumn,E.originalEndLineNumber,E.originalEndColumn),new j(E.modifiedStartLineNumber,E.modifiedStartColumn,E.modifiedEndLineNumber,E.modifiedEndColumn))));s&&(s.modified.endLineNumberExclusive===h.modified.startLineNumber||s.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new R0(s.original.join(h.original),s.modified.join(h.modified),s.innerChanges&&h.innerChanges?s.innerChanges.concat(h.innerChanges):void 0),o.pop()),o.push(h),s=h}return ck(()=>Uve(o,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class ax{constructor(e,t,n,i,r,a,o,s){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=s}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),a=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),s=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new ax(i,r,a,o,s,l,c,d)}}function VYe(u){if(u.length<=1)return u;const e=[u[0]];let t=e[0];for(let n=1,i=u.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const E=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),m=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(E.getElements().length>0&&m.getElements().length>0){let g=R6e(E,m,r,!0).changes;o&&(g=VYe(g)),h=[];for(let f=0,p=g.length;f1&&g>1;){const f=h.charCodeAt(m-2),p=E.charCodeAt(g-2);if(f!==p)break;m--,g--}(m>1||g>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,m,a+1,1,g)}{let m=bW(h,1),g=bW(E,1);const f=h.length+1,p=E.length+1;for(;m!0;const e=Date.now();return()=>Date.now()-e{n.push(Ar.fromOffsetPairs(i?i.getEndExclusives():Xd.zero,r?r.getStarts():new Xd(t,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new Ar(new Gt(e.offset1,t.offset1),new Gt(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Ar(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Ar(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Ar(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Ar(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Ar(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new Ar(t,n)}getStarts(){return new Xd(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Xd(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Xd{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}Xd.zero=new Xd(0,0);Xd.max=new Xd(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class Dk{isValid(){return!0}}Dk.instance=new Dk;class KYe{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Si("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0)return r[r.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new ee(a,e.getLineMaxColumn(a)),n,i):null}static _doFindPreviousMatchLineByLine(e,t,n,i){const r=e.getLineCount(),a=t.lineNumber,o=e.getLineContent(a).substring(0,t.column-1),s=this._findLastMatchInLine(n,o,a,i);if(s)return s;for(let l=1;l<=r;l++){const c=(r+a-l-1)%r,d=e.getLineContent(c+1),h=this._findLastMatchInLine(n,d,c+1,i);if(h)return h}return null}static _findLastMatchInLine(e,t,n,i){let r=null,a;for(e.reset(0);a=e.next(t);)r=Cf(new j(n,a.index+1,n,a.index+1+a[0].length),a,i);return r}}function wYe(u,e,t,n,i){if(n===0)return!0;const r=e.charCodeAt(n-1);if(u.get(r)!==0||r===13||r===10)return!0;if(i>0){const a=e.charCodeAt(n);if(u.get(a)!==0)return!0}return!1}function LYe(u,e,t,n,i){if(n+i===t)return!0;const r=e.charCodeAt(n+i);if(u.get(r)!==0||r===13||r===10)return!0;if(i>0){const a=e.charCodeAt(n+i-1);if(u.get(a)!==0)return!0}return!1}function nX(u,e,t,n,i){return wYe(u,e,t,n,i)&&LYe(u,e,t,n,i)}class c5{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const i=n.index,r=n[0].length;if(i===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){xB(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=r,!this._wordSeparators||nX(this._wordSeparators,e,t,i,r))return n}while(n);return null}}class iX{static computeUnicodeHighlights(e,t,n){const i=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),a=new Hae(t),o=a.getCandidateCodePoints();let s;o==="allNonBasicAscii"?s=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):s=new RegExp(`${zYe(Array.from(o))}`,"g");const l=new c5(null,s),c=[];let d=!1,h,E=0,m=0,g=0;e:for(let f=i,p=r;f<=p;f++){const D=e.getLineContent(f),x=D.length;l.reset(0);do if(h=l.next(D),h){let b=h.index,k=h.index+h[0].length;if(b>0){const w=D.charCodeAt(b-1);ur(w)&&b--}if(k+1=w){d=!0;break e}c.push(new j(f,b+1,f,k+1))}}while(h)}return{ranges:c,hasMore:d,ambiguousCharacterCount:E,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){const n=new Hae(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),a=n.ambiguousCharacters.getPrimaryConfusable(r),o=S3.getLocales().filter(s=>!S3.getInstance(new Set([...t.allowedLocales,s])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function zYe(u,e){return`[${Js(u.map(n=>String.fromCodePoint(n)).join(""))}]`}class Hae{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=S3.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of m1.codePoints)Vae(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,r=!1;if(t)for(const a of t){const o=a.codePointAt(0),s=nA(a);i=i||s,!s&&!this.ambiguousCharacters.isAmbiguous(o)&&!m1.isInvisibleCharacter(o)&&(r=!0)}return!i&&r?0:this.options.invisibleCharacters&&!Vae(e)&&m1.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function Vae(u){return u===" "||u===` +`||u===" "}class WS{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class N6e{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class Gt{static addRange(e,t){let n=0;for(;nt))return new Gt(e,t)}static ofLength(e){return new Gt(0,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new Si(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Gt(this.start+e,this.endExclusive+e)}deltaStart(e){return new Gt(this.start+e,this.endExclusive)}deltaEnd(e){return new Gt(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}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString()).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length,0)}}function BB(u,e,t){const n=MYe(u,e);if(n!==-1)return u[n]}function MYe(u,e,t=u.length-1){for(let n=t;n>=0;n--){const i=u[n];if(e(i))return n}return-1}function gk(u,e){const t=fk(u,e);return t===-1?void 0:u[t]}function fk(u,e,t=0,n=u.length){let i=t,r=n;for(;i0&&(t=i)}return t}function NYe(u,e){if(u.length===0)return;let t=u[0];for(let n=1;n=0&&(t=i)}return t}function PYe(u,e){return P6e(u,(t,n)=>-e(t,n))}function RYe(u,e){if(u.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function IYe(u,e){for(const t of u){const n=e(t);if(n!==void 0)return n}}let Xt=class X4{static fromRange(e){return new X4(e.startLineNumber,e.endLineNumber)}static joinMany(e){if(e.length===0)return[];let t=new Kd(e[0].slice());for(let n=1;nt)throw new Si(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&ei.endLineNumberExclusive>=e.startLineNumber),n=fk(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}contains(e){const t=gk(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const t=[];let n=0,i=0,r=null;for(;n=a.startLineNumber?r=new Xt(r.startLineNumber,Math.max(r.endLineNumberExclusive,a.endLineNumberExclusive)):(t.push(r),r=a)}return r!==null&&t.push(r),new Kd(t)}subtractFrom(e){const t=pk(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),n=fk(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new Kd([e]);const i=[];let r=e.startLineNumber;for(let a=t;ar&&i.push(new Xt(r,o.startLineNumber)),r=o.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){const t=[];let n=0,i=0;for(;nt.delta(e)))}}class A1{static inverse(e,t,n){const i=[];let r=1,a=1;for(const s of e){const l=new I0(new Xt(r,s.original.startLineNumber),new Xt(a,s.modified.startLineNumber),void 0);l.modified.isEmpty||i.push(l),r=s.original.endLineNumberExclusive,a=s.modified.endLineNumberExclusive}const o=new I0(new Xt(r,t+1),new Xt(a,n+1),void 0);return o.modified.isEmpty||i.push(o),i}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new A1(this.modified,this.original)}join(e){return new A1(this.original.join(e.original),this.modified.join(e.modified))}}class I0 extends A1{constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){var e;return new I0(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(t=>t.flip()))}}class Om{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new Om(this.modifiedRange,this.originalRange)}}const OYe=3;class jYe{computeDiff(e,t,n){var i;const a=new $Ye(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let s=null;for(const l of a.changes){let c;l.originalEndLineNumber===0?c=new Xt(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new Xt(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new Xt(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new Xt(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let h=new I0(c,d,(i=l.charChanges)===null||i===void 0?void 0:i.map(E=>new Om(new j(E.originalStartLineNumber,E.originalStartColumn,E.originalEndLineNumber,E.originalEndColumn),new j(E.modifiedStartLineNumber,E.modifiedStartColumn,E.modifiedEndLineNumber,E.modifiedEndColumn))));s&&(s.modified.endLineNumberExclusive===h.modified.startLineNumber||s.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new I0(s.original.join(h.original),s.modified.join(h.modified),s.innerChanges&&h.innerChanges?s.innerChanges.concat(h.innerChanges):void 0),o.pop()),o.push(h),s=h}return ck(()=>Uve(o,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class ax{constructor(e,t,n,i,r,a,o,s){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=r,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=s}static createFromDiffChange(e,t,n){const i=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),a=t.getEndLineNumber(e.originalStart+e.originalLength-1),o=t.getEndColumn(e.originalStart+e.originalLength-1),s=n.getStartLineNumber(e.modifiedStart),l=n.getStartColumn(e.modifiedStart),c=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new ax(i,r,a,o,s,l,c,d)}}function VYe(u){if(u.length<=1)return u;const e=[u[0]];let t=e[0];for(let n=1,i=u.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const E=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),m=i.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(E.getElements().length>0&&m.getElements().length>0){let g=R6e(E,m,r,!0).changes;o&&(g=VYe(g)),h=[];for(let f=0,p=g.length;f1&&g>1;){const f=h.charCodeAt(m-2),p=E.charCodeAt(g-2);if(f!==p)break;m--,g--}(m>1||g>1)&&this._pushTrimWhitespaceCharChange(i,r+1,1,m,a+1,1,g)}{let m=bW(h,1),g=bW(E,1);const f=h.length+1,p=E.length+1;for(;m!0;const e=Date.now();return()=>Date.now()-e{n.push(Ar.fromOffsetPairs(i?i.getEndExclusives():Xd.zero,r?r.getStarts():new Xd(t,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new Ar(new Gt(e.offset1,t.offset1),new Gt(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new Ar(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new Ar(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Ar(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new Ar(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new Ar(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new Ar(t,n)}getStarts(){return new Xd(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Xd(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Xd{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}}Xd.zero=new Xd(0,0);Xd.max=new Xd(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class Dk{isValid(){return!0}}Dk.instance=new Dk;class KYe{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Si("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&g>0&&a.get(m-1,g-1)===3&&(D+=o.get(m-1,g-1)),D+=i?i(m,g):1):D=-1;const x=Math.max(f,p,D);if(x===D){const b=m>0&&g>0?o.get(m-1,g-1):0;o.set(m,g,b+1),a.set(m,g,3)}else x===f?(o.set(m,g,0),a.set(m,g,1)):x===p&&(o.set(m,g,0),a.set(m,g,2));r.set(m,g,x)}const s=[];let l=e.length,c=t.length;function d(m,g){(m+1!==l||g+1!==c)&&s.push(new Ar(new Gt(m+1,l),new Gt(g+1,c))),l=m,c=g}let h=e.length-1,E=t.length-1;for(;h>=0&&E>=0;)a.get(h,E)===3?(d(h,E),h--,E--):a.get(h,E)===1?h--:E--;return d(-1,-1),s.reverse(),new Jh(s,!1)}}class I6e{compute(e,t,n=Dk.instance){if(e.length===0||t.length===0)return Jh.trivial(e,t);const i=e,r=t;function a(g,f){for(;gi.length||b>r.length)continue;const k=a(x,b);s.set(c,k);const A=x===p?l.get(c+1):l.get(c-1);if(l.set(c,k!==x?new Wae(A,x,b,k-x):A),s.get(c)===i.length&&s.get(c)-c===r.length)break e}}let d=l.get(c);const h=[];let E=i.length,m=r.length;for(;;){const g=d?d.x+d.length:0,f=d?d.y+d.length:0;if((g!==E||f!==m)&&h.push(new Ar(new Gt(g,E),new Gt(f,m))),!d)break;E=d.x,m=d.y,d=d.prev}return h.reverse(),new Jh(h,!1)}}class Wae{constructor(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i}}class GYe{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,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}}class UYe{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var Gae,Uae;class qYe{constructor(e,t){this.uri=e,this.value=t}}function JYe(u){return Array.isArray(u)}class ma{constructor(e,t){if(this[Gae]="ResourceMap",e instanceof ma)this.map=new Map(e.map),this.toKey=t??ma.defaultToKey;else if(JYe(e)){this.map=new Map,this.toKey=t??ma.defaultToKey;for(const[n,i]of e)this.set(n,i)}else this.map=new Map,this.toKey=e??ma.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new qYe(e,t)),this}get(e){var t;return(t=this.map.get(this.toKey(e)))===null||t===void 0?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(const[n,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(Gae=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}ma.defaultToKey=u=>u.toString();class ZYe{constructor(){this[Uae]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,n!==0&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const r={value:n.key,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}values(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const r={value:n.value,done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this._state;let n=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const r={value:[n.key,n.value],done:!1};return n=n.next,r}else return{value:void 0,done:!0}}};return i}[(Uae=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}class gg extends ZYe{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}class YYe{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return t===void 0?!1:(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class aX{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}}class wB{constructor(e,t,n){this.lines=e,this.considerWhitespaceChanges=n,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let i=!1;t.start>0&&t.endExclusive>=e.length&&(t=new Gt(t.start-1,t.endExclusive),i=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let r=this.lineRange.start;rString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=Jae(e>0?this.elements[e-1]:-1),n=Jae(en<=e);return new ee(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return j.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!kj(this.elements[e]))return;let t=e;for(;t>0&&kj(this.elements[t-1]);)t--;let n=e;for(;na<=e.start))!==null&&t!==void 0?t:0,r=(n=TYe(this.firstCharOffsetByLine,a=>e.endExclusive<=a))!==null&&n!==void 0?n:this.elements.length;return new Gt(i,r)}}function kj(u){return u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57}const QYe={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function qae(u){return QYe[u]}function Jae(u){return u===10?7:u===13?6:kW(u)?5:u>=97&&u<=122?0:u>=65&&u<=90?1:u>=48&&u<=57?2:u===-1?3:4}function XYe(u,e,t,n,i,r){let{moves:a,excludedChanges:o}=eQe(u,e,t,r);if(!r.isValid())return[];const s=u.filter(c=>!o.has(c)),l=tQe(s,n,i,e,t,r);return sK(a,l),a=uQe(a),a=a.filter(c=>c.original.toOffsetRange().slice(e).map(h=>h.trim()).join(` -`).length>=10),a=nQe(u,a),a}function eQe(u,e,t,n){const i=[],r=u.filter(s=>s.modified.isEmpty&&s.original.length>=3).map(s=>new Xx(s.original,e,s)),a=new Set(u.filter(s=>s.original.isEmpty&&s.modified.length>=3).map(s=>new Xx(s.modified,t,s))),o=new Set;for(const s of r){let l=-1,c;for(const d of a){const h=s.computeSimilarity(d);h>l&&(l=h,c=d)}if(l>.9&&c&&(a.delete(c),i.push(new A1(s.range,c.range)),o.add(s.source),o.add(c.source)),!n.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function tQe(u,e,t,n,i,r){const a=[],o=new aX;for(const h of u)for(let E=h.original.startLineNumber;Eh.modified.startLineNumber,Uh));for(const h of u){let E=[];for(let m=h.modified.startLineNumber;m{for(const b of E)if(b.originalLineRange.endLineNumberExclusive+1===D.endLineNumberExclusive&&b.modifiedLineRange.endLineNumberExclusive+1===f.endLineNumberExclusive){b.originalLineRange=new Xt(b.originalLineRange.startLineNumber,D.endLineNumberExclusive),b.modifiedLineRange=new Xt(b.modifiedLineRange.startLineNumber,f.endLineNumberExclusive),p.push(b);return}const x={modifiedLineRange:f,originalLineRange:D};s.push(x),p.push(x)}),E=p}if(!r.isValid())return[]}s.sort(nve(y0(h=>h.modifiedLineRange.length,Uh)));const l=new Kd,c=new Kd;for(const h of s){const E=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,m=l.subtractFrom(h.modifiedLineRange),g=c.subtractFrom(h.originalLineRange).getWithDelta(E),f=m.getIntersection(g);for(const p of f.ranges){if(p.length<3)continue;const D=p,x=p.delta(-E);a.push(new A1(x,D)),l.addRange(D),c.addRange(x)}}a.sort(y0(h=>h.original.startLineNumber,Uh));const d=new aA(u);for(let h=0;hA.original.startLineNumber<=E.original.startLineNumber),g=gk(u,A=>A.modified.startLineNumber<=E.modified.startLineNumber),f=Math.max(E.original.startLineNumber-m.original.startLineNumber,E.modified.startLineNumber-g.modified.startLineNumber),p=d.findLastMonotonous(A=>A.original.startLineNumberA.modified.startLineNumbern.length||F>i.length||l.contains(F)||c.contains(A)||!Zae(n[A-1],i[F-1],r))break}b>0&&(c.addRange(new Xt(E.original.startLineNumber-b,E.original.startLineNumber)),l.addRange(new Xt(E.modified.startLineNumber-b,E.modified.startLineNumber)));let k;for(k=0;kn.length||F>i.length||l.contains(F)||c.contains(A)||!Zae(n[A-1],i[F-1],r))break}k>0&&(c.addRange(new Xt(E.original.endLineNumberExclusive,E.original.endLineNumberExclusive+k)),l.addRange(new Xt(E.modified.endLineNumberExclusive,E.modified.endLineNumberExclusive+k))),(b>0||k>0)&&(a[h]=new A1(new Xt(E.original.startLineNumber-b,E.original.endLineNumberExclusive+k),new Xt(E.modified.startLineNumber-b,E.modified.endLineNumberExclusive+k)))}return a}function Zae(u,e,t){if(u.trim()===e.trim())return!0;if(u.length>300&&e.length>300)return!1;const i=new I6e().compute(new wB([u],new Gt(0,1),!1),new wB([e],new Gt(0,1),!1),t);let r=0;const a=Ar.invert(i.diffs,u.length);for(const c of a)c.seq1Range.forEach(d=>{kW(u.charCodeAt(d))||r++});function o(c){let d=0;for(let h=0;he.length?u:e);return r/s>.6&&s>10}function uQe(u){if(u.length===0)return u;u.sort(y0(t=>t.original.startLineNumber,Uh));const e=[u[0]];for(let t=1;t=0&&a>=0&&r+a<=2){e[e.length-1]=n.join(i);continue}e.push(i)}return e}function nQe(u,e){const t=new aA(u);return e=e.filter(n=>{const i=t.findLastMonotonous(o=>o.original.endLineNumberExclusiveo.modified.endLineNumberExclusive0&&(o=o.delta(l))}i.push(o)}return n.length>0&&i.push(n[n.length-1]),i}function rQe(u,e,t){if(!u.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],a=n+1=n.start&&u.seq2Range.start-a>=i.start&&t.isStronglyEqual(u.seq2Range.start-a,u.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;u.seq1Range.start+ol&&(l=m,s=c)}return u.delta(s)}function aQe(u,e,t){const n=[];for(const i of t){const r=n[n.length-1];if(!r){n.push(i);continue}i.seq1Range.start-r.seq1Range.endExclusive<=2||i.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new Ar(r.seq1Range.join(i.seq1Range),r.seq2Range.join(i.seq2Range)):n.push(i)}return n}function oQe(u,e,t){const n=[];let i;function r(){if(!i)return;const o=i.s1Range.length-i.deleted;i.s2Range.length-i.added,Math.max(i.deleted,i.added)+(i.count-1)>o&&n.push(new Ar(i.s1Range,i.s2Range)),i=void 0}for(const o of t){let s=function(E,m){var g,f,p,D;if(!i||!i.s1Range.containsRange(E)||!i.s2Range.containsRange(m))if(i&&!(i.s1Range.endExclusive0||e.length>0;){const n=u[0],i=e[0];let r;n&&(!i||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function lQe(u,e,t){let n=t;if(n.length===0)return n;let i=0,r;do{r=!1;const a=[n[0]];for(let o=1;o5||E.seq1Range.length+E.seq2Range.length>5)};const s=n[o],l=a[a.length-1];c(l,s)?(r=!0,a[a.length-1]=a[a.length-1].join(s)):a.push(s)}n=a}while(i++<10&&r);return n}function cQe(u,e,t){let n=t;if(n.length===0)return n;let i=0,r;do{r=!1;const o=[n[0]];for(let s=1;s5||g.length>500)return!1;const p=u.getText(g).trim();if(p.length>20||p.split(/\r\n|\r|\n/).length>1)return!1;const D=u.countLinesIn(E.seq1Range),x=E.seq1Range.length,b=e.countLinesIn(E.seq2Range),k=E.seq2Range.length,A=u.countLinesIn(m.seq1Range),F=m.seq1Range.length,S=e.countLinesIn(m.seq2Range),w=m.seq2Range.length,z=2*40+50;function N(O){return Math.min(O,z)}return Math.pow(Math.pow(N(D*40+x),1.5)+Math.pow(N(b*40+k),1.5),1.5)+Math.pow(Math.pow(N(A*40+F),1.5)+Math.pow(N(S*40+w),1.5),1.5)>Math.pow(Math.pow(z,1.5),1.5)*1.3};const l=n[s],c=o[o.length-1];d(c,l)?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}n=o}while(i++<10&&r);const a=[];return vGe(n,(o,s,l)=>{let c=s;function d(p){return p.length>0&&p.trim().length<=3&&s.seq1Range.length+s.seq2Range.length>100}const h=u.extendToFullLines(s.seq1Range),E=u.getText(new Gt(h.start,s.seq1Range.start));d(E)&&(c=c.deltaStart(-E.length));const m=u.getText(new Gt(s.seq1Range.endExclusive,h.endExclusive));d(m)&&(c=c.deltaEnd(m.length));const g=Ar.fromOffsetPairs(o?o.getEndExclusives():Xd.zero,l?l.getStarts():Xd.max),f=c.intersect(g);a.push(f)}),a}class Qae{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:Xae(this.lines[e-1]),n=e===this.lines.length?0:Xae(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Xae(u){let e=0;for(;ek===A))return new WS([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new WS([new R0(new Xt(1,e.length+1),new Xt(1,t.length+1),[new Om(new j(1,1,e.length,e[0].length+1),new j(1,1,t.length,t[0].length+1))])],[],!1);const i=n.maxComputationTimeMs===0?Dk.instance:new KYe(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,a=new Map;function o(k){let A=a.get(k);return A===void 0&&(A=a.size,a.set(k,A)),A}const s=e.map(k=>o(k.trim())),l=t.map(k=>o(k.trim())),c=new Qae(s,e),d=new Qae(l,t),h=(()=>c.length+d.length<1700?this.dynamicProgrammingDiffing.compute(c,d,i,(k,A)=>e[k]===t[A]?t[A].length===0?.1:1+Math.log(1+t[A].length):.99):this.myersDiffingAlgorithm.compute(c,d))();let E=h.diffs,m=h.hitTimeout;E=FW(c,d,E),E=lQe(c,d,E);const g=[],f=k=>{if(r)for(let A=0;Ak.seq1Range.start-p===k.seq2Range.start-D);const A=k.seq1Range.start-p;f(A),p=k.seq1Range.endExclusive,D=k.seq2Range.endExclusive;const F=this.refineDiff(e,t,k,i,r);F.hitTimeout&&(m=!0);for(const S of F.mappings)g.push(S)}f(e.length-p);const x=eoe(g,e,t);let b=[];return n.computeMoves&&(b=this.computeMoves(x,e,t,s,l,i,r)),ck(()=>{function k(F,S){if(F.lineNumber<1||F.lineNumber>S.length)return!1;const w=S[F.lineNumber-1];return!(F.column<1||F.column>w.length+1)}function A(F,S){return!(F.startLineNumber<1||F.startLineNumber>S.length+1||F.endLineNumberExclusive<1||F.endLineNumberExclusive>S.length+1)}for(const F of x){if(!F.innerChanges)return!1;for(const S of F.innerChanges)if(!(k(S.modifiedRange.getStartPosition(),t)&&k(S.modifiedRange.getEndPosition(),t)&&k(S.originalRange.getStartPosition(),e)&&k(S.originalRange.getEndPosition(),e)))return!1;if(!A(F.modified,t)||!A(F.original,e))return!1}return!0}),new WS(x,b,m)}computeMoves(e,t,n,i,r,a,o){return XYe(e,t,n,i,r,a).map(c=>{const d=this.refineDiff(t,n,new Ar(c.original.toOffsetRange(),c.modified.toOffsetRange()),a,o),h=eoe(d.mappings,t,n,!0);return new N6e(c,h)})}refineDiff(e,t,n,i,r){const a=new wB(e,n.seq1Range,r),o=new wB(t,n.seq2Range,r),s=a.length+o.length<500?this.dynamicProgrammingDiffing.compute(a,o,i):this.myersDiffingAlgorithm.compute(a,o,i);let l=s.diffs;return l=FW(a,o,l),l=oQe(a,o,l),l=aQe(a,o,l),l=cQe(a,o,l),{mappings:l.map(d=>new Om(a.translateRange(d.seq1Range),o.translateRange(d.seq2Range))),hitTimeout:s.hitTimeout}}}function eoe(u,e,t,n=!1){const i=[];for(const r of Qxe(u.map(a=>dQe(a,e,t)),(a,o)=>a.original.overlapOrTouch(o.original)||a.modified.overlapOrTouch(o.modified))){const a=r[0],o=r[r.length-1];i.push(new R0(a.original.join(o.original),a.modified.join(o.modified),r.map(s=>s.innerChanges[0])))}return ck(()=>!n&&i.length>0&&i[0].original.startLineNumber!==i[0].modified.startLineNumber?!1:Uve(i,(r,a)=>a.original.startLineNumber-r.original.endLineNumberExclusive===a.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t[u.modifiedRange.startLineNumber-1].length&&u.originalRange.startColumn-1>=e[u.originalRange.startLineNumber-1].length&&u.originalRange.startLineNumber<=u.originalRange.endLineNumber+i&&u.modifiedRange.startLineNumber<=u.modifiedRange.endLineNumber+i&&(n=1);const r=new Xt(u.originalRange.startLineNumber+n,u.originalRange.endLineNumber+1+i),a=new Xt(u.modifiedRange.startLineNumber+n,u.modifiedRange.endLineNumber+1+i);return new R0(r,a,[u])}const toe={getLegacy:()=>new jYe,getDefault:()=>new O6e};function XE(u,e){const t=Math.pow(10,e);return Math.round(u*t)/t}class nu{constructor(e,t,n,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class sl{constructor(e,t,n,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=XE(Math.max(Math.min(1,t),0),3),this.l=XE(Math.max(Math.min(1,n),0),3),this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,a=Math.max(t,n,i),o=Math.min(t,n,i);let s=0,l=0;const c=(o+a)/2,d=a-o;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),a){case t:s=(n-i)/d+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:r}=e;let a,o,s;if(n===0)a=o=s=i;else{const l=i<.5?i*(1+n):i+n-i*n,c=2*i-l;a=sl._hue2rgb(c,l,t+1/3),o=sl._hue2rgb(c,l,t),s=sl._hue2rgb(c,l,t-1/3)}return new nu(Math.round(a*255),Math.round(o*255),Math.round(s*255),r)}}class e1{constructor(e,t,n,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=XE(Math.max(Math.min(1,t),0),3),this.v=XE(Math.max(Math.min(1,n),0),3),this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),a=Math.min(t,n,i),o=r-a,s=r===0?0:o/r;let l;return o===0?l=0:r===t?l=((n-i)/o%6+6)%6:r===n?l=(i-t)/o+2:l=(t-n)/o+4,new e1(Math.round(l*60),s,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:r}=e,a=i*n,o=a*(1-Math.abs(t/60%2-1)),s=i-a;let[l,c,d]=[0,0,0];return t<60?(l=a,c=o):t<120?(l=o,c=a):t<180?(c=a,d=o):t<240?(c=o,d=a):t<300?(l=o,d=a):t<=360&&(l=a,d=o),l=Math.round((l+s)*255),c=Math.round((c+s)*255),d=Math.round((d+s)*255),new nu(l,c,d,r)}}let ae=class nl{static fromHex(e){return nl.Format.CSS.parseHex(e)||nl.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:sl.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:e1.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof nu)this.rgba=e;else if(e instanceof sl)this._hsla=e,this.rgba=sl.toRGBA(e);else if(e instanceof e1)this._hsva=e,this.rgba=e1.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&nu.equals(this.rgba,e.rgba)&&sl.equals(this.hsla,e.hsla)&&e1.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=nl._relativeLuminanceForComponent(this.rgba.r),t=nl._relativeLuminanceForComponent(this.rgba.g),n=nl._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*t+.0722*n;return XE(i,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t0)for(const i of n){const r=i.filter(l=>l!==void 0),a=r[1],o=r[2];if(!o)continue;let s;if(a==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;s=uoe(sC(u,i),lC(o,l),!1)}else if(a==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;s=uoe(sC(u,i),lC(o,l),!0)}else if(a==="hsl"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;s=noe(sC(u,i),lC(o,l),!1)}else if(a==="hsla"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;s=noe(sC(u,i),lC(o,l),!0)}else a==="#"&&(s=hQe(sC(u,i),a+o));s&&e.push(s)}return e}function mQe(u){return!u||typeof u.getValue!="function"||typeof u.positionAt!="function"?[]:EQe(u)}var j4=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class gQe extends fYe{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const r=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>r&&(n=r,i=!0)}return i?{lineNumber:t,column:n}:e}}class em{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new gQe(dt.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,n){return j4(this,void 0,void 0,function*(){const i=this._getModel(e);return i?iX.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=this._getModel(e),a=this._getModel(t);return!r||!a?null:em.computeDiff(r,a,n,i)})}static computeDiff(e,t,n,i){const r=i==="advanced"?toe.getDefault():toe.getLegacy(),a=e.getLinesContent(),o=t.getLinesContent(),s=r.computeDiff(a,o,n),l=s.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(d){return d.map(h=>{var E;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(E=h.innerChanges)===null||E===void 0?void 0:E.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])]})}return{identical:l,quitEarly:s.hitTimeout,changes:c(s.changes),moves:s.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,c(d.changes)])}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let r=1;r<=n;r++){const a=e.getLineContent(r),o=t.getLineContent(r);if(a!==o)return!1}return!0}computeMoreMinimalEdits(e,t,n){return j4(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return t;const r=[];let a;t=t.slice(0).sort((s,l)=>{if(s.range&&l.range)return j.compareRangesUsingStarts(s.range,l.range);const c=s.range?0:1,d=l.range?0:1;return c-d});let o=0;for(let s=1;sem._diffLimit){r.push({range:s,text:l});continue}const h=EYe(d,l,n),E=i.offsetAt(j.lift(s).getStartPosition());for(const m of h){const g=i.positionAt(E+m.originalStart),f=i.positionAt(E+m.originalStart+m.originalLength),p={text:l.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:f.lineNumber,endColumn:f.column}};i.getValueInRange(p.range)!==p.text&&r.push(p)}}return typeof a=="number"&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(e){return j4(this,void 0,void 0,function*(){const t=this._getModel(e);return t?CYe(t):null})}computeDefaultDocumentColors(e){return j4(this,void 0,void 0,function*(){const t=this._getModel(e);return t?mQe(t):null})}textualSuggest(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=new va,a=new RegExp(n,i),o=new Set;e:for(const s of e){const l=this._getModel(s);if(l){for(const c of l.words(a))if(!(c===t||!isNaN(Number(c)))&&(o.add(c),o.size>em._suggestionsLimit))break e}}return{words:Array.from(o),duration:r.elapsed()}})}computeWordRanges(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=this._getModel(e);if(!r)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let s=t.startLineNumber;sthis._host.fhr(o,s)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,t),Promise.resolve(BQ(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}em._diffLimit=1e5;em._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=zve());const sX=Ut("textResourceConfigurationService"),H6e=Ut("textResourcePropertiesService"),We=Ut("ILanguageFeaturesService");var fQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},LB=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const ioe=60*1e3,roe=5*60*1e3;function bf(u,e){const t=u.getModel(e);return!(!t||t.isTooLargeForSyncing())}let yW=class extends ne{constructor(e,t,n,i,r){super(),this._modelService=e,this._workerManager=this._register(new DQe(this._modelService,i)),this._logService=n,this._register(r.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(a,o)=>bf(this._modelService,a.uri)?this._workerManager.withWorker().then(s=>s.computeLinks(a.uri)).then(s=>s&&{links:s}):Promise.resolve({links:[]})})),this._register(r.completionProvider.register("*",new pQe(this._workerManager,t,this._modelService,i)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return bf(this._modelService,e)}computedUnicodeHighlights(e,t,n){return this._workerManager.withWorker().then(i=>i.computedUnicodeHighlights(e,t,n))}computeDiff(e,t,n,i){return LB(this,void 0,void 0,function*(){const r=yield this._workerManager.withWorker().then(s=>s.computeDiff(e,t,n,i));if(!r)return null;return{identical:r.identical,quitEarly:r.quitEarly,changes:o(r.changes),moves:r.moves.map(s=>new N6e(new A1(new Xt(s[0],s[1]),new Xt(s[2],s[3])),o(s[4])))};function o(s){return s.map(l=>{var c;return new R0(new Xt(l[0],l[1]),new Xt(l[2],l[3]),(c=l[4])===null||c===void 0?void 0:c.map(d=>new Om(new j(d[0],d[1],d[2],d[3]),new j(d[4],d[5],d[6],d[7]))))})}})}computeMoreMinimalEdits(e,t,n=!1){if(pa(t)){if(!bf(this._modelService,e))return Promise.resolve(t);const i=va.create(),r=this._workerManager.withWorker().then(a=>a.computeMoreMinimalEdits(e,t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([r,Pm(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return bf(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(i=>i.navigateValueSet(e,t,n))}canComputeWordRanges(e){return bf(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};yW=fQe([cC(0,_n),cC(1,sX),cC(2,i0),cC(3,tn),cC(4,We)],yW);class pQe{constructor(e,t,n,i){this.languageConfigurationService=i,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}provideCompletionItems(e,t){return LB(this,void 0,void 0,function*(){const n=this._configurationService.getValue(e.uri,t,"editor");if(!n.wordBasedSuggestions)return;const i=[];if(n.wordBasedSuggestionsMode==="currentDocument")bf(this._modelService,e.uri)&&i.push(e.uri);else for(const d of this._modelService.getModels())bf(this._modelService,d.uri)&&(d===e?i.unshift(d.uri):(n.wordBasedSuggestionsMode==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&i.push(d.uri));if(i.length===0)return;const r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),a=e.getWordAtPosition(t),o=a?new j(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):j.fromPositions(t),s=o.setEndPosition(t.lineNumber,t.column),c=yield(yield this._workerManager.withWorker()).textualSuggest(i,a==null?void 0:a.word,r);if(c)return{duration:c.duration,suggestions:c.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:s,replace:o}}))}})}}class DQe extends ne{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new rA).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(roe/2)),this._register(this._modelService.onModelRemoved(i=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>roe&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new lX(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class xQe extends ne{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){const i=new rA;i.cancelAndSet(()=>this._checkStopModelSync(),Math.round(ioe/2)),this._register(i)}}dispose(){for(const e in this._syncedModels)Su(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const n of e){const i=n.toString();this._syncedModels[i]||this._beginModelSync(n,t),this._syncedModels[i]&&(this._syncedModelsLastUsedTime[i]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>ioe&&t.push(n);for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const r=new pe;r.add(n.onDidChangeContent(a=>{this._proxy.acceptModelChanged(i.toString(),a)})),r.add(n.onWillDispose(()=>{this._stopModelSync(i)})),r.add(ft(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=r}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Su(t)}}class aoe{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Fj{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class lX extends ne{constructor(e,t,n,i){super(),this.languageConfigurationService=i,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new XN(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new bZe(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Fj(this)))}catch(e){fW(e),this._worker=new aoe(new em(new Fj(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(fW(e),this._worker=new aoe(new em(new Fj(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new xQe(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return LB(this,void 0,void 0,function*(){return this._disposed?Promise.reject(MUe()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))})}computedUnicodeHighlights(e,t,n){return this._withSyncedResources([e]).then(i=>i.computeUnicodeHighlights(e.toString(),t,n))}computeDiff(e,t,n,i){return this._withSyncedResources([e,t],!0).then(r=>r.computeDiff(e.toString(),t.toString(),n,i))}computeMoreMinimalEdits(e,t,n){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t,n))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}textualSuggest(e,t,n){return LB(this,void 0,void 0,function*(){const i=yield this._withSyncedResources(e),r=n.source,a=n.flags;return i.textualSuggest(e.map(o=>o.toString()),t,r,a)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const r=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),a=r.source,o=r.flags;return n.computeWordRanges(e.toString(),t,a,o)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(i=>{const r=this._modelService.getModel(e);if(!r)return null;const a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),o=a.source,s=a.flags;return i.navigateValueSet(e.toString(),t,n,o,s)})}dispose(){super.dispose(),this._disposed=!0}}function vQe(u,e,t){return new CQe(u,e,t)}class CQe extends lX{constructor(e,t,n){super(e,n.keepIdleModels||!1,n.label,t),this._foreignModuleId=n.moduleId,this._foreignModuleCreateData=n.createData||null,this._foreignModuleHost=n.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?BQ(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;const i=(o,s)=>e.fmr(o,s),r=(o,s)=>function(){const l=Array.prototype.slice.call(arguments,0);return s(o,l)},a={};for(const o of n)a[o]=r(o,i);return a})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}const oA={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},ev=new class{clone(){return this}equals(u){return this===u}};function cX(u,e){return new jQ([new ik(0,"",u)],e)}function oP(u,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(u<<0|0|0|32768|2<<24)>>>0,new RN(t,e===null?ev:e)}class Jr{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return i&1&&(n+=" mtki"),i&2&&(n+=" mtkb"),i&4&&(n+=" mtku"),i&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;i&1&&(r+="font-style: italic;"),i&2&&(r+="font-weight: bold;");let a="";return i&4&&(a+=" underline"),i&8&&(a+=" line-through"),a&&(r+=`text-decoration:${a};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}class nr{static createEmpty(e,t){const n=nr.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new nr(i,e,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=n}equals(e){return e instanceof nr?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let a=i;a0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],n=Jr.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Jr.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Jr.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Jr.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[(e<<1)+1];return Jr.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Jr.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return nr.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new dX(this,e,t,n)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let r=0;r>>1)-1;for(;nt&&(i=r)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,i="";const r=new Array;let a=0;for(;;){const o=ta){i+=this._text.substring(a,s.offset);const l=this._tokens[(t<<1)+1];r.push(i.length,l),a=s.offset}i+=s.text,r.push(i.length,s.tokenMetadata),n++}else break}return new nr(new Uint32Array(r),i,this._languageIdCodec)}}nr.defaultTokenMetadata=(32768|2<<24)>>>0;class dX{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let r=this._firstTokenIndex,a=e.getCount();r=n);r++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof dX?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class as{constructor(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const n=e.length,i=t.length;if(n!==i)return!1;for(let r=0;r=r||(o[s++]=new as(Math.max(1,l.startColumn-i+1),Math.min(a+1,l.endColumn-i+1),l.className,l.type));return o}static filter(e,t,n,i){if(e.length===0)return[];const r=[];let a=0;for(let o=0,s=e.length;ot||c.isEmpty()&&(l.type===0||l.type===3))continue;const d=c.startLineNumber===t?c.startColumn:n,h=c.endLineNumber===t?c.endColumn:i;r[a++]=new as(d,h,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){const n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const n=as._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t),this.metadata.splice(i,0,n);break}this.count++}};class kQe{static normalize(e,t){if(t.length===0)return[];const n=[],i=new bQe;let r=0;for(let a=0,o=t.length;a1){const g=e.charCodeAt(l-2);ur(g)&&l--}if(c>1){const g=e.charCodeAt(c-2);ur(g)&&c--}const E=l-1,m=c-2;r=i.consumeLowerThan(E,r,n),i.count===0&&(r=E),i.insert(m,d,h)}return i.consumeLowerThan(1073741824,r,n),n}}class mr{constructor(e,t,n,i){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=i,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class V6e{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class fg{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D,x){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=r,this.containsRTL=a,this.fauxIndentLength=o,this.lineTokens=s,this.lineDecorations=l.sort(as.compare),this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=g,this.renderWhitespace=f==="all"?4:f==="boundary"?1:f==="selection"?2:f==="trailing"?3:0,this.renderControlCharacters=p,this.fontLigatures=D,this.selectionsOnLine=x&&x.sort((A,F)=>A.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,n,i){const r=(t<<16|n<<0)>>>0;this._data[e-1]=r,this._horizontalOffset[e-1]=i}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),n=Id.getPartIndex(t),i=Id.getCharIndex(t);return new $6e(n,i)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;const i=(e<<16|n<<0)>>>0;let r=0,a=this.length-1;for(;r+1>>1,f=this._data[g];if(f===i)return g;f>i?a=g:r=g}if(r===a)return r;const o=this._data[r],s=this._data[a];if(o===i)return r;if(s===i)return a;const l=Id.getPartIndex(o),c=Id.getCharIndex(o),d=Id.getPartIndex(s);let h;l!==d?h=t:h=Id.getCharIndex(s);const E=n-c,m=h-n;return E<=m?r:a}}class _W{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function sA(u,e){if(u.lineContent.length===0){if(u.lineDecorations.length>0){e.appendString("");let t=0,n=0,i=0;for(const a of u.lineDecorations)(a.type===1||a.type===2)&&(e.appendString(''),a.type===1&&(i|=1,t++),a.type===2&&(i|=2,n++));e.appendString("");const r=new Id(1,t+n);return r.setColumnInfo(1,t,0,0),new _W(r,!1,i)}return e.appendString(""),new _W(new Id(0,0),!1,0)}return zQe(AQe(u),e)}class FQe{constructor(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}function sP(u){const e=new h6(1e4),t=sA(u,e);return new FQe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class yQe{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=i,this.isOverflowing=r,this.overflowingCharCount=a,this.parts=o,this.containsForeignElements=s,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=E,this.renderSpaceCharCode=m,this.renderWhitespace=g,this.renderControlCharacters=f}}function AQe(u){const e=u.lineContent;let t,n,i;u.stopRenderingLineAfter!==-1&&u.stopRenderingLineAfter0){for(let o=0,s=u.lineDecorations.length;o0&&(r[a++]=new mr(n,"",0,!1));let o=n;for(let s=0,l=t.getCount();s=i){const E=e?Ux(u.substring(o,i)):!1;r[a++]=new mr(i,d,0,E);break}const h=e?Ux(u.substring(o,c)):!1;r[a++]=new mr(c,d,0,h),o=c}return r}function SQe(u,e,t){let n=0;const i=[];let r=0;if(t)for(let a=0,o=e.length;a=50&&(i[r++]=new mr(E+1,c,d,h),m=E+1,E=-1);m!==l&&(i[r++]=new mr(l,c,d,h))}else i[r++]=s;n=l}else for(let a=0,o=e.length;a50){const d=s.type,h=s.metadata,E=s.containsRTL,m=Math.ceil(c/50);for(let g=1;g=8234&&u<=8238||u>=8294&&u<=8297||u>=8206&&u<=8207||u===1564}function BQe(u,e){const t=[];let n=new mr(0,"",0,!1),i=0;for(const r of e){const a=r.endIndex;for(;in.endIndex&&(n=new mr(i,r.type,r.metadata,r.containsRTL),t.push(n)),n=new mr(i+1,"mtkcontrol",r.metadata,!1),t.push(n))}i>n.endIndex&&(n=new mr(a,r.type,r.metadata,r.containsRTL),t.push(n))}return t}function wQe(u,e,t,n){const i=u.continuesWithWrappedLine,r=u.fauxIndentLength,a=u.tabSize,o=u.startVisibleColumn,s=u.useMonospaceOptimizations,l=u.selectionsOnLine,c=u.renderWhitespace===1,d=u.renderWhitespace===3,h=u.renderSpaceWidth!==u.spaceWidth,E=[];let m=0,g=0,f=n[g].type,p=n[g].containsRTL,D=n[g].endIndex;const x=n.length;let b=!1,k=Ta(e),A;k===-1?(b=!0,k=t,A=t):A=Hc(e);let F=!1,S=0,w=l&&l[S],z=o%a;for(let O=r;O=w.endOffset&&(S++,w=l&&l[S]);let _;if(OA)_=!0;else if(y===9)_=!0;else if(y===32)if(c)if(F)_=!0;else{const L=O+1O),_&&d&&(_=b||O>A),_&&p&&O>=k&&O<=A&&(_=!1),F){if(!_||!s&&z>=a){if(h){const L=m>0?E[m-1].endIndex:r;for(let T=L+1;T<=O;T++)E[m++]=new mr(T,"mtkw",1,!1)}else E[m++]=new mr(O,"mtkw",1,!1);z=z%a}}else(O===D||_&&O>r)&&(E[m++]=new mr(O,f,0,p),z=z%a);for(y===9?z=a:Tm(y)?z+=2:z++,F=_;O===D&&(g++,g0?e.charCodeAt(t-1):0,y=t>1?e.charCodeAt(t-2):0;O===32&&y!==32&&y!==9||(N=!0)}else N=!0;if(N)if(h){const O=m>0?E[m-1].endIndex:r;for(let y=O+1;y<=t;y++)E[m++]=new mr(y,"mtkw",1,!1)}else E[m++]=new mr(t,"mtkw",1,!1);else E[m++]=new mr(t,f,0,p);return E}function LQe(u,e,t,n){n.sort(as.compare);const i=kQe.normalize(u,n),r=i.length;let a=0;const o=[];let s=0,l=0;for(let d=0,h=t.length;dl&&(l=D.startOffset,o[s++]=new mr(l,g,f,p)),D.endOffset+1<=m)l=D.endOffset+1,o[s++]=new mr(l,g+" "+D.className,f|D.metadata,p),a++;else{l=m,o[s++]=new mr(l,g+" "+D.className,f|D.metadata,p);break}}m>l&&(l=m,o[s++]=new mr(l,g,f,p))}const c=t[t.length-1].endIndex;if(a'):e.appendString("");for(let w=0,z=l.length;w=c&&(V+=J)}}for(T&&(e.appendString(' style="width:'),e.appendString(String(m*I)),e.appendString('px"')),e.appendASCIICharCode(62);b1?e.appendCharCode(8594):e.appendCharCode(65515);for(let J=2;J<=U;J++)e.appendCharCode(160)}else V=2,U=1,e.appendCharCode(g),e.appendCharCode(8204);A+=V,F+=U,b>=c&&(k+=U)}}else for(e.appendASCIICharCode(62);b=c&&(k+=V)}R?S++:S=0,b>=a&&!x&&N.isPseudoAfter()&&(x=!0,D.setColumnInfo(b+1,w,A,F)),e.appendString("")}return x||D.setColumnInfo(a+1,l.length-1,A,F),o&&(e.appendString(''),e.appendString(v("showMore","Show more ({0})",TQe(s))),e.appendString("")),e.appendString(""),new _W(D,E,i)}function MQe(u){return u.toString(16).toUpperCase().padStart(4,"0")}function TQe(u){return u<1024?v("overflow.chars","{0} chars",u):u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/1024/1024).toFixed(1)} MB`}class soe{constructor(e,t,n,i){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=i|0}}class NQe{constructor(e,t){this.tabSize=e,this.data=t}}class hX{constructor(e,t,n,i,r,a,o){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=r,this.tokens=a,this.inlineDecorations=o}}class Zs{constructor(e,t,n,i,r,a,o,s,l,c){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=i,this.isBasicASCII=Zs.isBasicASCII(n,a),this.containsRTL=Zs.containsRTL(n,this.isBasicASCII,r),this.tokens=o,this.inlineDecorations=s,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return t?nA(e):!0}static containsRTL(e,t,n){return!t&&n?Ux(e):!1}}class Yb{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class PQe{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=i}toInlineDecoration(e){return new Yb(new j(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class W6e{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class xk{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&di(e.data,t.data)}static equalsArr(e,t){return di(e,t,xk.equals)}}function RQe(u){return Array.isArray(u)}function IQe(u){return!RQe(u)}function G6e(u){return typeof u=="string"}function loe(u){return!G6e(u)}function GD(u){return!u}function tm(u,e){return u.ignoreCase&&e?e.toLowerCase():e}function coe(u){return u.replace(/[&<>'"_]/g,"-")}function OQe(u,e){console.log(`${u.languageId}: ${e}`)}function hn(u,e){return new Error(`${u.languageId}: ${e}`)}function xE(u,e,t,n,i){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let a=null;return e.replace(r,function(o,s,l,c,d,h,E,m,g){return GD(l)?GD(c)?!GD(d)&&d0;){const n=u.tokenizer[t];if(n)return n;const i=t.lastIndexOf(".");i<0?t=null:t=t.substr(0,i)}return null}function jQe(u,e){let t=e;for(;t&&t.length>0;){if(u.stateNames[t])return!0;const i=t.lastIndexOf(".");i<0?t=null:t=t.substr(0,i)}return!1}var HQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},VQe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},SW;const U6e=5;class vk{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new ox(e,t);let n=ox.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let i=this._entries[n];return i||(i=new ox(e,t),this._entries[n]=i,i)}}vk._INSTANCE=new vk(U6e);class ox{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return ox._equals(this,e)}push(e){return vk.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return vk.create(this.parent,e)}}class d5{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new d5(this.languageId,this.state)}}class vE{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new Qb(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new Qb(e,t);const n=ox.getStackElementId(e);let i=this._entries[n];return i||(i=new Qb(e,null),this._entries[n]=i,i)}}vE._INSTANCE=new vE(U6e);class Qb{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:vE.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof Qb)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class $Qe{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new ik(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,i){const r=n.languageId,a=n.state,o=qn.get(r);if(!o)return this.enterLanguage(r),this.emit(i,""),a;const s=o.tokenize(e,t,a);if(i!==0)for(const l of s.tokens)this._tokens.push(new ik(l.offset+i,l.type,l.language));else this._tokens=this._tokens.concat(s.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,s.endState}finalize(e){return new jQ(this._tokens,e)}}class zB{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){const i=e!==null?e.length:0,r=t.length,a=n!==null?n.length:0;if(i===0&&r===0&&a===0)return new Uint32Array(0);if(i===0&&r===0)return n;if(r===0&&a===0)return e;const o=new Uint32Array(i+r+a);e!==null&&o.set(e);for(let s=0;s{if(a)return;let s=!1;for(let l=0,c=o.changedLanguages.length;l{o.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const n=qn.get(t);if(n){if(n instanceof SW){const i=n.getLoadStatus();i.loaded===!1&&e.push(i.promise)}continue}qn.isResolved(t)||e.push(qn.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=vk.create(null,this._lexer.start);return vE.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return cX(this._languageId,n);const i=new $Qe,r=this._tokenize(e,t,n,i);return i.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return oP(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);const i=new zB(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,i);return i.finalize(r)}_tokenize(e,t,n,i){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,i):this._myTokenize(e,t,n,0,i)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Y7(this._lexer,t.stack.state),!n))throw hn(this._lexer,"tokenizer state is not defined: "+t.stack.state);let i=-1,r=!1;for(const a of n){if(!loe(a.action)||a.action.nextEmbedded!=="@pop")continue;r=!0;let o=a.regex;const s=a.regex.source;if(s.substr(0,4)==="^(?:"&&s.substr(s.length-1,1)===")"){const c=(o.ignoreCase?"i":"")+(o.unicode?"u":"");o=new RegExp(s.substr(4,s.length-5),c)}const l=e.search(o);l===-1||l!==0&&a.matchOnlyAtLineStart||(i===-1||l0&&r.nestedLanguageTokenize(o,!1,n.embeddedLanguageData,i);const s=e.substring(a);return this._myTokenize(s,t,n,i+a,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,i,r){r.enterLanguage(this._languageId);const a=e.length,o=t&&this._lexer.includeLF?e+` -`:e,s=o.length;let l=n.embeddedLanguageData,c=n.stack,d=0,h=null,E=!0;for(;E||d=s)break;E=!1;let w=this._lexer.tokenizer[p];if(!w&&(w=Y7(this._lexer,p),!w))throw hn(this._lexer,"tokenizer state is not defined: "+p);const z=o.substr(d);for(const N of w)if((d===0||!N.matchOnlyAtLineStart)&&(D=z.match(N.regex),D)){x=D[0],b=N.action;break}}if(D||(D=[""],x=""),b||(d=this._lexer.maxStack)throw hn(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(p)}else if(b.next==="@pop"){if(c.depth<=1)throw hn(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(k));c=c.pop()}else if(b.next==="@popall")c=c.popall();else{let w=xE(this._lexer,b.next,x,D,p);if(w[0]==="@"&&(w=w.substr(1)),Y7(this._lexer,w))c=c.push(w);else throw hn(this._lexer,"trying to set a next state '"+w+"' that is undefined in rule: "+this._safeRuleName(k))}}b.log&&typeof b.log=="string"&&OQe(this._lexer,this._lexer.languageId+": "+xE(this._lexer,b.log,x,D,p))}if(F===null)throw hn(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(k));const S=w=>{const z=this._languageService.getLanguageIdByLanguageName(w)||this._languageService.getLanguageIdByMimeType(w)||w,N=this._getNestedEmbeddedLanguageData(z);if(d0)throw hn(this._lexer,"groups cannot be nested: "+this._safeRuleName(k));if(D.length!==F.length+1)throw hn(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(k));let w=0;for(let z=1;zu});class EX{static colorizeElement(e,t,n,i){i=i||{};const r=i.theme||"vs",a=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!a)return console.error("Mode not detected"),Promise.resolve();const o=t.getLanguageIdByMimeType(a)||a;e.setTheme(r);const s=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;const l=c=>{var d;const h=(d=yj==null?void 0:yj.createHTML(c))!==null&&d!==void 0?d:c;n.innerHTML=h};return this.colorize(t,s||"",o,i).then(l,c=>console.error(c))}static colorize(e,t,n,i){return WQe(this,void 0,void 0,function*(){const r=e.languageIdCodec;let a=4;i&&typeof i.tabSize=="number"&&(a=i.tabSize),UQ(t)&&(t=t.substr(1));const o=F1(t);if(!e.isRegisteredLanguageId(n))return doe(o,a,r);const s=yield qn.getOrCreate(n);return s?GQe(o,a,s,r):doe(o,a,r)})}static colorizeLine(e,t,n,i,r=4){const a=Zs.isBasicASCII(e,t),o=Zs.containsRTL(e,a,n);return sP(new fg(!1,!0,e,!1,a,o,0,i,[],r,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){const i=e.getLineContent(t);e.tokenization.forceTokenization(t);const a=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),a,n)}}function GQe(u,e,t,n){return new Promise((i,r)=>{const a=()=>{const o=UQe(u,e,t,n);if(t instanceof Ck){const s=t.getLoadStatus();if(s.loaded===!1){s.promise.then(a,r);return}}i(o)};a()})}function doe(u,e,t){let n=[];const r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let a=0,o=u.length;a")}return n.join("")}function UQe(u,e,t,n){let i=[],r=t.getInitialState();for(let a=0,o=u.length;a"),r=l.endState}return i.join("")}const hoe=2e4;let kf,GS,BW,US,wW;function qQe(u){kf=document.createElement("div"),kf.className="monaco-aria-container";const e=()=>{const n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),kf.appendChild(n),n};GS=e(),BW=e();const t=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),kf.appendChild(n),n};US=t(),wW=t(),u.appendChild(kf)}function ga(u){kf&&(GS.textContent!==u?(Nr(BW),MB(GS,u)):(Nr(GS),MB(BW,u)))}function jm(u){kf&&(US.textContent!==u?(Nr(wW),MB(US,u)):(Nr(US),MB(wW,u)))}function MB(u,e){Nr(u),e.length>hoe&&(e=e.substr(0,hoe)),u.textContent=e,u.style.visibility="hidden",u.style.visibility="visible"}const mX=Ut("markerDecorationsService");var JQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ZQe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let bk=class{constructor(e,t){}dispose(){}};bk.ID="editor.contrib.markerDecorations";bk=JQe([ZQe(1,mX)],bk);fu(bk.ID,bk,0);class q6e extends ne{constructor(e,t){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let n=!1,i=!1;const r=()=>{if(n&&!i)try{n=!1,i=!0,t()}finally{requestAnimationFrame(()=>{i=!1,r()})}};this._resizeObserver=new ResizeObserver(a=>{e=a&&a[0]&&a[0].contentRect?a[0].contentRect:null,n=!0,r()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,i=0;t?(n=t.width,i=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,i=this._referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),(this._width!==n||this._height!==i)&&(this._width=n,this._height=i,e&&this._onDidChange.fire())}}class um{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=um._read(e,this.key),n=r=>um._read(e,r),i=(r,a)=>um._write(e,r,a);this.migrate(t,n,i)}static _read(e,t){if(typeof e>"u")return;const n=t.indexOf(".");if(n>=0){const i=t.substring(0,n);return this._read(e[i],t.substring(n+1))}return e[t]}static _write(e,t,n){const i=t.indexOf(".");if(i>=0){const r=t.substring(0,i);e[r]=e[r]||{},this._write(e[r],t.substring(i+1),n);return}e[t]=n}}um.items=[];function pg(u,e){um.items.push(new um(u,e))}function G0(u,e){pg(u,(t,n,i)=>{if(typeof t<"u"){for(const[r,a]of e)if(t===r){i(u,a);return}}})}function YQe(u){um.items.forEach(e=>e.apply(u))}G0("wordWrap",[[!0,"on"],[!1,"off"]]);G0("lineNumbers",[[!0,"on"],[!1,"off"]]);G0("cursorBlinking",[["visible","solid"]]);G0("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);G0("renderLineHighlight",[[!0,"line"],[!1,"none"]]);G0("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);G0("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);G0("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);G0("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);G0("autoIndent",[[!1,"advanced"],[!0,"full"]]);G0("matchBrackets",[[!0,"always"],[!1,"never"]]);G0("renderFinalNewline",[[!0,"on"],[!1,"off"]]);G0("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);pg("autoClosingBrackets",(u,e,t)=>{u===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});pg("renderIndentGuides",(u,e,t)=>{typeof u<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!u))});pg("highlightActiveIndentGuide",(u,e,t)=>{typeof u<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!u))});const QQe={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};pg("suggest.filteredTypes",(u,e,t)=>{if(u&&typeof u=="object"){for(const n of Object.entries(QQe))u[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});pg("quickSuggestions",(u,e,t)=>{if(typeof u=="boolean"){const n=u?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});pg("experimental.stickyScroll.enabled",(u,e,t)=>{typeof u=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",u))});pg("experimental.stickyScroll.maxLineCount",(u,e,t)=>{typeof u=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",u))});class XQe{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new Q,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const tv=new XQe,k4=Ut("accessibilityService"),lA=new Pe("accessibilityModeEnabled",!1);var eXe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tXe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let LW=class extends ne{constructor(e,t,n,i){super(),this._accessibilityService=i,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new Q),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new fve,this.isSimpleWidget=e,this._containerObserver=this._register(new q6e(n,t.dimension)),this._rawOptions=Eoe(t),this._validatedOptions=CE.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(g0.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(tv.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(aW.onDidChange(()=>this._recomputeOptions())),this._register(sk.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=CE.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=u3.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:tv.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return CE.computeOptions(this._validatedOptions,i)}_readEnvConfiguration(){return{extraEditorClassName:nXe(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:t3||M0,pixelRatio:sk.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return aW.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=Eoe(e);CE.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=CE.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=uXe(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};LW=eXe([tXe(3,k4)],LW);function uXe(u){let e=0;for(;u;)u=Math.floor(u/10),e++;return e||1}function nXe(){let u="";return!l4&&!Vve&&(u+="no-user-select "),l4&&(u+="no-minimap-shadow ",u+="enable-user-select "),iu&&(u+="mac "),u}class iXe{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class rXe{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class CE{static validateOptions(e){const t=new iXe;for(const n of a5){const i=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(i))}return t}static computeOptions(e,t){const n=new rXe;for(const i of a5)n._write(i.id,i.compute(t,n,e._read(i.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?di(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!CE._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let i=!1;for(const r of a5){const a=!CE._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=a,a&&(i=!0)}return i?new gve(n):null}static applyUpdate(e,t){let n=!1;for(const i of a5)if(t.hasOwnProperty(i.name)){const r=i.applyUpdate(e[i.name],t[i.name]);e[i.name]=r.newValue,n=n||r.didChange}return n}}function Eoe(u){const e=xh(u);return YQe(e),e}function Ci(u,e,t){let n=null,i=null;if(typeof t.value=="function"?(n="value",i=t.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",i=t.get),!i)throw new Error("not supported");const r=`$memoize$${e}`;t[n]=function(...a){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,a)}),this[r]}}var aXe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yu;(function(u){u.Tap="-monaco-gesturetap",u.Change="-monaco-gesturechange",u.Start="-monaco-gesturestart",u.End="-monaco-gesturesend",u.Contextmenu="-monaco-gesturecontextmenu"})(Yu||(Yu={}));class Zu extends ne{constructor(){super(),this.dispatched=!1,this.targets=new to,this.ignoreTargets=new to,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ce(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(ce(document,"touchend",e=>this.onTouchEnd(e))),this._register(ce(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){if(!Zu.isTouchDevice())return ne.None;Zu.INSTANCE||(Zu.INSTANCE=new Zu);const t=Zu.INSTANCE.targets.push(e);return ft(t)}static ignoreTarget(e){if(!Zu.isTouchDevice())return ne.None;Zu.INSTANCE||(Zu.INSTANCE=new Zu);const t=Zu.INSTANCE.ignoreTargets.push(e);return ft(t)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,i=e.targetTouches.length;n=Zu.HOLD_DELAY&&Math.abs(o.initialPageX-o0(o.rollingPageX))<30&&Math.abs(o.initialPageY-o0(o.rollingPageY))<30){const l=this.newGestureEvent(Yu.Contextmenu,o.initialTarget);l.pageX=o0(o.rollingPageX),l.pageY=o0(o.rollingPageY),this.dispatchEvent(l)}else if(n===1){const l=o0(o.rollingPageX),c=o0(o.rollingPageY),d=o0(o.rollingTimestamps)-o.rollingTimestamps[0],h=l-o.rollingPageX[0],E=c-o.rollingPageY[0],m=[...this.targets].filter(g=>o.initialTarget instanceof Node&&g.contains(o.initialTarget));this.inertia(m,t,Math.abs(h)/d,h>0?1:-1,l,Math.abs(E)/d,E>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(Yu.End,o.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===Yu.Tap){const t=new Date().getTime();let n=0;t-this._lastSetTapCountTime>Zu.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===Yu.Change||e.type===Yu.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,n,i,r,a,o,s){this.handle=T0(()=>{const l=Date.now(),c=l-t;let d=0,h=0,E=!0;n+=Zu.SCROLL_FRICTION*c,a+=Zu.SCROLL_FRICTION*c,n>0&&(E=!1,d=i*n*c),a>0&&(E=!1,h=o*a*c);const m=this.newGestureEvent(Yu.Change);m.translationX=d,m.translationY=h,e.forEach(g=>g.dispatchEvent(m)),E||this.inertia(e,l,n,i,r+d,a,o,s+h)})}onTouchMove(e){const t=Date.now();for(let n=0,i=e.changedTouches.length;n3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(r.pageX),a.rollingPageY.push(r.pageY),a.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}Zu.SCROLL_FRICTION=-.005;Zu.HOLD_DELAY=700;Zu.CLEAR_TAP_COUNT_TIME=400;aXe([Ci],Zu,"isTouchDevice",null);class m6{constructor(){this._hooks=new pe,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,i,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=i,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add(ft(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=window}this._hooks.add(ce(a,Me.POINTER_MOVE,o=>{if(o.buttons!==n){this.stopMonitoring(!0);return}o.preventDefault(),this._pointerMoveCallback(o)})),this._hooks.add(ce(a,Me.POINTER_UP,o=>this.stopMonitoring(!0)))}}function gX(u){return`--vscode-${u.replace(/\./g,"-")}`}function Re(u){return`var(${gX(u)})`}function oXe(u,e){return`var(${gX(u)}, ${e})`}const J6e={ColorContribution:"base.contributions.colors"};class sXe{constructor(){this._onDidChangeSchema=new Q,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const a={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=a;const o={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),this.colorSchema.properties[e]=o,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n&&n.defaults){const i=n.defaults[t.type];return rc(i,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(t,n)=>{const i=t.indexOf(".")===-1?0:1,r=n.indexOf(".")===-1?0:1;return i!==r?i-r:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` -`)}}const lP=new sXe;jn.add(J6e.ColorContribution,lP);function q(u,e,t,n,i){return lP.registerColor(u,e,t,n,i)}const Ae=q("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},v("foreground","Overall foreground color. This color is only used if not overridden by a component."));q("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},v("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const lXe=q("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},v("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));q("descriptionForeground",{light:"#717171",dark:tt(Ae,.7),hcDark:tt(Ae,.7),hcLight:tt(Ae,.7)},v("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const BE=q("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},v("iconForeground","The default color for icons in the workbench.")),Os=q("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},v("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),eu=q("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},v("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),En=q("contrastActiveBorder",{light:null,dark:null,hcDark:Os,hcLight:Os},v("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));q("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},v("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));q("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:ae.black,hcLight:"#292929"},v("textSeparatorForeground","Color for text separators."));const cXe=q("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},v("textLinkForeground","Foreground color for links in text."));q("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},v("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));q("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},v("textPreformatForeground","Foreground color for preformatted text segments."));q("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},v("textBlockQuoteBackground","Background color for block quotes in text."));q("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:ae.white,hcLight:"#292929"},v("textBlockQuoteBorder","Border color for block quotes in text."));q("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:ae.black,hcLight:"#F2F2F2"},v("textCodeBlockBackground","Background color for code blocks in text."));const t1=q("widget.shadow",{dark:tt(ae.black,.36),light:tt(ae.black,.16),hcDark:null,hcLight:null},v("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),fX=q("widget.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("widgetBorder","Border color of widgets such as find/replace inside the editor.")),Z6e=q("input.background",{dark:"#3C3C3C",light:ae.white,hcDark:ae.black,hcLight:ae.white},v("inputBoxBackground","Input box background.")),Y6e=q("input.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("inputBoxForeground","Input box foreground.")),Q6e=q("input.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("inputBoxBorder","Input box border.")),pX=q("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:eu,hcLight:eu},v("inputBoxActiveOptionBorder","Border color of activated options in input fields."));q("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},v("inputOption.hoverBackground","Background color of activated options in input fields."));const If=q("inputOption.activeBackground",{dark:tt(Os,.4),light:tt(Os,.2),hcDark:ae.transparent,hcLight:ae.transparent},v("inputOption.activeBackground","Background hover color of options in input fields.")),DX=q("inputOption.activeForeground",{dark:ae.white,light:ae.black,hcDark:Ae,hcLight:Ae},v("inputOption.activeForeground","Foreground color of activated options in input fields."));q("input.placeholderForeground",{light:tt(Ae,.5),dark:tt(Ae,.5),hcDark:tt(Ae,.7),hcLight:tt(Ae,.7)},v("inputPlaceholderForeground","Input box foreground color for placeholder text."));const dXe=q("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:ae.black,hcLight:ae.white},v("inputValidationInfoBackground","Input validation background color for information severity.")),hXe=q("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationInfoForeground","Input validation foreground color for information severity.")),EXe=q("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:eu,hcLight:eu},v("inputValidationInfoBorder","Input validation border color for information severity.")),mXe=q("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:ae.black,hcLight:ae.white},v("inputValidationWarningBackground","Input validation background color for warning severity.")),gXe=q("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationWarningForeground","Input validation foreground color for warning severity.")),fXe=q("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:eu,hcLight:eu},v("inputValidationWarningBorder","Input validation border color for warning severity.")),pXe=q("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:ae.black,hcLight:ae.white},v("inputValidationErrorBackground","Input validation background color for error severity.")),DXe=q("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationErrorForeground","Input validation foreground color for error severity.")),xXe=q("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:eu,hcLight:eu},v("inputValidationErrorBorder","Input validation border color for error severity.")),u1=q("dropdown.background",{dark:"#3C3C3C",light:ae.white,hcDark:ae.black,hcLight:ae.white},v("dropdownBackground","Dropdown background.")),vXe=q("dropdown.listBackground",{dark:null,light:null,hcDark:ae.black,hcLight:ae.white},v("dropdownListBackground","Dropdown list background.")),Ih=q("dropdown.foreground",{dark:"#F0F0F0",light:Ae,hcDark:ae.white,hcLight:Ae},v("dropdownForeground","Dropdown foreground.")),h5=q("dropdown.border",{dark:u1,light:"#CECECE",hcDark:eu,hcLight:eu},v("dropdownBorder","Dropdown border.")),Eb=q("button.foreground",{dark:ae.white,light:ae.white,hcDark:ae.white,hcLight:ae.white},v("buttonForeground","Button foreground color.")),CXe=q("button.separator",{dark:tt(Eb,.4),light:tt(Eb,.4),hcDark:tt(Eb,.4),hcLight:tt(Eb,.4)},v("buttonSeparator","Button separator color.")),mb=q("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},v("buttonBackground","Button background color.")),bXe=q("button.hoverBackground",{dark:Vc(mb,.2),light:Bp(mb,.2),hcDark:mb,hcLight:mb},v("buttonHoverBackground","Button background color when hovering.")),kXe=q("button.border",{dark:eu,light:eu,hcDark:eu,hcLight:eu},v("buttonBorder","Button border color.")),FXe=q("button.secondaryForeground",{dark:ae.white,light:ae.white,hcDark:ae.white,hcLight:Ae},v("buttonSecondaryForeground","Secondary button foreground color.")),zW=q("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:ae.white},v("buttonSecondaryBackground","Secondary button background color.")),yXe=q("button.secondaryHoverBackground",{dark:Vc(zW,.2),light:Bp(zW,.2),hcDark:null,hcLight:null},v("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),qS=q("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:ae.black,hcLight:"#0F4A85"},v("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),AXe=q("badge.foreground",{dark:ae.white,light:"#333",hcDark:ae.white,hcLight:ae.white},v("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),_Xe=q("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},v("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),gb=q("scrollbarSlider.background",{dark:ae.fromHex("#797979").transparent(.4),light:ae.fromHex("#646464").transparent(.4),hcDark:tt(eu,.6),hcLight:tt(eu,.4)},v("scrollbarSliderBackground","Scrollbar slider background color.")),fb=q("scrollbarSlider.hoverBackground",{dark:ae.fromHex("#646464").transparent(.7),light:ae.fromHex("#646464").transparent(.7),hcDark:tt(eu,.8),hcLight:tt(eu,.8)},v("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),pb=q("scrollbarSlider.activeBackground",{dark:ae.fromHex("#BFBFBF").transparent(.4),light:ae.fromHex("#000000").transparent(.6),hcDark:eu,hcLight:eu},v("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),SXe=q("progressBar.background",{dark:ae.fromHex("#0E70C0"),light:ae.fromHex("#0E70C0"),hcDark:eu,hcLight:eu},v("progressBarBackground","Background color of the progress bar that can show for long running operations."));q("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const n1=q("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},v("editorError.foreground","Foreground color of error squigglies in the editor.")),BXe=q("editorError.border",{dark:null,light:null,hcDark:ae.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},v("errorBorder","If set, color of double underlines for errors in the editor."));q("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const js=q("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},v("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),kk=q("editorWarning.border",{dark:null,light:null,hcDark:ae.fromHex("#FFCC00").transparent(.8),hcLight:ae.fromHex("#FFCC00").transparent(.8)},v("warningBorder","If set, color of double underlines for warnings in the editor."));q("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Mo=q("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},v("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Fk=q("editorInfo.border",{dark:null,light:null,hcDark:ae.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},v("infoBorder","If set, color of double underlines for infos in the editor.")),wXe=q("editorHint.foreground",{dark:ae.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},v("editorHint.foreground","Foreground color of hint squigglies in the editor."));q("editorHint.border",{dark:null,light:null,hcDark:ae.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},v("hintBorder","If set, color of double underlines for hints in the editor."));q("sash.hoverBorder",{dark:Os,light:Os,hcDark:Os,hcLight:Os},v("sashActiveBorder","Border color of active sashes."));const rr=q("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:ae.black,hcLight:ae.white},v("editorBackground","Editor background color.")),ml=q("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:ae.white,hcLight:Ae},v("editorForeground","Editor default foreground color."));q("editorStickyScroll.background",{light:rr,dark:rr,hcDark:rr,hcLight:rr},v("editorStickyScrollBackground","Sticky scroll background color for the editor"));q("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));const ti=q("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:ae.white},v("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),i1=q("editorWidget.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),r1=q("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:eu,hcLight:eu},v("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),LXe=q("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},v("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),moe=q("quickInput.background",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),zXe=q("quickInput.foreground",{dark:i1,light:i1,hcDark:i1,hcLight:i1},v("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),MXe=q("quickInputTitle.background",{dark:new ae(new nu(255,255,255,.105)),light:new ae(new nu(0,0,0,.06)),hcDark:"#000000",hcLight:ae.white},v("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),X6e=q("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:ae.white,hcLight:"#0F4A85"},v("pickerGroupForeground","Quick picker color for grouping labels.")),TXe=q("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:ae.white,hcLight:"#0F4A85"},v("pickerGroupBorder","Quick picker color for grouping borders.")),NXe=q("keybindingLabel.background",{dark:new ae(new nu(128,128,128,.17)),light:new ae(new nu(221,221,221,.4)),hcDark:ae.transparent,hcLight:ae.transparent},v("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),PXe=q("keybindingLabel.foreground",{dark:ae.fromHex("#CCCCCC"),light:ae.fromHex("#555555"),hcDark:ae.white,hcLight:Ae},v("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),RXe=q("keybindingLabel.border",{dark:new ae(new nu(51,51,51,.6)),light:new ae(new nu(204,204,204,.4)),hcDark:new ae(new nu(111,195,223)),hcLight:eu},v("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),IXe=q("keybindingLabel.bottomBorder",{dark:new ae(new nu(68,68,68,.6)),light:new ae(new nu(187,187,187,.4)),hcDark:new ae(new nu(111,195,223)),hcLight:Ae},v("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),wE=q("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},v("editorSelectionBackground","Color of the editor selection.")),OXe=q("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:ae.white},v("editorSelectionForeground","Color of the selected text for high contrast.")),eCe=q("editor.inactiveSelectionBackground",{light:tt(wE,.5),dark:tt(wE,.5),hcDark:tt(wE,.7),hcLight:tt(wE,.5)},v("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xX=q("editor.selectionHighlightBackground",{light:Coe(wE,rr,.3,.6),dark:Coe(wE,rr,.3,.6),hcDark:null,hcLight:null},v("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));const jXe=q("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},v("editorFindMatch","Color of the current search match.")),a1=q("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},v("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),HXe=q("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},v("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),VXe=q("editor.findMatchBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("editorFindMatchBorder","Border color of the current search match.")),LE=q("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("findMatchHighlightBorder","Border color of the other search matches.")),$Xe=q("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:tt(En,.4),hcLight:tt(En,.4)},v("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);q("searchEditor.findMatchBackground",{light:tt(a1,.66),dark:tt(a1,.66),hcDark:a1,hcLight:a1},v("searchEditor.queryMatch","Color of the Search Editor query matches."));q("searchEditor.findMatchBorder",{light:tt(LE,.66),dark:tt(LE,.66),hcDark:LE,hcLight:LE},v("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));q("search.resultsInfoForeground",{light:Ae,dark:tt(Ae,.65),hcDark:Ae,hcLight:Ae},v("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));q("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},v("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const TB=q("editorHoverWidget.background",{light:ti,dark:ti,hcDark:ti,hcLight:ti},v("hoverBackground","Background color of the editor hover."));q("editorHoverWidget.foreground",{light:i1,dark:i1,hcDark:i1,hcLight:i1},v("hoverForeground","Foreground color of the editor hover."));const KXe=q("editorHoverWidget.border",{light:r1,dark:r1,hcDark:r1,hcLight:r1},v("hoverBorder","Border color of the editor hover."));q("editorHoverWidget.statusBarBackground",{dark:Vc(TB,.2),light:Bp(TB,.05),hcDark:ti,hcLight:ti},v("statusBarBackground","Background color of the editor hover status bar."));const WXe=q("editorLink.activeForeground",{dark:"#4E94CE",light:ae.blue,hcDark:ae.cyan,hcLight:"#292929"},v("activeLinkForeground","Color of active links.")),Oh=q("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:ae.white,hcLight:ae.black},v("editorInlayHintForeground","Foreground color of inline hints")),jh=q("editorInlayHint.background",{dark:tt(qS,.1),light:tt(qS,.1),hcDark:tt(ae.white,.1),hcLight:tt(qS,.1)},v("editorInlayHintBackground","Background color of inline hints")),GXe=q("editorInlayHint.typeForeground",{dark:Oh,light:Oh,hcDark:Oh,hcLight:Oh},v("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),UXe=q("editorInlayHint.typeBackground",{dark:jh,light:jh,hcDark:jh,hcLight:jh},v("editorInlayHintBackgroundTypes","Background color of inline hints for types")),qXe=q("editorInlayHint.parameterForeground",{dark:Oh,light:Oh,hcDark:Oh,hcLight:Oh},v("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),JXe=q("editorInlayHint.parameterBackground",{dark:jh,light:jh,hcDark:jh,hcLight:jh},v("editorInlayHintBackgroundParameter","Background color of inline hints for parameters"));q("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},v("editorLightBulbForeground","The color used for the lightbulb actions icon."));q("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));const MW=new ae(new nu(155,185,85,.2)),TW=new ae(new nu(255,0,0,.2)),ZXe=q("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},v("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),YXe=q("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},v("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditor.insertedLineBackground",{dark:MW,light:MW,hcDark:null,hcLight:null},v("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditor.removedLineBackground",{dark:TW,light:TW,hcDark:null,hcLight:null},v("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));q("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const QXe=q("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),XXe=q("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));q("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},v("diffEditorInsertedOutline","Outline color for the text that got inserted."));q("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},v("diffEditorRemovedOutline","Outline color for text that got removed."));q("diffEditor.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("diffEditorBorder","Border color between the two text editors."));q("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},v("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));q("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},v("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));q("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},v("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));q("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},v("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const eet=q("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tet=q("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),uet=q("list.focusOutline",{dark:Os,light:Os,hcDark:En,hcLight:En},v("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),net=q("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Hh=q("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),o1=q("list.activeSelectionForeground",{dark:ae.white,light:ae.white,hcDark:null,hcLight:null},v("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Db=q("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),iet=q("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ret=q("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),aet=q("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),oet=q("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),set=q("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tCe=q("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:ae.white.transparent(.1),hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listHoverBackground","List/Tree background when hovering over items using the mouse.")),uCe=q("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),cet=q("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},v("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),gl=q("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:Os,hcLight:Os},v("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Q7=q("list.focusHighlightForeground",{dark:gl,light:Het(Hh,gl,"#BBE7FF"),hcDark:gl,hcLight:gl},v("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));q("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},v("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));q("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},v("listErrorForeground","Foreground color of list items containing errors."));q("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},v("listWarningForeground","Foreground color of list items containing warnings."));const det=q("listFilterWidget.background",{light:Bp(ti,0),dark:Vc(ti,0),hcDark:ti,hcLight:ti},v("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),het=q("listFilterWidget.outline",{dark:ae.transparent,light:ae.transparent,hcDark:"#f38518",hcLight:"#007ACC"},v("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Eet=q("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:eu,hcLight:eu},v("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),met=q("listFilterWidget.shadow",{dark:t1,light:t1,hcDark:t1,hcLight:t1},v("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));q("list.filterMatchBackground",{dark:a1,light:a1,hcDark:null,hcLight:null},v("listFilterMatchHighlight","Background color of the filtered match."));q("list.filterMatchBorder",{dark:LE,light:LE,hcDark:eu,hcLight:En},v("listFilterMatchHighlightBorder","Border color of the filtered match."));const xb=q("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},v("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),get=q("tree.inactiveIndentGuidesStroke",{dark:tt(xb,.4),light:tt(xb,.4),hcDark:tt(xb,.4),hcLight:tt(xb,.4)},v("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),fet=q("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},v("tableColumnsBorder","Table border color between columns.")),pet=q("tree.tableOddRowsBackground",{dark:tt(Ae,.04),light:tt(Ae,.04),hcDark:null,hcLight:null},v("tableOddRowsBackgroundColor","Background color for odd table rows."));q("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},v("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));const Det=q("checkbox.background",{dark:u1,light:u1,hcDark:u1,hcLight:u1},v("checkbox.background","Background color of checkbox widget."));q("checkbox.selectBackground",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const xet=q("checkbox.foreground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},v("checkbox.foreground","Foreground color of checkbox widget.")),vet=q("checkbox.border",{dark:h5,light:h5,hcDark:h5,hcLight:h5},v("checkbox.border","Border color of checkbox widget."));q("checkbox.selectBorder",{dark:BE,light:BE,hcDark:BE,hcLight:BE},v("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const goe=q("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,v("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Of=q("quickInputList.focusForeground",{dark:o1,light:o1,hcDark:o1,hcLight:o1},v("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),E5=q("quickInputList.focusIconForeground",{dark:Db,light:Db,hcDark:Db,hcLight:Db},v("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),jf=q("quickInputList.focusBackground",{dark:yk(goe,Hh),light:yk(goe,Hh),hcDark:null,hcLight:null},v("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Cet=q("menu.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("menuBorder","Border color of menus.")),bet=q("menu.foreground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},v("menuForeground","Foreground color of menu items.")),ket=q("menu.background",{dark:u1,light:u1,hcDark:u1,hcLight:u1},v("menuBackground","Background color of menu items.")),Fet=q("menu.selectionForeground",{dark:o1,light:o1,hcDark:o1,hcLight:o1},v("menuSelectionForeground","Foreground color of the selected menu item in menus.")),yet=q("menu.selectionBackground",{dark:Hh,light:Hh,hcDark:Hh,hcLight:Hh},v("menuSelectionBackground","Background color of the selected menu item in menus.")),Aet=q("menu.selectionBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("menuSelectionBorder","Border color of the selected menu item in menus.")),_et=q("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:eu,hcLight:eu},v("menuSeparatorBackground","Color of a separator menu item in menus.")),NW=q("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},v("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));q("toolbar.hoverOutline",{dark:null,light:null,hcDark:En,hcLight:En},v("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));q("toolbar.activeBackground",{dark:Vc(NW,.1),light:Bp(NW,.1),hcDark:null,hcLight:null},v("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));q("editor.snippetTabstopHighlightBackground",{dark:new ae(new nu(124,124,124,.3)),light:new ae(new nu(10,50,100,.2)),hcDark:new ae(new nu(124,124,124,.3)),hcLight:new ae(new nu(10,50,100,.2))},v("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));q("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},v("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));q("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));q("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new ae(new nu(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},v("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const Bet=q("breadcrumb.foreground",{light:tt(Ae,.8),dark:tt(Ae,.8),hcDark:tt(Ae,.8),hcLight:tt(Ae,.8)},v("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),wet=q("breadcrumb.background",{light:rr,dark:rr,hcDark:rr,hcLight:rr},v("breadcrumbsBackground","Background color of breadcrumb items.")),foe=q("breadcrumb.focusForeground",{light:Bp(Ae,.2),dark:Vc(Ae,.1),hcDark:Vc(Ae,.1),hcLight:Vc(Ae,.1)},v("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Let=q("breadcrumb.activeSelectionForeground",{light:Bp(Ae,.2),dark:Vc(Ae,.1),hcDark:Vc(Ae,.1),hcLight:Vc(Ae,.1)},v("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));q("breadcrumbPicker.background",{light:ti,dark:ti,hcDark:ti,hcLight:ti},v("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const nCe=.5,poe=ae.fromHex("#40C8AE").transparent(nCe),Doe=ae.fromHex("#40A6FF").transparent(nCe),xoe=ae.fromHex("#606060").transparent(.4),fl=.4,uv=1,m5=q("merge.currentHeaderBackground",{dark:poe,light:poe,hcDark:null,hcLight:null},v("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.currentContentBackground",{dark:tt(m5,fl),light:tt(m5,fl),hcDark:tt(m5,fl),hcLight:tt(m5,fl)},v("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const g5=q("merge.incomingHeaderBackground",{dark:Doe,light:Doe,hcDark:null,hcLight:null},v("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.incomingContentBackground",{dark:tt(g5,fl),light:tt(g5,fl),hcDark:tt(g5,fl),hcLight:tt(g5,fl)},v("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const f5=q("merge.commonHeaderBackground",{dark:xoe,light:xoe,hcDark:null,hcLight:null},v("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.commonContentBackground",{dark:tt(f5,fl),light:tt(f5,fl),hcDark:tt(f5,fl),hcLight:tt(f5,fl)},v("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const nv=q("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},v("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));q("editorOverviewRuler.currentContentForeground",{dark:tt(m5,uv),light:tt(m5,uv),hcDark:nv,hcLight:nv},v("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));q("editorOverviewRuler.incomingContentForeground",{dark:tt(g5,uv),light:tt(g5,uv),hcDark:nv,hcLight:nv},v("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));q("editorOverviewRuler.commonContentForeground",{dark:tt(f5,uv),light:tt(f5,uv),hcDark:nv,hcLight:nv},v("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const vX=q("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},v("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),vb=q("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),p5=q("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},v("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),cP=q("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},v("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),voe=q("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},v("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),zet=q("minimap.infoHighlight",{dark:Mo,light:Mo,hcDark:Fk,hcLight:Fk},v("minimapInfo","Minimap marker color for infos.")),Met=q("minimap.warningHighlight",{dark:js,light:js,hcDark:kk,hcLight:kk},v("overviewRuleWarning","Minimap marker color for warnings.")),Tet=q("minimap.errorHighlight",{dark:new ae(new nu(255,18,18,.7)),light:new ae(new nu(255,18,18,.7)),hcDark:new ae(new nu(255,50,50,1)),hcLight:"#B5200D"},v("minimapError","Minimap marker color for errors.")),Net=q("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},v("minimapBackground","Minimap background color.")),Pet=q("minimap.foregroundOpacity",{dark:ae.fromHex("#000f"),light:ae.fromHex("#000f"),hcDark:ae.fromHex("#000f"),hcLight:ae.fromHex("#000f")},v("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));q("minimapSlider.background",{light:tt(gb,.5),dark:tt(gb,.5),hcDark:tt(gb,.5),hcLight:tt(gb,.5)},v("minimapSliderBackground","Minimap slider background color."));q("minimapSlider.hoverBackground",{light:tt(fb,.5),dark:tt(fb,.5),hcDark:tt(fb,.5),hcLight:tt(fb,.5)},v("minimapSliderHoverBackground","Minimap slider background color when hovering."));q("minimapSlider.activeBackground",{light:tt(pb,.5),dark:tt(pb,.5),hcDark:tt(pb,.5),hcLight:tt(pb,.5)},v("minimapSliderActiveBackground","Minimap slider background color when clicked on."));const Ret=q("problemsErrorIcon.foreground",{dark:n1,light:n1,hcDark:n1,hcLight:n1},v("problemsErrorIconForeground","The color used for the problems error icon.")),Iet=q("problemsWarningIcon.foreground",{dark:js,light:js,hcDark:js,hcLight:js},v("problemsWarningIconForeground","The color used for the problems warning icon.")),Oet=q("problemsInfoIcon.foreground",{dark:Mo,light:Mo,hcDark:Mo,hcLight:Mo},v("problemsInfoIconForeground","The color used for the problems info icon."));q("charts.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("chartsForeground","The foreground color used in charts."));q("charts.lines",{dark:tt(Ae,.5),light:tt(Ae,.5),hcDark:tt(Ae,.5),hcLight:tt(Ae,.5)},v("chartsLines","The color used for horizontal lines in charts."));q("charts.red",{dark:n1,light:n1,hcDark:n1,hcLight:n1},v("chartsRed","The red color used in chart visualizations."));q("charts.blue",{dark:Mo,light:Mo,hcDark:Mo,hcLight:Mo},v("chartsBlue","The blue color used in chart visualizations."));q("charts.yellow",{dark:js,light:js,hcDark:js,hcLight:js},v("chartsYellow","The yellow color used in chart visualizations."));q("charts.orange",{dark:p5,light:p5,hcDark:p5,hcLight:p5},v("chartsOrange","The orange color used in chart visualizations."));q("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},v("chartsGreen","The green color used in chart visualizations."));q("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("chartsPurple","The purple color used in chart visualizations."));function jet(u,e){var t,n,i,r;switch(u.op){case 0:return(t=rc(u.value,e))===null||t===void 0?void 0:t.darken(u.factor);case 1:return(n=rc(u.value,e))===null||n===void 0?void 0:n.lighten(u.factor);case 2:return(i=rc(u.value,e))===null||i===void 0?void 0:i.transparent(u.factor);case 3:{const a=rc(u.background,e);return a?(r=rc(u.value,e))===null||r===void 0?void 0:r.makeOpaque(a):rc(u.value,e)}case 4:for(const a of u.values){const o=rc(a,e);if(o)return o}return;case 6:return rc(e.defines(u.if)?u.then:u.else,e);case 5:{const a=rc(u.value,e);if(!a)return;const o=rc(u.background,e);return o?a.isDarkerThan(o)?ae.getLighterColor(a,o,u.factor).transparent(u.transparency):ae.getDarkerColor(a,o,u.factor).transparent(u.transparency):a.transparent(u.factor*u.transparency)}default:throw UN()}}function Bp(u,e){return{op:0,value:u,factor:e}}function Vc(u,e){return{op:1,value:u,factor:e}}function tt(u,e){return{op:2,value:u,factor:e}}function yk(...u){return{op:4,values:u}}function Het(u,e,t){return{op:6,if:u,then:e,else:t}}function Coe(u,e,t,n){return{op:5,value:u,background:e,factor:t,transparency:n}}function rc(u,e){if(u!==null){if(typeof u=="string")return u[0]==="#"?ae.fromHex(u):e.getColor(u);if(u instanceof ae)return u;if(typeof u=="object")return jet(u,e)}}const iCe="vscode://schemas/workbench-colors",rCe=jn.as(iP.JSONContribution);rCe.registerSchema(iCe,lP.getColorSchema());const boe=new Hu(()=>rCe.notifySchemaChanged(iCe),200);lP.onDidChangeSchema(()=>{boe.isScheduled()||boe.schedule()});class dP{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new aCe(this.x-window.scrollX,this.y-window.scrollY)}}class aCe{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new dP(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class Vet{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i,this._editorPagePositionBrand=void 0}}class $et{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function CX(u){const e=ji(u);return new Vet(e.left,e.top,e.width,e.height)}function bX(u,e,t){const n=e.width/u.offsetWidth,i=e.height/u.offsetHeight,r=(t.x-e.x)/n,a=(t.y-e.y)/i;return new $et(r,a)}class Hm extends D0{constructor(e,t,n){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new dP(this.posx,this.posy),this.editorPos=CX(n),this.relativePos=bX(n,this.editorPos,this.pos)}}class Ket{constructor(e){this._editorViewDomNode=e}_create(e){return new Hm(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return ce(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return ce(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return ce(e,Me.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Me.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return ce(e,Me.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return ce(e,"mousemove",n=>t(this._create(n)))}}class Wet{constructor(e){this._editorViewDomNode=e}_create(e){return new Hm(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return ce(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Me.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return ce(e,Me.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return ce(e,"pointermove",n=>t(this._create(n)))}}class Get extends ne{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new m6),this._keydownListener=null}startMonitoring(e,t,n,i,r){this._keydownListener=xi(e.ownerDocument,"keydown",a=>{a.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,a=>{i(new Hm(a,!0,this._editorViewDomNode))},a=>{this._keydownListener.dispose(),r(a)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class cA{constructor(e){this._editor=e,this._instanceId=++cA._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Hu(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let n=this._rules.get(t);if(!n){const i=this._counter++;n=new Uet(t,`dyn-rule-${this._instanceId}-${i}`,bB(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}cA._idPool=0;class Uet{constructor(e,t,n,i){this.key=e,this.className=t,this.properties=i,this._referenceCount=0,this._styleElement=N0(n),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(const i in t){const r=t[i];let a;typeof r=="object"?a=Re(r.id):a=r;const o=qet(i);n+=` +`).length>=10),a=nQe(u,a),a}function eQe(u,e,t,n){const i=[],r=u.filter(s=>s.modified.isEmpty&&s.original.length>=3).map(s=>new Xx(s.original,e,s)),a=new Set(u.filter(s=>s.original.isEmpty&&s.modified.length>=3).map(s=>new Xx(s.modified,t,s))),o=new Set;for(const s of r){let l=-1,c;for(const d of a){const h=s.computeSimilarity(d);h>l&&(l=h,c=d)}if(l>.9&&c&&(a.delete(c),i.push(new A1(s.range,c.range)),o.add(s.source),o.add(c.source)),!n.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function tQe(u,e,t,n,i,r){const a=[],o=new aX;for(const h of u)for(let E=h.original.startLineNumber;Eh.modified.startLineNumber,Uh));for(const h of u){let E=[];for(let m=h.modified.startLineNumber;m{for(const b of E)if(b.originalLineRange.endLineNumberExclusive+1===D.endLineNumberExclusive&&b.modifiedLineRange.endLineNumberExclusive+1===f.endLineNumberExclusive){b.originalLineRange=new Xt(b.originalLineRange.startLineNumber,D.endLineNumberExclusive),b.modifiedLineRange=new Xt(b.modifiedLineRange.startLineNumber,f.endLineNumberExclusive),p.push(b);return}const x={modifiedLineRange:f,originalLineRange:D};s.push(x),p.push(x)}),E=p}if(!r.isValid())return[]}s.sort(nve(A0(h=>h.modifiedLineRange.length,Uh)));const l=new Kd,c=new Kd;for(const h of s){const E=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,m=l.subtractFrom(h.modifiedLineRange),g=c.subtractFrom(h.originalLineRange).getWithDelta(E),f=m.getIntersection(g);for(const p of f.ranges){if(p.length<3)continue;const D=p,x=p.delta(-E);a.push(new A1(x,D)),l.addRange(D),c.addRange(x)}}a.sort(A0(h=>h.original.startLineNumber,Uh));const d=new aA(u);for(let h=0;hA.original.startLineNumber<=E.original.startLineNumber),g=gk(u,A=>A.modified.startLineNumber<=E.modified.startLineNumber),f=Math.max(E.original.startLineNumber-m.original.startLineNumber,E.modified.startLineNumber-g.modified.startLineNumber),p=d.findLastMonotonous(A=>A.original.startLineNumberA.modified.startLineNumbern.length||F>i.length||l.contains(F)||c.contains(A)||!Zae(n[A-1],i[F-1],r))break}b>0&&(c.addRange(new Xt(E.original.startLineNumber-b,E.original.startLineNumber)),l.addRange(new Xt(E.modified.startLineNumber-b,E.modified.startLineNumber)));let k;for(k=0;kn.length||F>i.length||l.contains(F)||c.contains(A)||!Zae(n[A-1],i[F-1],r))break}k>0&&(c.addRange(new Xt(E.original.endLineNumberExclusive,E.original.endLineNumberExclusive+k)),l.addRange(new Xt(E.modified.endLineNumberExclusive,E.modified.endLineNumberExclusive+k))),(b>0||k>0)&&(a[h]=new A1(new Xt(E.original.startLineNumber-b,E.original.endLineNumberExclusive+k),new Xt(E.modified.startLineNumber-b,E.modified.endLineNumberExclusive+k)))}return a}function Zae(u,e,t){if(u.trim()===e.trim())return!0;if(u.length>300&&e.length>300)return!1;const i=new I6e().compute(new wB([u],new Gt(0,1),!1),new wB([e],new Gt(0,1),!1),t);let r=0;const a=Ar.invert(i.diffs,u.length);for(const c of a)c.seq1Range.forEach(d=>{kW(u.charCodeAt(d))||r++});function o(c){let d=0;for(let h=0;he.length?u:e);return r/s>.6&&s>10}function uQe(u){if(u.length===0)return u;u.sort(A0(t=>t.original.startLineNumber,Uh));const e=[u[0]];for(let t=1;t=0&&a>=0&&r+a<=2){e[e.length-1]=n.join(i);continue}e.push(i)}return e}function nQe(u,e){const t=new aA(u);return e=e.filter(n=>{const i=t.findLastMonotonous(o=>o.original.endLineNumberExclusiveo.modified.endLineNumberExclusive0&&(o=o.delta(l))}i.push(o)}return n.length>0&&i.push(n[n.length-1]),i}function rQe(u,e,t){if(!u.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],a=n+1=n.start&&u.seq2Range.start-a>=i.start&&t.isStronglyEqual(u.seq2Range.start-a,u.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;u.seq1Range.start+ol&&(l=m,s=c)}return u.delta(s)}function aQe(u,e,t){const n=[];for(const i of t){const r=n[n.length-1];if(!r){n.push(i);continue}i.seq1Range.start-r.seq1Range.endExclusive<=2||i.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new Ar(r.seq1Range.join(i.seq1Range),r.seq2Range.join(i.seq2Range)):n.push(i)}return n}function oQe(u,e,t){const n=[];let i;function r(){if(!i)return;const o=i.s1Range.length-i.deleted;i.s2Range.length-i.added,Math.max(i.deleted,i.added)+(i.count-1)>o&&n.push(new Ar(i.s1Range,i.s2Range)),i=void 0}for(const o of t){let s=function(E,m){var g,f,p,D;if(!i||!i.s1Range.containsRange(E)||!i.s2Range.containsRange(m))if(i&&!(i.s1Range.endExclusive0||e.length>0;){const n=u[0],i=e[0];let r;n&&(!i||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function lQe(u,e,t){let n=t;if(n.length===0)return n;let i=0,r;do{r=!1;const a=[n[0]];for(let o=1;o5||E.seq1Range.length+E.seq2Range.length>5)};const s=n[o],l=a[a.length-1];c(l,s)?(r=!0,a[a.length-1]=a[a.length-1].join(s)):a.push(s)}n=a}while(i++<10&&r);return n}function cQe(u,e,t){let n=t;if(n.length===0)return n;let i=0,r;do{r=!1;const o=[n[0]];for(let s=1;s5||g.length>500)return!1;const p=u.getText(g).trim();if(p.length>20||p.split(/\r\n|\r|\n/).length>1)return!1;const D=u.countLinesIn(E.seq1Range),x=E.seq1Range.length,b=e.countLinesIn(E.seq2Range),k=E.seq2Range.length,A=u.countLinesIn(m.seq1Range),F=m.seq1Range.length,S=e.countLinesIn(m.seq2Range),w=m.seq2Range.length,z=2*40+50;function N(O){return Math.min(O,z)}return Math.pow(Math.pow(N(D*40+x),1.5)+Math.pow(N(b*40+k),1.5),1.5)+Math.pow(Math.pow(N(A*40+F),1.5)+Math.pow(N(S*40+w),1.5),1.5)>Math.pow(Math.pow(z,1.5),1.5)*1.3};const l=n[s],c=o[o.length-1];d(c,l)?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}n=o}while(i++<10&&r);const a=[];return vGe(n,(o,s,l)=>{let c=s;function d(p){return p.length>0&&p.trim().length<=3&&s.seq1Range.length+s.seq2Range.length>100}const h=u.extendToFullLines(s.seq1Range),E=u.getText(new Gt(h.start,s.seq1Range.start));d(E)&&(c=c.deltaStart(-E.length));const m=u.getText(new Gt(s.seq1Range.endExclusive,h.endExclusive));d(m)&&(c=c.deltaEnd(m.length));const g=Ar.fromOffsetPairs(o?o.getEndExclusives():Xd.zero,l?l.getStarts():Xd.max),f=c.intersect(g);a.push(f)}),a}class Qae{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:Xae(this.lines[e-1]),n=e===this.lines.length?0:Xae(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function Xae(u){let e=0;for(;ek===A))return new WS([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new WS([new I0(new Xt(1,e.length+1),new Xt(1,t.length+1),[new Om(new j(1,1,e.length,e[0].length+1),new j(1,1,t.length,t[0].length+1))])],[],!1);const i=n.maxComputationTimeMs===0?Dk.instance:new KYe(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,a=new Map;function o(k){let A=a.get(k);return A===void 0&&(A=a.size,a.set(k,A)),A}const s=e.map(k=>o(k.trim())),l=t.map(k=>o(k.trim())),c=new Qae(s,e),d=new Qae(l,t),h=(()=>c.length+d.length<1700?this.dynamicProgrammingDiffing.compute(c,d,i,(k,A)=>e[k]===t[A]?t[A].length===0?.1:1+Math.log(1+t[A].length):.99):this.myersDiffingAlgorithm.compute(c,d))();let E=h.diffs,m=h.hitTimeout;E=FW(c,d,E),E=lQe(c,d,E);const g=[],f=k=>{if(r)for(let A=0;Ak.seq1Range.start-p===k.seq2Range.start-D);const A=k.seq1Range.start-p;f(A),p=k.seq1Range.endExclusive,D=k.seq2Range.endExclusive;const F=this.refineDiff(e,t,k,i,r);F.hitTimeout&&(m=!0);for(const S of F.mappings)g.push(S)}f(e.length-p);const x=eoe(g,e,t);let b=[];return n.computeMoves&&(b=this.computeMoves(x,e,t,s,l,i,r)),ck(()=>{function k(F,S){if(F.lineNumber<1||F.lineNumber>S.length)return!1;const w=S[F.lineNumber-1];return!(F.column<1||F.column>w.length+1)}function A(F,S){return!(F.startLineNumber<1||F.startLineNumber>S.length+1||F.endLineNumberExclusive<1||F.endLineNumberExclusive>S.length+1)}for(const F of x){if(!F.innerChanges)return!1;for(const S of F.innerChanges)if(!(k(S.modifiedRange.getStartPosition(),t)&&k(S.modifiedRange.getEndPosition(),t)&&k(S.originalRange.getStartPosition(),e)&&k(S.originalRange.getEndPosition(),e)))return!1;if(!A(F.modified,t)||!A(F.original,e))return!1}return!0}),new WS(x,b,m)}computeMoves(e,t,n,i,r,a,o){return XYe(e,t,n,i,r,a).map(c=>{const d=this.refineDiff(t,n,new Ar(c.original.toOffsetRange(),c.modified.toOffsetRange()),a,o),h=eoe(d.mappings,t,n,!0);return new N6e(c,h)})}refineDiff(e,t,n,i,r){const a=new wB(e,n.seq1Range,r),o=new wB(t,n.seq2Range,r),s=a.length+o.length<500?this.dynamicProgrammingDiffing.compute(a,o,i):this.myersDiffingAlgorithm.compute(a,o,i);let l=s.diffs;return l=FW(a,o,l),l=oQe(a,o,l),l=aQe(a,o,l),l=cQe(a,o,l),{mappings:l.map(d=>new Om(a.translateRange(d.seq1Range),o.translateRange(d.seq2Range))),hitTimeout:s.hitTimeout}}}function eoe(u,e,t,n=!1){const i=[];for(const r of Qxe(u.map(a=>dQe(a,e,t)),(a,o)=>a.original.overlapOrTouch(o.original)||a.modified.overlapOrTouch(o.modified))){const a=r[0],o=r[r.length-1];i.push(new I0(a.original.join(o.original),a.modified.join(o.modified),r.map(s=>s.innerChanges[0])))}return ck(()=>!n&&i.length>0&&i[0].original.startLineNumber!==i[0].modified.startLineNumber?!1:Uve(i,(r,a)=>a.original.startLineNumber-r.original.endLineNumberExclusive===a.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t[u.modifiedRange.startLineNumber-1].length&&u.originalRange.startColumn-1>=e[u.originalRange.startLineNumber-1].length&&u.originalRange.startLineNumber<=u.originalRange.endLineNumber+i&&u.modifiedRange.startLineNumber<=u.modifiedRange.endLineNumber+i&&(n=1);const r=new Xt(u.originalRange.startLineNumber+n,u.originalRange.endLineNumber+1+i),a=new Xt(u.modifiedRange.startLineNumber+n,u.modifiedRange.endLineNumber+1+i);return new I0(r,a,[u])}const toe={getLegacy:()=>new jYe,getDefault:()=>new O6e};function XE(u,e){const t=Math.pow(10,e);return Math.round(u*t)/t}class nu{constructor(e,t,n,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class sl{constructor(e,t,n,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=XE(Math.max(Math.min(1,t),0),3),this.l=XE(Math.max(Math.min(1,n),0),3),this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=e.a,a=Math.max(t,n,i),o=Math.min(t,n,i);let s=0,l=0;const c=(o+a)/2,d=a-o;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),a){case t:s=(n-i)/d+(n1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}static toRGBA(e){const t=e.h/360,{s:n,l:i,a:r}=e;let a,o,s;if(n===0)a=o=s=i;else{const l=i<.5?i*(1+n):i+n-i*n,c=2*i-l;a=sl._hue2rgb(c,l,t+1/3),o=sl._hue2rgb(c,l,t),s=sl._hue2rgb(c,l,t-1/3)}return new nu(Math.round(a*255),Math.round(o*255),Math.round(s*255),r)}}class e1{constructor(e,t,n,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=XE(Math.max(Math.min(1,t),0),3),this.v=XE(Math.max(Math.min(1,n),0),3),this.a=XE(Math.max(Math.min(1,i),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,n=e.g/255,i=e.b/255,r=Math.max(t,n,i),a=Math.min(t,n,i),o=r-a,s=r===0?0:o/r;let l;return o===0?l=0:r===t?l=((n-i)/o%6+6)%6:r===n?l=(i-t)/o+2:l=(t-n)/o+4,new e1(Math.round(l*60),s,r,e.a)}static toRGBA(e){const{h:t,s:n,v:i,a:r}=e,a=i*n,o=a*(1-Math.abs(t/60%2-1)),s=i-a;let[l,c,d]=[0,0,0];return t<60?(l=a,c=o):t<120?(l=o,c=a):t<180?(c=a,d=o):t<240?(c=o,d=a):t<300?(l=o,d=a):t<=360&&(l=a,d=o),l=Math.round((l+s)*255),c=Math.round((c+s)*255),d=Math.round((d+s)*255),new nu(l,c,d,r)}}let ae=class il{static fromHex(e){return il.Format.CSS.parseHex(e)||il.red}static equals(e,t){return!e&&!t?!0:!e||!t?!1:e.equals(t)}get hsla(){return this._hsla?this._hsla:sl.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:e1.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof nu)this.rgba=e;else if(e instanceof sl)this._hsla=e,this.rgba=sl.toRGBA(e);else if(e instanceof e1)this._hsva=e,this.rgba=e1.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&nu.equals(this.rgba,e.rgba)&&sl.equals(this.hsla,e.hsla)&&e1.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=il._relativeLuminanceForComponent(this.rgba.r),t=il._relativeLuminanceForComponent(this.rgba.g),n=il._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*t+.0722*n;return XE(i,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t>n}isDarkerThan(e){const t=this.getRelativeLuminance(),n=e.getRelativeLuminance();return t0)for(const i of n){const r=i.filter(l=>l!==void 0),a=r[1],o=r[2];if(!o)continue;let s;if(a==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;s=uoe(sC(u,i),lC(o,l),!1)}else if(a==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;s=uoe(sC(u,i),lC(o,l),!0)}else if(a==="hsl"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;s=noe(sC(u,i),lC(o,l),!1)}else if(a==="hsla"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;s=noe(sC(u,i),lC(o,l),!0)}else a==="#"&&(s=hQe(sC(u,i),a+o));s&&e.push(s)}return e}function mQe(u){return!u||typeof u.getValue!="function"||typeof u.positionAt!="function"?[]:EQe(u)}var j4=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class gQe extends fYe{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{const r=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>r&&(n=r,i=!0)}return i?{lineNumber:t,column:n}:e}}class em{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new gQe(dt.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,n){return j4(this,void 0,void 0,function*(){const i=this._getModel(e);return i?iX.computeUnicodeHighlights(i,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=this._getModel(e),a=this._getModel(t);return!r||!a?null:em.computeDiff(r,a,n,i)})}static computeDiff(e,t,n,i){const r=i==="advanced"?toe.getDefault():toe.getLegacy(),a=e.getLinesContent(),o=t.getLinesContent(),s=r.computeDiff(a,o,n),l=s.changes.length>0?!1:this._modelsAreIdentical(e,t);function c(d){return d.map(h=>{var E;return[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,(E=h.innerChanges)===null||E===void 0?void 0:E.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])]})}return{identical:l,quitEarly:s.hitTimeout,changes:c(s.changes),moves:s.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,c(d.changes)])}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),i=t.getLineCount();if(n!==i)return!1;for(let r=1;r<=n;r++){const a=e.getLineContent(r),o=t.getLineContent(r);if(a!==o)return!1}return!0}computeMoreMinimalEdits(e,t,n){return j4(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return t;const r=[];let a;t=t.slice(0).sort((s,l)=>{if(s.range&&l.range)return j.compareRangesUsingStarts(s.range,l.range);const c=s.range?0:1,d=l.range?0:1;return c-d});let o=0;for(let s=1;sem._diffLimit){r.push({range:s,text:l});continue}const h=EYe(d,l,n),E=i.offsetAt(j.lift(s).getStartPosition());for(const m of h){const g=i.positionAt(E+m.originalStart),f=i.positionAt(E+m.originalStart+m.originalLength),p={text:l.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:f.lineNumber,endColumn:f.column}};i.getValueInRange(p.range)!==p.text&&r.push(p)}}return typeof a=="number"&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(e){return j4(this,void 0,void 0,function*(){const t=this._getModel(e);return t?CYe(t):null})}computeDefaultDocumentColors(e){return j4(this,void 0,void 0,function*(){const t=this._getModel(e);return t?mQe(t):null})}textualSuggest(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=new va,a=new RegExp(n,i),o=new Set;e:for(const s of e){const l=this._getModel(s);if(l){for(const c of l.words(a))if(!(c===t||!isNaN(Number(c)))&&(o.add(c),o.size>em._suggestionsLimit))break e}}return{words:Array.from(o),duration:r.elapsed()}})}computeWordRanges(e,t,n,i){return j4(this,void 0,void 0,function*(){const r=this._getModel(e);if(!r)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let s=t.startLineNumber;sthis._host.fhr(o,s)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,t),Promise.resolve(BQ(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}}em._diffLimit=1e5;em._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=zve());const sX=Ut("textResourceConfigurationService"),H6e=Ut("textResourcePropertiesService"),We=Ut("ILanguageFeaturesService");var fQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},LB=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const ioe=60*1e3,roe=5*60*1e3;function bf(u,e){const t=u.getModel(e);return!(!t||t.isTooLargeForSyncing())}let yW=class extends ne{constructor(e,t,n,i,r){super(),this._modelService=e,this._workerManager=this._register(new DQe(this._modelService,i)),this._logService=n,this._register(r.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(a,o)=>bf(this._modelService,a.uri)?this._workerManager.withWorker().then(s=>s.computeLinks(a.uri)).then(s=>s&&{links:s}):Promise.resolve({links:[]})})),this._register(r.completionProvider.register("*",new pQe(this._workerManager,t,this._modelService,i)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return bf(this._modelService,e)}computedUnicodeHighlights(e,t,n){return this._workerManager.withWorker().then(i=>i.computedUnicodeHighlights(e,t,n))}computeDiff(e,t,n,i){return LB(this,void 0,void 0,function*(){const r=yield this._workerManager.withWorker().then(s=>s.computeDiff(e,t,n,i));if(!r)return null;return{identical:r.identical,quitEarly:r.quitEarly,changes:o(r.changes),moves:r.moves.map(s=>new N6e(new A1(new Xt(s[0],s[1]),new Xt(s[2],s[3])),o(s[4])))};function o(s){return s.map(l=>{var c;return new I0(new Xt(l[0],l[1]),new Xt(l[2],l[3]),(c=l[4])===null||c===void 0?void 0:c.map(d=>new Om(new j(d[0],d[1],d[2],d[3]),new j(d[4],d[5],d[6],d[7]))))})}})}computeMoreMinimalEdits(e,t,n=!1){if(pa(t)){if(!bf(this._modelService,e))return Promise.resolve(t);const i=va.create(),r=this._workerManager.withWorker().then(a=>a.computeMoreMinimalEdits(e,t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([r,Pm(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return bf(this._modelService,e)}navigateValueSet(e,t,n){return this._workerManager.withWorker().then(i=>i.navigateValueSet(e,t,n))}canComputeWordRanges(e){return bf(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(n=>n.computeWordRanges(e,t))}};yW=fQe([cC(0,_n),cC(1,sX),cC(2,r0),cC(3,tn),cC(4,We)],yW);class pQe{constructor(e,t,n,i){this.languageConfigurationService=i,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}provideCompletionItems(e,t){return LB(this,void 0,void 0,function*(){const n=this._configurationService.getValue(e.uri,t,"editor");if(!n.wordBasedSuggestions)return;const i=[];if(n.wordBasedSuggestionsMode==="currentDocument")bf(this._modelService,e.uri)&&i.push(e.uri);else for(const d of this._modelService.getModels())bf(this._modelService,d.uri)&&(d===e?i.unshift(d.uri):(n.wordBasedSuggestionsMode==="allDocuments"||d.getLanguageId()===e.getLanguageId())&&i.push(d.uri));if(i.length===0)return;const r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),a=e.getWordAtPosition(t),o=a?new j(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):j.fromPositions(t),s=o.setEndPosition(t.lineNumber,t.column),c=yield(yield this._workerManager.withWorker()).textualSuggest(i,a==null?void 0:a.word,r);if(c)return{duration:c.duration,suggestions:c.words.map(d=>({kind:18,label:d,insertText:d,range:{insert:s,replace:o}}))}})}}class DQe extends ne{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new rA).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(roe/2)),this._register(this._modelService.onModelRemoved(i=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>roe&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new lX(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class xQe extends ne{constructor(e,t,n){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!n){const i=new rA;i.cancelAndSet(()=>this._checkStopModelSync(),Math.round(ioe/2)),this._register(i)}}dispose(){for(const e in this._syncedModels)Su(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const n of e){const i=n.toString();this._syncedModels[i]||this._beginModelSync(n,t),this._syncedModels[i]&&(this._syncedModelsLastUsedTime[i]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>ioe&&t.push(n);for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;const i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const r=new pe;r.add(n.onDidChangeContent(a=>{this._proxy.acceptModelChanged(i.toString(),a)})),r.add(n.onWillDispose(()=>{this._stopModelSync(i)})),r.add(ft(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=r}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Su(t)}}class aoe{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Fj{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class lX extends ne{constructor(e,t,n,i){super(),this.languageConfigurationService=i,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new XN(n),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new bZe(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Fj(this)))}catch(e){fW(e),this._worker=new aoe(new em(new Fj(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(fW(e),this._worker=new aoe(new em(new Fj(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new xQe(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return LB(this,void 0,void 0,function*(){return this._disposed?Promise.reject(MUe()):this._getProxy().then(n=>(this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n))})}computedUnicodeHighlights(e,t,n){return this._withSyncedResources([e]).then(i=>i.computeUnicodeHighlights(e.toString(),t,n))}computeDiff(e,t,n,i){return this._withSyncedResources([e,t],!0).then(r=>r.computeDiff(e.toString(),t.toString(),n,i))}computeMoreMinimalEdits(e,t,n){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t,n))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then(t=>t.computeDefaultDocumentColors(e.toString()))}textualSuggest(e,t,n){return LB(this,void 0,void 0,function*(){const i=yield this._withSyncedResources(e),r=n.source,a=n.flags;return i.textualSuggest(e.map(o=>o.toString()),t,r,a)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(n=>{const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const r=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),a=r.source,o=r.flags;return n.computeWordRanges(e.toString(),t,a,o)})}navigateValueSet(e,t,n){return this._withSyncedResources([e]).then(i=>{const r=this._modelService.getModel(e);if(!r)return null;const a=this.languageConfigurationService.getLanguageConfiguration(r.getLanguageId()).getWordDefinition(),o=a.source,s=a.flags;return i.navigateValueSet(e.toString(),t,n,o,s)})}dispose(){super.dispose(),this._disposed=!0}}function vQe(u,e,t){return new CQe(u,e,t)}class CQe extends lX{constructor(e,t,n){super(e,n.keepIdleModels||!1,n.label,t),this._foreignModuleId=n.moduleId,this._foreignModuleCreateData=n.createData||null,this._foreignModuleHost=n.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?BQ(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(n=>{this._foreignModuleCreateData=null;const i=(o,s)=>e.fmr(o,s),r=(o,s)=>function(){const l=Array.prototype.slice.call(arguments,0);return s(o,l)},a={};for(const o of n)a[o]=r(o,i);return a})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}const oA={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},ev=new class{clone(){return this}equals(u){return this===u}};function cX(u,e){return new jQ([new ik(0,"",u)],e)}function oP(u,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(u<<0|0|0|32768|2<<24)>>>0,new RN(t,e===null?ev:e)}class Jr{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static getClassNameFromMetadata(e){let n="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return i&1&&(n+=" mtki"),i&2&&(n+=" mtkb"),i&4&&(n+=" mtku"),i&8&&(n+=" mtks"),n}static getInlineStyleFromMetadata(e,t){const n=this.getForeground(e),i=this.getFontStyle(e);let r=`color: ${t[n]};`;i&1&&(r+="font-style: italic;"),i&2&&(r+="font-weight: bold;");let a="";return i&4&&(a+=" underline"),i&8&&(a+=" line-through"),a&&(r+=`text-decoration:${a};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),n=this.getFontStyle(e);return{foreground:t,italic:!!(n&1),bold:!!(n&2),underline:!!(n&4),strikethrough:!!(n&8)}}}class nr{static createEmpty(e,t){const n=nr.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=n,new nr(i,e,t)}constructor(e,t,n){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=n}equals(e){return e instanceof nr?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,n){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const i=t<<1,r=i+(n<<1);for(let a=i;a0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],n=Jr.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(n)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Jr.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Jr.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Jr.getClassNameFromMetadata(t)}getInlineStyle(e,t){const n=this._tokens[(e<<1)+1];return Jr.getInlineStyleFromMetadata(n,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Jr.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return nr.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,n){return new dX(this,e,t,n)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let r=0;r>>1)-1;for(;nt&&(i=r)}return n}withInserted(e){if(e.length===0)return this;let t=0,n=0,i="";const r=new Array;let a=0;for(;;){const o=ta){i+=this._text.substring(a,s.offset);const l=this._tokens[(t<<1)+1];r.push(i.length,l),a=s.offset}i+=s.text,r.push(i.length,s.tokenMetadata),n++}else break}return new nr(new Uint32Array(r),i,this._languageIdCodec)}}nr.defaultTokenMetadata=(32768|2<<24)>>>0;class dX{constructor(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let r=this._firstTokenIndex,a=e.getCount();r=n);r++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof dX?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class os{constructor(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.type=i,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const n=e.length,i=t.length;if(n!==i)return!1;for(let r=0;r=r||(o[s++]=new os(Math.max(1,l.startColumn-i+1),Math.min(a+1,l.endColumn-i+1),l.className,l.type));return o}static filter(e,t,n,i){if(e.length===0)return[];const r=[];let a=0;for(let o=0,s=e.length;ot||c.isEmpty()&&(l.type===0||l.type===3))continue;const d=c.startLineNumber===t?c.startColumn:n,h=c.endLineNumber===t?c.endColumn:i;r[a++]=new os(d,h,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){const n=[2,0,1,3];return n[e]-n[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const n=os._typeCompare(e.type,t.type);return n!==0?n:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(i,0,e),this.classNames.splice(i,0,t),this.metadata.splice(i,0,n);break}this.count++}};class kQe{static normalize(e,t){if(t.length===0)return[];const n=[],i=new bQe;let r=0;for(let a=0,o=t.length;a1){const g=e.charCodeAt(l-2);ur(g)&&l--}if(c>1){const g=e.charCodeAt(c-2);ur(g)&&c--}const E=l-1,m=c-2;r=i.consumeLowerThan(E,r,n),i.count===0&&(r=E),i.insert(m,d,h)}return i.consumeLowerThan(1073741824,r,n),n}}class mr{constructor(e,t,n,i){this.endIndex=e,this.type=t,this.metadata=n,this.containsRTL=i,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class V6e{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class fg{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D,x){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=r,this.containsRTL=a,this.fauxIndentLength=o,this.lineTokens=s,this.lineDecorations=l.sort(os.compare),this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=g,this.renderWhitespace=f==="all"?4:f==="boundary"?1:f==="selection"?2:f==="trailing"?3:0,this.renderControlCharacters=p,this.fontLigatures=D,this.selectionsOnLine=x&&x.sort((A,F)=>A.startOffset>>16}static getCharIndex(e){return(e&65535)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,n,i){const r=(t<<16|n<<0)>>>0;this._data[e-1]=r,this._horizontalOffset[e-1]=i}getHorizontalOffset(e){return this._horizontalOffset.length===0?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return this.length===0?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),n=Id.getPartIndex(t),i=Id.getCharIndex(t);return new $6e(n,i)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,n){if(this.length===0)return 0;const i=(e<<16|n<<0)>>>0;let r=0,a=this.length-1;for(;r+1>>1,f=this._data[g];if(f===i)return g;f>i?a=g:r=g}if(r===a)return r;const o=this._data[r],s=this._data[a];if(o===i)return r;if(s===i)return a;const l=Id.getPartIndex(o),c=Id.getCharIndex(o),d=Id.getPartIndex(s);let h;l!==d?h=t:h=Id.getCharIndex(s);const E=n-c,m=h-n;return E<=m?r:a}}class _W{constructor(e,t,n){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}function sA(u,e){if(u.lineContent.length===0){if(u.lineDecorations.length>0){e.appendString("");let t=0,n=0,i=0;for(const a of u.lineDecorations)(a.type===1||a.type===2)&&(e.appendString(''),a.type===1&&(i|=1,t++),a.type===2&&(i|=2,n++));e.appendString("");const r=new Id(1,t+n);return r.setColumnInfo(1,t,0,0),new _W(r,!1,i)}return e.appendString(""),new _W(new Id(0,0),!1,0)}return zQe(AQe(u),e)}class FQe{constructor(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}function sP(u){const e=new h6(1e4),t=sA(u,e);return new FQe(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class yQe{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=i,this.isOverflowing=r,this.overflowingCharCount=a,this.parts=o,this.containsForeignElements=s,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=d,this.containsRTL=h,this.spaceWidth=E,this.renderSpaceCharCode=m,this.renderWhitespace=g,this.renderControlCharacters=f}}function AQe(u){const e=u.lineContent;let t,n,i;u.stopRenderingLineAfter!==-1&&u.stopRenderingLineAfter0){for(let o=0,s=u.lineDecorations.length;o0&&(r[a++]=new mr(n,"",0,!1));let o=n;for(let s=0,l=t.getCount();s=i){const E=e?Ux(u.substring(o,i)):!1;r[a++]=new mr(i,d,0,E);break}const h=e?Ux(u.substring(o,c)):!1;r[a++]=new mr(c,d,0,h),o=c}return r}function SQe(u,e,t){let n=0;const i=[];let r=0;if(t)for(let a=0,o=e.length;a=50&&(i[r++]=new mr(E+1,c,d,h),m=E+1,E=-1);m!==l&&(i[r++]=new mr(l,c,d,h))}else i[r++]=s;n=l}else for(let a=0,o=e.length;a50){const d=s.type,h=s.metadata,E=s.containsRTL,m=Math.ceil(c/50);for(let g=1;g=8234&&u<=8238||u>=8294&&u<=8297||u>=8206&&u<=8207||u===1564}function BQe(u,e){const t=[];let n=new mr(0,"",0,!1),i=0;for(const r of e){const a=r.endIndex;for(;in.endIndex&&(n=new mr(i,r.type,r.metadata,r.containsRTL),t.push(n)),n=new mr(i+1,"mtkcontrol",r.metadata,!1),t.push(n))}i>n.endIndex&&(n=new mr(a,r.type,r.metadata,r.containsRTL),t.push(n))}return t}function wQe(u,e,t,n){const i=u.continuesWithWrappedLine,r=u.fauxIndentLength,a=u.tabSize,o=u.startVisibleColumn,s=u.useMonospaceOptimizations,l=u.selectionsOnLine,c=u.renderWhitespace===1,d=u.renderWhitespace===3,h=u.renderSpaceWidth!==u.spaceWidth,E=[];let m=0,g=0,f=n[g].type,p=n[g].containsRTL,D=n[g].endIndex;const x=n.length;let b=!1,k=Ta(e),A;k===-1?(b=!0,k=t,A=t):A=Hc(e);let F=!1,S=0,w=l&&l[S],z=o%a;for(let O=r;O=w.endOffset&&(S++,w=l&&l[S]);let _;if(OA)_=!0;else if(y===9)_=!0;else if(y===32)if(c)if(F)_=!0;else{const L=O+1O),_&&d&&(_=b||O>A),_&&p&&O>=k&&O<=A&&(_=!1),F){if(!_||!s&&z>=a){if(h){const L=m>0?E[m-1].endIndex:r;for(let T=L+1;T<=O;T++)E[m++]=new mr(T,"mtkw",1,!1)}else E[m++]=new mr(O,"mtkw",1,!1);z=z%a}}else(O===D||_&&O>r)&&(E[m++]=new mr(O,f,0,p),z=z%a);for(y===9?z=a:Tm(y)?z+=2:z++,F=_;O===D&&(g++,g0?e.charCodeAt(t-1):0,y=t>1?e.charCodeAt(t-2):0;O===32&&y!==32&&y!==9||(N=!0)}else N=!0;if(N)if(h){const O=m>0?E[m-1].endIndex:r;for(let y=O+1;y<=t;y++)E[m++]=new mr(y,"mtkw",1,!1)}else E[m++]=new mr(t,"mtkw",1,!1);else E[m++]=new mr(t,f,0,p);return E}function LQe(u,e,t,n){n.sort(os.compare);const i=kQe.normalize(u,n),r=i.length;let a=0;const o=[];let s=0,l=0;for(let d=0,h=t.length;dl&&(l=D.startOffset,o[s++]=new mr(l,g,f,p)),D.endOffset+1<=m)l=D.endOffset+1,o[s++]=new mr(l,g+" "+D.className,f|D.metadata,p),a++;else{l=m,o[s++]=new mr(l,g+" "+D.className,f|D.metadata,p);break}}m>l&&(l=m,o[s++]=new mr(l,g,f,p))}const c=t[t.length-1].endIndex;if(a'):e.appendString("");for(let w=0,z=l.length;w=c&&(V+=J)}}for(T&&(e.appendString(' style="width:'),e.appendString(String(m*I)),e.appendString('px"')),e.appendASCIICharCode(62);b1?e.appendCharCode(8594):e.appendCharCode(65515);for(let J=2;J<=U;J++)e.appendCharCode(160)}else V=2,U=1,e.appendCharCode(g),e.appendCharCode(8204);A+=V,F+=U,b>=c&&(k+=U)}}else for(e.appendASCIICharCode(62);b=c&&(k+=V)}R?S++:S=0,b>=a&&!x&&N.isPseudoAfter()&&(x=!0,D.setColumnInfo(b+1,w,A,F)),e.appendString("")}return x||D.setColumnInfo(a+1,l.length-1,A,F),o&&(e.appendString(''),e.appendString(v("showMore","Show more ({0})",TQe(s))),e.appendString("")),e.appendString(""),new _W(D,E,i)}function MQe(u){return u.toString(16).toUpperCase().padStart(4,"0")}function TQe(u){return u<1024?v("overflow.chars","{0} chars",u):u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/1024/1024).toFixed(1)} MB`}class soe{constructor(e,t,n,i){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=n|0,this.height=i|0}}class NQe{constructor(e,t){this.tabSize=e,this.data=t}}class hX{constructor(e,t,n,i,r,a,o){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.startVisibleColumn=r,this.tokens=a,this.inlineDecorations=o}}class Ys{constructor(e,t,n,i,r,a,o,s,l,c){this.minColumn=e,this.maxColumn=t,this.content=n,this.continuesWithWrappedLine=i,this.isBasicASCII=Ys.isBasicASCII(n,a),this.containsRTL=Ys.containsRTL(n,this.isBasicASCII,r),this.tokens=o,this.inlineDecorations=s,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return t?nA(e):!0}static containsRTL(e,t,n){return!t&&n?Ux(e):!1}}class Yb{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class PQe{constructor(e,t,n,i){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=i}toInlineDecoration(e){return new Yb(new j(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class W6e{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class xk{constructor(e,t,n){this.color=e,this.zIndex=t,this.data=n}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&di(e.data,t.data)}static equalsArr(e,t){return di(e,t,xk.equals)}}function RQe(u){return Array.isArray(u)}function IQe(u){return!RQe(u)}function G6e(u){return typeof u=="string"}function loe(u){return!G6e(u)}function GD(u){return!u}function tm(u,e){return u.ignoreCase&&e?e.toLowerCase():e}function coe(u){return u.replace(/[&<>'"_]/g,"-")}function OQe(u,e){console.log(`${u.languageId}: ${e}`)}function hn(u,e){return new Error(`${u.languageId}: ${e}`)}function xE(u,e,t,n,i){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let a=null;return e.replace(r,function(o,s,l,c,d,h,E,m,g){return GD(l)?GD(c)?!GD(d)&&d0;){const n=u.tokenizer[t];if(n)return n;const i=t.lastIndexOf(".");i<0?t=null:t=t.substr(0,i)}return null}function jQe(u,e){let t=e;for(;t&&t.length>0;){if(u.stateNames[t])return!0;const i=t.lastIndexOf(".");i<0?t=null:t=t.substr(0,i)}return!1}var HQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},VQe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},SW;const U6e=5;class vk{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new ox(e,t);let n=ox.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let i=this._entries[n];return i||(i=new ox(e,t),this._entries[n]=i,i)}}vk._INSTANCE=new vk(U6e);class ox{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return ox._equals(this,e)}push(e){return vk.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return vk.create(this.parent,e)}}class d5{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new d5(this.languageId,this.state)}}class vE{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new Qb(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new Qb(e,t);const n=ox.getStackElementId(e);let i=this._entries[n];return i||(i=new Qb(e,null),this._entries[n]=i,i)}}vE._INSTANCE=new vE(U6e);class Qb{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:vE.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof Qb)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class $Qe{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new ik(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,i){const r=n.languageId,a=n.state,o=qn.get(r);if(!o)return this.enterLanguage(r),this.emit(i,""),a;const s=o.tokenize(e,t,a);if(i!==0)for(const l of s.tokens)this._tokens.push(new ik(l.offset+i,l.type,l.language));else this._tokens=this._tokens.concat(s.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,s.endState}finalize(e){return new jQ(this._tokens,e)}}class zB{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){const i=e!==null?e.length:0,r=t.length,a=n!==null?n.length:0;if(i===0&&r===0&&a===0)return new Uint32Array(0);if(i===0&&r===0)return n;if(r===0&&a===0)return e;const o=new Uint32Array(i+r+a);e!==null&&o.set(e);for(let s=0;s{if(a)return;let s=!1;for(let l=0,c=o.changedLanguages.length;l{o.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const n=qn.get(t);if(n){if(n instanceof SW){const i=n.getLoadStatus();i.loaded===!1&&e.push(i.promise)}continue}qn.isResolved(t)||e.push(qn.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=vk.create(null,this._lexer.start);return vE.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return cX(this._languageId,n);const i=new $Qe,r=this._tokenize(e,t,n,i);return i.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return oP(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);const i=new zB(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,i);return i.finalize(r)}_tokenize(e,t,n,i){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,i):this._myTokenize(e,t,n,0,i)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=Y7(this._lexer,t.stack.state),!n))throw hn(this._lexer,"tokenizer state is not defined: "+t.stack.state);let i=-1,r=!1;for(const a of n){if(!loe(a.action)||a.action.nextEmbedded!=="@pop")continue;r=!0;let o=a.regex;const s=a.regex.source;if(s.substr(0,4)==="^(?:"&&s.substr(s.length-1,1)===")"){const c=(o.ignoreCase?"i":"")+(o.unicode?"u":"");o=new RegExp(s.substr(4,s.length-5),c)}const l=e.search(o);l===-1||l!==0&&a.matchOnlyAtLineStart||(i===-1||l0&&r.nestedLanguageTokenize(o,!1,n.embeddedLanguageData,i);const s=e.substring(a);return this._myTokenize(s,t,n,i+a,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,i,r){r.enterLanguage(this._languageId);const a=e.length,o=t&&this._lexer.includeLF?e+` +`:e,s=o.length;let l=n.embeddedLanguageData,c=n.stack,d=0,h=null,E=!0;for(;E||d=s)break;E=!1;let w=this._lexer.tokenizer[p];if(!w&&(w=Y7(this._lexer,p),!w))throw hn(this._lexer,"tokenizer state is not defined: "+p);const z=o.substr(d);for(const N of w)if((d===0||!N.matchOnlyAtLineStart)&&(D=z.match(N.regex),D)){x=D[0],b=N.action;break}}if(D||(D=[""],x=""),b||(d=this._lexer.maxStack)throw hn(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(p)}else if(b.next==="@pop"){if(c.depth<=1)throw hn(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(k));c=c.pop()}else if(b.next==="@popall")c=c.popall();else{let w=xE(this._lexer,b.next,x,D,p);if(w[0]==="@"&&(w=w.substr(1)),Y7(this._lexer,w))c=c.push(w);else throw hn(this._lexer,"trying to set a next state '"+w+"' that is undefined in rule: "+this._safeRuleName(k))}}b.log&&typeof b.log=="string"&&OQe(this._lexer,this._lexer.languageId+": "+xE(this._lexer,b.log,x,D,p))}if(F===null)throw hn(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(k));const S=w=>{const z=this._languageService.getLanguageIdByLanguageName(w)||this._languageService.getLanguageIdByMimeType(w)||w,N=this._getNestedEmbeddedLanguageData(z);if(d0)throw hn(this._lexer,"groups cannot be nested: "+this._safeRuleName(k));if(D.length!==F.length+1)throw hn(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(k));let w=0;for(let z=1;zu});class EX{static colorizeElement(e,t,n,i){i=i||{};const r=i.theme||"vs",a=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!a)return console.error("Mode not detected"),Promise.resolve();const o=t.getLanguageIdByMimeType(a)||a;e.setTheme(r);const s=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;const l=c=>{var d;const h=(d=yj==null?void 0:yj.createHTML(c))!==null&&d!==void 0?d:c;n.innerHTML=h};return this.colorize(t,s||"",o,i).then(l,c=>console.error(c))}static colorize(e,t,n,i){return WQe(this,void 0,void 0,function*(){const r=e.languageIdCodec;let a=4;i&&typeof i.tabSize=="number"&&(a=i.tabSize),UQ(t)&&(t=t.substr(1));const o=F1(t);if(!e.isRegisteredLanguageId(n))return doe(o,a,r);const s=yield qn.getOrCreate(n);return s?GQe(o,a,s,r):doe(o,a,r)})}static colorizeLine(e,t,n,i,r=4){const a=Ys.isBasicASCII(e,t),o=Ys.containsRTL(e,a,n);return sP(new fg(!1,!0,e,!1,a,o,0,i,[],r,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,n=4){const i=e.getLineContent(t);e.tokenization.forceTokenization(t);const a=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),a,n)}}function GQe(u,e,t,n){return new Promise((i,r)=>{const a=()=>{const o=UQe(u,e,t,n);if(t instanceof Ck){const s=t.getLoadStatus();if(s.loaded===!1){s.promise.then(a,r);return}}i(o)};a()})}function doe(u,e,t){let n=[];const r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let a=0,o=u.length;a")}return n.join("")}function UQe(u,e,t,n){let i=[],r=t.getInitialState();for(let a=0,o=u.length;a"),r=l.endState}return i.join("")}const hoe=2e4;let kf,GS,BW,US,wW;function qQe(u){kf=document.createElement("div"),kf.className="monaco-aria-container";const e=()=>{const n=document.createElement("div");return n.className="monaco-alert",n.setAttribute("role","alert"),n.setAttribute("aria-atomic","true"),kf.appendChild(n),n};GS=e(),BW=e();const t=()=>{const n=document.createElement("div");return n.className="monaco-status",n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),kf.appendChild(n),n};US=t(),wW=t(),u.appendChild(kf)}function ga(u){kf&&(GS.textContent!==u?(Nr(BW),MB(GS,u)):(Nr(GS),MB(BW,u)))}function jm(u){kf&&(US.textContent!==u?(Nr(wW),MB(US,u)):(Nr(US),MB(wW,u)))}function MB(u,e){Nr(u),e.length>hoe&&(e=e.substr(0,hoe)),u.textContent=e,u.style.visibility="hidden",u.style.visibility="visible"}const mX=Ut("markerDecorationsService");var JQe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ZQe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let bk=class{constructor(e,t){}dispose(){}};bk.ID="editor.contrib.markerDecorations";bk=JQe([ZQe(1,mX)],bk);fu(bk.ID,bk,0);class q6e extends ne{constructor(e,t){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let n=!1,i=!1;const r=()=>{if(n&&!i)try{n=!1,i=!0,t()}finally{requestAnimationFrame(()=>{i=!1,r()})}};this._resizeObserver=new ResizeObserver(a=>{e=a&&a[0]&&a[0].contentRect?a[0].contentRect:null,n=!0,r()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let n=0,i=0;t?(n=t.width,i=t.height):this._referenceDomElement&&(n=this._referenceDomElement.clientWidth,i=this._referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),(this._width!==n||this._height!==i)&&(this._width=n,this._height=i,e&&this._onDidChange.fire())}}class um{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=um._read(e,this.key),n=r=>um._read(e,r),i=(r,a)=>um._write(e,r,a);this.migrate(t,n,i)}static _read(e,t){if(typeof e>"u")return;const n=t.indexOf(".");if(n>=0){const i=t.substring(0,n);return this._read(e[i],t.substring(n+1))}return e[t]}static _write(e,t,n){const i=t.indexOf(".");if(i>=0){const r=t.substring(0,i);e[r]=e[r]||{},this._write(e[r],t.substring(i+1),n);return}e[t]=n}}um.items=[];function pg(u,e){um.items.push(new um(u,e))}function U0(u,e){pg(u,(t,n,i)=>{if(typeof t<"u"){for(const[r,a]of e)if(t===r){i(u,a);return}}})}function YQe(u){um.items.forEach(e=>e.apply(u))}U0("wordWrap",[[!0,"on"],[!1,"off"]]);U0("lineNumbers",[[!0,"on"],[!1,"off"]]);U0("cursorBlinking",[["visible","solid"]]);U0("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);U0("renderLineHighlight",[[!0,"line"],[!1,"none"]]);U0("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);U0("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);U0("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);U0("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);U0("autoIndent",[[!1,"advanced"],[!0,"full"]]);U0("matchBrackets",[[!0,"always"],[!1,"never"]]);U0("renderFinalNewline",[[!0,"on"],[!1,"off"]]);U0("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]);pg("autoClosingBrackets",(u,e,t)=>{u===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")>"u"&&t("autoClosingQuotes","never"),typeof e("autoSurround")>"u"&&t("autoSurround","never"))});pg("renderIndentGuides",(u,e,t)=>{typeof u<"u"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")>"u"&&t("guides.indentation",!!u))});pg("highlightActiveIndentGuide",(u,e,t)=>{typeof u<"u"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")>"u"&&t("guides.highlightActiveIndentation",!!u))});const QQe={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};pg("suggest.filteredTypes",(u,e,t)=>{if(u&&typeof u=="object"){for(const n of Object.entries(QQe))u[n[0]]===!1&&typeof e(`suggest.${n[1]}`)>"u"&&t(`suggest.${n[1]}`,!1);t("suggest.filteredTypes",void 0)}});pg("quickSuggestions",(u,e,t)=>{if(typeof u=="boolean"){const n=u?"on":"off";t("quickSuggestions",{comments:n,strings:n,other:n})}});pg("experimental.stickyScroll.enabled",(u,e,t)=>{typeof u=="boolean"&&(t("experimental.stickyScroll.enabled",void 0),typeof e("stickyScroll.enabled")>"u"&&t("stickyScroll.enabled",u))});pg("experimental.stickyScroll.maxLineCount",(u,e,t)=>{typeof u=="number"&&(t("experimental.stickyScroll.maxLineCount",void 0),typeof e("stickyScroll.maxLineCount")>"u"&&t("stickyScroll.maxLineCount",u))});class XQe{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new Q,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}const tv=new XQe,k4=Ut("accessibilityService"),lA=new Pe("accessibilityModeEnabled",!1);var eXe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},tXe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let LW=class extends ne{constructor(e,t,n,i){super(),this._accessibilityService=i,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new Q),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new fve,this.isSimpleWidget=e,this._containerObserver=this._register(new q6e(n,t.dimension)),this._rawOptions=Eoe(t),this._validatedOptions=CE.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(f0.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(tv.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(aW.onDidChange(()=>this._recomputeOptions())),this._register(sk.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=CE.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=u3.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),n=this._readFontInfo(t),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:n,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:tv.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return CE.computeOptions(this._validatedOptions,i)}_readEnvConfiguration(){return{extraEditorClassName:nXe(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:t3||T0,pixelRatio:sk.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return aW.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=Eoe(e);CE.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=CE.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=uXe(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};LW=eXe([tXe(3,k4)],LW);function uXe(u){let e=0;for(;u;)u=Math.floor(u/10),e++;return e||1}function nXe(){let u="";return!l4&&!Vve&&(u+="no-user-select "),l4&&(u+="no-minimap-shadow ",u+="enable-user-select "),iu&&(u+="mac "),u}class iXe{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class rXe{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class CE{static validateOptions(e){const t=new iXe;for(const n of a5){const i=n.name==="_never_"?void 0:e[n.name];t._write(n.id,n.validate(i))}return t}static computeOptions(e,t){const n=new rXe;for(const i of a5)n._write(i.id,i.compute(t,n,e._read(i.id)));return n}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?di(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!CE._deepEquals(e[n],t[n]))return!1;return!0}static checkEquals(e,t){const n=[];let i=!1;for(const r of a5){const a=!CE._deepEquals(e._read(r.id),t._read(r.id));n[r.id]=a,a&&(i=!0)}return i?new gve(n):null}static applyUpdate(e,t){let n=!1;for(const i of a5)if(t.hasOwnProperty(i.name)){const r=i.applyUpdate(e[i.name],t[i.name]);e[i.name]=r.newValue,n=n||r.didChange}return n}}function Eoe(u){const e=xh(u);return YQe(e),e}function Ci(u,e,t){let n=null,i=null;if(typeof t.value=="function"?(n="value",i=t.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(n="get",i=t.get),!i)throw new Error("not supported");const r=`$memoize$${e}`;t[n]=function(...a){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,a)}),this[r]}}var aXe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yu;(function(u){u.Tap="-monaco-gesturetap",u.Change="-monaco-gesturechange",u.Start="-monaco-gesturestart",u.End="-monaco-gesturesend",u.Contextmenu="-monaco-gesturecontextmenu"})(Yu||(Yu={}));class Zu extends ne{constructor(){super(),this.dispatched=!1,this.targets=new to,this.ignoreTargets=new to,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(ce(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(ce(document,"touchend",e=>this.onTouchEnd(e))),this._register(ce(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){if(!Zu.isTouchDevice())return ne.None;Zu.INSTANCE||(Zu.INSTANCE=new Zu);const t=Zu.INSTANCE.targets.push(e);return ft(t)}static ignoreTarget(e){if(!Zu.isTouchDevice())return ne.None;Zu.INSTANCE||(Zu.INSTANCE=new Zu);const t=Zu.INSTANCE.ignoreTargets.push(e);return ft(t)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,i=e.targetTouches.length;n=Zu.HOLD_DELAY&&Math.abs(o.initialPageX-s0(o.rollingPageX))<30&&Math.abs(o.initialPageY-s0(o.rollingPageY))<30){const l=this.newGestureEvent(Yu.Contextmenu,o.initialTarget);l.pageX=s0(o.rollingPageX),l.pageY=s0(o.rollingPageY),this.dispatchEvent(l)}else if(n===1){const l=s0(o.rollingPageX),c=s0(o.rollingPageY),d=s0(o.rollingTimestamps)-o.rollingTimestamps[0],h=l-o.rollingPageX[0],E=c-o.rollingPageY[0],m=[...this.targets].filter(g=>o.initialTarget instanceof Node&&g.contains(o.initialTarget));this.inertia(m,t,Math.abs(h)/d,h>0?1:-1,l,Math.abs(E)/d,E>0?1:-1,c)}this.dispatchEvent(this.newGestureEvent(Yu.End,o.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(e){if(e.type===Yu.Tap){const t=new Date().getTime();let n=0;t-this._lastSetTapCountTime>Zu.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=t,e.tapCount=n}else(e.type===Yu.Change||e.type===Yu.Contextmenu)&&(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;for(const t of this.targets)t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}}inertia(e,t,n,i,r,a,o,s){this.handle=N0(()=>{const l=Date.now(),c=l-t;let d=0,h=0,E=!0;n+=Zu.SCROLL_FRICTION*c,a+=Zu.SCROLL_FRICTION*c,n>0&&(E=!1,d=i*n*c),a>0&&(E=!1,h=o*a*c);const m=this.newGestureEvent(Yu.Change);m.translationX=d,m.translationY=h,e.forEach(g=>g.dispatchEvent(m)),E||this.inertia(e,l,n,i,r+d,a,o,s+h)})}onTouchMove(e){const t=Date.now();for(let n=0,i=e.changedTouches.length;n3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(r.pageX),a.rollingPageY.push(r.pageY),a.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}Zu.SCROLL_FRICTION=-.005;Zu.HOLD_DELAY=700;Zu.CLEAR_TAP_COUNT_TIME=400;aXe([Ci],Zu,"isTouchDevice",null);class m6{constructor(){this._hooks=new pe,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,i,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=i,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add(ft(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=window}this._hooks.add(ce(a,Me.POINTER_MOVE,o=>{if(o.buttons!==n){this.stopMonitoring(!0);return}o.preventDefault(),this._pointerMoveCallback(o)})),this._hooks.add(ce(a,Me.POINTER_UP,o=>this.stopMonitoring(!0)))}}function gX(u){return`--vscode-${u.replace(/\./g,"-")}`}function Re(u){return`var(${gX(u)})`}function oXe(u,e){return`var(${gX(u)}, ${e})`}const J6e={ColorContribution:"base.contributions.colors"};class sXe{constructor(){this._onDidChangeSchema=new Q,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,n,i=!1,r){const a={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:r};this.colorsById[e]=a;const o={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return r&&(o.deprecationMessage=r),this.colorSchema.properties[e]=o,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map(e=>this.colorsById[e])}resolveDefaultColor(e,t){const n=this.colorsById[e];if(n&&n.defaults){const i=n.defaults[t.type];return rc(i,t)}}getColorSchema(){return this.colorSchema}toString(){const e=(t,n)=>{const i=t.indexOf(".")===-1?0:1,r=n.indexOf(".")===-1?0:1;return i!==r?i-r:t.localeCompare(n)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}}const lP=new sXe;jn.add(J6e.ColorContribution,lP);function q(u,e,t,n,i){return lP.registerColor(u,e,t,n,i)}const Ae=q("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},v("foreground","Overall foreground color. This color is only used if not overridden by a component."));q("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},v("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const lXe=q("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},v("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));q("descriptionForeground",{light:"#717171",dark:tt(Ae,.7),hcDark:tt(Ae,.7),hcLight:tt(Ae,.7)},v("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const BE=q("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},v("iconForeground","The default color for icons in the workbench.")),js=q("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},v("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),eu=q("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},v("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),En=q("contrastActiveBorder",{light:null,dark:null,hcDark:js,hcLight:js},v("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));q("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},v("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));q("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:ae.black,hcLight:"#292929"},v("textSeparatorForeground","Color for text separators."));const cXe=q("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},v("textLinkForeground","Foreground color for links in text."));q("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},v("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));q("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},v("textPreformatForeground","Foreground color for preformatted text segments."));q("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},v("textBlockQuoteBackground","Background color for block quotes in text."));q("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:ae.white,hcLight:"#292929"},v("textBlockQuoteBorder","Border color for block quotes in text."));q("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:ae.black,hcLight:"#F2F2F2"},v("textCodeBlockBackground","Background color for code blocks in text."));const t1=q("widget.shadow",{dark:tt(ae.black,.36),light:tt(ae.black,.16),hcDark:null,hcLight:null},v("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),fX=q("widget.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("widgetBorder","Border color of widgets such as find/replace inside the editor.")),Z6e=q("input.background",{dark:"#3C3C3C",light:ae.white,hcDark:ae.black,hcLight:ae.white},v("inputBoxBackground","Input box background.")),Y6e=q("input.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("inputBoxForeground","Input box foreground.")),Q6e=q("input.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("inputBoxBorder","Input box border.")),pX=q("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:eu,hcLight:eu},v("inputBoxActiveOptionBorder","Border color of activated options in input fields."));q("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},v("inputOption.hoverBackground","Background color of activated options in input fields."));const If=q("inputOption.activeBackground",{dark:tt(js,.4),light:tt(js,.2),hcDark:ae.transparent,hcLight:ae.transparent},v("inputOption.activeBackground","Background hover color of options in input fields.")),DX=q("inputOption.activeForeground",{dark:ae.white,light:ae.black,hcDark:Ae,hcLight:Ae},v("inputOption.activeForeground","Foreground color of activated options in input fields."));q("input.placeholderForeground",{light:tt(Ae,.5),dark:tt(Ae,.5),hcDark:tt(Ae,.7),hcLight:tt(Ae,.7)},v("inputPlaceholderForeground","Input box foreground color for placeholder text."));const dXe=q("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:ae.black,hcLight:ae.white},v("inputValidationInfoBackground","Input validation background color for information severity.")),hXe=q("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationInfoForeground","Input validation foreground color for information severity.")),EXe=q("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:eu,hcLight:eu},v("inputValidationInfoBorder","Input validation border color for information severity.")),mXe=q("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:ae.black,hcLight:ae.white},v("inputValidationWarningBackground","Input validation background color for warning severity.")),gXe=q("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationWarningForeground","Input validation foreground color for warning severity.")),fXe=q("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:eu,hcLight:eu},v("inputValidationWarningBorder","Input validation border color for warning severity.")),pXe=q("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:ae.black,hcLight:ae.white},v("inputValidationErrorBackground","Input validation background color for error severity.")),DXe=q("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Ae},v("inputValidationErrorForeground","Input validation foreground color for error severity.")),xXe=q("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:eu,hcLight:eu},v("inputValidationErrorBorder","Input validation border color for error severity.")),u1=q("dropdown.background",{dark:"#3C3C3C",light:ae.white,hcDark:ae.black,hcLight:ae.white},v("dropdownBackground","Dropdown background.")),vXe=q("dropdown.listBackground",{dark:null,light:null,hcDark:ae.black,hcLight:ae.white},v("dropdownListBackground","Dropdown list background.")),Ih=q("dropdown.foreground",{dark:"#F0F0F0",light:Ae,hcDark:ae.white,hcLight:Ae},v("dropdownForeground","Dropdown foreground.")),h5=q("dropdown.border",{dark:u1,light:"#CECECE",hcDark:eu,hcLight:eu},v("dropdownBorder","Dropdown border.")),Eb=q("button.foreground",{dark:ae.white,light:ae.white,hcDark:ae.white,hcLight:ae.white},v("buttonForeground","Button foreground color.")),CXe=q("button.separator",{dark:tt(Eb,.4),light:tt(Eb,.4),hcDark:tt(Eb,.4),hcLight:tt(Eb,.4)},v("buttonSeparator","Button separator color.")),mb=q("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},v("buttonBackground","Button background color.")),bXe=q("button.hoverBackground",{dark:Vc(mb,.2),light:Bp(mb,.2),hcDark:mb,hcLight:mb},v("buttonHoverBackground","Button background color when hovering.")),kXe=q("button.border",{dark:eu,light:eu,hcDark:eu,hcLight:eu},v("buttonBorder","Button border color.")),FXe=q("button.secondaryForeground",{dark:ae.white,light:ae.white,hcDark:ae.white,hcLight:Ae},v("buttonSecondaryForeground","Secondary button foreground color.")),zW=q("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:ae.white},v("buttonSecondaryBackground","Secondary button background color.")),yXe=q("button.secondaryHoverBackground",{dark:Vc(zW,.2),light:Bp(zW,.2),hcDark:null,hcLight:null},v("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),qS=q("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:ae.black,hcLight:"#0F4A85"},v("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),AXe=q("badge.foreground",{dark:ae.white,light:"#333",hcDark:ae.white,hcLight:ae.white},v("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),_Xe=q("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},v("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),gb=q("scrollbarSlider.background",{dark:ae.fromHex("#797979").transparent(.4),light:ae.fromHex("#646464").transparent(.4),hcDark:tt(eu,.6),hcLight:tt(eu,.4)},v("scrollbarSliderBackground","Scrollbar slider background color.")),fb=q("scrollbarSlider.hoverBackground",{dark:ae.fromHex("#646464").transparent(.7),light:ae.fromHex("#646464").transparent(.7),hcDark:tt(eu,.8),hcLight:tt(eu,.8)},v("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),pb=q("scrollbarSlider.activeBackground",{dark:ae.fromHex("#BFBFBF").transparent(.4),light:ae.fromHex("#000000").transparent(.6),hcDark:eu,hcLight:eu},v("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),SXe=q("progressBar.background",{dark:ae.fromHex("#0E70C0"),light:ae.fromHex("#0E70C0"),hcDark:eu,hcLight:eu},v("progressBarBackground","Background color of the progress bar that can show for long running operations."));q("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const n1=q("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},v("editorError.foreground","Foreground color of error squigglies in the editor.")),BXe=q("editorError.border",{dark:null,light:null,hcDark:ae.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},v("errorBorder","If set, color of double underlines for errors in the editor."));q("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Hs=q("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},v("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),kk=q("editorWarning.border",{dark:null,light:null,hcDark:ae.fromHex("#FFCC00").transparent(.8),hcLight:ae.fromHex("#FFCC00").transparent(.8)},v("warningBorder","If set, color of double underlines for warnings in the editor."));q("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);const Mo=q("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},v("editorInfo.foreground","Foreground color of info squigglies in the editor.")),Fk=q("editorInfo.border",{dark:null,light:null,hcDark:ae.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},v("infoBorder","If set, color of double underlines for infos in the editor.")),wXe=q("editorHint.foreground",{dark:ae.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},v("editorHint.foreground","Foreground color of hint squigglies in the editor."));q("editorHint.border",{dark:null,light:null,hcDark:ae.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},v("hintBorder","If set, color of double underlines for hints in the editor."));q("sash.hoverBorder",{dark:js,light:js,hcDark:js,hcLight:js},v("sashActiveBorder","Border color of active sashes."));const rr=q("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:ae.black,hcLight:ae.white},v("editorBackground","Editor background color.")),ml=q("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:ae.white,hcLight:Ae},v("editorForeground","Editor default foreground color."));q("editorStickyScroll.background",{light:rr,dark:rr,hcDark:rr,hcLight:rr},v("editorStickyScrollBackground","Sticky scroll background color for the editor"));q("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));const ti=q("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:ae.white},v("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),i1=q("editorWidget.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),r1=q("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:eu,hcLight:eu},v("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),LXe=q("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},v("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),moe=q("quickInput.background",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),zXe=q("quickInput.foreground",{dark:i1,light:i1,hcDark:i1,hcLight:i1},v("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),MXe=q("quickInputTitle.background",{dark:new ae(new nu(255,255,255,.105)),light:new ae(new nu(0,0,0,.06)),hcDark:"#000000",hcLight:ae.white},v("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),X6e=q("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:ae.white,hcLight:"#0F4A85"},v("pickerGroupForeground","Quick picker color for grouping labels.")),TXe=q("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:ae.white,hcLight:"#0F4A85"},v("pickerGroupBorder","Quick picker color for grouping borders.")),NXe=q("keybindingLabel.background",{dark:new ae(new nu(128,128,128,.17)),light:new ae(new nu(221,221,221,.4)),hcDark:ae.transparent,hcLight:ae.transparent},v("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),PXe=q("keybindingLabel.foreground",{dark:ae.fromHex("#CCCCCC"),light:ae.fromHex("#555555"),hcDark:ae.white,hcLight:Ae},v("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),RXe=q("keybindingLabel.border",{dark:new ae(new nu(51,51,51,.6)),light:new ae(new nu(204,204,204,.4)),hcDark:new ae(new nu(111,195,223)),hcLight:eu},v("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),IXe=q("keybindingLabel.bottomBorder",{dark:new ae(new nu(68,68,68,.6)),light:new ae(new nu(187,187,187,.4)),hcDark:new ae(new nu(111,195,223)),hcLight:Ae},v("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),wE=q("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},v("editorSelectionBackground","Color of the editor selection.")),OXe=q("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:ae.white},v("editorSelectionForeground","Color of the selected text for high contrast.")),eCe=q("editor.inactiveSelectionBackground",{light:tt(wE,.5),dark:tt(wE,.5),hcDark:tt(wE,.7),hcLight:tt(wE,.5)},v("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xX=q("editor.selectionHighlightBackground",{light:Coe(wE,rr,.3,.6),dark:Coe(wE,rr,.3,.6),hcDark:null,hcLight:null},v("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));const jXe=q("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},v("editorFindMatch","Color of the current search match.")),a1=q("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},v("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),HXe=q("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},v("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),VXe=q("editor.findMatchBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("editorFindMatchBorder","Border color of the current search match.")),LE=q("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("findMatchHighlightBorder","Border color of the other search matches.")),$Xe=q("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:tt(En,.4),hcLight:tt(En,.4)},v("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);q("searchEditor.findMatchBackground",{light:tt(a1,.66),dark:tt(a1,.66),hcDark:a1,hcLight:a1},v("searchEditor.queryMatch","Color of the Search Editor query matches."));q("searchEditor.findMatchBorder",{light:tt(LE,.66),dark:tt(LE,.66),hcDark:LE,hcLight:LE},v("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));q("search.resultsInfoForeground",{light:Ae,dark:tt(Ae,.65),hcDark:Ae,hcLight:Ae},v("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));q("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},v("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);const TB=q("editorHoverWidget.background",{light:ti,dark:ti,hcDark:ti,hcLight:ti},v("hoverBackground","Background color of the editor hover."));q("editorHoverWidget.foreground",{light:i1,dark:i1,hcDark:i1,hcLight:i1},v("hoverForeground","Foreground color of the editor hover."));const KXe=q("editorHoverWidget.border",{light:r1,dark:r1,hcDark:r1,hcLight:r1},v("hoverBorder","Border color of the editor hover."));q("editorHoverWidget.statusBarBackground",{dark:Vc(TB,.2),light:Bp(TB,.05),hcDark:ti,hcLight:ti},v("statusBarBackground","Background color of the editor hover status bar."));const WXe=q("editorLink.activeForeground",{dark:"#4E94CE",light:ae.blue,hcDark:ae.cyan,hcLight:"#292929"},v("activeLinkForeground","Color of active links.")),Oh=q("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:ae.white,hcLight:ae.black},v("editorInlayHintForeground","Foreground color of inline hints")),jh=q("editorInlayHint.background",{dark:tt(qS,.1),light:tt(qS,.1),hcDark:tt(ae.white,.1),hcLight:tt(qS,.1)},v("editorInlayHintBackground","Background color of inline hints")),GXe=q("editorInlayHint.typeForeground",{dark:Oh,light:Oh,hcDark:Oh,hcLight:Oh},v("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),UXe=q("editorInlayHint.typeBackground",{dark:jh,light:jh,hcDark:jh,hcLight:jh},v("editorInlayHintBackgroundTypes","Background color of inline hints for types")),qXe=q("editorInlayHint.parameterForeground",{dark:Oh,light:Oh,hcDark:Oh,hcLight:Oh},v("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),JXe=q("editorInlayHint.parameterBackground",{dark:jh,light:jh,hcDark:jh,hcLight:jh},v("editorInlayHintBackgroundParameter","Background color of inline hints for parameters"));q("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},v("editorLightBulbForeground","The color used for the lightbulb actions icon."));q("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));const MW=new ae(new nu(155,185,85,.2)),TW=new ae(new nu(255,0,0,.2)),ZXe=q("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},v("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),YXe=q("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},v("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditor.insertedLineBackground",{dark:MW,light:MW,hcDark:null,hcLight:null},v("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditor.removedLineBackground",{dark:TW,light:TW,hcDark:null,hcLight:null},v("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0);q("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));q("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));const QXe=q("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content.")),XXe=q("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));q("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},v("diffEditorInsertedOutline","Outline color for the text that got inserted."));q("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},v("diffEditorRemovedOutline","Outline color for text that got removed."));q("diffEditor.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("diffEditorBorder","Border color between the two text editors."));q("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},v("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));q("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},v("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));q("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},v("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));q("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},v("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));const eet=q("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tet=q("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),uet=q("list.focusOutline",{dark:js,light:js,hcDark:En,hcLight:En},v("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),net=q("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},v("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Hh=q("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),o1=q("list.activeSelectionForeground",{dark:ae.white,light:ae.white,hcDark:null,hcLight:null},v("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Db=q("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),iet=q("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ret=q("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),aet=q("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),oet=q("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),set=q("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},v("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tCe=q("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:ae.white.transparent(.1),hcLight:ae.fromHex("#0F4A85").transparent(.1)},v("listHoverBackground","List/Tree background when hovering over items using the mouse.")),uCe=q("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),cet=q("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},v("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),gl=q("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:js,hcLight:js},v("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Q7=q("list.focusHighlightForeground",{dark:gl,light:Het(Hh,gl,"#BBE7FF"),hcDark:gl,hcLight:gl},v("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));q("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},v("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));q("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},v("listErrorForeground","Foreground color of list items containing errors."));q("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},v("listWarningForeground","Foreground color of list items containing warnings."));const det=q("listFilterWidget.background",{light:Bp(ti,0),dark:Vc(ti,0),hcDark:ti,hcLight:ti},v("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),het=q("listFilterWidget.outline",{dark:ae.transparent,light:ae.transparent,hcDark:"#f38518",hcLight:"#007ACC"},v("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Eet=q("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:eu,hcLight:eu},v("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),met=q("listFilterWidget.shadow",{dark:t1,light:t1,hcDark:t1,hcLight:t1},v("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));q("list.filterMatchBackground",{dark:a1,light:a1,hcDark:null,hcLight:null},v("listFilterMatchHighlight","Background color of the filtered match."));q("list.filterMatchBorder",{dark:LE,light:LE,hcDark:eu,hcLight:En},v("listFilterMatchHighlightBorder","Border color of the filtered match."));const xb=q("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},v("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),get=q("tree.inactiveIndentGuidesStroke",{dark:tt(xb,.4),light:tt(xb,.4),hcDark:tt(xb,.4),hcLight:tt(xb,.4)},v("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),fet=q("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},v("tableColumnsBorder","Table border color between columns.")),pet=q("tree.tableOddRowsBackground",{dark:tt(Ae,.04),light:tt(Ae,.04),hcDark:null,hcLight:null},v("tableOddRowsBackgroundColor","Background color for odd table rows."));q("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},v("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));const Det=q("checkbox.background",{dark:u1,light:u1,hcDark:u1,hcLight:u1},v("checkbox.background","Background color of checkbox widget."));q("checkbox.selectBackground",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));const xet=q("checkbox.foreground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},v("checkbox.foreground","Foreground color of checkbox widget.")),vet=q("checkbox.border",{dark:h5,light:h5,hcDark:h5,hcLight:h5},v("checkbox.border","Border color of checkbox widget."));q("checkbox.selectBorder",{dark:BE,light:BE,hcDark:BE,hcLight:BE},v("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));const goe=q("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,v("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Of=q("quickInputList.focusForeground",{dark:o1,light:o1,hcDark:o1,hcLight:o1},v("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),E5=q("quickInputList.focusIconForeground",{dark:Db,light:Db,hcDark:Db,hcLight:Db},v("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),jf=q("quickInputList.focusBackground",{dark:yk(goe,Hh),light:yk(goe,Hh),hcDark:null,hcLight:null},v("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Cet=q("menu.border",{dark:null,light:null,hcDark:eu,hcLight:eu},v("menuBorder","Border color of menus.")),bet=q("menu.foreground",{dark:Ih,light:Ih,hcDark:Ih,hcLight:Ih},v("menuForeground","Foreground color of menu items.")),ket=q("menu.background",{dark:u1,light:u1,hcDark:u1,hcLight:u1},v("menuBackground","Background color of menu items.")),Fet=q("menu.selectionForeground",{dark:o1,light:o1,hcDark:o1,hcLight:o1},v("menuSelectionForeground","Foreground color of the selected menu item in menus.")),yet=q("menu.selectionBackground",{dark:Hh,light:Hh,hcDark:Hh,hcLight:Hh},v("menuSelectionBackground","Background color of the selected menu item in menus.")),Aet=q("menu.selectionBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("menuSelectionBorder","Border color of the selected menu item in menus.")),_et=q("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:eu,hcLight:eu},v("menuSeparatorBackground","Color of a separator menu item in menus.")),NW=q("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},v("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));q("toolbar.hoverOutline",{dark:null,light:null,hcDark:En,hcLight:En},v("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));q("toolbar.activeBackground",{dark:Vc(NW,.1),light:Bp(NW,.1),hcDark:null,hcLight:null},v("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));q("editor.snippetTabstopHighlightBackground",{dark:new ae(new nu(124,124,124,.3)),light:new ae(new nu(10,50,100,.2)),hcDark:new ae(new nu(124,124,124,.3)),hcLight:new ae(new nu(10,50,100,.2))},v("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));q("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},v("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));q("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));q("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new ae(new nu(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},v("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));const Bet=q("breadcrumb.foreground",{light:tt(Ae,.8),dark:tt(Ae,.8),hcDark:tt(Ae,.8),hcLight:tt(Ae,.8)},v("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),wet=q("breadcrumb.background",{light:rr,dark:rr,hcDark:rr,hcLight:rr},v("breadcrumbsBackground","Background color of breadcrumb items.")),foe=q("breadcrumb.focusForeground",{light:Bp(Ae,.2),dark:Vc(Ae,.1),hcDark:Vc(Ae,.1),hcLight:Vc(Ae,.1)},v("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),Let=q("breadcrumb.activeSelectionForeground",{light:Bp(Ae,.2),dark:Vc(Ae,.1),hcDark:Vc(Ae,.1),hcLight:Vc(Ae,.1)},v("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));q("breadcrumbPicker.background",{light:ti,dark:ti,hcDark:ti,hcLight:ti},v("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));const nCe=.5,poe=ae.fromHex("#40C8AE").transparent(nCe),Doe=ae.fromHex("#40A6FF").transparent(nCe),xoe=ae.fromHex("#606060").transparent(.4),fl=.4,uv=1,m5=q("merge.currentHeaderBackground",{dark:poe,light:poe,hcDark:null,hcLight:null},v("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.currentContentBackground",{dark:tt(m5,fl),light:tt(m5,fl),hcDark:tt(m5,fl),hcLight:tt(m5,fl)},v("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const g5=q("merge.incomingHeaderBackground",{dark:Doe,light:Doe,hcDark:null,hcLight:null},v("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.incomingContentBackground",{dark:tt(g5,fl),light:tt(g5,fl),hcDark:tt(g5,fl),hcLight:tt(g5,fl)},v("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const f5=q("merge.commonHeaderBackground",{dark:xoe,light:xoe,hcDark:null,hcLight:null},v("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);q("merge.commonContentBackground",{dark:tt(f5,fl),light:tt(f5,fl),hcDark:tt(f5,fl),hcLight:tt(f5,fl)},v("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const nv=q("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},v("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));q("editorOverviewRuler.currentContentForeground",{dark:tt(m5,uv),light:tt(m5,uv),hcDark:nv,hcLight:nv},v("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));q("editorOverviewRuler.incomingContentForeground",{dark:tt(g5,uv),light:tt(g5,uv),hcDark:nv,hcLight:nv},v("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));q("editorOverviewRuler.commonContentForeground",{dark:tt(f5,uv),light:tt(f5,uv),hcDark:nv,hcLight:nv},v("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));const vX=q("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},v("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),vb=q("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),p5=q("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},v("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),cP=q("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},v("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),voe=q("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},v("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),zet=q("minimap.infoHighlight",{dark:Mo,light:Mo,hcDark:Fk,hcLight:Fk},v("minimapInfo","Minimap marker color for infos.")),Met=q("minimap.warningHighlight",{dark:Hs,light:Hs,hcDark:kk,hcLight:kk},v("overviewRuleWarning","Minimap marker color for warnings.")),Tet=q("minimap.errorHighlight",{dark:new ae(new nu(255,18,18,.7)),light:new ae(new nu(255,18,18,.7)),hcDark:new ae(new nu(255,50,50,1)),hcLight:"#B5200D"},v("minimapError","Minimap marker color for errors.")),Net=q("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},v("minimapBackground","Minimap background color.")),Pet=q("minimap.foregroundOpacity",{dark:ae.fromHex("#000f"),light:ae.fromHex("#000f"),hcDark:ae.fromHex("#000f"),hcLight:ae.fromHex("#000f")},v("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));q("minimapSlider.background",{light:tt(gb,.5),dark:tt(gb,.5),hcDark:tt(gb,.5),hcLight:tt(gb,.5)},v("minimapSliderBackground","Minimap slider background color."));q("minimapSlider.hoverBackground",{light:tt(fb,.5),dark:tt(fb,.5),hcDark:tt(fb,.5),hcLight:tt(fb,.5)},v("minimapSliderHoverBackground","Minimap slider background color when hovering."));q("minimapSlider.activeBackground",{light:tt(pb,.5),dark:tt(pb,.5),hcDark:tt(pb,.5),hcLight:tt(pb,.5)},v("minimapSliderActiveBackground","Minimap slider background color when clicked on."));const Ret=q("problemsErrorIcon.foreground",{dark:n1,light:n1,hcDark:n1,hcLight:n1},v("problemsErrorIconForeground","The color used for the problems error icon.")),Iet=q("problemsWarningIcon.foreground",{dark:Hs,light:Hs,hcDark:Hs,hcLight:Hs},v("problemsWarningIconForeground","The color used for the problems warning icon.")),Oet=q("problemsInfoIcon.foreground",{dark:Mo,light:Mo,hcDark:Mo,hcLight:Mo},v("problemsInfoIconForeground","The color used for the problems info icon."));q("charts.foreground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("chartsForeground","The foreground color used in charts."));q("charts.lines",{dark:tt(Ae,.5),light:tt(Ae,.5),hcDark:tt(Ae,.5),hcLight:tt(Ae,.5)},v("chartsLines","The color used for horizontal lines in charts."));q("charts.red",{dark:n1,light:n1,hcDark:n1,hcLight:n1},v("chartsRed","The red color used in chart visualizations."));q("charts.blue",{dark:Mo,light:Mo,hcDark:Mo,hcLight:Mo},v("chartsBlue","The blue color used in chart visualizations."));q("charts.yellow",{dark:Hs,light:Hs,hcDark:Hs,hcLight:Hs},v("chartsYellow","The yellow color used in chart visualizations."));q("charts.orange",{dark:p5,light:p5,hcDark:p5,hcLight:p5},v("chartsOrange","The orange color used in chart visualizations."));q("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},v("chartsGreen","The green color used in chart visualizations."));q("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("chartsPurple","The purple color used in chart visualizations."));function jet(u,e){var t,n,i,r;switch(u.op){case 0:return(t=rc(u.value,e))===null||t===void 0?void 0:t.darken(u.factor);case 1:return(n=rc(u.value,e))===null||n===void 0?void 0:n.lighten(u.factor);case 2:return(i=rc(u.value,e))===null||i===void 0?void 0:i.transparent(u.factor);case 3:{const a=rc(u.background,e);return a?(r=rc(u.value,e))===null||r===void 0?void 0:r.makeOpaque(a):rc(u.value,e)}case 4:for(const a of u.values){const o=rc(a,e);if(o)return o}return;case 6:return rc(e.defines(u.if)?u.then:u.else,e);case 5:{const a=rc(u.value,e);if(!a)return;const o=rc(u.background,e);return o?a.isDarkerThan(o)?ae.getLighterColor(a,o,u.factor).transparent(u.transparency):ae.getDarkerColor(a,o,u.factor).transparent(u.transparency):a.transparent(u.factor*u.transparency)}default:throw UN()}}function Bp(u,e){return{op:0,value:u,factor:e}}function Vc(u,e){return{op:1,value:u,factor:e}}function tt(u,e){return{op:2,value:u,factor:e}}function yk(...u){return{op:4,values:u}}function Het(u,e,t){return{op:6,if:u,then:e,else:t}}function Coe(u,e,t,n){return{op:5,value:u,background:e,factor:t,transparency:n}}function rc(u,e){if(u!==null){if(typeof u=="string")return u[0]==="#"?ae.fromHex(u):e.getColor(u);if(u instanceof ae)return u;if(typeof u=="object")return jet(u,e)}}const iCe="vscode://schemas/workbench-colors",rCe=jn.as(iP.JSONContribution);rCe.registerSchema(iCe,lP.getColorSchema());const boe=new Hu(()=>rCe.notifySchemaChanged(iCe),200);lP.onDidChangeSchema(()=>{boe.isScheduled()||boe.schedule()});class dP{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new aCe(this.x-window.scrollX,this.y-window.scrollY)}}class aCe{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new dP(this.clientX+window.scrollX,this.clientY+window.scrollY)}}class Vet{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i,this._editorPagePositionBrand=void 0}}class $et{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function CX(u){const e=ji(u);return new Vet(e.left,e.top,e.width,e.height)}function bX(u,e,t){const n=e.width/u.offsetWidth,i=e.height/u.offsetHeight,r=(t.x-e.x)/n,a=(t.y-e.y)/i;return new $et(r,a)}class Hm extends x0{constructor(e,t,n){super(e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new dP(this.posx,this.posy),this.editorPos=CX(n),this.relativePos=bX(n,this.editorPos,this.pos)}}class Ket{constructor(e){this._editorViewDomNode=e}_create(e){return new Hm(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return ce(e,"contextmenu",n=>{t(this._create(n))})}onMouseUp(e,t){return ce(e,"mouseup",n=>{t(this._create(n))})}onMouseDown(e,t){return ce(e,Me.MOUSE_DOWN,n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Me.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onMouseLeave(e,t){return ce(e,Me.MOUSE_LEAVE,n=>{t(this._create(n))})}onMouseMove(e,t){return ce(e,"mousemove",n=>t(this._create(n)))}}class Wet{constructor(e){this._editorViewDomNode=e}_create(e){return new Hm(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return ce(e,"pointerup",n=>{t(this._create(n))})}onPointerDown(e,t){return ce(e,Me.POINTER_DOWN,n=>{t(this._create(n),n.pointerId)})}onPointerLeave(e,t){return ce(e,Me.POINTER_LEAVE,n=>{t(this._create(n))})}onPointerMove(e,t){return ce(e,"pointermove",n=>t(this._create(n)))}}class Get extends ne{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new m6),this._keydownListener=null}startMonitoring(e,t,n,i,r){this._keydownListener=xi(e.ownerDocument,"keydown",a=>{a.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,n,a=>{i(new Hm(a,!0,this._editorViewDomNode))},a=>{this._keydownListener.dispose(),r(a)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class cA{constructor(e){this._editor=e,this._instanceId=++cA._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Hu(()=>this.garbageCollect(),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let n=this._rules.get(t);if(!n){const i=this._counter++;n=new Uet(t,`dyn-rule-${this._instanceId}-${i}`,bB(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,n)}return n}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}cA._idPool=0;class Uet{constructor(e,t,n,i){this.key=e,this.className=t,this.properties=i,this._referenceCount=0,this._styleElement=P0(n),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let n=`.${e} {`;for(const i in t){const r=t[i];let a;typeof r=="object"?a=Re(r.id):a=r;const o=qet(i);n+=` ${o}: ${a};`}return n+=` -}`,n}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function qet(u){return u.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class dA extends ne{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,i=e.length;n=o.left?i.width=Math.max(i.width,o.left+o.width-i.left):(t[n++]=i,i=o)}return t[n++]=i,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;const i=[];for(let r=0,a=e.length;rs)return null;if(t=Math.min(s,Math.max(0,t)),i=Math.min(s,Math.max(0,i)),t===i&&n===r&&n===0&&!e.children[t].firstChild){const h=e.children[t].getClientRects();return a.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,a.clientRectDeltaLeft,a.clientRectScale)}t!==i&&i>0&&r===0&&(i--,r=1073741824);let l=e.children[t].firstChild,c=e.children[i].firstChild;if((!l||!c)&&(!l&&n===0&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!c&&r===0&&i>0&&(c=e.children[i-1].firstChild,r=1073741824)),!l||!c)return null;n=Math.min(l.textContent.length,Math.max(0,n)),r=Math.min(c.textContent.length,Math.max(0,r));const d=this._readClientRects(l,n,c,r,a.endNode);return a.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,a.clientRectDeltaLeft,a.clientRectScale)}}var x0;(function(u){u.DARK="dark",u.LIGHT="light",u.HIGH_CONTRAST_DARK="hcDark",u.HIGH_CONTRAST_LIGHT="hcLight"})(x0||(x0={}));function $c(u){return u===x0.HIGH_CONTRAST_DARK||u===x0.HIGH_CONTRAST_LIGHT}function iv(u){return u===x0.DARK||u===x0.HIGH_CONTRAST_DARK}const Xet=function(){return Oc?!0:!(Pa||M0||l4)}();let sx=!0;class Foe{constructor(e,t){this.themeType=t;const n=e.options,i=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(98):this.renderWhitespace="none",this.renderControlCharacters=n.get(93),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(66),this.stopRenderingLineAfter=n.get(116),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class Wd{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=ku(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return $c(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,i){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const r=n.getViewLineRenderingData(e),a=this._options,o=as.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn);let s=null;if($c(a.themeType)||this._options.renderWhitespace==="selection"){const h=n.selections;for(const E of h){if(E.endLineNumbere)continue;const m=E.startLineNumber===e?E.startColumn:r.minColumn,g=E.endLineNumber===e?E.endColumn:r.maxColumn;m');const c=sA(l,i);i.appendString("");let d=null;return sx&&Xet&&r.isBasicASCII&&a.useMonospaceOptimizations&&c.containsForeignElements===0&&(d=new X7(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=sCe(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof X7:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof X7?this._renderedViewLine.monospaceAssumptionsAreValid():sx}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof X7&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,i){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const r=this._renderedViewLine.input.stopRenderingLineAfter;if(r!==-1&&t>r+1&&n>r+1)return new koe(!0,[new i3(this.getWidth(i),0)]);r!==-1&&t>r+1&&(t=r+1),r!==-1&&n>r+1&&(n=r+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,t,n,i);return a&&a.length>0?new koe(!1,a):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}Wd.CLASS_NAME="view-line";class X7{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;const i=Math.floor(t.lineContent.length/300);if(i>0){this._keyColumnPixelOffsetCache=new Float32Array(i);for(let r=0;r=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),sx=!1)}return sx}toSlowRenderedLine(){return sCe(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,i){const r=this._getColumnPixelOffset(e,t,i),a=this._getColumnPixelOffset(e,n,i);return[new i3(r,a-r)]}_getColumnPixelOffset(e,t,n){if(t<=300){const l=this._characterMapping.getHorizontalOffset(t);return this._charWidth*l}const i=Math.floor((t-1)/300)-1,r=(i+1)*300+1;let a=-1;if(this._keyColumnPixelOffsetCache&&(a=this._keyColumnPixelOffsetCache[i],a===-1&&(a=this._actualReadPixelOffset(e,r,n),this._keyColumnPixelOffsetCache[i]=a)),a===-1){const l=this._characterMapping.getHorizontalOffset(t);return this._charWidth*l}const o=this._characterMapping.getHorizontalOffset(r),s=this._characterMapping.getHorizontalOffset(t);return a+this._charWidth*(s-o)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;const i=this._characterMapping.getDomPosition(t),r=JS.readHorizontalRanges(this._getReadingTarget(this.domNode),i.partIndex,i.charIndex,i.partIndex,i.charIndex,n);return!r||r.length===0?-1:r[0].left}getColumnOfNodeOffset(e,t){return kX(this._characterMapping,e,t)}}class oCe{constructor(e,t,n,i,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let a=0,o=this._characterMapping.length;a<=o;a++)this._pixelOffsetCache[a]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,i){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const r=this._readPixelOffset(this.domNode,e,t,i);if(r===-1)return null;const a=this._readPixelOffset(this.domNode,e,n,i);return a===-1?null:[new i3(r,a-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,i)}_readVisibleRangesForRange(e,t,n,i,r){if(n===i){const a=this._readPixelOffset(e,t,n,r);return a===-1?null:[new i3(a,0)]}else return this._readRawVisibleRangesForRange(e,n,i,r)}_readPixelOffset(e,t,n,i){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(i);const r=this._getReadingTarget(e);return r.firstChild?(i.markDidDomLayout(),r.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const r=this._pixelOffsetCache[n];if(r!==-1)return r;const a=this._actualReadPixelOffset(e,t,n,i);return this._pixelOffsetCache[n]=a,a}return this._actualReadPixelOffset(e,t,n,i)}_actualReadPixelOffset(e,t,n,i){if(this._characterMapping.length===0){const s=JS.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i);return!s||s.length===0?-1:s[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(i);const r=this._characterMapping.getDomPosition(n),a=JS.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,i);if(!a||a.length===0)return-1;const o=a[0].left;if(this.input.isBasicASCII){const s=this._characterMapping.getHorizontalOffset(n),l=Math.round(this.input.spaceWidth*s);if(Math.abs(l-o)<=1)return l}return o}_readRawVisibleRangesForRange(e,t,n,i){if(t===1&&n===this._characterMapping.length)return[new i3(0,this.getWidth(i))];const r=this._characterMapping.getDomPosition(t),a=this._characterMapping.getDomPosition(n);return JS.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,a.partIndex,a.charIndex,i)}getColumnOfNodeOffset(e,t){return kX(this._characterMapping,e,t)}}class ett extends oCe{_readVisibleRangesForRange(e,t,n,i,r){const a=super._readVisibleRangesForRange(e,t,n,i,r);if(!a||a.length===0||n===i||n===1&&i===this._characterMapping.length)return a;if(!this.input.containsRTL){const o=this._readPixelOffset(e,t,i,r);if(o!==-1){const s=a[a.length-1];s.left=t){const d=t-a;return l-t=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class rv{constructor(e,t,n){this.viewModel=e.viewModel;const i=e.configuration.options;this.layoutInfo=i.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(66),this.stickyTabStops=i.get(115),this.typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return rv.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){const i=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount();let a=null,o,s=null;return n.afterLineNumber!==r&&(s=new ee(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(a=new ee(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),s===null?o=a:a===null?o=s:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Kr._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class FX extends itt{constructor(e,t,n,i,r){super(e,t,n,i),this._ctx=e,r?(this.target=r,this.targetPath=_1.collect(r,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columna.contentLeft+a.width)continue;const o=e.getVerticalOffsetForLineNumber(a.position.lineNumber);if(o<=r&&r<=o+a.height)return t.fulfillContentText(a.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const i=t.isInContentArea?8:5;return t.fulfillViewZone(i,n.position,n)}return null}static _hitTestTextArea(e,t){return Fs.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition();let r=Math.abs(t.relativePos.x);const a={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,i,n.range,a):(r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,i,n.range,a):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,i,n.range,a)))}return null}static _hitTestViewLines(e,t,n){if(!Fs.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ee(1,1),yoe);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const r=e.viewModel.getLineCount(),a=e.viewModel.getLineMaxColumn(r);return t.fulfillContentEmpty(new ee(r,a),yoe)}if(n){if(Fs.isStrictChildOfViewLines(t.targetPath)){const r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){const o=e.getLineWidth(r),s=Aj(t.mouseContentHorizontalOffset-o);return t.fulfillContentEmpty(new ee(r,1),s)}const a=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>=a){const o=Aj(t.mouseContentHorizontalOffset-a),s=new ee(r,e.viewModel.getLineMaxColumn(r));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const i=Kr._doHitTest(e,t);return i.type===1?Kr.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}static _hitTestMinimap(e,t){if(Fs.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ee(n,i))}return null}static _hitTestScrollbarSlider(e,t){if(Fs.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ee(i,r))}}return null}static _hitTestScrollbar(e,t){if(Fs.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ee(n,i))}return null}getMouseColumn(e){const t=this._context.configuration.options,n=t.get(143),i=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return Kr._getMouseColumn(i,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,i,r){const a=i.lineNumber,o=i.column,s=e.getLineWidth(a);if(t.mouseContentHorizontalOffset>s){const p=Aj(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(i,p)}const l=e.visibleRangeForPosition(a,o);if(!l)return t.fulfillUnknown(i);const c=l.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(i,null,{mightBeForeignElement:!!r,injectedText:r});const d=[];if(d.push({offset:l.left,column:o}),o>1){const p=e.visibleRangeForPosition(a,o-1);p&&d.push({offset:p.left,column:o-1})}const h=e.viewModel.getLineMaxColumn(a);if(op.offset-D.offset);const E=t.pos.toClientCoordinates(),m=n.getBoundingClientRect(),g=m.left<=E.clientX&&E.clientX<=m.right;let f=null;for(let p=1;pr)){const o=Math.floor((i+r)/2);let s=t.pos.y+(o-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const l=new dP(t.pos.x,s),c=this._actualDoHitTestWithCaretRangeFromPoint(e,l.toClientCoordinates());if(c.type===1)return c}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=w3(e.viewDomNode);let i;if(n?typeof n.caretRangeFromPoint>"u"?i=rtt(n,t.clientX,t.clientY):i=n.caretRangeFromPoint(t.clientX,t.clientY):i=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!i||!i.startContainer)return new eE;const r=i.startContainer;if(r.nodeType===r.TEXT_NODE){const a=r.parentNode,o=a?a.parentNode:null,s=o?o.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,a,i.startOffset):new eE(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){const a=r.parentNode,o=a?a.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,r,r.textContent.length):new eE(r)}return new eE}static _doHitTestWithCaretPositionFromPoint(e,t){const n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const i=n.offsetNode.parentNode,r=i?i.parentNode:null,a=r?r.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new eE(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const i=n.offsetNode.parentNode,r=i&&i.nodeType===i.ELEMENT_NODE?i.className:null,a=i?i.parentNode:null,o=a&&a.nodeType===a.ELEMENT_NODE?a.className:null;if(r===Wd.CLASS_NAME){const s=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(s)return Ff.createFromDOMInfo(e,s,0)}else if(o===Wd.CLASS_NAME)return Ff.createFromDOMInfo(e,n.offsetNode,0)}return new eE(n.offsetNode)}static _snapToSoftTabBoundary(e,t){const n=t.getLineContent(e.lineNumber),{tabSize:i}=t.model.getOptions(),r=Ak.atomicPosition(n,e.column-1,i,2);return r!==-1?new ee(e.lineNumber,r+1):e}static _doHitTest(e,t){let n=new eE;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),n.type===1){const i=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(i||!r.equals(n.position))&&(n=new lCe(r,n.spanNode,i))}return n}}function rtt(u,e,t){const n=document.createRange();let i=u.elementFromPoint(e,t);if(i!==null){for(;i&&i.firstChild&&i.firstChild.nodeType!==i.firstChild.TEXT_NODE&&i.lastChild&&i.lastChild.firstChild;)i=i.lastChild;const r=i.getBoundingClientRect(),a=window.getComputedStyle(i,null).getPropertyValue("font-style"),o=window.getComputedStyle(i,null).getPropertyValue("font-variant"),s=window.getComputedStyle(i,null).getPropertyValue("font-weight"),l=window.getComputedStyle(i,null).getPropertyValue("font-size"),c=window.getComputedStyle(i,null).getPropertyValue("line-height"),d=window.getComputedStyle(i,null).getPropertyValue("font-family"),h=`${a} ${o} ${s} ${l}/${c} ${d}`,E=i.innerText;let m=r.left,g=0,f;if(e>r.left+r.width)g=E.length;else{const p=Hf.getInstance();for(let D=0;Dt(new D0(n))))}onmousedown(e,t){this._register(ce(e,Me.MOUSE_DOWN,n=>t(new D0(n))))}onmouseover(e,t){this._register(ce(e,Me.MOUSE_OVER,n=>t(new D0(n))))}onmouseleave(e,t){this._register(ce(e,Me.MOUSE_LEAVE,n=>t(new D0(n))))}onkeydown(e,t){this._register(ce(e,Me.KEY_DOWN,n=>t(new ln(n))))}onkeyup(e,t){this._register(ce(e,Me.KEY_UP,n=>t(new ln(n))))}oninput(e,t){this._register(ce(e,Me.INPUT,t))}onblur(e,t){this._register(ce(e,Me.BLUR,t))}onfocus(e,t){this._register(ce(e,Me.FOCUS,t))}ignoreGesture(e){return Zu.ignoreTarget(e)}};const av=11;class att extends $l{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...st.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=av+"px",this.domNode.style.height=av+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new m6),this._register(xi(this.bgDomNode,Me.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(xi(this.domNode,Me.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new rA),this._pointerdownScheduleRepeatTimer=this._register(new Vl)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class ott extends ne{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Vl)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const stt=140;class cCe extends $l{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new ott(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new m6),this._shouldRender=!0,this.domNode=ku(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(ce(this.domNode.domNode,Me.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new att(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,i){this.slider=ku(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof i=="number"&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(ce(this.slider.domNode,Me.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);n<=r&&r<=i?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{const r=ji(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}const i=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(i):this._scrollbarState.getDesiredScrollPositionFromOffset(i)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),i=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{const a=this._sliderOrthogonalPointerPosition(r),o=Math.abs(a-n);if(na&&o>stt){this._setDesiredScrollPositionNow(i.getScrollPosition());return}const l=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(i.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const ltt=20;class ov{constructor(e,t,n,i,r,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=r,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new ov(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,i,r){const a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=i>0&&i>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(ltt,Math.floor(n*o/i))),c=(o-l)/(i-n),d=r*c;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=ov._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let n=this._scrollPosition;return tthis._host.onMouseWheel(new B3(null,1,0))}),this._createArrow({className:"scra",icon:we.scrollbarButtonRight,top:o,left:void 0,bottom:void 0,right:a,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new B3(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class dtt extends cCe{constructor(e,t,n){const i=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new ov(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,i.height,i.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const a=(t.arrowSize-av)/2,o=(t.verticalScrollbarSize-av)/2;this._createArrow({className:"scra",icon:we.scrollbarButtonUp,top:a,left:o,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new B3(null,0,1))}),this._createArrow({className:"scra",icon:we.scrollbarButtonDown,top:void 0,left:o,bottom:a,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new B3(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class NB{constructor(e,t,n,i,r,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,i=i|0,r=r|0,a=a|0,o=o|0),this.rawScrollLeft=i,this.rawScrollTop=o,t<0&&(t=0),i+t>n&&(i=n-t),i<0&&(i=0),r<0&&(r=0),o+r>a&&(o=a-r),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=i,this.height=r,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new NB(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new NB(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const n=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:r,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}}class hA extends ne{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new NB(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;const i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(n=this._smoothScrolling)===null||n===void 0||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let i;t?i=new _k(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const n=this._state.withScrollPosition(e);this._smoothScrolling=_k.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}}class Aoe{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function _j(u,e){const t=e-u;return function(n){return u+t*mtt(n)}}function htt(u,e,t){return function(n){return n2.5*n){let r,a;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}PB.INSTANCE=new PB;class yX extends $l{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Q),e.style.overflow="hidden",this._options=ptt(t),this._scrollable=n,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));const i={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new dtt(this._scrollable,this._options,i)),this._horizontalScrollbar=this._register(new ctt(this._scrollable,this._options,i)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=ku(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ku(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ku(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Vl),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Su(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,iu&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new B3(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Su(this._mouseWheelToDispose),e)){const n=i=>{this._onMouseWheel(new B3(i))};this._mouseWheelToDispose.push(ce(this._listenOnDomNode,Me.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;const n=PB.INSTANCE;n.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let a=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+a===0?o=a=0:Math.abs(a)>=Math.abs(o)?o=0:a=0),this._options.flipAxes&&([a,o]=[o,a]);const s=!iu&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||s)&&!o&&(o=a,a=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,a=a*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(a){const d=_oe*a,h=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,h)}if(o){const d=_oe*o,h=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let r=i;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,i=n?" left":"",r=t?" top":"",a=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${i}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${r}${i}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),gtt)}}class dCe extends yX{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new hA({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:i=>T0(i)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class AX extends yX{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class EA extends yX{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new hA({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:i=>T0(i)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(i=>{i.scrollTopChanged&&(this._element.scrollTop=i.scrollTop),i.scrollLeftChanged&&(this._element.scrollLeft=i.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function ptt(u){const e={lazyRender:typeof u.lazyRender<"u"?u.lazyRender:!1,className:typeof u.className<"u"?u.className:"",useShadows:typeof u.useShadows<"u"?u.useShadows:!0,handleMouseWheel:typeof u.handleMouseWheel<"u"?u.handleMouseWheel:!0,flipAxes:typeof u.flipAxes<"u"?u.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof u.consumeMouseWheelIfScrollbarIsNeeded<"u"?u.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof u.alwaysConsumeMouseWheel<"u"?u.alwaysConsumeMouseWheel:!1,scrollYToX:typeof u.scrollYToX<"u"?u.scrollYToX:!1,mouseWheelScrollSensitivity:typeof u.mouseWheelScrollSensitivity<"u"?u.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof u.fastScrollSensitivity<"u"?u.fastScrollSensitivity:5,scrollPredominantAxis:typeof u.scrollPredominantAxis<"u"?u.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof u.mouseWheelSmoothScroll<"u"?u.mouseWheelSmoothScroll:!0,arrowSize:typeof u.arrowSize<"u"?u.arrowSize:11,listenOnDomNode:typeof u.listenOnDomNode<"u"?u.listenOnDomNode:null,horizontal:typeof u.horizontal<"u"?u.horizontal:1,horizontalScrollbarSize:typeof u.horizontalScrollbarSize<"u"?u.horizontalScrollbarSize:10,horizontalSliderSize:typeof u.horizontalSliderSize<"u"?u.horizontalSliderSize:0,horizontalHasArrows:typeof u.horizontalHasArrows<"u"?u.horizontalHasArrows:!1,vertical:typeof u.vertical<"u"?u.vertical:1,verticalScrollbarSize:typeof u.verticalScrollbarSize<"u"?u.verticalScrollbarSize:10,verticalHasArrows:typeof u.verticalHasArrows<"u"?u.verticalHasArrows:!1,verticalSliderSize:typeof u.verticalSliderSize<"u"?u.verticalSliderSize:0,scrollByPage:typeof u.scrollByPage<"u"?u.scrollByPage:!1};return e.horizontalSliderSize=typeof u.horizontalSliderSize<"u"?u.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof u.verticalSliderSize<"u"?u.verticalSliderSize:e.verticalScrollbarSize,iu&&(e.className+=" mac"),e}class _X extends dA{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new Kr(this._context,n),this._mouseDownOperation=this._register(new Dtt(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(a,o)=>this._createMouseTarget(a,o),a=>this._getMouseColumn(a))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const i=new Ket(this.viewHelper.viewDomNode);this._register(i.onContextMenu(this.viewHelper.viewDomNode,a=>this._onContextMenu(a,!0))),this._register(i.onMouseMove(this.viewHelper.viewDomNode,a=>{this._onMouseMove(a),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=ce(this.viewHelper.viewDomNode.ownerDocument,"mousemove",o=>{this.viewHelper.viewDomNode.contains(o.target)||this._onMouseLeave(new Hm(o,!1,this.viewHelper.viewDomNode))}))})),this._register(i.onMouseUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(i.onMouseLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a)));let r=0;this._register(i.onPointerDown(this.viewHelper.viewDomNode,(a,o)=>{r=o})),this._register(ce(this.viewHelper.viewDomNode,Me.POINTER_UP,a=>{this._mouseDownOperation.onPointerUp()})),this._register(i.onMouseDown(this.viewHelper.viewDomNode,a=>this._onMouseDown(a,r))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=PB.INSTANCE;let t=0,n=g0.getZoomLevel(),i=!1,r=0;const a=s=>{if(this.viewController.emitMouseWheel(s),!this._context.configuration.options.get(75))return;const l=new B3(s);if(e.acceptStandardWheelEvent(l),e.isPhysicalMouseWheel()){if(o(s)){const c=g0.getZoomLevel(),d=l.deltaY>0?1:-1;g0.setZoomLevel(c+d),l.preventDefault(),l.stopPropagation()}}else Date.now()-t>50&&(n=g0.getZoomLevel(),i=o(s),r=0),t=Date.now(),r+=l.deltaY,i&&(g0.setZoomLevel(n+r/5),l.preventDefault(),l.stopPropagation())};this._register(ce(this.viewHelper.viewDomNode,Me.MOUSE_WHEEL,a,{capture:!0,passive:!1}));function o(s){return iu?(s.metaKey||s.ctrlKey)&&!s.shiftKey&&!s.altKey:s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new aCe(e,t).toPageCoordinates(),r=CX(this.viewHelper.viewDomNode);if(i.yr.y+r.height||i.xr.x+r.width)return null;const a=bX(this.viewHelper.viewDomNode,r,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,i,a,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const i=w3(this.viewHelper.viewDomNode);i&&(n=i.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||a&&o))d(),this._mouseDownOperation.start(n.type,e,t);else if(r)e.preventDefault();else if(s){const h=n.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(d(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}}class Dtt extends ne{constructor(e,t,n,i,r,a){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=i,this._createMouseTarget=r,this._getMouseColumn=a,this._mouseMoveMonitor=this._register(new Get(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new xtt(this._context,this._viewHelper,this._mouseTargetFactory,(o,s,l)=>this._dispatchMouse(o,s,l))),this._mouseState=new EP,this._currentSelection=new Ye(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const r=this._context.configuration.options;if(!r.get(90)&&r.get(35)&&!r.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&i.type===6&&i.position&&this._currentSelection.containsPosition(i.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,a=>this._onMouseDownThenMove(a),a=>{const o=this._findMousePosition(this._lastMouseEvent,!1);a&&a instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:o?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,a=>this._onMouseDownThenMove(a),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.viewModel,i=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,s=i.getCurrentScrollTop()+e.relativePos.y,l=rv.getZoneAtCoord(this._context,s);if(l){const d=this._helpPositionJumpOverViewZone(l);if(d)return Sa.createOutsideEditor(r,d,"below",o)}const c=i.getLineNumberAtVerticalOffset(s);return Sa.createOutsideEditor(r,new ee(c,n.getLineMaxColumn(c)),"below",o)}const a=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const o=e.posx-t.x-t.width;return Sa.createOutsideEditor(r,new ee(a,n.getLineMaxColumn(a)),"right",o)}return null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const i=this._createMouseTarget(e,t);if(!i.position)return null;if(i.type===8||i.type===5){const a=this._helpPositionJumpOverViewZone(i.detail);if(a)return Sa.createViewZone(i.type,i.element,i.mouseColumn,a,i.detail)}return i}_helpPositionJumpOverViewZone(e){const t=new ee(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class xtt extends ne{constructor(e,t,n,i){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=i,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new vtt(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class vtt extends ne{constructor(e,t,n,i,r,a){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=i,this._position=r,this._mouseEvent=a,this._lastTime=Date.now(),this._animationFrameDisposable=T0(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),n=this._tick(),i=t*(n/1e3)*e,r=this._position.outsidePosition==="above"?-i:i;this._context.viewModel.viewLayout.deltaScrollNow(0,r),this._viewHelper.renderNow();const a=this._context.viewLayout.getLinesViewportData(),o=this._position.outsidePosition==="above"?a.startLineNumber:a.endLineNumber;let s;{const l=CX(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(143).horizontalScrollbarHeight,d=new dP(this._mouseEvent.pos.x,l.y+l.height-c-.1),h=bX(this._viewHelper.viewDomNode,l,d);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),l,d,h,null)}(!s.position||s.position.lineNumber!==o)&&(this._position.outsidePosition==="above"?s=Sa.createOutsideEditor(this._position.mouseColumn,new ee(o,1),"above",this._position.outsideDistance):s=Sa.createOutsideEditor(this._position.mouseColumn,new ee(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=T0(()=>this._execute())}}class EP{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>EP.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}EP.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class Zt{get event(){return this.emitter.event}constructor(e,t,n){const i=r=>this.emitter.fire(r);this.emitter=new Q({onWillAddFirstListener:()=>e.addEventListener(t,i,n),onDidRemoveLastListener:()=>e.removeEventListener(t,i,n)})}dispose(){this.emitter.dispose()}}var zE;(function(u){const e={total:0,min:Number.MAX_VALUE,max:0},t=Object.assign({},e),n=Object.assign({},e),i=Object.assign({},e);let r=0;const a={keydown:0,input:0,render:0};function o(){p(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),a.keydown=1,queueMicrotask(s)}u.onKeyDown=o;function s(){a.keydown===1&&(performance.mark("keydown/end"),a.keydown=2)}function l(){performance.mark("input/start"),a.input=1,f()}u.onBeforeInput=l;function c(){a.input===0&&l(),queueMicrotask(d)}u.onInput=c;function d(){a.input===1&&(performance.mark("input/end"),a.input=2)}function h(){p()}u.onKeyUp=h;function E(){p()}u.onSelectionChange=E;function m(){a.keydown===2&&a.input===2&&a.render===0&&(performance.mark("render/start"),a.render=1,queueMicrotask(g),f())}u.onRenderStart=m;function g(){a.render===1&&(performance.mark("render/end"),a.render=2)}function f(){setTimeout(p)}function p(){a.keydown===2&&a.input===2&&a.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),D("keydown",e),D("input",t),D("render",n),D("inputlatency",i),r++,x())}function D(F,S){const w=performance.getEntriesByName(F)[0].duration;S.total+=w,S.min=Math.min(S.min,w),S.max=Math.max(S.max,w)}function x(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),a.keydown=0,a.input=0,a.render=0}function b(){if(r===0)return;const F={keydown:k(e),input:k(t),render:k(n),total:k(i),sampleCount:r};return A(e),A(t),A(n),A(i),r=0,F}u.getAndClearMeasurements=b;function k(F){return{average:F.total/r,max:F.max,min:F.min}}function A(F){F.total=0,F.min=Number.MAX_VALUE,F.max=0}})(zE||(zE={}));class Fr{constructor(e,t,n,i,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=i,this.newlineCountBeforeSelection=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const n=e.getValue(),i=e.getSelectionStart(),r=e.getSelectionEnd();let a;if(t){const o=n.substring(0,i),s=t.value.substring(0,t.selectionStart);o===s&&(a=t.newlineCountBeforeSelection)}return new Fr(n,i,r,null,a)}collapseSelection(){return this.selectionStart===this.value.length?this:new Fr(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,n,i,r,a,o,s,l;if(e<=this.selectionStart){const h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((n=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&n!==void 0?n:null,h,-1)}if(e>=this.selectionEnd){const h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((r=(i=this.selection)===null||i===void 0?void 0:i.getEndPosition())!==null&&r!==void 0?r:null,h,1)}const c=this.value.substring(this.selectionStart,e);if(c.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition((o=(a=this.selection)===null||a===void 0?void 0:a.getStartPosition())!==null&&o!==void 0?o:null,c,1);const d=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((l=(s=this.selection)===null||s===void 0?void 0:s.getEndPosition())!==null&&l!==void 0?l:null,d,-1)}_finishDeduceEditorPosition(e,t,n){let i=0,r=-1;for(;(r=t.indexOf(` +}`,n}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function qet(u){return u.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class dA extends ne{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let n=0,i=e.length;n=o.left?i.width=Math.max(i.width,o.left+o.width-i.left):(t[n++]=i,i=o)}return t[n++]=i,t}static _createHorizontalRangesFromClientRects(e,t,n){if(!e||e.length===0)return null;const i=[];for(let r=0,a=e.length;rs)return null;if(t=Math.min(s,Math.max(0,t)),i=Math.min(s,Math.max(0,i)),t===i&&n===r&&n===0&&!e.children[t].firstChild){const h=e.children[t].getClientRects();return a.markDidDomLayout(),this._createHorizontalRangesFromClientRects(h,a.clientRectDeltaLeft,a.clientRectScale)}t!==i&&i>0&&r===0&&(i--,r=1073741824);let l=e.children[t].firstChild,c=e.children[i].firstChild;if((!l||!c)&&(!l&&n===0&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!c&&r===0&&i>0&&(c=e.children[i-1].firstChild,r=1073741824)),!l||!c)return null;n=Math.min(l.textContent.length,Math.max(0,n)),r=Math.min(c.textContent.length,Math.max(0,r));const d=this._readClientRects(l,n,c,r,a.endNode);return a.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,a.clientRectDeltaLeft,a.clientRectScale)}}var v0;(function(u){u.DARK="dark",u.LIGHT="light",u.HIGH_CONTRAST_DARK="hcDark",u.HIGH_CONTRAST_LIGHT="hcLight"})(v0||(v0={}));function $c(u){return u===v0.HIGH_CONTRAST_DARK||u===v0.HIGH_CONTRAST_LIGHT}function iv(u){return u===v0.DARK||u===v0.HIGH_CONTRAST_DARK}const Xet=function(){return Oc?!0:!(Pa||T0||l4)}();let sx=!0;class Foe{constructor(e,t){this.themeType=t;const n=e.options,i=n.get(50);n.get(38)==="off"?this.renderWhitespace=n.get(98):this.renderWhitespace="none",this.renderControlCharacters=n.get(93),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(33),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(66),this.stopRenderingLineAfter=n.get(116),this.fontLigatures=n.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class Wd{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(this._renderedViewLine)this._renderedViewLine.domNode=ku(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return $c(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,n,i){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const r=n.getViewLineRenderingData(e),a=this._options,o=os.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn);let s=null;if($c(a.themeType)||this._options.renderWhitespace==="selection"){const h=n.selections;for(const E of h){if(E.endLineNumbere)continue;const m=E.startLineNumber===e?E.startColumn:r.minColumn,g=E.endLineNumber===e?E.endColumn:r.maxColumn;m');const c=sA(l,i);i.appendString("");let d=null;return sx&&Xet&&r.isBasicASCII&&a.useMonospaceOptimizations&&c.containsForeignElements===0&&(d=new X7(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=sCe(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof X7:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof X7?this._renderedViewLine.monospaceAssumptionsAreValid():sx}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof X7&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,n,i){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n));const r=this._renderedViewLine.input.stopRenderingLineAfter;if(r!==-1&&t>r+1&&n>r+1)return new koe(!0,[new i3(this.getWidth(i),0)]);r!==-1&&t>r+1&&(t=r+1),r!==-1&&n>r+1&&(n=r+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,t,n,i);return a&&a.length>0?new koe(!1,a):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}Wd.CLASS_NAME="view-line";class X7{constructor(e,t,n){this._cachedWidth=-1,this.domNode=e,this.input=t;const i=Math.floor(t.lineContent.length/300);if(i>0){this._keyColumnPixelOffsetCache=new Float32Array(i);for(let r=0;r=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),sx=!1)}return sx}toSlowRenderedLine(){return sCe(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,n,i){const r=this._getColumnPixelOffset(e,t,i),a=this._getColumnPixelOffset(e,n,i);return[new i3(r,a-r)]}_getColumnPixelOffset(e,t,n){if(t<=300){const l=this._characterMapping.getHorizontalOffset(t);return this._charWidth*l}const i=Math.floor((t-1)/300)-1,r=(i+1)*300+1;let a=-1;if(this._keyColumnPixelOffsetCache&&(a=this._keyColumnPixelOffsetCache[i],a===-1&&(a=this._actualReadPixelOffset(e,r,n),this._keyColumnPixelOffsetCache[i]=a)),a===-1){const l=this._characterMapping.getHorizontalOffset(t);return this._charWidth*l}const o=this._characterMapping.getHorizontalOffset(r),s=this._characterMapping.getHorizontalOffset(t);return a+this._charWidth*(s-o)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,n){if(!this.domNode)return-1;const i=this._characterMapping.getDomPosition(t),r=JS.readHorizontalRanges(this._getReadingTarget(this.domNode),i.partIndex,i.charIndex,i.partIndex,i.charIndex,n);return!r||r.length===0?-1:r[0].left}getColumnOfNodeOffset(e,t){return kX(this._characterMapping,e,t)}}class oCe{constructor(e,t,n,i,r){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let a=0,o=this._characterMapping.length;a<=o;a++)this._pixelOffsetCache[a]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e==null||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,n,i){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const r=this._readPixelOffset(this.domNode,e,t,i);if(r===-1)return null;const a=this._readPixelOffset(this.domNode,e,n,i);return a===-1?null:[new i3(r,a-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n,i)}_readVisibleRangesForRange(e,t,n,i,r){if(n===i){const a=this._readPixelOffset(e,t,n,r);return a===-1?null:[new i3(a,0)]}else return this._readRawVisibleRangesForRange(e,n,i,r)}_readPixelOffset(e,t,n,i){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(i);const r=this._getReadingTarget(e);return r.firstChild?(i.markDidDomLayout(),r.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const r=this._pixelOffsetCache[n];if(r!==-1)return r;const a=this._actualReadPixelOffset(e,t,n,i);return this._pixelOffsetCache[n]=a,a}return this._actualReadPixelOffset(e,t,n,i)}_actualReadPixelOffset(e,t,n,i){if(this._characterMapping.length===0){const s=JS.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i);return!s||s.length===0?-1:s[0].left}if(n===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(i);const r=this._characterMapping.getDomPosition(n),a=JS.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,i);if(!a||a.length===0)return-1;const o=a[0].left;if(this.input.isBasicASCII){const s=this._characterMapping.getHorizontalOffset(n),l=Math.round(this.input.spaceWidth*s);if(Math.abs(l-o)<=1)return l}return o}_readRawVisibleRangesForRange(e,t,n,i){if(t===1&&n===this._characterMapping.length)return[new i3(0,this.getWidth(i))];const r=this._characterMapping.getDomPosition(t),a=this._characterMapping.getDomPosition(n);return JS.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,a.partIndex,a.charIndex,i)}getColumnOfNodeOffset(e,t){return kX(this._characterMapping,e,t)}}class ett extends oCe{_readVisibleRangesForRange(e,t,n,i,r){const a=super._readVisibleRangesForRange(e,t,n,i,r);if(!a||a.length===0||n===i||n===1&&i===this._characterMapping.length)return a;if(!this.input.containsRTL){const o=this._readPixelOffset(e,t,i,r);if(o!==-1){const s=a[a.length-1];s.left=t){const d=t-a;return l-t=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowGuard(e){return e.length>=1&&e[0]===3}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class rv{constructor(e,t,n){this.viewModel=e.viewModel;const i=e.configuration.options;this.layoutInfo=i.get(143),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(66),this.stickyTabStops=i.get(115),this.typicalHalfwidthCharacterWidth=i.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return rv.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){const i=n.verticalOffset+n.height/2,r=e.viewModel.getLineCount();let a=null,o,s=null;return n.afterLineNumber!==r&&(s=new ee(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(a=new ee(n.afterLineNumber,e.viewModel.getLineMaxColumn(n.afterLineNumber))),s===null?o=a:a===null?o=s:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Kr._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class FX extends itt{constructor(e,t,n,i,r){super(e,t,n,i),this._ctx=e,r?(this.target=r,this.targetPath=_1.collect(r,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columna.contentLeft+a.width)continue;const o=e.getVerticalOffsetForLineNumber(a.position.lineNumber);if(o<=r&&r<=o+a.height)return t.fulfillContentText(a.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){const i=t.isInContentArea?8:5;return t.fulfillViewZone(i,n.position,n)}return null}static _hitTestTextArea(e,t){return ys.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition();let r=Math.abs(t.relativePos.x);const a={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,i,n.range,a):(r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,i,n.range,a):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,i,n.range,a)))}return null}static _hitTestViewLines(e,t,n){if(!ys.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ee(1,1),yoe);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const r=e.viewModel.getLineCount(),a=e.viewModel.getLineMaxColumn(r);return t.fulfillContentEmpty(new ee(r,a),yoe)}if(n){if(ys.isStrictChildOfViewLines(t.targetPath)){const r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(r)===0){const o=e.getLineWidth(r),s=Aj(t.mouseContentHorizontalOffset-o);return t.fulfillContentEmpty(new ee(r,1),s)}const a=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>=a){const o=Aj(t.mouseContentHorizontalOffset-a),s=new ee(r,e.viewModel.getLineMaxColumn(r));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const i=Kr._doHitTest(e,t);return i.type===1?Kr.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):this._createMouseTarget(e,t.withTarget(i.hitTarget),!0)}static _hitTestMinimap(e,t){if(ys.isChildOfMinimap(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ee(n,i))}return null}static _hitTestScrollbarSlider(e,t){if(ys.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ee(i,r))}}return null}static _hitTestScrollbar(e,t){if(ys.isChildOfScrollableElement(t.targetPath)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.viewModel.getLineMaxColumn(n);return t.fulfillScrollbar(new ee(n,i))}return null}getMouseColumn(e){const t=this._context.configuration.options,n=t.get(143),i=this._context.viewLayout.getCurrentScrollLeft()+e.x-n.contentLeft;return Kr._getMouseColumn(i,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,n,i,r){const a=i.lineNumber,o=i.column,s=e.getLineWidth(a);if(t.mouseContentHorizontalOffset>s){const p=Aj(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(i,p)}const l=e.visibleRangeForPosition(a,o);if(!l)return t.fulfillUnknown(i);const c=l.left;if(Math.abs(t.mouseContentHorizontalOffset-c)<1)return t.fulfillContentText(i,null,{mightBeForeignElement:!!r,injectedText:r});const d=[];if(d.push({offset:l.left,column:o}),o>1){const p=e.visibleRangeForPosition(a,o-1);p&&d.push({offset:p.left,column:o-1})}const h=e.viewModel.getLineMaxColumn(a);if(op.offset-D.offset);const E=t.pos.toClientCoordinates(),m=n.getBoundingClientRect(),g=m.left<=E.clientX&&E.clientX<=m.right;let f=null;for(let p=1;pr)){const o=Math.floor((i+r)/2);let s=t.pos.y+(o-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const l=new dP(t.pos.x,s),c=this._actualDoHitTestWithCaretRangeFromPoint(e,l.toClientCoordinates());if(c.type===1)return c}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const n=w3(e.viewDomNode);let i;if(n?typeof n.caretRangeFromPoint>"u"?i=rtt(n,t.clientX,t.clientY):i=n.caretRangeFromPoint(t.clientX,t.clientY):i=e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY),!i||!i.startContainer)return new eE;const r=i.startContainer;if(r.nodeType===r.TEXT_NODE){const a=r.parentNode,o=a?a.parentNode:null,s=o?o.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,a,i.startOffset):new eE(r.parentNode)}else if(r.nodeType===r.ELEMENT_NODE){const a=r.parentNode,o=a?a.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,r,r.textContent.length):new eE(r)}return new eE}static _doHitTestWithCaretPositionFromPoint(e,t){const n=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){const i=n.offsetNode.parentNode,r=i?i.parentNode:null,a=r?r.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Wd.CLASS_NAME?Ff.createFromDOMInfo(e,n.offsetNode.parentNode,n.offset):new eE(n.offsetNode.parentNode)}if(n.offsetNode.nodeType===n.offsetNode.ELEMENT_NODE){const i=n.offsetNode.parentNode,r=i&&i.nodeType===i.ELEMENT_NODE?i.className:null,a=i?i.parentNode:null,o=a&&a.nodeType===a.ELEMENT_NODE?a.className:null;if(r===Wd.CLASS_NAME){const s=n.offsetNode.childNodes[Math.min(n.offset,n.offsetNode.childNodes.length-1)];if(s)return Ff.createFromDOMInfo(e,s,0)}else if(o===Wd.CLASS_NAME)return Ff.createFromDOMInfo(e,n.offsetNode,0)}return new eE(n.offsetNode)}static _snapToSoftTabBoundary(e,t){const n=t.getLineContent(e.lineNumber),{tabSize:i}=t.model.getOptions(),r=Ak.atomicPosition(n,e.column-1,i,2);return r!==-1?new ee(e.lineNumber,r+1):e}static _doHitTest(e,t){let n=new eE;if(typeof e.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?n=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(n=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),n.type===1){const i=e.viewModel.getInjectedTextAt(n.position),r=e.viewModel.normalizePosition(n.position,2);(i||!r.equals(n.position))&&(n=new lCe(r,n.spanNode,i))}return n}}function rtt(u,e,t){const n=document.createRange();let i=u.elementFromPoint(e,t);if(i!==null){for(;i&&i.firstChild&&i.firstChild.nodeType!==i.firstChild.TEXT_NODE&&i.lastChild&&i.lastChild.firstChild;)i=i.lastChild;const r=i.getBoundingClientRect(),a=window.getComputedStyle(i,null).getPropertyValue("font-style"),o=window.getComputedStyle(i,null).getPropertyValue("font-variant"),s=window.getComputedStyle(i,null).getPropertyValue("font-weight"),l=window.getComputedStyle(i,null).getPropertyValue("font-size"),c=window.getComputedStyle(i,null).getPropertyValue("line-height"),d=window.getComputedStyle(i,null).getPropertyValue("font-family"),h=`${a} ${o} ${s} ${l}/${c} ${d}`,E=i.innerText;let m=r.left,g=0,f;if(e>r.left+r.width)g=E.length;else{const p=Hf.getInstance();for(let D=0;Dt(new x0(n))))}onmousedown(e,t){this._register(ce(e,Me.MOUSE_DOWN,n=>t(new x0(n))))}onmouseover(e,t){this._register(ce(e,Me.MOUSE_OVER,n=>t(new x0(n))))}onmouseleave(e,t){this._register(ce(e,Me.MOUSE_LEAVE,n=>t(new x0(n))))}onkeydown(e,t){this._register(ce(e,Me.KEY_DOWN,n=>t(new ln(n))))}onkeyup(e,t){this._register(ce(e,Me.KEY_UP,n=>t(new ln(n))))}oninput(e,t){this._register(ce(e,Me.INPUT,t))}onblur(e,t){this._register(ce(e,Me.BLUR,t))}onfocus(e,t){this._register(ce(e,Me.FOCUS,t))}ignoreGesture(e){return Zu.ignoreTarget(e)}};const av=11;class att extends $l{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...st.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width=av+"px",this.domNode.style.height=av+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new m6),this._register(xi(this.bgDomNode,Me.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(xi(this.domNode,Me.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new rA),this._pointerdownScheduleRepeatTimer=this._register(new Vl)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class ott extends ne{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Vl)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)===null||e===void 0||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)===null||t===void 0||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}const stt=140;class cCe extends $l{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new ott(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new m6),this._shouldRender=!0,this.domNode=ku(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(ce(this.domNode.domNode,Me.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){const t=this._register(new att(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,i){this.slider=ku(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof i=="number"&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(ce(this.slider.domNode,Me.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);n<=r&&r<=i?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{const r=ji(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}const i=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(i):this._scrollbarState.getDesiredScrollPositionFromOffset(i)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),i=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{const a=this._sliderOrthogonalPointerPosition(r),o=Math.abs(a-n);if(na&&o>stt){this._setDesiredScrollPositionNow(i.getScrollPosition());return}const l=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(i.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const ltt=20;class ov{constructor(e,t,n,i,r,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=r,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new ov(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t?(this._visibleSize=t,this._refreshComputedValues(),!0):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,i,r){const a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=i>0&&i>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(ltt,Math.floor(n*o/i))),c=(o-l)/(i-n),d=r*c;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=ov._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let n=this._scrollPosition;return tthis._host.onMouseWheel(new B3(null,1,0))}),this._createArrow({className:"scra",icon:we.scrollbarButtonRight,top:o,left:void 0,bottom:void 0,right:a,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new B3(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class dtt extends cCe{constructor(e,t,n){const i=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new ov(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,i.height,i.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const a=(t.arrowSize-av)/2,o=(t.verticalScrollbarSize-av)/2;this._createArrow({className:"scra",icon:we.scrollbarButtonUp,top:a,left:o,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new B3(null,0,1))}),this._createArrow({className:"scra",icon:we.scrollbarButtonDown,top:void 0,left:o,bottom:a,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new B3(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class NB{constructor(e,t,n,i,r,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,n=n|0,i=i|0,r=r|0,a=a|0,o=o|0),this.rawScrollLeft=i,this.rawScrollTop=o,t<0&&(t=0),i+t>n&&(i=n-t),i<0&&(i=0),r<0&&(r=0),o+r>a&&(o=a-r),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=i,this.height=r,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new NB(this._forceIntegerValues,typeof e.width<"u"?e.width:this.width,typeof e.scrollWidth<"u"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height<"u"?e.height:this.height,typeof e.scrollHeight<"u"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new NB(this._forceIntegerValues,this.width,this.scrollWidth,typeof e.scrollLeft<"u"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop<"u"?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const n=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:r,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}}class hA extends ne{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new NB(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;const i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(n=this._smoothScrolling)===null||n===void 0||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};const n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let i;t?i=new _k(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const n=this._state.withScrollPosition(e);this._smoothScrolling=_k.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}}class Aoe{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}function _j(u,e){const t=e-u;return function(n){return u+t*mtt(n)}}function htt(u,e,t){return function(n){return n2.5*n){let r,a;return e0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!this._isAlmostInt(e.deltaX)||!this._isAlmostInt(e.deltaY))&&(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}PB.INSTANCE=new PB;class yX extends $l{get options(){return this._options}constructor(e,t,n){super(),this._onScroll=this._register(new Q),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Q),e.style.overflow="hidden",this._options=ptt(t),this._scrollable=n,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));const i={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new dtt(this._scrollable,this._options,i)),this._horizontalScrollbar=this._register(new ctt(this._scrollable,this._options,i)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=ku(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ku(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ku(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new Vl),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Su(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,iu&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new B3(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Su(this._mouseWheelToDispose),e)){const n=i=>{this._onMouseWheel(new B3(i))};this._mouseWheelToDispose.push(ce(this._listenOnDomNode,Me.MOUSE_WHEEL,n,{passive:!1}))}}_onMouseWheel(e){var t;if(!((t=e.browserEvent)===null||t===void 0)&&t.defaultPrevented)return;const n=PB.INSTANCE;n.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let a=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+a===0?o=a=0:Math.abs(a)>=Math.abs(o)?o=0:a=0),this._options.flipAxes&&([a,o]=[o,a]);const s=!iu&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||s)&&!o&&(o=a,a=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,a=a*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(a){const d=_oe*a,h=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,h)}if(o){const d=_oe*o,h=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,h)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let r=i;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,i=n?" left":"",r=t?" top":"",a=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${i}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${r}${i}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),gtt)}}class dCe extends yX{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new hA({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:i=>N0(i)});super(e,t,n),this._register(n)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class AX extends yX{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class EA extends yX{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const n=new hA({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:i=>N0(i)});super(e,t,n),this._register(n),this._element=e,this._register(this.onScroll(i=>{i.scrollTopChanged&&(this._element.scrollTop=i.scrollTop),i.scrollLeftChanged&&(this._element.scrollLeft=i.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function ptt(u){const e={lazyRender:typeof u.lazyRender<"u"?u.lazyRender:!1,className:typeof u.className<"u"?u.className:"",useShadows:typeof u.useShadows<"u"?u.useShadows:!0,handleMouseWheel:typeof u.handleMouseWheel<"u"?u.handleMouseWheel:!0,flipAxes:typeof u.flipAxes<"u"?u.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof u.consumeMouseWheelIfScrollbarIsNeeded<"u"?u.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof u.alwaysConsumeMouseWheel<"u"?u.alwaysConsumeMouseWheel:!1,scrollYToX:typeof u.scrollYToX<"u"?u.scrollYToX:!1,mouseWheelScrollSensitivity:typeof u.mouseWheelScrollSensitivity<"u"?u.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof u.fastScrollSensitivity<"u"?u.fastScrollSensitivity:5,scrollPredominantAxis:typeof u.scrollPredominantAxis<"u"?u.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof u.mouseWheelSmoothScroll<"u"?u.mouseWheelSmoothScroll:!0,arrowSize:typeof u.arrowSize<"u"?u.arrowSize:11,listenOnDomNode:typeof u.listenOnDomNode<"u"?u.listenOnDomNode:null,horizontal:typeof u.horizontal<"u"?u.horizontal:1,horizontalScrollbarSize:typeof u.horizontalScrollbarSize<"u"?u.horizontalScrollbarSize:10,horizontalSliderSize:typeof u.horizontalSliderSize<"u"?u.horizontalSliderSize:0,horizontalHasArrows:typeof u.horizontalHasArrows<"u"?u.horizontalHasArrows:!1,vertical:typeof u.vertical<"u"?u.vertical:1,verticalScrollbarSize:typeof u.verticalScrollbarSize<"u"?u.verticalScrollbarSize:10,verticalHasArrows:typeof u.verticalHasArrows<"u"?u.verticalHasArrows:!1,verticalSliderSize:typeof u.verticalSliderSize<"u"?u.verticalSliderSize:0,scrollByPage:typeof u.scrollByPage<"u"?u.scrollByPage:!1};return e.horizontalSliderSize=typeof u.horizontalSliderSize<"u"?u.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof u.verticalSliderSize<"u"?u.verticalSliderSize:e.verticalScrollbarSize,iu&&(e.className+=" mac"),e}class _X extends dA{constructor(e,t,n){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=n,this.mouseTargetFactory=new Kr(this._context,n),this._mouseDownOperation=this._register(new Dtt(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(a,o)=>this._createMouseTarget(a,o),a=>this._getMouseColumn(a))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const i=new Ket(this.viewHelper.viewDomNode);this._register(i.onContextMenu(this.viewHelper.viewDomNode,a=>this._onContextMenu(a,!0))),this._register(i.onMouseMove(this.viewHelper.viewDomNode,a=>{this._onMouseMove(a),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=ce(this.viewHelper.viewDomNode.ownerDocument,"mousemove",o=>{this.viewHelper.viewDomNode.contains(o.target)||this._onMouseLeave(new Hm(o,!1,this.viewHelper.viewDomNode))}))})),this._register(i.onMouseUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(i.onMouseLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a)));let r=0;this._register(i.onPointerDown(this.viewHelper.viewDomNode,(a,o)=>{r=o})),this._register(ce(this.viewHelper.viewDomNode,Me.POINTER_UP,a=>{this._mouseDownOperation.onPointerUp()})),this._register(i.onMouseDown(this.viewHelper.viewDomNode,a=>this._onMouseDown(a,r))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=PB.INSTANCE;let t=0,n=f0.getZoomLevel(),i=!1,r=0;const a=s=>{if(this.viewController.emitMouseWheel(s),!this._context.configuration.options.get(75))return;const l=new B3(s);if(e.acceptStandardWheelEvent(l),e.isPhysicalMouseWheel()){if(o(s)){const c=f0.getZoomLevel(),d=l.deltaY>0?1:-1;f0.setZoomLevel(c+d),l.preventDefault(),l.stopPropagation()}}else Date.now()-t>50&&(n=f0.getZoomLevel(),i=o(s),r=0),t=Date.now(),r+=l.deltaY,i&&(f0.setZoomLevel(n+r/5),l.preventDefault(),l.stopPropagation())};this._register(ce(this.viewHelper.viewDomNode,Me.MOUSE_WHEEL,a,{capture:!0,passive:!1}));function o(s){return iu?(s.metaKey||s.ctrlKey)&&!s.shiftKey&&!s.altKey:s.ctrlKey&&!s.metaKey&&!s.shiftKey&&!s.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(143)){const t=this._context.configuration.options.get(143).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new aCe(e,t).toPageCoordinates(),r=CX(this.viewHelper.viewDomNode);if(i.yr.y+r.height||i.xr.x+r.width)return null;const a=bX(this.viewHelper.viewDomNode,r,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,i,a,null)}_createMouseTarget(e,t){let n=e.target;if(!this.viewHelper.viewDomNode.contains(n)){const i=w3(this.viewHelper.viewDomNode);i&&(n=i.elementsFromPoint(e.posx,e.posy).find(r=>this.viewHelper.viewDomNode.contains(r)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?n:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!(this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||a&&o))d(),this._mouseDownOperation.start(n.type,e,t);else if(r)e.preventDefault();else if(s){const h=n.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(h.viewZoneId)&&(d(),this._mouseDownOperation.start(n.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})}}class Dtt extends ne{constructor(e,t,n,i,r,a){super(),this._context=e,this._viewController=t,this._viewHelper=n,this._mouseTargetFactory=i,this._createMouseTarget=r,this._getMouseColumn=a,this._mouseMoveMonitor=this._register(new Get(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new xtt(this._context,this._viewHelper,this._mouseTargetFactory,(o,s,l)=>this._dispatchMouse(o,s,l))),this._mouseState=new EP,this._currentSelection=new Ye(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):t.type===13&&(t.outsidePosition==="above"||t.outsidePosition==="below")?this._topBottomDragScrolling.start(t,e):(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,n){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const r=this._context.configuration.options;if(!r.get(90)&&r.get(35)&&!r.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&i.type===6&&i.position&&this._currentSelection.containsPosition(i.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,a=>this._onMouseDownThenMove(a),a=>{const o=this._findMousePosition(this._lastMouseEvent,!1);a&&a instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:o?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,t.buttons,a=>this._onMouseDownThenMove(a),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,n=this._context.viewModel,i=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,s=i.getCurrentScrollTop()+e.relativePos.y,l=rv.getZoneAtCoord(this._context,s);if(l){const d=this._helpPositionJumpOverViewZone(l);if(d)return Sa.createOutsideEditor(r,d,"below",o)}const c=i.getLineNumberAtVerticalOffset(s);return Sa.createOutsideEditor(r,new ee(c,n.getLineMaxColumn(c)),"below",o)}const a=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const o=e.posx-t.x-t.width;return Sa.createOutsideEditor(r,new ee(a,n.getLineMaxColumn(a)),"right",o)}return null}_findMousePosition(e,t){const n=this._getPositionOutsideEditor(e);if(n)return n;const i=this._createMouseTarget(e,t);if(!i.position)return null;if(i.type===8||i.type===5){const a=this._helpPositionJumpOverViewZone(i.detail);if(a)return Sa.createViewZone(i.type,i.element,i.mouseColumn,a,i.detail)}return i}_helpPositionJumpOverViewZone(e){const t=new ee(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null}_dispatchMouse(e,t,n){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:e.type===6&&e.detail.injectedText!==null})}}class xtt extends ne{constructor(e,t,n,i){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=i,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new vtt(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class vtt extends ne{constructor(e,t,n,i,r,a){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=n,this._dispatchMouse=i,this._position=r,this._mouseEvent=a,this._lastTime=Date.now(),this._animationFrameDisposable=N0(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(66),t=this._context.configuration.options.get(143).height/e,n=this._position.outsideDistance/e;return n<=1.5?Math.max(30,t*(1+n)):n<=3?Math.max(60,t*(2+n)):Math.max(200,t*(7+n))}_execute(){const e=this._context.configuration.options.get(66),t=this._getScrollSpeed(),n=this._tick(),i=t*(n/1e3)*e,r=this._position.outsidePosition==="above"?-i:i;this._context.viewModel.viewLayout.deltaScrollNow(0,r),this._viewHelper.renderNow();const a=this._context.viewLayout.getLinesViewportData(),o=this._position.outsidePosition==="above"?a.startLineNumber:a.endLineNumber;let s;{const l=CX(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(143).horizontalScrollbarHeight,d=new dP(this._mouseEvent.pos.x,l.y+l.height-c-.1),h=bX(this._viewHelper.viewDomNode,l,d);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),l,d,h,null)}(!s.position||s.position.lineNumber!==o)&&(this._position.outsidePosition==="above"?s=Sa.createOutsideEditor(this._position.mouseColumn,new ee(o,1),"above",this._position.outsideDistance):s=Sa.createOutsideEditor(this._position.mouseColumn,new ee(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=N0(()=>this._execute())}}class EP{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>EP.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=n,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}EP.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class Zt{get event(){return this.emitter.event}constructor(e,t,n){const i=r=>this.emitter.fire(r);this.emitter=new Q({onWillAddFirstListener:()=>e.addEventListener(t,i,n),onDidRemoveLastListener:()=>e.removeEventListener(t,i,n)})}dispose(){this.emitter.dispose()}}var zE;(function(u){const e={total:0,min:Number.MAX_VALUE,max:0},t=Object.assign({},e),n=Object.assign({},e),i=Object.assign({},e);let r=0;const a={keydown:0,input:0,render:0};function o(){p(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),a.keydown=1,queueMicrotask(s)}u.onKeyDown=o;function s(){a.keydown===1&&(performance.mark("keydown/end"),a.keydown=2)}function l(){performance.mark("input/start"),a.input=1,f()}u.onBeforeInput=l;function c(){a.input===0&&l(),queueMicrotask(d)}u.onInput=c;function d(){a.input===1&&(performance.mark("input/end"),a.input=2)}function h(){p()}u.onKeyUp=h;function E(){p()}u.onSelectionChange=E;function m(){a.keydown===2&&a.input===2&&a.render===0&&(performance.mark("render/start"),a.render=1,queueMicrotask(g),f())}u.onRenderStart=m;function g(){a.render===1&&(performance.mark("render/end"),a.render=2)}function f(){setTimeout(p)}function p(){a.keydown===2&&a.input===2&&a.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),D("keydown",e),D("input",t),D("render",n),D("inputlatency",i),r++,x())}function D(F,S){const w=performance.getEntriesByName(F)[0].duration;S.total+=w,S.min=Math.min(S.min,w),S.max=Math.max(S.max,w)}function x(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),a.keydown=0,a.input=0,a.render=0}function b(){if(r===0)return;const F={keydown:k(e),input:k(t),render:k(n),total:k(i),sampleCount:r};return A(e),A(t),A(n),A(i),r=0,F}u.getAndClearMeasurements=b;function k(F){return{average:F.total/r,max:F.max,min:F.min}}function A(F){F.total=0,F.min=Number.MAX_VALUE,F.max=0}})(zE||(zE={}));class Fr{constructor(e,t,n,i,r){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selection=i,this.newlineCountBeforeSelection=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const n=e.getValue(),i=e.getSelectionStart(),r=e.getSelectionEnd();let a;if(t){const o=n.substring(0,i),s=t.value.substring(0,t.selectionStart);o===s&&(a=t.newlineCountBeforeSelection)}return new Fr(n,i,r,null,a)}collapseSelection(){return this.selectionStart===this.value.length?this:new Fr(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,n,i,r,a,o,s,l;if(e<=this.selectionStart){const h=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition((n=(t=this.selection)===null||t===void 0?void 0:t.getStartPosition())!==null&&n!==void 0?n:null,h,-1)}if(e>=this.selectionEnd){const h=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition((r=(i=this.selection)===null||i===void 0?void 0:i.getEndPosition())!==null&&r!==void 0?r:null,h,1)}const c=this.value.substring(this.selectionStart,e);if(c.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition((o=(a=this.selection)===null||a===void 0?void 0:a.getStartPosition())!==null&&o!==void 0?o:null,c,1);const d=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition((l=(s=this.selection)===null||s===void 0?void 0:s.getEndPosition())!==null&&l!==void 0?l:null,d,-1)}_finishDeduceEditorPosition(e,t,n){let i=0,r=-1;for(;(r=t.indexOf(` `,r+1))!==-1;)i++;return[e,n*t.length,i]}static deduceInput(e,t,n){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const i=Math.min(A3(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(DB(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(i,e.value.length-r);const a=t.value.substring(i,t.value.length-r),o=e.selectionStart-i,s=e.selectionEnd-i,l=t.selectionStart-i,c=t.selectionEnd-i;if(l===c){const h=e.selectionStart-i;return{text:a,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}const d=s-o;return{text:a,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const n=Math.min(A3(e.value,t.value),e.selectionEnd),i=Math.min(DB(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(n,e.value.length-i),a=t.value.substring(n,t.value.length-i);e.selectionStart-n;const o=e.selectionEnd-n;t.selectionStart-n;const s=t.selectionEnd-n;return{text:a,replacePrevCharCnt:o,replaceNextCharCnt:r.length-o,positionDelta:s-a.length}}}Fr.EMPTY=new Fr("",0,0,null,void 0);class D5{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const n=e*t,i=n+1,r=n+t;return new j(i,1,r+1,1)}static fromEditorSelection(e,t,n,i){const a=D5._getPageOfLine(t.startLineNumber,n),o=D5._getRangeForPage(a,n),s=D5._getPageOfLine(t.endLineNumber,n),l=D5._getRangeForPage(s,n);let c=o.intersectRanges(new j(1,1,t.startLineNumber,t.startColumn));if(i&&e.getValueLengthInRange(c,1)>500){const p=e.modifyPosition(c.getEndPosition(),-500);c=j.fromPositions(p,c.getEndPosition())}const d=e.getValueInRange(c,1),h=e.getLineCount(),E=e.getLineMaxColumn(h);let m=l.intersectRanges(new j(t.endLineNumber,t.endColumn,h,E));if(i&&e.getValueLengthInRange(m,1)>500){const p=e.modifyPosition(m.getStartPosition(),500);m=j.fromPositions(m.getStartPosition(),p)}const g=e.getValueInRange(m,1);let f;if(a===s||a+1===s)f=e.getValueInRange(t,1);else{const p=o.intersectRanges(t),D=l.intersectRanges(t);f=e.getValueInRange(p,1)+String.fromCharCode(8230)+e.getValueInRange(D,1)}return i&&f.length>2*500&&(f=f.substring(0,500)+String.fromCharCode(8230)+f.substring(f.length-500,f.length)),new Fr(d+f+g,d.length,d.length+f.length,t,c.endLineNumber-c.startLineNumber)}}var RB;(function(u){u.Tap="-monaco-textarea-synthetic-tap"})(RB||(RB={}));const PW={forceCopyWithSyntaxHighlighting:!1};class Sk{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}Sk.INSTANCE=new Sk;class Ctt{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class btt extends ne{get textAreaState(){return this._textAreaState}constructor(e,t,n,i){super(),this._host=e,this._textArea=t,this._OS=n,this._browser=i,this._onFocus=this._register(new Q),this.onFocus=this._onFocus.event,this._onBlur=this._register(new Q),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new Q),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new Q),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new Q),this.onCut=this._onCut.event,this._onPaste=this._register(new Q),this.onPaste=this._onPaste.event,this._onType=this._register(new Q),this.onType=this._onType.event,this._onCompositionStart=this._register(new Q),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new Q),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new Q),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new Q),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new Hu(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new Hu(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Fr.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown(a=>{const o=new ln(a);(o.keyCode===114||this._currentComposition&&o.keyCode===1)&&o.stopPropagation(),o.equals(9)&&o.preventDefault(),r=o,this._onKeyDown.fire(o)})),this._register(this._textArea.onKeyUp(a=>{const o=new ln(a);this._onKeyUp.fire(o)})),this._register(this._textArea.onCompositionStart(a=>{const o=new Ctt;if(this._currentComposition){this._currentComposition=o;return}if(this._currentComposition=o,this._OS===2&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===a.data&&(r.code==="ArrowRight"||r.code==="ArrowLeft")){o.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:a.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:a.data});return}this._onCompositionStart.fire({data:a.data})})),this._register(this._textArea.onCompositionUpdate(a=>{const o=this._currentComposition;if(!o)return;if(this._browser.isAndroid){const l=Fr.readFromTextArea(this._textArea,this._textAreaState),c=Fr.deduceAndroidCompositionInput(this._textAreaState,l);this._textAreaState=l,this._onType.fire(c),this._onCompositionUpdate.fire(a);return}const s=o.handleCompositionUpdate(a.data);this._textAreaState=Fr.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(s),this._onCompositionUpdate.fire(a)})),this._register(this._textArea.onCompositionEnd(a=>{const o=this._currentComposition;if(!o)return;if(this._currentComposition=null,this._browser.isAndroid){const l=Fr.readFromTextArea(this._textArea,this._textAreaState),c=Fr.deduceAndroidCompositionInput(this._textAreaState,l);this._textAreaState=l,this._onType.fire(c),this._onCompositionEnd.fire();return}const s=o.handleCompositionUpdate(a.data);this._textAreaState=Fr.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(s),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(a=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const o=Fr.readFromTextArea(this._textArea,this._textAreaState),s=Fr.deduceInput(this._textAreaState,o,this._OS===2);s.replacePrevCharCnt===0&&s.text.length===1&&(ur(s.text.charCodeAt(0))||s.text.charCodeAt(0)===127)||(this._textAreaState=o,(s.text!==""||s.replacePrevCharCnt!==0||s.replaceNextCharCnt!==0||s.positionDelta!==0)&&this._onType.fire(s))})),this._register(this._textArea.onCut(a=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(a),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(a=>{this._ensureClipboardGetsEditorSelection(a)})),this._register(this._textArea.onPaste(a=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),a.preventDefault(),!a.clipboardData)return;let[o,s]=RW.getTextData(a.clipboardData);o&&(s=s||Sk.INSTANCE.get(o),this._onPaste.fire({text:o,metadata:s}))})),this._register(this._textArea.onFocus(()=>{const a=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!a&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return ce(this._textArea.ownerDocument,"selectionchange",t=>{if(zE.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const n=Date.now(),i=n-e;if(e=n,i<5)return;const r=n-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100||!this._textAreaState.selection)return;const a=this._textArea.getValue();if(this._textAreaState.value!==a)return;const o=this._textArea.getSelectionStart(),s=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===o&&this._textAreaState.selectionEnd===s)return;const l=this._textAreaState.deduceEditorPosition(o),c=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(s),h=this._host.deduceModelPosition(d[0],d[1],d[2]),E=new Ye(c.lineNumber,c.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(E)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Sk.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,` `):t.text,n),e.preventDefault(),e.clipboardData&&RW.setTextData(e.clipboardData,t.text,t.html,n)}}const RW={getTextData(u){const e=u.getData(ci.text);let t=null;const n=u.getData("vscode-editor-data");if(typeof n=="string")try{t=JSON.parse(n),t.version!==1&&(t=null)}catch{}return e.length===0&&t===null&&u.files.length>0?[Array.prototype.slice.call(u.files,0).map(r=>r.name).join(` -`),null]:[e,t]},setTextData(u,e,t,n){u.setData(ci.text,e),typeof t=="string"&&u.setData("text/html",t),u.setData("vscode-editor-data",JSON.stringify(n))}};class ktt extends ne{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Zt(this._actual,"keydown")).event,this.onKeyUp=this._register(new Zt(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Zt(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Zt(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Zt(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Zt(this._actual,"beforeinput")).event,this.onInput=this._register(new Zt(this._actual,"input")).event,this.onCut=this._register(new Zt(this._actual,"cut")).event,this.onCopy=this._register(new Zt(this._actual,"copy")).event,this.onPaste=this._register(new Zt(this._actual,"paste")).event,this.onFocus=this._register(new Zt(this._actual,"focus")).event,this.onBlur=this._register(new Zt(this._actual,"blur")).event,this._onSyntheticTap=this._register(new Q),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>zE.onKeyDown())),this._register(this.onBeforeInput(()=>zE.onBeforeInput())),this._register(this.onInput(()=>zE.onInput())),this._register(this.onKeyUp(()=>zE.onKeyUp())),this._register(ce(this._actual,RB.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=w3(this._actual);return e?e.activeElement===this._actual:XQ(this._actual)?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){const i=this._actual;let r=null;const a=w3(i);a?r=a.activeElement:r=i.ownerDocument.activeElement;const o=r===i,s=i.selectionStart,l=i.selectionEnd;if(o&&s===t&&l===n){M0&&window.parent!==window&&i.focus();return}if(o){this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),M0&&window.parent!==window&&i.focus();return}try{const c=XJe(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),eZe(i,c)}catch{}}}class Ftt extends _X{constructor(e,t,n){super(e,t,n),this._register(Zu.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Tap,r=>this.onTap(r))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Change,r=>this.onChange(r))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Contextmenu,r=>this._onContextMenu(new Hm(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(ce(this.viewHelper.linesContentDomNode,"pointerdown",r=>{const a=r.pointerType;if(a==="mouse"){this._lastPointerType="mouse";return}else a==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const i=new Wet(this.viewHelper.viewDomNode);this._register(i.onPointerMove(this.viewHelper.viewDomNode,r=>this._onMouseMove(r))),this._register(i.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,(r,a)=>this._onMouseDown(r,a)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hm(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class ytt extends _X{constructor(e,t,n){super(e,t,n),this._register(Zu.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Tap,i=>this.onTap(i))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Change,i=>this.onChange(i))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Contextmenu,i=>this._onContextMenu(new Hm(i,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hm(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const n=document.createEvent("CustomEvent");n.initEvent(RB.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Att extends ne{constructor(e,t,n){super(),Zc&&QQ.pointerEvents?this.handler=this._register(new Ftt(e,t,n)):window.TouchEvent?this.handler=this._register(new ytt(e,t,n)):this.handler=this._register(new _X(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class wp extends dA{}const sr=Ut("themeService");function Jn(u){return{id:u}}function IW(u){switch(u){case x0.DARK:return"vs-dark";case x0.HIGH_CONTRAST_DARK:return"hc-black";case x0.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const hCe={ThemingContribution:"base.contributions.theming"};class _tt{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Q}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),ft(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}const ECe=new _tt;jn.add(hCe.ThemingContribution,ECe);function Kl(u){return ECe.onColorThemeChange(u)}class Stt extends ne{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const mCe=q("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("lineHighlight","Background color for the highlight of line at the cursor position.")),Soe=q("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:eu},v("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));q("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},v("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0);q("editor.symbolHighlightBackground",{dark:a1,light:a1,hcDark:null,hcLight:null},v("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0);const gCe=q("editorCursor.foreground",{dark:"#AEAFAD",light:ae.black,hcDark:ae.white,hcLight:"#0F4A85"},v("caret","Color of the editor cursor.")),Btt=q("editorCursor.background",null,v("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Vh=q("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},v("editorWhitespaces","Color of whitespace characters in the editor.")),wtt=q("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:ae.white,hcLight:"#292929"},v("editorLineNumbers","Color of editor line numbers.")),e9=q("editorIndentGuide.background",{dark:Vh,light:Vh,hcDark:Vh,hcLight:Vh},v("editorIndentGuides","Color of the editor indentation guides."),!1,v("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),t9=q("editorIndentGuide.activeBackground",{dark:Vh,light:Vh,hcDark:Vh,hcLight:Vh},v("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,v("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),mA=q("editorIndentGuide.background1",{dark:e9,light:e9,hcDark:e9,hcLight:e9},v("editorIndentGuides1","Color of the editor indentation guides (1).")),Ltt=q("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides2","Color of the editor indentation guides (2).")),ztt=q("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides3","Color of the editor indentation guides (3).")),Mtt=q("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides4","Color of the editor indentation guides (4).")),Ttt=q("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides5","Color of the editor indentation guides (5).")),Ntt=q("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides6","Color of the editor indentation guides (6).")),gA=q("editorIndentGuide.activeBackground1",{dark:t9,light:t9,hcDark:t9,hcLight:t9},v("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Ptt=q("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Rtt=q("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Itt=q("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Ott=q("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),jtt=q("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),u9=q("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:En,hcLight:En},v("editorActiveLineNumber","Color of editor active line number"),!1,v("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));q("editorLineNumber.activeForeground",{dark:u9,light:u9,hcDark:u9,hcLight:u9},v("editorActiveLineNumber","Color of editor active line number"));const Htt=q("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));q("editorRuler.foreground",{dark:"#5A5A5A",light:ae.lightgrey,hcDark:ae.white,hcLight:"#292929"},v("editorRuler","Color of the editor rulers."));q("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},v("editorCodeLensForeground","Foreground color of editor CodeLens"));q("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},v("editorBracketMatchBackground","Background color behind matching brackets"));q("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:eu,hcLight:eu},v("editorBracketMatchBorder","Color for matching brackets boxes"));const Vtt=q("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},v("editorOverviewRulerBorder","Color of the overview ruler border.")),$tt=q("editorOverviewRuler.background",null,v("editorOverviewRulerBackground","Background color of the editor overview ruler."));q("editorGutter.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));q("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:ae.fromHex("#fff").transparent(.8),hcLight:eu},v("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Ktt=q("editorUnnecessaryCode.opacity",{dark:ae.fromHex("#000a"),light:ae.fromHex("#0007"),hcDark:null,hcLight:null},v("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));q("editorGhostText.border",{dark:null,light:null,hcDark:ae.fromHex("#fff").transparent(.8),hcLight:ae.fromHex("#292929").transparent(.8)},v("editorGhostTextBorder","Border color of ghost text in the editor."));q("editorGhostText.foreground",{dark:ae.fromHex("#ffffff56"),light:ae.fromHex("#0007"),hcDark:null,hcLight:null},v("editorGhostTextForeground","Foreground color of the ghost text in the editor."));q("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorGhostTextBackground","Background color of the ghost text in the editor."));const n9=new ae(new nu(0,122,204,.6)),fCe=q("editorOverviewRuler.rangeHighlightForeground",{dark:n9,light:n9,hcDark:n9,hcLight:n9},v("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Wtt=q("editorOverviewRuler.errorForeground",{dark:new ae(new nu(255,18,18,.7)),light:new ae(new nu(255,18,18,.7)),hcDark:new ae(new nu(255,50,50,1)),hcLight:"#B5200D"},v("overviewRuleError","Overview ruler marker color for errors.")),Gtt=q("editorOverviewRuler.warningForeground",{dark:js,light:js,hcDark:kk,hcLight:kk},v("overviewRuleWarning","Overview ruler marker color for warnings.")),Utt=q("editorOverviewRuler.infoForeground",{dark:Mo,light:Mo,hcDark:Fk,hcLight:Fk},v("overviewRuleInfo","Overview ruler marker color for infos.")),pCe=q("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},v("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),DCe=q("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},v("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),xCe=q("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},v("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),vCe=q("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),CCe=q("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),bCe=q("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),qtt=q("editorBracketHighlight.unexpectedBracket.foreground",{dark:new ae(new nu(255,18,18,.8)),light:new ae(new nu(255,18,18,.8)),hcDark:new ae(new nu(255,50,50,1)),hcLight:""},v("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Jtt=q("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Ztt=q("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Ytt=q("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Qtt=q("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Xtt=q("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),eut=q("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),tut=q("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),uut=q("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),nut=q("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),iut=q("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),rut=q("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),aut=q("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));q("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},v("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));q("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},v("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Kl((u,e)=>{const t=u.getColor(rr),n=u.getColor(mCe),i=n&&!n.isTransparent()?n:t;i&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)});class fA extends wp{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ee(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const n=e.get(143);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee(e,1));if(t.column!==1)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return i===0?''+n+"":String(i)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=Pa?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._context.viewModel.getLineCount(),a=[];for(let o=n;o<=i;o++){const s=o-n,l=this._getLineRenderLineNumber(o);if(!l){a[s]="";continue}let c="";if(o===r&&this._context.viewModel.getLineLength(o)===0){if(this._renderFinalNewline==="off"){a[s]="";continue}this._renderFinalNewline==="dimmed"&&(c=" dimmed-line-number")}o===this._activeLineNumber&&(c=" active-line-number"),a[s]=`
${l}
`}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}fA.CLASS_NAME="line-numbers";Kl((u,e)=>{const t=u.getColor(wtt),n=u.getColor(Htt);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});class L3 extends xs{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=ku(document.createElement("div")),this._domNode.setClassName(L3.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=ku(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(L3.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}L3.CLASS_NAME="glyph-margin";L3.OUTER_CLASS_NAME="margin";const lx="monaco-mouse-cursor-text";class out{constructor(){this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const Xb=new out,qu=Ut("keybindingService");var sut=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lut=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class cut{constructor(e,t,n,i,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=i,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new ee(this.modelLineNumber,this.distanceToModelLineStart+1),n=new ee(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const Sj=M0;let OW=class extends xs{constructor(e,t,n,i){super(e),this._keybindingService=i,this._primaryCursorPosition=new ee(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,a=r.get(143);this._setAccessibilityOptions(r),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=r.get(50),this._lineHeight=r.get(66),this._emptySelectionClipboard=r.get(37),this._copyWithSyntaxHighlighting=r.get(25),this._visibleTextArea=null,this._selections=[new Ye(1,1,1,1)],this._modelSelections=[new Ye(1,1,1,1)],this._lastRenderPosition=null,this.textArea=ku(document.createElement("textarea")),_1.write(this.textArea,6),this.textArea.setClassName(`inputarea ${lx}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:o}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${o*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(r)),this.textArea.setAttribute("aria-required",r.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(r.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",v("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",r.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=ku(document.createElement("div")),this.textAreaCover.setPosition("absolute");const s={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:d=>this._context.viewModel.getLineMaxColumn(d),getValueInRange:(d,h)=>this._context.viewModel.getValueInRange(d,h),getValueLengthInRange:(d,h)=>this._context.viewModel.getValueLengthInRange(d,h),modifyPosition:(d,h)=>this._context.viewModel.modifyPosition(d,h)},l={getDataToCopy:()=>{const d=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,na),h=this._context.viewModel.model.getEOL(),E=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(d)?d:null,g=Array.isArray(d)?d.join(h):d;let f,p=null;if(PW.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&g.length<65536){const D=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);D&&(f=D.html,p=D.mode)}return{isFromEmptySelection:E,multicursorText:m,text:g,html:f,mode:p}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const d=this._selections[0];if(iu&&d.isEmpty()){const E=d.getStartPosition();let m=this._getWordBeforePosition(E);if(m.length===0&&(m=this._getCharacterBeforePosition(E)),m.length>0)return new Fr(m,m.length,m.length,j.fromPositions(E),0)}const h=500;if(iu&&!d.isEmpty()&&s.getValueLengthInRange(d,0)0)return new Fr(E,m,m,j.fromPositions(h),0)}return Fr.EMPTY}return D5.fromEditorSelection(s,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(d,h,E)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(d,h,E)},c=this._register(new ktt(this.textArea.domNode));this._textAreaInput=this._register(new btt(l,c,Is,{isAndroid:nae,isChrome:qQ,isFirefox:M0,isSafari:l4})),this._register(this._textAreaInput.onKeyDown(d=>{this._viewController.emitKeyDown(d)})),this._register(this._textAreaInput.onKeyUp(d=>{this._viewController.emitKeyUp(d)})),this._register(this._textAreaInput.onPaste(d=>{let h=!1,E=null,m=null;d.metadata&&(h=this._emptySelectionClipboard&&!!d.metadata.isFromEmptySelection,E=typeof d.metadata.multicursorText<"u"?d.metadata.multicursorText:null,m=d.metadata.mode),this._viewController.paste(d.text,h,E,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(d=>{d.replacePrevCharCnt||d.replaceNextCharCnt||d.positionDelta?this._viewController.compositionType(d.text,d.replacePrevCharCnt,d.replaceNextCharCnt,d.positionDelta):this._viewController.type(d.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(d=>{this._viewController.setSelection(d)})),this._register(this._textAreaInput.onCompositionStart(d=>{const h=this.textArea.domNode,E=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:g}=(()=>{const p=h.value.substring(0,Math.min(h.selectionStart,h.selectionEnd)),D=p.lastIndexOf(` +`),null]:[e,t]},setTextData(u,e,t,n){u.setData(ci.text,e),typeof t=="string"&&u.setData("text/html",t),u.setData("vscode-editor-data",JSON.stringify(n))}};class ktt extends ne{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new Zt(this._actual,"keydown")).event,this.onKeyUp=this._register(new Zt(this._actual,"keyup")).event,this.onCompositionStart=this._register(new Zt(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new Zt(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new Zt(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new Zt(this._actual,"beforeinput")).event,this.onInput=this._register(new Zt(this._actual,"input")).event,this.onCut=this._register(new Zt(this._actual,"cut")).event,this.onCopy=this._register(new Zt(this._actual,"copy")).event,this.onPaste=this._register(new Zt(this._actual,"paste")).event,this.onFocus=this._register(new Zt(this._actual,"focus")).event,this.onBlur=this._register(new Zt(this._actual,"blur")).event,this._onSyntheticTap=this._register(new Q),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>zE.onKeyDown())),this._register(this.onBeforeInput(()=>zE.onBeforeInput())),this._register(this.onInput(()=>zE.onInput())),this._register(this.onKeyUp(()=>zE.onKeyUp())),this._register(ce(this._actual,RB.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=w3(this._actual);return e?e.activeElement===this._actual:XQ(this._actual)?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const n=this._actual;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,n){const i=this._actual;let r=null;const a=w3(i);a?r=a.activeElement:r=i.ownerDocument.activeElement;const o=r===i,s=i.selectionStart,l=i.selectionEnd;if(o&&s===t&&l===n){T0&&window.parent!==window&&i.focus();return}if(o){this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),T0&&window.parent!==window&&i.focus();return}try{const c=XJe(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),eZe(i,c)}catch{}}}class Ftt extends _X{constructor(e,t,n){super(e,t,n),this._register(Zu.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Tap,r=>this.onTap(r))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Change,r=>this.onChange(r))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Contextmenu,r=>this._onContextMenu(new Hm(r,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(ce(this.viewHelper.linesContentDomNode,"pointerdown",r=>{const a=r.pointerType;if(a==="mouse"){this._lastPointerType="mouse";return}else a==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const i=new Wet(this.viewHelper.viewDomNode);this._register(i.onPointerMove(this.viewHelper.viewDomNode,r=>this._onMouseMove(r))),this._register(i.onPointerUp(this.viewHelper.viewDomNode,r=>this._onMouseUp(r))),this._register(i.onPointerLeave(this.viewHelper.viewDomNode,r=>this._onMouseLeave(r))),this._register(i.onPointerDown(this.viewHelper.viewDomNode,(r,a)=>this._onMouseDown(r,a)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hm(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class ytt extends _X{constructor(e,t,n){super(e,t,n),this._register(Zu.addTarget(this.viewHelper.linesContentDomNode)),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Tap,i=>this.onTap(i))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Change,i=>this.onChange(i))),this._register(ce(this.viewHelper.linesContentDomNode,Yu.Contextmenu,i=>this._onContextMenu(new Hm(i,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Hm(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const n=document.createEvent("CustomEvent");n.initEvent(RB.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(n),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class Att extends ne{constructor(e,t,n){super(),Zc&&QQ.pointerEvents?this.handler=this._register(new Ftt(e,t,n)):window.TouchEvent?this.handler=this._register(new ytt(e,t,n)):this.handler=this._register(new _X(e,t,n))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class wp extends dA{}const sr=Ut("themeService");function Jn(u){return{id:u}}function IW(u){switch(u){case v0.DARK:return"vs-dark";case v0.HIGH_CONTRAST_DARK:return"hc-black";case v0.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const hCe={ThemingContribution:"base.contributions.theming"};class _tt{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Q}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),ft(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}const ECe=new _tt;jn.add(hCe.ThemingContribution,ECe);function Kl(u){return ECe.onColorThemeChange(u)}class Stt extends ne{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const mCe=q("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v("lineHighlight","Background color for the highlight of line at the cursor position.")),Soe=q("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:eu},v("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));q("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},v("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0);q("editor.symbolHighlightBackground",{dark:a1,light:a1,hcDark:null,hcLight:null},v("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0);const gCe=q("editorCursor.foreground",{dark:"#AEAFAD",light:ae.black,hcDark:ae.white,hcLight:"#0F4A85"},v("caret","Color of the editor cursor.")),Btt=q("editorCursor.background",null,v("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Vh=q("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},v("editorWhitespaces","Color of whitespace characters in the editor.")),wtt=q("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:ae.white,hcLight:"#292929"},v("editorLineNumbers","Color of editor line numbers.")),e9=q("editorIndentGuide.background",{dark:Vh,light:Vh,hcDark:Vh,hcLight:Vh},v("editorIndentGuides","Color of the editor indentation guides."),!1,v("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),t9=q("editorIndentGuide.activeBackground",{dark:Vh,light:Vh,hcDark:Vh,hcLight:Vh},v("editorActiveIndentGuide","Color of the active editor indentation guides."),!1,v("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),mA=q("editorIndentGuide.background1",{dark:e9,light:e9,hcDark:e9,hcLight:e9},v("editorIndentGuides1","Color of the editor indentation guides (1).")),Ltt=q("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides2","Color of the editor indentation guides (2).")),ztt=q("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides3","Color of the editor indentation guides (3).")),Mtt=q("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides4","Color of the editor indentation guides (4).")),Ttt=q("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides5","Color of the editor indentation guides (5).")),Ntt=q("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorIndentGuides6","Color of the editor indentation guides (6).")),gA=q("editorIndentGuide.activeBackground1",{dark:t9,light:t9,hcDark:t9,hcLight:t9},v("editorActiveIndentGuide1","Color of the active editor indentation guides (1).")),Ptt=q("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide2","Color of the active editor indentation guides (2).")),Rtt=q("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide3","Color of the active editor indentation guides (3).")),Itt=q("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide4","Color of the active editor indentation guides (4).")),Ott=q("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide5","Color of the active editor indentation guides (5).")),jtt=q("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorActiveIndentGuide6","Color of the active editor indentation guides (6).")),u9=q("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:En,hcLight:En},v("editorActiveLineNumber","Color of editor active line number"),!1,v("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));q("editorLineNumber.activeForeground",{dark:u9,light:u9,hcDark:u9,hcLight:u9},v("editorActiveLineNumber","Color of editor active line number"));const Htt=q("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));q("editorRuler.foreground",{dark:"#5A5A5A",light:ae.lightgrey,hcDark:ae.white,hcLight:"#292929"},v("editorRuler","Color of the editor rulers."));q("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},v("editorCodeLensForeground","Foreground color of editor CodeLens"));q("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},v("editorBracketMatchBackground","Background color behind matching brackets"));q("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:eu,hcLight:eu},v("editorBracketMatchBorder","Color for matching brackets boxes"));const Vtt=q("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},v("editorOverviewRulerBorder","Color of the overview ruler border.")),$tt=q("editorOverviewRuler.background",null,v("editorOverviewRulerBackground","Background color of the editor overview ruler."));q("editorGutter.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));q("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:ae.fromHex("#fff").transparent(.8),hcLight:eu},v("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));const Ktt=q("editorUnnecessaryCode.opacity",{dark:ae.fromHex("#000a"),light:ae.fromHex("#0007"),hcDark:null,hcLight:null},v("unnecessaryCodeOpacity",`Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.`));q("editorGhostText.border",{dark:null,light:null,hcDark:ae.fromHex("#fff").transparent(.8),hcLight:ae.fromHex("#292929").transparent(.8)},v("editorGhostTextBorder","Border color of ghost text in the editor."));q("editorGhostText.foreground",{dark:ae.fromHex("#ffffff56"),light:ae.fromHex("#0007"),hcDark:null,hcLight:null},v("editorGhostTextForeground","Foreground color of the ghost text in the editor."));q("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},v("editorGhostTextBackground","Background color of the ghost text in the editor."));const n9=new ae(new nu(0,122,204,.6)),fCe=q("editorOverviewRuler.rangeHighlightForeground",{dark:n9,light:n9,hcDark:n9,hcLight:n9},v("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Wtt=q("editorOverviewRuler.errorForeground",{dark:new ae(new nu(255,18,18,.7)),light:new ae(new nu(255,18,18,.7)),hcDark:new ae(new nu(255,50,50,1)),hcLight:"#B5200D"},v("overviewRuleError","Overview ruler marker color for errors.")),Gtt=q("editorOverviewRuler.warningForeground",{dark:Hs,light:Hs,hcDark:kk,hcLight:kk},v("overviewRuleWarning","Overview ruler marker color for warnings.")),Utt=q("editorOverviewRuler.infoForeground",{dark:Mo,light:Mo,hcDark:Fk,hcLight:Fk},v("overviewRuleInfo","Overview ruler marker color for infos.")),pCe=q("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},v("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),DCe=q("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},v("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),xCe=q("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},v("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),vCe=q("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),CCe=q("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),bCe=q("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),qtt=q("editorBracketHighlight.unexpectedBracket.foreground",{dark:new ae(new nu(255,18,18,.8)),light:new ae(new nu(255,18,18,.8)),hcDark:new ae(new nu(255,50,50,1)),hcLight:""},v("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Jtt=q("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Ztt=q("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Ytt=q("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Qtt=q("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Xtt=q("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),eut=q("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),tut=q("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),uut=q("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),nut=q("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),iut=q("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),rut=q("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),aut=q("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));q("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},v("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));q("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},v("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));Kl((u,e)=>{const t=u.getColor(rr),n=u.getColor(mCe),i=n&&!n.isTransparent()?n:t;i&&e.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)});class fA extends wp{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ee(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(66);const t=e.get(67);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(94);const n=e.get(143);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee(e,1));if(t.column!==1)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return i===0?''+n+"":String(i)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=Pa?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._context.viewModel.getLineCount(),a=[];for(let o=n;o<=i;o++){const s=o-n,l=this._getLineRenderLineNumber(o);if(!l){a[s]="";continue}let c="";if(o===r&&this._context.viewModel.getLineLength(o)===0){if(this._renderFinalNewline==="off"){a[s]="";continue}this._renderFinalNewline==="dimmed"&&(c=" dimmed-line-number")}o===this._activeLineNumber&&(c=" active-line-number"),a[s]=`
${l}
`}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}fA.CLASS_NAME="line-numbers";Kl((u,e)=>{const t=u.getColor(wtt),n=u.getColor(Htt);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});class L3 extends vs{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,this._domNode=ku(document.createElement("div")),this._domNode.setClassName(L3.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=ku(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(L3.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);return this._canUseLayerHinting=!t.get(32),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}L3.CLASS_NAME="glyph-margin";L3.OUTER_CLASS_NAME="margin";const lx="monaco-mouse-cursor-text";class out{constructor(){this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}const Xb=new out,qu=Ut("keybindingService");var sut=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lut=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class cut{constructor(e,t,n,i,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=i,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new ee(this.modelLineNumber,this.distanceToModelLineStart+1),n=new ee(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const Sj=T0;let OW=class extends vs{constructor(e,t,n,i){super(e),this._keybindingService=i,this._primaryCursorPosition=new ee(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const r=this._context.configuration.options,a=r.get(143);this._setAccessibilityOptions(r),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=r.get(50),this._lineHeight=r.get(66),this._emptySelectionClipboard=r.get(37),this._copyWithSyntaxHighlighting=r.get(25),this._visibleTextArea=null,this._selections=[new Ye(1,1,1,1)],this._modelSelections=[new Ye(1,1,1,1)],this._lastRenderPosition=null,this.textArea=ku(document.createElement("textarea")),_1.write(this.textArea,6),this.textArea.setClassName(`inputarea ${lx}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:o}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${o*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(r)),this.textArea.setAttribute("aria-required",r.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(r.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",v("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",r.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=ku(document.createElement("div")),this.textAreaCover.setPosition("absolute");const s={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:d=>this._context.viewModel.getLineMaxColumn(d),getValueInRange:(d,h)=>this._context.viewModel.getValueInRange(d,h),getValueLengthInRange:(d,h)=>this._context.viewModel.getValueLengthInRange(d,h),modifyPosition:(d,h)=>this._context.viewModel.modifyPosition(d,h)},l={getDataToCopy:()=>{const d=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,na),h=this._context.viewModel.model.getEOL(),E=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),m=Array.isArray(d)?d:null,g=Array.isArray(d)?d.join(h):d;let f,p=null;if(PW.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&g.length<65536){const D=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);D&&(f=D.html,p=D.mode)}return{isFromEmptySelection:E,multicursorText:m,text:g,html:f,mode:p}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const d=this._selections[0];if(iu&&d.isEmpty()){const E=d.getStartPosition();let m=this._getWordBeforePosition(E);if(m.length===0&&(m=this._getCharacterBeforePosition(E)),m.length>0)return new Fr(m,m.length,m.length,j.fromPositions(E),0)}const h=500;if(iu&&!d.isEmpty()&&s.getValueLengthInRange(d,0)0)return new Fr(E,m,m,j.fromPositions(h),0)}return Fr.EMPTY}return D5.fromEditorSelection(s,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(d,h,E)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(d,h,E)},c=this._register(new ktt(this.textArea.domNode));this._textAreaInput=this._register(new btt(l,c,Os,{isAndroid:nae,isChrome:qQ,isFirefox:T0,isSafari:l4})),this._register(this._textAreaInput.onKeyDown(d=>{this._viewController.emitKeyDown(d)})),this._register(this._textAreaInput.onKeyUp(d=>{this._viewController.emitKeyUp(d)})),this._register(this._textAreaInput.onPaste(d=>{let h=!1,E=null,m=null;d.metadata&&(h=this._emptySelectionClipboard&&!!d.metadata.isFromEmptySelection,E=typeof d.metadata.multicursorText<"u"?d.metadata.multicursorText:null,m=d.metadata.mode),this._viewController.paste(d.text,h,E,m)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(d=>{d.replacePrevCharCnt||d.replaceNextCharCnt||d.positionDelta?this._viewController.compositionType(d.text,d.replacePrevCharCnt,d.replaceNextCharCnt,d.positionDelta):this._viewController.type(d.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(d=>{this._viewController.setSelection(d)})),this._register(this._textAreaInput.onCompositionStart(d=>{const h=this.textArea.domNode,E=this._modelSelections[0],{distanceToModelLineStart:m,widthOfHiddenTextBefore:g}=(()=>{const p=h.value.substring(0,Math.min(h.selectionStart,h.selectionEnd)),D=p.lastIndexOf(` `),x=p.substring(D+1),b=x.lastIndexOf(" "),k=x.length-b-1,A=E.getStartPosition(),F=Math.min(A.column-1,k),S=A.column-1-F,w=x.substring(0,x.length-F),{tabSize:z}=this._context.viewModel.model.getOptions(),N=dut(this.textArea.domNode.ownerDocument,w,this._fontInfo,z);return{distanceToModelLineStart:S,widthOfHiddenTextBefore:N}})(),{distanceToModelLineEnd:f}=(()=>{const p=h.value.substring(Math.max(h.selectionStart,h.selectionEnd)),D=p.indexOf(` -`),x=D===-1?p:p.substring(0,D),b=x.indexOf(" "),k=b===-1?x.length:x.length-b-1,A=E.getEndPosition(),F=Math.min(this._context.viewModel.model.getLineMaxColumn(A.lineNumber)-A.column,k);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(A.lineNumber)-A.column-F}})();this._context.viewModel.revealRange("keyboard",!0,j.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new cut(this._context,E.startLineNumber,m,g,f),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${lx} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(d=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${lx}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Xb.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),i=P0(t);let r=!0,a=e.column,o=!0,s=e.column,l=0;for(;l<50&&(r||o);){if(r&&a<=1&&(r=!1),r){const c=n.charCodeAt(a-2);i.get(c)!==0?r=!1:a--}if(o&&s>n.length&&(o=!1),o){const c=n.charCodeAt(s-1);i.get(c)!==0?o=!1:s++}l++}return[n.substring(a-1,s-1),e.column-a]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),n=P0(this._context.configuration.options.get(129));let i=e.column,r=0;for(;i>1;){const a=t.charCodeAt(i-2);if(n.get(a)!==0||r>50)return t.substring(i-1,e.column-1);r++,i--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!ur(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){var t,n,i;if(e.get(2)===1){const a=(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||t===void 0?void 0:t.getAriaLabel(),o=(n=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||n===void 0?void 0:n.getAriaLabel(),s=(i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||i===void 0?void 0:i.getAriaLabel(),l=v("accessibilityModeOff","The editor is not accessible at this time.");return a?v("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",l,a):o?v("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",l,o):s?v("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",l,s):l}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===cd.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(143).wrappingColumn;if(i!==-1&&this._accessibilitySupport!==1){const r=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*r.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=Sj?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:i}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${i*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Xb.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new ee(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,a=this._visibleTextArea.startPosition,o=this._visibleTextArea.endPosition;if(a&&o&&i&&r&&r.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,d=this._contentLeft+i.left-this._scrollLeft,h=r.left-i.left+1;if(dthis._contentWidth&&(h=this._contentWidth);const E=this._context.viewModel.getViewLineData(a.lineNumber),m=E.tokens.findTokenIndexAtOffset(a.column-1),g=E.tokens.findTokenIndexAtOffset(o.column-1),f=m===g,p=this._visibleTextArea.definePresentation(f?E.tokens.getPresentation(m):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:s,left:d,width:h,height:this._lineHeight,useCover:!1,color:(qn.getColorMap()||[])[p.foreground],italic:p.italic,bold:p.bold,underline:p.underline,strikethrough:p.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(iu){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:Sj?0:1,useCover:!1})}_newlinecount(e){let t=0,n=-1;do{if(n=e.indexOf(` -`,n+1),n===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:Sj?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,n=this.textAreaCover;ea(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?ae.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);const i=this._context.configuration.options;i.get(57)?n.setClassName("monaco-editor-background textAreaCover "+L3.OUTER_CLASS_NAME):i.get(67).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+fA.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};OW=sut([lut(3,qu)],OW);function dut(u,e,t,n){if(e.length===0)return 0;const i=u.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const r=u.createElement("span");ea(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),i.appendChild(r),u.body.appendChild(i);const a=r.offsetWidth;return u.body.removeChild(i),a}function hut(u,e,t){let n=0;for(let r=0;r!0,mut=()=>!1,gut=u=>u===" "||u===" ";class hD{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,n,i){var r;this.languageConfigurationService=i,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const a=n.options,o=a.get(143),s=a.get(50);this.readOnly=a.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=a.get(115),this.lineHeight=s.lineHeight,this.typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=a.get(127),this.wordSeparators=a.get(129),this.emptySelectionClipboard=a.get(37),this.copyWithSyntaxHighlighting=a.get(25),this.multiCursorMergeOverlapping=a.get(76),this.multiCursorPaste=a.get(78),this.multiCursorLimit=a.get(79),this.autoClosingBrackets=a.get(6),this.autoClosingComments=a.get(7),this.autoClosingQuotes=a.get(11),this.autoClosingDelete=a.get(9),this.autoClosingOvertype=a.get(10),this.autoSurround=a.get(14),this.autoIndent=a.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const d of l)this.surroundingPairs[d.open]=d.close;const c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(r=c==null?void 0:c.blockCommentStartToken)!==null&&r!==void 0?r:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(const n of t)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,t,n){const i=eP(t,n-1),r=this.languageConfigurationService.getLanguageConfiguration(i.languageId).electricCharacter;return r?r.onElectricCharacter(e,i,n-i.firstCharOffset):null}normalizeIndentation(e){return IB(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return gut;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return Eut;case"never":return mut}}_getLanguageDefinedShouldAutoClose(e,t){const n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return i=>n.indexOf(i)!==-1}visibleColumnFromColumn(e,t){return Ki.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){const i=Ki.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),r=e.getLineMinColumn(t);if(ia?a:i}}let du=class kCe{static fromModelState(e){return new fut(e)}static fromViewState(e){return new put(e)}static fromModelSelection(e){const t=Ye.liftSelection(e),n=new _r(j.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return kCe.fromModelState(n)}static fromModelSelections(e){const t=[];for(let n=0,i=e.length;nr,l=i>a,c=ia||pi||f0&&i--,yf.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,i)}static columnSelectRight(e,t,n){let i=0;const r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),a=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let s=r;s<=a;s++){const l=t.getLineMaxColumn(s),c=e.visibleColumnFromColumn(t,new ee(s,l));i=Math.max(i,c)}let o=n.toViewVisualColumn;return oe.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Pve(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const n=t.lineNumber-1;return new ee(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const i=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),a=Ak.atomicPosition(r,t.column-1,n,0);if(a!==-1&&a+1>=i)return new ee(t.lineNumber,a+1)}return this.leftPosition(e,t)}static left(e,t,n){const i=e.stickyTabStops?Au.leftPositionAtomicSoftTabs(t,n,e.tabSize):Au.leftPosition(t,n);return new Bj(i.lineNumber,i.column,0)}static moveLeft(e,t,n,i,r){let a,o;if(n.hasSelection()&&!i)a=n.selection.startLineNumber,o=n.selection.startColumn;else{const s=n.position.delta(void 0,-(r-1)),l=t.normalizePosition(Au.clipPositionColumn(s,t),0),c=Au.left(e,t,l);a=c.lineNumber,o=c.column}return n.move(i,a,o,0)}static clipPositionColumn(e,t){return new ee(e.lineNumber,Au.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nc?(n=c,o?i=t.getLineMaxColumn(n):i=Math.min(t.getLineMaxColumn(n),i)):i=e.columnFromVisibleColumn(t,n,l),E?r=0:r=l-Ki.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),s!==void 0){const m=new ee(n,i),g=t.normalizePosition(m,s);r=r+(i-g.column),n=g.lineNumber,i=g.column}return new Bj(n,i,r)}static down(e,t,n,i,r,a,o){return this.vertical(e,t,n,i,r,n+a,o,4)}static moveDown(e,t,n,i,r){let a,o;n.hasSelection()&&!i?(a=n.selection.endLineNumber,o=n.selection.endColumn):(a=n.position.lineNumber,o=n.position.column);let s=0,l;do if(l=Au.down(e,t,a+s,o,n.leftoverVisibleColumns,r,!0),t.normalizePosition(new ee(l.lineNumber,l.column),2).lineNumber>a)break;while(s++<10&&a+s1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return n.move(i,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,n,i){const r=t.getLineCount();let a=n.position.lineNumber;for(;a=h.length+1)return!1;const E=h.charAt(d.column-2),m=i.get(E);if(!m)return!1;if(tE(E)){if(n==="never")return!1}else if(t==="never")return!1;const g=h.charAt(d.column-1);let f=!1;for(const p of m)p.open===E&&p.close===g&&(f=!0);if(!f)return!1;if(e==="auto"){let p=!1;for(let D=0,x=o.length;D1){const r=t.getLineContent(i.lineNumber),a=Ta(r),o=a===-1?r.length+1:a+1;if(i.column<=o){const s=n.visibleColumnFromColumn(t,i),l=Ki.prevIndentTabStop(s,n.indentSize),c=n.columnFromVisibleColumn(t,i.lineNumber,l);return new j(i.lineNumber,c,i.lineNumber,i.column)}}return j.fromPositions(z3.getPositionAfterDeleteLeft(i,t),i)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const n=wqe(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){const n=e.lineNumber-1;return new ee(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){const i=[];let r=null;n.sort((a,o)=>ee.compare(a.getStartPosition(),o.getEndPosition()));for(let a=0,o=n.length;a1&&(r==null?void 0:r.endLineNumber)!==l.lineNumber?(c=l.lineNumber-1,d=t.getLineMaxColumn(l.lineNumber-1),h=l.lineNumber,E=t.getLineMaxColumn(l.lineNumber)):(c=l.lineNumber,d=1,h=l.lineNumber,E=t.getLineMaxColumn(l.lineNumber));const m=new j(c,d,h,E);r=m,m.isEmpty()?i[a]=null:i[a]=new Gr(m,"")}else i[a]=null;else i[a]=new Gr(s,"")}return new vo(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class vu{static _createWord(e,t,n,i,r){return{start:i,end:r,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){const i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)}static _doFindPreviousWordOnLine(e,t,n){let i=0;for(let r=n.column-2;r>=0;r--){const a=e.charCodeAt(r),o=t.get(a);if(o===0){if(i===2)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=1}else if(o===2){if(i===1)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=2}else if(o===1&&i!==0)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1))}return i!==0?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null}static _findEndOfWord(e,t,n,i){const r=e.length;for(let a=i;a=0;r--){const a=e.charCodeAt(r),o=t.get(a);if(o===1||n===1&&o===2||n===2&&o===0)return r+1}return 0}static moveWordLeft(e,t,n,i){let r=n.lineNumber,a=n.column;a===1&&r>1&&(r=r-1,a=t.getLineMaxColumn(r));let o=vu._findPreviousWordOnLine(e,t,new ee(r,a));if(i===0)return new ee(r,o?o.start+1:1);if(i===1)return o&&o.wordType===2&&o.end-o.start===1&&o.nextCharClass===0&&(o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1))),new ee(r,o?o.start+1:1);if(i===3){for(;o&&o.wordType===2;)o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1));return new ee(r,o?o.start+1:1)}return o&&a<=o.end+1&&(o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1))),new ee(r,o?o.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===1)return n>1?new ee(n-1,e.getLineMaxColumn(n-1)):t;const r=e.getLineContent(n);for(let a=t.column-1;a>1;a--){const o=r.charCodeAt(a-2),s=r.charCodeAt(a-1);if(o===95&&s!==95)return new ee(n,a);if(o===45&&s!==45)return new ee(n,a);if((_E(o)||W7(o))&&Pd(s))return new ee(n,a);if(Pd(o)&&Pd(s)&&a+1=s.start+1&&(s=vu._findNextWordOnLine(e,t,new ee(r,s.end+1))),s?a=s.start+1:a=t.getLineMaxColumn(r);return new ee(r,a)}static _moveWordPartRight(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n1?l=1:(s--,l=i.getLineMaxColumn(s)):(c&&l<=c.end+1&&(c=vu._findPreviousWordOnLine(n,i,new ee(s,c.start+1))),c?l=c.end+1:l>1?l=1:(s--,l=i.getLineMaxColumn(s))),new j(s,l,o.lineNumber,o.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;const i=new ee(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(t,i);return r||this._deleteInsideWordDetermineDeleteRange(e,t,i)}static _charAtIsWhitespace(e,t){const n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=n.length;if(i===0)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let a=Math.min(t.column-1,i-1);if(!this._charAtIsWhitespace(n,a))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;a+11?new j(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberd.start+1<=n.column&&n.column<=d.end+1,o=(d,h)=>(d=Math.min(d,n.column),h=Math.max(h,n.column),new j(n.lineNumber,d,n.lineNumber,h)),s=d=>{let h=d.start+1,E=d.end+1,m=!1;for(;E-11&&this._charAtIsWhitespace(i,h-2);)h--;return o(h,E)},l=vu._findPreviousWordOnLine(e,t,n);if(l&&a(l))return s(l);const c=vu._findNextWordOnLine(e,t,n);return c&&a(c)?s(c):l&&c?o(l.end+1,c.start+1):l?o(l.start+1,l.end+1):c?o(c.start+1,c.end+1):o(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=vu._moveWordPartLeft(e,n);return new j(n.lineNumber,n.column,i.lineNumber,i.column)}static _findFirstNonWhitespaceChar(e,t){const n=e.length;for(let i=t;i=h.start+1&&(h=vu._findNextWordOnLine(n,i,new ee(s,h.end+1))),h?l=h.start+1:l!!e)}class br{static addCursorDown(e,t,n){const i=[];let r=0;for(let a=0,o=t.length;al&&(c=l,d=e.model.getLineMaxColumn(c)),du.fromModelState(new _r(new j(a.lineNumber,1,c,d),2,0,new ee(c,d),0))}const s=t.modelState.selectionStart.getStartPosition().lineNumber;if(a.lineNumbers){const l=e.getLineCount();let c=o.lineNumber+1,d=1;return c>l&&(c=l,d=e.getLineMaxColumn(c)),du.fromViewState(t.viewState.move(!0,c,d,0))}else{const l=t.modelState.selectionStart.getEndPosition();return du.fromModelState(t.modelState.move(!0,l.lineNumber,l.column,0))}}static word(e,t,n,i){const r=e.model.validatePosition(i);return du.fromModelState(vu.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new du(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,i=t.viewState.position.column;return du.fromViewState(new _r(new j(n,i,n,i),0,0,new ee(n,i),0))}static moveTo(e,t,n,i,r){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,i);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,i,r)}const a=e.model.validatePosition(i),o=r?e.coordinatesConverter.validateViewPosition(new ee(r.lineNumber,r.column),a):e.coordinatesConverter.convertModelPositionToViewPosition(a);return du.fromViewState(t.viewState.move(n,o.lineNumber,o.column,0))}static simpleMove(e,t,n,i,r,a){switch(n){case 0:return a===4?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,r);case 1:return a===4?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,r);case 2:return a===2?this._moveUpByViewLines(e,t,i,r):this._moveUpByModelLines(e,t,i,r);case 3:return a===2?this._moveDownByViewLines(e,t,i,r):this._moveDownByModelLines(e,t,i,r);case 4:return a===2?t.map(o=>du.fromViewState(Au.moveToPrevBlankLine(e.cursorConfig,e,o.viewState,i))):t.map(o=>du.fromModelState(Au.moveToPrevBlankLine(e.cursorConfig,e.model,o.modelState,i)));case 5:return a===2?t.map(o=>du.fromViewState(Au.moveToNextBlankLine(e.cursorConfig,e,o.viewState,i))):t.map(o=>du.fromModelState(Au.moveToNextBlankLine(e.cursorConfig,e.model,o.modelState,i)));case 6:return this._moveToViewMinColumn(e,t,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 8:return this._moveToViewCenterColumn(e,t,i);case 9:return this._moveToViewMaxColumn(e,t,i);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,i);default:return null}}static viewportMove(e,t,n,i,r){const a=e.getCompletelyVisibleViewRange(),o=e.coordinatesConverter.convertViewRangeToModelRange(a);switch(n){case 11:{const s=this._firstLineNumberInRange(e.model,o,r),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 13:{const s=this._lastLineNumberInRange(e.model,o,r),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 12:{const s=Math.round((o.startLineNumber+o.endLineNumber)/2),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 14:{const s=[];for(let l=0,c=t.length;ln.endLineNumber-1?a=n.endLineNumber-1:rdu.fromViewState(Au.moveLeft(e.cursorConfig,e,r.viewState,n,i)))}static _moveHalfLineLeft(e,t,n){const i=[];for(let r=0,a=t.length;rdu.fromViewState(Au.moveRight(e.cursorConfig,e,r.viewState,n,i)))}static _moveHalfLineRight(e,t,n){const i=[];for(let r=0,a=t.length;r{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${lx}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(Xb.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(e){this._textAreaInput.writeScreenReaderContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),i=R0(t);let r=!0,a=e.column,o=!0,s=e.column,l=0;for(;l<50&&(r||o);){if(r&&a<=1&&(r=!1),r){const c=n.charCodeAt(a-2);i.get(c)!==0?r=!1:a--}if(o&&s>n.length&&(o=!1),o){const c=n.charCodeAt(s-1);i.get(c)!==0?o=!1:s++}l++}return[n.substring(a-1,s-1),e.column-a]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),n=R0(this._context.configuration.options.get(129));let i=e.column,r=0;for(;i>1;){const a=t.charCodeAt(i-2);if(n.get(a)!==0||r>50)return t.substring(i-1,e.column-1);r++,i--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!ur(n.charCodeAt(0)))return n}return""}_getAriaLabel(e){var t,n,i;if(e.get(2)===1){const a=(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||t===void 0?void 0:t.getAriaLabel(),o=(n=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||n===void 0?void 0:n.getAriaLabel(),s=(i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||i===void 0?void 0:i.getAriaLabel(),l=v("accessibilityModeOff","The editor is not accessible at this time.");return a?v("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",l,a):o?v("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",l,o):s?v("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",l,s):l}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===cd.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(143).wrappingColumn;if(i!==-1&&this._accessibilitySupport!==1){const r=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*r.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=Sj?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(50),this._lineHeight=t.get(66),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:i}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${i*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(123))),(e.hasChanged(34)||e.hasChanged(90))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Xb.enabled||e.get(34)&&e.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new ee(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,r=this._visibleTextArea.visibleTextareaEnd,a=this._visibleTextArea.startPosition,o=this._visibleTextArea.endPosition;if(a&&o&&i&&r&&r.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,d=this._contentLeft+i.left-this._scrollLeft,h=r.left-i.left+1;if(dthis._contentWidth&&(h=this._contentWidth);const E=this._context.viewModel.getViewLineData(a.lineNumber),m=E.tokens.findTokenIndexAtOffset(a.column-1),g=E.tokens.findTokenIndexAtOffset(o.column-1),f=m===g,p=this._visibleTextArea.definePresentation(f?E.tokens.getPresentation(m):null);this.textArea.domNode.scrollTop=l*this._lineHeight,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:s,left:d,width:h,height:this._lineHeight,useCover:!1,color:(qn.getColorMap()||[])[p.foreground],italic:p.italic,bold:p.bold,underline:p.underline,strikethrough:p.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(iu){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&e!==void 0?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:n,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:Sj?0:1,useCover:!1})}_newlinecount(e){let t=0,n=-1;do{if(n=e.indexOf(` +`,n+1),n===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:Sj?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,n=this.textAreaCover;ea(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?ae.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);const i=this._context.configuration.options;i.get(57)?n.setClassName("monaco-editor-background textAreaCover "+L3.OUTER_CLASS_NAME):i.get(67).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+fA.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};OW=sut([lut(3,qu)],OW);function dut(u,e,t,n){if(e.length===0)return 0;const i=u.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const r=u.createElement("span");ea(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),i.appendChild(r),u.body.appendChild(i);const a=r.offsetWidth;return u.body.removeChild(i),a}function hut(u,e,t){let n=0;for(let r=0;r!0,mut=()=>!1,gut=u=>u===" "||u===" ";class hD{static shouldRecreate(e){return e.hasChanged(143)||e.hasChanged(129)||e.hasChanged(37)||e.hasChanged(76)||e.hasChanged(78)||e.hasChanged(79)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(127)||e.hasChanged(50)||e.hasChanged(90)}constructor(e,t,n,i){var r;this.languageConfigurationService=i,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const a=n.options,o=a.get(143),s=a.get(50);this.readOnly=a.get(90),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=a.get(115),this.lineHeight=s.lineHeight,this.typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=a.get(127),this.wordSeparators=a.get(129),this.emptySelectionClipboard=a.get(37),this.copyWithSyntaxHighlighting=a.get(25),this.multiCursorMergeOverlapping=a.get(76),this.multiCursorPaste=a.get(78),this.multiCursorLimit=a.get(79),this.autoClosingBrackets=a.get(6),this.autoClosingComments=a.get(7),this.autoClosingQuotes=a.get(11),this.autoClosingDelete=a.get(9),this.autoClosingOvertype=a.get(10),this.autoSurround=a.get(14),this.autoIndent=a.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const d of l)this.surroundingPairs[d.open]=d.close;const c=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=(r=c==null?void 0:c.blockCommentStartToken)!==null&&r!==void 0?r:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||e===void 0?void 0:e.getElectricCharacters();if(t)for(const n of t)this._electricChars[n]=!0}return this._electricChars}onElectricCharacter(e,t,n){const i=eP(t,n-1),r=this.languageConfigurationService.getLanguageConfiguration(i.languageId).electricCharacter;return r?r.onElectricCharacter(e,i,n-i.firstCharOffset):null}normalizeIndentation(e){return IB(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,n){switch(t){case"beforeWhitespace":return gut;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,n);case"always":return Eut;case"never":return mut}}_getLanguageDefinedShouldAutoClose(e,t){const n=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return i=>n.indexOf(i)!==-1}visibleColumnFromColumn(e,t){return Ki.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,n){const i=Ki.columnFromVisibleColumn(e.getLineContent(t),n,this.tabSize),r=e.getLineMinColumn(t);if(ia?a:i}}let du=class kCe{static fromModelState(e){return new fut(e)}static fromViewState(e){return new put(e)}static fromModelSelection(e){const t=Ye.liftSelection(e),n=new _r(j.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return kCe.fromModelState(n)}static fromModelSelections(e){const t=[];for(let n=0,i=e.length;nr,l=i>a,c=ia||pi||f0&&i--,yf.columnSelect(e,t,n.fromViewLineNumber,n.fromViewVisualColumn,n.toViewLineNumber,i)}static columnSelectRight(e,t,n){let i=0;const r=Math.min(n.fromViewLineNumber,n.toViewLineNumber),a=Math.max(n.fromViewLineNumber,n.toViewLineNumber);for(let s=r;s<=a;s++){const l=t.getLineMaxColumn(s),c=e.visibleColumnFromColumn(t,new ee(s,l));i=Math.max(i,c)}let o=n.toViewVisualColumn;return oe.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Pve(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const n=t.lineNumber-1;return new ee(n,e.getLineMaxColumn(n))}else return t}static leftPositionAtomicSoftTabs(e,t,n){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const i=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),a=Ak.atomicPosition(r,t.column-1,n,0);if(a!==-1&&a+1>=i)return new ee(t.lineNumber,a+1)}return this.leftPosition(e,t)}static left(e,t,n){const i=e.stickyTabStops?Au.leftPositionAtomicSoftTabs(t,n,e.tabSize):Au.leftPosition(t,n);return new Bj(i.lineNumber,i.column,0)}static moveLeft(e,t,n,i,r){let a,o;if(n.hasSelection()&&!i)a=n.selection.startLineNumber,o=n.selection.startColumn;else{const s=n.position.delta(void 0,-(r-1)),l=t.normalizePosition(Au.clipPositionColumn(s,t),0),c=Au.left(e,t,l);a=c.lineNumber,o=c.column}return n.move(i,a,o,0)}static clipPositionColumn(e,t){return new ee(e.lineNumber,Au.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,n){return en?n:e}static rightPosition(e,t,n){return nc?(n=c,o?i=t.getLineMaxColumn(n):i=Math.min(t.getLineMaxColumn(n),i)):i=e.columnFromVisibleColumn(t,n,l),E?r=0:r=l-Ki.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),s!==void 0){const m=new ee(n,i),g=t.normalizePosition(m,s);r=r+(i-g.column),n=g.lineNumber,i=g.column}return new Bj(n,i,r)}static down(e,t,n,i,r,a,o){return this.vertical(e,t,n,i,r,n+a,o,4)}static moveDown(e,t,n,i,r){let a,o;n.hasSelection()&&!i?(a=n.selection.endLineNumber,o=n.selection.endColumn):(a=n.position.lineNumber,o=n.position.column);let s=0,l;do if(l=Au.down(e,t,a+s,o,n.leftoverVisibleColumns,r,!0),t.normalizePosition(new ee(l.lineNumber,l.column),2).lineNumber>a)break;while(s++<10&&a+s1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return n.move(i,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,n,i){const r=t.getLineCount();let a=n.position.lineNumber;for(;a=h.length+1)return!1;const E=h.charAt(d.column-2),m=i.get(E);if(!m)return!1;if(tE(E)){if(n==="never")return!1}else if(t==="never")return!1;const g=h.charAt(d.column-1);let f=!1;for(const p of m)p.open===E&&p.close===g&&(f=!0);if(!f)return!1;if(e==="auto"){let p=!1;for(let D=0,x=o.length;D1){const r=t.getLineContent(i.lineNumber),a=Ta(r),o=a===-1?r.length+1:a+1;if(i.column<=o){const s=n.visibleColumnFromColumn(t,i),l=Ki.prevIndentTabStop(s,n.indentSize),c=n.columnFromVisibleColumn(t,i.lineNumber,l);return new j(i.lineNumber,c,i.lineNumber,i.column)}}return j.fromPositions(z3.getPositionAfterDeleteLeft(i,t),i)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const n=wqe(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,n+1)}else if(e.lineNumber>1){const n=e.lineNumber-1;return new ee(n,t.getLineMaxColumn(n))}else return e}static cut(e,t,n){const i=[];let r=null;n.sort((a,o)=>ee.compare(a.getStartPosition(),o.getEndPosition()));for(let a=0,o=n.length;a1&&(r==null?void 0:r.endLineNumber)!==l.lineNumber?(c=l.lineNumber-1,d=t.getLineMaxColumn(l.lineNumber-1),h=l.lineNumber,E=t.getLineMaxColumn(l.lineNumber)):(c=l.lineNumber,d=1,h=l.lineNumber,E=t.getLineMaxColumn(l.lineNumber));const m=new j(c,d,h,E);r=m,m.isEmpty()?i[a]=null:i[a]=new Gr(m,"")}else i[a]=null;else i[a]=new Gr(s,"")}return new vo(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class vu{static _createWord(e,t,n,i,r){return{start:i,end:r,wordType:t,nextCharClass:n}}static _findPreviousWordOnLine(e,t,n){const i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n)}static _doFindPreviousWordOnLine(e,t,n){let i=0;for(let r=n.column-2;r>=0;r--){const a=e.charCodeAt(r),o=t.get(a);if(o===0){if(i===2)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=1}else if(o===2){if(i===1)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1));i=2}else if(o===1&&i!==0)return this._createWord(e,i,o,r+1,this._findEndOfWord(e,t,i,r+1))}return i!==0?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null}static _findEndOfWord(e,t,n,i){const r=e.length;for(let a=i;a=0;r--){const a=e.charCodeAt(r),o=t.get(a);if(o===1||n===1&&o===2||n===2&&o===0)return r+1}return 0}static moveWordLeft(e,t,n,i){let r=n.lineNumber,a=n.column;a===1&&r>1&&(r=r-1,a=t.getLineMaxColumn(r));let o=vu._findPreviousWordOnLine(e,t,new ee(r,a));if(i===0)return new ee(r,o?o.start+1:1);if(i===1)return o&&o.wordType===2&&o.end-o.start===1&&o.nextCharClass===0&&(o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1))),new ee(r,o?o.start+1:1);if(i===3){for(;o&&o.wordType===2;)o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1));return new ee(r,o?o.start+1:1)}return o&&a<=o.end+1&&(o=vu._findPreviousWordOnLine(e,t,new ee(r,o.start+1))),new ee(r,o?o.end+1:1)}static _moveWordPartLeft(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===1)return n>1?new ee(n-1,e.getLineMaxColumn(n-1)):t;const r=e.getLineContent(n);for(let a=t.column-1;a>1;a--){const o=r.charCodeAt(a-2),s=r.charCodeAt(a-1);if(o===95&&s!==95)return new ee(n,a);if(o===45&&s!==45)return new ee(n,a);if((_E(o)||W7(o))&&Pd(s))return new ee(n,a);if(Pd(o)&&Pd(s)&&a+1=s.start+1&&(s=vu._findNextWordOnLine(e,t,new ee(r,s.end+1))),s?a=s.start+1:a=t.getLineMaxColumn(r);return new ee(r,a)}static _moveWordPartRight(e,t){const n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n1?l=1:(s--,l=i.getLineMaxColumn(s)):(c&&l<=c.end+1&&(c=vu._findPreviousWordOnLine(n,i,new ee(s,c.start+1))),c?l=c.end+1:l>1?l=1:(s--,l=i.getLineMaxColumn(s))),new j(s,l,o.lineNumber,o.column)}static deleteInsideWord(e,t,n){if(!n.isEmpty())return n;const i=new ee(n.positionLineNumber,n.positionColumn),r=this._deleteInsideWordWhitespace(t,i);return r||this._deleteInsideWordDetermineDeleteRange(e,t,i)}static _charAtIsWhitespace(e,t){const n=e.charCodeAt(t);return n===32||n===9}static _deleteInsideWordWhitespace(e,t){const n=e.getLineContent(t.lineNumber),i=n.length;if(i===0)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(n,r))return null;let a=Math.min(t.column-1,i-1);if(!this._charAtIsWhitespace(n,a))return null;for(;r>0&&this._charAtIsWhitespace(n,r-1);)r--;for(;a+11?new j(n.lineNumber-1,t.getLineMaxColumn(n.lineNumber-1),n.lineNumber,1):n.lineNumberd.start+1<=n.column&&n.column<=d.end+1,o=(d,h)=>(d=Math.min(d,n.column),h=Math.max(h,n.column),new j(n.lineNumber,d,n.lineNumber,h)),s=d=>{let h=d.start+1,E=d.end+1,m=!1;for(;E-11&&this._charAtIsWhitespace(i,h-2);)h--;return o(h,E)},l=vu._findPreviousWordOnLine(e,t,n);if(l&&a(l))return s(l);const c=vu._findNextWordOnLine(e,t,n);return c&&a(c)?s(c):l&&c?o(l.end+1,c.start+1):l?o(l.start+1,l.end+1):c?o(c.start+1,c.end+1):o(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const n=t.getPosition(),i=vu._moveWordPartLeft(e,n);return new j(n.lineNumber,n.column,i.lineNumber,i.column)}static _findFirstNonWhitespaceChar(e,t){const n=e.length;for(let i=t;i=h.start+1&&(h=vu._findNextWordOnLine(n,i,new ee(s,h.end+1))),h?l=h.start+1:l!!e)}class br{static addCursorDown(e,t,n){const i=[];let r=0;for(let a=0,o=t.length;al&&(c=l,d=e.model.getLineMaxColumn(c)),du.fromModelState(new _r(new j(a.lineNumber,1,c,d),2,0,new ee(c,d),0))}const s=t.modelState.selectionStart.getStartPosition().lineNumber;if(a.lineNumbers){const l=e.getLineCount();let c=o.lineNumber+1,d=1;return c>l&&(c=l,d=e.getLineMaxColumn(c)),du.fromViewState(t.viewState.move(!0,c,d,0))}else{const l=t.modelState.selectionStart.getEndPosition();return du.fromModelState(t.modelState.move(!0,l.lineNumber,l.column,0))}}static word(e,t,n,i){const r=e.model.validatePosition(i);return du.fromModelState(vu.word(e.cursorConfig,e.model,t.modelState,n,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new du(t.modelState,t.viewState);const n=t.viewState.position.lineNumber,i=t.viewState.position.column;return du.fromViewState(new _r(new j(n,i,n,i),0,0,new ee(n,i),0))}static moveTo(e,t,n,i,r){if(n){if(t.modelState.selectionStartKind===1)return this.word(e,t,n,i);if(t.modelState.selectionStartKind===2)return this.line(e,t,n,i,r)}const a=e.model.validatePosition(i),o=r?e.coordinatesConverter.validateViewPosition(new ee(r.lineNumber,r.column),a):e.coordinatesConverter.convertModelPositionToViewPosition(a);return du.fromViewState(t.viewState.move(n,o.lineNumber,o.column,0))}static simpleMove(e,t,n,i,r,a){switch(n){case 0:return a===4?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,r);case 1:return a===4?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,r);case 2:return a===2?this._moveUpByViewLines(e,t,i,r):this._moveUpByModelLines(e,t,i,r);case 3:return a===2?this._moveDownByViewLines(e,t,i,r):this._moveDownByModelLines(e,t,i,r);case 4:return a===2?t.map(o=>du.fromViewState(Au.moveToPrevBlankLine(e.cursorConfig,e,o.viewState,i))):t.map(o=>du.fromModelState(Au.moveToPrevBlankLine(e.cursorConfig,e.model,o.modelState,i)));case 5:return a===2?t.map(o=>du.fromViewState(Au.moveToNextBlankLine(e.cursorConfig,e,o.viewState,i))):t.map(o=>du.fromModelState(Au.moveToNextBlankLine(e.cursorConfig,e.model,o.modelState,i)));case 6:return this._moveToViewMinColumn(e,t,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 8:return this._moveToViewCenterColumn(e,t,i);case 9:return this._moveToViewMaxColumn(e,t,i);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,i);default:return null}}static viewportMove(e,t,n,i,r){const a=e.getCompletelyVisibleViewRange(),o=e.coordinatesConverter.convertViewRangeToModelRange(a);switch(n){case 11:{const s=this._firstLineNumberInRange(e.model,o,r),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 13:{const s=this._lastLineNumberInRange(e.model,o,r),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 12:{const s=Math.round((o.startLineNumber+o.endLineNumber)/2),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],i,s,l)]}case 14:{const s=[];for(let l=0,c=t.length;ln.endLineNumber-1?a=n.endLineNumber-1:rdu.fromViewState(Au.moveLeft(e.cursorConfig,e,r.viewState,n,i)))}static _moveHalfLineLeft(e,t,n){const i=[];for(let r=0,a=t.length;rdu.fromViewState(Au.moveRight(e.cursorConfig,e,r.viewState,n,i)))}static _moveHalfLineRight(e,t,n){const i=[];for(let r=0,a=t.length;r1&&i.firstCharOffset===0){const g=nx(e,t.startLineNumber-1);g.languageId===i.languageId&&(l=g.getLineContent())}const c=r.onEnter(u,l,o,s);if(!c)return null;const d=c.indentAction;let h=c.appendText;const E=c.removeText||0;h?d===wi.Indent&&(h=" "+h):d===wi.Indent||d===wi.IndentOutdent?h=" ":h="";let m=L6e(e,t.startLineNumber,t.startColumn);return E&&(m=m.substring(0,m.length-E)),{indentAction:d,appendText:h,removeText:E,indentation:m}}var xut=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vut=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},YS;const wj=Object.create(null);function Vg(u,e){if(e<=0)return"";wj[u]||(wj[u]=["",u]);const t=wj[u];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+u;return t[e]}let p0=YS=class{static unshiftIndent(e,t,n,i,r){const a=Ki.visibleColumnFromColumn(e,t,n);if(r){const o=Vg(" ",i),l=Ki.prevIndentTabStop(a,i)/i;return Vg(o,l)}else{const o=" ",l=Ki.prevRenderTabStop(a,n)/n;return Vg(o,l)}}static shiftIndent(e,t,n,i,r){const a=Ki.visibleColumnFromColumn(e,t,n);if(r){const o=Vg(" ",i),l=Ki.nextIndentTabStop(a,i)/i;return Vg(o,l)}else{const o=" ",l=Ki.nextRenderTabStop(a,n)/n;return Vg(o,l)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){const n=this._selection.startLineNumber;let i=this._selection.endLineNumber;this._selection.endColumn===1&&n!==i&&(i=i-1);const{tabSize:r,indentSize:a,insertSpaces:o}=this._opts,s=n===i;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let d=n;d<=i;d++,l=c){c=0;const h=e.getLineContent(d);let E=Ta(h);if(this._opts.isUnshift&&(h.length===0||E===0)||!s&&!this._opts.isUnshift&&h.length===0)continue;if(E===-1&&(E=h.length),d>1&&Ki.visibleColumnFromColumn(h,E+1,r)%a!==0&&e.tokenization.isCheapToTokenize(d-1)){const f=cx(this._opts.autoIndent,e,new j(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(f){if(c=l,f.appendText)for(let p=0,D=f.appendText.length;p1){let i,r=-1;for(i=e-1;i>=1;i--){if(u.tokenization.getLanguageIdAtPosition(i,0)!==n)return r;const a=u.getLineContent(i);if(t.shouldIgnore(a)||/^\s+$/.test(a)||a===""){r=i;continue}return i}}return-1}function gP(u,e,t,n=!0,i){if(u<4)return null;const r=i.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!r)return null;if(t<=1)return{indentation:"",action:null};for(let s=t-1;s>0&&e.getLineContent(s)==="";s--)if(s===1)return{indentation:"",action:null};const a=kut(e,t,r);if(a<0)return null;if(a<1)return{indentation:"",action:null};const o=e.getLineContent(a);if(r.shouldIncrease(o)||r.shouldIndentNextLine(o))return{indentation:Wu(o),action:wi.Indent,line:a};if(r.shouldDecrease(o))return{indentation:Wu(o),action:null,line:a};{if(a===1)return{indentation:Wu(e.getLineContent(a)),action:null,line:a};const s=a-1,l=r.getIndentMetadata(e.getLineContent(s));if(!(l&3)&&l&4){let c=0;for(let d=s-1;d>0;d--)if(!r.shouldIndentNextLine(e.getLineContent(d))){c=d;break}return{indentation:Wu(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:Wu(e.getLineContent(a)),action:null,line:a};for(let c=a;c>0;c--){const d=e.getLineContent(c);if(r.shouldIncrease(d))return{indentation:Wu(d),action:wi.Indent,line:c};if(r.shouldIndentNextLine(d)){let h=0;for(let E=c-1;E>0;E--)if(!r.shouldIndentNextLine(e.getLineContent(c))){h=E;break}return{indentation:Wu(e.getLineContent(h+1)),action:null,line:h+1}}else if(r.shouldDecrease(d))return{indentation:Wu(d),action:null,line:c}}return{indentation:Wu(e.getLineContent(1)),action:null,line:1}}}function e2(u,e,t,n,i,r){if(u<4)return null;const a=r.getLanguageConfiguration(t);if(!a)return null;const o=r.getLanguageConfiguration(t).indentRulesSupport;if(!o)return null;const s=gP(u,e,n,void 0,r),l=e.getLineContent(n);if(s){const c=s.line;if(c!==void 0){let d=!0;for(let h=c;h0&&r.getLanguageId(0)!==a.languageId?(s=!0,l=o.substr(0,t.startColumn-1-a.firstCharOffset)):l=r.getLineContent().substring(0,t.startColumn-1);let c;t.isEmpty()?c=o.substr(t.startColumn-1-a.firstCharOffset):c=nx(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset);const d=i.getLanguageConfiguration(a.languageId).indentRulesSupport;if(!d)return null;const h=l,E=Wu(l),m={tokenization:{getLineTokens:D=>e.tokenization.getLineTokens(D),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(D,x)=>e.getLanguageIdAtPosition(D,x)},getLineContent:D=>D===t.startLineNumber?h:e.getLineContent(D)},g=Wu(r.getLineContent()),f=gP(u,m,t.startLineNumber+1,void 0,i);if(!f){const D=s?g:E;return{beforeEnter:D,afterEnter:D}}let p=s?g:f.indentation;return f.action===wi.Indent&&(p=n.shiftIndent(p)),d.shouldDecrease(c)&&(p=n.unshiftIndent(p)),{beforeEnter:s?g:E,afterEnter:p}}function yut(u,e,t,n,i,r){if(u<4)return null;const a=nx(e,t.startLineNumber,t.startColumn);if(a.firstCharOffset)return null;const o=r.getLanguageConfiguration(a.languageId).indentRulesSupport;if(!o)return null;const s=a.getLineContent(),l=s.substr(0,t.startColumn-1-a.firstCharOffset);let c;if(t.isEmpty()?c=s.substr(t.startColumn-1-a.firstCharOffset):c=nx(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset),!o.shouldDecrease(l+c)&&o.shouldDecrease(l+n+c)){const d=gP(u,e,t.startLineNumber,!1,r);if(!d)return null;let h=d.indentation;return d.action!==wi.Indent&&(h=i.unshiftIndent(h)),h}return null}function FCe(u,e,t){const n=t.getLanguageConfiguration(u.getLanguageId()).indentRulesSupport;return!n||e<1||e>u.getLineCount()?null:n.getIndentMetadata(u.getLineContent(e))}class Pn{static indent(e,t,n){if(t===null||n===null)return[];const i=[];for(let r=0,a=n.length;r1){let o;for(o=n-1;o>=1;o--){const c=t.getLineContent(o);if(Hc(c)>=0)break}if(o<1)return null;const s=t.getLineMaxColumn(o),l=cx(e.autoIndent,t,new j(o,s,o,s),e.languageConfigurationService);l&&(r=l.indentation+l.appendText)}return i&&(i===wi.Indent&&(r=Pn.shiftIndent(e,r)),i===wi.Outdent&&(r=Pn.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,i){let r="";const a=n.getStartPosition();if(e.insertSpaces){const o=e.visibleColumnFromColumn(t,a),s=e.indentSize,l=s-o%s;for(let c=0;cthis._compositionType(n,c,r,a,o,s));return new vo(4,l,{shouldPushStackElementBefore:a9(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,i,r,a){if(!t.isEmpty())return null;const o=t.getPosition(),s=Math.max(1,o.column-i),l=Math.min(e.getLineMaxColumn(o.lineNumber),o.column+r),c=new j(o.lineNumber,s,o.lineNumber,l);return e.getValueInRange(c)===n&&a===0?null:new ZS(c,n,0,a)}static _typeCommand(e,t,n){return n?new i9(e,t,!0):new Gr(e,t,!0)}static _enter(e,t,n,i){if(e.autoIndent===0)return Pn._typeCommand(i,` + `,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},u.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},u.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(n){if(!n.to)return null;let i;switch(n.to){case u.RawDirection.Left:i=0;break;case u.RawDirection.Right:i=1;break;case u.RawDirection.Up:i=2;break;case u.RawDirection.Down:i=3;break;case u.RawDirection.PrevBlankLine:i=4;break;case u.RawDirection.NextBlankLine:i=5;break;case u.RawDirection.WrappedLineStart:i=6;break;case u.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case u.RawDirection.WrappedLineColumnCenter:i=8;break;case u.RawDirection.WrappedLineEnd:i=9;break;case u.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case u.RawDirection.ViewPortTop:i=11;break;case u.RawDirection.ViewPortBottom:i=13;break;case u.RawDirection.ViewPortCenter:i=12;break;case u.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let r=0;switch(n.by){case u.RawUnit.Line:r=1;break;case u.RawUnit.WrappedLine:r=2;break;case u.RawUnit.Character:r=3;break;case u.RawUnit.HalfLine:r=4;break}return{direction:i,unit:r,select:!!n.select,value:n.value||1}}u.parse=t})(OB||(OB={}));function cx(u,e,t,n){const i=nx(e,t.startLineNumber,t.startColumn),r=n.getLanguageConfiguration(i.languageId);if(!r)return null;const a=i.getLineContent(),o=a.substr(0,t.startColumn-1-i.firstCharOffset);let s;t.isEmpty()?s=a.substr(t.startColumn-1-i.firstCharOffset):s=nx(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset);let l="";if(t.startLineNumber>1&&i.firstCharOffset===0){const g=nx(e,t.startLineNumber-1);g.languageId===i.languageId&&(l=g.getLineContent())}const c=r.onEnter(u,l,o,s);if(!c)return null;const d=c.indentAction;let h=c.appendText;const E=c.removeText||0;h?d===wi.Indent&&(h=" "+h):d===wi.Indent||d===wi.IndentOutdent?h=" ":h="";let m=L6e(e,t.startLineNumber,t.startColumn);return E&&(m=m.substring(0,m.length-E)),{indentAction:d,appendText:h,removeText:E,indentation:m}}var xut=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vut=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},YS;const wj=Object.create(null);function Vg(u,e){if(e<=0)return"";wj[u]||(wj[u]=["",u]);const t=wj[u];for(let n=t.length;n<=e;n++)t[n]=t[n-1]+u;return t[e]}let D0=YS=class{static unshiftIndent(e,t,n,i,r){const a=Ki.visibleColumnFromColumn(e,t,n);if(r){const o=Vg(" ",i),l=Ki.prevIndentTabStop(a,i)/i;return Vg(o,l)}else{const o=" ",l=Ki.prevRenderTabStop(a,n)/n;return Vg(o,l)}}static shiftIndent(e,t,n,i,r){const a=Ki.visibleColumnFromColumn(e,t,n);if(r){const o=Vg(" ",i),l=Ki.nextIndentTabStop(a,i)/i;return Vg(o,l)}else{const o=" ",l=Ki.nextRenderTabStop(a,n)/n;return Vg(o,l)}}constructor(e,t,n){this._languageConfigurationService=n,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)}getEditOperations(e,t){const n=this._selection.startLineNumber;let i=this._selection.endLineNumber;this._selection.endColumn===1&&n!==i&&(i=i-1);const{tabSize:r,indentSize:a,insertSpaces:o}=this._opts,s=n===i;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(n))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let d=n;d<=i;d++,l=c){c=0;const h=e.getLineContent(d);let E=Ta(h);if(this._opts.isUnshift&&(h.length===0||E===0)||!s&&!this._opts.isUnshift&&h.length===0)continue;if(E===-1&&(E=h.length),d>1&&Ki.visibleColumnFromColumn(h,E+1,r)%a!==0&&e.tokenization.isCheapToTokenize(d-1)){const f=cx(this._opts.autoIndent,e,new j(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)),this._languageConfigurationService);if(f){if(c=l,f.appendText)for(let p=0,D=f.appendText.length;p1){let i,r=-1;for(i=e-1;i>=1;i--){if(u.tokenization.getLanguageIdAtPosition(i,0)!==n)return r;const a=u.getLineContent(i);if(t.shouldIgnore(a)||/^\s+$/.test(a)||a===""){r=i;continue}return i}}return-1}function gP(u,e,t,n=!0,i){if(u<4)return null;const r=i.getLanguageConfiguration(e.tokenization.getLanguageId()).indentRulesSupport;if(!r)return null;if(t<=1)return{indentation:"",action:null};for(let s=t-1;s>0&&e.getLineContent(s)==="";s--)if(s===1)return{indentation:"",action:null};const a=kut(e,t,r);if(a<0)return null;if(a<1)return{indentation:"",action:null};const o=e.getLineContent(a);if(r.shouldIncrease(o)||r.shouldIndentNextLine(o))return{indentation:Wu(o),action:wi.Indent,line:a};if(r.shouldDecrease(o))return{indentation:Wu(o),action:null,line:a};{if(a===1)return{indentation:Wu(e.getLineContent(a)),action:null,line:a};const s=a-1,l=r.getIndentMetadata(e.getLineContent(s));if(!(l&3)&&l&4){let c=0;for(let d=s-1;d>0;d--)if(!r.shouldIndentNextLine(e.getLineContent(d))){c=d;break}return{indentation:Wu(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:Wu(e.getLineContent(a)),action:null,line:a};for(let c=a;c>0;c--){const d=e.getLineContent(c);if(r.shouldIncrease(d))return{indentation:Wu(d),action:wi.Indent,line:c};if(r.shouldIndentNextLine(d)){let h=0;for(let E=c-1;E>0;E--)if(!r.shouldIndentNextLine(e.getLineContent(c))){h=E;break}return{indentation:Wu(e.getLineContent(h+1)),action:null,line:h+1}}else if(r.shouldDecrease(d))return{indentation:Wu(d),action:null,line:c}}return{indentation:Wu(e.getLineContent(1)),action:null,line:1}}}function e2(u,e,t,n,i,r){if(u<4)return null;const a=r.getLanguageConfiguration(t);if(!a)return null;const o=r.getLanguageConfiguration(t).indentRulesSupport;if(!o)return null;const s=gP(u,e,n,void 0,r),l=e.getLineContent(n);if(s){const c=s.line;if(c!==void 0){let d=!0;for(let h=c;h0&&r.getLanguageId(0)!==a.languageId?(s=!0,l=o.substr(0,t.startColumn-1-a.firstCharOffset)):l=r.getLineContent().substring(0,t.startColumn-1);let c;t.isEmpty()?c=o.substr(t.startColumn-1-a.firstCharOffset):c=nx(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset);const d=i.getLanguageConfiguration(a.languageId).indentRulesSupport;if(!d)return null;const h=l,E=Wu(l),m={tokenization:{getLineTokens:D=>e.tokenization.getLineTokens(D),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(D,x)=>e.getLanguageIdAtPosition(D,x)},getLineContent:D=>D===t.startLineNumber?h:e.getLineContent(D)},g=Wu(r.getLineContent()),f=gP(u,m,t.startLineNumber+1,void 0,i);if(!f){const D=s?g:E;return{beforeEnter:D,afterEnter:D}}let p=s?g:f.indentation;return f.action===wi.Indent&&(p=n.shiftIndent(p)),d.shouldDecrease(c)&&(p=n.unshiftIndent(p)),{beforeEnter:s?g:E,afterEnter:p}}function yut(u,e,t,n,i,r){if(u<4)return null;const a=nx(e,t.startLineNumber,t.startColumn);if(a.firstCharOffset)return null;const o=r.getLanguageConfiguration(a.languageId).indentRulesSupport;if(!o)return null;const s=a.getLineContent(),l=s.substr(0,t.startColumn-1-a.firstCharOffset);let c;if(t.isEmpty()?c=s.substr(t.startColumn-1-a.firstCharOffset):c=nx(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset),!o.shouldDecrease(l+c)&&o.shouldDecrease(l+n+c)){const d=gP(u,e,t.startLineNumber,!1,r);if(!d)return null;let h=d.indentation;return d.action!==wi.Indent&&(h=i.unshiftIndent(h)),h}return null}function FCe(u,e,t){const n=t.getLanguageConfiguration(u.getLanguageId()).indentRulesSupport;return!n||e<1||e>u.getLineCount()?null:n.getIndentMetadata(u.getLineContent(e))}class Pn{static indent(e,t,n){if(t===null||n===null)return[];const i=[];for(let r=0,a=n.length;r1){let o;for(o=n-1;o>=1;o--){const c=t.getLineContent(o);if(Hc(c)>=0)break}if(o<1)return null;const s=t.getLineMaxColumn(o),l=cx(e.autoIndent,t,new j(o,s,o,s),e.languageConfigurationService);l&&(r=l.indentation+l.appendText)}return i&&(i===wi.Indent&&(r=Pn.shiftIndent(e,r)),i===wi.Outdent&&(r=Pn.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,n,i){let r="";const a=n.getStartPosition();if(e.insertSpaces){const o=e.visibleColumnFromColumn(t,a),s=e.indentSize,l=s-o%s;for(let c=0;cthis._compositionType(n,c,r,a,o,s));return new vo(4,l,{shouldPushStackElementBefore:a9(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,n,i,r,a){if(!t.isEmpty())return null;const o=t.getPosition(),s=Math.max(1,o.column-i),l=Math.min(e.getLineMaxColumn(o.lineNumber),o.column+r),c=new j(o.lineNumber,s,o.lineNumber,l);return e.getValueInRange(c)===n&&a===0?null:new ZS(c,n,0,a)}static _typeCommand(e,t,n){return n?new i9(e,t,!0):new Gr(e,t,!0)}static _enter(e,t,n,i){if(e.autoIndent===0)return Pn._typeCommand(i,` `,n);if(!t.tokenization.isCheapToTokenize(i.getStartPosition().lineNumber)||e.autoIndent===1){const s=t.getLineContent(i.startLineNumber),l=Wu(s).substring(0,i.startColumn-1);return Pn._typeCommand(i,` `+e.normalizeIndentation(l),n)}const r=cx(e.autoIndent,t,i,e.languageConfigurationService);if(r){if(r.indentAction===wi.None)return Pn._typeCommand(i,` `+e.normalizeIndentation(r.indentation+r.appendText),n);if(r.indentAction===wi.Indent)return Pn._typeCommand(i,` @@ -83,11 +83,11 @@ Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._p `+e.normalizeIndentation(s+r.appendText),n)}}const a=t.getLineContent(i.startLineNumber),o=Wu(a).substring(0,i.startColumn-1);if(e.autoIndent>=4){const s=Fut(e.autoIndent,t,i,{unshiftIndent:l=>Pn.unshiftIndent(e,l),shiftIndent:l=>Pn.shiftIndent(e,l),normalizeIndentation:l=>e.normalizeIndentation(l)},e.languageConfigurationService);if(s){let l=e.visibleColumnFromColumn(t,i.getEndPosition());const c=i.endColumn,d=t.getLineContent(i.endLineNumber),h=Ta(d);if(h>=0?i=i.setEndPosition(i.endLineNumber,Math.max(i.endColumn,h+1)):i=i.setEndPosition(i.endLineNumber,t.getLineMaxColumn(i.endLineNumber)),n)return new i9(i,` `+e.normalizeIndentation(s.afterEnter),!0);{let E=0;return c<=h+1&&(e.insertSpaces||(l=Math.ceil(l/e.indentSize)),E=Math.min(l+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new ZS(i,` `+e.normalizeIndentation(s.afterEnter),0,E,!0)}}}return Pn._typeCommand(i,` -`+e.normalizeIndentation(o),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let i=0,r=n.length;iPn.shiftIndent(e,o),unshiftIndent:o=>Pn.unshiftIndent(e,o)},e.languageConfigurationService);if(a===null)return null;if(a!==e.normalizeIndentation(r)){const o=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return o===0?Pn._typeCommand(new j(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(a)+i,!1):Pn._typeCommand(new j(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(a)+t.getLineContent(n.startLineNumber).substring(o-1,n.startColumn-1)+i,!1)}return null}static _isAutoClosingOvertype(e,t,n,i,r){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let a=0,o=n.length;a2?c.charCodeAt(l.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let m=!1;for(let g=0,f=i.length;gt.startsWith(s.open)),o=r.some(s=>t.startsWith(s.close));return!a&&o}static _findAutoClosingPairOpen(e,t,n,i){const r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(i);if(!r)return null;let a=null;for(const o of r)if(a===null||o.open.length>a.open.length){let s=!0;for(const l of n)if(t.getValueInRange(new j(l.lineNumber,l.column-o.open.length+1,l.lineNumber,l.column))+i!==o.open){s=!1;break}s&&(a=o)}return a}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const n=t.close.charAt(t.close.length-1),i=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let r=null;for(const a of i)a.open!==t.open&&t.open.includes(a.open)&&t.close.endsWith(a.close)&&(!r||a.open.length>r.open.length)&&(r=a);return r}static _getAutoClosingPairClose(e,t,n,i,r){for(const m of n)if(!m.isEmpty())return null;const a=n.map(m=>{const g=m.getPosition();return r?{lineNumber:g.lineNumber,beforeColumn:g.column-i.length,afterColumn:g.column}:{lineNumber:g.lineNumber,beforeColumn:g.column,afterColumn:g.column}}),o=this._findAutoClosingPairOpen(e,t,a.map(m=>new ee(m.lineNumber,m.beforeColumn)),i);if(!o)return null;let s,l;if(tE(i)?(s=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?o.open.includes(e.blockCommentStartToken):!1)?(s=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(s=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket),s==="never")return null;const d=this._findContainedAutoClosingPair(e,o),h=d?d.close:"";let E=!0;for(const m of a){const{lineNumber:g,beforeColumn:f,afterColumn:p}=m,D=t.getLineContent(g),x=D.substring(0,f-1),b=D.substring(p-1);if(b.startsWith(h)||(E=!1),b.length>0){const S=b.charAt(0);if(!Pn._isBeforeClosingBrace(e,b)&&!l(S))return null}if(o.open.length===1&&(i==="'"||i==='"')&&s!=="always"){const S=P0(e.wordSeparators);if(x.length>0){const w=x.charCodeAt(x.length-1);if(S.get(w)===0)return null}}if(!t.tokenization.isCheapToTokenize(g))return null;t.tokenization.forceTokenization(g);const k=t.tokenization.getLineTokens(g),A=eP(k,f-1);if(!o.shouldAutoClose(A,f-A.firstCharOffset))return null;const F=o.findNeutralCharacter();if(F){const S=t.tokenization.getTokenTypeIfInsertingCharacter(g,f,F);if(!o.isOK(S))return null}}return E?o.close.substring(0,o.close.length-h.length):o.close}static _runAutoClosingOpenCharType(e,t,n,i,r,a,o){const s=[];for(let l=0,c=i.length;lnew Gr(new j(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new vo(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const c=this._getAutoClosingPairClose(t,n,r,s,!0);return c!==null?this._runAutoClosingOpenCharType(e,t,n,r,s,!0,c):null}static typeWithInterceptors(e,t,n,i,r,a,o){if(!e&&o===` +`+e.normalizeIndentation(o),n)}static _isAutoIndentType(e,t,n){if(e.autoIndent<4)return!1;for(let i=0,r=n.length;iPn.shiftIndent(e,o),unshiftIndent:o=>Pn.unshiftIndent(e,o)},e.languageConfigurationService);if(a===null)return null;if(a!==e.normalizeIndentation(r)){const o=t.getLineFirstNonWhitespaceColumn(n.startLineNumber);return o===0?Pn._typeCommand(new j(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(a)+i,!1):Pn._typeCommand(new j(n.startLineNumber,1,n.endLineNumber,n.endColumn),e.normalizeIndentation(a)+t.getLineContent(n.startLineNumber).substring(o-1,n.startColumn-1)+i,!1)}return null}static _isAutoClosingOvertype(e,t,n,i,r){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let a=0,o=n.length;a2?c.charCodeAt(l.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let m=!1;for(let g=0,f=i.length;gt.startsWith(s.open)),o=r.some(s=>t.startsWith(s.close));return!a&&o}static _findAutoClosingPairOpen(e,t,n,i){const r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(i);if(!r)return null;let a=null;for(const o of r)if(a===null||o.open.length>a.open.length){let s=!0;for(const l of n)if(t.getValueInRange(new j(l.lineNumber,l.column-o.open.length+1,l.lineNumber,l.column))+i!==o.open){s=!1;break}s&&(a=o)}return a}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const n=t.close.charAt(t.close.length-1),i=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(n)||[];let r=null;for(const a of i)a.open!==t.open&&t.open.includes(a.open)&&t.close.endsWith(a.close)&&(!r||a.open.length>r.open.length)&&(r=a);return r}static _getAutoClosingPairClose(e,t,n,i,r){for(const m of n)if(!m.isEmpty())return null;const a=n.map(m=>{const g=m.getPosition();return r?{lineNumber:g.lineNumber,beforeColumn:g.column-i.length,afterColumn:g.column}:{lineNumber:g.lineNumber,beforeColumn:g.column,afterColumn:g.column}}),o=this._findAutoClosingPairOpen(e,t,a.map(m=>new ee(m.lineNumber,m.beforeColumn)),i);if(!o)return null;let s,l;if(tE(i)?(s=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote):(e.blockCommentStartToken?o.open.includes(e.blockCommentStartToken):!1)?(s=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(s=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket),s==="never")return null;const d=this._findContainedAutoClosingPair(e,o),h=d?d.close:"";let E=!0;for(const m of a){const{lineNumber:g,beforeColumn:f,afterColumn:p}=m,D=t.getLineContent(g),x=D.substring(0,f-1),b=D.substring(p-1);if(b.startsWith(h)||(E=!1),b.length>0){const S=b.charAt(0);if(!Pn._isBeforeClosingBrace(e,b)&&!l(S))return null}if(o.open.length===1&&(i==="'"||i==='"')&&s!=="always"){const S=R0(e.wordSeparators);if(x.length>0){const w=x.charCodeAt(x.length-1);if(S.get(w)===0)return null}}if(!t.tokenization.isCheapToTokenize(g))return null;t.tokenization.forceTokenization(g);const k=t.tokenization.getLineTokens(g),A=eP(k,f-1);if(!o.shouldAutoClose(A,f-A.firstCharOffset))return null;const F=o.findNeutralCharacter();if(F){const S=t.tokenization.getTokenTypeIfInsertingCharacter(g,f,F);if(!o.isOK(S))return null}}return E?o.close.substring(0,o.close.length-h.length):o.close}static _runAutoClosingOpenCharType(e,t,n,i,r,a,o){const s=[];for(let l=0,c=i.length;lnew Gr(new j(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new vo(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const c=this._getAutoClosingPairClose(t,n,r,s,!0);return c!==null?this._runAutoClosingOpenCharType(e,t,n,r,s,!0,c):null}static typeWithInterceptors(e,t,n,i,r,a,o){if(!e&&o===` `){const c=[];for(let d=0,h=r.length;d{const i=t.get(Cu).getFocusedCodeEditor();return i&&i.hasTextFocus()?this._runEditorCommand(t,i,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{const i=yl();return i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0?(this.runDOMCommand(i),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{const i=t.get(Cu).getActiveCodeEditor();return i?(i.focus(),this._runEditorCommand(t,i,n)):!1})}_runEditorCommand(e,t,n){const i=this.runEditorCommand(e,t,n);return i||!0}}var lr;(function(u){class e extends Xn{constructor(D){super(D),this._inSelectionMode=D.inSelectionMode}runCoreEditorCommand(D,x){if(!x.position)return;D.model.pushStackElement(),D.setCursorStates(x.source,3,[br.moveTo(D,D.getPrimaryCursorState(),this._inSelectionMode,x.position,x.viewPosition)])&&x.revealType!==2&&D.revealPrimaryCursor(x.source,!0,!0)}}u.MoveTo=ze(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),u.MoveToSelect=ze(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends Xn{runCoreEditorCommand(D,x){D.model.pushStackElement();const b=this._getColumnSelectResult(D,D.getPrimaryCursorState(),D.getCursorColumnSelectData(),x);b!==null&&(D.setCursorStates(x.source,3,b.viewStates.map(k=>du.fromViewState(k))),D.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:b.fromLineNumber,fromViewVisualColumn:b.fromVisualColumn,toViewLineNumber:b.toLineNumber,toViewVisualColumn:b.toVisualColumn}),b.reversed?D.revealTopMostCursor(x.source):D.revealBottomMostCursor(x.source))}}u.ColumnSelect=ze(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(p,D,x,b){if(typeof b.position>"u"||typeof b.viewPosition>"u"||typeof b.mouseColumn>"u")return null;const k=p.model.validatePosition(b.position),A=p.coordinatesConverter.validateViewPosition(new ee(b.viewPosition.lineNumber,b.viewPosition.column),k),F=b.doColumnSelect?x.fromViewLineNumber:A.lineNumber,S=b.doColumnSelect?x.fromViewVisualColumn:b.mouseColumn-1;return yf.columnSelect(p.cursorConfig,p,F,S,A.lineNumber,b.mouseColumn-1)}}),u.CursorColumnSelectLeft=ze(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(p,D,x,b){return yf.columnSelectLeft(p.cursorConfig,p,x)}}),u.CursorColumnSelectRight=ze(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(p,D,x,b){return yf.columnSelectRight(p.cursorConfig,p,x)}});class n extends t{constructor(D){super(D),this._isPaged=D.isPaged}_getColumnSelectResult(D,x,b,k){return yf.columnSelectUp(D.cursorConfig,D,b,this._isPaged)}}u.CursorColumnSelectUp=ze(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3600,linux:{primary:0}}})),u.CursorColumnSelectPageUp=ze(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3595,linux:{primary:0}}}));class i extends t{constructor(D){super(D),this._isPaged=D.isPaged}_getColumnSelectResult(D,x,b,k){return yf.columnSelectDown(D.cursorConfig,D,b,this._isPaged)}}u.CursorColumnSelectDown=ze(new i({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3602,linux:{primary:0}}})),u.CursorColumnSelectPageDown=ze(new i({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends Xn{constructor(){super({id:"cursorMove",precondition:void 0,description:OB.description})}runCoreEditorCommand(D,x){const b=OB.parse(x);b&&this._runCursorMove(D,x.source,b)}_runCursorMove(D,x,b){D.model.pushStackElement(),D.setCursorStates(x,3,r._move(D,D.getCursorStates(),b)),D.revealPrimaryCursor(x,!0)}static _move(D,x,b){const k=b.select,A=b.value;switch(b.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return br.simpleMove(D,x,b.direction,k,A,b.unit);case 11:case 13:case 12:case 14:return br.viewportMove(D,x,b.direction,k,A);default:return null}}}u.CursorMoveImpl=r,u.CursorMove=ze(new r);class a extends Xn{constructor(D){super(D),this._staticArgs=D.args}runCoreEditorCommand(D,x){let b=this._staticArgs;this._staticArgs.value===-1&&(b={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:x.pageSize||D.cursorConfig.pageSize}),D.model.pushStackElement(),D.setCursorStates(x.source,3,br.simpleMove(D,D.getCursorStates(),b.direction,b.select,b.value,b.unit)),D.revealPrimaryCursor(x.source,!0)}}u.CursorLeft=ze(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),u.CursorLeftSelect=ze(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1039}})),u.CursorRight=ze(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),u.CursorRightSelect=ze(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1041}})),u.CursorUp=ze(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),u.CursorUpSelect=ze(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),u.CursorPageUp=ze(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:11}})),u.CursorPageUpSelect=ze(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1035}})),u.CursorDown=ze(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),u.CursorDownSelect=ze(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),u.CursorPageDown=ze(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:12}})),u.CursorPageDownSelect=ze(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1036}})),u.CreateCursor=ze(new class extends Xn{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(p,D){if(!D.position)return;let x;D.wholeLine?x=br.line(p,p.getPrimaryCursorState(),!1,D.position,D.viewPosition):x=br.moveTo(p,p.getPrimaryCursorState(),!1,D.position,D.viewPosition);const b=p.getCursorStates();if(b.length>1){const k=x.modelState?x.modelState.position:null,A=x.viewState?x.viewState.position:null;for(let F=0,S=b.length;FA&&(k=A);const F=new j(k,1,k,p.model.getLineMaxColumn(k));let S=0;if(x.at)switch(x.at){case x5.RawAtArgument.Top:S=3;break;case x5.RawAtArgument.Center:S=1;break;case x5.RawAtArgument.Bottom:S=4;break}const w=p.coordinatesConverter.convertModelRangeToViewRange(F);p.revealRange(D.source,!1,w,S,0)}}),u.SelectAll=new class extends jW{constructor(){super(cZe)}runDOMCommand(p){M0&&(p.focus(),p.select()),p.ownerDocument.execCommand("selectAll")}runEditorCommand(p,D,x){const b=D._getViewModel();b&&this.runCoreEditorCommand(b,x)}runCoreEditorCommand(p,D){p.model.pushStackElement(),p.setCursorStates("keyboard",3,[br.selectAll(p,p.getPrimaryCursorState())])}},u.SetSelection=ze(new class extends Xn{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(p,D){D.selection&&(p.model.pushStackElement(),p.setCursorStates(D.source,3,[du.fromModelSelection(D.selection)]))}})})(lr||(lr={}));const _ut=Ee.and(W.textInputFocus,W.columnSelection);function g6(u,e){Po.registerKeybindingRule({id:u,primary:e,when:_ut,weight:Du+1})}g6(lr.CursorColumnSelectLeft.id,1039);g6(lr.CursorColumnSelectRight.id,1041);g6(lr.CursorColumnSelectUp.id,1040);g6(lr.CursorColumnSelectPageUp.id,1035);g6(lr.CursorColumnSelectDown.id,1042);g6(lr.CursorColumnSelectPageDown.id,1036);function Loe(u){return u.register(),u}var dx;(function(u){class e extends xr{runEditorCommand(n,i,r){const a=i._getViewModel();a&&this.runCoreEditingCommand(i,a,r||{})}}u.CoreEditingCommand=e,u.LineBreakInsert=ze(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:W.writable,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),u.Outdent=ze(new class extends e{constructor(){super({id:"outdent",precondition:W.writable,kbOpts:{weight:Du,kbExpr:Ee.and(W.editorTextFocus,W.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),u.Tab=ze(new class extends e{constructor(){super({id:"tab",precondition:W.writable,kbOpts:{weight:Du,kbExpr:Ee.and(W.editorTextFocus,W.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),u.DeleteLeft=ze(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,i){const[r,a]=z3.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection),n.getCursorAutoClosedCharacters());r&&t.pushUndoStop(),t.executeCommands(this.id,a),n.setPrevEditOperationType(2)}}),u.DeleteRight=ze(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,i){const[r,a]=z3.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection));r&&t.pushUndoStop(),t.executeCommands(this.id,a),n.setPrevEditOperationType(3)}}),u.Undo=new class extends jW{constructor(){super(g6e)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,i){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().undo()}},u.Redo=new class extends jW{constructor(){super(f6e)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,i){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().redo()}}})(dx||(dx={}));class zoe extends ZN{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(Cu).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function Lp(u,e){Loe(new zoe("default:"+u,u)),Loe(new zoe(u,u,e))}Lp("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});Lp("replacePreviousChar");Lp("compositionType");Lp("compositionStart");Lp("compositionEnd");Lp("paste");Lp("cut");class Sut{constructor(e,t,n,i){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=i}paste(e,t,n,i){this.commandDelegate.paste(e,t,n,i)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,i){this.commandDelegate.compositionType(e,t,n,i)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){lr.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):i?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){lr.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){lr.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),lr.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),lr.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){lr.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){lr.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){lr.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){lr.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){lr.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){lr.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){lr.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){lr.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){lr.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class fP{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return fP.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const n=Object.assign({},e);return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ee(e.afterLineNumber,1)).lineNumber}}}class ACe{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Si("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;let r=0,a=0;for(let s=n;s<=i;s++){const l=s-this._rendLineNumberStart;e<=s&&s<=t&&(a===0?(r=l,a=1):a++)}if(e=i&&o<=r&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),a=!0);return a}onLinesInserted(e,t){if(this.getCount()===0)return null;const n=t-e+1,i=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);const a=[];for(let d=0;dn)continue;const s=Math.max(t,o.fromLineNumber),l=Math.min(n,o.toLineNumber);for(let c=s;c<=l;c++){const d=c-this._rendLineNumberStart;this._lines[d].onTokensChanged(),i=!0}}return i}}class _Ce{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ACe(()=>this._host.createVisibleLine())}_createDomNode(){const e=ku(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,i=t.length;nt){const a=t,o=Math.min(n,r.rendLineNumberStart-1);a<=o&&(this._insertLinesBefore(r,a,o,i,t),r.linesLength+=o-a+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,a),r.linesLength-=a)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){const a=Math.max(0,n-r.rendLineNumberStart+1),s=r.linesLength-1-a+1;s>0&&(this._removeLinesAfter(r,s),r.linesLength-=s)}return this._finishRendering(r,!1,i),r}_renderUntouchedLines(e,t,n,i,r){const a=e.rendLineNumberStart,o=e.lines;for(let s=t;s<=n;s++){const l=a+s;o[s].layoutLine(l,i[l-r])}}_insertLinesBefore(e,t,n,i,r){const a=[];let o=0;for(let s=t;s<=n;s++)a[o++]=this.host.createVisibleLine();e.lines=a.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;o--){const s=e.lines[o];i[o]&&(s.setDomNode(a),a=a.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const i=document.createElement("div");Lh._ttPolicy&&(t=Lh._ttPolicy.createHTML(t)),i.innerHTML=t;for(let r=0;ru});Lh._sb=new h6(1e5);class SCe extends xs{constructor(e){super(e),this._visibleLines=new _Ce(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);ea(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,i=t.length;n'),i.appendString(r),i.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class wut extends SCe{constructor(e){super(e);const n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Lut extends SCe{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),ea(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;ea(this.domNode,t.get(50));const n=t.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class zut extends xs{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=ku(document.createElement("div")),_1.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=ku(document.createElement("div")),_1.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new Mut(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,i,r){this._widgets[e.getId()].setPosition(t,n,i,r),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t];delete this._widgets[t];const i=n.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].render(e)}}class Mut{constructor(e,t,n){this._primaryAnchor=new dC(null,null),this._secondaryAnchor=new dC(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=ku(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const i=this._context.configuration.options,r=i.get(143);this._fixedOverflowWidgets=i.get(42),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=i.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const n=t.get(143);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=i(t,this._context.viewModel,this._affinity),this._secondaryAnchor=i(n,this._context.viewModel,this._affinity);function i(r,a,o){if(!r)return new dC(null,null);const s=a.model.validatePosition(r);if(a.coordinatesConverter.modelPositionIsVisible(s)){const l=a.coordinatesConverter.convertModelPositionToViewPosition(s,o??void 0);return new dC(r,l)}return new dC(r,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(t==null?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,i){this._setPosition(i,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,i){const r=e.top,a=r,o=e.top+e.height,s=i.viewportHeight-o,l=r-n,c=a>=n,d=o,h=s>=n;let E=e.left;return E+t>i.scrollLeft+i.viewportWidth&&(E=i.scrollLeft+i.viewportWidth-t),El){const E=h-(l-i);h-=E,n-=E}if(h=p,b=E+n<=m.height-D;return this._fixedOverflowWidgets?{fitsAbove:x,aboveTop:Math.max(h,p),fitsBelow:b,belowTop:E,left:f}:{fitsAbove:x,aboveTop:o,fitsBelow:b,belowTop:s,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new hC(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,n;const i=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),r=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,a=o(r,this._affinity,this._lineHeight);return{primary:i,secondary:a};function o(s,l,c){if(!s)return null;const d=e.visibleRangeForPosition(s);if(!d)return null;const h=s.column===1&&l===3?0:d.left,E=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.scrollTop;return new Moe(E,h,c)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;const i=this._context.configuration.options.get(50);let r=t.left;return re.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&zj(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&zj(this._actual.afterRender,this._actual,this._renderData.position)}}class dC{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class hC{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class Moe{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}function zj(u,e,...t){try{return u.call(e,...t)}catch{return null}}class BCe extends wp{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Ye(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(i=>i.positionLineNumber);t.sort((i,r)=>i-r),di(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const n=this._selections.every(i=>i.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._cursorLineNumbers.length;let a=0;const o=[];for(let s=n;s<=i;s++){const l=s-n;for(;a=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Tut extends BCe{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Nut extends BCe{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Kl((u,e)=>{const t=u.getColor(mCe);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||u.defines(Soe)){const n=u.getColor(Soe);n&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),$c(u.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class Put extends wp{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let s=0,l=t.length;s{if(s.options.zIndexl.options.zIndex)return 1;const c=s.options.className,d=l.options.className;return cd?1:j.compareRangesUsingStarts(s.range,l.range)});const r=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber,o=[];for(let s=r;s<=a;s++){const l=s-r;o[l]=""}this._renderWholeLineDecorations(e,n,o),this._renderNormalDecorations(e,n,o),this._renderResult=o}_renderWholeLineDecorations(e,t,n){const i=String(this._lineHeight),r=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber;for(let o=0,s=t.length;o',d=Math.max(l.range.startLineNumber,r),h=Math.min(l.range.endLineNumber,a);for(let E=d;E<=h;E++){const m=E-r;n[m]+=c}}}_renderNormalDecorations(e,t,n){var i;const r=String(this._lineHeight),a=e.visibleRange.startLineNumber;let o=null,s=!1,l=null,c=!1;for(let d=0,h=t.length;d';s[E]+=D}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Rut extends xs{constructor(e,t,n,i){super(e);const r=this._context.configuration.options,a=r.get(102),o=r.get(74),s=r.get(40),l=r.get(105),c={listenOnDomNode:n.domNode,className:"editor-scrollable "+IW(e.theme.type),useShadows:!1,lazyRender:!0,vertical:a.vertical,horizontal:a.horizontal,verticalHasArrows:a.verticalHasArrows,horizontalHasArrows:a.horizontalHasArrows,verticalScrollbarSize:a.verticalScrollbarSize,verticalSliderSize:a.verticalSliderSize,horizontalScrollbarSize:a.horizontalScrollbarSize,horizontalSliderSize:a.horizontalSliderSize,handleMouseWheel:a.handleMouseWheel,alwaysConsumeMouseWheel:a.alwaysConsumeMouseWheel,arrowSize:a.arrowSize,mouseWheelScrollSensitivity:o,fastScrollSensitivity:s,scrollPredominantAxis:l,scrollByPage:a.scrollByPage};this.scrollbar=this._register(new AX(t.domNode,c,this._context.viewLayout.getScrollable())),_1.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=ku(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(h,E,m)=>{const g={};if(E){const f=h.scrollTop;f&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,h.scrollTop=0)}if(m){const f=h.scrollLeft;f&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(ce(n.domNode,"scroll",h=>d(n.domNode,!0,!0))),this._register(ce(t.domNode,"scroll",h=>d(t.domNode,!0,!1))),this._register(ce(i.domNode,"scroll",h=>d(i.domNode,!0,!1))),this._register(ce(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const t=this._context.configuration.options,n=t.get(102),i=t.get(74),r=t.get(40),a=t.get(105),o={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:r,scrollPredominantAxis:a};this.scrollbar.updateOptions(o)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+IW(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class wCe extends ne{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function pP(u,e){let t=0,n=0;const i=u.length;for(;ni)throw new Si("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,a=!!(r&&r.offSide);let o=-2,s=-1,l=-2,c=-1;const d=F=>{if(o!==-1&&(o===-2||o>F-1)){o=-1,s=-1;for(let S=F-2;S>=0;S--){const w=this._computeIndentLevel(S);if(w>=0){o=S,s=w;break}}}if(l===-2){l=-1,c=-1;for(let S=F;S=0){l=S,c=w;break}}}};let h=-2,E=-1,m=-2,g=-1;const f=F=>{if(h===-2){h=-1,E=-1;for(let S=F-2;S>=0;S--){const w=this._computeIndentLevel(S);if(w>=0){h=S,E=w;break}}}if(m!==-1&&(m===-2||m=0){m=S,g=w;break}}}};let p=0,D=!0,x=0,b=!0,k=0,A=0;for(let F=0;D||b;F++){const S=e-F,w=e+F;F>1&&(S<1||S1&&(w>i||w>n)&&(b=!1),F>5e4&&(D=!1,b=!1);let z=-1;if(D&&S>=1){const O=this._computeIndentLevel(S-1);O>=0?(l=S-1,c=O,z=Math.ceil(O/this.textModel.getOptions().indentSize)):(d(S),z=this._getIndentLevelForWhitespaceLine(a,s,c))}let N=-1;if(b&&w<=i){const O=this._computeIndentLevel(w-1);O>=0?(h=w-1,E=O,N=Math.ceil(O/this.textModel.getOptions().indentSize)):(f(w),N=this._getIndentLevelForWhitespaceLine(a,E,g))}if(F===0){A=z;continue}if(F===1){if(w<=i&&N>=0&&A+1===N){D=!1,p=w,x=w,k=N;continue}if(S>=1&&z>=0&&z-1===A){b=!1,p=S,x=S,k=z;continue}if(p=e,x=e,k=A,k===0)return{startLineNumber:p,endLineNumber:x,indent:k}}D&&(z>=k?p=S:D=!1),b&&(N>=k?x=w:b=!1)}return{startLineNumber:p,endLineNumber:x,indent:k}}getLinesBracketGuides(e,t,n,i){var r;const a=[];for(let h=e;h<=t;h++)a.push([]);const o=!0,s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new j(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(n&&s.length>0){const h=(e<=n.lineNumber&&n.lineNumber<=t?s:this.textModel.bracketPairs.getBracketPairsInRange(j.fromPositions(n)).toArray()).filter(E=>j.strictContainsPosition(E.range,n));l=(r=BB(h,E=>o))===null||r===void 0?void 0:r.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new LCe;for(const h of s){if(!h.closingBracketRange)continue;const E=l&&h.range.equalsRange(l);if(!E&&!i.includeInactive)continue;const m=d.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(i.highlightActive&&E?" "+d.activeClassName:""),g=h.openingBracketRange.getStartPosition(),f=h.closingBracketRange.getStartPosition(),p=i.horizontalGuides===r3.Enabled||i.horizontalGuides===r3.EnabledForActive&&E;if(h.range.startLineNumber===h.range.endLineNumber){p&&a[h.range.startLineNumber-e].push(new Vf(-1,h.openingBracketRange.getEndPosition().column,m,new t2(!1,f.column),-1,-1));continue}const D=this.getVisibleColumnFromPosition(f),x=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),b=Math.min(x,D,h.minVisibleColumnIndentation+1);let k=!1;Ta(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&x>b&&a[g.lineNumber-e].push(new Vf(b,-1,m,new t2(!1,g.column),-1,-1)),f.lineNumber<=t&&D>b&&a[f.lineNumber-e].push(new Vf(b,-1,m,new t2(!k,f.column),-1,-1)))}for(const h of a)h.sort((E,m)=>E.visibleColumn-m.visibleColumn);return a}getVisibleColumnFromPosition(e){return Ki.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,a=!!(r&&r.offSide),o=new Array(t-e+1);let s=-2,l=-1,c=-2,d=-1;for(let h=e;h<=t;h++){const E=h-e,m=this._computeIndentLevel(h-1);if(m>=0){s=h-1,l=m,o[E]=Math.ceil(m/i.indentSize);continue}if(s===-2){s=-1,l=-1;for(let g=h-2;g>=0;g--){const f=this._computeIndentLevel(g);if(f>=0){s=g,l=f;break}}}if(c!==-1&&(c===-2||c=0){c=g,d=f;break}}}o[E]=this._getIndentLevelForWhitespaceLine(a,l,d)}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return t===-1||n===-1?0:ts||this._maxIndentLeft>0&&x>this._maxIndentLeft)break;const b=D.horizontalLine?D.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",k=D.horizontalLine?((r=(i=e.visibleRangeForPosition(new ee(E,D.horizontalLine.endColumn)))===null||i===void 0?void 0:i.left)!==null&&r!==void 0?r:x+this._spaceWidth)-x:this._spaceWidth;f+=`
`}h[m]=f}this._renderResult=h}getGuidesByLine(e,t,n){const i=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?r3.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?r3.EnabledForActive:r3.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let a=0,o=0,s=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){const d=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);a=d.startLineNumber,o=d.endLineNumber,s=d.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let d=e;d<=t;d++){const h=new Array;c.push(h);const E=i?i[d-e]:[],m=new s4(E),g=r?r[d-e]:0;for(let f=1;f<=g;f++){const p=(f-1)*l+1,D=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||E.length===0)&&a<=d&&d<=o&&f===s;h.push(...m.takeWhile(b=>b.visibleColumn!0)||[])}return c}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function ED(u){if(!(u&&u.isTransparent()))return u}Kl((u,e)=>{const t=[{bracketColor:pCe,guideColor:Jtt,guideColorActive:tut},{bracketColor:DCe,guideColor:Ztt,guideColorActive:uut},{bracketColor:xCe,guideColor:Ytt,guideColorActive:nut},{bracketColor:vCe,guideColor:Qtt,guideColorActive:iut},{bracketColor:CCe,guideColor:Xtt,guideColorActive:rut},{bracketColor:bCe,guideColor:eut,guideColorActive:aut}],n=new LCe,i=[{indentColor:mA,indentColorActive:gA},{indentColor:Ltt,indentColorActive:Ptt},{indentColor:ztt,indentColorActive:Rtt},{indentColor:Mtt,indentColorActive:Itt},{indentColor:Ttt,indentColorActive:Ott},{indentColor:Ntt,indentColorActive:jtt}],r=t.map(o=>{var s,l;const c=u.getColor(o.bracketColor),d=u.getColor(o.guideColor),h=u.getColor(o.guideColorActive),E=ED((s=ED(d))!==null&&s!==void 0?s:c==null?void 0:c.transparent(.3)),m=ED((l=ED(h))!==null&&l!==void 0?l:c);if(!(!E||!m))return{guideColor:E,guideColorActive:m}}).filter(tk),a=i.map(o=>{const s=u.getColor(o.indentColor),l=u.getColor(o.indentColorActive),c=ED(s),d=ED(l);if(!(!c||!d))return{indentColor:c,indentColorActive:d}}).filter(tk);if(r.length>0){for(let o=0;o<30;o++){const s=r[o%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(o).replace(/ /g,".")} { --guide-color: ${s.guideColor}; --guide-color-active: ${s.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(a.length>0){for(let o=0;o<30;o++){const s=a[o%a.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${o} { --indent-color: ${s.indentColor}; --indent-color-active: ${s.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class Mj{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class jut{constructor(){this._currentVisibleRange=new j(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Hut{constructor(e,t,n,i,r,a,o){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=i,this.startScrollTop=r,this.stopScrollTop=a,this.scrollType=o,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Vut{constructor(e,t,n,i,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=i,this.scrollType=r,this.type="selections";let a=t[0].startLineNumber,o=t[0].endLineNumber;for(let s=1,l=t.length;s{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Hu(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new jut,this._horizontalRevealRequest=null,this._stickyScrollEnabled=i.get(114).enabled,this._maxNumberStickyLines=i.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Wd(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(50),i=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,ea(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Foe(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let r=t;r<=n;r++)i=this._visibleLines.getVisibleLine(r).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Hut(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Vut(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(n===null)return null;const i=this._getLineNumberFor(n);if(i===-1||i<1||i>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(i)===1)return new ee(i,1);const r=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();if(ia)return null;let o=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(e,t);const s=this._context.viewModel.getLineMinColumn(i);return on)return-1;const i=new Mj(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(i);return this._updateLineWidthsSlowIfDomDidLayout(i),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=j.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;const r=[];let a=0;const o=new Mj(this.domNode.domNode,this._textRangeRestingSpot);let s=0;t&&(s=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=i.startLineNumber;d<=i.endLineNumber;d++){if(dc)continue;const h=d===i.startLineNumber?i.startColumn:1,E=d!==i.endLineNumber,m=E?this._context.viewModel.getLineMaxColumn(d):i.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,m,o);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;const i=new Mj(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,i);return this._updateLineWidthsSlowIfDomDidLayout(i),r}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Qet(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,r=!0;for(let a=t;a<=n;a++){const o=this._visibleLines.getVisibleLine(a);if(e&&!o.getWidthIsFast()){r=!1;continue}i=Math.max(i,o.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(a.needsMonospaceFontCheck()){const o=a.getWidth(null);o>t&&(t=o,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=i;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const i=this._computeScrollLeftToReveal(n);i&&(this._isViewportWrapping||this._ensureMaxLineWidth(i.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:i.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Pa&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let p=r[0].startLineNumber,D=r[0].endLineNumber;for(let x=1,b=r.length;xs){if(!c)return-1;f=d}else if(a===5||a===6)if(a===6&&o<=d&&h<=l)f=o;else{const p=Math.max(5*this._lineHeight,s*.2),D=d-p,x=h-s;f=Math.max(x,D)}else if(a===1||a===2)if(a===2&&o<=d&&h<=l)f=o;else{const p=(d+h)/2;f=Math.max(0,p-s/2)}else f=this._computeMinimumScrolling(o,l,d,h,a===3,a===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(143),i=t.left,r=i+t.width-n.verticalScrollbarWidth;let a=1073741824,o=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)a=Math.min(a,Math.round(c.left)),o=Math.max(o,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const d of c.ranges)a=Math.min(a,Math.round(d.left)),o=Math.max(o,Math.round(d.left+d.width))}return e.minimalReveal||(a=Math.max(0,a-DP.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding),e.type==="selections"&&o-a>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,r,a,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,n,i,r,a){e=e|0,t=t|0,n=n|0,i=i|0,r=!!r,a=!!a;const o=t-e;if(i-nt)return Math.max(0,i-o)}else return n;return e}}DP.HORIZONTAL_EXTRA_PX=30;class HW{constructor(e,t,n,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n),this.zIndex=i??0}}class $ut{constructor(e,t){this.className=e,this.zIndex=t}}class Kut{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class zCe extends wp{_render(e,t,n){const i=[];for(let o=e;o<=t;o++){const s=o-e;i[s]=new Kut}if(n.length===0)return i;n.sort((o,s)=>o.className===s.className?o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber:o.classNamei)continue;const o=Math.max(a.startLineNumber,n),s=Math.min(r.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new Uut(o,s,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,i)=>n.lineNumber===i.lineNumber?n.lane===i.lane?n.zIndex===i.zIndex?i.type===n.type?n.type===0&&i.type===0?n.className0;){const i=t.peek();if(!i)break;const r=t.takeWhile(o=>o.lineNumber===i.lineNumber&&o.lane===i.lane);if(!r||r.length===0)break;const a=r[0];if(a.type===0){const o=[];for(const s of r){if(s.zIndex!==a.zIndex||s.type!==a.type)break;(o.length===0||o[o.length-1]!==s.className)&&o.push(s.className)}n.push(a.accept(o.join(" ")))}else a.widget.renderInfo={lineNumber:a.lineNumber,lane:a.lane}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(const n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{const i=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+(n.renderInfo.lane-1)*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(i),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}}}class Gut{constructor(e,t,n,i){this.lineNumber=e,this.lane=t,this.zIndex=n,this.className=i,this.type=0}accept(e){return new qut(this.lineNumber,this.lane,e)}}class Uut{constructor(e,t,n,i){this.lineNumber=e,this.lane=t,this.zIndex=n,this.widget=i,this.type=1}}class qut{constructor(e,t,n){this.lineNumber=e,this.lane=t,this.combinedClassName=n}}class Jut extends zCe{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(143);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),n=[];let i=0;for(let r=0,a=t.length;r',s=[];for(let l=t;l<=n;l++){const c=l-t,d=i[c].getDecorations();let h="";for(const E of d)h+='
';r[o]=l}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class v0{constructor(e,t,n,i){this._rgba8Brand=void 0,this.r=v0._clamp(e),this.g=v0._clamp(t),this.b=v0._clamp(n),this.a=v0._clamp(i)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}v0.Empty=new v0(0,0,0,0);class pA extends ne{static getInstance(){return this._INSTANCE||(this._INSTANCE=new pA),this._INSTANCE}constructor(){super(),this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(qn.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=qn.getColorMap();if(!e){this._colors=[v0.Empty],this._backgroundIsLight=!0;return}this._colors=[v0.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}pA._INSTANCE=null;const Yut=(()=>{const u=[];for(let e=32;e<=126;e++)u.push(e);return u.push(65533),u})(),Qut=(u,e)=>(u-=32,u<0||u>96?e<=2?(u+96)%96:96-1:u);class Bk{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Bk.soften(e,12/15),this.charDataLight=Bk.soften(e,50/60)}static soften(e,t){const n=new Uint8ClampedArray(e.length);for(let i=0,r=e.length;ie.width||n+m>e.height){console.warn("bad render request outside image data");return}const g=c?this.charDataLight:this.charDataNormal,f=Qut(i,l),p=e.width*4,D=o.r,x=o.g,b=o.b,k=r.r-D,A=r.g-x,F=r.b-b,S=Math.max(a,s),w=e.data;let z=f*h*E,N=n*p+t*4;for(let O=0;Oe.width||n+d>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,E=.5*(r/255),m=a.r,g=a.g,f=a.b,p=i.r-m,D=i.g-g,x=i.b-f,b=m+p*E,k=g+D*E,A=f+x*E,F=Math.max(r,o),S=e.data;let w=n*h+t*4;for(let z=0;z{const e=new Uint8ClampedArray(u.length/2);for(let t=0;t>1]=Toe[u[t]]<<4|Toe[u[t+1]]&15;return e},Poe={1:Mm(()=>Noe("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Mm(()=>Noe("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class u2{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return Poe[e]?n=new Bk(Poe[e](),e):n=u2.createFromSampleData(u2.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let i=0;for(const r of Yut)n.fillText(String.fromCharCode(r),i,16/2),i+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const i=u2._downsample(e,t);return new Bk(i,t)}static _downsampleChar(e,t,n,i,r){const a=1*r,o=2*r;let s=i,l=0;for(let c=0;c0){const l=255/s;for(let c=0;cu2.create(this.fontScale,s.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=wk._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=wk._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const n=e.getColor(Net);return n?new v0(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Pet);return t?v0._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class n2{constructor(e,t,n,i,r,a,o,s,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=i,this.sliderTop=r,this.sliderHeight=a,this.topPaddingLineCount=o,this.startLineNumber=s,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,i,r,a,o,s,l,c,d){const h=e.pixelRatio,E=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/E),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){let A=s*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(A+=Math.max(0,r-e.lineHeight-e.paddingBottom));const F=Math.max(1,Math.floor(r*r/A)),S=Math.max(0,e.minimapHeight-F),w=S/(c-r),z=l*w,N=S>0,O=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),y=Math.floor(e.paddingTop/e.lineHeight);return new n2(l,c,N,w,z,F,y,1,Math.min(o,O))}let f;if(a&&n!==o){const A=n-t+1;f=Math.floor(A*E/h)}else{const A=r/g;f=Math.floor(A*E/h)}const p=Math.floor(e.paddingTop/g);let D=Math.floor(e.paddingBottom/g);if(e.scrollBeyondLastLine){const A=r/g;D=Math.max(D,A-1)}let x;if(D>0){const A=r/g;x=(p+o+D-A-1)*E/h}else x=Math.max(0,(p+o)*E/h-f);x=Math.min(e.minimapHeight-f,x);const b=x/(c-r),k=l*b;if(m>=p+o+D){const A=x>0;return new n2(l,c,A,b,k,f,p,1,o)}else{let A;t>1?A=t+p:A=Math.max(1,l/g);let F,S=Math.max(1,Math.floor(A-k*h/E));Sl&&(S=Math.min(S,d.startLineNumber),F=Math.max(F,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?N=(t-S+F+z)*E/h:N=l/e.paddingTop*(F+z)*E/h,new n2(l,c,!0,b,N,f,F,S,w)}}}class jB{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}jB.INVALID=new jB(-1);class Roe{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new ACe(()=>jB.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let i=0,r=n.length;i1){for(let p=0,D=i-1;p0&&this.minimapLines[n-1]>=e;)n--;let i=this.modelLineToMinimapLine(t)-1;for(;i+1t)return null}return[n+1,i+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),i=this.modelLineToMinimapLine(t);return e!==t&&i===n&&(i===this.minimapLines.length?n>1&&n--:i++),[n,i]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,i=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(i)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,n]=Lk.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const i of n)switch(i.type){case"deleted":this._actual.onLinesDeleted(i.deleteFromLineNumber,i.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(i.insertFromLineNumber,i.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){const i=[];for(let r=0,a=t-e+1;r{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){const l=ji(this._slider.domNode),c=l.top+l.height/2;this._startSliderDragging(n,c,this._lastRenderData.renderedLayout)}return}const r=this._model.options.minimapLineHeight,a=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY;let s=Math.floor(a/r)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;s=Math.min(s,this._model.getLineCount()),this._model.revealLineNumber(s)}),this._sliderPointerMoveMonitor=new m6,this._sliderPointerDownListener=xi(this._slider.domNode,Me.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Zu.addTarget(this._domNode.domNode),this._sliderTouchStartListener=ce(this._domNode.domNode,Yu.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=ce(this._domNode.domNode,Yu.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=xi(this._domNode.domNode,Yu.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;const i=e.pageX;this._slider.toggleClassName("active",!0);const r=(a,o)=>{const s=ji(this._domNode.domNode),l=Math.min(Math.abs(o-i),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(na&&l>Xut){this._model.setScrollTop(n.scrollTop);return}const c=a-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&r(e.pageY,i),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>r(a.pageY,a.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new BX(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(voe),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=n2.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(j.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,E)=>(h.options.zIndex||0)-(E.options.zIndex||0));const{canvasInnerWidth:i,canvasInnerHeight:r}=this._model.options,a=this._model.options.minimapLineHeight,o=this._model.options.minimapCharWidth,s=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,i,r);const c=new Ioe(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,a),this._renderDecorationsLineHighlights(l,n,c,e,a);const d=new Ioe(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,a,s,o,i),this._renderDecorationsHighlights(l,n,d,e,a,s,o,i)}}_renderSelectionLineHighlights(e,t,n,i,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let a=0,o=0;for(const s of t){const l=i.intersectWithViewport(s);if(!l)continue;const[c,d]=l;for(let m=c;m<=d;m++)n.set(m,!0);const h=i.getYForLineNumber(c,r),E=i.getYForLineNumber(d,r);o>=h||(o>a&&e.fillRect(Y4,a,e.canvas.width,o-a),a=h),o=E}o>a&&e.fillRect(Y4,a,e.canvas.width,o-a)}_renderDecorationsLineHighlights(e,t,n,i,r){const a=new Map;for(let o=t.length-1;o>=0;o--){const s=t[o],l=s.options.minimap;if(!l||l.position!==ss.Inline)continue;const c=i.intersectWithViewport(s.range);if(!c)continue;const[d,h]=c,E=l.getColor(this._theme.value);if(!E||E.isTransparent())continue;let m=a.get(E.toString());m||(m=E.transparent(.5).toString(),a.set(E.toString(),m)),e.fillStyle=m;for(let g=d;g<=h;g++){if(n.has(g))continue;n.set(g,!0);const f=i.getYForLineNumber(d,r);e.fillRect(Y4,f,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,i,r,a,o,s){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const l of t){const c=i.intersectWithViewport(l);if(!c)continue;const[d,h]=c;for(let E=d;E<=h;E++)this.renderDecorationOnLine(e,n,l,this._selectionColor,i,E,r,r,a,o,s)}}_renderDecorationsHighlights(e,t,n,i,r,a,o,s){for(const l of t){const c=l.options.minimap;if(!c)continue;const d=i.intersectWithViewport(l.range);if(!d)continue;const[h,E]=d,m=c.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let g=h;g<=E;g++)switch(c.position){case ss.Inline:this.renderDecorationOnLine(e,n,l.range,m,i,g,r,r,a,o,s);continue;case ss.Gutter:{const f=i.getYForLineNumber(g,r),p=2;this.renderDecoration(e,m,p,f,ent,r);continue}}}}renderDecorationOnLine(e,t,n,i,r,a,o,s,l,c,d){const h=r.getYForLineNumber(a,s);if(h+o<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:E,endLineNumber:m}=n,g=E===a?n.startColumn:1,f=m===a?n.endColumn:this._model.getLineMaxColumn(a),p=this.getXOffsetForPosition(t,a,g,l,c,d),D=this.getXOffsetForPosition(t,a,f,l,c,d);this.renderDecoration(e,i,p,h,D-p,o)}getXOffsetForPosition(e,t,n,i,r,a){if(n===1)return Y4;if((n-1)*r>=a)return a;let s=e.get(t);if(!s){const l=this._model.getLineContent(t);s=[Y4];let c=Y4;for(let d=1;d=a){s[d]=a;break}s[d]=m,c=m}e.set(t,s)}return n-1k?Math.floor((i-k)/2):0,F=h.a/255,S=new v0(Math.round((h.r-d.r)*F+d.r),Math.round((h.g-d.g)*F+d.g),Math.round((h.b-d.b)*F+d.b),255);let w=e.topPaddingLineCount*i;const z=[];for(let L=0,T=n-t+1;L=0&&ND)return;const O=f.charCodeAt(k);if(O===9){const y=h-(k+A)%h;A+=y-1,b+=y*a}else if(O===32)b+=a;else{const y=Tm(O)?2:1;for(let _=0;_D)return}}}}}class Ioe{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let i=0,r=this._endLineNumber-this._startLineNumber+1;ithis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class unt extends xs{constructor(e){super(e);const n=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._domNode=ku(document.createElement("div")),_1.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){const t=ku(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference===t?(this._updateMaxMinWidth(),!1):(n.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t].domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let n=0;const i=Object.keys(this._widgets);for(let r=0,a=i.length;r=3){const r=Math.floor(i/3),a=Math.floor(i/3),o=i-r-a,s=e,l=s+r,c=s+r+o;return[[0,s,l,s,c,s,l,s],[0,r,o,r+o,a,r+o+a,o+a,r+o+a]]}else if(n===2){const r=Math.floor(i/2),a=i-r,o=e,s=o+r;return[[0,o,o,o,s,o,o,o],[0,r,r,r,a,r+a,r+a,r+a]]}else{const r=e,a=i;return[[0,r,r,r,r,r,r,r],[0,a,a,a,a,a,a,a]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&ae.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class int extends xs{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=ku(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=qn.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new nnt(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tm.lineNumber===g.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const n=this._settings.canvasWidth,i=this._settings.canvasHeight,r=this._settings.lineHeight,a=this._context.viewLayout,o=this._context.viewLayout.getScrollHeight(),s=i/o,l=6*this._settings.pixelRatio|0,c=l/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=ae.Format.CSS.formatHexA(e),d.fillRect(0,0,n,i)):(d.clearRect(0,0,n,i),d.fillStyle=ae.Format.CSS.formatHexA(e),d.fillRect(0,0,n,i)):d.clearRect(0,0,n,i);const h=this._settings.x,E=this._settings.w;for(const m of t){const g=m.color,f=m.data;d.fillStyle=g;let p=0,D=0,x=0;for(let b=0,k=f.length/3;bi&&(O=i-c),w=O-c,z=O+c}w>x+1||A!==p?(b!==0&&d.fillRect(h[p],D,E[p],x-D),p=A,D=w,x=z):z>x&&(x=z)}d.fillRect(h[p],D,E[p],x-D)}if(!this._settings.hideCursor&&this._settings.cursorColor){const m=2*this._settings.pixelRatio|0,g=m/2|0,f=this._settings.x[7],p=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let D=-100,x=-100;for(let b=0,k=this._cursorPositions.length;bi&&(F=i-g);const S=F-g,w=S+m;S>x+1?(b!==0&&d.fillRect(f,D,p,x-D),D=S,x=w):w>x&&(x=w)}d.fillRect(f,D,p,x-D)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,i),d.stroke(),d.moveTo(0,0),d.lineTo(n,0),d.stroke())}}class Ooe{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class MCe{constructor(e,t,n,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(g=n-f);const p=c.color;let D=this._color2Id[p];D||(D=++this._lastAssignedId,this._color2Id[p]=D,this._id2Color[D]=p);const x=new Ooe(g-f,g+f,D);c.setColorZone(x),o.push(x)}return this._colorZonesInvalid=!1,o.sort(Ooe.compare),o}}class ant extends dA{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=ku(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new rnt(i=>this._context.viewLayout.getVerticalOffsetForLineNumber(i)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(66)),this._zoneManager.setPixelRatio(n.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,i,e),!0}_renderOneLane(e,t,n,i){let r=0,a=0,o=0;for(const s of t){const l=s.colorId,c=s.from,d=s.to;l!==r?(e.fillRect(0,a,i,o-a),r=l,e.fillStyle=n[r],a=c,o=d):o>=c?o=Math.max(o,d):(e.fillRect(0,a,i,o-a),a=c,o=d)}e.fillRect(0,a,i,o-a)}}class ont extends xs{constructor(e){super(e),this.domNode=ku(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const o=ku(document.createElement("div"));o.setClassName("view-ruler"),o.setWidth(r),this.domNode.appendChild(o),this._renderedRulers.push(o),a--}return}let n=e-t;for(;n>0;){const i=this._renderedRulers.pop();this.domNode.removeChild(i),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(102);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class lnt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class cnt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function dnt(u){return new lnt(u)}function hnt(u){return new cnt(u.lineNumber,u.ranges.map(dnt))}class ai extends wp{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){const i=this._typicalHalfwidthCharacterWidth/4;let r=null,a=null;if(n&&n.length>0&&t.length>0){const o=t[0].lineNumber;if(o===e.startLineNumber)for(let l=0;!r&&l=0;l--)n[l].lineNumber===s&&(a=n[l].ranges[0]);r&&!r.startStyle&&(r=null),a&&!a.startStyle&&(a=null)}for(let o=0,s=t.length;o0){const m=t[o-1].ranges[0].left,g=t[o-1].ranges[0].left+t[o-1].ranges[0].width;o9(c-m)m&&(h.top=1),o9(d-g)'}_actualRenderOneSelection(e,t,n,i){if(i.length===0)return;const r=!!i[0].ranges[0].startStyle,a=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),s=i[0].lineNumber,l=i[i.length-1].lineNumber;for(let c=0,d=i.length;c1,l)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([a,o])=>a+o)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}ai.SELECTION_CLASS_NAME="selected-text";ai.SELECTION_TOP_LEFT="top-left-radius";ai.SELECTION_BOTTOM_LEFT="bottom-left-radius";ai.SELECTION_TOP_RIGHT="top-right-radius";ai.SELECTION_BOTTOM_RIGHT="bottom-right-radius";ai.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";ai.ROUNDED_PIECE_WIDTH=10;Kl((u,e)=>{const t=u.getColor(OXe);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function o9(u){return u<0?-u:u}class joe{constructor(e,t,n,i,r,a,o){this.top=e,this.left=t,this.paddingLeft=n,this.width=i,this.height=r,this.textContent=a,this.textContentClassName=o}}class Hoe{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=ku(document.createElement("div")),this._domNode.setClassName(`cursor ${lx}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),ea(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ee(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),ea(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[i,r]=Fqe(n,t-1);return[new ee(e,i+1),n.substring(i,r)]}_prepareRender(e){let t="",n="";const[i,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Sr.Line||this._cursorStyle===Sr.LineThin){const h=e.visibleRangeForPosition(i);if(!h||h.outsideRenderedLine)return null;let E;this._cursorStyle===Sr.Line?(E=xae(this._lineCursorWidth>0?this._lineCursorWidth:2),E>2&&(t=r,n=this._getTokenClassName(i))):E=xae(1);let m=h.left,g=0;E>=2&&m>=1&&(g=1,m-=g);const f=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new joe(f,m,g,E,this._lineHeight,t,n)}const a=e.linesVisibleRangesForRange(new j(i.lineNumber,i.column,i.lineNumber,i.column+r.length),!1);if(!a||a.length===0)return null;const o=a[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const s=o.ranges[0],l=r===" "?this._typicalHalfwidthCharacterWidth:s.width<1?this._typicalHalfwidthCharacterWidth:s.width;this._cursorStyle===Sr.Block&&(t=r,n=this._getTokenClassName(i));let c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Sr.Underline||this._cursorStyle===Sr.UnderlineThin)&&(c+=this._lineHeight-2,d=2),new joe(c,s.left,0,l,d,t,n)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${lx} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class zk extends xs{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Hoe(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=ku(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Vl,this._cursorFlatBlinkInterval=new rA,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,i=this._secondaryCursors.length;nt.length){const r=this._secondaryCursors.length-t.length;for(let a=0;a{for(let i=0,r=e.ranges.length;i{this._isVisible?this._hide():this._show()},zk.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},zk.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Sr.Line:e+=" cursor-line-style";break;case Sr.Block:e+=" cursor-block-style";break;case Sr.Underline:e+=" cursor-underline-style";break;case Sr.LineThin:e+=" cursor-line-thin-style";break;case Sr.BlockOutline:e+=" cursor-block-outline-style";break;case Sr.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=u.getColor(gCe);if(t){let n=u.getColor(Btt);n||(n=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${n}; }`),$c(u.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});const Tj=()=>{throw new Error("Invalid change accessor")};class Ent extends xs{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=ku(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=ku(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let n=!1;return this._context.viewModel.changeWhitespace(i=>{const r=Object.keys(this._zones);for(let a=0,o=r.length;a{const i={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};mnt(e,i),i.addZone=Tj,i.removeZone=Tj,i.layoutZone=Tj}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:ku(t.domNode),marginDomNode:t.marginDomNode?ku(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=i.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){zt(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){zt(n)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let i=!1;for(const a of t)this._zones[a.id].isInHiddenArea||(n[a.id]=a,i=!0);const r=Object.keys(this._zones);for(let a=0,o=r.length;ao)continue;const E=h.startLineNumber===o?h.startColumn:l.minColumn,m=h.endLineNumber===o?h.endColumn:l.maxColumn;E=z.endOffset&&(w++,z=n&&n[w]),y!==9&&y!==32||h&&!A&&O<=S)continue;if(d&&O>=F&&O<=S&&y===32){const L=O-1>=0?o.charCodeAt(O-1):0,T=O+1=0?o.charCodeAt(O-1):0;if(y===32&&L!==32&&L!==9)continue}if(n&&(!z||z.startOffset>O||z.endOffset<=O))continue;const _=e.visibleRangeForPosition(new ee(t,O+1));_&&(a?(N=Math.max(N,_.left),y===9?k+=this._renderArrow(E,f,_.left):k+=``):y===9?k+=`
${b?String.fromCharCode(65515):String.fromCharCode(8594)}
`:k+=`
${String.fromCharCode(x)}
`)}return a?(N=Math.round(N+f),``+k+""):k}_renderArrow(e,t,n){const i=t/7,r=t,a=e/2,o=n,s={x:0,y:i/2},l={x:100/125*r,y:s.y},c={x:l.x-.2*l.x,y:l.y+.2*l.x},d={x:c.x+.1*l.x,y:c.y+.1*l.x},h={x:d.x+.35*l.x,y:d.y-.35*l.x},E={x:h.x,y:-h.y},m={x:d.x,y:-d.y},g={x:c.x,y:-c.y},f={x:l.x,y:-l.y},p={x:s.x,y:-s.y};return``}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Voe{constructor(e){const t=e.options,n=t.get(50),i=t.get(38);i==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):i==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var vnt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cnt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let VW=class extends dA{constructor(e,t,n,i,r,a,o){super(),this._instantiationService=o,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Ye(1,1,1,1)],this._renderAnimationFrame=null;const s=new Sut(t,i,r,e);this._context=new fnt(t,n,i),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(OW,this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=ku(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=ku(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=ku(document.createElement("div")),_1.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Rut(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new DP(this._context,this._linesContent),this._viewZones=new Ent(this._context),this._viewParts.push(this._viewZones);const l=new int(this._context);this._viewParts.push(l);const c=new snt(this._context);this._viewParts.push(c);const d=new wut(this._context);this._viewParts.push(d),d.addDynamicOverlay(new Tut(this._context)),d.addDynamicOverlay(new ai(this._context)),d.addDynamicOverlay(new Out(this._context)),d.addDynamicOverlay(new Put(this._context)),d.addDynamicOverlay(new xnt(this._context));const h=new Lut(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Nut(this._context)),h.addDynamicOverlay(new Zut(this._context)),h.addDynamicOverlay(new Jut(this._context)),h.addDynamicOverlay(new fA(this._context)),this._glyphMarginWidgets=new Wut(this._context),this._viewParts.push(this._glyphMarginWidgets);const E=new L3(this._context);E.getDomNode().appendChild(this._viewZones.marginDomNode),E.getDomNode().appendChild(h.getDomNode()),E.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(E),this._contentWidgets=new zut(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new zk(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new unt(this._context),this._viewParts.push(this._overlayWidgets);const m=new ont(this._context);this._viewParts.push(m);const g=new Dnt(this._context);this._viewParts.push(g);const f=new tnt(this._context);if(this._viewParts.push(f),l){const p=this._scrollbar.getOverviewRulerLayoutInfo();p.parent.insertBefore(l.getDomNode(),p.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(m.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(E.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(g.domNode),this.domNode.appendChild(this._overflowGuardContainer),a?a.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Att(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),zE.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map(r=>{var a,o;const s=(o=(a=r.options.glyphMargin)===null||a===void 0?void 0:a.position)!==null&&o!==void 0?o:rx.Left;return{range:r.range,lane:s}})),t=t.concat(this._glyphMarginWidgets.getWidgets().map(r=>({range:e.validateRange(r.preference.range),lane:r.preference.lane}))),t.sort((r,a)=>j.compareRangesUsingStarts(r.range,a.range));let n=null,i=null;for(const r of t)if(r.lane===rx.Left&&(!n||j.compareRangesUsingEnds(n,r.range)<0)&&(n=r.range),r.lane===rx.Right&&(!i||j.compareRangesUsingEnds(i,r.range)<0)&&(i=r.range),n&&i){if(n.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ntt(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ee(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+IW(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=CB(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){bnt(()=>this._actualRender())}_getViewPartsToRender(){const e=[];let t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_actualRender(){if(!XQ(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const n=new pnt(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const i=new Zet(this._context.viewLayout,n,this._viewLines);for(const r of e)r.prepareRender(i);for(const r of e)r.render(i),r.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const r=this._viewLines.visibleRangeForPosition(new ee(i.lineNumber,i.column));return r?r.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?fP.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new ant(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,n,i,r,a,o,s,l;this._contentWidgets.setWidgetPosition(e.widget,(n=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&n!==void 0?n:null,(r=(i=e.position)===null||i===void 0?void 0:i.secondaryPosition)!==null&&r!==void 0?r:null,(o=(a=e.position)===null||a===void 0?void 0:a.preference)!==null&&o!==void 0?o:null,(l=(s=e.position)===null||s===void 0?void 0:s.positionAffinity)!==null&&l!==void 0?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};VW=vnt([Cnt(6,mt)],VW);function bnt(u){try{return u()}catch(e){zt(e)}}class TCe{constructor(e,t,n,i,r,a){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function Vm(u){let e=0,t=0,n=0,i=0;for(let r=0,a=u.length;r=Hs&&(t=t-u%Hs),t}function _nt(u,e){return u.reduce((t,n)=>Zn(t,e(n)),uo)}function NCe(u,e){return u===e}function Tk(u,e){const t=u,n=e;if(n-t<=0)return uo;const r=Math.floor(t/Hs),a=Math.floor(n/Hs),o=n-a*Hs;if(r===a){const s=t-r*Hs;return gi(0,o-s)}else return gi(a-r,o)}function hx(u,e){return u=e}function v5(u){return gi(u.lineNumber-1,u.column-1)}function a3(u,e){const t=u,n=Math.floor(t/Hs),i=t-n*Hs,r=e,a=Math.floor(r/Hs),o=r-a*Hs;return new j(n+1,i+1,a+1,o+1)}function Snt(u){const e=F1(u);return gi(e.length-1,e[e.length-1].length)}class $h{static fromModelContentChanges(e){return e.map(n=>{const i=j.lift(n.range);return new $h(v5(i.getStartPosition()),v5(i.getEndPosition()),Snt(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${_0(this.startOffset)}...${_0(this.endOffset)}) -> ${_0(this.newLength)}`}}class Bnt{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>wX.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:Tk(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?gi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):gi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=_0(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?gi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):gi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(i===0){const a=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;for(;;){const r=this.lineTokens,a=r.getCount();let o=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}const i=ynt(e,t,this.lineIdx,this.lineCharOffset);return new bE(i,0,-1,Ii.getEmpty(),new Af(i))}}class Nnt{constructor(e,t){this.text=e,this._offset=uo,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+`| +`);else{o--;const s=t.getLineMaxColumn(o);i[r]=this._enter(e,t,!1,new j(o,s,o,s))}}return i}static lineInsertAfter(e,t,n){if(t===null||n===null)return[];const i=[];for(let r=0,a=n.length;r{const i=t.get(Cu).getFocusedCodeEditor();return i&&i.hasTextFocus()?this._runEditorCommand(t,i,n):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,n)=>{const i=yl();return i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0?(this.runDOMCommand(i),!0):!1}),e.addImplementation(0,"generic-dom",(t,n)=>{const i=t.get(Cu).getActiveCodeEditor();return i?(i.focus(),this._runEditorCommand(t,i,n)):!1})}_runEditorCommand(e,t,n){const i=this.runEditorCommand(e,t,n);return i||!0}}var lr;(function(u){class e extends Xn{constructor(D){super(D),this._inSelectionMode=D.inSelectionMode}runCoreEditorCommand(D,x){if(!x.position)return;D.model.pushStackElement(),D.setCursorStates(x.source,3,[br.moveTo(D,D.getPrimaryCursorState(),this._inSelectionMode,x.position,x.viewPosition)])&&x.revealType!==2&&D.revealPrimaryCursor(x.source,!0,!0)}}u.MoveTo=ze(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),u.MoveToSelect=ze(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends Xn{runCoreEditorCommand(D,x){D.model.pushStackElement();const b=this._getColumnSelectResult(D,D.getPrimaryCursorState(),D.getCursorColumnSelectData(),x);b!==null&&(D.setCursorStates(x.source,3,b.viewStates.map(k=>du.fromViewState(k))),D.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:b.fromLineNumber,fromViewVisualColumn:b.fromVisualColumn,toViewLineNumber:b.toLineNumber,toViewVisualColumn:b.toVisualColumn}),b.reversed?D.revealTopMostCursor(x.source):D.revealBottomMostCursor(x.source))}}u.ColumnSelect=ze(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(p,D,x,b){if(typeof b.position>"u"||typeof b.viewPosition>"u"||typeof b.mouseColumn>"u")return null;const k=p.model.validatePosition(b.position),A=p.coordinatesConverter.validateViewPosition(new ee(b.viewPosition.lineNumber,b.viewPosition.column),k),F=b.doColumnSelect?x.fromViewLineNumber:A.lineNumber,S=b.doColumnSelect?x.fromViewVisualColumn:b.mouseColumn-1;return yf.columnSelect(p.cursorConfig,p,F,S,A.lineNumber,b.mouseColumn-1)}}),u.CursorColumnSelectLeft=ze(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(p,D,x,b){return yf.columnSelectLeft(p.cursorConfig,p,x)}}),u.CursorColumnSelectRight=ze(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(p,D,x,b){return yf.columnSelectRight(p.cursorConfig,p,x)}});class n extends t{constructor(D){super(D),this._isPaged=D.isPaged}_getColumnSelectResult(D,x,b,k){return yf.columnSelectUp(D.cursorConfig,D,b,this._isPaged)}}u.CursorColumnSelectUp=ze(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3600,linux:{primary:0}}})),u.CursorColumnSelectPageUp=ze(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3595,linux:{primary:0}}}));class i extends t{constructor(D){super(D),this._isPaged=D.isPaged}_getColumnSelectResult(D,x,b,k){return yf.columnSelectDown(D.cursorConfig,D,b,this._isPaged)}}u.CursorColumnSelectDown=ze(new i({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3602,linux:{primary:0}}})),u.CursorColumnSelectPageDown=ze(new i({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends Xn{constructor(){super({id:"cursorMove",precondition:void 0,description:OB.description})}runCoreEditorCommand(D,x){const b=OB.parse(x);b&&this._runCursorMove(D,x.source,b)}_runCursorMove(D,x,b){D.model.pushStackElement(),D.setCursorStates(x,3,r._move(D,D.getCursorStates(),b)),D.revealPrimaryCursor(x,!0)}static _move(D,x,b){const k=b.select,A=b.value;switch(b.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return br.simpleMove(D,x,b.direction,k,A,b.unit);case 11:case 13:case 12:case 14:return br.viewportMove(D,x,b.direction,k,A);default:return null}}}u.CursorMoveImpl=r,u.CursorMove=ze(new r);class a extends Xn{constructor(D){super(D),this._staticArgs=D.args}runCoreEditorCommand(D,x){let b=this._staticArgs;this._staticArgs.value===-1&&(b={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:x.pageSize||D.cursorConfig.pageSize}),D.model.pushStackElement(),D.setCursorStates(x.source,3,br.simpleMove(D,D.getCursorStates(),b.direction,b.select,b.value,b.unit)),D.revealPrimaryCursor(x.source,!0)}}u.CursorLeft=ze(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),u.CursorLeftSelect=ze(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1039}})),u.CursorRight=ze(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),u.CursorRightSelect=ze(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1041}})),u.CursorUp=ze(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),u.CursorUpSelect=ze(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),u.CursorPageUp=ze(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:11}})),u.CursorPageUpSelect=ze(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1035}})),u.CursorDown=ze(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),u.CursorDownSelect=ze(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),u.CursorPageDown=ze(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:12}})),u.CursorPageDownSelect=ze(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1036}})),u.CreateCursor=ze(new class extends Xn{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(p,D){if(!D.position)return;let x;D.wholeLine?x=br.line(p,p.getPrimaryCursorState(),!1,D.position,D.viewPosition):x=br.moveTo(p,p.getPrimaryCursorState(),!1,D.position,D.viewPosition);const b=p.getCursorStates();if(b.length>1){const k=x.modelState?x.modelState.position:null,A=x.viewState?x.viewState.position:null;for(let F=0,S=b.length;FA&&(k=A);const F=new j(k,1,k,p.model.getLineMaxColumn(k));let S=0;if(x.at)switch(x.at){case x5.RawAtArgument.Top:S=3;break;case x5.RawAtArgument.Center:S=1;break;case x5.RawAtArgument.Bottom:S=4;break}const w=p.coordinatesConverter.convertModelRangeToViewRange(F);p.revealRange(D.source,!1,w,S,0)}}),u.SelectAll=new class extends jW{constructor(){super(cZe)}runDOMCommand(p){T0&&(p.focus(),p.select()),p.ownerDocument.execCommand("selectAll")}runEditorCommand(p,D,x){const b=D._getViewModel();b&&this.runCoreEditorCommand(b,x)}runCoreEditorCommand(p,D){p.model.pushStackElement(),p.setCursorStates("keyboard",3,[br.selectAll(p,p.getPrimaryCursorState())])}},u.SetSelection=ze(new class extends Xn{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(p,D){D.selection&&(p.model.pushStackElement(),p.setCursorStates(D.source,3,[du.fromModelSelection(D.selection)]))}})})(lr||(lr={}));const _ut=Ee.and(W.textInputFocus,W.columnSelection);function g6(u,e){Po.registerKeybindingRule({id:u,primary:e,when:_ut,weight:Du+1})}g6(lr.CursorColumnSelectLeft.id,1039);g6(lr.CursorColumnSelectRight.id,1041);g6(lr.CursorColumnSelectUp.id,1040);g6(lr.CursorColumnSelectPageUp.id,1035);g6(lr.CursorColumnSelectDown.id,1042);g6(lr.CursorColumnSelectPageDown.id,1036);function Loe(u){return u.register(),u}var dx;(function(u){class e extends xr{runEditorCommand(n,i,r){const a=i._getViewModel();a&&this.runCoreEditingCommand(i,a,r||{})}}u.CoreEditingCommand=e,u.LineBreakInsert=ze(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:W.writable,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.lineBreakInsert(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection)))}}),u.Outdent=ze(new class extends e{constructor(){super({id:"outdent",precondition:W.writable,kbOpts:{weight:Du,kbExpr:Ee.and(W.editorTextFocus,W.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.outdent(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),u.Tab=ze(new class extends e{constructor(){super({id:"tab",precondition:W.writable,kbOpts:{weight:Du,kbExpr:Ee.and(W.editorTextFocus,W.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,n,i){t.pushUndoStop(),t.executeCommands(this.id,Pn.tab(n.cursorConfig,n.model,n.getCursorStates().map(r=>r.modelState.selection))),t.pushUndoStop()}}),u.DeleteLeft=ze(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,n,i){const[r,a]=z3.deleteLeft(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection),n.getCursorAutoClosedCharacters());r&&t.pushUndoStop(),t.executeCommands(this.id,a),n.setPrevEditOperationType(2)}}),u.DeleteRight=ze(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Du,kbExpr:W.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,n,i){const[r,a]=z3.deleteRight(n.getPrevEditOperationType(),n.cursorConfig,n.model,n.getCursorStates().map(o=>o.modelState.selection));r&&t.pushUndoStop(),t.executeCommands(this.id,a),n.setPrevEditOperationType(3)}}),u.Undo=new class extends jW{constructor(){super(g6e)}runDOMCommand(t){t.ownerDocument.execCommand("undo")}runEditorCommand(t,n,i){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().undo()}},u.Redo=new class extends jW{constructor(){super(f6e)}runDOMCommand(t){t.ownerDocument.execCommand("redo")}runEditorCommand(t,n,i){if(!(!n.hasModel()||n.getOption(90)===!0))return n.getModel().redo()}}})(dx||(dx={}));class zoe extends ZN{constructor(e,t,n){super({id:e,precondition:void 0,description:n}),this._handlerId=t}runCommand(e,t){const n=e.get(Cu).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}function Lp(u,e){Loe(new zoe("default:"+u,u)),Loe(new zoe(u,u,e))}Lp("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});Lp("replacePreviousChar");Lp("compositionType");Lp("compositionStart");Lp("compositionEnd");Lp("paste");Lp("cut");class Sut{constructor(e,t,n,i){this.configuration=e,this.viewModel=t,this.userInputEvents=n,this.commandDelegate=i}paste(e,t,n,i){this.commandDelegate.paste(e,t,n,i)}type(e){this.commandDelegate.type(e)}compositionType(e,t,n,i){this.commandDelegate.compositionType(e,t,n,i)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){lr.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):i?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){lr.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){lr.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,n){e=this._validateViewColumn(e),lr.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}_createCursor(e,t){e=this._validateViewColumn(e),lr.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){lr.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){lr.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){lr.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){lr.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){lr.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){lr.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){lr.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){lr.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){lr.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class fP{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;(t=this.onKeyDown)===null||t===void 0||t.call(this,e)}emitKeyUp(e){var t;(t=this.onKeyUp)===null||t===void 0||t.call(this,e)}emitContextMenu(e){var t;(t=this.onContextMenu)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;(t=this.onMouseMove)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;(t=this.onMouseLeave)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;(t=this.onMouseDown)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;(t=this.onMouseUp)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;(t=this.onMouseDrag)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;(t=this.onMouseDrop)===null||t===void 0||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;(e=this.onMouseDropCanceled)===null||e===void 0||e.call(this)}emitMouseWheel(e){var t;(t=this.onMouseWheel)===null||t===void 0||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return fP.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const n=Object.assign({},e);return n.position&&(n.position=t.convertViewPositionToModelPosition(n.position)),n.range&&(n.range=t.convertViewRangeToModelRange(n.range)),(n.type===5||n.type===8)&&(n.detail=this.convertViewToModelViewZoneData(n.detail,t)),n}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ee(e.afterLineNumber,1)).lineNumber}}}class ACe{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Si("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;let r=0,a=0;for(let s=n;s<=i;s++){const l=s-this._rendLineNumberStart;e<=s&&s<=t&&(a===0?(r=l,a=1):a++)}if(e=i&&o<=r&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),a=!0);return a}onLinesInserted(e,t){if(this.getCount()===0)return null;const n=t-e+1,i=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>r)return null;if(n+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);const a=[];for(let d=0;dn)continue;const s=Math.max(t,o.fromLineNumber),l=Math.min(n,o.toLineNumber);for(let c=s;c<=l;c++){const d=c-this._rendLineNumberStart;this._lines[d].onTokensChanged(),i=!0}}return i}}class _Ce{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ACe(()=>this._host.createVisibleLine())}_createDomNode(){const e=ku(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(143)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let n=0,i=t.length;nt){const a=t,o=Math.min(n,r.rendLineNumberStart-1);a<=o&&(this._insertLinesBefore(r,a,o,i,t),r.linesLength+=o-a+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,a),r.linesLength-=a)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1n){const a=Math.max(0,n-r.rendLineNumberStart+1),s=r.linesLength-1-a+1;s>0&&(this._removeLinesAfter(r,s),r.linesLength-=s)}return this._finishRendering(r,!1,i),r}_renderUntouchedLines(e,t,n,i,r){const a=e.rendLineNumberStart,o=e.lines;for(let s=t;s<=n;s++){const l=a+s;o[s].layoutLine(l,i[l-r])}}_insertLinesBefore(e,t,n,i,r){const a=[];let o=0;for(let s=t;s<=n;s++)a[o++]=this.host.createVisibleLine();e.lines=a.concat(e.lines)}_removeLinesBefore(e,t){for(let n=0;n=0;o--){const s=e.lines[o];i[o]&&(s.setDomNode(a),a=a.previousSibling)}}_finishRenderingInvalidLines(e,t,n){const i=document.createElement("div");Lh._ttPolicy&&(t=Lh._ttPolicy.createHTML(t)),i.innerHTML=t;for(let r=0;ru});Lh._sb=new h6(1e5);class SCe extends vs{constructor(e){super(e),this._visibleLines=new _Ce(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);ea(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;en.shouldRender());for(let n=0,i=t.length;n'),i.appendString(r),i.appendString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class wut extends SCe{constructor(e){super(e);const n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Lut extends SCe{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),ea(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;ea(this.domNode,t.get(50));const n=t.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class zut extends vs{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=ku(document.createElement("div")),_1.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=ku(document.createElement("div")),_1.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){const e=Object.keys(this._widgets);for(const t of e)this._widgets[t].updateAnchorViewPosition()}addWidget(e){const t=new Mut(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,n,i,r){this._widgets[e.getId()].setPosition(t,n,i,r),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t];delete this._widgets[t];const i=n.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}onBeforeRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const n of t)this._widgets[n].render(e)}}class Mut{constructor(e,t,n){this._primaryAnchor=new dC(null,null),this._secondaryAnchor=new dC(null,null),this._context=e,this._viewDomNode=t,this._actual=n,this.domNode=ku(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const i=this._context.configuration.options,r=i.get(143);this._fixedOverflowWidgets=i.get(42),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=i.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(66),e.hasChanged(143)){const n=t.get(143);this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,n){this._affinity=e,this._primaryAnchor=i(t,this._context.viewModel,this._affinity),this._secondaryAnchor=i(n,this._context.viewModel,this._affinity);function i(r,a,o){if(!r)return new dC(null,null);const s=a.model.validatePosition(r);if(a.coordinatesConverter.modelPositionIsVisible(s)){const l=a.coordinatesConverter.convertModelPositionToViewPosition(s,o??void 0);return new dC(r,l)}return new dC(r,null)}}_getMaxWidth(){const e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?(t==null?void 0:t.innerWidth)||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,n,i){this._setPosition(i,e,t),this._preference=n,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,n,i){const r=e.top,a=r,o=e.top+e.height,s=i.viewportHeight-o,l=r-n,c=a>=n,d=o,h=s>=n;let E=e.left;return E+t>i.scrollLeft+i.viewportWidth&&(E=i.scrollLeft+i.viewportWidth-t),El){const E=h-(l-i);h-=E,n-=E}if(h=p,b=E+n<=m.height-D;return this._fixedOverflowWidgets?{fitsAbove:x,aboveTop:Math.max(h,p),fitsBelow:b,belowTop:E,left:f}:{fitsAbove:x,aboveTop:o,fitsBelow:b,belowTop:s,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new hC(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,n;const i=o(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),r=((t=this._secondaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)===((n=this._primaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)?this._secondaryAnchor.viewPosition:null,a=o(r,this._affinity,this._lineHeight);return{primary:i,secondary:a};function o(s,l,c){if(!s)return null;const d=e.visibleRangeForPosition(s);if(!d)return null;const h=s.column===1&&l===3?0:d.left,E=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.scrollTop;return new Moe(E,h,c)}}_reduceAnchorCoordinates(e,t,n){if(!t)return e;const i=this._context.configuration.options.get(50);let r=t.left;return re.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&zj(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&zj(this._actual.afterRender,this._actual,this._renderData.position)}}class dC{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class hC{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class Moe{constructor(e,t,n){this.top=e,this.left=t,this.height=n,this._anchorCoordinateBrand=void 0}}function zj(u,e,...t){try{return u.call(e,...t)}catch{return null}}class BCe extends wp{constructor(e){super(),this._context=e;const t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Ye(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(i=>i.positionLineNumber);t.sort((i,r)=>i-r),di(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const n=this._selections.every(i=>i.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r=this._cursorLineNumbers.length;let a=0;const o=[];for(let s=n;s<=i;s++){const l=s-n;for(;a=this._renderData.length?"":this._renderData[n]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class Tut extends BCe{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Nut extends BCe{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Kl((u,e)=>{const t=u.getColor(mCe);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||u.defines(Soe)){const n=u.getColor(Soe);n&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${n}; }`),$c(u.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class Put extends wp{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],i=0;for(let s=0,l=t.length;s{if(s.options.zIndexl.options.zIndex)return 1;const c=s.options.className,d=l.options.className;return cd?1:j.compareRangesUsingStarts(s.range,l.range)});const r=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber,o=[];for(let s=r;s<=a;s++){const l=s-r;o[l]=""}this._renderWholeLineDecorations(e,n,o),this._renderNormalDecorations(e,n,o),this._renderResult=o}_renderWholeLineDecorations(e,t,n){const i=String(this._lineHeight),r=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber;for(let o=0,s=t.length;o',d=Math.max(l.range.startLineNumber,r),h=Math.min(l.range.endLineNumber,a);for(let E=d;E<=h;E++){const m=E-r;n[m]+=c}}}_renderNormalDecorations(e,t,n){var i;const r=String(this._lineHeight),a=e.visibleRange.startLineNumber;let o=null,s=!1,l=null,c=!1;for(let d=0,h=t.length;d';s[E]+=D}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Rut extends vs{constructor(e,t,n,i){super(e);const r=this._context.configuration.options,a=r.get(102),o=r.get(74),s=r.get(40),l=r.get(105),c={listenOnDomNode:n.domNode,className:"editor-scrollable "+IW(e.theme.type),useShadows:!1,lazyRender:!0,vertical:a.vertical,horizontal:a.horizontal,verticalHasArrows:a.verticalHasArrows,horizontalHasArrows:a.horizontalHasArrows,verticalScrollbarSize:a.verticalScrollbarSize,verticalSliderSize:a.verticalSliderSize,horizontalScrollbarSize:a.horizontalScrollbarSize,horizontalSliderSize:a.horizontalSliderSize,handleMouseWheel:a.handleMouseWheel,alwaysConsumeMouseWheel:a.alwaysConsumeMouseWheel,arrowSize:a.arrowSize,mouseWheelScrollSensitivity:o,fastScrollSensitivity:s,scrollPredominantAxis:l,scrollByPage:a.scrollByPage};this.scrollbar=this._register(new AX(t.domNode,c,this._context.viewLayout.getScrollable())),_1.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=ku(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(h,E,m)=>{const g={};if(E){const f=h.scrollTop;f&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+f,h.scrollTop=0)}if(m){const f=h.scrollLeft;f&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+f,h.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(ce(n.domNode,"scroll",h=>d(n.domNode,!0,!0))),this._register(ce(t.domNode,"scroll",h=>d(t.domNode,!0,!1))),this._register(ce(i.domNode,"scroll",h=>d(i.domNode,!0,!1))),this._register(ce(this.scrollbarDomNode.domNode,"scroll",h=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(143);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(72).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(102)||e.hasChanged(74)||e.hasChanged(40)){const t=this._context.configuration.options,n=t.get(102),i=t.get(74),r=t.get(40),a=t.get(105),o={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:r,scrollPredominantAxis:a};this.scrollbar.updateOptions(o)}return e.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+IW(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class wCe extends ne{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function pP(u,e){let t=0,n=0;const i=u.length;for(;ni)throw new Si("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,a=!!(r&&r.offSide);let o=-2,s=-1,l=-2,c=-1;const d=F=>{if(o!==-1&&(o===-2||o>F-1)){o=-1,s=-1;for(let S=F-2;S>=0;S--){const w=this._computeIndentLevel(S);if(w>=0){o=S,s=w;break}}}if(l===-2){l=-1,c=-1;for(let S=F;S=0){l=S,c=w;break}}}};let h=-2,E=-1,m=-2,g=-1;const f=F=>{if(h===-2){h=-1,E=-1;for(let S=F-2;S>=0;S--){const w=this._computeIndentLevel(S);if(w>=0){h=S,E=w;break}}}if(m!==-1&&(m===-2||m=0){m=S,g=w;break}}}};let p=0,D=!0,x=0,b=!0,k=0,A=0;for(let F=0;D||b;F++){const S=e-F,w=e+F;F>1&&(S<1||S1&&(w>i||w>n)&&(b=!1),F>5e4&&(D=!1,b=!1);let z=-1;if(D&&S>=1){const O=this._computeIndentLevel(S-1);O>=0?(l=S-1,c=O,z=Math.ceil(O/this.textModel.getOptions().indentSize)):(d(S),z=this._getIndentLevelForWhitespaceLine(a,s,c))}let N=-1;if(b&&w<=i){const O=this._computeIndentLevel(w-1);O>=0?(h=w-1,E=O,N=Math.ceil(O/this.textModel.getOptions().indentSize)):(f(w),N=this._getIndentLevelForWhitespaceLine(a,E,g))}if(F===0){A=z;continue}if(F===1){if(w<=i&&N>=0&&A+1===N){D=!1,p=w,x=w,k=N;continue}if(S>=1&&z>=0&&z-1===A){b=!1,p=S,x=S,k=z;continue}if(p=e,x=e,k=A,k===0)return{startLineNumber:p,endLineNumber:x,indent:k}}D&&(z>=k?p=S:D=!1),b&&(N>=k?x=w:b=!1)}return{startLineNumber:p,endLineNumber:x,indent:k}}getLinesBracketGuides(e,t,n,i){var r;const a=[];for(let h=e;h<=t;h++)a.push([]);const o=!0,s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new j(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(n&&s.length>0){const h=(e<=n.lineNumber&&n.lineNumber<=t?s:this.textModel.bracketPairs.getBracketPairsInRange(j.fromPositions(n)).toArray()).filter(E=>j.strictContainsPosition(E.range,n));l=(r=BB(h,E=>o))===null||r===void 0?void 0:r.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new LCe;for(const h of s){if(!h.closingBracketRange)continue;const E=l&&h.range.equalsRange(l);if(!E&&!i.includeInactive)continue;const m=d.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,c)+(i.highlightActive&&E?" "+d.activeClassName:""),g=h.openingBracketRange.getStartPosition(),f=h.closingBracketRange.getStartPosition(),p=i.horizontalGuides===r3.Enabled||i.horizontalGuides===r3.EnabledForActive&&E;if(h.range.startLineNumber===h.range.endLineNumber){p&&a[h.range.startLineNumber-e].push(new Vf(-1,h.openingBracketRange.getEndPosition().column,m,new t2(!1,f.column),-1,-1));continue}const D=this.getVisibleColumnFromPosition(f),x=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),b=Math.min(x,D,h.minVisibleColumnIndentation+1);let k=!1;Ta(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=e&&x>b&&a[g.lineNumber-e].push(new Vf(b,-1,m,new t2(!1,g.column),-1,-1)),f.lineNumber<=t&&D>b&&a[f.lineNumber-e].push(new Vf(b,-1,m,new t2(!k,f.column),-1,-1)))}for(const h of a)h.sort((E,m)=>E.visibleColumn-m.visibleColumn);return a}getVisibleColumnFromPosition(e){return Ki.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const i=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,a=!!(r&&r.offSide),o=new Array(t-e+1);let s=-2,l=-1,c=-2,d=-1;for(let h=e;h<=t;h++){const E=h-e,m=this._computeIndentLevel(h-1);if(m>=0){s=h-1,l=m,o[E]=Math.ceil(m/i.indentSize);continue}if(s===-2){s=-1,l=-1;for(let g=h-2;g>=0;g--){const f=this._computeIndentLevel(g);if(f>=0){s=g,l=f;break}}}if(c!==-1&&(c===-2||c=0){c=g,d=f;break}}}o[E]=this._getIndentLevelForWhitespaceLine(a,l,d)}return o}_getIndentLevelForWhitespaceLine(e,t,n){const i=this.textModel.getOptions();return t===-1||n===-1?0:ts||this._maxIndentLeft>0&&x>this._maxIndentLeft)break;const b=D.horizontalLine?D.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",k=D.horizontalLine?((r=(i=e.visibleRangeForPosition(new ee(E,D.horizontalLine.endColumn)))===null||i===void 0?void 0:i.left)!==null&&r!==void 0?r:x+this._spaceWidth)-x:this._spaceWidth;f+=`
`}h[m]=f}this._renderResult=h}getGuidesByLine(e,t,n){const i=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?r3.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?r3.EnabledForActive:r3.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let a=0,o=0,s=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){const d=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);a=d.startLineNumber,o=d.endLineNumber,s=d.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let d=e;d<=t;d++){const h=new Array;c.push(h);const E=i?i[d-e]:[],m=new s4(E),g=r?r[d-e]:0;for(let f=1;f<=g;f++){const p=(f-1)*l+1,D=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||E.length===0)&&a<=d&&d<=o&&f===s;h.push(...m.takeWhile(b=>b.visibleColumn!0)||[])}return c}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function ED(u){if(!(u&&u.isTransparent()))return u}Kl((u,e)=>{const t=[{bracketColor:pCe,guideColor:Jtt,guideColorActive:tut},{bracketColor:DCe,guideColor:Ztt,guideColorActive:uut},{bracketColor:xCe,guideColor:Ytt,guideColorActive:nut},{bracketColor:vCe,guideColor:Qtt,guideColorActive:iut},{bracketColor:CCe,guideColor:Xtt,guideColorActive:rut},{bracketColor:bCe,guideColor:eut,guideColorActive:aut}],n=new LCe,i=[{indentColor:mA,indentColorActive:gA},{indentColor:Ltt,indentColorActive:Ptt},{indentColor:ztt,indentColorActive:Rtt},{indentColor:Mtt,indentColorActive:Itt},{indentColor:Ttt,indentColorActive:Ott},{indentColor:Ntt,indentColorActive:jtt}],r=t.map(o=>{var s,l;const c=u.getColor(o.bracketColor),d=u.getColor(o.guideColor),h=u.getColor(o.guideColorActive),E=ED((s=ED(d))!==null&&s!==void 0?s:c==null?void 0:c.transparent(.3)),m=ED((l=ED(h))!==null&&l!==void 0?l:c);if(!(!E||!m))return{guideColor:E,guideColorActive:m}}).filter(tk),a=i.map(o=>{const s=u.getColor(o.indentColor),l=u.getColor(o.indentColorActive),c=ED(s),d=ED(l);if(!(!c||!d))return{indentColor:c,indentColorActive:d}}).filter(tk);if(r.length>0){for(let o=0;o<30;o++){const s=r[o%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(o).replace(/ /g,".")} { --guide-color: ${s.guideColor}; --guide-color-active: ${s.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(a.length>0){for(let o=0;o<30;o++){const s=a[o%a.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${o} { --indent-color: ${s.indentColor}; --indent-color-active: ${s.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});class Mj{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class jut{constructor(){this._currentVisibleRange=new j(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Hut{constructor(e,t,n,i,r,a,o){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=i,this.startScrollTop=r,this.stopScrollTop=a,this.scrollType=o,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Vut{constructor(e,t,n,i,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=i,this.scrollType=r,this.type="selections";let a=t[0].startLineNumber,o=t[0].endLineNumber;for(let s=1,l=t.length;s{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Hu(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new jut,this._horizontalRevealRequest=null,this._stickyScrollEnabled=i.get(114).enabled,this._maxNumberStickyLines=i.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Wd(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(144)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(50),i=t.get(144);return this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(99),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(114).enabled,this._maxNumberStickyLines=t.get(114).maxLineCount,ea(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Foe(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=!1;for(let r=t;r<=n;r++)i=this._visibleLines.getVisibleLine(r).onSelectionChanged()||i;return i}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Hut(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Vut(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(n===null)return null;const i=this._getLineNumberFor(n);if(i===-1||i<1||i>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(i)===1)return new ee(i,1);const r=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();if(ia)return null;let o=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(e,t);const s=this._context.viewModel.getLineMinColumn(i);return on)return-1;const i=new Mj(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(i);return this._updateLineWidthsSlowIfDomDidLayout(i),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,i=j.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;const r=[];let a=0;const o=new Mj(this.domNode.domNode,this._textRangeRestingSpot);let s=0;t&&(s=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee(i.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=i.startLineNumber;d<=i.endLineNumber;d++){if(dc)continue;const h=d===i.startLineNumber?i.startColumn:1,E=d!==i.endLineNumber,m=E?this._context.viewModel.getLineMaxColumn(d):i.endColumn,g=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,h,m,o);if(g){if(t&&dthis._visibleLines.getEndLineNumber())return null;const i=new Mj(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,i);return this._updateLineWidthsSlowIfDomDidLayout(i),r}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Qet(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let i=1,r=!0;for(let a=t;a<=n;a++){const o=this._visibleLines.getVisibleLine(a);if(e&&!o.getWidthIsFast()){r=!1;continue}i=Math.max(i,o.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++){const a=this._visibleLines.getVisibleLine(r);if(a.needsMonospaceFontCheck()){const o=a.getWidth(null);o>t&&(t=o,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=i;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const i=this._computeScrollLeftToReveal(n);i&&(this._isViewportWrapping||this._ensureMaxLineWidth(i.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:i.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),Pa&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let r=n;r<=i;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let p=r[0].startLineNumber,D=r[0].endLineNumber;for(let x=1,b=r.length;xs){if(!c)return-1;f=d}else if(a===5||a===6)if(a===6&&o<=d&&h<=l)f=o;else{const p=Math.max(5*this._lineHeight,s*.2),D=d-p,x=h-s;f=Math.max(x,D)}else if(a===1||a===2)if(a===2&&o<=d&&h<=l)f=o;else{const p=(d+h)/2;f=Math.max(0,p-s/2)}else f=this._computeMinimumScrolling(o,l,d,h,a===3,a===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(143),i=t.left,r=i+t.width-n.verticalScrollbarWidth;let a=1073741824,o=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)a=Math.min(a,Math.round(c.left)),o=Math.max(o,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const d of c.ranges)a=Math.min(a,Math.round(d.left)),o=Math.max(o,Math.round(d.left+d.width))}return e.minimalReveal||(a=Math.max(0,a-DP.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding),e.type==="selections"&&o-a>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,r,a,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,n,i,r,a){e=e|0,t=t|0,n=n|0,i=i|0,r=!!r,a=!!a;const o=t-e;if(i-nt)return Math.max(0,i-o)}else return n;return e}}DP.HORIZONTAL_EXTRA_PX=30;class HW{constructor(e,t,n,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n),this.zIndex=i??0}}class $ut{constructor(e,t){this.className=e,this.zIndex=t}}class Kut{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class zCe extends wp{_render(e,t,n){const i=[];for(let o=e;o<=t;o++){const s=o-e;i[s]=new Kut}if(n.length===0)return i;n.sort((o,s)=>o.className===s.className?o.startLineNumber===s.startLineNumber?o.endLineNumber-s.endLineNumber:o.startLineNumber-s.startLineNumber:o.classNamei)continue;const o=Math.max(a.startLineNumber,n),s=Math.min(r.preference.lane,this._glyphMarginDecorationLaneCount);t.push(new Uut(o,s,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,i)=>n.lineNumber===i.lineNumber?n.lane===i.lane?n.zIndex===i.zIndex?i.type===n.type?n.type===0&&i.type===0?n.className0;){const i=t.peek();if(!i)break;const r=t.takeWhile(o=>o.lineNumber===i.lineNumber&&o.lane===i.lane);if(!r||r.length===0)break;const a=r[0];if(a.type===0){const o=[];for(const s of r){if(s.zIndex!==a.zIndex||s.type!==a.type)break;(o.length===0||o[o.length-1]!==s.className)&&o.push(s.className)}n.push(a.accept(o.join(" ")))}else a.widget.renderInfo={lineNumber:a.lineNumber,lane:a.lane}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(const n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{const i=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+(n.renderInfo.lane-1)*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(i),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}}}class Gut{constructor(e,t,n,i){this.lineNumber=e,this.lane=t,this.zIndex=n,this.className=i,this.type=0}accept(e){return new qut(this.lineNumber,this.lane,e)}}class Uut{constructor(e,t,n,i){this.lineNumber=e,this.lane=t,this.zIndex=n,this.widget=i,this.type=1}}class qut{constructor(e,t,n){this.lineNumber=e,this.lane=t,this.combinedClassName=n}}class Jut extends zCe{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(143);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),n=[];let i=0;for(let r=0,a=t.length;r',s=[];for(let l=t;l<=n;l++){const c=l-t,d=i[c].getDecorations();let h="";for(const E of d)h+='
';r[o]=l}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class C0{constructor(e,t,n,i){this._rgba8Brand=void 0,this.r=C0._clamp(e),this.g=C0._clamp(t),this.b=C0._clamp(n),this.a=C0._clamp(i)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}}C0.Empty=new C0(0,0,0,0);class pA extends ne{static getInstance(){return this._INSTANCE||(this._INSTANCE=new pA),this._INSTANCE}constructor(){super(),this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(qn.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=qn.getColorMap();if(!e){this._colors=[C0.Empty],this._backgroundIsLight=!0;return}this._colors=[C0.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}pA._INSTANCE=null;const Yut=(()=>{const u=[];for(let e=32;e<=126;e++)u.push(e);return u.push(65533),u})(),Qut=(u,e)=>(u-=32,u<0||u>96?e<=2?(u+96)%96:96-1:u);class Bk{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Bk.soften(e,12/15),this.charDataLight=Bk.soften(e,50/60)}static soften(e,t){const n=new Uint8ClampedArray(e.length);for(let i=0,r=e.length;ie.width||n+m>e.height){console.warn("bad render request outside image data");return}const g=c?this.charDataLight:this.charDataNormal,f=Qut(i,l),p=e.width*4,D=o.r,x=o.g,b=o.b,k=r.r-D,A=r.g-x,F=r.b-b,S=Math.max(a,s),w=e.data;let z=f*h*E,N=n*p+t*4;for(let O=0;Oe.width||n+d>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,E=.5*(r/255),m=a.r,g=a.g,f=a.b,p=i.r-m,D=i.g-g,x=i.b-f,b=m+p*E,k=g+D*E,A=f+x*E,F=Math.max(r,o),S=e.data;let w=n*h+t*4;for(let z=0;z{const e=new Uint8ClampedArray(u.length/2);for(let t=0;t>1]=Toe[u[t]]<<4|Toe[u[t+1]]&15;return e},Poe={1:Mm(()=>Noe("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Mm(()=>Noe("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class u2{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return Poe[e]?n=new Bk(Poe[e](),e):n=u2.createFromSampleData(u2.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=96*10,t.style.width=96*10+"px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let i=0;for(const r of Yut)n.fillText(String.fromCharCode(r),i,16/2),i+=10;return n.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const i=u2._downsample(e,t);return new Bk(i,t)}static _downsampleChar(e,t,n,i,r){const a=1*r,o=2*r;let s=i,l=0;for(let c=0;c0){const l=255/s;for(let c=0;cu2.create(this.fontScale,s.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=wk._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=wk._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const n=e.getColor(Net);return n?new C0(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Pet);return t?C0._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class n2{constructor(e,t,n,i,r,a,o,s,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=i,this.sliderTop=r,this.sliderHeight=a,this.topPaddingLineCount=o,this.startLineNumber=s,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,i,r,a,o,s,l,c,d){const h=e.pixelRatio,E=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/E),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){let A=s*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(A+=Math.max(0,r-e.lineHeight-e.paddingBottom));const F=Math.max(1,Math.floor(r*r/A)),S=Math.max(0,e.minimapHeight-F),w=S/(c-r),z=l*w,N=S>0,O=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),y=Math.floor(e.paddingTop/e.lineHeight);return new n2(l,c,N,w,z,F,y,1,Math.min(o,O))}let f;if(a&&n!==o){const A=n-t+1;f=Math.floor(A*E/h)}else{const A=r/g;f=Math.floor(A*E/h)}const p=Math.floor(e.paddingTop/g);let D=Math.floor(e.paddingBottom/g);if(e.scrollBeyondLastLine){const A=r/g;D=Math.max(D,A-1)}let x;if(D>0){const A=r/g;x=(p+o+D-A-1)*E/h}else x=Math.max(0,(p+o)*E/h-f);x=Math.min(e.minimapHeight-f,x);const b=x/(c-r),k=l*b;if(m>=p+o+D){const A=x>0;return new n2(l,c,A,b,k,f,p,1,o)}else{let A;t>1?A=t+p:A=Math.max(1,l/g);let F,S=Math.max(1,Math.floor(A-k*h/E));Sl&&(S=Math.min(S,d.startLineNumber),F=Math.max(F,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?N=(t-S+F+z)*E/h:N=l/e.paddingTop*(F+z)*E/h,new n2(l,c,!0,b,N,f,F,S,w)}}}class jB{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}jB.INVALID=new jB(-1);class Roe{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new ACe(()=>jB.INVALID),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let i=0,r=n.length;i1){for(let p=0,D=i-1;p0&&this.minimapLines[n-1]>=e;)n--;let i=this.modelLineToMinimapLine(t)-1;for(;i+1t)return null}return[n+1,i+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),i=this.modelLineToMinimapLine(t);return e!==t&&i===n&&(i===this.minimapLines.length?n>1&&n--:i++),[n,i]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,i=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(i)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,n]=Lk.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const i of n)switch(i.type){case"deleted":this._actual.onLinesDeleted(i.deleteFromLineNumber,i.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(i.insertFromLineNumber,i.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){const i=[];for(let r=0,a=t-e+1;r{if(n.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(n.button===0&&this._lastRenderData){const l=ji(this._slider.domNode),c=l.top+l.height/2;this._startSliderDragging(n,c,this._lastRenderData.renderedLayout)}return}const r=this._model.options.minimapLineHeight,a=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY;let s=Math.floor(a/r)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;s=Math.min(s,this._model.getLineCount()),this._model.revealLineNumber(s)}),this._sliderPointerMoveMonitor=new m6,this._sliderPointerDownListener=xi(this._slider.domNode,Me.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Zu.addTarget(this._domNode.domNode),this._sliderTouchStartListener=ce(this._domNode.domNode,Yu.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=ce(this._domNode.domNode,Yu.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=xi(this._domNode.domNode,Yu.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;const i=e.pageX;this._slider.toggleClassName("active",!0);const r=(a,o)=>{const s=ji(this._domNode.domNode),l=Math.min(Math.abs(o-i),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(na&&l>Xut){this._model.setScrollTop(n.scrollTop);return}const c=a-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(c))};e.pageY!==t&&r(e.pageY,i),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>r(a.pageY,a.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new BX(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var n;return(n=this._lastRenderData)===null||n===void 0||n.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(voe),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=n2.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(j.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((h,E)=>(h.options.zIndex||0)-(E.options.zIndex||0));const{canvasInnerWidth:i,canvasInnerHeight:r}=this._model.options,a=this._model.options.minimapLineHeight,o=this._model.options.minimapCharWidth,s=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,i,r);const c=new Ioe(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,a),this._renderDecorationsLineHighlights(l,n,c,e,a);const d=new Ioe(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,a,s,o,i),this._renderDecorationsHighlights(l,n,d,e,a,s,o,i)}}_renderSelectionLineHighlights(e,t,n,i,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let a=0,o=0;for(const s of t){const l=i.intersectWithViewport(s);if(!l)continue;const[c,d]=l;for(let m=c;m<=d;m++)n.set(m,!0);const h=i.getYForLineNumber(c,r),E=i.getYForLineNumber(d,r);o>=h||(o>a&&e.fillRect(Y4,a,e.canvas.width,o-a),a=h),o=E}o>a&&e.fillRect(Y4,a,e.canvas.width,o-a)}_renderDecorationsLineHighlights(e,t,n,i,r){const a=new Map;for(let o=t.length-1;o>=0;o--){const s=t[o],l=s.options.minimap;if(!l||l.position!==ls.Inline)continue;const c=i.intersectWithViewport(s.range);if(!c)continue;const[d,h]=c,E=l.getColor(this._theme.value);if(!E||E.isTransparent())continue;let m=a.get(E.toString());m||(m=E.transparent(.5).toString(),a.set(E.toString(),m)),e.fillStyle=m;for(let g=d;g<=h;g++){if(n.has(g))continue;n.set(g,!0);const f=i.getYForLineNumber(d,r);e.fillRect(Y4,f,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,i,r,a,o,s){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const l of t){const c=i.intersectWithViewport(l);if(!c)continue;const[d,h]=c;for(let E=d;E<=h;E++)this.renderDecorationOnLine(e,n,l,this._selectionColor,i,E,r,r,a,o,s)}}_renderDecorationsHighlights(e,t,n,i,r,a,o,s){for(const l of t){const c=l.options.minimap;if(!c)continue;const d=i.intersectWithViewport(l.range);if(!d)continue;const[h,E]=d,m=c.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let g=h;g<=E;g++)switch(c.position){case ls.Inline:this.renderDecorationOnLine(e,n,l.range,m,i,g,r,r,a,o,s);continue;case ls.Gutter:{const f=i.getYForLineNumber(g,r),p=2;this.renderDecoration(e,m,p,f,ent,r);continue}}}}renderDecorationOnLine(e,t,n,i,r,a,o,s,l,c,d){const h=r.getYForLineNumber(a,s);if(h+o<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:E,endLineNumber:m}=n,g=E===a?n.startColumn:1,f=m===a?n.endColumn:this._model.getLineMaxColumn(a),p=this.getXOffsetForPosition(t,a,g,l,c,d),D=this.getXOffsetForPosition(t,a,f,l,c,d);this.renderDecoration(e,i,p,h,D-p,o)}getXOffsetForPosition(e,t,n,i,r,a){if(n===1)return Y4;if((n-1)*r>=a)return a;let s=e.get(t);if(!s){const l=this._model.getLineContent(t);s=[Y4];let c=Y4;for(let d=1;d=a){s[d]=a;break}s[d]=m,c=m}e.set(t,s)}return n-1k?Math.floor((i-k)/2):0,F=h.a/255,S=new C0(Math.round((h.r-d.r)*F+d.r),Math.round((h.g-d.g)*F+d.g),Math.round((h.b-d.b)*F+d.b),255);let w=e.topPaddingLineCount*i;const z=[];for(let L=0,T=n-t+1;L=0&&ND)return;const O=f.charCodeAt(k);if(O===9){const y=h-(k+A)%h;A+=y-1,b+=y*a}else if(O===32)b+=a;else{const y=Tm(O)?2:1;for(let _=0;_D)return}}}}}class Ioe{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let i=0,r=this._endLineNumber-this._startLineNumber+1;ithis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class unt extends vs{constructor(e){super(e);const n=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,this._domNode=ku(document.createElement("div")),_1.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}addWidget(e){const t=ku(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const n=this._widgets[e.getId()];return n.preference===t?(this._updateMaxMinWidth(),!1):(n.preference=t,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t].domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let n=0;const i=Object.keys(this._widgets);for(let r=0,a=i.length;r=3){const r=Math.floor(i/3),a=Math.floor(i/3),o=i-r-a,s=e,l=s+r,c=s+r+o;return[[0,s,l,s,c,s,l,s],[0,r,o,r+o,a,r+o+a,o+a,r+o+a]]}else if(n===2){const r=Math.floor(i/2),a=i-r,o=e,s=o+r;return[[0,o,o,o,s,o,o,o],[0,r,r,r,a,r+a,r+a,r+a]]}else{const r=e,a=i;return[[0,r,r,r,r,r,r,r],[0,a,a,a,a,a,a,a]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&ae.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class int extends vs{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=ku(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=qn.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new nnt(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;tm.lineNumber===g.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const n=this._settings.canvasWidth,i=this._settings.canvasHeight,r=this._settings.lineHeight,a=this._context.viewLayout,o=this._context.viewLayout.getScrollHeight(),s=i/o,l=6*this._settings.pixelRatio|0,c=l/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=ae.Format.CSS.formatHexA(e),d.fillRect(0,0,n,i)):(d.clearRect(0,0,n,i),d.fillStyle=ae.Format.CSS.formatHexA(e),d.fillRect(0,0,n,i)):d.clearRect(0,0,n,i);const h=this._settings.x,E=this._settings.w;for(const m of t){const g=m.color,f=m.data;d.fillStyle=g;let p=0,D=0,x=0;for(let b=0,k=f.length/3;bi&&(O=i-c),w=O-c,z=O+c}w>x+1||A!==p?(b!==0&&d.fillRect(h[p],D,E[p],x-D),p=A,D=w,x=z):z>x&&(x=z)}d.fillRect(h[p],D,E[p],x-D)}if(!this._settings.hideCursor&&this._settings.cursorColor){const m=2*this._settings.pixelRatio|0,g=m/2|0,f=this._settings.x[7],p=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let D=-100,x=-100;for(let b=0,k=this._cursorPositions.length;bi&&(F=i-g);const S=F-g,w=S+m;S>x+1?(b!==0&&d.fillRect(f,D,p,x-D),D=S,x=w):w>x&&(x=w)}d.fillRect(f,D,p,x-D)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,i),d.stroke(),d.moveTo(0,0),d.lineTo(n,0),d.stroke())}}class Ooe{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class MCe{constructor(e,t,n,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(g=n-f);const p=c.color;let D=this._color2Id[p];D||(D=++this._lastAssignedId,this._color2Id[p]=D,this._id2Color[D]=p);const x=new Ooe(g-f,g+f,D);c.setColorZone(x),o.push(x)}return this._colorZonesInvalid=!1,o.sort(Ooe.compare),o}}class ant extends dA{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=ku(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new rnt(i=>this._context.viewLayout.getVerticalOffsetForLineNumber(i)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(66)),this._zoneManager.setPixelRatio(n.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(66)&&(this._zoneManager.setLineHeight(t.get(66)),this._render()),e.hasChanged(141)&&(this._zoneManager.setPixelRatio(t.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,i,e),!0}_renderOneLane(e,t,n,i){let r=0,a=0,o=0;for(const s of t){const l=s.colorId,c=s.from,d=s.to;l!==r?(e.fillRect(0,a,i,o-a),r=l,e.fillStyle=n[r],a=c,o=d):o>=c?o=Math.max(o,d):(e.fillRect(0,a,i,o-a),a=c,o=d)}e.fillRect(0,a,i,o-a)}}class ont extends vs{constructor(e){super(e),this.domNode=ku(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const o=ku(document.createElement("div"));o.setClassName("view-ruler"),o.setWidth(r),this.domNode.appendChild(o),this._renderedRulers.push(o),a--}return}let n=e-t;for(;n>0;){const i=this._renderedRulers.pop();this.domNode.removeChild(i),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(143);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(102);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class lnt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class cnt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function dnt(u){return new lnt(u)}function hnt(u){return new cnt(u.lineNumber,u.ranges.map(dnt))}class ai extends wp{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(66),this._roundedSelection=t.get(100),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){const i=this._typicalHalfwidthCharacterWidth/4;let r=null,a=null;if(n&&n.length>0&&t.length>0){const o=t[0].lineNumber;if(o===e.startLineNumber)for(let l=0;!r&&l=0;l--)n[l].lineNumber===s&&(a=n[l].ranges[0]);r&&!r.startStyle&&(r=null),a&&!a.startStyle&&(a=null)}for(let o=0,s=t.length;o0){const m=t[o-1].ranges[0].left,g=t[o-1].ranges[0].left+t[o-1].ranges[0].width;o9(c-m)m&&(h.top=1),o9(d-g)'}_actualRenderOneSelection(e,t,n,i){if(i.length===0)return;const r=!!i[0].ranges[0].startStyle,a=this._lineHeight.toString(),o=(this._lineHeight-1).toString(),s=i[0].lineNumber,l=i[i.length-1].lineNumber;for(let c=0,d=i.length;c1,l)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([a,o])=>a+o)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}ai.SELECTION_CLASS_NAME="selected-text";ai.SELECTION_TOP_LEFT="top-left-radius";ai.SELECTION_BOTTOM_LEFT="bottom-left-radius";ai.SELECTION_TOP_RIGHT="top-right-radius";ai.SELECTION_BOTTOM_RIGHT="bottom-right-radius";ai.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";ai.ROUNDED_PIECE_WIDTH=10;Kl((u,e)=>{const t=u.getColor(OXe);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function o9(u){return u<0?-u:u}class joe{constructor(e,t,n,i,r,a,o){this.top=e,this.left=t,this.paddingLeft=n,this.width=i,this.height=r,this.textContent=a,this.textContentClassName=o}}class Hoe{constructor(e){this._context=e;const t=this._context.configuration.options,n=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=ku(document.createElement("div")),this._domNode.setClassName(`cursor ${lx}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),ea(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ee(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),ea(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[i,r]=Fqe(n,t-1);return[new ee(e,i+1),n.substring(i,r)]}_prepareRender(e){let t="",n="";const[i,r]=this._getGraphemeAwarePosition();if(this._cursorStyle===Sr.Line||this._cursorStyle===Sr.LineThin){const h=e.visibleRangeForPosition(i);if(!h||h.outsideRenderedLine)return null;let E;this._cursorStyle===Sr.Line?(E=xae(this._lineCursorWidth>0?this._lineCursorWidth:2),E>2&&(t=r,n=this._getTokenClassName(i))):E=xae(1);let m=h.left,g=0;E>=2&&m>=1&&(g=1,m-=g);const f=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new joe(f,m,g,E,this._lineHeight,t,n)}const a=e.linesVisibleRangesForRange(new j(i.lineNumber,i.column,i.lineNumber,i.column+r.length),!1);if(!a||a.length===0)return null;const o=a[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const s=o.ranges[0],l=r===" "?this._typicalHalfwidthCharacterWidth:s.width<1?this._typicalHalfwidthCharacterWidth:s.width;this._cursorStyle===Sr.Block&&(t=r,n=this._getTokenClassName(i));let c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return(this._cursorStyle===Sr.Underline||this._cursorStyle===Sr.UnderlineThin)&&(c+=this._lineHeight-2,d=2),new joe(c,s.left,0,l,d,t,n)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${lx} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class zk extends vs{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Hoe(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=ku(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Vl,this._cursorFlatBlinkInterval=new rA,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,i=this._secondaryCursors.length;nt.length){const r=this._secondaryCursors.length-t.length;for(let a=0;a{for(let i=0,r=e.ranges.length;i{this._isVisible?this._hide():this._show()},zk.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},zk.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Sr.Line:e+=" cursor-line-style";break;case Sr.Block:e+=" cursor-block-style";break;case Sr.Underline:e+=" cursor-underline-style";break;case Sr.LineThin:e+=" cursor-line-thin-style";break;case Sr.BlockOutline:e+=" cursor-block-outline-style";break;case Sr.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=u.getColor(gCe);if(t){let n=u.getColor(Btt);n||(n=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${n}; }`),$c(u.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});const Tj=()=>{throw new Error("Invalid change accessor")};class Ent extends vs{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(143);this._lineHeight=t.get(66),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=ku(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=ku(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let n=!1;return this._context.viewModel.changeWhitespace(i=>{const r=Object.keys(this._zones);for(let a=0,o=r.length;a{const i={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};mnt(e,i),i.addZone=Tj,i.removeZone=Tj,i.layoutZone=Tj}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:ku(t.domNode),marginDomNode:t.marginDomNode?ku(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.parentNode.removeChild(n.domNode.domNode),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.parentNode.removeChild(n.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],i=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=i.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx),this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){zt(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){zt(n)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let i=!1;for(const a of t)this._zones[a.id].isInHiddenArea||(n[a.id]=a,i=!0);const r=Object.keys(this._zones);for(let a=0,o=r.length;ao)continue;const E=h.startLineNumber===o?h.startColumn:l.minColumn,m=h.endLineNumber===o?h.endColumn:l.maxColumn;E=z.endOffset&&(w++,z=n&&n[w]),y!==9&&y!==32||h&&!A&&O<=S)continue;if(d&&O>=F&&O<=S&&y===32){const L=O-1>=0?o.charCodeAt(O-1):0,T=O+1=0?o.charCodeAt(O-1):0;if(y===32&&L!==32&&L!==9)continue}if(n&&(!z||z.startOffset>O||z.endOffset<=O))continue;const _=e.visibleRangeForPosition(new ee(t,O+1));_&&(a?(N=Math.max(N,_.left),y===9?k+=this._renderArrow(E,f,_.left):k+=``):y===9?k+=`
${b?String.fromCharCode(65515):String.fromCharCode(8594)}
`:k+=`
${String.fromCharCode(x)}
`)}return a?(N=Math.round(N+f),``+k+""):k}_renderArrow(e,t,n){const i=t/7,r=t,a=e/2,o=n,s={x:0,y:i/2},l={x:100/125*r,y:s.y},c={x:l.x-.2*l.x,y:l.y+.2*l.x},d={x:c.x+.1*l.x,y:c.y+.1*l.x},h={x:d.x+.35*l.x,y:d.y-.35*l.x},E={x:h.x,y:-h.y},m={x:d.x,y:-d.y},g={x:c.x,y:-c.y},f={x:l.x,y:-l.y},p={x:s.x,y:-s.y};return``}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Voe{constructor(e){const t=e.options,n=t.get(50),i=t.get(38);i==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):i==="svg"?(this.renderWhitespace=t.get(98),this.renderWithSVG=!0):(this.renderWhitespace=t.get(98),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(66),this.stopRenderingLineAfter=t.get(116)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}var vnt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cnt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let VW=class extends dA{constructor(e,t,n,i,r,a,o){super(),this._instantiationService=o,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new Ye(1,1,1,1)],this._renderAnimationFrame=null;const s=new Sut(t,i,r,e);this._context=new fnt(t,n,i),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(OW,this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=ku(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=ku(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=ku(document.createElement("div")),_1.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new Rut(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new DP(this._context,this._linesContent),this._viewZones=new Ent(this._context),this._viewParts.push(this._viewZones);const l=new int(this._context);this._viewParts.push(l);const c=new snt(this._context);this._viewParts.push(c);const d=new wut(this._context);this._viewParts.push(d),d.addDynamicOverlay(new Tut(this._context)),d.addDynamicOverlay(new ai(this._context)),d.addDynamicOverlay(new Out(this._context)),d.addDynamicOverlay(new Put(this._context)),d.addDynamicOverlay(new xnt(this._context));const h=new Lut(this._context);this._viewParts.push(h),h.addDynamicOverlay(new Nut(this._context)),h.addDynamicOverlay(new Zut(this._context)),h.addDynamicOverlay(new Jut(this._context)),h.addDynamicOverlay(new fA(this._context)),this._glyphMarginWidgets=new Wut(this._context),this._viewParts.push(this._glyphMarginWidgets);const E=new L3(this._context);E.getDomNode().appendChild(this._viewZones.marginDomNode),E.getDomNode().appendChild(h.getDomNode()),E.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(E),this._contentWidgets=new zut(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new zk(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new unt(this._context),this._viewParts.push(this._overlayWidgets);const m=new ont(this._context);this._viewParts.push(m);const g=new Dnt(this._context);this._viewParts.push(g);const f=new tnt(this._context);if(this._viewParts.push(f),l){const p=this._scrollbar.getOverviewRulerLayoutInfo();p.parent.insertBefore(l.getDomNode(),p.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(m.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(E.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(g.domNode),this.domNode.appendChild(this._overflowGuardContainer),a?a.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Att(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),zE.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const e=this._context.viewModel.model;let t=[];t=t.concat(e.getAllMarginDecorations().map(r=>{var a,o;const s=(o=(a=r.options.glyphMargin)===null||a===void 0?void 0:a.position)!==null&&o!==void 0?o:rx.Left;return{range:r.range,lane:s}})),t=t.concat(this._glyphMarginWidgets.getWidgets().map(r=>({range:e.validateRange(r.preference.range),lane:r.preference.lane}))),t.sort((r,a)=>j.compareRangesUsingStarts(r.range,a.range));let n=null,i=null;for(const r of t)if(r.lane===rx.Left&&(!n||j.compareRangesUsingEnds(n,r.range)<0)&&(n=r.range),r.lane===rx.Right&&(!i||j.compareRangesUsingEnds(i,r.range)<0)&&(i=r.range),n&&i){if(n.endLineNumber{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new ntt(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ee(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const t=this._context.configuration.options.get(143);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+IW(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=CB(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){bnt(()=>this._actualRender())}_getViewPartsToRender(){const e=[];let t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_actualRender(){if(!XQ(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const n=new pnt(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const i=new Zet(this._context.viewLayout,n,this._viewLines);for(const r of e)r.prepareRender(i);for(const r of e)r.render(i),r.onDidRender()}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),i=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const r=this._viewLines.visibleRangeForPosition(new ee(i.lineNumber,i.column));return r?r.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?fP.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new ant(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,n,i,r,a,o,s,l;this._contentWidgets.setWidgetPosition(e.widget,(n=(t=e.position)===null||t===void 0?void 0:t.position)!==null&&n!==void 0?n:null,(r=(i=e.position)===null||i===void 0?void 0:i.secondaryPosition)!==null&&r!==void 0?r:null,(o=(a=e.position)===null||a===void 0?void 0:a.preference)!==null&&o!==void 0?o:null,(l=(s=e.position)===null||s===void 0?void 0:s.positionAffinity)!==null&&l!==void 0?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};VW=vnt([Cnt(6,mt)],VW);function bnt(u){try{return u()}catch(e){zt(e)}}class TCe{constructor(e,t,n,i,r,a){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=r,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}function Vm(u){let e=0,t=0,n=0,i=0;for(let r=0,a=u.length;r=Vs&&(t=t-u%Vs),t}function _nt(u,e){return u.reduce((t,n)=>Zn(t,e(n)),uo)}function NCe(u,e){return u===e}function Tk(u,e){const t=u,n=e;if(n-t<=0)return uo;const r=Math.floor(t/Vs),a=Math.floor(n/Vs),o=n-a*Vs;if(r===a){const s=t-r*Vs;return gi(0,o-s)}else return gi(a-r,o)}function hx(u,e){return u=e}function v5(u){return gi(u.lineNumber-1,u.column-1)}function a3(u,e){const t=u,n=Math.floor(t/Vs),i=t-n*Vs,r=e,a=Math.floor(r/Vs),o=r-a*Vs;return new j(n+1,i+1,a+1,o+1)}function Snt(u){const e=F1(u);return gi(e.length-1,e[e.length-1].length)}class $h{static fromModelContentChanges(e){return e.map(n=>{const i=j.lift(n.range);return new $h(v5(i.getStartPosition()),v5(i.getEndPosition()),Snt(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${S0(this.startOffset)}...${S0(this.endOffset)}) -> ${S0(this.newLength)}`}}class Bnt{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>wX.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:Tk(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?gi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):gi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=S0(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?gi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):gi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(i===0){const a=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;for(;;){const r=this.lineTokens,a=r.getCount();let o=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}const i=ynt(e,t,this.lineIdx,this.lineCharOffset);return new bE(i,0,-1,Ii.getEmpty(),new Af(i))}}class Nnt{constructor(e,t){this.text=e,this._offset=uo,this.idx=0;const n=t.getRegExpStr(),i=n?new RegExp(n+`| `,"gi"):null,r=[];let a,o=0,s=0,l=0,c=0;const d=[];for(let m=0;m<60;m++)d.push(new bE(gi(0,m),0,-1,Ii.getEmpty(),new Af(gi(0,m))));const h=[];for(let m=0;m<60;m++)h.push(new bE(gi(1,m),0,-1,Ii.getEmpty(),new Af(gi(1,m))));if(i)for(i.lastIndex=0;(a=i.exec(e))!==null;){const m=a.index,g=a[0];if(g===` -`)o++,s=m+1;else{if(l!==m){let f;if(c===o){const p=m-l;if(pPnt(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function Pnt(u){let e=qs(u);return/^[\w ]+/.test(u)&&(e=`\\b${e}`),/[\w ]+$/.test(u)&&(e=`${e}\\b`),e}class ICe{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=MX.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Rnt(u){if(u.length===0)return null;if(u.length===1)return u[0];let e=0;function t(){if(e>=u.length)return null;const a=e,o=u[a].listHeight;for(e++;e=2?OCe(a===0&&e===u.length?u:u.slice(a,e),!1):u[a]}let n=t(),i=t();if(!i)return n;for(let a=t();a;a=t())Woe(n,i)<=Woe(i,a)?(n=Nj(n,i),i=a):i=Nj(i,a);return Nj(n,i)}function OCe(u,e=!1){if(u.length===0)return null;if(u.length===1)return u[0];let t=u.length;for(;t>3;){const n=t>>1;for(let i=0;i=3?u[2]:null,e)}function Woe(u,e){return Math.abs(u.listHeight-e.listHeight)}function Nj(u,e){return u.listHeight===e.listHeight?S1.create23(u,e,null,!1):u.listHeight>e.listHeight?Int(u,e):Ont(e,u)}function Int(u,e){u=u.toMutable();let t=u;const n=[];let i;for(;;){if(e.listHeight===t.listHeight){i=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){const a=n[r];i?a.childrenLength>=3?i=S1.create23(a.unappendChild(),i,null,!1):(a.appendChildOfSameHeight(i),i=void 0):a.handleChildrenChanged()}return i?S1.create23(u,i,null,!1):u}function Ont(u,e){u=u.toMutable();let t=u;const n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let i=e;for(let r=n.length-1;r>=0;r--){const a=n[r];i?a.childrenLength>=3?i=S1.create23(i,a.unprependChild(),null,!1):(a.prependChildOfSameHeight(i),i=void 0):a.handleChildrenChanged()}return i?S1.create23(i,u,null,!1):u}class jnt{constructor(e){this.lastOffset=uo,this.nextNodes=[e],this.offsets=[uo],this.idxs=[]}readLongestNodeAt(e,t){if(hx(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=EC(this.nextNodes);if(!n)return;const i=EC(this.offsets);if(hx(e,i))return;if(hx(i,e))if(Zn(i,n.length)<=e)this.nextNodeAfterCurrent();else{const r=Pj(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(i),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const r=Pj(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(i),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){const e=EC(this.offsets),t=EC(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=EC(this.nextNodes),i=Pj(n,this.idxs[this.idxs.length-1]);if(i!==-1){this.nextNodes.push(n.getChild(i)),this.offsets.push(Zn(e,t.length)),this.idxs[this.idxs.length-1]=i;break}else this.idxs.pop()}}}function Pj(u,e=-1){for(;;){if(e++,e>=u.childrenLength)return-1;if(u.getChild(e))return e}}function EC(u){return u.length>0?u[u.length-1]:void 0}function $W(u,e,t,n){return new Hnt(u,e,t,n).parseDocument()}let Hnt=class{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new jnt(n):void 0,this.positionMapper=new Bnt(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ii.getEmpty(),0);return e||(e=S1.getEmpty()),e}parseList(e,t){const n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){const a=this.tokenizer.peek();if(!a||a.kind===2&&a.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?Rnt(n):OCe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!VB(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>t!==null&&!hx(i.length,t)?!1:i.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new Mnt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Af(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),a=this.tokenizer.peek();return a&&a.kind===2&&(a.bracketId===n.bracketId||a.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),Nk.create(n.astNode,r,a.astNode)):Nk.create(n.astNode,r,null)}default:throw new Error("unexpected")}}};function WB(u,e){if(u.length===0)return e;if(e.length===0)return u;const t=new s4(Goe(u)),n=Goe(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let i=t.dequeue();function r(l){if(l===void 0){const d=t.takeWhile(h=>!0)||[];return i&&d.unshift(i),d}const c=[];for(;i&&!VB(l);){const[d,h]=i.splitAt(l);c.push(d),l=Tk(d.lengthAfter,l),i=h??t.dequeue()}return VB(l)||c.push(new ME(!1,l,l)),c}const a=[];function o(l,c,d){if(a.length>0&&NCe(a[a.length-1].endOffset,l)){const h=a[a.length-1];a[a.length-1]=new $h(h.startOffset,c,Zn(h.newLength,d))}else a.push({startOffset:l,endOffset:c,newLength:d})}let s=uo;for(const l of n){const c=r(l.lengthBefore);if(l.modified){const d=_nt(c,E=>E.lengthBefore),h=Zn(s,d);o(s,h,l.lengthAfter),s=h}else for(const d of c){const h=s;s=Zn(s,d.lengthBefore),d.modified&&o(h,s,d.lengthAfter)}}return a}class ME{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=Tk(e,this.lengthAfter);return NCe(t,uo)?[this,void 0]:this.modified?[new ME(this.modified,this.lengthBefore,e),new ME(this.modified,uo,t)]:[new ME(this.modified,e,e),new ME(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${_0(this.lengthBefore)} -> ${_0(this.lengthAfter)}`}}function Goe(u){const e=[];let t=uo;for(const n of u){const i=Tk(t,n.startOffset);VB(i)||e.push(new ME(!1,i,i));const r=Tk(n.startOffset,n.endOffset);e.push(new ME(!0,r,n.newLength)),t=n.endOffset}return e}class Vnt extends ne{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new Q,this.denseKeyProvider=new PCe,this.brackets=new ICe(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),i=new Nnt(this.textModel.getValue(),n);this.initialAstWithoutTokens=$W(i,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(n=>new $h(gi(n.fromLineNumber-1,0),gi(n.toLineNumber,0),gi(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=$h.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=WB(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=WB(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=t,r=new RCe(this.textModel,this.brackets);return $W(r,e,i,n)}getBracketsInRange(e,t){this.flushQueue();const n=gi(e.startLineNumber-1,e.startColumn-1),i=gi(e.endLineNumber-1,e.endColumn-1);return new h1(r=>{const a=this.initialAstWithoutTokens||this.astWithTokens;KW(a,uo,a.length,n,i,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const n=v5(e.getStartPosition()),i=v5(e.getEndPosition());return new h1(r=>{const a=this.initialAstWithoutTokens||this.astWithTokens,o=new $nt(r,t,this.textModel);WW(a,uo,a.length,n,i,o,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return HCe(t,uo,t.length,v5(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return jCe(t,uo,t.length,v5(e))}}function jCe(u,e,t,n){if(u.kind===4||u.kind===2){const i=[];for(const r of u.children)t=Zn(e,r.length),i.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=i.length-1;r>=0;r--){const{nodeOffsetStart:a,nodeOffsetEnd:o}=i[r];if(hx(a,n)){const s=jCe(u.children[r],a,o,n);if(s)return s}}return null}else{if(u.kind===3)return null;if(u.kind===1){const i=a3(e,t);return{bracketInfo:u.bracketInfo,range:i}}}return null}function HCe(u,e,t,n){if(u.kind===4||u.kind===2){for(const i of u.children){if(t=Zn(e,i.length),hx(n,t)){const r=HCe(i,e,t,n);if(r)return r}e=t}return null}else{if(u.kind===3)return null;if(u.kind===1){const i=a3(e,t);return{bracketInfo:u.bracketInfo,range:i}}}return null}function KW(u,e,t,n,i,r,a,o,s,l,c=!1){if(a>200)return!0;e:for(;;)switch(u.kind){case 4:{const d=u.childrenLength;for(let h=0;h200)return!0;let l=!0;if(u.kind===2){let c=0;if(o){let E=o.get(u.openingBracket.text);E===void 0&&(E=0),c=E,E++,o.set(u.openingBracket.text,E)}const d=Zn(e,u.openingBracket.length);let h=-1;if(r.includeMinIndentation&&(h=u.computeMinIndentation(e,r.textModel)),l=r.push(new Fnt(a3(e,t),a3(e,d),u.closingBracket?a3(Zn(d,((s=u.child)===null||s===void 0?void 0:s.length)||uo),t):void 0,a,c,u,h)),e=d,l&&u.child){const E=u.child;if(t=Zn(e,E.length),Ex(e,i)&&Cb(t,n)&&(l=WW(E,e,t,n,i,r,a+1,o),!l))return!1}o==null||o.set(u.openingBracket.text,c)}else{let c=e;for(const d of u.children){const h=c;if(c=Zn(c,d.length),Ex(h,i)&&Ex(n,c)&&(l=WW(d,h,c,n,i,r,a,o),!l))return!1}}return l}class Knt extends ne{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Ir),this.onDidChangeEmitter=new Q,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var i;(!n.languageId||!((i=this.bracketPairsTree.value)===null||i===void 0)&&i.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new pe;this.bracketPairsTree.value=Wnt(e.add(new Vnt(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||h1.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||h1.empty}getBracketsInRange(e,t=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(e,t))||h1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const a=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!a)return null;const o=this.getBracketPairsInRange(j.fromPositions(t,t)).findLast(s=>a.closes(s.openingBracketInfo));return o?o.openingBracketRange:null}else{const a=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!o)return null;const s=o.textIsBracket[a];return s?s9(this._findMatchingBracketUp(s,i,Rj(n))):null}}matchBracket(e,t){if(this.canBuildAST){const n=this.getBracketPairsInRange(j.fromPositions(e,e)).filter(i=>i.closingBracketRange!==void 0&&(i.openingBracketRange.containsPosition(e)||i.closingBracketRange.containsPosition(e))).findLastMaxBy(y0(i=>i.openingBracketRange.containsPosition(e)?i.openingBracketRange:i.closingBracketRange,j.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{const n=Rj(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),a=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let l=i-1;l>=0;l--){const c=t.getEndOffset(l);if(c<=o)break;if(_d(t.getStandardTokenType(l))||t.getLanguageId(l)!==a){o=c;break}}let s=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let l=i+1;l=s)break;if(_d(t.getStandardTokenType(l))||t.getLanguageId(l)!==a){s=c;break}}return{searchStartOffset:o,searchEndOffset:s}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),a=i.findTokenIndexAtOffset(e.column-1);if(a<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(a)).brackets;if(o&&!_d(i.getStandardTokenType(a))){let{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,a),c=null;for(;;){const d=ul.findNextBracketInRange(o.forwardRegex,n,r,s,l);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){const h=r.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),E=this._matchFoundBracket(d,o.textIsBracket[h],o.textIsOpenBracket[h],t);if(E){if(E instanceof vh)return null;c=E}}s=d.endColumn-1}if(c)return c}if(a>0&&i.getStartOffset(a)===e.column-1){const s=a-1,l=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(l&&!_d(i.getStandardTokenType(s))){const{searchStartOffset:c,searchEndOffset:d}=this._establishBracketSearchOffsets(e,i,l,s),h=ul.findPrevBracketInRange(l.reversedRegex,n,r,c,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const E=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),m=this._matchFoundBracket(h,l.textIsBracket[E],l.textIsOpenBracket[E],t);if(m)return m instanceof vh?null:m}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof vh?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let a=-1,o=0;const s=(l,c,d,h)=>{for(;;){if(n&&++o%100===0&&!n())return vh.INSTANCE;const E=ul.findPrevBracketInRange(r,l,c,d,h);if(!E)break;const m=c.substring(E.startColumn-1,E.endColumn-1).toLowerCase();if(e.isOpen(m)?a++:e.isClose(m)&&a--,a===0)return E;h=E.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),h=this.textModel.getLineContent(l);let E=d-1,m=h.length,g=h.length;l===t.lineNumber&&(E=c.findTokenIndexAtOffset(t.column-1),m=t.column-1,g=t.column-1);let f=!0;for(;E>=0;E--){const p=c.getLanguageId(E)===i&&!_d(c.getStandardTokenType(E));if(p)f?m=c.getStartOffset(E):(m=c.getStartOffset(E),g=c.getEndOffset(E));else if(f&&m!==g){const D=s(l,h,m,g);if(D)return D}f=p}if(f&&m!==g){const p=s(l,h,m,g);if(p)return p}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let a=1,o=0;const s=(c,d,h,E)=>{for(;;){if(n&&++o%100===0&&!n())return vh.INSTANCE;const m=ul.findNextBracketInRange(r,c,d,h,E);if(!m)break;const g=d.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(e.isOpen(g)?a++:e.isClose(g)&&a--,a===0)return m;h=m.endColumn-1}return null},l=this.textModel.getLineCount();for(let c=t.lineNumber;c<=l;c++){const d=this.textModel.tokenization.getLineTokens(c),h=d.getCount(),E=this.textModel.getLineContent(c);let m=0,g=0,f=0;c===t.lineNumber&&(m=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,f=t.column-1);let p=!0;for(;m=1;o--){const s=this.textModel.tokenization.getLineTokens(o),l=s.getCount(),c=this.textModel.getLineContent(o);let d=l-1,h=c.length,E=c.length;if(o===n.lineNumber){d=s.findTokenIndexAtOffset(n.column-1),h=n.column-1,E=n.column-1;const g=s.getLanguageId(d);i!==g&&(i=g,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,a=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let m=!0;for(;d>=0;d--){const g=s.getLanguageId(d);if(i!==g){if(r&&a&&m&&h!==E){const p=ul.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(p)return this._toFoundBracket(a,p);m=!1}i=g,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,a=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const f=!!r&&!_d(s.getStandardTokenType(d));if(f)m?h=s.getStartOffset(d):(h=s.getStartOffset(d),E=s.getEndOffset(d));else if(a&&r&&m&&h!==E){const p=ul.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(p)return this._toFoundBracket(a,p)}m=f}if(a&&r&&m&&h!==E){const g=ul.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(g)return this._toFoundBracket(a,g)}}return null}findNextBracket(e){var t;const n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(n))||null;const i=this.textModel.getLineCount();let r=null,a=null,o=null;for(let s=n.lineNumber;s<=i;s++){const l=this.textModel.tokenization.getLineTokens(s),c=l.getCount(),d=this.textModel.getLineContent(s);let h=0,E=0,m=0;if(s===n.lineNumber){h=l.findTokenIndexAtOffset(n.column-1),E=n.column-1,m=n.column-1;const f=l.getLanguageId(h);r!==f&&(r=f,a=this.languageConfigurationService.getLanguageConfiguration(r).brackets,o=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let g=!0;for(;hg.closingBracketRange!==void 0&&g.range.strictContainsRange(E));return m?[m.openingBracketRange,m.closingBracketRange]:null}const i=Rj(t),r=this.textModel.getLineCount(),a=new Map;let o=[];const s=(E,m)=>{if(!a.has(E)){const g=[];for(let f=0,p=m?m.brackets.length:0;f{for(;;){if(i&&++l%100===0&&!i())return vh.INSTANCE;const D=ul.findNextBracketInRange(E.forwardRegex,m,g,f,p);if(!D)break;const x=g.substring(D.startColumn-1,D.endColumn-1).toLowerCase(),b=E.textIsBracket[x];if(b&&(b.isOpen(x)?o[b.index]++:b.isClose(x)&&o[b.index]--,o[b.index]===-1))return this._matchFoundBracket(D,b,!1,i);f=D.endColumn-1}return null};let d=null,h=null;for(let E=n.lineNumber;E<=r;E++){const m=this.textModel.tokenization.getLineTokens(E),g=m.getCount(),f=this.textModel.getLineContent(E);let p=0,D=0,x=0;if(E===n.lineNumber){p=m.findTokenIndexAtOffset(n.column-1),D=n.column-1,x=n.column-1;const k=m.getLanguageId(p);d!==k&&(d=k,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,s(d,h))}let b=!0;for(;pe==null?void 0:e.dispose()}}function Rj(u){if(typeof u>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=u}}class vh{constructor(){this._searchCanceledBrand=void 0}}vh.INSTANCE=new vh;function s9(u){return u instanceof vh?null:u}class Gnt extends ne{constructor(e){super(),this.textModel=e,this.colorProvider=new VCe,this.onDidChangeEmitter=new Q,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){return i?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(a=>({id:`bracket${a.range.toString()}-${a.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(a,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:a.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new j(1,1,this.textModel.getLineCount(),1),e,t):[]}}class VCe{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Kl((u,e)=>{const t=[pCe,DCe,xCe,vCe,CCe,bCe],n=new VCe;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${u.getColor(qtt)}; }`);const i=t.map(r=>u.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){const a=i[r%i.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${a}; }`)}});function l9(u){return u.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Ur{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${l9(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${l9(this.oldText)}")`:`(replace@${this.oldPosition} "${l9(this.oldText)}" with "${l9(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;cc(e,i,n),n+=4;for(let r=0;ru.length)return!1;if(t){if(!VQ(u,e))return!1;if(e.length===u.length)return!0;let r=e.length;return e.charAt(e.length-1)===n&&r--,u.charAt(r)===n}return e.charAt(e.length-1)!==n&&(e+=n),u.indexOf(e)===0}function KCe(u){return u>=65&&u<=90||u>=97&&u<=122}function Jnt(u,e=na){return e?KCe(u.charCodeAt(0))&&u.charCodeAt(1)===58:!1}function Sd(u){return mB(u,!0)}class Znt{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:ok(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===Ot.file)return GW(Sd(e),Sd(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(Joe(e.authority,t.authority))return GW(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return dt.joinPath(e,...t)}basenameOrAuthority(e){return I0(e)||e.authority}basename(e){return Oi.basename(e.path)}extname(e){return Oi.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Ot.file?t=dt.file(Ave(Sd(e))).path:(t=Oi.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===Ot.file?t=dt.file(yve(Sd(e))).path:t=Oi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Joe(e.authority,t.authority))return;if(e.scheme===Ot.file){const r=tqe(Sd(e),Sd(t));return na?$Ce(r):r}let n=e.path||"/";const i=t.path||"/";if(this._ignorePathCasing(e)){let r=0;for(const a=Math.min(n.length,i.length);rUoe(n).length&&n[n.length-1]===t}else{const n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=jc){return Zoe(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=jc){let n=!1;if(e.scheme===Ot.file){const i=Sd(e);n=i!==void 0&&i.length===Uoe(i).length&&i[i.length-1]===t}else{t="/";const i=e.path;n=i.length===1&&i.charCodeAt(i.length-1)===47}return!n&&!Zoe(e,t)?e.with({path:e.path+"/"}):e}}const mn=new Znt(()=>!1),TX=mn.isEqual.bind(mn);mn.isEqualOrParent.bind(mn);mn.getComparisonKey.bind(mn);const Ynt=mn.basenameOrAuthority.bind(mn),I0=mn.basename.bind(mn),Qnt=mn.extname.bind(mn),xP=mn.dirname.bind(mn),Xnt=mn.joinPath.bind(mn),eit=mn.normalizePath.bind(mn),tit=mn.relativePath.bind(mn),qoe=mn.resolvePath.bind(mn);mn.isAbsolutePath.bind(mn);const Joe=mn.isEqualAuthority.bind(mn),Zoe=mn.hasTrailingPathSeparator.bind(mn);mn.removeTrailingPathSeparator.bind(mn);mn.addTrailingPathSeparator.bind(mn);var $m;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function e(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(a=>{const[o,s]=a.split(":");o&&s&&n.set(o,s)});const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(u.META_DATA_MIME,r),n}u.parseMetaData=e})($m||($m={}));function mD(u){return u.toString()}class cr{static create(e,t){const n=e.getAlternativeVersionId(),i=UW(e);return new cr(n,n,i,i,t,t,[])}constructor(e,t,n,i,r,a,o){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=r,this.afterCursorState=a,this.changes=o}append(e,t,n,i,r){t.length>0&&(this.changes=Unt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,n){if(cc(e,t?t.length:0,n),n+=4,t)for(const i of t)cc(e,i.selectionStartLineNumber,n),n+=4,cc(e,i.selectionStartColumn,n),n+=4,cc(e,i.positionLineNumber,n),n+=4,cc(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=lc(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(dt.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof cr}append(e,t,n,i,r){this._data instanceof cr&&this._data.append(e,t,n,i,r)}close(){this._data instanceof cr&&(this._data=this._data.serialize())}open(){this._data instanceof cr||(this._data=cr.deserialize(this._data))}undo(){if(dt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof cr&&(this._data=this._data.serialize());const e=cr.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(dt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof cr&&(this._data=this._data.serialize());const e=cr.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof cr&&(this._data=this._data.serialize()),this._data.byteLength+168}}class uit{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const r=mD(i.resource);this._editStackElementsMap.set(r,i)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=mD(e);return this._editStackElementsMap.has(t)}setModel(e){const t=mD(dt.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=mD(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,i,r){const a=mD(e.uri);this._editStackElementsMap.get(a).append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=mD(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${I0(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function UW(u){return u.getEOL()===` +`)o++,s=m+1;else{if(l!==m){let f;if(c===o){const p=m-l;if(pPnt(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function Pnt(u){let e=Js(u);return/^[\w ]+/.test(u)&&(e=`\\b${e}`),/[\w ]+$/.test(u)&&(e=`${e}\\b`),e}class ICe{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=MX.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function Rnt(u){if(u.length===0)return null;if(u.length===1)return u[0];let e=0;function t(){if(e>=u.length)return null;const a=e,o=u[a].listHeight;for(e++;e=2?OCe(a===0&&e===u.length?u:u.slice(a,e),!1):u[a]}let n=t(),i=t();if(!i)return n;for(let a=t();a;a=t())Woe(n,i)<=Woe(i,a)?(n=Nj(n,i),i=a):i=Nj(i,a);return Nj(n,i)}function OCe(u,e=!1){if(u.length===0)return null;if(u.length===1)return u[0];let t=u.length;for(;t>3;){const n=t>>1;for(let i=0;i=3?u[2]:null,e)}function Woe(u,e){return Math.abs(u.listHeight-e.listHeight)}function Nj(u,e){return u.listHeight===e.listHeight?S1.create23(u,e,null,!1):u.listHeight>e.listHeight?Int(u,e):Ont(e,u)}function Int(u,e){u=u.toMutable();let t=u;const n=[];let i;for(;;){if(e.listHeight===t.listHeight){i=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){const a=n[r];i?a.childrenLength>=3?i=S1.create23(a.unappendChild(),i,null,!1):(a.appendChildOfSameHeight(i),i=void 0):a.handleChildrenChanged()}return i?S1.create23(u,i,null,!1):u}function Ont(u,e){u=u.toMutable();let t=u;const n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let i=e;for(let r=n.length-1;r>=0;r--){const a=n[r];i?a.childrenLength>=3?i=S1.create23(i,a.unprependChild(),null,!1):(a.prependChildOfSameHeight(i),i=void 0):a.handleChildrenChanged()}return i?S1.create23(i,u,null,!1):u}class jnt{constructor(e){this.lastOffset=uo,this.nextNodes=[e],this.offsets=[uo],this.idxs=[]}readLongestNodeAt(e,t){if(hx(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=EC(this.nextNodes);if(!n)return;const i=EC(this.offsets);if(hx(e,i))return;if(hx(i,e))if(Zn(i,n.length)<=e)this.nextNodeAfterCurrent();else{const r=Pj(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(i),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const r=Pj(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(i),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){const e=EC(this.offsets),t=EC(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=EC(this.nextNodes),i=Pj(n,this.idxs[this.idxs.length-1]);if(i!==-1){this.nextNodes.push(n.getChild(i)),this.offsets.push(Zn(e,t.length)),this.idxs[this.idxs.length-1]=i;break}else this.idxs.pop()}}}function Pj(u,e=-1){for(;;){if(e++,e>=u.childrenLength)return-1;if(u.getChild(e))return e}}function EC(u){return u.length>0?u[u.length-1]:void 0}function $W(u,e,t,n){return new Hnt(u,e,t,n).parseDocument()}let Hnt=class{constructor(e,t,n,i){if(this.tokenizer=e,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,n&&i)throw new Error("Not supported");this.oldNodeReader=n?new jnt(n):void 0,this.positionMapper=new Bnt(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Ii.getEmpty(),0);return e||(e=S1.getEmpty()),e}parseList(e,t){const n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){const a=this.tokenizer.peek();if(!a||a.kind===2&&a.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?Rnt(n):OCe(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!VB(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),i=>t!==null&&!hx(i.length,t)?!1:i.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new Mnt(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Af(n.length);const i=e.merge(n.bracketIds),r=this.parseList(i,t+1),a=this.tokenizer.peek();return a&&a.kind===2&&(a.bracketId===n.bracketId||a.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),Nk.create(n.astNode,r,a.astNode)):Nk.create(n.astNode,r,null)}default:throw new Error("unexpected")}}};function WB(u,e){if(u.length===0)return e;if(e.length===0)return u;const t=new s4(Goe(u)),n=Goe(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let i=t.dequeue();function r(l){if(l===void 0){const d=t.takeWhile(h=>!0)||[];return i&&d.unshift(i),d}const c=[];for(;i&&!VB(l);){const[d,h]=i.splitAt(l);c.push(d),l=Tk(d.lengthAfter,l),i=h??t.dequeue()}return VB(l)||c.push(new ME(!1,l,l)),c}const a=[];function o(l,c,d){if(a.length>0&&NCe(a[a.length-1].endOffset,l)){const h=a[a.length-1];a[a.length-1]=new $h(h.startOffset,c,Zn(h.newLength,d))}else a.push({startOffset:l,endOffset:c,newLength:d})}let s=uo;for(const l of n){const c=r(l.lengthBefore);if(l.modified){const d=_nt(c,E=>E.lengthBefore),h=Zn(s,d);o(s,h,l.lengthAfter),s=h}else for(const d of c){const h=s;s=Zn(s,d.lengthBefore),d.modified&&o(h,s,d.lengthAfter)}}return a}class ME{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=Tk(e,this.lengthAfter);return NCe(t,uo)?[this,void 0]:this.modified?[new ME(this.modified,this.lengthBefore,e),new ME(this.modified,uo,t)]:[new ME(this.modified,e,e),new ME(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${S0(this.lengthBefore)} -> ${S0(this.lengthAfter)}`}}function Goe(u){const e=[];let t=uo;for(const n of u){const i=Tk(t,n.startOffset);VB(i)||e.push(new ME(!1,i,i));const r=Tk(n.startOffset,n.endOffset);e.push(new ME(!0,r,n.newLength)),t=n.endOffset}return e}class Vnt extends ne{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new Q,this.denseKeyProvider=new PCe,this.brackets=new ICe(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),i=new Nnt(this.textModel.getValue(),n);this.initialAstWithoutTokens=$W(i,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(n=>new $h(gi(n.fromLineNumber-1,0),gi(n.toLineNumber,0),gi(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=$h.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=WB(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=WB(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const i=t,r=new RCe(this.textModel,this.brackets);return $W(r,e,i,n)}getBracketsInRange(e,t){this.flushQueue();const n=gi(e.startLineNumber-1,e.startColumn-1),i=gi(e.endLineNumber-1,e.endColumn-1);return new h1(r=>{const a=this.initialAstWithoutTokens||this.astWithTokens;KW(a,uo,a.length,n,i,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const n=v5(e.getStartPosition()),i=v5(e.getEndPosition());return new h1(r=>{const a=this.initialAstWithoutTokens||this.astWithTokens,o=new $nt(r,t,this.textModel);WW(a,uo,a.length,n,i,o,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return HCe(t,uo,t.length,v5(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return jCe(t,uo,t.length,v5(e))}}function jCe(u,e,t,n){if(u.kind===4||u.kind===2){const i=[];for(const r of u.children)t=Zn(e,r.length),i.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=i.length-1;r>=0;r--){const{nodeOffsetStart:a,nodeOffsetEnd:o}=i[r];if(hx(a,n)){const s=jCe(u.children[r],a,o,n);if(s)return s}}return null}else{if(u.kind===3)return null;if(u.kind===1){const i=a3(e,t);return{bracketInfo:u.bracketInfo,range:i}}}return null}function HCe(u,e,t,n){if(u.kind===4||u.kind===2){for(const i of u.children){if(t=Zn(e,i.length),hx(n,t)){const r=HCe(i,e,t,n);if(r)return r}e=t}return null}else{if(u.kind===3)return null;if(u.kind===1){const i=a3(e,t);return{bracketInfo:u.bracketInfo,range:i}}}return null}function KW(u,e,t,n,i,r,a,o,s,l,c=!1){if(a>200)return!0;e:for(;;)switch(u.kind){case 4:{const d=u.childrenLength;for(let h=0;h200)return!0;let l=!0;if(u.kind===2){let c=0;if(o){let E=o.get(u.openingBracket.text);E===void 0&&(E=0),c=E,E++,o.set(u.openingBracket.text,E)}const d=Zn(e,u.openingBracket.length);let h=-1;if(r.includeMinIndentation&&(h=u.computeMinIndentation(e,r.textModel)),l=r.push(new Fnt(a3(e,t),a3(e,d),u.closingBracket?a3(Zn(d,((s=u.child)===null||s===void 0?void 0:s.length)||uo),t):void 0,a,c,u,h)),e=d,l&&u.child){const E=u.child;if(t=Zn(e,E.length),Ex(e,i)&&Cb(t,n)&&(l=WW(E,e,t,n,i,r,a+1,o),!l))return!1}o==null||o.set(u.openingBracket.text,c)}else{let c=e;for(const d of u.children){const h=c;if(c=Zn(c,d.length),Ex(h,i)&&Ex(n,c)&&(l=WW(d,h,c,n,i,r,a,o),!l))return!1}}return l}class Knt extends ne{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Ir),this.onDidChangeEmitter=new Q,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(n=>{var i;(!n.languageId||!((i=this.bracketPairsTree.value)===null||i===void 0)&&i.object.didLanguageChange(n.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)===null||e===void 0||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)===null||t===void 0||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new pe;this.bracketPairsTree.value=Wnt(e.add(new Vnt(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!1))||h1.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e,!0))||h1.empty}getBracketsInRange(e,t=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)===null||n===void 0?void 0:n.object.getBracketsInRange(e,t))||h1.empty}findMatchingBracketUp(e,t,n){const i=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(i.lineNumber,i.column);if(this.canBuildAST){const a=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!a)return null;const o=this.getBracketPairsInRange(j.fromPositions(t,t)).findLast(s=>a.closes(s.openingBracketInfo));return o?o.openingBracketRange:null}else{const a=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!o)return null;const s=o.textIsBracket[a];return s?s9(this._findMatchingBracketUp(s,i,Rj(n))):null}}matchBracket(e,t){if(this.canBuildAST){const n=this.getBracketPairsInRange(j.fromPositions(e,e)).filter(i=>i.closingBracketRange!==void 0&&(i.openingBracketRange.containsPosition(e)||i.closingBracketRange.containsPosition(e))).findLastMaxBy(A0(i=>i.openingBracketRange.containsPosition(e)?i.openingBracketRange:i.closingBracketRange,j.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{const n=Rj(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,i){const r=t.getCount(),a=t.getLanguageId(i);let o=Math.max(0,e.column-1-n.maxBracketLength);for(let l=i-1;l>=0;l--){const c=t.getEndOffset(l);if(c<=o)break;if(_d(t.getStandardTokenType(l))||t.getLanguageId(l)!==a){o=c;break}}let s=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let l=i+1;l=s)break;if(_d(t.getStandardTokenType(l))||t.getLanguageId(l)!==a){s=c;break}}return{searchStartOffset:o,searchEndOffset:s}}_matchBracket(e,t){const n=e.lineNumber,i=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),a=i.findTokenIndexAtOffset(e.column-1);if(a<0)return null;const o=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(a)).brackets;if(o&&!_d(i.getStandardTokenType(a))){let{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,a),c=null;for(;;){const d=nl.findNextBracketInRange(o.forwardRegex,n,r,s,l);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){const h=r.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),E=this._matchFoundBracket(d,o.textIsBracket[h],o.textIsOpenBracket[h],t);if(E){if(E instanceof vh)return null;c=E}}s=d.endColumn-1}if(c)return c}if(a>0&&i.getStartOffset(a)===e.column-1){const s=a-1,l=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(l&&!_d(i.getStandardTokenType(s))){const{searchStartOffset:c,searchEndOffset:d}=this._establishBracketSearchOffsets(e,i,l,s),h=nl.findPrevBracketInRange(l.reversedRegex,n,r,c,d);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const E=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),m=this._matchFoundBracket(h,l.textIsBracket[E],l.textIsOpenBracket[E],t);if(m)return m instanceof vh?null:m}}}return null}_matchFoundBracket(e,t,n,i){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),i):this._findMatchingBracketUp(t,e.getStartPosition(),i);return r?r instanceof vh?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const i=e.languageId,r=e.reversedRegex;let a=-1,o=0;const s=(l,c,d,h)=>{for(;;){if(n&&++o%100===0&&!n())return vh.INSTANCE;const E=nl.findPrevBracketInRange(r,l,c,d,h);if(!E)break;const m=c.substring(E.startColumn-1,E.endColumn-1).toLowerCase();if(e.isOpen(m)?a++:e.isClose(m)&&a--,a===0)return E;h=E.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const c=this.textModel.tokenization.getLineTokens(l),d=c.getCount(),h=this.textModel.getLineContent(l);let E=d-1,m=h.length,g=h.length;l===t.lineNumber&&(E=c.findTokenIndexAtOffset(t.column-1),m=t.column-1,g=t.column-1);let f=!0;for(;E>=0;E--){const p=c.getLanguageId(E)===i&&!_d(c.getStandardTokenType(E));if(p)f?m=c.getStartOffset(E):(m=c.getStartOffset(E),g=c.getEndOffset(E));else if(f&&m!==g){const D=s(l,h,m,g);if(D)return D}f=p}if(f&&m!==g){const p=s(l,h,m,g);if(p)return p}}return null}_findMatchingBracketDown(e,t,n){const i=e.languageId,r=e.forwardRegex;let a=1,o=0;const s=(c,d,h,E)=>{for(;;){if(n&&++o%100===0&&!n())return vh.INSTANCE;const m=nl.findNextBracketInRange(r,c,d,h,E);if(!m)break;const g=d.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(e.isOpen(g)?a++:e.isClose(g)&&a--,a===0)return m;h=m.endColumn-1}return null},l=this.textModel.getLineCount();for(let c=t.lineNumber;c<=l;c++){const d=this.textModel.tokenization.getLineTokens(c),h=d.getCount(),E=this.textModel.getLineContent(c);let m=0,g=0,f=0;c===t.lineNumber&&(m=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,f=t.column-1);let p=!0;for(;m=1;o--){const s=this.textModel.tokenization.getLineTokens(o),l=s.getCount(),c=this.textModel.getLineContent(o);let d=l-1,h=c.length,E=c.length;if(o===n.lineNumber){d=s.findTokenIndexAtOffset(n.column-1),h=n.column-1,E=n.column-1;const g=s.getLanguageId(d);i!==g&&(i=g,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,a=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let m=!0;for(;d>=0;d--){const g=s.getLanguageId(d);if(i!==g){if(r&&a&&m&&h!==E){const p=nl.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(p)return this._toFoundBracket(a,p);m=!1}i=g,r=this.languageConfigurationService.getLanguageConfiguration(i).brackets,a=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const f=!!r&&!_d(s.getStandardTokenType(d));if(f)m?h=s.getStartOffset(d):(h=s.getStartOffset(d),E=s.getEndOffset(d));else if(a&&r&&m&&h!==E){const p=nl.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(p)return this._toFoundBracket(a,p)}m=f}if(a&&r&&m&&h!==E){const g=nl.findPrevBracketInRange(r.reversedRegex,o,c,h,E);if(g)return this._toFoundBracket(a,g)}}return null}findNextBracket(e){var t;const n=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)===null||t===void 0?void 0:t.object.getFirstBracketAfter(n))||null;const i=this.textModel.getLineCount();let r=null,a=null,o=null;for(let s=n.lineNumber;s<=i;s++){const l=this.textModel.tokenization.getLineTokens(s),c=l.getCount(),d=this.textModel.getLineContent(s);let h=0,E=0,m=0;if(s===n.lineNumber){h=l.findTokenIndexAtOffset(n.column-1),E=n.column-1,m=n.column-1;const f=l.getLanguageId(h);r!==f&&(r=f,a=this.languageConfigurationService.getLanguageConfiguration(r).brackets,o=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew)}let g=!0;for(;hg.closingBracketRange!==void 0&&g.range.strictContainsRange(E));return m?[m.openingBracketRange,m.closingBracketRange]:null}const i=Rj(t),r=this.textModel.getLineCount(),a=new Map;let o=[];const s=(E,m)=>{if(!a.has(E)){const g=[];for(let f=0,p=m?m.brackets.length:0;f{for(;;){if(i&&++l%100===0&&!i())return vh.INSTANCE;const D=nl.findNextBracketInRange(E.forwardRegex,m,g,f,p);if(!D)break;const x=g.substring(D.startColumn-1,D.endColumn-1).toLowerCase(),b=E.textIsBracket[x];if(b&&(b.isOpen(x)?o[b.index]++:b.isClose(x)&&o[b.index]--,o[b.index]===-1))return this._matchFoundBracket(D,b,!1,i);f=D.endColumn-1}return null};let d=null,h=null;for(let E=n.lineNumber;E<=r;E++){const m=this.textModel.tokenization.getLineTokens(E),g=m.getCount(),f=this.textModel.getLineContent(E);let p=0,D=0,x=0;if(E===n.lineNumber){p=m.findTokenIndexAtOffset(n.column-1),D=n.column-1,x=n.column-1;const k=m.getLanguageId(p);d!==k&&(d=k,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,s(d,h))}let b=!0;for(;pe==null?void 0:e.dispose()}}function Rj(u){if(typeof u>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=u}}class vh{constructor(){this._searchCanceledBrand=void 0}}vh.INSTANCE=new vh;function s9(u){return u instanceof vh?null:u}class Gnt extends ne{constructor(e){super(),this.textModel=e,this.colorProvider=new VCe,this.onDidChangeEmitter=new Q,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,i){return i?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(a=>({id:`bracket${a.range.toString()}-${a.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(a,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:a.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new j(1,1,this.textModel.getLineCount(),1),e,t):[]}}class VCe{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Kl((u,e)=>{const t=[pCe,DCe,xCe,vCe,CCe,bCe],n=new VCe;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${u.getColor(qtt)}; }`);const i=t.map(r=>u.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){const a=i[r%i.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${a}; }`)}});function l9(u){return u.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class Ur{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,i){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=i}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${l9(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${l9(this.oldText)}")`:`(replace@${this.oldPosition} "${l9(this.oldText)}" with "${l9(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const i=t.length;cc(e,i,n),n+=4;for(let r=0;ru.length)return!1;if(t){if(!VQ(u,e))return!1;if(e.length===u.length)return!0;let r=e.length;return e.charAt(e.length-1)===n&&r--,u.charAt(r)===n}return e.charAt(e.length-1)!==n&&(e+=n),u.indexOf(e)===0}function KCe(u){return u>=65&&u<=90||u>=97&&u<=122}function Jnt(u,e=na){return e?KCe(u.charCodeAt(0))&&u.charCodeAt(1)===58:!1}function Sd(u){return mB(u,!0)}class Znt{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:ok(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===Ot.file)return GW(Sd(e),Sd(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(Joe(e.authority,t.authority))return GW(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return dt.joinPath(e,...t)}basenameOrAuthority(e){return O0(e)||e.authority}basename(e){return Oi.basename(e.path)}extname(e){return Oi.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Ot.file?t=dt.file(Ave(Sd(e))).path:(t=Oi.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===Ot.file?t=dt.file(yve(Sd(e))).path:t=Oi.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Joe(e.authority,t.authority))return;if(e.scheme===Ot.file){const r=tqe(Sd(e),Sd(t));return na?$Ce(r):r}let n=e.path||"/";const i=t.path||"/";if(this._ignorePathCasing(e)){let r=0;for(const a=Math.min(n.length,i.length);rUoe(n).length&&n[n.length-1]===t}else{const n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=jc){return Zoe(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=jc){let n=!1;if(e.scheme===Ot.file){const i=Sd(e);n=i!==void 0&&i.length===Uoe(i).length&&i[i.length-1]===t}else{t="/";const i=e.path;n=i.length===1&&i.charCodeAt(i.length-1)===47}return!n&&!Zoe(e,t)?e.with({path:e.path+"/"}):e}}const mn=new Znt(()=>!1),TX=mn.isEqual.bind(mn);mn.isEqualOrParent.bind(mn);mn.getComparisonKey.bind(mn);const Ynt=mn.basenameOrAuthority.bind(mn),O0=mn.basename.bind(mn),Qnt=mn.extname.bind(mn),xP=mn.dirname.bind(mn),Xnt=mn.joinPath.bind(mn),eit=mn.normalizePath.bind(mn),tit=mn.relativePath.bind(mn),qoe=mn.resolvePath.bind(mn);mn.isAbsolutePath.bind(mn);const Joe=mn.isEqualAuthority.bind(mn),Zoe=mn.hasTrailingPathSeparator.bind(mn);mn.removeTrailingPathSeparator.bind(mn);mn.addTrailingPathSeparator.bind(mn);var $m;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function e(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(a=>{const[o,s]=a.split(":");o&&s&&n.set(o,s)});const r=t.path.substring(0,t.path.indexOf(";"));return r&&n.set(u.META_DATA_MIME,r),n}u.parseMetaData=e})($m||($m={}));function mD(u){return u.toString()}class cr{static create(e,t){const n=e.getAlternativeVersionId(),i=UW(e);return new cr(n,n,i,i,t,t,[])}constructor(e,t,n,i,r,a,o){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=i,this.beforeCursorState=r,this.afterCursorState=a,this.changes=o}append(e,t,n,i,r){t.length>0&&(this.changes=Unt(this.changes,t)),this.afterEOL=n,this.afterVersionId=i,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,n){if(cc(e,t?t.length:0,n),n+=4,t)for(const i of t)cc(e,i.selectionStartLineNumber,n),n+=4,cc(e,i.selectionStartColumn,n),n+=4,cc(e,i.positionLineNumber,n),n+=4,cc(e,i.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const i=lc(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(dt.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof cr}append(e,t,n,i,r){this._data instanceof cr&&this._data.append(e,t,n,i,r)}close(){this._data instanceof cr&&(this._data=this._data.serialize())}open(){this._data instanceof cr||(this._data=cr.deserialize(this._data))}undo(){if(dt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof cr&&(this._data=this._data.serialize());const e=cr.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(dt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof cr&&(this._data=this._data.serialize());const e=cr.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof cr&&(this._data=this._data.serialize()),this._data.byteLength+168}}class uit{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const r=mD(i.resource);this._editStackElementsMap.set(r,i)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=mD(e);return this._editStackElementsMap.has(t)}setModel(e){const t=mD(dt.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=mD(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,i,r){const a=mD(e.uri);this._editStackElementsMap.get(a).append(e,t,n,i,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=mD(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${O0(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function UW(u){return u.getEOL()===` `?0:1}function Ch(u){return u?u instanceof WCe||u instanceof uit:!1}class NX{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ch(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ch(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(Ch(n)&&n.canAppend(this._model))return n;const i=new WCe(v("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i,t),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],UW(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,i){const r=this._getOrCreateEditStackElement(e,i),a=this._model.applyEdits(t,!0),o=NX._computeCursorState(n,a),s=a.map((l,c)=>({index:c,textChange:l.textChange}));return s.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),r.append(this._model,s.map(l=>l.textChange),UW(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return zt(n),null}}}class nit{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function iit(u,e,t,n,i){i.spacesDiff=0,i.looksLikeAlignment=!1;let r;for(r=0;r0&&o>0||s>0&&l>0)return;const c=Math.abs(o-l),d=Math.abs(a-s);if(c===0){i.spacesDiff=d,d>0&&0<=s-1&&s-10?i++:b>1&&r++,iit(a,o,f,x,d),d.looksLikeAlignment&&!(t&&e===d.spacesDiff)))continue;const A=d.spacesDiff;A<=l&&c[A]++,a=f,o=x}let h=t;i!==r&&(h=i{const f=c[g];f>m&&(m=f,E=g)}),E===4&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(E=2)}return{insertSpaces:h,tabSize:E}}function Co(u){return(u.metadata&1)>>>0}function dn(u,e){u.metadata=u.metadata&254|e<<0}function ta(u){return(u.metadata&2)>>>1===1}function an(u,e){u.metadata=u.metadata&253|(e?1:0)<<1}function GCe(u){return(u.metadata&4)>>>2===1}function Qoe(u,e){u.metadata=u.metadata&251|(e?1:0)<<2}function UCe(u){return(u.metadata&64)>>>6===1}function Xoe(u,e){u.metadata=u.metadata&191|(e?1:0)<<6}function rit(u){return(u.metadata&24)>>>3}function ese(u,e){u.metadata=u.metadata&231|e<<3}function ait(u){return(u.metadata&32)>>>5===1}function tse(u,e){u.metadata=u.metadata&223|(e?1:0)<<5}class qCe{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,dn(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Qoe(this,!1),Xoe(this,!1),ese(this,1),tse(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,an(this,!1)}reset(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i}setOptions(e){this.options=e;const t=this.options.className;Qoe(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),Xoe(this,this.options.glyphMarginClassName!==null),ese(this,this.options.stickiness),tse(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Ht=new qCe(null,0,0);Ht.parent=Ht;Ht.left=Ht;Ht.right=Ht;dn(Ht,0);class Ij{constructor(){this.root=Ht,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,i,r,a){return this.root===Ht?[]:mit(this,e,t,n,i,r,a)}search(e,t,n,i){return this.root===Ht?[]:Eit(this,e,t,n,i)}collectNodesFromOwner(e){return dit(this,e)}collectNodesPostOrder(){return hit(this)}insert(e){use(this,e),this._normalizeDeltaIfNecessary()}delete(e){nse(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let i=0;for(;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;const r=n.start+i,a=n.end+i;n.setCachedOffsets(r,a,t)}acceptReplace(e,t,n,i){const r=lit(this,e,e+t);for(let a=0,o=r.length;at||n===1?!1:n===2?!0:e}function sit(u,e,t,n,i){const r=rit(u),a=r===0||r===2,o=r===1||r===2,s=t-e,l=n,c=Math.min(s,l),d=u.start;let h=!1;const E=u.end;let m=!1;e<=d&&E<=t&&ait(u)&&(u.start=e,h=!0,u.end=e,m=!0);{const f=i?1:s>0?2:0;!h&&gD(d,a,e,f)&&(h=!0),!m&&gD(E,o,e,f)&&(m=!0)}if(c>0&&!i){const f=s>l?2:0;!h&&gD(d,a,e+c,f)&&(h=!0),!m&&gD(E,o,e+c,f)&&(m=!0)}{const f=i?1:0;!h&&gD(d,a,t,f)&&(u.start=e+l,h=!0),!m&&gD(E,o,t,f)&&(u.end=e+l,m=!0)}const g=l-s;h||(u.start=Math.max(0,d+g)),m||(u.end=Math.max(0,E+g)),u.start>u.end&&(u.end=u.start)}function lit(u,e,t){let n=u.root,i=0,r=0,a=0,o=0;const s=[];let l=0;for(;n!==Ht;){if(ta(n)){an(n.left,!1),an(n.right,!1),n===n.parent.right&&(i-=n.parent.delta),n=n.parent;continue}if(!ta(n.left)){if(r=i+n.maxEnd,rt){an(n,!0);continue}if(o=i+n.end,o>=e&&(n.setCachedOffsets(a,o,0),s[l++]=n),an(n,!0),n.right!==Ht&&!ta(n.right)){i+=n.delta,n=n.right;continue}}return an(u.root,!1),s}function cit(u,e,t,n){let i=u.root,r=0,a=0,o=0;const s=n-(t-e);for(;i!==Ht;){if(ta(i)){an(i.left,!1),an(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),Km(i),i=i.parent;continue}if(!ta(i.left)){if(a=r+i.maxEnd,at){i.start+=s,i.end+=s,i.delta+=s,(i.delta<-1073741824||i.delta>1073741824)&&(u.requestNormalizeDelta=!0),an(i,!0);continue}if(an(i,!0),i.right!==Ht&&!ta(i.right)){r+=i.delta,i=i.right;continue}}an(u.root,!1)}function dit(u,e){let t=u.root;const n=[];let i=0;for(;t!==Ht;){if(ta(t)){an(t.left,!1),an(t.right,!1),t=t.parent;continue}if(t.left!==Ht&&!ta(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[i++]=t),an(t,!0),t.right!==Ht&&!ta(t.right)){t=t.right;continue}}return an(u.root,!1),n}function hit(u){let e=u.root;const t=[];let n=0;for(;e!==Ht;){if(ta(e)){an(e.left,!1),an(e.right,!1),e=e.parent;continue}if(e.left!==Ht&&!ta(e.left)){e=e.left;continue}if(e.right!==Ht&&!ta(e.right)){e=e.right;continue}t[n++]=e,an(e,!0)}return an(u.root,!1),t}function Eit(u,e,t,n,i){let r=u.root,a=0,o=0,s=0;const l=[];let c=0;for(;r!==Ht;){if(ta(r)){an(r.left,!1),an(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;continue}if(r.left!==Ht&&!ta(r.left)){r=r.left;continue}o=a+r.start,s=a+r.end,r.setCachedOffsets(o,s,n);let d=!0;if(e&&r.ownerId&&r.ownerId!==e&&(d=!1),t&&GCe(r)&&(d=!1),i&&!UCe(r)&&(d=!1),d&&(l[c++]=r),an(r,!0),r.right!==Ht&&!ta(r.right)){a+=r.delta,r=r.right;continue}}return an(u.root,!1),l}function mit(u,e,t,n,i,r,a){let o=u.root,s=0,l=0,c=0,d=0;const h=[];let E=0;for(;o!==Ht;){if(ta(o)){an(o.left,!1),an(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(!ta(o.left)){if(l=s+o.maxEnd,lt){an(o,!0);continue}if(d=s+o.end,d>=e){o.setCachedOffsets(c,d,r);let m=!0;n&&o.ownerId&&o.ownerId!==n&&(m=!1),i&&GCe(o)&&(m=!1),a&&!UCe(o)&&(m=!1),m&&(h[E++]=o)}if(an(o,!0),o.right!==Ht&&!ta(o.right)){s+=o.delta,o=o.right;continue}}return an(u.root,!1),h}function use(u,e){if(u.root===Ht)return e.parent=Ht,e.left=Ht,e.right=Ht,dn(e,0),u.root=e,u.root;git(u,e),uE(e.parent);let t=e;for(;t!==u.root&&Co(t.parent)===1;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;Co(n)===1?(dn(t.parent,0),dn(n,0),dn(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,i2(u,t)),dn(t.parent,0),dn(t.parent.parent,1),r2(u,t.parent.parent))}else{const n=t.parent.parent.left;Co(n)===1?(dn(t.parent,0),dn(n,0),dn(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,r2(u,t)),dn(t.parent,0),dn(t.parent.parent,1),i2(u,t.parent.parent))}return dn(u.root,0),e}function git(u,e){let t=0,n=u.root;const i=e.start,r=e.end;for(;;)if(pit(i,r,n.start+t,n.end+t)<0)if(n.left===Ht){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===Ht){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=Ht,e.right=Ht,dn(e,1)}function nse(u,e){let t,n;if(e.left===Ht?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(u.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Ht?(t=e.left,n=e):(n=fit(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(u.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(u.requestNormalizeDelta=!0)),n===u.root){u.root=t,dn(t,0),e.detach(),Oj(),Km(t),u.root.parent=Ht;return}const i=Co(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,dn(n,Co(e)),e===u.root?u.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Ht&&(n.left.parent=n),n.right!==Ht&&(n.right.parent=n)),e.detach(),i){uE(t.parent),n!==e&&(uE(n),uE(n.parent)),Oj();return}uE(t),uE(t.parent),n!==e&&(uE(n),uE(n.parent));let r;for(;t!==u.root&&Co(t)===0;)t===t.parent.left?(r=t.parent.right,Co(r)===1&&(dn(r,0),dn(t.parent,1),i2(u,t.parent),r=t.parent.right),Co(r.left)===0&&Co(r.right)===0?(dn(r,1),t=t.parent):(Co(r.right)===0&&(dn(r.left,0),dn(r,1),r2(u,r),r=t.parent.right),dn(r,Co(t.parent)),dn(t.parent,0),dn(r.right,0),i2(u,t.parent),t=u.root)):(r=t.parent.left,Co(r)===1&&(dn(r,0),dn(t.parent,1),r2(u,t.parent),r=t.parent.left),Co(r.left)===0&&Co(r.right)===0?(dn(r,1),t=t.parent):(Co(r.left)===0&&(dn(r.right,0),dn(r,1),i2(u,r),r=t.parent.left),dn(r,Co(t.parent)),dn(t.parent,0),dn(r.left,0),r2(u,t.parent),t=u.root));dn(t,0),Oj()}function fit(u){for(;u.left!==Ht;)u=u.left;return u}function Oj(){Ht.parent=Ht,Ht.delta=0,Ht.start=0,Ht.end=0}function i2(u,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(u.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Ht&&(t.left.parent=e),t.parent=e.parent,e.parent===Ht?u.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,Km(e),Km(t)}function r2(u,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(u.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Ht&&(t.right.parent=e),t.parent=e.parent,e.parent===Ht?u.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,Km(e),Km(t)}function JCe(u){let e=u.end;if(u.left!==Ht){const t=u.left.maxEnd;t>e&&(e=t)}if(u.right!==Ht){const t=u.right.maxEnd+u.delta;t>e&&(e=t)}return e}function Km(u){u.maxEnd=JCe(u)}function uE(u){for(;u!==Ht;){const e=JCe(u);if(u.maxEnd===e)return;u.maxEnd=e,u=u.parent}}function pit(u,e,t,n){return u===t?e-n:u-t}class qW{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==St)return PX(this.right);let e=this;for(;e.parent!==St&&e.parent.left!==e;)e=e.parent;return e.parent===St?St:e.parent}prev(){if(this.left!==St)return ZCe(this.left);let e=this;for(;e.parent!==St&&e.parent.right!==e;)e=e.parent;return e.parent===St?St:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const St=new qW(null,0);St.parent=St;St.left=St;St.right=St;St.color=0;function PX(u){for(;u.left!==St;)u=u.left;return u}function ZCe(u){for(;u.right!==St;)u=u.right;return u}function RX(u){return u===St?0:u.size_left+u.piece.length+RX(u.right)}function IX(u){return u===St?0:u.lf_left+u.piece.lineFeedCnt+IX(u.right)}function jj(){St.parent=St}function a2(u,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==St&&(t.left.parent=e),t.parent=e.parent,e.parent===St?u.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function o2(u,e){const t=e.left;e.left=t.right,t.right!==St&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===St?u.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function c9(u,e){let t,n;if(e.left===St?(n=e,t=n.right):e.right===St?(n=e,t=n.left):(n=PX(e.right),t=n.right),n===u.root){u.root=t,t.color=0,e.detach(),jj(),u.root.parent=St;return}const i=n.color===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?(t.parent=n.parent,bb(u,t)):(n.parent===e?t.parent=n:t.parent=n.parent,bb(u,t),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===u.root?u.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==St&&(n.left.parent=n),n.right!==St&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,bb(u,n)),e.detach(),t.parent.left===t){const a=RX(t),o=IX(t);if(a!==t.parent.size_left||o!==t.parent.lf_left){const s=a-t.parent.size_left,l=o-t.parent.lf_left;t.parent.size_left=a,t.parent.lf_left=o,Eh(u,t.parent,s,l)}}if(bb(u,t.parent),i){jj();return}let r;for(;t!==u.root&&t.color===0;)t===t.parent.left?(r=t.parent.right,r.color===1&&(r.color=0,t.parent.color=1,a2(u,t.parent),r=t.parent.right),r.left.color===0&&r.right.color===0?(r.color=1,t=t.parent):(r.right.color===0&&(r.left.color=0,r.color=1,o2(u,r),r=t.parent.right),r.color=t.parent.color,t.parent.color=0,r.right.color=0,a2(u,t.parent),t=u.root)):(r=t.parent.left,r.color===1&&(r.color=0,t.parent.color=1,o2(u,t.parent),r=t.parent.left),r.left.color===0&&r.right.color===0?(r.color=1,t=t.parent):(r.left.color===0&&(r.right.color=0,r.color=1,a2(u,r),r=t.parent.left),r.color=t.parent.color,t.parent.color=0,r.left.color=0,o2(u,t.parent),t=u.root));t.color=0,jj()}function ise(u,e){for(bb(u,e);e!==u.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,a2(u,e)),e.parent.color=0,e.parent.parent.color=1,o2(u,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,o2(u,e)),e.parent.color=0,e.parent.parent.color=1,a2(u,e.parent.parent))}u.root.color=0}function Eh(u,e,t,n){for(;e!==u.root&&e!==St;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}function bb(u,e){let t=0,n=0;if(e!==u.root){for(;e!==u.root&&e===e.parent.right;)e=e.parent;if(e!==u.root)for(e=e.parent,t=RX(e.left)-e.size_left,n=IX(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=n;e!==u.root&&(t!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}}const uh=65535;function YCe(u){let e;return u[u.length-1]<65536?e=new Uint16Array(u.length):e=new Uint32Array(u.length),e.set(u,0),e}class Dit{constructor(e,t,n,i,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=r}}function mh(u,e=!0){const t=[0];let n=1;for(let i=0,r=u.length;i126)&&(a=!1)}const o=new Dit(YCe(u),n,i,r,a);return u.length=0,o}class Wo{constructor(e,t,n,i,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=r}}class _f{constructor(e,t){this.buffer=e,this.lineStarts=t}}class vit{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==St&&e.iterate(e.root,n=>(n!==St&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Cit{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let i=0;i=e){n[i]=null,t=!0;continue}}if(t){const i=[];for(const r of n)r!==null&&i.push(r);this._cache=i}}}class bit{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new _f("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=St,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let r=0,a=e.length;r0){e[r].lineStarts||(e[r].lineStarts=mh(e[r].buffer));const o=new Wo(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),i=this.rbInsertRight(i,o)}this._searchCache=new Cit(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=uh,n=t-Math.floor(t/3),i=n*2;let r="",a=0;const o=[];if(this.iterate(this.root,s=>{const l=this.getNodeContent(s),c=l.length;if(a<=n||a+c0){const s=r.replace(/\r\n|\r|\n/g,e);o.push(new _f(s,mh(s)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new vit(this,e)}getOffsetAt(e,t){let n=0,i=this.root;for(;i!==St;)if(i.left!==St&&i.lf_left+1>=e)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;const r=this.getAccumulatedValue(i,e-i.lf_left-2);return n+=r+t-1}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const i=e;for(;t!==St;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,r.index===0){const a=this.getOffsetAt(n+1,1),o=i-a;return new ee(n+1,o+1)}return new ee(n+1,r.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===St){const r=this.getOffsetAt(n+1,1),a=i-e-r;return new ee(n+1,a+1)}else t=t.right;return new ee(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,i);return t?t!==this._EOL||!this._EOLNormalized?r.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const o=e.node,s=this._buffers[o.piece.bufferIndex].buffer,l=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return s.substring(l+e.remainder,l+t.remainder)}let n=e.node;const i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let a=i.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==St;){const o=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){a+=o.substring(s,s+t.remainder);break}else a+=o.substr(s,n.piece.length);n=n.next()}return a}getLinesContent(){const e=[];let t=0,n="",i=!1;return this.iterate(this.root,r=>{if(r===St)return!0;const a=r.piece;let o=a.length;if(o===0)return!0;const s=this._buffers[a.bufferIndex].buffer,l=this._buffers[a.bufferIndex].lineStarts,c=a.start.line,d=a.end.line;let h=l[c]+a.start.column;if(i&&(s.charCodeAt(h)===10&&(h++,o--),e[t++]=n,n="",i=!1,o===0))return!0;if(c===d)return!this._EOLNormalized&&s.charCodeAt(h+o-1)===13?(i=!0,n+=s.substr(h,o-1)):n+=s.substr(h,o),!0;n+=this._EOLNormalized?s.substring(h,Math.max(h,l[c+1]-this._EOLLength)):s.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let E=c+1;Eb+m,t.reset(0)):(D=h.buffer,x=b=>b,t.reset(m));do if(f=t.next(D),f){if(x(f.index)>=g)return c;this.positionInBuffer(e,x(f.index)-E,p);const b=this.getLineFeedCnt(e.piece.bufferIndex,r,p),k=p.line===r.line?p.column-r.column+i:p.column+1,A=k+f[0].length;if(d[c++]=Cf(new j(n+b,k,n+b,A),f,s),x(f.index)+f[0].length>=g||c>=l)return c}while(f);return c}findMatchesLineByLine(e,t,n,i){const r=[];let a=0;const o=new c5(t.wordSeparators,t.regex);let s=this.nodeAt2(e.startLineNumber,e.startColumn);if(s===null)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(l===null)return[];let c=this.positionInBuffer(s.node,s.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(s.node===l.node)return this.findMatchesInNode(s.node,o,e.startLineNumber,e.startColumn,c,d,t,n,i,a,r),r;let h=e.startLineNumber,E=s.node;for(;E!==l.node;){const g=this.getLineFeedCnt(E.piece.bufferIndex,c,E.piece.end);if(g>=1){const p=this._buffers[E.piece.bufferIndex].lineStarts,D=this.offsetInBuffer(E.piece.bufferIndex,E.piece.start),x=p[c.line+g],b=h===e.startLineNumber?e.startColumn:1;if(a=this.findMatchesInNode(E,o,h,b,c,this.positionInBuffer(E,x-D),t,n,i,a,r),a>=i)return r;h+=g}const f=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const p=this.getLineContent(h).substring(f,e.endColumn-1);return a=this._findMatchesInLine(t,o,p,e.endLineNumber,f,a,r,n,i),r}if(a=this._findMatchesInLine(t,o,this.getLineContent(h).substr(f),h,f,a,r,n,i),a>=i)return r;h++,s=this.nodeAt2(h,1),E=s.node,c=this.positionInBuffer(s.node,s.remainder)}if(h===e.endLineNumber){const g=h===e.startLineNumber?e.startColumn-1:0,f=this.getLineContent(h).substring(g,e.endColumn-1);return a=this._findMatchesInLine(t,o,f,e.endLineNumber,g,a,r,n,i),r}const m=h===e.startLineNumber?e.startColumn:1;return a=this.findMatchesInNode(l.node,o,h,m,c,d,t,n,i,a,r),r}_findMatchesInLine(e,t,n,i,r,a,o,s,l){const c=e.wordSeparators;if(!s&&e.simpleSearch){const h=e.simpleSearch,E=h.length,m=n.length;let g=-E;for(;(g=n.indexOf(h,g+E))!==-1;)if((!c||nX(c,n,m,g,E))&&(o[a++]=new mk(new j(i,g+1+r,i,g+1+E+r),null),a>=l))return a;return a}let d;t.reset(0);do if(d=t.next(n),d&&(o[a++]=Cf(new j(i,d.index+1+r,i,d.index+1+d[0].length+r),d,s),a>=l))return a;while(d);return a}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==St){const{node:i,remainder:r,nodeStartOffset:a}=this.nodeAt(e),o=i.piece,s=o.bufferIndex,l=this.positionInBuffer(i,r);if(i.piece.bufferIndex===0&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&a+o.length===e&&t.lengthe){const c=[];let d=new Wo(o.bufferIndex,l,o.end,this.getLineFeedCnt(o.bufferIndex,l,o.end),this.offsetInBuffer(s,o.end)-this.offsetInBuffer(s,l));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(i,r)===10){const g={line:d.start.line+1,column:0};d=new Wo(d.bufferIndex,g,d.end,this.getLineFeedCnt(d.bufferIndex,g,d.end),d.length-1),t+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(i,r-1)===13){const g=this.positionInBuffer(i,r-1);this.deleteNodeTail(i,g),t="\r"+t,i.piece.length===0&&c.push(i)}else this.deleteNodeTail(i,l);else this.deleteNodeTail(i,l);const h=this.createNewPieces(t);d.length>0&&this.rbInsertRight(i,d);let E=i;for(let m=0;m=0;a--)r=this.rbInsertLeft(r,i[a]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` @@ -105,7 +105,7 @@ Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._p `}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(t===`\r `&&(this._cr>0||this._lf>0)||t===` `&&(this._cr>0||this._crlf>0)))for(let r=0,a=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=xit(this._tmpLineStarts,e);this.chunks.push(new _f(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Ux(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Ive(e)))}finish(e=!0){return this._finish(),new kit(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=mh(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class Fit{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}const i=this._store.slice(0,e),r=this._store.slice(e+t),a=yit(n,this._default);this._store=i.concat(a,r)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const n=[];for(let i=0;i0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new Ait(e,[t]))}finalize(){return this._tokens}}class _it{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new ZW(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class Sit extends _it{constructor(e,t,n,i){super(e,t),this._textModel=n,this._languageIdCodec=i}updateTokensUntilLine(e,t){const n=this._textModel.getLanguageId();for(;;){const i=this.getFirstInvalidLine();if(!i||i.lineNumber>t)break;const r=this._textModel.getLineContent(i.lineNumber),a=mC(this._languageIdCodec,n,this.tokenizationSupport,r,!0,i.startState);e.add(i.lineNumber,a.tokens),this.store.setEndState(i.lineNumber,a.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const i=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),a=r.substring(0,e.column-1)+t+r.substring(e.column-1),o=mC(this._languageIdCodec,i,this.tokenizationSupport,a,!0,n),s=new nr(o.tokens,a,this._languageIdCodec);if(s.getCount()===0)return 0;const l=s.findTokenIndexAtOffset(e.column-1);return s.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,n){const i=e.lineNumber,r=e.column,a=this.getStartState(i);if(!a)return null;const o=this._textModel.getLineContent(i),s=o.substring(0,r-1)+n+o.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(i,0),c=mC(this._languageIdCodec,l,this.tokenizationSupport,s,!0,a);return new nr(c.tokens,s,this._languageIdCodec)}isCheapToTokenize(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const s=this._textModel.getLineFirstNonWhitespaceColumn(o);if(s!==0&&s0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class wit{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Gt(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new Gt(n.start,e):this._ranges.splice(t,1,new Gt(n.start,e),new Gt(e+1,n.endExclusive))}}addRange(e){Gt.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let i=n;for(;!(i>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function mC(u,e,t,n,i,r){let a=null;if(t)try{a=t.tokenizeEncoded(n,i,r.clone())}catch(o){zt(o)}return a||(a=oP(u.encodeLanguageId(e),r)),nr.convertToEndOffset(a.tokens,n.length),a}class Lit{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,Ph(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var t;const n=(t=this._tokenizerWithStateStore)===null||t===void 0?void 0:t.getFirstInvalidLine();return n?(this._tokenizerWithStateStore.updateTokensUntilLine(e,n.lineNumber),n.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Xt(e,t))}}const gh=new Uint32Array(0).buffer;class Td{static deleteBeginning(e,t){return e===null||e===gh?e:Td.delete(e,0,t)}static deleteEnding(e,t){if(e===null||e===gh)return e;const n=zh(e),i=n[n.length-2];return Td.delete(e,t,i)}static delete(e,t,n){if(e===null||e===gh||t===n)return e;const i=zh(e),r=i.length>>>1;if(t===0&&i[i.length-2]===n)return gh;const a=nr.findIndexInTokensArray(i,t),o=a>0?i[a-1<<1]:0,s=i[a<<1];if(nc&&(i[l++]=m,i[l++]=i[(E<<1)+1],c=m)}if(l===i.length)return e;const h=new Uint32Array(l);return h.set(i.subarray(0,l),0),h.buffer}static append(e,t){if(t===gh)return e;if(e===gh)return t;if(e===null)return e;if(t===null)return null;const n=zh(e),i=zh(t),r=i.length>>>1,a=new Uint32Array(n.length+i.length);a.set(n,0);let o=n.length;const s=n[n.length-2];for(let l=0;l>>1;let a=nr.findIndexInTokensArray(i,t);a>0&&i[a-1<<1]===t&&a--;for(let o=a;o0}getTokens(e,t,n){let i=null;if(t1&&(r=Jr.getLanguageId(i[1])!==e),!r)return gh}if(!i||i.length===0){const r=new Uint32Array(2);return r[0]=t,r[1]=rse(e),r.buffer}return i[i.length-2]=t,i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const n=[];for(let i=0;i=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Td.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Td.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let i=null;n=this._len)){if(t===0){this._lineTokens[i]=Td.insert(this._lineTokens[i],e.column-1,n);return}this._lineTokens[i]=Td.deleteEnding(this._lineTokens[i],e.column-1),this._lineTokens[i]=Td.insert(this._lineTokens[i],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};const n=[];for(let i=0,r=e.length;i>>0}class OX{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let n=e;if(t.length>0){const r=t[0].getRange(),a=t[t.length-1].getRange();if(!r||!a)return e;n=e.plusRange(r).plusRange(a)}let i=null;for(let r=0,a=this._pieces.length;rn.endLineNumber){i=i||{index:r};break}if(o.removeTokens(n),o.isEmpty()){this._pieces.splice(r,1),r--,a--;continue}if(o.endLineNumbern.endLineNumber){i=i||{index:r};continue}const[s,l]=o.split(n);if(s.isEmpty()){i=i||{index:r};continue}l.isEmpty()||(this._pieces.splice(r,1,s,l),r++,a++,i=i||{index:r})}return i=i||{index:this._pieces.length},t.length>0&&(this._pieces=TN(this._pieces,i.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getLineContent().length===0)return t;const n=this._pieces;if(n.length===0)return t;const i=OX._findFirstPieceWithLine(n,e),r=n[i].getLineTokens(e);if(!r)return t;const a=t.getCount(),o=r.getCount();let s=0;const l=[];let c=0,d=0;const h=(E,m)=>{E!==d&&(d=E,l[c++]=E,l[c++]=m)};for(let E=0;E>>0,D=~p>>>0;for(;st)i=r-1;else{for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,t,n,i,r){for(const a of this._pieces)a.acceptEdit(e,t,n,i,r)}}class GB extends wCe{constructor(e,t,n,i,r,a){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=n,this._bracketPairsTextModelPart=i,this._languageId=r,this._attachedViews=a,this._semanticTokens=new OX(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new Q),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new Q),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new Q),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new zit(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(o=>{o.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(o=>{this._emitModelTokensChangedEvent(o)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(o=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[n,i,r]=Vm(t.text);this._semanticTokens.acceptEdit(t.range,n,i,r,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Si("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLineWithEdit(e,t,n){return this.grammarTokens.tokenizeLineWithEdit(e,t,n)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),i=this.getLineTokens(t.lineNumber),r=i.findTokenIndexAtOffset(t.column-1),[a,o]=GB._findLanguageBoundaries(i,r),s=nk(t.column,this.getLanguageConfiguration(i.getLanguageId(r)).getWordDefinition(),n.substring(a,o),a);if(s&&s.startColumn<=e.column&&e.column<=s.endColumn)return s;if(r>0&&a===t.column-1){const[l,c]=GB._findLanguageBoundaries(i,r-1),d=nk(t.column,this.getLanguageConfiguration(i.getLanguageId(r-1)).getWordDefinition(),n.substring(l,c),l);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let i=0;for(let a=t;a>=0&&e.getLanguageId(a)===n;a--)i=e.getStartOffset(a);let r=e.getLineContent().length;for(let a=t,o=e.getCount();a{const a=this.getLanguageId();r.changedLanguages.indexOf(a)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(i.onDidChangeVisibleRanges(({view:r,state:a})=>{if(a){let o=this._attachedViewStates.get(r);o||(o=new Mit(()=>this.refreshRanges(o.lineRanges)),this._attachedViewStates.set(r,o)),o.handleStateChange(a)}else this._attachedViewStates.deleteAndDispose(r)}))}resetTokenization(e=!0){var t;this._tokens.flush(),(t=this._debugBackgroundTokens)===null||t===void 0||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new ZW(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const n=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const a=qn.get(this.getLanguageId());if(!a)return[null,null];let o;try{o=a.getInitialState()}catch(s){return zt(s),[null,null]}return[a,o]},[i,r]=n();if(i&&r?this._tokenizer=new Sit(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const a={setTokens:o=>{this.setTokens(o)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const o=2;this._backgroundTokenizationState=o,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(o,s)=>{var l;if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&o>=c&&((l=this._tokenizer)===null||l===void 0||l.store.setEndState(o,s))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,a)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new Lit(this._tokenizer,a),this._defaultBackgroundTokenizer.handleChanges()),i!=null&&i.backgroundTokenizerShouldOnlyVerifyTokens&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new Rk(this._languageIdCodec),this._debugBackgroundStates=new ZW(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:o=>{var s;(s=this._debugBackgroundTokens)===null||s===void 0||s.setMultilineTokens(o,this._textModel)},backgroundTokenizationFinished(){},setEndState:(o,s)=>{var l;(l=this._debugBackgroundStates)===null||l===void 0||l.setEndState(o,s)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)===null||e===void 0||e.handleChanges()}handleDidChangeContent(e){var t,n,i;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const r of e.changes){const[a,o]=Vm(r.text);this._tokens.acceptEdit(r.range,a,o),(t=this._debugBackgroundTokens)===null||t===void 0||t.acceptEdit(r.range,a,o)}(n=this._debugBackgroundStates)===null||n===void 0||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(i=this._defaultBackgroundTokenizer)===null||i===void 0||i.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Xt.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var n,i;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const r=new JW,{heuristicTokens:a}=this._tokenizer.tokenizeHeuristically(r,e,t),o=this.setTokens(r.finalize());if(a)for(const s of o.changes)(n=this._backgroundTokenizer.value)===null||n===void 0||n.requestTokens(s.fromLineNumber,s.toLineNumber+1);(i=this._defaultBackgroundTokenizer)===null||i===void 0||i.checkFinished()}forceTokenization(e){var t,n;const i=new JW;(t=this._tokenizer)===null||t===void 0||t.updateTokensUntilLine(i,e),this.setTokens(i.finalize()),(n=this._defaultBackgroundTokenizer)===null||n===void 0||n.checkFinished()}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const n=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,n);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,n);!i.equals(r)&&(!((t=this._debugBackgroundTokenizer.value)===null||t===void 0)&&t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const i=this._textModel.validatePosition(new ee(e,t));return this.forceTokenization(i.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(i,n)}tokenizeLineWithEdit(e,t,n){if(!this._tokenizer)return null;const i=this._textModel.validatePosition(e);return this.forceTokenization(i.lineNumber),this._tokenizer.tokenizeLineWithEdit(i,t,n)}get hasTokens(){return this._tokens.hasTokens}}class Mit extends ne{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Hu(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){di(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class Tit{constructor(){this.changeType=1}}class Qc{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",i=0;for(const r of t)n+=e.substring(i,r.column-1),i=r.column-1,n+=r.options.content;return n+=e.substring(i),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new Qc(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new Qc(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,i)=>n.lineNumber===i.lineNumber?n.column===i.column?n.order-i.order:n.column-i.column:n.lineNumber-i.lineNumber),t}constructor(e,t,n,i,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=i,this.order=r}}class ase{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class Nit{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Pit{constructor(e,t,n,i){this.changeType=4,this.injectedTexts=i,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class Rit{constructor(){this.changeType=5}}class gx{constructor(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sf;function Oit(u){const e=new QCe;return e.acceptChunk(u),e.finish()}function jit(u){const e=new QCe;let t;for(;typeof(t=u.read())=="string";)e.acceptChunk(t);return e.finish()}function ose(u,e){let t;return typeof u=="string"?t=Oit(u):FYe(u)?t=jit(u):t=u,t.create(e)}let d9=0;const Hit=999,Vit=1e4;class $it{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const i=this._source.read();if(i===null)return this._eos=!0,t===0?null:e.join("");if(i.length>0&&(e[t++]=i,n+=i.length),n>=64*1024)return e.join("")}while(!0)}}const gC=()=>{throw new Error("Invalid change accessor")};let B1=sf=class extends ne{static resolveOptions(e,t){if(t.detectIndentation){const n=Yoe(e,t.tabSize,t.insertSpaces);return new KS({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new KS(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return Fl(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,i=null,r,a,o){super(),this._undoRedoService=r,this._languageService=a,this._languageConfigurationService=o,this._onWillDispose=this._register(new Q),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new qit(E=>this.handleBeforeFireDecorationsChangedEvent(E))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new Q),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new Q),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new Q),this._eventEmitter=this._register(new Jit),this._languageSelectionListener=this._register(new Ir),this._deltaDecorationCallCnt=0,this._attachedViews=new Zit,d9++,this.id="$model"+d9,this.isForSimpleWidget=n.isForSimpleWidget,typeof i>"u"||i===null?this._associatedResource=dt.parse("inmemory://model/"+d9):this._associatedResource=i,this._attachedEditorCount=0;const{textBuffer:s,disposable:l}=ose(e,n.defaultEOL);this._buffer=s,this._bufferDisposable=l,this._options=sf.resolveOptions(this._buffer,n);const c=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new Knt(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new Iut(this,this._languageConfigurationService)),this._decorationProvider=this._register(new Gnt(this)),this._tokenizationTextModelPart=new GB(this._languageService,this._languageConfigurationService,this,this._bracketPairs,c,this._attachedViews);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new j(1,1,d,this._buffer.getLineLength(d)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=h>sf.LARGE_FILE_SIZE_THRESHOLD||d>sf.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>sf.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>sf._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=Ove(d9),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new sse,this._commandManager=new NX(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(c)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new mx([],"",` -`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=ne.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new o3(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw A0();const{textBuffer:t,disposable:n}=ose(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,a,o,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:s,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new sse,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new gx([new Tit],this._versionId,!1,!1),this._createContentChanged2(new j(1,1,r,a),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=ne.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new o3(e,t)))}setValue(e){if(this._assertNotDisposed(),e==null)throw _0();const{textBuffer:t,disposable:n}=ose(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,n)}_createContentChanged2(e,t,n,i,r,a,o,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),isEolChange:s,versionId:this.getVersionId(),isUndoing:r,isRedoing:a,isFlush:o}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new sse,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new gx([new Tit],this._versionId,!1,!1),this._createContentChanged2(new j(1,1,r,a),0,i,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r `:` `;if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),i=this.getValueLengthInRange(n),r=this.getLineCount(),a=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new gx([new Rit],this._versionId,!1,!1),this._createContentChanged2(new j(1,1,r,a),0,i,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,i=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let i=1;i<=n;i++){const r=this._buffer.getLineLength(i);r>=Vit?t+=r:e+=r}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,i=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,a=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,o=new KS({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:a});if(this._options.equals(o))return;const s=this._options.createChangeEvent(o);this._options=o,this._bracketPairs.handleDidChangeOptions(s),this._decorationProvider.handleDidChangeOptions(s),this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();const n=Yoe(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),IB(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(Rve.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Si("Operation would exceed heap memory limits");const n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._buffer.getBOM()+i:i}createSnapshot(e=!1){return new $it(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+i:i}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Si("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Si("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Si("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Si("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Si("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Si("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,i=e.startColumn;let r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),a=Math.floor(typeof i=="number"&&!isNaN(i)?i:1);if(r<1)r=1,a=1;else if(r>t)r=t,a=this.getLineMaxColumn(r);else if(a<=1)a=1;else{const d=this.getLineMaxColumn(r);a>=d&&(a=d)}const o=e.endLineNumber,s=e.endColumn;let l=Math.floor(typeof o=="number"&&!isNaN(o)?o:1),c=Math.floor(typeof s=="number"&&!isNaN(s)?s:1);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const d=this.getLineMaxColumn(l);c>=d&&(c=d)}return n===r&&i===a&&o===l&&s===c&&e instanceof j&&!(e instanceof Ye)?e:new j(r,a,l,c)}_isValidPosition(e,t,n){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const i=this._buffer.getLineCount();if(e>i)return!1;if(t===1)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(n===1){const a=this._buffer.getLineCharCode(e,t-2);if(ur(a))return!1}return!0}_validatePosition(e,t,n){const i=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),r=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),a=this._buffer.getLineCount();if(i<1)return new ee(1,1);if(i>a)return new ee(a,this.getLineMaxColumn(a));if(r<=1)return new ee(i,1);const o=this.getLineMaxColumn(i);if(r>=o)return new ee(i,o);if(n===1){const s=this._buffer.getLineCharCode(i,r-2);if(ur(s))return new ee(i,r-1)}return new ee(i,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof ee&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,a=e.endColumn;if(!this._isValidPosition(n,i,0)||!this._isValidPosition(r,a,0))return!1;if(t===1){const o=i>1?this._buffer.getLineCharCode(n,i-2):0,s=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,l=ur(o),c=ur(s);return!l&&!c}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof j&&!(e instanceof Ye)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,a=n.column,o=i.lineNumber,s=i.column;{const l=a>1?this._buffer.getLineCharCode(r,a-2):0,c=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,d=ur(l),h=ur(c);return!d&&!h?new j(r,a,o,s):r===o&&a===s?new j(r,a-1,o,s-1):d&&h?new j(r,a-1,o,s+1):d?new j(r,a-1,o,s):new j(r,a,o,s+1)}}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new j(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)}findMatches(e,t,n,i,r,a,o=Hit){this._assertNotDisposed();let s=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(d=>j.isIRange(d))&&(s=t.map(d=>this.validateRange(d)))),s===null&&(s=[this.getFullModelRange()]),s=s.sort((d,h)=>d.startLineNumber-h.startLineNumber||d.startColumn-h.startColumn);const l=[];l.push(s.reduce((d,h)=>j.areIntersecting(d,h)?d.plusRange(h):(l.push(d),h)));let c;if(!n&&e.indexOf(` @@ -113,15 +113,15 @@ Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._p `)<0){const l=new of(e,n,i,r).parseSearchRequest();if(!l)return null;const c=this.getLineCount();let d=new j(o.lineNumber,o.column,c,this.getLineMaxColumn(c)),h=this.findMatchesLineByLine(d,l,a,1);return Z7.findNextMatch(this,new of(e,n,i,r),o,a),h.length>0||(d=new j(1,1,o.lineNumber,this.getLineMaxColumn(o.lineNumber)),h=this.findMatchesLineByLine(d,l,a,1),h.length>0)?h[0]:null}return Z7.findNextMatch(this,new of(e,n,i,r),o,a)}findPreviousMatch(e,t,n,i,r,a){this._assertNotDisposed();const o=this.validatePosition(t);return Z7.findPreviousMatch(this,new of(e,n,i,r),o,a)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` `?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Cj?e:new Cj(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,i=e.length;n({range:this.validateRange(o.range),text:o.text}));let a=!0;if(e)for(let o=0,s=e.length;ol.endLineNumber,g=l.startLineNumber>E.endLineNumber;if(!m&&!g){c=!0;break}}if(!c){a=!1;break}}if(a)for(let o=0,s=this._trimAutoWhitespaceLines.length;om.endLineNumber)&&!(l===m.startLineNumber&&m.startColumn===c&&m.isEmpty()&&g&&g.length>0&&g.charAt(0)===` `)&&!(l===m.startLineNumber&&m.startColumn===1&&m.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===` -`)){d=!1;break}}if(d){const h=new j(l,1,l,c);t.push(new Cj(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map(a=>{const o=this.getPositionAt(a.newPosition),s=this.getPositionAt(a.newEnd);return{range:new j(o.lineNumber,o.column,s.lineNumber,s.column),text:a.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map(a=>{const o=this.getPositionAt(a.oldPosition),s=this.getPositionAt(a.oldEnd);return{range:new j(o.lineNumber,o.column,s.lineNumber,s.column),text:a.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,a){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(a),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),a=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,a.length!==0){for(let l=0,c=a.length;l=0;w--){const z=E+w,N=x+w;S.takeFromEndWhile(y=>y.lineNumber>N);const O=S.takeFromEndWhile(y=>y.lineNumber===N);o.push(new ase(z,this.getLineContent(N),O))}if(pR.lineNumberR.lineNumber===T)}o.push(new Pit(z+1,E+f,_,y))}s+=D}this._emitContentChangedEvent(new gx(o,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:a,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return i.reverseEdits===null?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const n=Array.from(e).map(i=>new ase(i,this.getLineContent(i),this._getInjectedTextInLine(i)));this._onDidChangeInjectedText.fire(new XCe(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(r,a)=>this._deltaDecorationsImpl(e,[],[{range:r,options:a}])[0],changeDecoration:(r,a)=>{this._changeDecorationImpl(r,a)},changeDecorationOptions:(r,a)=>{this._changeDecorationOptionsImpl(r,cse(a))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,a)=>r.length===0&&a.length===0?[]:this._deltaDecorationsImpl(e,r,a)};let i=null;try{i=t(n)}catch(r){zt(r)}return n.addDecoration=gC,n.changeDecoration=gC,n.changeDecorationOptions=gC,n.removeDecoration=gC,n.deltaDecorations=gC,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),zt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:lse[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),a=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),a,o,r),i.setOptions(lse[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,i=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const a=this.getLineCount(),o=Math.min(a,Math.max(1,e)),s=Math.min(a,Math.max(1,t)),l=this.getLineMaxColumn(s),c=new j(o,1,s,l),d=this._getDecorationsInRange(c,n,i,r);return sK(d,this._decorationProvider.getDecorationsInRange(c,n,i)),d}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const a=this.validateRange(e),o=this._getDecorationsInRange(a,t,n,r);return sK(o,this._decorationProvider.getDecorationsInRange(a,t,n,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return Qc.fromDecorations(i).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),a=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,a,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const o=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(n.options.before){const o=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),a=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const a=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before||t.before){const a=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}i!==r?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),a=t.length;let o=0;const s=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(s);for(;othis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Kit(this.getLineContent(e))+1}};B1._MODEL_SYNC_LIMIT=50*1024*1024;B1.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;B1.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;B1.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;B1.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Ea.tabSize,indentSize:Ea.indentSize,insertSpaces:Ea.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Ea.trimAutoWhitespace,largeFileOptimizations:Ea.largeFileOptimizations,bracketPairColorizationOptions:Ea.bracketPairColorizationOptions};B1=sf=Iit([Hj(4,vP),Hj(5,vn),Hj(6,tn)],B1);function Kit(u){let e=0;for(const t of u)if(t===" "||t===" ")e++;else break;return e}function Vj(u){return!!(u.options.overviewRuler&&u.options.overviewRuler.color)}function $j(u){return!!u.options.after||!!u.options.before}class sse{constructor(){this._decorationsTree0=new Ij,this._decorationsTree1=new Ij,this._injectedTextDecorationsTree=new Ij}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,a){const o=e.getVersionId(),s=this._intervalSearch(t,n,i,r,o,a);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,n,i,r,a){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,a),s=this._decorationsTree1.intervalSearch(e,t,n,i,r,a),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,a);return o.concat(s).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),a=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,a).filter(o=>o.options.showIfCollapsed||!o.range.isEmpty())}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAll(e,t,n,i,r){const a=e.getVersionId(),o=this._search(t,n,i,a,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const a=this._decorationsTree0.search(e,t,i,r),o=this._decorationsTree1.search(e,t,i,r),s=this._injectedTextDecorationsTree.search(e,t,i,r);return a.concat(o).concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){$j(e)?this._injectedTextDecorationsTree.insert(e):Vj(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){$j(e)?this._injectedTextDecorationsTree.delete(e):Vj(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){$j(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Vj(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function nh(u){return u.replace(/[^a-z0-9\-_]/gi," ")}class tbe{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Wit extends tbe{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Js.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Git{constructor(e){var t;this.position=(t=e==null?void 0:e.position)!==null&&t!==void 0?t:rx.Left}}class Uit extends tbe{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?ae.fromHex(e):t.getColor(e.id)}}class Wm{static from(e){return e instanceof Wm?e:new Wm(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Lt{static register(e){return new Lt(e)}static createDynamic(e){return new Lt(e)}constructor(e){var t,n,i,r,a,o;this.description=e.description,this.blockClassName=e.blockClassName?nh(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(n=e.blockIsAfterEnd)!==null&&n!==void 0?n:null,this.blockPadding=(i=e.blockPadding)!==null&&i!==void 0?i:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?nh(e.className):null,this.shouldFillLineOnLineBreak=(r=e.shouldFillLineOnLineBreak)!==null&&r!==void 0?r:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Wit(e.overviewRuler):null,this.minimap=e.minimap?new Uit(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Git(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?nh(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?nh(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?nh(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?nh(e.marginClassName):null,this.inlineClassName=e.inlineClassName?nh(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?nh(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?nh(e.afterContentClassName):null,this.after=e.after?Wm.from(e.after):null,this.before=e.before?Wm.from(e.before):null,this.hideInCommentTokens=(a=e.hideInCommentTokens)!==null&&a!==void 0?a:!1,this.hideInStringTokens=(o=e.hideInStringTokens)!==null&&o!==void 0?o:!1}}Lt.EMPTY=Lt.register({description:"empty"});const lse=[Lt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Lt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Lt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Lt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function cse(u){return u instanceof Lt?u:Lt.createDynamic(u)}class qit extends ne{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new Q),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Jit extends ne{constructor(){super(),this._fastEmitter=this._register(new Q),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new Q),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class Zit{constructor(){this._onDidChangeVisibleRanges=new Q,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Yit(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Yit{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map(i=>new Xt(i.startLineNumber,i.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class UB{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new _r(new j(1,1,1,1),0,0,new ee(1,1),0),new _r(new j(1,1,1,1),0,0,new ee(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new du(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Ye.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Ye.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,i){return t.equals(n)?i:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,i=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),a=e.normalizePosition(n,2),o=this._validatePositionWithCache(e,i,n,a),s=this._validatePositionWithCache(e,r,i,o);return n.equals(a)&&i.equals(o)&&r.equals(s)?t:new _r(j.fromPositions(o,s),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+i.column-o.column,a,t.leftoverVisibleColumns+n.column-a.column)}_setState(e,t,n){if(n&&(n=UB._validateViewState(e.viewModel,n)),t){const i=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,a=e.model.validatePosition(t.position),o=t.position.equals(a)?t.leftoverVisibleColumns:0;t=new _r(i,t.selectionStartKind,r,a,o)}else{if(!n)return;const i=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new _r(i,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){const i=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new _r(i,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{const i=e.coordinatesConverter.convertModelPositionToViewPosition(new ee(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new ee(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),a=new j(i.lineNumber,i.column,r.lineNumber,r.column),o=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new _r(a,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class dse{constructor(e){this.context=e,this.cursors=[new UB(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return PYe(this.cursors,y0(e=>e.viewState.position,ee.compare)).viewState.position}getBottomMostViewPosition(){return NYe(this.cursors,y0(e=>e.viewState.position,ee.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(du.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,n=e.length;if(tn){const i=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let n=0,i=e.length;nn.selection,j.compareRangesUsingStarts));for(let n=0;nd&&g.index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),n--}}}}class hse{constructor(e,t,n,i){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=i}}class Qit{constructor(){this.type=0}}class Xit{constructor(){this.type=1}}class ert{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class trt{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}}class fD{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class h9{constructor(){this.type=5}}class urt{constructor(e){this.type=6,this.isFocused=e}}class nrt{constructor(){this.type=7}}class E9{constructor(){this.type=8}}class ube{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class YW{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class QW{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class XS{constructor(e,t,n,i,r,a,o){this.source=e,this.minimalReveal=t,this.range=n,this.selections=i,this.verticalType=r,this.revealHorizontal=a,this.scrollType=o,this.type=12}}class irt{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class rrt{constructor(e){this.theme=e,this.type=14}}class art{constructor(e){this.type=15,this.ranges=e}}class ort{constructor(){this.type=16}}let srt=class{constructor(){this.type=17}};class lrt extends ne{constructor(){super(),this._onEvent=this._register(new Q),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class crt{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class jX{constructor(e,t,n,i){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new jX(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class HX{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new HX(this.oldHasFocus,e.hasFocus)}}class VX{constructor(e,t,n,i,r,a,o,s){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=i,this.scrollWidth=r,this.scrollLeft=a,this.scrollHeight=o,this.scrollTop=s,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new VX(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class drt{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class hrt{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class qB{constructor(e,t,n,i,r,a,o){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=i,this.source=r,this.reason=a,this.reachedMaxCursorCount=o}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length,i=t.length;if(n!==i)return!1;for(let r=0;r0){const e=this._cursors.getSelections();for(let t=0;ta&&(i=i.slice(0,a),r=!0);const o=s2.from(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,o,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,i,r,a){const o=this._cursors.getViewPositions();let s=null,l=null;o.length>1?l=this._cursors.getViewSelections():s=j.fromPositions(o[0],o[0]),e.emitViewEvent(new XS(t,n,s,l,i,r,a))}saveState(){const e=[],t=this._cursors.getSelections();for(let n=0,i=t.length;n0){const r=du.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,du.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,i){this.setStates(e,t,i,du.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const n=[],i=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,i,r){const a=s2.from(this._model,this);if(a.equals(i))return!1;const o=this._cursors.getSelections(),s=this._cursors.getViewSelections();if(e.emitViewEvent(new trt(s,o,n)),!i||i.cursorState.length!==a.cursorState.length||a.cursorState.some((l,c)=>!l.modelState.equals(i.cursorState[c].modelState))){const l=i?i.cursorState.map(d=>d.modelState.selection):null,c=i?i.modelVersionId:0;e.emitOutgoingEvent(new qB(l,o,c,a.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let n=0,i=e.length;n=0)return null;const a=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!a)return null;const o=a[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!s||s.length!==1)return null;const l=s[0].open,c=r.text.length-a[2].length-1,d=r.text.lastIndexOf(l,c-1);if(d===-1)return null;t.push([d,c])}return t}executeEdits(e,t,n,i){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);const a=[],o=[],s=this._model.pushEditOperations(this.getSelections(),n,l=>{if(r)for(let d=0,h=r.length;d0&&this._pushAutoClosedAction(a,o)}_executeEdit(e,t,n,i=0){if(this.context.cursorConfig.readOnly)return;const r=s2.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(a){zt(a)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,i,r,!1)&&this.revealPrimary(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return Ese.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new l2(this._model,this.getSelections())}endComposition(e,t){const n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Pn.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){const i=t.length;let r=0;for(;r{const l=s.getPosition();return new Ye(l.lineNumber,l.column+r,l.lineNumber,l.column+r)});this.setSelections(e,a,o,0)}return}this._executeEdit(()=>{this._executeEditOperation(Pn.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,i,r))},e,a)}paste(e,t,n,i,r){this._executeEdit(()=>{this._executeEditOperation(Pn.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,i||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(z3.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new vo(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new vo(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}class s2{static from(e,t){return new s2(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}}class Crt{static executeCommands(e,t,n){const i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(i,n);for(let a=0,o=i.trackedRanges.length;a0&&(a[0]._isTracked=!0);let o=e.model.pushEditOperations(e.selectionsBefore,a,l=>{const c=[];for(let E=0;EE.identifier.minor-m.identifier.minor,h=[];for(let E=0;E0?(c[E].sort(d),h[E]=t[E].computeCursorState(e.model,{getInverseEditOperations:()=>c[E],getTrackedSelection:m=>{const g=parseInt(m,10),f=e.model._getTrackedRange(e.trackedRanges[g]);return e.trackedRangesDirection[g]===0?new Ye(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):new Ye(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn)}})):h[E]=e.selectionsBefore[E];return h});o||(o=e.selectionsBefore);const s=[];for(const l in r)r.hasOwnProperty(l)&&s.push(parseInt(l,10));s.sort((l,c)=>c-l);for(const l of s)o.splice(l,1);return o}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{j.isEmpty(d)&&h===""||i.push({identifier:{major:t,minor:r++},range:d,text:h,forceMoveMarkers:E,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let o=!1;const c={addEditOperation:a,addTrackedEditOperation:(d,h,E)=>{o=!0,a(d,h,E)},trackSelection:(d,h)=>{const E=Ye.liftSelection(d);let m;if(E.isEmpty())if(typeof h=="boolean")h?m=2:m=3;else{const p=e.model.getLineMaxColumn(E.startLineNumber);E.startColumn===p?m=2:m=3}else m=1;const g=e.trackedRanges.length,f=e.model._setTrackedRange(null,E,m);return e.trackedRanges[g]=f,e.trackedRangesDirection[g]=E.getDirection(),g.toString()}};try{n.getEditOperations(e.model,c)}catch(d){return zt(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:o}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,i)=>-j.compareRangesUsingEnds(n.range,i.range));const t={};for(let n=1;nr.identifier.major?a=i.identifier.major:a=r.identifier.major,t[a.toString()]=!0;for(let o=0;o0&&n--}}return t}}class brt{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}}class l2{static _capture(e,t){const n=[];for(const i of t){if(i.startLineNumber!==i.endLineNumber)return null;n.push(new brt(e.getLineContent(i.startLineNumber),i.startColumn-1,i.endColumn-1))}return n}constructor(e,t){this._original=l2._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const n=l2._capture(e,t);if(!n||this._original.length!==n.length)return null;const i=[];for(let r=0,a=this._original.length;rev,tokenizeEncoded:(u,e,t)=>oP(0,t)};function Frt(u,e,t){return krt(this,void 0,void 0,function*(){if(!t)return gse(e,u.languageIdCodec,mse);const n=yield qn.getOrCreate(t);return gse(e,u.languageIdCodec,n||mse)})}function yrt(u,e,t,n,i,r,a){let o="
",s=n,l=0,c=!0;for(let d=0,h=e.getCount();d0;)a&&c?(m+=" ",c=!1):(m+=" ",c=!0),f--;break}case 60:m+="<",c=!1;break;case 62:m+=">",c=!1;break;case 38:m+="&",c=!1;break;case 0:m+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",c=!1;break;case 13:m+="​",c=!1;break;case 32:a&&c?(m+=" ",c=!1):(m+=" ",c=!0);break;default:m+=String.fromCharCode(g),c=!1}}if(o+=`${m}`,E>i||s>=i)break}return o+="
",o}function gse(u,e,t){let n='
';const i=F1(u);let r=t.getInitialState();for(let a=0,o=i.length;a0&&(n+="
");const l=t.tokenizeEncoded(s,!0,r);nr.convertToEndOffset(l.tokens,s.length);const d=new nr(l.tokens,s,e).inflate();let h=0;for(let E=0,m=d.getCount();E${pB(s.substring(h,f))}`,h=f}r=l.endState}return n+="
",n}class Art{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}}class _rt{constructor(e,t,n,i,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=r,this.prefixSum=0}}let nbe=class XW{constructor(e,t,n,i){this._instanceId=Ove(++XW.INSTANCE_COUNT),this._pendingChanges=new Art,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=i}static findInsertionIndex(e,t,n){let i=0,r=e.length;for(;i>>1;t===e[a].afterLineNumber?n{t=!0,i=i|0,r=r|0,a=a|0,o=o|0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new _rt(s,i,r,a,o)),s},changeOneWhitespace:(i,r,a)=>{t=!0,r=r|0,a=a|0,this._pendingChanges.change({id:i,newAfterLineNumber:r,newHeight:a})},removeWhitespace:i=>{t=!0,this._pendingChanges.remove({id:i})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const s of e)this._insertWhitespace(s);for(const s of t)this._changeOneWhitespace(s.id,s.newAfterLineNumber,s.newHeight);for(const s of n){const l=this._findWhitespaceIndex(s.id);l!==-1&&this._removeWhitespace(l)}return}const i=new Set;for(const s of n)i.add(s.id);const r=new Map;for(const s of t)r.set(s.id,s);const a=s=>{const l=[];for(const c of s)if(!i.has(c.id)){if(r.has(c.id)){const d=r.get(c.id);c.afterLineNumber=d.newAfterLineNumber,c.height=d.newHeight}l.push(c)}return l},o=a(this._arr).concat(a(e));o.sort((s,l)=>s.afterLineNumber===l.afterLineNumber?s.ordinal-l.ordinal:s.afterLineNumber-l.afterLineNumber),this._arr=o,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=XW.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,i=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+i+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const n=this._lineHeight*e,i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,n=this._lineHeight;let i=1,r=t;for(;i=o+n)i=a+1;else{if(e>=o)return a;r=a}}return i>t?t:i}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this._lineHeight,i=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(i)|0;let a=this._lineCount|0,o=this.getFirstWhitespaceIndexAfterLineNumber(i)|0;const s=this.getWhitespacesCount()|0;let l,c;o===-1?(o=s,c=a+1,l=0):(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);let d=r,h=d;const E=5e5;let m=0;r>=E&&(m=Math.floor(r/E)*E,m=Math.floor(m/n)*n,h-=m);const g=[],f=e+(t-e)/2;let p=-1;for(let k=i;k<=a;k++){if(p===-1){const A=d,F=d+n;(A<=f&&ff)&&(p=k)}for(d+=n,g[k-i]=h,h+=n;c===k;)h+=l,d+=l,o++,o>=s?c=a+1:(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);if(d>=t){a=k;break}}p===-1&&(p=a);const D=this.getVerticalOffsetForLineNumber(a)|0;let x=i,b=a;return xt&&b--,{bigNumbersDelta:m,startLineNumber:i,endLineNumber:a,relativeVerticalOffset:g,centeredLineNumber:p,completelyVisibleStartLineNumber:x,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n;t>=1?n=this._lineHeight*t:n=0;let i;return e>0?i=this.getWhitespacesAccumulatedHeight(e-1):i=0,n+i+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const i=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=i+r)return-1;for(;t=o+s)t=a+1;else{if(e>=o)return a;n=a}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const i=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),a=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:a,verticalOffset:n,height:i}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];const r=[];for(let a=n;a<=i;a++){const o=this.getVerticalOffsetForWhitespaceIndex(a),s=this.getHeightForWhitespaceIndex(a);if(o>=t)break;r.push({id:this.getIdForWhitespaceIndex(a),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(a),verticalOffset:o,height:s})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};nbe.INSTANCE_COUNT=0;const Srt=125;class kb{constructor(e,t,n,i){e=e|0,t=t|0,n=n|0,i=i|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),i<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Brt extends ne{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new Q),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new kb(0,0,0,0),this._scrollable=this._register(new hA({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire(new jX(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class wrt extends ne{constructor(e,t,n){super(),this._configuration=e;const i=this._configuration.options,r=i.get(143),a=i.get(83);this._linesLayout=new nbe(t,i.get(66),a.top,a.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new Brt(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new kb(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?Srt:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const n=t.get(83);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(143)){const n=t.get(143),i=n.contentWidth,r=n.height,a=this._scrollable.getScrollDimensions(),o=a.contentWidth;this._scrollable.setScrollDimensions(new kb(i,a.contentWidth,r,this._getContentHeight(i,r,o)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(102);return i.horizontal===2||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,n){const i=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return i.get(104)?r+=Math.max(0,t-i.get(66)-i.get(83).bottom):r+=this._getHorizontalScrollbarHeight(e,n),r}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.contentWidth;this._scrollable.setScrollDimensions(new kb(t,e.contentWidth,n,this._getContentHeight(t,n,i)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new soe(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new soe(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,n=e.get(144),i=e.get(50),r=e.get(143);if(n.isViewportWrapping){const a=e.get(72);return t>r.contentWidth+i.typicalHalfwidthCharacterWidth&&a.enabled&&a.side==="right"?t+r.verticalScrollbarWidth:t}else{const a=e.get(103)*i.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+a+r.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new kb(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),i=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-i,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}class Lrt{constructor(e,t,n,i,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const i=e.range,r=e.options;let a;if(r.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new ee(i.startLineNumber,1),0,!1,!0),s=this._coordinatesConverter.convertModelPositionToViewPosition(new ee(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)),1);a=new j(o.lineNumber,o.column,s.lineNumber,s.column)}else a=this._coordinatesConverter.convertModelRangeToViewRange(i,1);n=new W6e(a,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){const i=new j(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(i,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){const i=this._linesCollection.getDecorationsInRange(e,this.editorId,cB(this.configuration.options),t,n),r=e.startLineNumber,a=e.endLineNumber,o=[];let s=0;const l=[];for(let c=r;c<=a;c++)l[c-r]=[];for(let c=0,d=i.length;ct===1)}function WX(u,e){return ibe(u,e.range,t=>t===2)}function ibe(u,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const i=u.tokenization.getLineTokens(n),r=n===e.startLineNumber,a=n===e.endLineNumber;let o=r?i.findTokenIndexAtOffset(e.startColumn-1):0;for(;oe.endColumn-1);){if(!t(i.getStandardTokenType(o)))return!1;o++}}return!0}function Kj(u,e){return u===null?e?JB.INSTANCE:ZB.INSTANCE:new zrt(u,e)}class zrt{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();const i=n>0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n];let a;if(this._projectionData.injectionOffsets!==null){const o=this._projectionData.injectionOffsets.map((l,c)=>new Qc(0,0,l+1,this._projectionData.injectionOptions[c],0));a=Qc.applyInjectedText(e.getLineContent(t),o).substring(i,r)}else a=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});return n>0&&(a=fse(this._projectionData.wrappedTextIndentLength)+a),a}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){const i=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],i),i[0]}getViewLinesData(e,t,n,i,r,a,o){this._assertVisible();const s=this._projectionData,l=s.injectionOffsets,c=s.injectionOptions;let d=null;if(l){d=[];let E=0,m=0;for(let g=0;g0?s.breakOffsets[g-1]:0,D=s.breakOffsets[g];for(;mD)break;if(p0?s.wrappedTextIndentLength:0,S=F+Math.max(b-p,0),w=F+Math.min(k-p,D-p);S!==w&&f.push(new PQe(S,w,A.inlineClassName,A.inlineClassNameAffectsLetterSpacing))}}if(k<=D)E+=x,m++;else break}}}let h;l?h=e.tokenization.getLineTokens(t).withInserted(l.map((E,m)=>({offset:E,text:c[m].content,tokenMetadata:nr.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let E=n;E0?i.wrappedTextIndentLength:0,a=n>0?i.breakOffsets[n-1]:0,o=i.breakOffsets[n],s=e.sliceAndInflate(a,o,r);let l=s.getLineContent();n>0&&(l=fse(i.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(n)+1,d=l.length+1,h=n+1=Wj.length)for(let e=1;e<=u;e++)Wj[e]=Mrt(e);return Wj[u]}function Mrt(u){return new Array(u+1).join(" ")}class Trt{constructor(e,t,n,i,r,a,o,s,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=r,this.tabSize=a,this.wrappingStrategy=o,this.wrappingColumn=s,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Prt(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),i=this.model.getInjectedTextDecorations(this._editorId),r=n.length,a=this.createLineBreaksComputer(),o=new s4(Qc.fromDecorations(i));for(let g=0;gp.lineNumber===g+1);a.addRequest(n[g],f,t?t[g]:null)}const s=a.finalize(),l=[],c=this.hiddenAreasDecorationIds.map(g=>this.model.getDecorationRange(g)).sort(j.compareRangesUsingStarts);let d=1,h=0,E=-1,m=E+1=d&&f<=h,D=Kj(s[g],!p);l[g]=D.getViewLineCount(),this.modelLineProjections[g]=D}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new gYe(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(h=>this.model.validateRange(h)),n=Nrt(t),i=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(j.compareRangesUsingStarts);if(n.length===i.length){let h=!1;for(let E=0;E({range:h,options:Lt.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);const a=n;let o=1,s=0,l=-1,c=l+1=o&&E<=s?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),m=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),m=!0)),m){const g=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,g)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,i,r){const a=this.fontInfo.equals(e),o=this.wrappingStrategy===t,s=this.wrappingColumn===n,l=this.wrappingIndent===i,c=this.wordBreak===r;if(a&&o&&s&&l&&c)return!1;const d=a&&o&&!s&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i,this.wordBreak=r;let h=null;if(d){h=[];for(let E=0,m=this.modelLineProjections.length;E2&&!this.modelLineProjections[t-2].isVisible(),a=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let o=0;const s=[],l=[];for(let c=0,d=i.length;cs?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=c+s-1,m=d+1,g=m+(r-s)-1,l=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),a=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),o=this.model.guides.getActiveIndentGuide(i.lineNumber,r.lineNumber,a.lineNumber),s=this.convertModelPositionToViewPosition(o.startLineNumber,1),l=this.convertModelPositionToViewPosition(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber));return{startLineNumber:s.lineNumber,endLineNumber:l.lineNumber,indent:o.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,i=t.remainder;return new pse(n+1,i)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ee(e.modelLineNumber,i)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ee(e.modelLineNumber,i)}getViewLineInfosGroupedByModelRanges(e,t){const n=this.getViewLineInfo(e),i=this.getViewLineInfo(t),r=new Array;let a=this.getModelStartPositionOfViewLine(n),o=new Array;for(let s=n.modelLineNumber;s<=i.modelLineNumber;s++){const l=this.modelLineProjections[s-1];if(l.isVisible()){const c=s===n.modelLineNumber?n.modelLineWrappedLineIdx:0,d=s===i.modelLineNumber?i.modelLineWrappedLineIdx+1:l.getViewLineCount();for(let h=c;h{if(E.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.forWrappedLinesAfterColumn).lineNumber>=c.modelLineWrappedLineIdx||E.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.forWrappedLinesBeforeOrAtColumn).lineNumberc.modelLineWrappedLineIdx)return}const g=this.convertModelPositionToViewPosition(c.modelLineNumber,E.horizontalLine.endColumn),f=this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.horizontalLine.endColumn);return f.lineNumber===c.modelLineWrappedLineIdx?new Vf(E.visibleColumn,m,E.className,new t2(E.horizontalLine.top,g.column),-1,-1):f.lineNumber!!E))}}return a}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let r=[];const a=[],o=[],s=n.lineNumber-1,l=i.lineNumber-1;let c=null;for(let m=s;m<=l;m++){const g=this.modelLineProjections[m];if(g.isVisible()){const f=g.getViewLineNumberOfModelPosition(0,m===s?n.column:1),p=g.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(m+1)),D=p-f+1;let x=0;D>1&&g.getViewLineMinColumn(this.model,m+1,p)===1&&(x=f===0?1:2),a.push(D),o.push(x),c===null&&(c=new ee(m+1,0))}else c!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,m)),c=null)}c!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let E=0;for(let m=0,g=r.length;mt&&(m=!0,E=t-r+1),d.getViewLinesData(this.model,l+1,h,E,r-e,n,s),r+=E,m)break}return s}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);const i=this.projectedModelLineLineCounts.getIndexOf(e-1),r=i.index,a=i.remainder,o=this.modelLineProjections[r],s=o.getViewLineMinColumn(this.model,r+1,a),l=o.getViewLineMaxColumn(this.model,r+1,a);tl&&(t=l);const c=o.getModelColumnOfViewPosition(a,t);return this.model.validatePosition(new ee(r+1,c)).equals(n)?new ee(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new j(n.lineNumber,n.column,i.lineNumber,i.column)}convertViewPositionToModelPosition(e,t){const n=this.getViewLineInfo(e),i=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ee(n.modelLineNumber,i))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new j(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,i=!1,r=!1){const a=this.model.validatePosition(new ee(e,t)),o=a.lineNumber,s=a.column;let l=o-1,c=!1;if(r)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,c=!0;if(l===0&&!this.modelLineProjections[l].isVisible())return new ee(i?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return c?r?h=this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,n):h=this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),n):h=this.modelLineProjections[o-1].getViewPositionOfModelPosition(d,s,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return j.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new j(n.lineNumber,n.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){const r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const i=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,i,r){const a=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-a.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new j(a.lineNumber,1,o.lineNumber,o.column),t,n,i,r);let s=[];const l=a.lineNumber-1,c=o.lineNumber-1;let d=null;for(let g=l;g<=c;g++)if(this.modelLineProjections[g].isVisible())d===null&&(d=new ee(g+1,g===l?a.column:1));else if(d!==null){const p=this.model.getLineMaxColumn(g);s=s.concat(this.model.getDecorationsInRange(new j(d.lineNumber,d.column,g,p),t,n,i)),d=null}d!==null&&(s=s.concat(this.model.getDecorationsInRange(new j(d.lineNumber,d.column,o.lineNumber,o.column),t,n,i)),d=null),s.sort((g,f)=>{const p=j.compareRangesUsingStarts(g.range,f.range);return p===0?g.idf.id?1:0:p});const h=[];let E=0,m=null;for(const g of s){const f=g.id;m!==f&&(m=f,h[E++]=g)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function Nrt(u){if(u.length===0)return[];const e=u.slice();e.sort(j.compareRangesUsingStarts);const t=[];let n=e[0].startLineNumber,i=e[0].endLineNumber;for(let r=1,a=e.length;ri+1?(t.push(new j(n,1,i,1)),n=o.startLineNumber,i=o.endLineNumber):o.endLineNumber>i&&(i=o.endLineNumber)}return t.push(new j(n,1,i,1)),t}class pse{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Dse{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Prt{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,i){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,i)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Rrt{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Irt(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,i){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,n,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new YW(t,n)}onModelLinesInserted(e,t,n,i){return new QW(t,n)}onModelLineChanged(e,t,n){return[!1,new ube(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const n=t-e+1,i=new Array(n);for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}let Ort=class extends ne{constructor(e,t,n,i,r,a,o,s,l){if(super(),this.languageConfigurationService=o,this._themeService=s,this._attachedView=l,this.hiddenAreasModel=new Hrt,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new lrt,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Hu(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=GX.create(this.model),this.model.isTooLargeForTokenization())this._lines=new Rrt(this.model);else{const c=this._configuration.options,d=c.get(50),h=c.get(137),E=c.get(144),m=c.get(136),g=c.get(128);this._lines=new Trt(this._editorId,this.model,i,r,d,this.model.getOptions().tabSize,h,E.wrappingColumn,m,g)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new vrt(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new wrt(this._configuration,this.getLineCount(),a)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._handleVisibleLinesChanged(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new irt(c)),this._eventDispatcher.emitOutgoingEvent(new VX(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new Lrt(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const d=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(d,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(pA.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new ort)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new rrt(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new j(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new urt(e)),this._eventDispatcher.emitOutgoingEvent(new HX(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Qit)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Xit)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new ee(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new vse(t,this._viewportStart.startLineDelta)}return new vse(null,0)}_onConfigurationChanged(e,t){const n=this._captureStableViewport(),i=this._configuration.options,r=i.get(50),a=i.get(137),o=i.get(144),s=i.get(136),l=i.get(128);this._lines.setWrappingSettings(r,a,o.wrappingColumn,s,l)&&(e.emitViewEvent(new h9),e.emitViewEvent(new E9),e.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new fD(null))),e.emitViewEvent(new ert(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),hD.shouldRecreate(t)&&(this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let i=!1,r=!1;const a=e instanceof o3?e.rawContentChangedEvent.changes:e.changes,o=e instanceof o3?e.rawContentChangedEvent.versionId:null,s=this._lines.createLineBreaksComputer();for(const d of a)switch(d.changeType){case 4:{for(let h=0;h!g.ownerId||g.ownerId===this._editorId)),s.addRequest(E,m,null)}break}case 2:{let h=null;d.injectedText&&(h=d.injectedText.filter(E=>!E.ownerId||E.ownerId===this._editorId)),s.addRequest(d.detail,h,null);break}}const l=s.finalize(),c=new s4(l);for(const d of a)switch(d.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new h9),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break}case 3:{const h=this._lines.onModelLinesDeleted(o,d.fromLineNumber,d.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),i=!0;break}case 4:{const h=c.takeCount(d.detail.length),E=this._lines.onModelLinesInserted(o,d.fromLineNumber,d.toLineNumber,h);E!==null&&(n.emitViewEvent(E),this.viewLayout.onLinesInserted(E.fromLineNumber,E.toLineNumber)),i=!0;break}case 2:{const h=c.dequeue(),[E,m,g,f]=this._lines.onModelLineChanged(o,d.lineNumber,h);r=E,m&&n.emitViewEvent(m),g&&(n.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),f&&(n.emitViewEvent(f),this.viewLayout.onLinesDeleted(f.fromLineNumber,f.toLineNumber));break}case 5:break}o!==null&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&r&&(n.emitViewEvent(new E9),n.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){const i=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStart.startLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();e instanceof o3&&n.emitOutgoingEvent(new prt(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let n=0,i=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new nrt),this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new frt(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new grt(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new h9),t.emitViewEvent(new E9),t.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Drt(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new fD(e)),this._eventDispatcher.emitOutgoingEvent(new mrt(e))}))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const i=this._captureStableViewport();let r=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new h9),a.emitViewEvent(new E9),a.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new hrt)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),n=Math.max(20,Math.round(e.height/t)),i=this.viewLayout.getLinesViewportData(),r=Math.max(1,i.completelyVisibleStartLineNumber-n),a=Math.min(this.getLineCount(),i.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new j(r,this.getLineMinColumn(r),a,this.getLineMaxColumn(a)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];const i=[];let r=0,a=t.startLineNumber,o=t.startColumn;const s=t.endLineNumber,l=t.endColumn;for(let c=0,d=n.length;cs||(a"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),i=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:i}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,i){return this._lines.getViewLinesBracketGuides(e,t,n,i)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Ta(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Hc(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const i=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,i)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const n=this.model.mightContainRTL(),i=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),a=this._lines.getViewLineData(e);return a.inlineDecorations&&(t=[...t,...a.inlineDecorations.map(o=>o.toInlineDecoration(e))]),new Zs(a.minColumn,a.maxColumn,a.content,a.continuesWithWrappedLine,n,i,a.tokens,t,r,a.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){const i=this._lines.getViewLinesData(e,t,n);return new NQe(this.getTabSize(),i)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,cB(this._configuration.options)),n=new jrt;for(const i of t){const r=i.options,a=r.overviewRuler;if(!a)continue;const o=a.position;if(o===0)continue;const s=a.getColor(e.value),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(i.range.startLineNumber,i.range.startColumn),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(i.range.endLineNumber,i.range.endColumn);n.accept(s,r.zIndex,l,c,o)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const n=t.options.overviewRuler;n==null||n.invalidateCachedColor();const i=t.options.minimap;i==null||i.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(n,t)}deduceModelPositionRelativeToViewPosition(e,t,n){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);const a=this.model.getOffsetAt(i)+t;return this.model.getPositionAt(a)}getPlainTextToCopy(e,t,n){const i=n?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(j.compareRangesUsingStarts);let r=!1,a=!1;for(const s of e)s.isEmpty()?r=!0:a=!0;if(!a){if(!t)return"";const s=e.map(c=>c.startLineNumber);let l="";for(let c=0;c0&&s[c-1]===s[c]||(l+=this.model.getLineContent(s[c])+i);return l}if(r&&t){const s=[];let l=0;for(const c of e){const d=c.startLineNumber;c.isEmpty()?d!==l&&s.push(this.model.getLineContent(d)):s.push(this.model.getValueInRange(c,n?2:0)),l=d}return s.length===1?s[0]:s}const o=[];for(const s of e)s.isEmpty()||o.push(this.model.getValueInRange(s,n?2:0));return o.length===1?o[0]:o}getRichTextToCopy(e,t){const n=this.model.getLanguageId();if(n===Ks||e.length!==1)return null;let i=e[0];if(i.isEmpty()){if(!t)return null;const c=i.startLineNumber;i=new j(c,this.model.getLineMinColumn(c),c,this.model.getLineMaxColumn(c))}const r=this._configuration.options.get(50),a=this._getColorMap(),s=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===os.fontFamily;let l;return s?l=os.fontFamily:(l=r.fontFamily,l=l.replace(/"/g,"'"),/[,']/.test(l)||/[+ ]/.test(l)&&(l=`'${l}'`),l=`${l}, ${os.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(i,a)+"
"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,a=e.endColumn,o=this.getTabSize();let s="";for(let l=n;l<=r;l++){const c=this.model.tokenization.getLineTokens(l),d=c.getLineContent(),h=l===n?i-1:0,E=l===r?a-1:d.length;d===""?s+="
":s+=yrt(d,c.inflate(),t,h,E,o,na)}return s}_getColorMap(){const e=qn.getColorMap(),t=["#000000"];if(e)for(let n=1,i=e.length;nthis._cursor.setStates(i,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(i=>this._cursor.setSelections(i,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Ert);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(i=>this._cursor.executeEdits(i,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,i,r){this._executeCursorEdit(a=>this._cursor.compositionType(a,e,t,n,i,r))}paste(e,t,n,i){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,i))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,n,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new j(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(i=>i.emitViewEvent(new XS(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new j(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(i=>i.emitViewEvent(new XS(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,i,r){this._withViewEventsCollector(a=>a.emitViewEvent(new XS(e,!1,n,null,i,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new srt),this._eventDispatcher.emitOutgoingEvent(new drt))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class GX{static create(e){const t=e._setTrackedRange(null,new j(1,1,1,1),1);return new GX(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,i,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=i,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const n=e.coordinatesConverter.convertViewPositionToModelPosition(new ee(t,e.getLineMinColumn(t))),i=e.model._setTrackedRange(this._modelTrackedRange,new j(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),a=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=i,this._startLineDelta=a-r}invalidate(){this._isValid=!1}}class jrt{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,i,r){const a=this._asMap[e];if(a){const o=a.data,s=o[o.length-3],l=o[o.length-1];if(s===r&&l+1>=n){i>l&&(o[o.length-1]=i);return}o.push(r,n,i)}else{const o=new xk(e,t,[r,n,i]);this._asMap[e]=o,this.asArray.push(o)}}}class Hrt{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const n=this.hiddenAreas.get(e);n&&xse(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>Vrt(t,n),[]);return xse(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function Vrt(u,e){const t=[];let n=0,i=0;for(;n0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)i0?this.breakOffsets[r-1]:0,t===0)if(e<=a)i=r-1;else if(e>s)n=r+1;else break;else if(e=s)n=r+1;else break}let o=e-a;return r>0&&(o+=this.wrappedTextIndentLength),new m9(r,o)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){const i=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(i,n);if(r!==i)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new m9(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const i=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&Cse(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let i=n.offsetInInputWithInjections;if(bse(this.injectionOptions[n.injectedTextIndex].cursorStops))return i;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(Cse(this.injectionOptions[r].cursorStops)||(i-=this.injectionOptions[r].content.length,bse(this.injectionOptions[r].cursorStops)));)r--;return i}}else if(t===1||t===4){let i=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)i-=this.injectionOptions[r-1].content.length,r--;return i}UN()}getInjectedText(e,t){const n=this.outputPositionToOffsetInInputWithInjections(e,t),i=this.getInjectedTextAtOffset(n);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let i=0;for(let r=0;re)break;if(e<=s)return{injectedTextIndex:r,offsetInInputWithInjections:o,length:a};i+=a}}}}function Cse(u){return u==null?!0:u===zc.Right||u===zc.Both}function bse(u){return u==null?!0:u===zc.Left||u===zc.Both}class m9{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ee(e+this.outputLineIndex,this.outputOffset+1)}}class UX{static create(e){return new UX(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Krt(e,t)}createLineBreaksComputer(e,t,n,i,r){const a=[],o=[],s=[];return{addRequest:(l,c,d)=>{a.push(l),o.push(c),s.push(d)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let d=0,h=a.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let eG=[],tG=[];function Wrt(u,e,t,n,i,r,a,o){if(i===-1)return null;const s=t.length;if(s<=1)return null;const l=o==="keepAll",c=e.breakOffsets,d=e.breakOffsetsVisibleColumn,h=rbe(t,n,i,r,a),E=i-h,m=eG,g=tG;let f=0,p=0,D=0,x=i;const b=c.length;let k=0;if(k>=0){let A=Math.abs(d[k]-x);for(;k+1=A)break;A=F,k++}}for(;kA&&(A=p,F=D);let S=0,w=0,z=0,N=0;if(F<=x){let y=F,_=A===0?0:t.charCodeAt(A-1),L=A===0?0:u.get(_),T=!0;for(let R=A;Rp&&uG(_,L,H,V,l)&&(S=I,w=y),y+=U,y>x){I>p?(z=I,N=y-U):(z=R+1,N=y),y-w>E&&(S=0),T=!1;break}_=H,L=V}if(T){f>0&&(m[f]=c[c.length-1],g[f]=d[c.length-1],f++);break}}if(S===0){let y=F,_=t.charCodeAt(A),L=u.get(_),T=!1;for(let R=A-1;R>=p;R--){const I=R+1,H=t.charCodeAt(R);if(H===9){T=!0;break}let V,U;if(_3(H)?(R--,V=0,U=2):(V=u.get(H),U=Tm(H)?r:1),y<=x){if(z===0&&(z=I,N=y),y<=x-E)break;if(uG(H,V,_,L,l)){S=I,w=y;break}}y-=U,_=H,L=V}if(S!==0){const R=E-(N-w);if(R<=n){const I=t.charCodeAt(z);let H;ur(I)?H=2:H=d2(I,N,n,r),R-H<0&&(S=0)}}if(T){k--;continue}}if(S===0&&(S=z,w=N),S<=p){const y=t.charCodeAt(p);ur(y)?(S=p+2,w=D+2):(S=p+1,w=D+d2(y,D,n,r))}for(p=S,m[f]=S,D=w,g[f]=w,f++,x=w+E;k<0||k=O)break;O=y,k++}}return f===0?null:(m.length=f,g.length=f,eG=e.breakOffsets,tG=e.breakOffsetsVisibleColumn,e.breakOffsets=m,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=h,e)}function Grt(u,e,t,n,i,r,a,o){const s=Qc.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(w=>w.options),c=t.map(w=>w.column-1)):(l=null,c=null),i===-1)return l?new c2(c,l,[s.length],[],0):null;const d=s.length;if(d<=1)return l?new c2(c,l,[s.length],[],0):null;const h=o==="keepAll",E=rbe(s,n,i,r,a),m=i-E,g=[],f=[];let p=0,D=0,x=0,b=i,k=s.charCodeAt(0),A=u.get(k),F=d2(k,0,n,r),S=1;ur(k)&&(F+=1,k=s.charCodeAt(1),A=u.get(k),S++);for(let w=S;wb&&((D===0||F-x>m)&&(D=z,x=F-y),g[p]=D,f[p]=x,p++,b=x+m,D=0),k=N,A=O}return p===0&&(!t||t.length===0)?null:(g[p]=d,f[p]=F,new c2(c,l,g,f,E))}function d2(u,e,t,n){return u===9?t-e%t:Tm(u)||u<32?n:1}function kse(u,e){return e-u%e}function uG(u,e,t,n,i){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!i&&e===3&&n!==2||!i&&n===3&&e!==1)}function rbe(u,e,t,n,i){let r=0;if(i!==0){const a=Ta(u);if(a!==-1){for(let s=0;st&&(r=0)}}return r}const Gj=b4("domLineBreaksComputer",{createHTML:u=>u});class qX{static create(){return new qX}constructor(){}createLineBreaksComputer(e,t,n,i,r){const a=[],o=[];return{addRequest:(s,l,c)=>{a.push(s),o.push(l)},finalize:()=>Urt(a,e,t,n,i,r,o)}}}function Urt(u,e,t,n,i,r,a){var o;function s(w){const z=a[w];if(z){const N=Qc.applyInjectedText(u[w],z),O=z.map(_=>_.options),y=z.map(_=>_.column-1);return new c2(y,O,[N.length],[],0)}else return null}if(n===-1){const w=[];for(let z=0,N=u.length;zl?(N=0,O=0):y=l-T}const _=z.substr(N),L=qrt(_,O,t,y,m,h);g[w]=N,f[w]=O,p[w]=_,D[w]=L[0],x[w]=L[1]}const b=m.build(),k=(o=Gj==null?void 0:Gj.createHTML(b))!==null&&o!==void 0?o:b;E.innerHTML=k,E.style.position="absolute",E.style.top="10000",r==="keepAll"?(E.style.wordBreak="keep-all",E.style.overflowWrap="anywhere"):(E.style.wordBreak="inherit",E.style.overflowWrap="break-word"),document.body.appendChild(E);const A=document.createRange(),F=Array.prototype.slice.call(E.children,0),S=[];for(let w=0;wH.options),R=I.map(H=>H.column-1)):(T=null,R=null),S[w]=new c2(R,T,N,L,y)}return document.body.removeChild(E),S}function qrt(u,e,t,n,i,r){if(r!==0){const h=String(r);i.appendString('
');const a=u.length;let o=e,s=0;const l=[],c=[];let d=0");for(let h=0;h"),l[h]=s,c[h]=o;const E=d;d=h+1"),l[u.length]=s,c[u.length]=o,i.appendString("
"),[l,c]}function Jrt(u,e,t,n){if(t.length<=1)return null;const i=Array.prototype.slice.call(e.children,0),r=[];try{nG(u,i,n,0,null,t.length-1,null,r)}catch(a){return console.log(a),null}return r.length===0?null:(r.push(t.length),r)}function nG(u,e,t,n,i,r,a,o){if(n===r||(i=i||Uj(u,e,t[n],t[n+1]),a=a||Uj(u,e,t[r],t[r+1]),Math.abs(i[0].top-a[0].top)<=.1))return;if(n+1===r){o.push(r);return}const s=n+(r-n)/2|0,l=Uj(u,e,t[s],t[s+1]);nG(u,e,t,n,i,s,l,o),nG(u,e,t,s,l,r,a,o)}function Uj(u,e,t,n){return u.setStart(e[t/16384|0].firstChild,t%16384),u.setEnd(e[n/16384|0].firstChild,n%16384),u.getClientRects()}class Zrt extends ne{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new NQ),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(const i of t){if(this._pending.has(i.id)){zt(new Error(`Cannot have two contributions with the same id ${i.id}`));continue}this._pending.set(i.id,i)}this._instantiateSome(0),this._register(Ph(()=>{this._instantiateSome(1)})),this._register(Ph(()=>{this._instantiateSome(2)})),this._register(Ph(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(const[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register(Ph(()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){zt(n)}}}}var Yrt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ih=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Qrt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},lf;let Xrt=0,eat=class{constructor(e,t,n,i,r,a){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=i,this.listenersToRemove=r,this.attachedView=a}dispose(){Su(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},lv=lf=class extends ne{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,n,i,r,a,o,s,l,c,d,h){var E;super(),this.languageConfigurationService=d,this._deliveryQueue=HUe(),this._contributions=this._register(new Zrt),this._onDidDispose=this._register(new Q),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Fse({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Fse({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),r.willCreateCodeEditor();const m=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=m.overflowWidgetsDomNode,delete m.overflowWidgetsDomNode,this._id=++Xrt,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,m,c)),this._register(this._configuration.onDidChange(p=>{this._onDidChangeConfiguration.fire(p);const D=this._configuration.options;if(p.hasChanged(143)){const x=D.get(143);this._onDidLayoutChange.fire(x)}})),this._contextKeyService=this._register(o.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=r,this._commandService=a,this._themeService=s,this._register(new tat(this,this._contextKeyService)),this._register(new uat(this,this._contextKeyService,h)),this._instantiationService=i.createChild(new CP([pt,this._contextKeyService])),this._modelData=null,this._focusTracker=new nat(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let g;Array.isArray(n.contributions)?g=n.contributions:g=ux.getEditorContributions(),this._contributions.initialize(this,g,this._instantiationService);for(const p of ux.getEditorActions()){if(this._actions.has(p.id)){zt(new Error(`Cannot have two actions with the same id ${p.id}`));continue}const D=new TCe(p.id,p.label,p.alias,(E=p.precondition)!==null&&E!==void 0?E:void 0,()=>this._instantiationService.invokeFunction(x=>Promise.resolve(p.runEditorCommand(x,this,null))),this._contextKeyService);this._actions.set(D.id,D)}const f=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new aZe(this._domElement,{onDragEnter:()=>{},onDragOver:p=>{if(!f())return;const D=this.getTargetAtClientPoint(p.clientX,p.clientY);D!=null&&D.position&&this.showDropIndicatorAt(D.position)},onDrop:p=>Qrt(this,void 0,void 0,function*(){if(!f()||(this.removeDropIndicator(),!p.dataTransfer))return;const D=this.getTargetAtClientPoint(p.clientX,p.clientY);D!=null&&D.position&&this._onDropIntoEditor.fire({position:D.position,event:p})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n){return new LW(e,t,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return oA.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?vu.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===` +`)){d=!1;break}}if(d){const h=new j(l,1,l,c);t.push(new Cj(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,i)}_applyUndo(e,t,n,i){const r=e.map(a=>{const o=this.getPositionAt(a.newPosition),s=this.getPositionAt(a.newEnd);return{range:new j(o.lineNumber,o.column,s.lineNumber,s.column),text:a.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,i)}_applyRedo(e,t,n,i){const r=e.map(a=>{const o=this.getPositionAt(a.oldPosition),s=this.getPositionAt(a.oldEnd);return{range:new j(o.lineNumber,o.column,s.lineNumber,s.column),text:a.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,i)}_applyUndoRedoEdits(e,t,n,i,r,a){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=i,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(a),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),r=this._buffer.getLineCount(),a=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,a.length!==0){for(let l=0,c=a.length;l=0;w--){const z=E+w,N=x+w;S.takeFromEndWhile(y=>y.lineNumber>N);const O=S.takeFromEndWhile(y=>y.lineNumber===N);o.push(new ase(z,this.getLineContent(N),O))}if(pR.lineNumberR.lineNumber===T)}o.push(new Pit(z+1,E+f,_,y))}s+=D}this._emitContentChangedEvent(new gx(o,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:a,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return i.reverseEdits===null?void 0:i.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const n=Array.from(e).map(i=>new ase(i,this.getLineContent(i),this._getInjectedTextInLine(i)));this._onDidChangeInjectedText.fire(new XCe(n))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(r,a)=>this._deltaDecorationsImpl(e,[],[{range:r,options:a}])[0],changeDecoration:(r,a)=>{this._changeDecorationImpl(r,a)},changeDecorationOptions:(r,a)=>{this._changeDecorationOptionsImpl(r,cse(a))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,a)=>r.length===0&&a.length===0?[]:this._deltaDecorationsImpl(e,r,a)};let i=null;try{i=t(n)}catch(r){zt(r)}return n.addDecoration=gC,n.changeDecoration=gC,n.changeDecorationOptions=gC,n.removeDecoration=gC,n.deltaDecorations=gC,i}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),zt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const i=e?this._decorations[e]:null;if(!i)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:lse[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(i),delete this._decorations[i.id],null;const r=this._validateRangeRelaxedNoAllocations(t),a=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),o=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(i),i.reset(this.getVersionId(),a,o,r),i.setOptions(lse[n]),this._decorationsTree.insert(i),i.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,i=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}getLinesDecorations(e,t,n=0,i=!1,r=!1){const a=this.getLineCount(),o=Math.min(a,Math.max(1,e)),s=Math.min(a,Math.max(1,t)),l=this.getLineMaxColumn(s),c=new j(o,1,s,l),d=this._getDecorationsInRange(c,n,i,r);return sK(d,this._decorationProvider.getDecorationsInRange(c,n,i)),d}getDecorationsInRange(e,t=0,n=!1,i=!1,r=!1){const a=this.validateRange(e),o=this._getDecorationsInRange(a,t,n,r);return sK(o,this._decorationProvider.getDecorationsInRange(a,t,n,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),i=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return Qc.fromDecorations(i).filter(r=>r.lineNumber===e)}getAllDecorations(e=0,t=!1){let n=this._decorationsTree.getAll(this,e,t,!1,!1);return n=n.concat(this._decorationProvider.getAllDecorations(e,t)),n}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,n,i){const r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),a=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,r,a,t,n,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const n=this._decorations[e];if(!n)return;if(n.options.after){const o=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(n.options.before){const o=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}const i=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),a=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,a,i),this._decorationsTree.insert(n),this._onDidChangeDecorations.checkAffectedAndFire(n.options),n.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.endLineNumber),n.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(i.startLineNumber)}_changeDecorationOptionsImpl(e,t){const n=this._decorations[e];if(!n)return;const i=!!(n.options.overviewRuler&&n.options.overviewRuler.color),r=!!(t.overviewRuler&&t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(n.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n.options.after||t.after){const a=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(n.options.before||t.before){const a=this._decorationsTree.getNodeRange(this,n);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.startLineNumber)}i!==r?(this._decorationsTree.delete(n),n.setOptions(t),this._decorationsTree.insert(n)):n.setOptions(t)}_deltaDecorationsImpl(e,t,n,i=!1){const r=this.getVersionId(),a=t.length;let o=0;const s=n.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(s);for(;othis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return Kit(this.getLineContent(e))+1}};B1._MODEL_SYNC_LIMIT=50*1024*1024;B1.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;B1.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;B1.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024;B1.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Ea.tabSize,indentSize:Ea.indentSize,insertSpaces:Ea.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Ea.trimAutoWhitespace,largeFileOptimizations:Ea.largeFileOptimizations,bracketPairColorizationOptions:Ea.bracketPairColorizationOptions};B1=sf=Iit([Hj(4,vP),Hj(5,vn),Hj(6,tn)],B1);function Kit(u){let e=0;for(const t of u)if(t===" "||t===" ")e++;else break;return e}function Vj(u){return!!(u.options.overviewRuler&&u.options.overviewRuler.color)}function $j(u){return!!u.options.after||!!u.options.before}class sse{constructor(){this._decorationsTree0=new Ij,this._decorationsTree1=new Ij,this._injectedTextDecorationsTree=new Ij}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,i,r,a){const o=e.getVersionId(),s=this._intervalSearch(t,n,i,r,o,a);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,n,i,r,a){const o=this._decorationsTree0.intervalSearch(e,t,n,i,r,a),s=this._decorationsTree1.intervalSearch(e,t,n,i,r,a),l=this._injectedTextDecorationsTree.intervalSearch(e,t,n,i,r,a);return o.concat(s).concat(l)}getInjectedTextInInterval(e,t,n,i){const r=e.getVersionId(),a=this._injectedTextDecorationsTree.intervalSearch(t,n,i,!1,r,!1);return this._ensureNodesHaveRanges(e,a).filter(o=>o.options.showIfCollapsed||!o.range.isEmpty())}getAllInjectedText(e,t){const n=e.getVersionId(),i=this._injectedTextDecorationsTree.search(t,!1,n,!1);return this._ensureNodesHaveRanges(e,i).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAll(e,t,n,i,r){const a=e.getVersionId(),o=this._search(t,n,i,a,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,n,i,r){if(n)return this._decorationsTree1.search(e,t,i,r);{const a=this._decorationsTree0.search(e,t,i,r),o=this._decorationsTree1.search(e,t,i,r),s=this._injectedTextDecorationsTree.search(e,t,i,r);return a.concat(o).concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),i=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){$j(e)?this._injectedTextDecorationsTree.insert(e):Vj(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){$j(e)?this._injectedTextDecorationsTree.delete(e):Vj(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){$j(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Vj(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,i){this._decorationsTree0.acceptReplace(e,t,n,i),this._decorationsTree1.acceptReplace(e,t,n,i),this._injectedTextDecorationsTree.acceptReplace(e,t,n,i)}}function nh(u){return u.replace(/[^a-z0-9\-_]/gi," ")}class tbe{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class Wit extends tbe{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Zs.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class Git{constructor(e){var t;this.position=(t=e==null?void 0:e.position)!==null&&t!==void 0?t:rx.Left}}class Uit extends tbe{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?ae.fromHex(e):t.getColor(e.id)}}class Wm{static from(e){return e instanceof Wm?e:new Wm(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Lt{static register(e){return new Lt(e)}static createDynamic(e){return new Lt(e)}constructor(e){var t,n,i,r,a,o;this.description=e.description,this.blockClassName=e.blockClassName?nh(e.blockClassName):null,this.blockDoesNotCollapse=(t=e.blockDoesNotCollapse)!==null&&t!==void 0?t:null,this.blockIsAfterEnd=(n=e.blockIsAfterEnd)!==null&&n!==void 0?n:null,this.blockPadding=(i=e.blockPadding)!==null&&i!==void 0?i:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?nh(e.className):null,this.shouldFillLineOnLineBreak=(r=e.shouldFillLineOnLineBreak)!==null&&r!==void 0?r:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new Wit(e.overviewRuler):null,this.minimap=e.minimap?new Uit(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Git(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?nh(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?nh(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?nh(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?nh(e.marginClassName):null,this.inlineClassName=e.inlineClassName?nh(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?nh(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?nh(e.afterContentClassName):null,this.after=e.after?Wm.from(e.after):null,this.before=e.before?Wm.from(e.before):null,this.hideInCommentTokens=(a=e.hideInCommentTokens)!==null&&a!==void 0?a:!1,this.hideInStringTokens=(o=e.hideInStringTokens)!==null&&o!==void 0?o:!1}}Lt.EMPTY=Lt.register({description:"empty"});const lse=[Lt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Lt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Lt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Lt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function cse(u){return u instanceof Lt?u:Lt.createDynamic(u)}class qit extends ne{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new Q),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)===null||e===void 0||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!!(e.minimap&&e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(e.overviewRuler&&e.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Jit extends ne{constructor(){super(),this._fastEmitter=this._register(new Q),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new Q),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}class Zit{constructor(){this._onDidChangeVisibleRanges=new Q,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Yit(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Yit{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const n=e.map(i=>new Xt(i.startLineNumber,i.endLineNumber+1));this.handleStateChange({visibleLineRanges:n,stabilized:t})}}class UB{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new _r(new j(1,1,1,1),0,0,new ee(1,1),0),new _r(new j(1,1,1,1),0,0,new ee(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new du(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?Ye.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):Ye.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,i){return t.equals(n)?i:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,i=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),a=e.normalizePosition(n,2),o=this._validatePositionWithCache(e,i,n,a),s=this._validatePositionWithCache(e,r,i,o);return n.equals(a)&&i.equals(o)&&r.equals(s)?t:new _r(j.fromPositions(o,s),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+i.column-o.column,a,t.leftoverVisibleColumns+n.column-a.column)}_setState(e,t,n){if(n&&(n=UB._validateViewState(e.viewModel,n)),t){const i=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,a=e.model.validatePosition(t.position),o=t.position.equals(a)?t.leftoverVisibleColumns:0;t=new _r(i,t.selectionStartKind,r,a,o)}else{if(!n)return;const i=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new _r(i,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){const i=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new _r(i,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{const i=e.coordinatesConverter.convertModelPositionToViewPosition(new ee(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new ee(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),a=new j(i.lineNumber,i.column,r.lineNumber,r.column),o=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new _r(a,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class dse{constructor(e){this.context=e,this.cursors=[new UB(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return PYe(this.cursors,A0(e=>e.viewState.position,ee.compare)).viewState.position}getBottomMostViewPosition(){return NYe(this.cursors,A0(e=>e.viewState.position,ee.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(du.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,n=e.length;if(tn){const i=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let n=0,i=e.length;nn.selection,j.compareRangesUsingStarts));for(let n=0;nd&&g.index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),n--}}}}class hse{constructor(e,t,n,i){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=i}}class Qit{constructor(){this.type=0}}class Xit{constructor(){this.type=1}}class ert{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class trt{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}}class fD{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0)}}class h9{constructor(){this.type=5}}class urt{constructor(e){this.type=6,this.isFocused=e}}class nrt{constructor(){this.type=7}}class E9{constructor(){this.type=8}}class ube{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class YW{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class QW{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class XS{constructor(e,t,n,i,r,a,o){this.source=e,this.minimalReveal=t,this.range=n,this.selections=i,this.verticalType=r,this.revealHorizontal=a,this.scrollType=o,this.type=12}}class irt{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class rrt{constructor(e){this.theme=e,this.type=14}}class art{constructor(e){this.type=15,this.ranges=e}}class ort{constructor(){this.type=16}}let srt=class{constructor(){this.type=17}};class lrt extends ne{constructor(){super(),this._onEvent=this._register(new Q),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class crt{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class jX{constructor(e,t,n,i){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new jX(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class HX{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new HX(this.oldHasFocus,e.hasFocus)}}class VX{constructor(e,t,n,i,r,a,o,s){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=i,this.scrollWidth=r,this.scrollLeft=a,this.scrollHeight=o,this.scrollTop=s,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new VX(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class drt{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class hrt{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class qB{constructor(e,t,n,i,r,a,o){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=i,this.source=r,this.reason=a,this.reachedMaxCursorCount=o}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length,i=t.length;if(n!==i)return!1;for(let r=0;r0){const e=this._cursors.getSelections();for(let t=0;ta&&(i=i.slice(0,a),r=!0);const o=s2.from(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,o,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,n,i,r,a){const o=this._cursors.getViewPositions();let s=null,l=null;o.length>1?l=this._cursors.getViewSelections():s=j.fromPositions(o[0],o[0]),e.emitViewEvent(new XS(t,n,s,l,i,r,a))}saveState(){const e=[],t=this._cursors.getSelections();for(let n=0,i=t.length;n0){const r=du.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,du.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,i){this.setStates(e,t,i,du.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const n=[],i=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,i,r){const a=s2.from(this._model,this);if(a.equals(i))return!1;const o=this._cursors.getSelections(),s=this._cursors.getViewSelections();if(e.emitViewEvent(new trt(s,o,n)),!i||i.cursorState.length!==a.cursorState.length||a.cursorState.some((l,c)=>!l.modelState.equals(i.cursorState[c].modelState))){const l=i?i.cursorState.map(d=>d.modelState.selection):null,c=i?i.modelVersionId:0;e.emitOutgoingEvent(new qB(l,o,c,a.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let n=0,i=e.length;n=0)return null;const a=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!a)return null;const o=a[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!s||s.length!==1)return null;const l=s[0].open,c=r.text.length-a[2].length-1,d=r.text.lastIndexOf(l,c-1);if(d===-1)return null;t.push([d,c])}return t}executeEdits(e,t,n,i){let r=null;t==="snippet"&&(r=this._findAutoClosingPairs(n)),r&&(n[0]._isTracked=!0);const a=[],o=[],s=this._model.pushEditOperations(this.getSelections(),n,l=>{if(r)for(let d=0,h=r.length;d0&&this._pushAutoClosedAction(a,o)}_executeEdit(e,t,n,i=0){if(this.context.cursorConfig.readOnly)return;const r=s2.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(a){zt(a)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,i,r,!1)&&this.revealPrimary(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return Ese.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new l2(this._model,this.getSelections())}endComposition(e,t){const n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Pn.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,n){this._executeEdit(()=>{if(n==="keyboard"){const i=t.length;let r=0;for(;r{const l=s.getPosition();return new Ye(l.lineNumber,l.column+r,l.lineNumber,l.column+r)});this.setSelections(e,a,o,0)}return}this._executeEdit(()=>{this._executeEditOperation(Pn.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,i,r))},e,a)}paste(e,t,n,i,r){this._executeEdit(()=>{this._executeEditOperation(Pn.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,i||[]))},e,r,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(z3.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,n){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new vo(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}executeCommands(e,t,n){this._executeEdit(()=>{this._executeEditOperation(new vo(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,n)}}class s2{static from(e,t){return new s2(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}}class Crt{static executeCommands(e,t,n){const i={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},r=this._innerExecuteCommands(i,n);for(let a=0,o=i.trackedRanges.length;a0&&(a[0]._isTracked=!0);let o=e.model.pushEditOperations(e.selectionsBefore,a,l=>{const c=[];for(let E=0;EE.identifier.minor-m.identifier.minor,h=[];for(let E=0;E0?(c[E].sort(d),h[E]=t[E].computeCursorState(e.model,{getInverseEditOperations:()=>c[E],getTrackedSelection:m=>{const g=parseInt(m,10),f=e.model._getTrackedRange(e.trackedRanges[g]);return e.trackedRangesDirection[g]===0?new Ye(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn):new Ye(f.endLineNumber,f.endColumn,f.startLineNumber,f.startColumn)}})):h[E]=e.selectionsBefore[E];return h});o||(o=e.selectionsBefore);const s=[];for(const l in r)r.hasOwnProperty(l)&&s.push(parseInt(l,10));s.sort((l,c)=>c-l);for(const l of s)o.splice(l,1);return o}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{j.isEmpty(d)&&h===""||i.push({identifier:{major:t,minor:r++},range:d,text:h,forceMoveMarkers:E,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let o=!1;const c={addEditOperation:a,addTrackedEditOperation:(d,h,E)=>{o=!0,a(d,h,E)},trackSelection:(d,h)=>{const E=Ye.liftSelection(d);let m;if(E.isEmpty())if(typeof h=="boolean")h?m=2:m=3;else{const p=e.model.getLineMaxColumn(E.startLineNumber);E.startColumn===p?m=2:m=3}else m=1;const g=e.trackedRanges.length,f=e.model._setTrackedRange(null,E,m);return e.trackedRanges[g]=f,e.trackedRangesDirection[g]=E.getDirection(),g.toString()}};try{n.getEditOperations(e.model,c)}catch(d){return zt(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:i,hadTrackedEditOperation:o}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,i)=>-j.compareRangesUsingEnds(n.range,i.range));const t={};for(let n=1;nr.identifier.major?a=i.identifier.major:a=r.identifier.major,t[a.toString()]=!0;for(let o=0;o0&&n--}}return t}}class brt{constructor(e,t,n){this.text=e,this.startSelection=t,this.endSelection=n}}class l2{static _capture(e,t){const n=[];for(const i of t){if(i.startLineNumber!==i.endLineNumber)return null;n.push(new brt(e.getLineContent(i.startLineNumber),i.startColumn-1,i.endColumn-1))}return n}constructor(e,t){this._original=l2._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const n=l2._capture(e,t);if(!n||this._original.length!==n.length)return null;const i=[];for(let r=0,a=this._original.length;rev,tokenizeEncoded:(u,e,t)=>oP(0,t)};function Frt(u,e,t){return krt(this,void 0,void 0,function*(){if(!t)return gse(e,u.languageIdCodec,mse);const n=yield qn.getOrCreate(t);return gse(e,u.languageIdCodec,n||mse)})}function yrt(u,e,t,n,i,r,a){let o="
",s=n,l=0,c=!0;for(let d=0,h=e.getCount();d0;)a&&c?(m+=" ",c=!1):(m+=" ",c=!0),f--;break}case 60:m+="<",c=!1;break;case 62:m+=">",c=!1;break;case 38:m+="&",c=!1;break;case 0:m+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",c=!1;break;case 13:m+="​",c=!1;break;case 32:a&&c?(m+=" ",c=!1):(m+=" ",c=!0);break;default:m+=String.fromCharCode(g),c=!1}}if(o+=`${m}`,E>i||s>=i)break}return o+="
",o}function gse(u,e,t){let n='
';const i=F1(u);let r=t.getInitialState();for(let a=0,o=i.length;a0&&(n+="
");const l=t.tokenizeEncoded(s,!0,r);nr.convertToEndOffset(l.tokens,s.length);const d=new nr(l.tokens,s,e).inflate();let h=0;for(let E=0,m=d.getCount();E${pB(s.substring(h,f))}`,h=f}r=l.endState}return n+="
",n}class Art{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}}class _rt{constructor(e,t,n,i,r){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=r,this.prefixSum=0}}let nbe=class XW{constructor(e,t,n,i){this._instanceId=Ove(++XW.INSTANCE_COUNT),this._pendingChanges=new Art,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=n,this._paddingBottom=i}static findInsertionIndex(e,t,n){let i=0,r=e.length;for(;i>>1;t===e[a].afterLineNumber?n{t=!0,i=i|0,r=r|0,a=a|0,o=o|0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new _rt(s,i,r,a,o)),s},changeOneWhitespace:(i,r,a)=>{t=!0,r=r|0,a=a|0,this._pendingChanges.change({id:i,newAfterLineNumber:r,newHeight:a})},removeWhitespace:i=>{t=!0,this._pendingChanges.remove({id:i})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const s of e)this._insertWhitespace(s);for(const s of t)this._changeOneWhitespace(s.id,s.newAfterLineNumber,s.newHeight);for(const s of n){const l=this._findWhitespaceIndex(s.id);l!==-1&&this._removeWhitespace(l)}return}const i=new Set;for(const s of n)i.add(s.id);const r=new Map;for(const s of t)r.set(s.id,s);const a=s=>{const l=[];for(const c of s)if(!i.has(c.id)){if(r.has(c.id)){const d=r.get(c.id);c.afterLineNumber=d.newAfterLineNumber,c.height=d.newHeight}l.push(c)}return l},o=a(this._arr).concat(a(e));o.sort((s,l)=>s.afterLineNumber===l.afterLineNumber?s.ordinal-l.ordinal:s.afterLineNumber-l.afterLineNumber),this._arr=o,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=XW.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,i=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeight*(e-1):n=0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+i+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){this._checkPendingChanges(),e=e|0;const n=this._lineHeight*e,i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,n=this._lineHeight;let i=1,r=t;for(;i=o+n)i=a+1;else{if(e>=o)return a;r=a}}return i>t?t:i}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this._lineHeight,i=this.getLineNumberAtOrAfterVerticalOffset(e)|0,r=this.getVerticalOffsetForLineNumber(i)|0;let a=this._lineCount|0,o=this.getFirstWhitespaceIndexAfterLineNumber(i)|0;const s=this.getWhitespacesCount()|0;let l,c;o===-1?(o=s,c=a+1,l=0):(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);let d=r,h=d;const E=5e5;let m=0;r>=E&&(m=Math.floor(r/E)*E,m=Math.floor(m/n)*n,h-=m);const g=[],f=e+(t-e)/2;let p=-1;for(let k=i;k<=a;k++){if(p===-1){const A=d,F=d+n;(A<=f&&ff)&&(p=k)}for(d+=n,g[k-i]=h,h+=n;c===k;)h+=l,d+=l,o++,o>=s?c=a+1:(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);if(d>=t){a=k;break}}p===-1&&(p=a);const D=this.getVerticalOffsetForLineNumber(a)|0;let x=i,b=a;return xt&&b--,{bigNumbersDelta:m,startLineNumber:i,endLineNumber:a,relativeVerticalOffset:g,centeredLineNumber:p,completelyVisibleStartLineNumber:x,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n;t>=1?n=this._lineHeight*t:n=0;let i;return e>0?i=this.getWhitespacesAccumulatedHeight(e-1):i=0,n+i+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const i=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=i+r)return-1;for(;t=o+s)t=a+1;else{if(e>=o)return a;n=a}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const i=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),a=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:a,verticalOffset:n,height:i}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];const r=[];for(let a=n;a<=i;a++){const o=this.getVerticalOffsetForWhitespaceIndex(a),s=this.getHeightForWhitespaceIndex(a);if(o>=t)break;r.push({id:this.getIdForWhitespaceIndex(a),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(a),verticalOffset:o,height:s})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}};nbe.INSTANCE_COUNT=0;const Srt=125;class kb{constructor(e,t,n,i){e=e|0,t=t|0,n=n|0,i=i|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),i<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Brt extends ne{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new Q),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new kb(0,0,0,0),this._scrollable=this._register(new hA({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire(new jX(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class wrt extends ne{constructor(e,t,n){super(),this._configuration=e;const i=this._configuration.options,r=i.get(143),a=i.get(83);this._linesLayout=new nbe(t,i.get(66),a.top,a.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new Brt(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new kb(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?Srt:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),e.hasChanged(83)){const n=t.get(83);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(143)){const n=t.get(143),i=n.contentWidth,r=n.height,a=this._scrollable.getScrollDimensions(),o=a.contentWidth;this._scrollable.setScrollDimensions(new kb(i,a.contentWidth,r,this._getContentHeight(i,r,o)))}else this._updateHeight();e.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(102);return i.horizontal===2||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,n){const i=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return i.get(104)?r+=Math.max(0,t-i.get(66)-i.get(83).bottom):r+=this._getHorizontalScrollbarHeight(e,n),r}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.contentWidth;this._scrollable.setScrollDimensions(new kb(t,e.contentWidth,n,this._getContentHeight(t,n,i)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new soe(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new soe(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,n=e.get(144),i=e.get(50),r=e.get(143);if(n.isViewportWrapping){const a=e.get(72);return t>r.contentWidth+i.typicalHalfwidthCharacterWidth&&a.enabled&&a.side==="right"?t+r.verticalScrollbarWidth:t}else{const a=e.get(103)*i.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+a+r.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new kb(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),i=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-i,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}class Lrt{constructor(e,t,n,i,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const i=e.range,r=e.options;let a;if(r.isWholeLine){const o=this._coordinatesConverter.convertModelPositionToViewPosition(new ee(i.startLineNumber,1),0,!1,!0),s=this._coordinatesConverter.convertModelPositionToViewPosition(new ee(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)),1);a=new j(o.lineNumber,o.column,s.lineNumber,s.column)}else a=this._coordinatesConverter.convertModelRangeToViewRange(i,1);n=new W6e(a,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,n=!1){const i=new j(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(i,t,n).inlineDecorations[0]}_getDecorationsInRange(e,t,n){const i=this._linesCollection.getDecorationsInRange(e,this.editorId,cB(this.configuration.options),t,n),r=e.startLineNumber,a=e.endLineNumber,o=[];let s=0;const l=[];for(let c=r;c<=a;c++)l[c-r]=[];for(let c=0,d=i.length;ct===1)}function WX(u,e){return ibe(u,e.range,t=>t===2)}function ibe(u,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const i=u.tokenization.getLineTokens(n),r=n===e.startLineNumber,a=n===e.endLineNumber;let o=r?i.findTokenIndexAtOffset(e.startColumn-1):0;for(;oe.endColumn-1);){if(!t(i.getStandardTokenType(o)))return!1;o++}}return!0}function Kj(u,e){return u===null?e?JB.INSTANCE:ZB.INSTANCE:new zrt(u,e)}class zrt{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,n){this._assertVisible();const i=n>0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n];let a;if(this._projectionData.injectionOffsets!==null){const o=this._projectionData.injectionOffsets.map((l,c)=>new Qc(0,0,l+1,this._projectionData.injectionOptions[c],0));a=Qc.applyInjectedText(e.getLineContent(t),o).substring(i,r)}else a=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:r+1});return n>0&&(a=fse(this._projectionData.wrappedTextIndentLength)+a),a}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){const i=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],i),i[0]}getViewLinesData(e,t,n,i,r,a,o){this._assertVisible();const s=this._projectionData,l=s.injectionOffsets,c=s.injectionOptions;let d=null;if(l){d=[];let E=0,m=0;for(let g=0;g0?s.breakOffsets[g-1]:0,D=s.breakOffsets[g];for(;mD)break;if(p0?s.wrappedTextIndentLength:0,S=F+Math.max(b-p,0),w=F+Math.min(k-p,D-p);S!==w&&f.push(new PQe(S,w,A.inlineClassName,A.inlineClassNameAffectsLetterSpacing))}}if(k<=D)E+=x,m++;else break}}}let h;l?h=e.tokenization.getLineTokens(t).withInserted(l.map((E,m)=>({offset:E,text:c[m].content,tokenMetadata:nr.defaultTokenMetadata}))):h=e.tokenization.getLineTokens(t);for(let E=n;E0?i.wrappedTextIndentLength:0,a=n>0?i.breakOffsets[n-1]:0,o=i.breakOffsets[n],s=e.sliceAndInflate(a,o,r);let l=s.getLineContent();n>0&&(l=fse(i.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(n)+1,d=l.length+1,h=n+1=Wj.length)for(let e=1;e<=u;e++)Wj[e]=Mrt(e);return Wj[u]}function Mrt(u){return new Array(u+1).join(" ")}class Trt{constructor(e,t,n,i,r,a,o,s,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=r,this.tabSize=a,this.wrappingStrategy=o,this.wrappingColumn=s,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Prt(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),i=this.model.getInjectedTextDecorations(this._editorId),r=n.length,a=this.createLineBreaksComputer(),o=new s4(Qc.fromDecorations(i));for(let g=0;gp.lineNumber===g+1);a.addRequest(n[g],f,t?t[g]:null)}const s=a.finalize(),l=[],c=this.hiddenAreasDecorationIds.map(g=>this.model.getDecorationRange(g)).sort(j.compareRangesUsingStarts);let d=1,h=0,E=-1,m=E+1=d&&f<=h,D=Kj(s[g],!p);l[g]=D.getViewLineCount(),this.modelLineProjections[g]=D}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new gYe(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(h=>this.model.validateRange(h)),n=Nrt(t),i=this.hiddenAreasDecorationIds.map(h=>this.model.getDecorationRange(h)).sort(j.compareRangesUsingStarts);if(n.length===i.length){let h=!1;for(let E=0;E({range:h,options:Lt.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);const a=n;let o=1,s=0,l=-1,c=l+1=o&&E<=s?this.modelLineProjections[h].isVisible()&&(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!1),m=!0):(d=!0,this.modelLineProjections[h].isVisible()||(this.modelLineProjections[h]=this.modelLineProjections[h].setVisible(!0),m=!0)),m){const g=this.modelLineProjections[h].getViewLineCount();this.projectedModelLineLineCounts.setValue(h,g)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,i,r){const a=this.fontInfo.equals(e),o=this.wrappingStrategy===t,s=this.wrappingColumn===n,l=this.wrappingIndent===i,c=this.wordBreak===r;if(a&&o&&s&&l&&c)return!1;const d=a&&o&&!s&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i,this.wordBreak=r;let h=null;if(d){h=[];for(let E=0,m=this.modelLineProjections.length;E2&&!this.modelLineProjections[t-2].isVisible(),a=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let o=0;const s=[],l=[];for(let c=0,d=i.length;cs?(c=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=c+s-1,m=d+1,g=m+(r-s)-1,l=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),a=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),o=this.model.guides.getActiveIndentGuide(i.lineNumber,r.lineNumber,a.lineNumber),s=this.convertModelPositionToViewPosition(o.startLineNumber,1),l=this.convertModelPositionToViewPosition(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber));return{startLineNumber:s.lineNumber,endLineNumber:l.lineNumber,indent:o.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,i=t.remainder;return new pse(n+1,i)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ee(e.modelLineNumber,i)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),i=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new ee(e.modelLineNumber,i)}getViewLineInfosGroupedByModelRanges(e,t){const n=this.getViewLineInfo(e),i=this.getViewLineInfo(t),r=new Array;let a=this.getModelStartPositionOfViewLine(n),o=new Array;for(let s=n.modelLineNumber;s<=i.modelLineNumber;s++){const l=this.modelLineProjections[s-1];if(l.isVisible()){const c=s===n.modelLineNumber?n.modelLineWrappedLineIdx:0,d=s===i.modelLineNumber?i.modelLineWrappedLineIdx+1:l.getViewLineCount();for(let h=c;h{if(E.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.forWrappedLinesAfterColumn).lineNumber>=c.modelLineWrappedLineIdx||E.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.forWrappedLinesBeforeOrAtColumn).lineNumberc.modelLineWrappedLineIdx)return}const g=this.convertModelPositionToViewPosition(c.modelLineNumber,E.horizontalLine.endColumn),f=this.modelLineProjections[c.modelLineNumber-1].getViewPositionOfModelPosition(0,E.horizontalLine.endColumn);return f.lineNumber===c.modelLineWrappedLineIdx?new Vf(E.visibleColumn,m,E.className,new t2(E.horizontalLine.top,g.column),-1,-1):f.lineNumber!!E))}}return a}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let r=[];const a=[],o=[],s=n.lineNumber-1,l=i.lineNumber-1;let c=null;for(let m=s;m<=l;m++){const g=this.modelLineProjections[m];if(g.isVisible()){const f=g.getViewLineNumberOfModelPosition(0,m===s?n.column:1),p=g.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(m+1)),D=p-f+1;let x=0;D>1&&g.getViewLineMinColumn(this.model,m+1,p)===1&&(x=f===0?1:2),a.push(D),o.push(x),c===null&&(c=new ee(m+1,0))}else c!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,m)),c=null)}c!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let E=0;for(let m=0,g=r.length;mt&&(m=!0,E=t-r+1),d.getViewLinesData(this.model,l+1,h,E,r-e,n,s),r+=E,m)break}return s}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);const i=this.projectedModelLineLineCounts.getIndexOf(e-1),r=i.index,a=i.remainder,o=this.modelLineProjections[r],s=o.getViewLineMinColumn(this.model,r+1,a),l=o.getViewLineMaxColumn(this.model,r+1,a);tl&&(t=l);const c=o.getModelColumnOfViewPosition(a,t);return this.model.validatePosition(new ee(r+1,c)).equals(n)?new ee(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new j(n.lineNumber,n.column,i.lineNumber,i.column)}convertViewPositionToModelPosition(e,t){const n=this.getViewLineInfo(e),i=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ee(n.modelLineNumber,i))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new j(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,i=!1,r=!1){const a=this.model.validatePosition(new ee(e,t)),o=a.lineNumber,s=a.column;let l=o-1,c=!1;if(r)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,c=!0;if(l===0&&!this.modelLineProjections[l].isVisible())return new ee(i?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return c?r?h=this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,n):h=this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),n):h=this.modelLineProjections[o-1].getViewPositionOfModelPosition(d,s,n),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return j.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new j(n.lineNumber,n.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){const r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const i=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,i,r){const a=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-a.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new j(a.lineNumber,1,o.lineNumber,o.column),t,n,i,r);let s=[];const l=a.lineNumber-1,c=o.lineNumber-1;let d=null;for(let g=l;g<=c;g++)if(this.modelLineProjections[g].isVisible())d===null&&(d=new ee(g+1,g===l?a.column:1));else if(d!==null){const p=this.model.getLineMaxColumn(g);s=s.concat(this.model.getDecorationsInRange(new j(d.lineNumber,d.column,g,p),t,n,i)),d=null}d!==null&&(s=s.concat(this.model.getDecorationsInRange(new j(d.lineNumber,d.column,o.lineNumber,o.column),t,n,i)),d=null),s.sort((g,f)=>{const p=j.compareRangesUsingStarts(g.range,f.range);return p===0?g.idf.id?1:0:p});const h=[];let E=0,m=null;for(const g of s){const f=g.id;m!==f&&(m=f,h[E++]=g)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function Nrt(u){if(u.length===0)return[];const e=u.slice();e.sort(j.compareRangesUsingStarts);const t=[];let n=e[0].startLineNumber,i=e[0].endLineNumber;for(let r=1,a=e.length;ri+1?(t.push(new j(n,1,i,1)),n=o.startLineNumber,i=o.endLineNumber):o.endLineNumber>i&&(i=o.endLineNumber)}return t.push(new j(n,1,i,1)),t}class pse{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Dse{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Prt{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,i){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,i)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Rrt{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Irt(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,i){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,n,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new YW(t,n)}onModelLinesInserted(e,t,n,i){return new QW(t,n)}onModelLineChanged(e,t,n){return[!1,new ube(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const n=t-e+1,i=new Array(n);for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}let Ort=class extends ne{constructor(e,t,n,i,r,a,o,s,l){if(super(),this.languageConfigurationService=o,this._themeService=s,this._attachedView=l,this.hiddenAreasModel=new Hrt,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=n,this._eventDispatcher=new lrt,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new Hu(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=GX.create(this.model),this.model.isTooLargeForTokenization())this._lines=new Rrt(this.model);else{const c=this._configuration.options,d=c.get(50),h=c.get(137),E=c.get(144),m=c.get(136),g=c.get(128);this._lines=new Trt(this._editorId,this.model,i,r,d,this.model.getOptions().tabSize,h,E.wrappingColumn,m,g)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new vrt(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new wrt(this._configuration,this.getLineCount(),a)),this._register(this.viewLayout.onDidScroll(c=>{c.scrollTopChanged&&this._handleVisibleLinesChanged(),c.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new irt(c)),this._eventDispatcher.emitOutgoingEvent(new VX(c.oldScrollWidth,c.oldScrollLeft,c.oldScrollHeight,c.oldScrollTop,c.scrollWidth,c.scrollLeft,c.scrollHeight,c.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(c=>{this._eventDispatcher.emitOutgoingEvent(c)})),this._decorations=new Lrt(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(c=>{try{const d=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(d,c)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(pA.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new ort)})),this._register(this._themeService.onDidColorThemeChange(c=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new rrt(c))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new j(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new urt(e)),this._eventDispatcher.emitOutgoingEvent(new HX(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Qit)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Xit)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new ee(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new vse(t,this._viewportStart.startLineDelta)}return new vse(null,0)}_onConfigurationChanged(e,t){const n=this._captureStableViewport(),i=this._configuration.options,r=i.get(50),a=i.get(137),o=i.get(144),s=i.get(136),l=i.get(128);this._lines.setWrappingSettings(r,a,o.wrappingColumn,s,l)&&(e.emitViewEvent(new h9),e.emitViewEvent(new E9),e.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(90)&&(this._decorations.reset(),e.emitViewEvent(new fD(null))),e.emitViewEvent(new ert(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),hD.shouldRecreate(t)&&(this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let i=!1,r=!1;const a=e instanceof o3?e.rawContentChangedEvent.changes:e.changes,o=e instanceof o3?e.rawContentChangedEvent.versionId:null,s=this._lines.createLineBreaksComputer();for(const d of a)switch(d.changeType){case 4:{for(let h=0;h!g.ownerId||g.ownerId===this._editorId)),s.addRequest(E,m,null)}break}case 2:{let h=null;d.injectedText&&(h=d.injectedText.filter(E=>!E.ownerId||E.ownerId===this._editorId)),s.addRequest(d.detail,h,null);break}}const l=s.finalize(),c=new s4(l);for(const d of a)switch(d.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new h9),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break}case 3:{const h=this._lines.onModelLinesDeleted(o,d.fromLineNumber,d.toLineNumber);h!==null&&(n.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber)),i=!0;break}case 4:{const h=c.takeCount(d.detail.length),E=this._lines.onModelLinesInserted(o,d.fromLineNumber,d.toLineNumber,h);E!==null&&(n.emitViewEvent(E),this.viewLayout.onLinesInserted(E.fromLineNumber,E.toLineNumber)),i=!0;break}case 2:{const h=c.dequeue(),[E,m,g,f]=this._lines.onModelLineChanged(o,d.lineNumber,h);r=E,m&&n.emitViewEvent(m),g&&(n.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),f&&(n.emitViewEvent(f),this.viewLayout.onLinesDeleted(f.fromLineNumber,f.toLineNumber));break}case 5:break}o!==null&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&r&&(n.emitViewEvent(new E9),n.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const n=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(n){const i=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),r=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber);this.viewLayout.setScrollPosition({scrollTop:r+this._viewportStart.startLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();e instanceof o3&&n.emitOutgoingEvent(new prt(e.contentChangedEvent)),this._cursor.onModelContentChanged(n,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(e=>{const t=[];for(let n=0,i=e.ranges.length;n{this._eventDispatcher.emitSingleViewEvent(new nrt),this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new frt(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new grt(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new h9),t.emitViewEvent(new E9),t.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new hD(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Drt(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new fD(e)),this._eventDispatcher.emitOutgoingEvent(new mrt(e))}))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const i=this._captureStableViewport();let r=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();r=this._lines.setHiddenAreas(n),r&&(a.emitViewEvent(new h9),a.emitViewEvent(new E9),a.emitViewEvent(new fD(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),r&&this._eventDispatcher.emitOutgoingEvent(new hrt)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(143),t=this._configuration.options.get(66),n=Math.max(20,Math.round(e.height/t)),i=this.viewLayout.getLinesViewportData(),r=Math.max(1,i.completelyVisibleStartLineNumber-n),a=Math.min(this.getLineCount(),i.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new j(r,this.getLineMinColumn(r),a,this.getLineMaxColumn(a)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];const i=[];let r=0,a=t.startLineNumber,o=t.startColumn;const s=t.endLineNumber,l=t.endColumn;for(let c=0,d=n.length;cs||(a"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),i=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:i}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,i){return this._lines.getViewLinesBracketGuides(e,t,n,i)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=Ta(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Hc(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewportViewLineRenderingData(e,t){const i=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,i)}getViewLineRenderingData(e){const t=this._decorations.getInlineDecorationsOnLine(e);return this._getViewLineRenderingData(e,t)}_getViewLineRenderingData(e,t){const n=this.model.mightContainRTL(),i=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),a=this._lines.getViewLineData(e);return a.inlineDecorations&&(t=[...t,...a.inlineDecorations.map(o=>o.toInlineDecoration(e))]),new Ys(a.minColumn,a.maxColumn,a.content,a.continuesWithWrappedLine,n,i,a.tokens,t,r,a.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){const i=this._lines.getViewLinesData(e,t,n);return new NQe(this.getTabSize(),i)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,cB(this._configuration.options)),n=new jrt;for(const i of t){const r=i.options,a=r.overviewRuler;if(!a)continue;const o=a.position;if(o===0)continue;const s=a.getColor(e.value),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(i.range.startLineNumber,i.range.startColumn),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(i.range.endLineNumber,i.range.endColumn);n.accept(s,r.zIndex,l,c,o)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const n=t.options.overviewRuler;n==null||n.invalidateCachedColor();const i=t.options.minimap;i==null||i.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);return this.model.modifyPosition(n,t)}deduceModelPositionRelativeToViewPosition(e,t,n){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);const a=this.model.getOffsetAt(i)+t;return this.model.getPositionAt(a)}getPlainTextToCopy(e,t,n){const i=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(j.compareRangesUsingStarts);let r=!1,a=!1;for(const s of e)s.isEmpty()?r=!0:a=!0;if(!a){if(!t)return"";const s=e.map(c=>c.startLineNumber);let l="";for(let c=0;c0&&s[c-1]===s[c]||(l+=this.model.getLineContent(s[c])+i);return l}if(r&&t){const s=[];let l=0;for(const c of e){const d=c.startLineNumber;c.isEmpty()?d!==l&&s.push(this.model.getLineContent(d)):s.push(this.model.getValueInRange(c,n?2:0)),l=d}return s.length===1?s[0]:s}const o=[];for(const s of e)s.isEmpty()||o.push(this.model.getValueInRange(s,n?2:0));return o.length===1?o[0]:o}getRichTextToCopy(e,t){const n=this.model.getLanguageId();if(n===Ws||e.length!==1)return null;let i=e[0];if(i.isEmpty()){if(!t)return null;const c=i.startLineNumber;i=new j(c,this.model.getLineMinColumn(c),c,this.model.getLineMaxColumn(c))}const r=this._configuration.options.get(50),a=this._getColorMap(),s=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===ss.fontFamily;let l;return s?l=ss.fontFamily:(l=r.fontFamily,l=l.replace(/"/g,"'"),/[,']/.test(l)||/[+ ]/.test(l)&&(l=`'${l}'`),l=`${l}, ${ss.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(i,a)+"
"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,a=e.endColumn,o=this.getTabSize();let s="";for(let l=n;l<=r;l++){const c=this.model.tokenization.getLineTokens(l),d=c.getLineContent(),h=l===n?i-1:0,E=l===r?a-1:d.length;d===""?s+="
":s+=yrt(d,c.inflate(),t,h,E,o,na)}return s}_getColorMap(){const e=qn.getColorMap(),t=["#000000"];if(e)for(let n=1,i=e.length;nthis._cursor.setStates(i,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(i=>this._cursor.setSelections(i,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Ert);return}this._withViewEventsCollector(e)}executeEdits(e,t,n){this._executeCursorEdit(i=>this._cursor.executeEdits(i,e,t,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,i,r){this._executeCursorEdit(a=>this._cursor.compositionType(a,e,t,n,i,r))}paste(e,t,n,i){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,i))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,n,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new j(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(i=>i.emitViewEvent(new XS(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new j(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(i=>i.emitViewEvent(new XS(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,i,r){this._withViewEventsCollector(a=>a.emitViewEvent(new XS(e,!1,n,null,i,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new srt),this._eventDispatcher.emitOutgoingEvent(new drt))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class GX{static create(e){const t=e._setTrackedRange(null,new j(1,1,1,1),1);return new GX(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,i,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=i,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const n=e.coordinatesConverter.convertViewPositionToModelPosition(new ee(t,e.getLineMinColumn(t))),i=e.model._setTrackedRange(this._modelTrackedRange,new j(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),a=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=i,this._startLineDelta=a-r}invalidate(){this._isValid=!1}}class jrt{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,i,r){const a=this._asMap[e];if(a){const o=a.data,s=o[o.length-3],l=o[o.length-1];if(s===r&&l+1>=n){i>l&&(o[o.length-1]=i);return}o.push(r,n,i)}else{const o=new xk(e,t,[r,n,i]);this._asMap[e]=o,this.asArray.push(o)}}}class Hrt{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const n=this.hiddenAreas.get(e);n&&xse(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>Vrt(t,n),[]);return xse(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function Vrt(u,e){const t=[];let n=0,i=0;for(;n0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)i0?this.breakOffsets[r-1]:0,t===0)if(e<=a)i=r-1;else if(e>s)n=r+1;else break;else if(e=s)n=r+1;else break}let o=e-a;return r>0&&(o+=this.wrappedTextIndentLength),new m9(r,o)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){const i=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(i,n);if(r!==i)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new m9(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const i=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&Cse(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let i=n.offsetInInputWithInjections;if(bse(this.injectionOptions[n.injectedTextIndex].cursorStops))return i;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(Cse(this.injectionOptions[r].cursorStops)||(i-=this.injectionOptions[r].content.length,bse(this.injectionOptions[r].cursorStops)));)r--;return i}}else if(t===1||t===4){let i=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)i-=this.injectionOptions[r-1].content.length,r--;return i}UN()}getInjectedText(e,t){const n=this.outputPositionToOffsetInInputWithInjections(e,t),i=this.getInjectedTextAtOffset(n);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let i=0;for(let r=0;re)break;if(e<=s)return{injectedTextIndex:r,offsetInInputWithInjections:o,length:a};i+=a}}}}function Cse(u){return u==null?!0:u===zc.Right||u===zc.Both}function bse(u){return u==null?!0:u===zc.Left||u===zc.Both}class m9{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ee(e+this.outputLineIndex,this.outputOffset+1)}}class UX{static create(e){return new UX(e.get(132),e.get(131))}constructor(e,t){this.classifier=new Krt(e,t)}createLineBreaksComputer(e,t,n,i,r){const a=[],o=[],s=[];return{addRequest:(l,c,d)=>{a.push(l),o.push(c),s.push(d)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let d=0,h=a.length;d=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let eG=[],tG=[];function Wrt(u,e,t,n,i,r,a,o){if(i===-1)return null;const s=t.length;if(s<=1)return null;const l=o==="keepAll",c=e.breakOffsets,d=e.breakOffsetsVisibleColumn,h=rbe(t,n,i,r,a),E=i-h,m=eG,g=tG;let f=0,p=0,D=0,x=i;const b=c.length;let k=0;if(k>=0){let A=Math.abs(d[k]-x);for(;k+1=A)break;A=F,k++}}for(;kA&&(A=p,F=D);let S=0,w=0,z=0,N=0;if(F<=x){let y=F,_=A===0?0:t.charCodeAt(A-1),L=A===0?0:u.get(_),T=!0;for(let R=A;Rp&&uG(_,L,H,V,l)&&(S=I,w=y),y+=U,y>x){I>p?(z=I,N=y-U):(z=R+1,N=y),y-w>E&&(S=0),T=!1;break}_=H,L=V}if(T){f>0&&(m[f]=c[c.length-1],g[f]=d[c.length-1],f++);break}}if(S===0){let y=F,_=t.charCodeAt(A),L=u.get(_),T=!1;for(let R=A-1;R>=p;R--){const I=R+1,H=t.charCodeAt(R);if(H===9){T=!0;break}let V,U;if(_3(H)?(R--,V=0,U=2):(V=u.get(H),U=Tm(H)?r:1),y<=x){if(z===0&&(z=I,N=y),y<=x-E)break;if(uG(H,V,_,L,l)){S=I,w=y;break}}y-=U,_=H,L=V}if(S!==0){const R=E-(N-w);if(R<=n){const I=t.charCodeAt(z);let H;ur(I)?H=2:H=d2(I,N,n,r),R-H<0&&(S=0)}}if(T){k--;continue}}if(S===0&&(S=z,w=N),S<=p){const y=t.charCodeAt(p);ur(y)?(S=p+2,w=D+2):(S=p+1,w=D+d2(y,D,n,r))}for(p=S,m[f]=S,D=w,g[f]=w,f++,x=w+E;k<0||k=O)break;O=y,k++}}return f===0?null:(m.length=f,g.length=f,eG=e.breakOffsets,tG=e.breakOffsetsVisibleColumn,e.breakOffsets=m,e.breakOffsetsVisibleColumn=g,e.wrappedTextIndentLength=h,e)}function Grt(u,e,t,n,i,r,a,o){const s=Qc.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(w=>w.options),c=t.map(w=>w.column-1)):(l=null,c=null),i===-1)return l?new c2(c,l,[s.length],[],0):null;const d=s.length;if(d<=1)return l?new c2(c,l,[s.length],[],0):null;const h=o==="keepAll",E=rbe(s,n,i,r,a),m=i-E,g=[],f=[];let p=0,D=0,x=0,b=i,k=s.charCodeAt(0),A=u.get(k),F=d2(k,0,n,r),S=1;ur(k)&&(F+=1,k=s.charCodeAt(1),A=u.get(k),S++);for(let w=S;wb&&((D===0||F-x>m)&&(D=z,x=F-y),g[p]=D,f[p]=x,p++,b=x+m,D=0),k=N,A=O}return p===0&&(!t||t.length===0)?null:(g[p]=d,f[p]=F,new c2(c,l,g,f,E))}function d2(u,e,t,n){return u===9?t-e%t:Tm(u)||u<32?n:1}function kse(u,e){return e-u%e}function uG(u,e,t,n,i){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!i&&e===3&&n!==2||!i&&n===3&&e!==1)}function rbe(u,e,t,n,i){let r=0;if(i!==0){const a=Ta(u);if(a!==-1){for(let s=0;st&&(r=0)}}return r}const Gj=b4("domLineBreaksComputer",{createHTML:u=>u});class qX{static create(){return new qX}constructor(){}createLineBreaksComputer(e,t,n,i,r){const a=[],o=[];return{addRequest:(s,l,c)=>{a.push(s),o.push(l)},finalize:()=>Urt(a,e,t,n,i,r,o)}}}function Urt(u,e,t,n,i,r,a){var o;function s(w){const z=a[w];if(z){const N=Qc.applyInjectedText(u[w],z),O=z.map(_=>_.options),y=z.map(_=>_.column-1);return new c2(y,O,[N.length],[],0)}else return null}if(n===-1){const w=[];for(let z=0,N=u.length;zl?(N=0,O=0):y=l-T}const _=z.substr(N),L=qrt(_,O,t,y,m,h);g[w]=N,f[w]=O,p[w]=_,D[w]=L[0],x[w]=L[1]}const b=m.build(),k=(o=Gj==null?void 0:Gj.createHTML(b))!==null&&o!==void 0?o:b;E.innerHTML=k,E.style.position="absolute",E.style.top="10000",r==="keepAll"?(E.style.wordBreak="keep-all",E.style.overflowWrap="anywhere"):(E.style.wordBreak="inherit",E.style.overflowWrap="break-word"),document.body.appendChild(E);const A=document.createRange(),F=Array.prototype.slice.call(E.children,0),S=[];for(let w=0;wH.options),R=I.map(H=>H.column-1)):(T=null,R=null),S[w]=new c2(R,T,N,L,y)}return document.body.removeChild(E),S}function qrt(u,e,t,n,i,r){if(r!==0){const h=String(r);i.appendString('
');const a=u.length;let o=e,s=0;const l=[],c=[];let d=0");for(let h=0;h"),l[h]=s,c[h]=o;const E=d;d=h+1"),l[u.length]=s,c[u.length]=o,i.appendString("
"),[l,c]}function Jrt(u,e,t,n){if(t.length<=1)return null;const i=Array.prototype.slice.call(e.children,0),r=[];try{nG(u,i,n,0,null,t.length-1,null,r)}catch(a){return console.log(a),null}return r.length===0?null:(r.push(t.length),r)}function nG(u,e,t,n,i,r,a,o){if(n===r||(i=i||Uj(u,e,t[n],t[n+1]),a=a||Uj(u,e,t[r],t[r+1]),Math.abs(i[0].top-a[0].top)<=.1))return;if(n+1===r){o.push(r);return}const s=n+(r-n)/2|0,l=Uj(u,e,t[s],t[s+1]);nG(u,e,t,n,i,s,l,o),nG(u,e,t,s,l,r,a,o)}function Uj(u,e,t,n){return u.setStart(e[t/16384|0].firstChild,t%16384),u.setEnd(e[n/16384|0].firstChild,n%16384),u.getClientRects()}class Zrt extends ne{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new NQ),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(const i of t){if(this._pending.has(i.id)){zt(new Error(`Cannot have two contributions with the same id ${i.id}`));continue}this._pending.set(i.id,i)}this._instantiateSome(0),this._register(Ph(()=>{this._instantiateSome(1)})),this._register(Ph(()=>{this._instantiateSome(2)})),this._register(Ph(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(const[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register(Ph(()=>{this._instantiateSome(1)},50))}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){zt(n)}}}}var Yrt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ih=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Qrt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},lf;let Xrt=0,eat=class{constructor(e,t,n,i,r,a){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=i,this.listenersToRemove=r,this.attachedView=a}dispose(){Su(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}},lv=lf=class extends ne{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(e,t,n,i,r,a,o,s,l,c,d,h){var E;super(),this.languageConfigurationService=d,this._deliveryQueue=HUe(),this._contributions=this._register(new Zrt),this._onDidDispose=this._register(new Q),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Fse({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Fse({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Fa(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new Q({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),r.willCreateCodeEditor();const m=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=m.overflowWidgetsDomNode,delete m.overflowWidgetsDomNode,this._id=++Xrt,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,m,c)),this._register(this._configuration.onDidChange(p=>{this._onDidChangeConfiguration.fire(p);const D=this._configuration.options;if(p.hasChanged(143)){const x=D.get(143);this._onDidLayoutChange.fire(x)}})),this._contextKeyService=this._register(o.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=r,this._commandService=a,this._themeService=s,this._register(new tat(this,this._contextKeyService)),this._register(new uat(this,this._contextKeyService,h)),this._instantiationService=i.createChild(new CP([pt,this._contextKeyService])),this._modelData=null,this._focusTracker=new nat(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let g;Array.isArray(n.contributions)?g=n.contributions:g=ux.getEditorContributions(),this._contributions.initialize(this,g,this._instantiationService);for(const p of ux.getEditorActions()){if(this._actions.has(p.id)){zt(new Error(`Cannot have two actions with the same id ${p.id}`));continue}const D=new TCe(p.id,p.label,p.alias,(E=p.precondition)!==null&&E!==void 0?E:void 0,()=>this._instantiationService.invokeFunction(x=>Promise.resolve(p.runEditorCommand(x,this,null))),this._contextKeyService);this._actions.set(D.id,D)}const f=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new aZe(this._domElement,{onDragEnter:()=>{},onDragOver:p=>{if(!f())return;const D=this.getTargetAtClientPoint(p.clientX,p.clientY);D!=null&&D.position&&this.showDropIndicatorAt(D.position)},onDrop:p=>Qrt(this,void 0,void 0,function*(){if(!f()||(this.removeDropIndicator(),!p.dataTransfer))return;const D=this.getTargetAtClientPoint(p.clientX,p.clientY);D!=null&&D.position&&this._onDropIntoEditor.fire({position:D.position,event:p})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)===null||t===void 0||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n){return new LW(e,t,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return oA.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?vu.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===` `?n=1:e&&e.lineEnding&&e.lineEnding===`\r -`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const n=this.hasTextFocus(),i=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();const r={oldModelUrl:i?i.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(r),this._postDetachModelCleanup(i),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,i){const r=e.model.validatePosition({lineNumber:t,column:n}),a=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(a.lineNumber,i)}getTopForLineNumber(e,t=!1){return this._modelData?lf._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?lf._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,i=!1){const r=e.model.validatePosition({lineNumber:t,column:n}),a=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber,i)}getBottomForLineNumber(e,t=!1){return this._modelData?lf._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var n;(n=this._modelData)===null||n===void 0||n.viewModel.setHiddenAreas(e.map(i=>j.lift(i)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return Ki.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ee.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,i){if(!this._modelData)return;if(!j.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),a=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,a,t,i)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new j(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,i){if(!ee.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new j(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const n=Ye.isISelection(e),i=j.isIRange(e);if(!n&&!i)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(i){const r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const n=new Ye(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,i){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new j(e,1,t,1),n,!1,i)}revealRange(e,t=0,n=!1,i=!0){this._revealRange(e,n?1:0,i,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,i){if(!j.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(j.lift(e),t,n,i)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let i=0,r=e.length;i0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{const r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{const r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{const r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null);return}case"cut":this._cut(e);return}const i=this.getAction(t);if(i){Promise.resolve(i.run(n)).then(void 0,zt);return}this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,i,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,i,r,e)}_paste(e,t,n,i,r){if(!this._modelData||t.length===0)return;const a=this._modelData.viewModel,o=a.getSelection().getStartPosition();a.paste(t,n,i,e);const s=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new j(o.lineNumber,o.column,s.lineNumber,s.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const i=ux.getEditorCommand(t);return i?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(i.runEditorCommand(r,this,n)).then(void 0,zt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(90))return!1;let i;return n?Array.isArray(n)?i=()=>n:i=n:i=()=>null,this._modelData.viewModel.executeEdits(e,t,i),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new iat(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,cB(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,cB(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),n=this._configuration.options,i=n.get(143),r=lf._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),a=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+i.glyphMarginWidth+i.lineNumbersWidth+i.decorationsWidth-this.getScrollLeft();return{top:r,left:a,height:n.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){ea(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const n=e.onBeforeAttached(),i=new Ort(this._id,this._configuration,e,qX.create(),UX.create(this._configuration.options),o=>T0(o),this.languageConfigurationService,this._themeService,n);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(o=>{switch(o.kind){case 0:this._onDidContentSizeChange.fire(o);break;case 1:this._editorTextFocus.setValue(o.hasFocus);break;case 2:this._onDidScrollChange.fire(o);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(o.reachedMaxCursorCount){const d=this.getOption(79),h=v("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",d);this._notificationService.prompt(bP.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:v("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const s=[];for(let d=0,h=o.selections.length;d{this._paste("keyboard",r,a,o,s)},type:r=>{this._type("keyboard",r)},compositionType:(r,a,o,s)=>{this._compositionType("keyboard",r,a,o,s)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,a,o,s)=>{const l={text:r,pasteOnNewLine:a,multicursorText:o,mode:s};this._commandService.executeCommand("paste",l)},type:r=>{const a={text:r};this._commandService.executeCommand("type",a)},compositionType:(r,a,o,s)=>{if(o||s){const l={text:r,replacePrevCharCnt:a,replaceNextCharCnt:o,positionDelta:s};this._commandService.executeCommand("compositionType",l)}else{const l={text:r,replaceCharCnt:a};this._commandService.executeCommand("replacePreviousChar",l)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new fP(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new VW(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),options:lf.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};lv.dropIntoEditorDecorationOptions=Lt.register({description:"workbench-dnd-target",className:"dnd-target"});lv=lf=Yrt([ih(3,mt),ih(4,Cu),ih(5,ni),ih(6,pt),ih(7,sr),ih(8,bi),ih(9,k4),ih(10,tn),ih(11,We)],lv);class Fse extends ne{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new Q(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new Q(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class Fa extends Q{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class tat extends ne{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=W.editorSimpleInput.bindTo(t),this._editorFocus=W.focus.bindTo(t),this._textInputFocus=W.textInputFocus.bindTo(t),this._editorTextFocus=W.editorTextFocus.bindTo(t),this._tabMovesFocus=W.tabMovesFocus.bindTo(t),this._editorReadonly=W.readOnly.bindTo(t),this._inDiffEditor=W.inDiffEditor.bindTo(t),this._editorColumnSelection=W.columnSelection.bindTo(t),this._hasMultipleSelections=W.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=W.hasNonEmptySelection.bindTo(t),this._canUndo=W.canUndo.bindTo(t),this._canRedo=W.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(tv.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(tv.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class uat extends ne{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=W.languageId.bindTo(t),this._hasCompletionItemProvider=W.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=W.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=W.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=W.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=W.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=W.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=W.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=W.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=W.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=W.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=W.hasReferenceProvider.bindTo(t),this._hasRenameProvider=W.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=W.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=W.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=W.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=W.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=W.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=W.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=W.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(n.completionProvider.onDidChange(i)),this._register(n.codeActionProvider.onDidChange(i)),this._register(n.codeLensProvider.onDidChange(i)),this._register(n.definitionProvider.onDidChange(i)),this._register(n.declarationProvider.onDidChange(i)),this._register(n.implementationProvider.onDidChange(i)),this._register(n.typeDefinitionProvider.onDidChange(i)),this._register(n.hoverProvider.onDidChange(i)),this._register(n.documentHighlightProvider.onDidChange(i)),this._register(n.documentSymbolProvider.onDidChange(i)),this._register(n.referenceProvider.onDidChange(i)),this._register(n.renameProvider.onDidChange(i)),this._register(n.documentFormattingEditProvider.onDidChange(i)),this._register(n.documentRangeFormattingEditProvider.onDidChange(i)),this._register(n.signatureHelpProvider.onDidChange(i)),this._register(n.inlayHintsProvider.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Ot.walkThroughSnippet)})}}class nat extends ne{constructor(e){super(),this._onChange=this._register(new Q),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(y1(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class iat{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(i=>{this._isChangingDecorations||e.call(t,i)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const n of this._decorationIds){const i=e.getDecorationRange(n);i&&t.push(i)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}}const rat=encodeURIComponent("");function qj(u){return rat+encodeURIComponent(u.toString())+aat}const oat=encodeURIComponent('');function lat(u){return oat+encodeURIComponent(u.toString())+sat}Kl((u,e)=>{const t=u.getColor(n1);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${qj(t)}") repeat-x bottom left; }`);const n=u.getColor(js);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${qj(n)}") repeat-x bottom left; }`);const i=u.getColor(Mo);i&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${qj(i)}") repeat-x bottom left; }`);const r=u.getColor(wXe);r&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${lat(r)}") no-repeat bottom left; }`);const a=u.getColor(Ktt);a&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${a.rgba.a}; }`)});var cat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},dat=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},hat=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let iG=class extends ne{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new Q),this._onCodeEditorAdd=this._register(new Q),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new Q),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new Q),this._onDiffEditorAdd=this._register(new Q),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new Q),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new to,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){const i=e.toString();let r;this._modelProperties.has(i)?r=this._modelProperties.get(i):(r=new Map,this._modelProperties.set(i,r)),r.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}openCodeEditor(e,t,n){return hat(this,void 0,void 0,function*(){for(const i of this._codeEditorOpenHandlers){const r=yield i(e,t,n);if(r!==null)return r}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return ft(t)}};iG=cat([dat(0,sr)],iG);var Eat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yse=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},mat=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let YB=class extends iG{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((n,i,r)=>mat(this,void 0,void 0,function*(){return i?this.doOpenEditor(i,n):null})))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===Ot.http||r===Ot.https)return d6e(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if(typeof i.endLineNumber=="number"&&typeof i.endColumn=="number")e.setSelection(i),e.revealRangeInCenter(i,1);else{const r={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};YB=Eat([yse(0,pt),yse(1,sr)],YB);au(Cu,YB,0);const f6=Ut("layoutService");var abe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},obe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let QB=class{get dimension(){return this._dimension||(this._dimension=c6(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=Ne.None,this.offset={top:0,quickPickTop:0}}};QB=abe([obe(0,Cu)],QB);let rG=class extends QB{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};rG=abe([obe(1,Cu)],rG);au(f6,QB,1);const DA=Ut("dialogService");var gat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ase=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},g9=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function f9(u){return u.scheme===Ot.file?u.fsPath:u.path}let sbe=0;class p9{constructor(e,t,n,i,r,a,o){this.id=++sbe,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=i,this.groupOrder=r,this.sourceId=a,this.sourceOrder=o,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _se{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Sse{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(i.reason===0?e:t).push(i.resourceLabel);const n=[];return e.length>0&&n.push(v({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(v({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` +`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const n=this.hasTextFocus(),i=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();const r={oldModelUrl:i?i.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(r),this._postDetachModelCleanup(i),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,i){const r=e.model.validatePosition({lineNumber:t,column:n}),a=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(a.lineNumber,i)}getTopForLineNumber(e,t=!1){return this._modelData?lf._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?lf._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,i=!1){const r=e.model.validatePosition({lineNumber:t,column:n}),a=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber,i)}getBottomForLineNumber(e,t=!1){return this._modelData?lf._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var n;(n=this._modelData)===null||n===void 0||n.viewModel.setHiddenAreas(e.map(i=>j.lift(i)),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return Ki.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ee.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,i){if(!this._modelData)return;if(!j.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),a=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,a,t,i)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new j(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,i){if(!ee.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new j(e.lineNumber,e.column,e.lineNumber,e.column),t,n,i)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const n=Ye.isISelection(e),i=j.isIRange(e);if(!n&&!i)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(i){const r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const n=new Ye(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,i){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new j(e,1,t,1),n,!1,i)}revealRange(e,t=0,n=!1,i=!0){this._revealRange(e,n?1:0,i,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,i){if(!j.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(j.lift(e),t,n,i)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let i=0,r=e.length;i0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;(e=this._getViewModel())===null||e===void 0||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){switch(n=n||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{const r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{const r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{const r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null);return}case"cut":this._cut(e);return}const i=this.getAction(t);if(i){Promise.resolve(i.run(n)).then(void 0,zt);return}this._modelData&&(this._triggerEditorCommand(e,t,n)||this._triggerCommand(t,n))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,i,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,i,r,e)}_paste(e,t,n,i,r){if(!this._modelData||t.length===0)return;const a=this._modelData.viewModel,o=a.getSelection().getStartPosition();a.paste(t,n,i,e);const s=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new j(o.lineNumber,o.column,s.lineNumber,s.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const i=ux.getEditorCommand(t);return i?(n=n||{},n.source=e,this._instantiationService.invokeFunction(r=>{Promise.resolve(i.runEditorCommand(r,this,n)).then(void 0,zt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(90))return!1;let i;return n?Array.isArray(n)?i=()=>n:i=n:i=()=>null,this._modelData.viewModel.executeEdits(e,t,i),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new iat(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,cB(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,cB(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),n=this._configuration.options,i=n.get(143),r=lf._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),a=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+i.glyphMarginWidth+i.lineNumbersWidth+i.decorationsWidth-this.getScrollLeft();return{top:r,left:a,height:n.get(66)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,e)}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){ea(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const n=e.onBeforeAttached(),i=new Ort(this._id,this._configuration,e,qX.create(),UX.create(this._configuration.options),o=>N0(o),this.languageConfigurationService,this._themeService,n);t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(o=>{switch(o.kind){case 0:this._onDidContentSizeChange.fire(o);break;case 1:this._editorTextFocus.setValue(o.hasFocus);break;case 2:this._onDidScrollChange.fire(o);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(o.reachedMaxCursorCount){const d=this.getOption(79),h=v("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",d);this._notificationService.prompt(bP.Warning,h,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:v("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const s=[];for(let d=0,h=o.selections.length;d{this._paste("keyboard",r,a,o,s)},type:r=>{this._type("keyboard",r)},compositionType:(r,a,o,s)=>{this._compositionType("keyboard",r,a,o,s)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,a,o,s)=>{const l={text:r,pasteOnNewLine:a,multicursorText:o,mode:s};this._commandService.executeCommand("paste",l)},type:r=>{const a={text:r};this._commandService.executeCommand("type",a)},compositionType:(r,a,o,s)=>{if(o||s){const l={text:r,replacePrevCharCnt:a,replaceNextCharCnt:o,positionDelta:s};this._commandService.executeCommand("compositionType",l)}else{const l={text:r,replaceCharCnt:a};this._commandService.executeCommand("replacePreviousChar",l)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new fP(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new VW(t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),options:lf.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}};lv.dropIntoEditorDecorationOptions=Lt.register({description:"workbench-dnd-target",className:"dnd-target"});lv=lf=Yrt([ih(3,mt),ih(4,Cu),ih(5,ni),ih(6,pt),ih(7,sr),ih(8,bi),ih(9,k4),ih(10,tn),ih(11,We)],lv);class Fse extends ne{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new Q(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new Q(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class Fa extends Q{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class tat extends ne{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=W.editorSimpleInput.bindTo(t),this._editorFocus=W.focus.bindTo(t),this._textInputFocus=W.textInputFocus.bindTo(t),this._editorTextFocus=W.editorTextFocus.bindTo(t),this._tabMovesFocus=W.tabMovesFocus.bindTo(t),this._editorReadonly=W.readOnly.bindTo(t),this._inDiffEditor=W.inDiffEditor.bindTo(t),this._editorColumnSelection=W.columnSelection.bindTo(t),this._hasMultipleSelections=W.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=W.hasNonEmptySelection.bindTo(t),this._canUndo=W.canUndo.bindTo(t),this._canRedo=W.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(tv.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(tv.getTabFocusMode()),this._editorReadonly.set(e.get(90)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class uat extends ne{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=W.languageId.bindTo(t),this._hasCompletionItemProvider=W.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=W.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=W.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=W.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=W.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=W.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=W.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=W.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=W.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=W.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=W.hasReferenceProvider.bindTo(t),this._hasRenameProvider=W.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=W.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=W.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=W.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=W.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=W.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=W.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=W.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(n.completionProvider.onDidChange(i)),this._register(n.codeActionProvider.onDidChange(i)),this._register(n.codeLensProvider.onDidChange(i)),this._register(n.definitionProvider.onDidChange(i)),this._register(n.declarationProvider.onDidChange(i)),this._register(n.implementationProvider.onDidChange(i)),this._register(n.typeDefinitionProvider.onDidChange(i)),this._register(n.hoverProvider.onDidChange(i)),this._register(n.documentHighlightProvider.onDidChange(i)),this._register(n.documentSymbolProvider.onDidChange(i)),this._register(n.referenceProvider.onDidChange(i)),this._register(n.renameProvider.onDidChange(i)),this._register(n.documentFormattingEditProvider.onDidChange(i)),this._register(n.documentRangeFormattingEditProvider.onDidChange(i)),this._register(n.signatureHelpProvider.onDidChange(i)),this._register(n.inlayHintsProvider.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Ot.walkThroughSnippet)})}}class nat extends ne{constructor(e){super(),this._onChange=this._register(new Q),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(y1(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class iat{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(i=>{this._isChangingDecorations||e.call(t,i)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const n of this._decorationIds){const i=e.getDecorationRange(n);i&&t.push(i)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}}const rat=encodeURIComponent("");function qj(u){return rat+encodeURIComponent(u.toString())+aat}const oat=encodeURIComponent('');function lat(u){return oat+encodeURIComponent(u.toString())+sat}Kl((u,e)=>{const t=u.getColor(n1);t&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${qj(t)}") repeat-x bottom left; }`);const n=u.getColor(Hs);n&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${qj(n)}") repeat-x bottom left; }`);const i=u.getColor(Mo);i&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${qj(i)}") repeat-x bottom left; }`);const r=u.getColor(wXe);r&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${lat(r)}") no-repeat bottom left; }`);const a=u.getColor(Ktt);a&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${a.rgba.a}; }`)});var cat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},dat=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},hat=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let iG=class extends ne{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new Q),this._onCodeEditorAdd=this._register(new Q),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new Q),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new Q),this._onDiffEditorAdd=this._register(new Q),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new Q),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new to,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){const i=e.toString();let r;this._modelProperties.has(i)?r=this._modelProperties.get(i):(r=new Map,this._modelProperties.set(i,r)),r.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}openCodeEditor(e,t,n){return hat(this,void 0,void 0,function*(){for(const i of this._codeEditorOpenHandlers){const r=yield i(e,t,n);if(r!==null)return r}return null})}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return ft(t)}};iG=cat([dat(0,sr)],iG);var Eat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yse=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},mat=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let YB=class extends iG{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((n,i,r)=>mat(this,void 0,void 0,function*(){return i?this.doOpenEditor(i,n):null})))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===Ot.http||r===Ot.https)return d6e(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if(typeof i.endLineNumber=="number"&&typeof i.endColumn=="number")e.setSelection(i),e.revealRangeInCenter(i,1);else{const r={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};YB=Eat([yse(0,pt),yse(1,sr)],YB);au(Cu,YB,0);const f6=Ut("layoutService");var abe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},obe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let QB=class{get dimension(){return this._dimension||(this._dimension=c6(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayout=Ne.None,this.offset={top:0,quickPickTop:0}}};QB=abe([obe(0,Cu)],QB);let rG=class extends QB{get hasContainer(){return!1}get container(){return this._container}constructor(e,t){super(t),this._container=e}};rG=abe([obe(1,Cu)],rG);au(f6,QB,1);const DA=Ut("dialogService");var gat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ase=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},g9=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function f9(u){return u.scheme===Ot.file?u.fsPath:u.path}let sbe=0;class p9{constructor(e,t,n,i,r,a,o){this.id=++sbe,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=i,this.groupOrder=r,this.sourceId=a,this.sourceOrder=o,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class _se{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Sse{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(i.reason===0?e:t).push(i.resourceLabel);const n=[];return e.length>0&&n.push(v({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(v({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` `)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class fat{constructor(e,t,n,i,r,a,o){this.id=++sbe,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=i,this.groupOrder=r,this.sourceId=a,this.sourceOrder=o,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new Sse),this.removedResources.has(t)||this.removedResources.set(t,new _se(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Sse),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new _se(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class lbe{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let n=0,i=this._past.length;n=0;n--)t.push(this._future[n].id);return new ebe(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,i=0,r=-1;for(let o=0,s=this._past.length;o=t||l.id!==e.elements[i])&&(n=!1,r=0),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}let a=-1;for(let o=this._future.length-1;o>=0;o--,i++){const s=this._future[o];n&&(i>=t||s.id!==e.elements[i])&&(n=!1,a=o),!n&&s.type===1&&s.removeResource(this.resourceLabel,this.strResource,0)}r!==-1&&(this._past=this._past.slice(0,r)),a!==-1&&(this._future=this._future.slice(a+1)),this.versionId++}getElements(){const e=[],t=[];for(const n of this._past)e.push(n.actual);for(const n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Jj{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=a,n=i)}return[t,n]}canUndo(e){if(e instanceof Gd){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){zt(e);for(const n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,i,r){const a=this._acquireLocks(n);let o;try{o=t()}catch(s){return a(),i.dispose(),this._onError(s,e)}return o?o.then(()=>(a(),i.dispose(),r()),s=>(a(),i.dispose(),this._onError(s,e))):(a(),i.dispose(),r())}_invokeWorkspacePrepare(e){return g9(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return ne.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?ne.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(ne.None);const n=e.actual.prepareUndoRedo();return n?TQ(n)?t(n):n.then(i=>t(i)):t(ne.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||cbe);return new Jj(t)}_tryToSplitAndUndo(e,t,n,i){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(i),new D9(this._undo(e,0,!0));for(const r of t.strResources)this.removeElements(r);return this._notificationService.warn(i),new D9}_checkWorkspaceUndo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,v({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,v({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const o of n.editStacks)o.getClosestPastElement()!==t&&r.push(o.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const a=[];for(const o of n.editStacks)o.locked&&a.push(o.resourceLabel);return a.length>0?this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,a.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){const i=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,i,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,n,i){return g9(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;(function(c){c[c.All=0]="All",c[c.This=1]="This",c[c.Cancel=2]="Cancel"})(o||(o={}));const{result:s}=yield this._dialogService.prompt({type:si.Info,message:v("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:v({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>o.All},{label:v({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,n,!1);if(l)return l.returnValue;i=!0}let r;try{r=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const a=this._checkWorkspaceUndo(e,t,n,!0);if(a)return r.dispose(),a.returnValue;for(const o of n.editStacks)o.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,i))})}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=v({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new Jj([e]),i,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestPastElement();a&&a.groupId===e&&(!t||a.groupOrder>t.groupOrder)&&(t=a,n=i)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof Gd){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),r=i.getClosestPastElement();if(!r)return;if(r.groupId){const[o,s]=this._findClosestUndoElementInGroup(r.groupId);if(r!==o&&s)return this._undo(s,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(i,r,n)}finally{}}_confirmAndContinueUndo(e,t,n){return g9(this,void 0,void 0,function*(){if((yield this._dialogService.confirm({message:v("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:v({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:v("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestFutureElement();a&&a.sourceId===e&&(!t||a.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const a=[];for(const o of n.editStacks)o.locked&&a.push(o.resourceLabel);return a.length>0?this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,a.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceRedo(e,t,n,!1);return i?i.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return g9(this,void 0,void 0,function*(){let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return i.dispose(),r.returnValue;for(const a of n.editStacks)a.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,i,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=v({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new Jj([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestFutureElement();a&&a.groupId===e&&(!t||a.groupOrderZX(u,t))}function Dat(u){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(u.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},u=u.with({fragment:""})),{selection:e,uri:u}}var xat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wse=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const U0=Ut("ILanguageFeatureDebounceService");var XB;(function(u){const e=new WeakMap;let t=0;function n(i){let r=e.get(i);return r===void 0&&(r=++t,e.set(i,r)),r}u.of=n})(XB||(XB={}));class vat{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class Cat{constructor(e,t,n,i,r,a){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=r,this._max=a,this._cache=new gg(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>rP(XB.of(n),t),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?Yo(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new pat(6),this._cache.set(n,i));const r=Yo(i.update(t),this._min,this._max);return ZX(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new dbe;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return Yo(e,this._min,this._max)}}let oG=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){var i,r,a;const o=(i=n==null?void 0:n.min)!==null&&i!==void 0?i:50,s=(r=n==null?void 0:n.max)!==null&&r!==void 0?r:Math.pow(o,2),l=(a=n==null?void 0:n.key)!==null&&a!==void 0?a:void 0,c=`${XB.of(e)},${o}${l?","+l:""}`;let d=this._data.get(c);return d||(this._isDev?d=new Cat(this._logService,t,e,this._overallAverage()|0||o*1.5,o,s):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),d=new vat(o*1.5)),this._data.set(c,d)),d}_overallAverage(){const e=new dbe;for(const t of this._data.values())e.update(t.default());return e.value}};oG=xat([wse(0,i0),wse(1,JX)],oG);au(U0,oG,1);class h2{static create(e,t){return new h2(e,new ew(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new j(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,a]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new h2(this._startLineNumber,i),new h2(this._startLineNumber+a,r)]}applyEdit(e,t){const[n,i,r]=Vm(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new ee(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const r=n-t;this._startLineNumber-=r;return}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(t===0&&n===0)return;const a=e.lineNumber-this._startLineNumber;if(a<0){this._startLineNumber+=t;return}const o=this._tokens.getMaxDeltaLine();a>=o+1||this._tokens.acceptInsertText(a,e.column-1,t,n,i,r)}}class ew{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)n=i-1;else{let a=i;for(;a>t&&this._getDeltaLine(a-1)===e;)a--;let o=i;for(;oe||h===e&&m>=t)&&(he||m===e&&f>=t){if(mr?g-=r-n:g=n;else if(E===t&&m===n)if(E===i&&g>r)g-=r-n;else{c=!0;continue}else if(Er)E=t,m=n,g=m+(g-r);else{c=!0;continue}else if(E>i){if(s===0&&!c){l=o;break}E-=s}else if(E===i&&m>=r)e&&E===0&&(m+=e,g+=e),E-=s,m-=r-n,g-=r-n;else throw new Error("Not possible!");const p=4*l;a[p]=E,a[p+1]=m,a[p+2]=g,a[p+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,a){const o=n===0&&i===1&&(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122),s=this._tokens,l=this._tokenCount;for(let c=0;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Zj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let sG=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new bh}getMetadata(e,t,n){const i=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,i);let a;if(r)a=r.metadata,this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Jr.getForeground(a)}, fontStyle ${Jr.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const s=[];if(o){let l=t;for(let d=0;l>0&&d>1;l>0&&this._logService.getLevel()===qr.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),s.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(o,s,n);if(typeof c>"u")a=2147483647;else{if(a=0,typeof c.italic<"u"){const d=(c.italic?1:0)<<11;a|=d|1}if(typeof c.bold<"u"){const d=(c.bold?2:0)<<11;a|=d|2}if(typeof c.underline<"u"){const d=(c.underline?4:0)<<11;a|=d|4}if(typeof c.strikethrough<"u"){const d=(c.strikethrough?8:0)<<11;a|=d|8}if(c.foreground){const d=c.foreground<<15;a|=d|16}a===0&&(a=2147483647)}}else this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,i,a),this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${s.join(" ")}): foreground ${Jr.getForeground(a)}, fontStyle ${Jr.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};sG=bat([Zj(1,sr),Zj(2,vn),Zj(3,i0)],sG);function hbe(u,e,t){const n=u.data,i=u.data.length/5|0,r=Math.max(Math.ceil(i/1024),400),a=[];let o=0,s=1,l=0;for(;oc&&n[5*D]===0;)D--;if(D-1===c){let x=d;for(;x+1A)e.warnOverlappingSemanticTokens(k,A+1);else{const N=e.getMetadata(w,z,t);N!==2147483647&&(m===0&&(m=k),h[E]=k-m,h[E+1]=A,h[E+2]=S,h[E+3]=N,E+=4,g=k,f=S)}s=k,l=A,o++}E!==h.length&&(h=h.subarray(0,E));const p=h2.create(m,h);a.push(p)}return a}class kat{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class bh{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=bh._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=bh._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let lG=class extends ne{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new sG(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};lG=Fat([Yj(0,sr),Yj(1,i0),Yj(2,vn)],lG);au(kP,lG,1);var zse=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const x9="**",Mse="/",e8="[/\\\\]",t8="[^/\\\\]",yat=/\//g;function Tse(u,e){switch(u){case 0:return"";case 1:return`${t8}*?`;default:return`(?:${e8}|${t8}+${e8}${e?`|${e8}${t8}+`:""})*?`}}function Nse(u,e){if(!u)return[];const t=[];let n=!1,i=!1,r="";for(const a of u){switch(a){case e:if(!n&&!i){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":i=!0;break;case"]":i=!1;break}r+=a}return r&&t.push(r),t}function Ebe(u){if(!u)return"";let e="";const t=Nse(u,Mse);if(t.every(n=>n===x9))e=".*";else{let n=!1;t.forEach((i,r)=>{if(i===x9){if(n)return;e+=Tse(2,r===t.length-1)}else{let a=!1,o="",s=!1,l="";for(const c of i){if(c!=="}"&&a){o+=c;continue}if(s&&(c!=="]"||!l)){let d;c==="-"?d=c:(c==="^"||c==="!")&&!l?d="^":c===Mse?d="":d=qs(c),l+=d;continue}switch(c){case"{":a=!0;continue;case"[":s=!0;continue;case"}":{const h=`(?:${Nse(o,",").map(E=>Ebe(E)).join("|")})`;e+=h,a=!1,o="";break}case"]":{e+="["+l+"]",s=!1,l="";break}case"?":e+=t8;continue;case"*":e+=Tse(1);continue;default:e+=qs(c)}}rYX(o,e)).filter(o=>o!==g1),u),n=t.length;if(!n)return g1;if(n===1)return t[0];const i=function(o,s){for(let l=0,c=t.length;l!!o.allBasenames);r&&(i.allBasenames=r.allBasenames);const a=t.reduce((o,s)=>s.allPaths?o.concat(s.allPaths):o,[]);return a.length&&(i.allPaths=a),i}function Ose(u,e,t){const n=jc===Oi.sep,i=n?u:u.replace(yat,jc),r=jc+i,a=Oi.sep+u;let o;return t?o=function(s,l){return typeof s=="string"&&(s===i||s.endsWith(r)||!n&&(s===u||s.endsWith(a)))?e:null}:o=function(s,l){return typeof s=="string"&&(s===i||!n&&s===u)?e:null},o.allPaths=[(t?"*/":"./")+u],o}function Nat(u){try{const e=new RegExp(`^${Ebe(u)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?u:null}}catch{return g1}}function Pat(u,e,t){return!u||typeof e!="string"?!1:mbe(u)(e,void 0,t)}function mbe(u,e={}){if(!u)return Rse;if(typeof u=="string"||Rat(u)){const t=YX(u,e);if(t===g1)return Rse;const n=function(i,r){return!!t(i,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return Iat(u,e)}function Rat(u){const e=u;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Iat(u,e){const t=gbe(Object.getOwnPropertyNames(u).map(o=>Oat(o,u[o],e)).filter(o=>o!==g1)),n=t.length;if(!n)return g1;if(!t.some(o=>!!o.requiresSiblings)){if(n===1)return t[0];const o=function(c,d){let h;for(let E=0,m=t.length;Ezse(this,void 0,void 0,function*(){for(const E of h){const m=yield E;if(typeof m=="string")return m}return null}))():null},s=t.find(c=>!!c.allBasenames);s&&(o.allBasenames=s.allBasenames);const l=t.reduce((c,d)=>d.allPaths?c.concat(d.allPaths):c,[]);return l.length&&(o.allPaths=l),o}const i=function(o,s,l){let c,d;for(let h=0,E=t.length;hzse(this,void 0,void 0,function*(){for(const h of d){const E=yield h;if(typeof E=="string")return E}return null}))():null},r=t.find(o=>!!o.allBasenames);r&&(i.allBasenames=r.allBasenames);const a=t.reduce((o,s)=>s.allPaths?o.concat(s.allPaths):o,[]);return a.length&&(i.allPaths=a),i}function Oat(u,e,t){if(e===!1)return g1;const n=YX(u,t);if(n===g1)return g1;if(typeof e=="boolean")return n;if(e){const i=e.when;if(typeof i=="string"){const r=(a,o,s,l)=>{if(!l||!n(a,o))return null;const c=i.replace("$(basename)",()=>s),d=l(c);return mW(d)?d.then(h=>h?u:null):d?u:null};return r.requiresSiblings=!0,r}}return n}function gbe(u,e){const t=u.filter(o=>!!o.basenames);if(t.length<2)return u;const n=t.reduce((o,s)=>{const l=s.basenames;return l?o.concat(l):o},[]);let i;if(e){i=[];for(let o=0,s=n.length;o{const l=s.patterns;return l?o.concat(l):o},[]);const r=function(o,s){if(typeof o!="string")return null;if(!s){let c;for(c=o.length;c>0;c--){const d=o.charCodeAt(c-1);if(d===47||d===92)break}s=o.substr(c)}const l=n.indexOf(s);return l!==-1?i[l]:null};r.basenames=n,r.patterns=i,r.allBasenames=n;const a=u.filter(o=>!o.basenames);return a.push(r),a}function fbe(u,e,t,n,i,r){if(Array.isArray(u)){let a=0;for(const o of u){const s=fbe(o,e,t,n,i,r);if(s===10)return s;s>a&&(a=s)}return a}else{if(typeof u=="string")return n?u==="*"?5:u===t?10:0:0;if(u){const{language:a,pattern:o,scheme:s,hasAccessToAllModels:l,notebookType:c}=u;if(!n&&!l)return 0;c&&i&&(e=i);let d=0;if(s)if(s===e.scheme)d=10;else if(s==="*")d=5;else return 0;if(a)if(a===t)d=10;else if(a==="*")d=Math.max(d,5);else return 0;if(c)if(c===r)d=10;else if(c==="*"&&r!==void 0)d=Math.max(d,5);else return 0;if(o){let h;if(typeof o=="string"?h=o:h=Object.assign(Object.assign({},o),{base:yve(o.base)}),h===e.fsPath||Pat(h,e.fsPath))d=10;else return 0}return d}else return 0}}function pbe(u){return typeof u=="string"?!1:Array.isArray(u)?u.every(pbe):!!u.exclusive}class jse{constructor(e,t,n,i){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i}equals(e){var t,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((n=e.notebookUri)===null||n===void 0?void 0:n.toString())}}class ei{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new Q,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),ft(()=>{if(n){const i=this._entries.indexOf(n);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,n=>t.push(n.provider)),t}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,r=>{n&&i===r._score?n.push(r.provider):(i=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t){this._updateScores(e);for(const n of this._entries)n._score>0&&t(n)}_updateScores(e){var t,n;const i=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),r=i?new jse(e.uri,e.getLanguageId(),i.uri,i.type):new jse(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(const a of this._entries)if(a._score=fbe(a.selector,r.uri,r.languageId,_Ye(e),r.notebookUri,r.notebookType),pbe(a.selector)&&a._score>0){for(const o of this._entries)o._score=0;a._score=1e3;break}this._entries.sort(ei._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:Fb(e.selector)&&!Fb(t.selector)?1:!Fb(e.selector)&&Fb(t.selector)?-1:e._timet._time?-1:0}}function Fb(u){return typeof u=="string"?!1:Array.isArray(u)?u.some(Fb):!!u.isBuiltin}class jat{constructor(){this.referenceProvider=new ei(this._score.bind(this)),this.renameProvider=new ei(this._score.bind(this)),this.codeActionProvider=new ei(this._score.bind(this)),this.definitionProvider=new ei(this._score.bind(this)),this.typeDefinitionProvider=new ei(this._score.bind(this)),this.declarationProvider=new ei(this._score.bind(this)),this.implementationProvider=new ei(this._score.bind(this)),this.documentSymbolProvider=new ei(this._score.bind(this)),this.inlayHintsProvider=new ei(this._score.bind(this)),this.colorProvider=new ei(this._score.bind(this)),this.codeLensProvider=new ei(this._score.bind(this)),this.documentFormattingEditProvider=new ei(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ei(this._score.bind(this)),this.onTypeFormattingEditProvider=new ei(this._score.bind(this)),this.signatureHelpProvider=new ei(this._score.bind(this)),this.hoverProvider=new ei(this._score.bind(this)),this.documentHighlightProvider=new ei(this._score.bind(this)),this.selectionRangeProvider=new ei(this._score.bind(this)),this.foldingRangeProvider=new ei(this._score.bind(this)),this.linkProvider=new ei(this._score.bind(this)),this.inlineCompletionsProvider=new ei(this._score.bind(this)),this.completionProvider=new ei(this._score.bind(this)),this.linkedEditingRangeProvider=new ei(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ei(this._score.bind(this)),this.documentSemanticTokensProvider=new ei(this._score.bind(this)),this.documentOnDropEditProvider=new ei(this._score.bind(this)),this.documentPasteEditProvider=new ei(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}}au(We,jat,1);const xA=Ut("IWorkspaceEditService");class QX{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Zh.is(t))return Zh.lift(t);if(fx.is(t))return fx.lift(t);throw new Error("Unsupported edit")})}}class Zh extends QX{static is(e){return e instanceof Zh?!0:eo(e)&&dt.isUri(e.resource)&&eo(e.textEdit)}static lift(e){return e instanceof Zh?e:new Zh(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,i){super(i),this.resource=e,this.textEdit=t,this.versionId=n}}class fx extends QX{static is(e){return e instanceof fx?!0:eo(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof fx?e:new fx(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},i){super(i),this.oldResource=e,this.newResource=t,this.options=n}}const ya={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0},FP=Object.freeze({id:"editor",order:5,type:"object",title:v("editorConfigurationTitle","Editor"),scope:5}),tw=Object.assign(Object.assign({},FP),{properties:{"editor.tabSize":{type:"number",default:Ea.tabSize,minimum:1,markdownDescription:v("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:v("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Ea.insertSpaces,markdownDescription:v("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Ea.detectIndentation,markdownDescription:v("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Ea.trimAutoWhitespace,description:v("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Ea.largeFileOptimizations,description:v("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:v("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[v("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),v("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),v("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:v("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[v("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),v("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),v("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:v("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:v("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:v("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:v("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:v("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:v("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:v("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:v("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:v("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:ya.maxComputationTime,description:v("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:ya.maxFileSize,description:v("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:ya.renderSideBySide,description:v("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:ya.renderSideBySideInlineBreakpoint,description:v("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:ya.useInlineViewWhenSpaceIsLimited,description:v("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:ya.renderMarginRevertIcon,description:v("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:ya.ignoreTrimWhitespace,description:v("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:ya.renderIndicators,description:v("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:ya.diffCodeLens,description:v("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:ya.diffWordWrap,markdownEnumDescriptions:[v("wordWrap.off","Lines will never wrap."),v("wordWrap.on","Lines will wrap at the viewport width."),v("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:ya.diffAlgorithm,markdownEnumDescriptions:[v("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),v("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:ya.hideUnchangedRegions.enabled,markdownDescription:v("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:ya.hideUnchangedRegions.revealLineCount,markdownDescription:v("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:ya.hideUnchangedRegions.minimumLineCount,markdownDescription:v("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:ya.hideUnchangedRegions.contextLineCount,markdownDescription:v("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:ya.experimental.showMoves,markdownDescription:v("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:ya.experimental.showEmptyDecorations,description:v("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});function Hat(u){return typeof u.type<"u"||typeof u.anyOf<"u"}for(const u of a5){const e=u.schema;if(typeof e<"u")if(Hat(e))tw.properties[`editor.${u.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(tw.properties[t]=e[t])}let v9=null;function Dbe(){return v9===null&&(v9=Object.create(null),Object.keys(tw.properties).forEach(u=>{v9[u]=!0})),v9}function Vat(u){return Dbe()[`editor.${u}`]||!1}function $at(u){return Dbe()[`diffEditor.${u}`]||!1}const Kat=jn.as(Ed.Configuration);Kat.registerConfiguration(tw);class yn{static insert(e,t){return{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function Xj(u){return Object.isFrozen(u)?u:_Ge(u)}class ca{constructor(e={},t=[],n=[],i){this._contents=e,this._keys=t,this._overrides=n,this.raw=i,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){const t=this.raw.map(n=>{if(n instanceof ca)return n;const i=new Wat("");return i.parseRaw(n),i.configurationModel});this._rawConfiguration=t.reduce((n,i)=>i===n?i:n.merge(i),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Sae(this.contents,e):this.contents}inspect(e,t){const n=this.rawConfiguration.getValue(e),i=t?this.rawConfiguration.getOverrideValue(e,t):void 0,r=t?this.rawConfiguration.override(t).getValue(e):n;return{value:n,override:i,merged:r}}getOverrideValue(e,t){const n=this.getContentsForOverrideIdentifer(t);return n?e?Sae(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,n;const i=xh(this.contents),r=xh(this.overrides),a=[...this.keys],o=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(const s of e)if(o.push(...!((n=s.raw)===null||n===void 0)&&n.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(i,s.contents);for(const l of s.overrides){const[c]=r.filter(d=>di(d.identifiers,l.identifiers));c?(this.mergeContents(c.contents,l.contents),c.keys.push(...l.keys),c.keys=Lm(c.keys)):r.push(xh(l))}for(const l of s.keys)a.indexOf(l)===-1&&a.push(l)}return new ca(i,a,r,o.every(s=>s instanceof ca)?void 0:o)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const n={};for(const i of Lm([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[i];const a=t[i];a&&(typeof r=="object"&&typeof a=="object"?(r=xh(r),this.mergeContents(r,a)):r=a),n[i]=r}return new ca(n,this.keys,this.overrides)}mergeContents(e,t){for(const n of Object.keys(t)){if(n in e&&eo(e[n])&&eo(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=xh(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null;const i=r=>{r&&(n?this.mergeContents(n,r):n=xh(r))};for(const r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&i(r.contents);return i(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),$Ze(this.contents,e),Im.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>di(n.identifiers,yB(e))),1))}updateValue(e,t,n){A6e(this.contents,e,t,i=>console.error(i)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),Im.test(e)&&this.overrides.push({identifiers:yB(e),keys:Object.keys(this.contents[e]),contents:pW(this.contents[e],i=>console.error(i))})}}class Wat{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new ca}parseRaw(e,t){this._raw=e;const{contents:n,keys:i,overrides:r,restricted:a,hasExcludedProperties:o}=this.doParseRaw(e,t);this._configurationModel=new ca(n,i,r,o?[e]:void 0),this._restrictedConfigurations=a||[]}doParseRaw(e,t){const n=jn.as(Ed.Configuration).getConfigurationProperties(),i=this.filter(e,n,!0,t);e=i.raw;const r=pW(e,s=>console.error(`Conflict in settings file ${this._name}: ${s}`)),a=Object.keys(e),o=this.toOverrides(e,s=>console.error(`Conflict in settings file ${this._name}: ${s}`));return{contents:r,keys:a,overrides:o,restricted:i.restricted,hasExcludedProperties:i.hasExcludedProperties}}filter(e,t,n,i){var r,a,o;let s=!1;if(!(i!=null&&i.scopes)&&!(i!=null&&i.skipRestricted)&&!(!((r=i==null?void 0:i.exclude)===null||r===void 0)&&r.length))return{raw:e,restricted:[],hasExcludedProperties:s};const l={},c=[];for(const d in e)if(Im.test(d)&&n){const h=this.filter(e[d],t,!1,i);l[d]=h.raw,s=s||h.hasExcludedProperties,c.push(...h.restricted)}else{const h=t[d],E=h?typeof h.scope<"u"?h.scope:3:void 0;h!=null&&h.restricted&&c.push(d),!(!((a=i.exclude)===null||a===void 0)&&a.includes(d))&&(!((o=i.include)===null||o===void 0)&&o.includes(d)||(E===void 0||i.scopes===void 0||i.scopes.includes(E))&&!(i.skipRestricted&&(h!=null&&h.restricted)))?l[d]=e[d]:s=!0}return{raw:l,restricted:c,hasExcludedProperties:s}}toOverrides(e,t){const n=[];for(const i of Object.keys(e))if(Im.test(i)){const r={};for(const a in e[i])r[a]=e[i][a];n.push({identifiers:yB(i),keys:Object.keys(r),contents:pW(r,t)})}return n}}class Gat{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=i,this.defaultConfiguration=r,this.policyConfiguration=a,this.applicationConfiguration=o,this.userConfiguration=s,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=E}inspect(e,t,n){const i=e.inspect(t,n);return{get value(){return Xj(i.value)},get override(){return Xj(i.override)},get merged(){return Xj(i.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class yP{constructor(e,t,n,i,r=new ca,a=new ca,o=new ma,s=new ca,l=new ma){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=i,this._remoteUserConfiguration=r,this._workspaceConfiguration=a,this._folderConfigurations=o,this._memoryConfiguration=s,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ma,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource),i||(i=new ca,this._memoryConfigurationByResource.set(n.resource,i))):i=this._memoryConfiguration,t===void 0?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const i=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),a=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,o=new Set;for(const s of i.overrides)for(const l of s.identifiers)i.getOverrideValue(e,l)!==void 0&&o.add(l);return new Gat(e,t,i.getValue(e),o.size?[...o]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,a)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let i=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(i=i.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(i=i.merge(this._policyConfiguration)),i}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:n,overrides:i,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:i,keys:r}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.policy),i=this.parseConfigurationModel(e.application),r=this.parseConfigurationModel(e.user),a=this.parseConfigurationModel(e.workspace),o=e.folders.reduce((s,l)=>(s.set(dt.revive(l[0]),this.parseConfigurationModel(l[1])),s),new ma);return new yP(t,n,i,r,new ca,a,o,new ca,new ma)}static parseConfigurationModel(e){return new ca(e.contents,e.keys,e.overrides)}}class Uat{constructor(e,t,n,i){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=i,this._marker=` -`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const r of e.keys)this.affectedKeys.add(r);for(const[,r]of e.overrides)for(const a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=yP.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;const i=this._marker+e,r=this._affectsConfigStr.indexOf(i);if(r<0)return!1;const a=r+i.length;if(a>=this._affectsConfigStr.length)return!1;const o=this._affectsConfigStr.charCodeAt(a);if(o!==this._markerCode1&&o!==this._markerCode2)return!1;if(t){const s=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!$s(s,l)}return!0}}const uw={kind:0},qat={kind:1};function Jat(u,e,t){return{kind:2,commandId:u,commandArgs:e,isBubble:t}}class E2{constructor(e,t,n){var i;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const r of e){const a=r.command;a&&a.charAt(0)!=="-"&&this._defaultBoundCommands.set(a,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=E2.handleRemovals([].concat(e).concat(t));for(let r=0,a=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let i=n.length-1;i>=0;i--){const r=n[i];if(r.command===t.command)continue;let a=!0;for(let o=1;o"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,i=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let i=n.length-1;i>=0;i--){const r=n[i];if(t.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,t,n){const i=[...t,n];this._log(`| Resolving ${i}`);const r=this._map.get(i[0]);if(r===void 0)return this._log("\\ No keybinding entries."),uw;let a=null;if(i.length<2)a=r;else{a=[];for(let s=0,l=r.length;sc.chords.length)continue;let d=!0;for(let h=1;h=0;n--){const i=t[n];if(E2._contextMatchesRules(e,i.when))return i}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function Hse(u){return u?`${u.serialize()}`:"no when condition"}function Vse(u){return u.extensionId?u.isBuiltinExtension?`built-in extension ${u.extensionId}`:`user extension ${u.extensionId}`:u.isDefault?"built-in":"user"}const Zat=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class Yat extends ne{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Ne.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,i,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=i,this._logService=r,this._onDidUpdateKeybindings=this._register(new Q),this._currentChords=[],this._currentChordChecker=new rA,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Vl,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),uw;const[i]=n.getDispatchChords();if(i===null)return this._log("\\ Keyboard event cannot be dispatched"),uw;const r=this._contextKeyService.getContext(t),a=this._currentChords.map(({keypress:o})=>o);return this._getResolver().resolve(r,a,i)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw MQ("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(v("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const n=this._currentChords.map(({label:i})=>i).join(", ");this._currentChordStatusMessage=this._notificationService.status(v("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),Xb.enabled&&Xb.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Xb.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[i]=n.getSingleModifierDispatchChords();if(i)return this._ignoreSingleModifiers.has(i)?(this._log(`+ Ignoring single modifier ${i} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${i}.`),this._currentSingleModifier=i,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):i===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${i} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[r]=n.getChords();return this._ignoreSingleModifiers=new C5(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){var i;let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let a=null,o=null;if(n){const[d]=e.getSingleModifierDispatchChords();a=d,o=d?[d]:[]}else[a]=e.getDispatchChords(),o=this._currentChords.map(({keypress:d})=>d);if(a===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;const s=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(s,o,a);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(v("missing.chord","The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(a,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(v("missing.chord","The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else this.inChordMode&&this._leaveChordMode(),c.isBubble||(r=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d)),Zat.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:(i=e.getUserSettingsLabel())!==null&&i!==void 0?i:void 0});return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class C5{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}C5.EMPTY=new C5(null);class $se{constructor(e,t,n,i,r,a,o){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?cG(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=cG(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=r,this.extensionId=a,this.isBuiltinExtension=o}}function cG(u){const e=[];for(let t=0,n=u.length;tthis._getLabel(e))}getAriaLabel(){return Qat.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Xat.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return eot.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new uJe(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class Ok extends uot{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Sh.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Sh.toString(e.keyCode)}_getElectronAccelerator(e){return Sh.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=Sh.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return Ok.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Sh.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=OQ[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof c4)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new c4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const n=cG(e.chords.map(i=>this._toKeyCodeChord(i)));return n.length>0?[new Ok(n,t)]:[]}}const cv=Ut("labelService"),xbe=Ut("progressService");class Yh{constructor(e,t){this.callback=e,this.report=t!=null&&t.async?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(e){this._value=e,this.callback(this._value)}_reportAsync(e){Promise.resolve(this._lastTask).finally(()=>{this._value=e;const t=this.callback(this._value);this._lastTask=Promise.resolve(t).finally(()=>this._lastTask=void 0)})}}Yh.None=Object.freeze({report(){}});const Dg=Ut("editorProgressService");class not{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new px(new aot(e,t))}static forStrings(){return new px(new not)}static forConfigKeys(){return new px(new iot)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let i;this._root||(this._root=new C9,this._root.segment=n.value());const r=[];for(i=this._root;;){const o=n.cmp(i.segment);if(o>0)i.left||(i.left=new C9,i.left.segment=n.value()),r.push([-1,i]),i=i.left;else if(o<0)i.right||(i.right=new C9,i.right.segment=n.value()),r.push([1,i]),i=i.right;else if(n.hasNext())n.next(),i.mid||(i.mid=new C9,i.mid.segment=n.value()),r.push([0,i]),i=i.mid;else break}const a=i.value;i.value=t,i.key=e;for(let o=r.length-1;o>=0;o--){const s=r[o][1];s.updateHeight();const l=s.balanceFactor();if(l<-1||l>1){const c=r[o][0],d=r[o+1][0];if(c===1&&d===1)r[o][1]=s.rotateLeft();else if(c===-1&&d===-1)r[o][1]=s.rotateRight();else if(c===1&&d===-1)s.right=r[o+1][1]=r[o+1][1].rotateRight(),r[o][1]=s.rotateLeft();else if(c===-1&&d===1)s.left=r[o+1][1]=r[o+1][1].rotateLeft(),r[o][1]=s.rotateRight();else throw new Error;if(o>0)switch(r[o-1][0]){case-1:r[o-1][1].left=r[o][1];break;case 1:r[o-1][1].right=r[o][1];break;case 0:r[o-1][1].mid=r[o][1];break}else this._root=r[0][1]}}return a}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var n;const i=this._iter.reset(e),r=[];let a=this._root;for(;a;){const o=i.cmp(a.segment);if(o>0)r.push([-1,a]),a=a.left;else if(o<0)r.push([1,a]),a=a.right;else if(i.hasNext())i.next(),r.push([0,a]),a=a.mid;else break}if(a){if(t?(a.left=void 0,a.mid=void 0,a.right=void 0,a.height=1):(a.key=void 0,a.value=void 0),!a.mid&&!a.value)if(a.left&&a.right){const o=this._min(a.right);if(o.key){const{key:s,value:l,segment:c}=o;this._delete(o.key,!1),a.key=s,a.value=l,a.segment=c}}else{const o=(n=a.left)!==null&&n!==void 0?n:a.right;if(r.length>0){const[s,l]=r[r.length-1];switch(s){case-1:l.left=o;break;case 0:l.mid=o;break;case 1:l.right=o;break}}else this._root=o}for(let o=r.length-1;o>=0;o--){const s=r[o][1];s.updateHeight();const l=s.balanceFactor();if(l>1?(s.right.balanceFactor()>=0||(s.right=s.right.rotateRight()),r[o][1]=s.rotateLeft()):l<-1&&(s.left.balanceFactor()<=0||(s.left=s.left.rotateLeft()),r[o][1]=s.rotateRight()),o>0)switch(r[o-1][0]){case-1:r[o-1][1].left=r[o][1];break;case 1:r[o-1][1].right=r[o][1];break;case 0:r[o-1][1].mid=r[o][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let n=this._root,i;for(;n;){const r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),i=n.value||i,n=n.mid;else break}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const n=this._iter.reset(e);let i=this._root;for(;i;){const r=n.cmp(i.segment);if(r>0)i=i.left;else if(r<0)i=i.right;else if(n.hasNext())n.next(),i=i.mid;else return i.mid?this._entries(i.mid):t?i.value:void 0}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const M3=Ut("contextService");function dG(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&dt.isUri(e.uri)}function oot(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&!dG(u)&&!dot(u)}const sot={id:"ext-dev"},lot={id:"empty-window"};function cot(u,e){if(typeof u=="string"||typeof u>"u")return typeof u=="string"?{id:QE(u)}:e?sot:lot;const t=u;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function dot(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&dt.isUri(e.configPath)}let hot=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}};const hG="code-workspace";v("codeWorkspace","Code Workspace");const vbe="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function Eot(u){return u.id===vbe}var EG;(function(u){u.inspectTokensAction=v("inspectTokens","Developer: Inspect Tokens")})(EG||(EG={}));var nw;(function(u){u.gotoLineActionLabel=v("gotoLineActionLabel","Go to Line/Column...")})(nw||(nw={}));var mG;(function(u){u.helpQuickAccessActionLabel=v("helpQuickAccess","Show all Quick Access Providers")})(mG||(mG={}));var iw;(function(u){u.quickCommandActionLabel=v("quickCommandActionLabel","Command Palette"),u.quickCommandHelp=v("quickCommandActionHelp","Show And Run Commands")})(iw||(iw={}));var jk;(function(u){u.quickOutlineActionLabel=v("quickOutlineActionLabel","Go to Symbol..."),u.quickOutlineByCategoryActionLabel=v("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(jk||(jk={}));var rw;(function(u){u.editorViewAccessibleLabel=v("editorViewAccessibleLabel","Editor content"),u.accessibilityHelpMessage=v("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(rw||(rw={}));var gG;(function(u){u.toggleHighContrast=v("toggleHighContrast","Toggle High Contrast Theme")})(gG||(gG={}));var fG;(function(u){u.bulkEditServiceSummary=v("bulkEditServiceSummary","Made {0} edits in {1} files")})(fG||(fG={}));const Cbe=Ut("workspaceTrustManagementService"),F4=Ut("contextViewService"),Wl=Ut("contextMenuService");var aa;(function(u){function e(r,a){if(r.start>=a.end||a.start>=r.end)return{start:0,end:0};const o=Math.max(r.start,a.start),s=Math.min(r.end,a.end);return s-o<=0?{start:0,end:0}:{start:o,end:s}}u.intersect=e;function t(r){return r.end-r.start<=0}u.isEmpty=t;function n(r,a){return!t(e(r,a))}u.intersects=n;function i(r,a){const o=[],s={start:r.start,end:Math.min(a.start,r.end)},l={start:Math.max(a.end,r.start),end:r.end};return t(s)||o.push(s),t(l)||o.push(l),o}u.relativeComplement=i})(aa||(aa={}));function mot(u){const e=u;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var TE;(function(u){u[u.AVOID=0]="AVOID",u[u.ALIGN=1]="ALIGN"})(TE||(TE={}));function b5(u,e,t){const n=t.mode===TE.ALIGN?t.offset:t.offset+t.size,i=t.mode===TE.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=u-n?n:e<=i?i-e:Math.max(u-e,0):e<=i?i-e:e<=u-n?n:0}class dv extends ne{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=ne.None,this.toDisposeOnSetContainer=ne.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=ve(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Ya(this.view),this.setContainer(e,t),this._register(ft(()=>this.setContainer(null,1)))}setContainer(e,t){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=ve(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=got,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(ve("slot"))}else this.container.appendChild(this.view);const i=new pe;dv.BUBBLE_UP_EVENTS.forEach(r=>{i.add(xi(this.container,r,a=>{this.onDOMEvent(a,!1)}))}),dv.BUBBLE_DOWN_EVENTS.forEach(r=>{i.add(xi(this.container,r,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=i}}show(e){var t,n;this.isVisible()&&this.hide(),Nr(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",us(this.view),this.toDisposeOnClean=e.render(this.view)||ne.None,this.delegate=e,this.doLayout(),(n=(t=this.delegate).focus)===null||n===void 0||n.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Zc&&QQ.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(eX(e)){const d=ji(e),h=qJe(e);t={top:d.top*h,left:d.left*h,width:d.width*h,height:d.height*h}}else mot(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};const n=ko(this.view),i=Rf(this.view),r=this.delegate.anchorPosition||0,a=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let s,l;if(o===0){const d={offset:t.top-window.pageYOffset,size:t.height,position:r===0?0:1},h={offset:t.left,size:t.width,position:a===0?0:1,mode:TE.ALIGN};s=b5(window.innerHeight,i,d)+window.pageYOffset,aa.intersects({start:s,end:s+i},{start:d.offset,end:d.offset+d.size})&&(h.mode=TE.AVOID),l=b5(window.innerWidth,n,h)}else{const d={offset:t.left,size:t.width,position:a===0?0:1},h={offset:t.top,size:t.height,position:r===0?0:1,mode:TE.ALIGN};l=b5(window.innerWidth,n,d),aa.intersects({start:l,end:l+n},{start:d.offset,end:d.offset+d.size})&&(h.mode=TE.AVOID),s=b5(window.innerHeight,i,h)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(a===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=ji(this.container);this.view.style.top=`${s-(this.useFixedPosition?ji(this.view).top:c.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?ji(this.view).left:c.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Ya(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Qr(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}dv.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];dv.BUBBLE_DOWN_EVENTS=["click"];const got=` +`))}pushElement(e,t=sv.None,n=Gd.None){if(e.type===0){const i=f9(e.resource),r=this.getUriComparisonKey(e.resource);this._pushElement(new p9(e,i,r,t.id,t.nextOrder(),n.id,n.nextOrder()))}else{const i=new Set,r=[],a=[];for(const o of e.resources){const s=f9(o),l=this.getUriComparisonKey(o);i.has(l)||(i.add(l),r.push(s),a.push(l))}r.length===1?this._pushElement(new p9(e,r[0],a[0],t.id,t.nextOrder(),n.id,n.nextOrder())):this._pushElement(new fat(e,r,a,t.id,t.nextOrder(),n.id,n.nextOrder()))}}_pushElement(e){for(let t=0,n=e.strResources.length;tt.sourceOrder)&&(t=a,n=i)}return[t,n]}canUndo(e){if(e instanceof Gd){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){zt(e);for(const n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,i,r){const a=this._acquireLocks(n);let o;try{o=t()}catch(s){return a(),i.dispose(),this._onError(s,e)}return o?o.then(()=>(a(),i.dispose(),r()),s=>(a(),i.dispose(),this._onError(s,e))):(a(),i.dispose(),r())}_invokeWorkspacePrepare(e){return g9(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo>"u")return ne.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?ne.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(ne.None);const n=e.actual.prepareUndoRedo();return n?TQ(n)?t(n):n.then(i=>t(i)):t(ne.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||cbe);return new Jj(t)}_tryToSplitAndUndo(e,t,n,i){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(i),new D9(this._undo(e,0,!0));for(const r of t.strResources)this.removeElements(r);return this._notificationService.warn(i),new D9}_checkWorkspaceUndo(e,t,n,i){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,v({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(i&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,v({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const o of n.editStacks)o.getClosestPastElement()!==t&&r.push(o.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const a=[];for(const o of n.editStacks)o.locked&&a.push(o.resourceLabel);return a.length>0?this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,a.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,v({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){const i=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,i,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,n,i){return g9(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;(function(c){c[c.All=0]="All",c[c.This=1]="This",c[c.Cancel=2]="Cancel"})(o||(o={}));const{result:s}=yield this._dialogService.prompt({type:si.Info,message:v("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:v({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",n.editStacks.length),run:()=>o.All},{label:v({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,n,!1);if(l)return l.returnValue;i=!0}let r;try{r=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const a=this._checkWorkspaceUndo(e,t,n,!0);if(a)return r.dispose(),a.returnValue;for(const o of n.editStacks)o.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,i))})}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=v({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new Jj([e]),i,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestPastElement();a&&a.groupId===e&&(!t||a.groupOrder>t.groupOrder)&&(t=a,n=i)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof Gd){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;const i=this._editStacks.get(e),r=i.getClosestPastElement();if(!r)return;if(r.groupId){const[o,s]=this._findClosestUndoElementInGroup(r.groupId);if(r!==o&&s)return this._undo(s,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(i,r,n)}finally{}}_confirmAndContinueUndo(e,t,n){return g9(this,void 0,void 0,function*(){if((yield this._dialogService.confirm({message:v("confirmDifferentSource","Would you like to undo '{0}'?",n.label),primaryButton:v({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:v("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)})}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestFutureElement();a&&a.sourceId===e&&(!t||a.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const a=[];for(const o of n.editStacks)o.locked&&a.push(o.resourceLabel);return a.length>0?this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,a.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,v({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),i=this._checkWorkspaceRedo(e,t,n,!1);return i?i.returnValue:this._executeWorkspaceRedo(e,t,n)}_executeWorkspaceRedo(e,t,n){return g9(this,void 0,void 0,function*(){let i;try{i=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return i.dispose(),r.returnValue;for(const a of n.editStacks)a.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,i,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=v({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new Jj([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[i,r]of this._editStacks){const a=r.getClosestFutureElement();a&&a.groupId===e&&(!t||a.groupOrderZX(u,t))}function Dat(u){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(u.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},u=u.with({fragment:""})),{selection:e,uri:u}}var xat=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wse=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const q0=Ut("ILanguageFeatureDebounceService");var XB;(function(u){const e=new WeakMap;let t=0;function n(i){let r=e.get(i);return r===void 0&&(r=++t,e.set(i,r)),r}u.of=n})(XB||(XB={}));class vat{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class Cat{constructor(e,t,n,i,r,a){this._logService=e,this._name=t,this._registry=n,this._default=i,this._min=r,this._max=a,this._cache=new gg(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>rP(XB.of(n),t),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?Qo(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let i=this._cache.get(n);i||(i=new pat(6),this._cache.set(n,i));const r=Qo(i.update(t),this._min,this._max);return ZX(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new dbe;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return Qo(e,this._min,this._max)}}let oG=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){var i,r,a;const o=(i=n==null?void 0:n.min)!==null&&i!==void 0?i:50,s=(r=n==null?void 0:n.max)!==null&&r!==void 0?r:Math.pow(o,2),l=(a=n==null?void 0:n.key)!==null&&a!==void 0?a:void 0,c=`${XB.of(e)},${o}${l?","+l:""}`;let d=this._data.get(c);return d||(this._isDev?d=new Cat(this._logService,t,e,this._overallAverage()|0||o*1.5,o,s):(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),d=new vat(o*1.5)),this._data.set(c,d)),d}_overallAverage(){const e=new dbe;for(const t of this._data.values())e.update(t.default());return e.value}};oG=xat([wse(0,r0),wse(1,JX)],oG);au(q0,oG,1);class h2{static create(e,t){return new h2(e,new ew(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new j(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[i,r,a]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new h2(this._startLineNumber,i),new h2(this._startLineNumber+a,r)]}applyEdit(e,t){const[n,i,r]=Vm(t);this.acceptEdit(e,n,i,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,i,r){this._acceptDeleteRange(e),this._acceptInsertText(new ee(e.startLineNumber,e.startColumn),t,n,i,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const r=n-t;this._startLineNumber-=r;return}const i=this._tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,i,r){if(t===0&&n===0)return;const a=e.lineNumber-this._startLineNumber;if(a<0){this._startLineNumber+=t;return}const o=this._tokens.getMaxDeltaLine();a>=o+1||this._tokens.acceptInsertText(a,e.column-1,t,n,i,r)}}class ew{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)n=i-1;else{let a=i;for(;a>t&&this._getDeltaLine(a-1)===e;)a--;let o=i;for(;oe||h===e&&m>=t)&&(he||m===e&&f>=t){if(mr?g-=r-n:g=n;else if(E===t&&m===n)if(E===i&&g>r)g-=r-n;else{c=!0;continue}else if(Er)E=t,m=n,g=m+(g-r);else{c=!0;continue}else if(E>i){if(s===0&&!c){l=o;break}E-=s}else if(E===i&&m>=r)e&&E===0&&(m+=e,g+=e),E-=s,m-=r-n,g-=r-n;else throw new Error("Not possible!");const p=4*l;a[p]=E,a[p+1]=m,a[p+2]=g,a[p+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,n,i,r,a){const o=n===0&&i===1&&(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122),s=this._tokens,l=this._tokenCount;for(let c=0;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Zj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let sG=class{constructor(e,t,n,i){this._legend=e,this._themeService=t,this._languageService=n,this._logService=i,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new bh}getMetadata(e,t,n){const i=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,i);let a;if(r)a=r.metadata,this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${Jr.getForeground(a)}, fontStyle ${Jr.getFontStyle(a).toString(2)}`);else{let o=this._legend.tokenTypes[e];const s=[];if(o){let l=t;for(let d=0;l>0&&d>1;l>0&&this._logService.getLevel()===qr.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),s.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(o,s,n);if(typeof c>"u")a=2147483647;else{if(a=0,typeof c.italic<"u"){const d=(c.italic?1:0)<<11;a|=d|1}if(typeof c.bold<"u"){const d=(c.bold?2:0)<<11;a|=d|2}if(typeof c.underline<"u"){const d=(c.underline?4:0)<<11;a|=d|4}if(typeof c.strikethrough<"u"){const d=(c.strikethrough?8:0)<<11;a|=d|8}if(c.foreground){const d=c.foreground<<15;a|=d|16}a===0&&(a=2147483647)}}else this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,o="not-in-legend";this._hashTable.add(e,t,i,a),this._logService.getLevel()===qr.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${s.join(" ")}): foreground ${Jr.getForeground(a)}, fontStyle ${Jr.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,i,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${i} is outside the previous data (length ${r}).`))}};sG=bat([Zj(1,sr),Zj(2,vn),Zj(3,r0)],sG);function hbe(u,e,t){const n=u.data,i=u.data.length/5|0,r=Math.max(Math.ceil(i/1024),400),a=[];let o=0,s=1,l=0;for(;oc&&n[5*D]===0;)D--;if(D-1===c){let x=d;for(;x+1A)e.warnOverlappingSemanticTokens(k,A+1);else{const N=e.getMetadata(w,z,t);N!==2147483647&&(m===0&&(m=k),h[E]=k-m,h[E+1]=A,h[E+2]=S,h[E+3]=N,E+=4,g=k,f=S)}s=k,l=A,o++}E!==h.length&&(h=h.subarray(0,E));const p=h2.create(m,h);a.push(p)}return a}class kat{constructor(e,t,n,i){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=i,this.next=null}}class bh{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=bh._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=bh._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yj=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let lG=class extends ne{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new sG(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};lG=Fat([Yj(0,sr),Yj(1,r0),Yj(2,vn)],lG);au(kP,lG,1);var zse=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const x9="**",Mse="/",e8="[/\\\\]",t8="[^/\\\\]",yat=/\//g;function Tse(u,e){switch(u){case 0:return"";case 1:return`${t8}*?`;default:return`(?:${e8}|${t8}+${e8}${e?`|${e8}${t8}+`:""})*?`}}function Nse(u,e){if(!u)return[];const t=[];let n=!1,i=!1,r="";for(const a of u){switch(a){case e:if(!n&&!i){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":i=!0;break;case"]":i=!1;break}r+=a}return r&&t.push(r),t}function Ebe(u){if(!u)return"";let e="";const t=Nse(u,Mse);if(t.every(n=>n===x9))e=".*";else{let n=!1;t.forEach((i,r)=>{if(i===x9){if(n)return;e+=Tse(2,r===t.length-1)}else{let a=!1,o="",s=!1,l="";for(const c of i){if(c!=="}"&&a){o+=c;continue}if(s&&(c!=="]"||!l)){let d;c==="-"?d=c:(c==="^"||c==="!")&&!l?d="^":c===Mse?d="":d=Js(c),l+=d;continue}switch(c){case"{":a=!0;continue;case"[":s=!0;continue;case"}":{const h=`(?:${Nse(o,",").map(E=>Ebe(E)).join("|")})`;e+=h,a=!1,o="";break}case"]":{e+="["+l+"]",s=!1,l="";break}case"?":e+=t8;continue;case"*":e+=Tse(1);continue;default:e+=Js(c)}}rYX(o,e)).filter(o=>o!==g1),u),n=t.length;if(!n)return g1;if(n===1)return t[0];const i=function(o,s){for(let l=0,c=t.length;l!!o.allBasenames);r&&(i.allBasenames=r.allBasenames);const a=t.reduce((o,s)=>s.allPaths?o.concat(s.allPaths):o,[]);return a.length&&(i.allPaths=a),i}function Ose(u,e,t){const n=jc===Oi.sep,i=n?u:u.replace(yat,jc),r=jc+i,a=Oi.sep+u;let o;return t?o=function(s,l){return typeof s=="string"&&(s===i||s.endsWith(r)||!n&&(s===u||s.endsWith(a)))?e:null}:o=function(s,l){return typeof s=="string"&&(s===i||!n&&s===u)?e:null},o.allPaths=[(t?"*/":"./")+u],o}function Nat(u){try{const e=new RegExp(`^${Ebe(u)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?u:null}}catch{return g1}}function Pat(u,e,t){return!u||typeof e!="string"?!1:mbe(u)(e,void 0,t)}function mbe(u,e={}){if(!u)return Rse;if(typeof u=="string"||Rat(u)){const t=YX(u,e);if(t===g1)return Rse;const n=function(i,r){return!!t(i,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return Iat(u,e)}function Rat(u){const e=u;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function Iat(u,e){const t=gbe(Object.getOwnPropertyNames(u).map(o=>Oat(o,u[o],e)).filter(o=>o!==g1)),n=t.length;if(!n)return g1;if(!t.some(o=>!!o.requiresSiblings)){if(n===1)return t[0];const o=function(c,d){let h;for(let E=0,m=t.length;Ezse(this,void 0,void 0,function*(){for(const E of h){const m=yield E;if(typeof m=="string")return m}return null}))():null},s=t.find(c=>!!c.allBasenames);s&&(o.allBasenames=s.allBasenames);const l=t.reduce((c,d)=>d.allPaths?c.concat(d.allPaths):c,[]);return l.length&&(o.allPaths=l),o}const i=function(o,s,l){let c,d;for(let h=0,E=t.length;hzse(this,void 0,void 0,function*(){for(const h of d){const E=yield h;if(typeof E=="string")return E}return null}))():null},r=t.find(o=>!!o.allBasenames);r&&(i.allBasenames=r.allBasenames);const a=t.reduce((o,s)=>s.allPaths?o.concat(s.allPaths):o,[]);return a.length&&(i.allPaths=a),i}function Oat(u,e,t){if(e===!1)return g1;const n=YX(u,t);if(n===g1)return g1;if(typeof e=="boolean")return n;if(e){const i=e.when;if(typeof i=="string"){const r=(a,o,s,l)=>{if(!l||!n(a,o))return null;const c=i.replace("$(basename)",()=>s),d=l(c);return mW(d)?d.then(h=>h?u:null):d?u:null};return r.requiresSiblings=!0,r}}return n}function gbe(u,e){const t=u.filter(o=>!!o.basenames);if(t.length<2)return u;const n=t.reduce((o,s)=>{const l=s.basenames;return l?o.concat(l):o},[]);let i;if(e){i=[];for(let o=0,s=n.length;o{const l=s.patterns;return l?o.concat(l):o},[]);const r=function(o,s){if(typeof o!="string")return null;if(!s){let c;for(c=o.length;c>0;c--){const d=o.charCodeAt(c-1);if(d===47||d===92)break}s=o.substr(c)}const l=n.indexOf(s);return l!==-1?i[l]:null};r.basenames=n,r.patterns=i,r.allBasenames=n;const a=u.filter(o=>!o.basenames);return a.push(r),a}function fbe(u,e,t,n,i,r){if(Array.isArray(u)){let a=0;for(const o of u){const s=fbe(o,e,t,n,i,r);if(s===10)return s;s>a&&(a=s)}return a}else{if(typeof u=="string")return n?u==="*"?5:u===t?10:0:0;if(u){const{language:a,pattern:o,scheme:s,hasAccessToAllModels:l,notebookType:c}=u;if(!n&&!l)return 0;c&&i&&(e=i);let d=0;if(s)if(s===e.scheme)d=10;else if(s==="*")d=5;else return 0;if(a)if(a===t)d=10;else if(a==="*")d=Math.max(d,5);else return 0;if(c)if(c===r)d=10;else if(c==="*"&&r!==void 0)d=Math.max(d,5);else return 0;if(o){let h;if(typeof o=="string"?h=o:h=Object.assign(Object.assign({},o),{base:yve(o.base)}),h===e.fsPath||Pat(h,e.fsPath))d=10;else return 0}return d}else return 0}}function pbe(u){return typeof u=="string"?!1:Array.isArray(u)?u.every(pbe):!!u.exclusive}class jse{constructor(e,t,n,i){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=i}equals(e){var t,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((n=e.notebookUri)===null||n===void 0?void 0:n.toString())}}class ei{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new Q,this.onDidChange=this._onDidChange.event}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),ft(()=>{if(n){const i=this._entries.indexOf(n);i>=0&&(this._entries.splice(i,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,n=>t.push(n.provider)),t}orderedGroups(e){const t=[];let n,i;return this._orderedForEach(e,r=>{n&&i===r._score?n.push(r.provider):(i=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t){this._updateScores(e);for(const n of this._entries)n._score>0&&t(n)}_updateScores(e){var t,n;const i=(t=this._notebookInfoResolver)===null||t===void 0?void 0:t.call(this,e.uri),r=i?new jse(e.uri,e.getLanguageId(),i.uri,i.type):new jse(e.uri,e.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(const a of this._entries)if(a._score=fbe(a.selector,r.uri,r.languageId,_Ye(e),r.notebookUri,r.notebookType),pbe(a.selector)&&a._score>0){for(const o of this._entries)o._score=0;a._score=1e3;break}this._entries.sort(ei._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:Fb(e.selector)&&!Fb(t.selector)?1:!Fb(e.selector)&&Fb(t.selector)?-1:e._timet._time?-1:0}}function Fb(u){return typeof u=="string"?!1:Array.isArray(u)?u.some(Fb):!!u.isBuiltin}class jat{constructor(){this.referenceProvider=new ei(this._score.bind(this)),this.renameProvider=new ei(this._score.bind(this)),this.codeActionProvider=new ei(this._score.bind(this)),this.definitionProvider=new ei(this._score.bind(this)),this.typeDefinitionProvider=new ei(this._score.bind(this)),this.declarationProvider=new ei(this._score.bind(this)),this.implementationProvider=new ei(this._score.bind(this)),this.documentSymbolProvider=new ei(this._score.bind(this)),this.inlayHintsProvider=new ei(this._score.bind(this)),this.colorProvider=new ei(this._score.bind(this)),this.codeLensProvider=new ei(this._score.bind(this)),this.documentFormattingEditProvider=new ei(this._score.bind(this)),this.documentRangeFormattingEditProvider=new ei(this._score.bind(this)),this.onTypeFormattingEditProvider=new ei(this._score.bind(this)),this.signatureHelpProvider=new ei(this._score.bind(this)),this.hoverProvider=new ei(this._score.bind(this)),this.documentHighlightProvider=new ei(this._score.bind(this)),this.selectionRangeProvider=new ei(this._score.bind(this)),this.foldingRangeProvider=new ei(this._score.bind(this)),this.linkProvider=new ei(this._score.bind(this)),this.inlineCompletionsProvider=new ei(this._score.bind(this)),this.completionProvider=new ei(this._score.bind(this)),this.linkedEditingRangeProvider=new ei(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new ei(this._score.bind(this)),this.documentSemanticTokensProvider=new ei(this._score.bind(this)),this.documentOnDropEditProvider=new ei(this._score.bind(this)),this.documentPasteEditProvider=new ei(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)===null||t===void 0?void 0:t.call(this,e)}}au(We,jat,1);const xA=Ut("IWorkspaceEditService");class QX{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(Zh.is(t))return Zh.lift(t);if(fx.is(t))return fx.lift(t);throw new Error("Unsupported edit")})}}class Zh extends QX{static is(e){return e instanceof Zh?!0:eo(e)&&dt.isUri(e.resource)&&eo(e.textEdit)}static lift(e){return e instanceof Zh?e:new Zh(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,i){super(i),this.resource=e,this.textEdit=t,this.versionId=n}}class fx extends QX{static is(e){return e instanceof fx?!0:eo(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof fx?e:new fx(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},i){super(i),this.oldResource=e,this.newResource=t,this.options=n}}const ya={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0},FP=Object.freeze({id:"editor",order:5,type:"object",title:v("editorConfigurationTitle","Editor"),scope:5}),tw=Object.assign(Object.assign({},FP),{properties:{"editor.tabSize":{type:"number",default:Ea.tabSize,minimum:1,markdownDescription:v("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:v("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Ea.insertSpaces,markdownDescription:v("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Ea.detectIndentation,markdownDescription:v("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Ea.trimAutoWhitespace,description:v("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Ea.largeFileOptimizations,description:v("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:v("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[v("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),v("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),v("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:v("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[v("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),v("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),v("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:v("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:v("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:v("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:v("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:v("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:v("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:v("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:v("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:v("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:v("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:ya.maxComputationTime,description:v("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:ya.maxFileSize,description:v("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:ya.renderSideBySide,description:v("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:ya.renderSideBySideInlineBreakpoint,description:v("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:ya.useInlineViewWhenSpaceIsLimited,description:v("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:ya.renderMarginRevertIcon,description:v("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:ya.ignoreTrimWhitespace,description:v("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:ya.renderIndicators,description:v("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:ya.diffCodeLens,description:v("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:ya.diffWordWrap,markdownEnumDescriptions:[v("wordWrap.off","Lines will never wrap."),v("wordWrap.on","Lines will wrap at the viewport width."),v("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:ya.diffAlgorithm,markdownEnumDescriptions:[v("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),v("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:ya.hideUnchangedRegions.enabled,markdownDescription:v("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:ya.hideUnchangedRegions.revealLineCount,markdownDescription:v("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:ya.hideUnchangedRegions.minimumLineCount,markdownDescription:v("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:ya.hideUnchangedRegions.contextLineCount,markdownDescription:v("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:ya.experimental.showMoves,markdownDescription:v("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:ya.experimental.showEmptyDecorations,description:v("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});function Hat(u){return typeof u.type<"u"||typeof u.anyOf<"u"}for(const u of a5){const e=u.schema;if(typeof e<"u")if(Hat(e))tw.properties[`editor.${u.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(tw.properties[t]=e[t])}let v9=null;function Dbe(){return v9===null&&(v9=Object.create(null),Object.keys(tw.properties).forEach(u=>{v9[u]=!0})),v9}function Vat(u){return Dbe()[`editor.${u}`]||!1}function $at(u){return Dbe()[`diffEditor.${u}`]||!1}const Kat=jn.as(Ed.Configuration);Kat.registerConfiguration(tw);class yn{static insert(e,t){return{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function Xj(u){return Object.isFrozen(u)?u:_Ge(u)}class ca{constructor(e={},t=[],n=[],i){this._contents=e,this._keys=t,this._overrides=n,this.raw=i,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(!((e=this.raw)===null||e===void 0)&&e.length){const t=this.raw.map(n=>{if(n instanceof ca)return n;const i=new Wat("");return i.parseRaw(n),i.configurationModel});this._rawConfiguration=t.reduce((n,i)=>i===n?i:n.merge(i),t[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Sae(this.contents,e):this.contents}inspect(e,t){const n=this.rawConfiguration.getValue(e),i=t?this.rawConfiguration.getOverrideValue(e,t):void 0,r=t?this.rawConfiguration.override(t).getValue(e):n;return{value:n,override:i,merged:r}}getOverrideValue(e,t){const n=this.getContentsForOverrideIdentifer(t);return n?e?Sae(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,n;const i=xh(this.contents),r=xh(this.overrides),a=[...this.keys],o=!((t=this.raw)===null||t===void 0)&&t.length?[...this.raw]:[this];for(const s of e)if(o.push(...!((n=s.raw)===null||n===void 0)&&n.length?s.raw:[s]),!s.isEmpty()){this.mergeContents(i,s.contents);for(const l of s.overrides){const[c]=r.filter(d=>di(d.identifiers,l.identifiers));c?(this.mergeContents(c.contents,l.contents),c.keys.push(...l.keys),c.keys=Lm(c.keys)):r.push(xh(l))}for(const l of s.keys)a.indexOf(l)===-1&&a.push(l)}return new ca(i,a,r,o.every(s=>s instanceof ca)?void 0:o)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const n={};for(const i of Lm([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[i];const a=t[i];a&&(typeof r=="object"&&typeof a=="object"?(r=xh(r),this.mergeContents(r,a)):r=a),n[i]=r}return new ca(n,this.keys,this.overrides)}mergeContents(e,t){for(const n of Object.keys(t)){if(n in e&&eo(e[n])&&eo(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=xh(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null;const i=r=>{r&&(n?this.mergeContents(n,r):n=xh(r))};for(const r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&i(r.contents);return i(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),$Ze(this.contents,e),Im.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>di(n.identifiers,yB(e))),1))}updateValue(e,t,n){A6e(this.contents,e,t,i=>console.error(i)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),Im.test(e)&&this.overrides.push({identifiers:yB(e),keys:Object.keys(this.contents[e]),contents:pW(this.contents[e],i=>console.error(i))})}}class Wat{constructor(e){this._name=e,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new ca}parseRaw(e,t){this._raw=e;const{contents:n,keys:i,overrides:r,restricted:a,hasExcludedProperties:o}=this.doParseRaw(e,t);this._configurationModel=new ca(n,i,r,o?[e]:void 0),this._restrictedConfigurations=a||[]}doParseRaw(e,t){const n=jn.as(Ed.Configuration).getConfigurationProperties(),i=this.filter(e,n,!0,t);e=i.raw;const r=pW(e,s=>console.error(`Conflict in settings file ${this._name}: ${s}`)),a=Object.keys(e),o=this.toOverrides(e,s=>console.error(`Conflict in settings file ${this._name}: ${s}`));return{contents:r,keys:a,overrides:o,restricted:i.restricted,hasExcludedProperties:i.hasExcludedProperties}}filter(e,t,n,i){var r,a,o;let s=!1;if(!(i!=null&&i.scopes)&&!(i!=null&&i.skipRestricted)&&!(!((r=i==null?void 0:i.exclude)===null||r===void 0)&&r.length))return{raw:e,restricted:[],hasExcludedProperties:s};const l={},c=[];for(const d in e)if(Im.test(d)&&n){const h=this.filter(e[d],t,!1,i);l[d]=h.raw,s=s||h.hasExcludedProperties,c.push(...h.restricted)}else{const h=t[d],E=h?typeof h.scope<"u"?h.scope:3:void 0;h!=null&&h.restricted&&c.push(d),!(!((a=i.exclude)===null||a===void 0)&&a.includes(d))&&(!((o=i.include)===null||o===void 0)&&o.includes(d)||(E===void 0||i.scopes===void 0||i.scopes.includes(E))&&!(i.skipRestricted&&(h!=null&&h.restricted)))?l[d]=e[d]:s=!0}return{raw:l,restricted:c,hasExcludedProperties:s}}toOverrides(e,t){const n=[];for(const i of Object.keys(e))if(Im.test(i)){const r={};for(const a in e[i])r[a]=e[i][a];n.push({identifiers:yB(i),keys:Object.keys(r),contents:pW(r,t)})}return n}}class Gat{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=i,this.defaultConfiguration=r,this.policyConfiguration=a,this.applicationConfiguration=o,this.userConfiguration=s,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=E}inspect(e,t,n){const i=e.inspect(t,n);return{get value(){return Xj(i.value)},get override(){return Xj(i.override)},get merged(){return Xj(i.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class yP{constructor(e,t,n,i,r=new ca,a=new ca,o=new ma,s=new ca,l=new ma){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=i,this._remoteUserConfiguration=r,this._workspaceConfiguration=a,this._folderConfigurations=o,this._memoryConfiguration=s,this._memoryConfigurationByResource=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new ma,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource),i||(i=new ca,this._memoryConfigurationByResource.set(n.resource,i))):i=this._memoryConfiguration,t===void 0?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const i=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),a=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,o=new Set;for(const s of i.overrides)for(const l of s.identifiers)i.getOverrideValue(e,l)!==void 0&&o.add(l);return new Gat(e,t,i.getValue(e),o.size?[...o]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,a)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let i=this.getConsolidatedConfigurationModelForResource(t,n);return t.overrideIdentifier&&(i=i.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0&&(i=i.merge(this._policyConfiguration)),i}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:n,overrides:i,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:i,keys:r}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),n=this.parseConfigurationModel(e.policy),i=this.parseConfigurationModel(e.application),r=this.parseConfigurationModel(e.user),a=this.parseConfigurationModel(e.workspace),o=e.folders.reduce((s,l)=>(s.set(dt.revive(l[0]),this.parseConfigurationModel(l[1])),s),new ma);return new yP(t,n,i,r,new ca,a,o,new ca,new ma)}static parseConfigurationModel(e){return new ca(e.contents,e.keys,e.overrides)}}class Uat{constructor(e,t,n,i){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=i,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const r of e.keys)this.affectedKeys.add(r);for(const[,r]of e.overrides)for(const a of r)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const r of this.affectedKeys)this._affectsConfigStr+=r+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=yP.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var n;const i=this._marker+e,r=this._affectsConfigStr.indexOf(i);if(r<0)return!1;const a=r+i.length;if(a>=this._affectsConfigStr.length)return!1;const o=this._affectsConfigStr.charCodeAt(a);if(o!==this._markerCode1&&o!==this._markerCode2)return!1;if(t){const s=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(n=this.previous)===null||n===void 0?void 0:n.workspace):void 0,l=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!Ks(s,l)}return!0}}const uw={kind:0},qat={kind:1};function Jat(u,e,t){return{kind:2,commandId:u,commandArgs:e,isBubble:t}}class E2{constructor(e,t,n){var i;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const r of e){const a=r.command;a&&a.charAt(0)!=="-"&&this._defaultBoundCommands.set(a,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=E2.handleRemovals([].concat(e).concat(t));for(let r=0,a=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let i=n.length-1;i>=0;i--){const r=n[i];if(r.command===t.command)continue;let a=!0;for(let o=1;o"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,i=t.length;n"u"||n.length===0)return null;if(n.length===1)return n[0];for(let i=n.length-1;i>=0;i--){const r=n[i];if(t.contextMatchesRules(r.when))return r}return n[n.length-1]}resolve(e,t,n){const i=[...t,n];this._log(`| Resolving ${i}`);const r=this._map.get(i[0]);if(r===void 0)return this._log("\\ No keybinding entries."),uw;let a=null;if(i.length<2)a=r;else{a=[];for(let s=0,l=r.length;sc.chords.length)continue;let d=!0;for(let h=1;h=0;n--){const i=t[n];if(E2._contextMatchesRules(e,i.when))return i}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function Hse(u){return u?`${u.serialize()}`:"no when condition"}function Vse(u){return u.extensionId?u.isBuiltinExtension?`built-in extension ${u.extensionId}`:`user extension ${u.extensionId}`:u.isDefault?"built-in":"user"}const Zat=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class Yat extends ne{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Ne.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,i,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=i,this._logService=r,this._onDidUpdateKeybindings=this._register(new Q),this._currentChords=[],this._currentChordChecker=new rA,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Vl,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const n=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(n)return n.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),uw;const[i]=n.getDispatchChords();if(i===null)return this._log("\\ Keyboard event cannot be dispatched"),uw;const r=this._contextKeyService.getContext(t),a=this._currentChords.map(({keypress:o})=>o);return this._getResolver().resolve(r,a,i)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw MQ("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(v("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const n=this._currentChords.map(({label:i})=>i).join(", ");this._currentChordStatusMessage=this._notificationService.status(v("next.chord","({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),Xb.enabled&&Xb.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],Xb.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[i]=n.getSingleModifierDispatchChords();if(i)return this._ignoreSingleModifiers.has(i)?(this._log(`+ Ignoring single modifier ${i} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=C5.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${i}.`),this._currentSingleModifier=i,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):i===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${i} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[r]=n.getChords();return this._ignoreSingleModifiers=new C5(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){var i;let r=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let a=null,o=null;if(n){const[d]=e.getSingleModifierDispatchChords();a=d,o=d?[d]:[]}else[a]=e.getDispatchChords(),o=this._currentChords.map(({keypress:d})=>d);if(a===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),r;const s=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(s,o,a);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(v("missing.chord","The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}return r}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),r=!0,this._expectAnotherChord(a,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),r;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const d=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${d}, ${l}".`),this._notificationService.status(v("missing.chord","The key combination ({0}, {1}) is not a command.",d,l),{hideAfter:10*1e3}),this._leaveChordMode(),r=!0}}else this.inChordMode&&this._leaveChordMode(),c.isBubble||(r=!0),this._log(`+ Invoking command ${c.commandId}.`),typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d)),Zat.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:(i=e.getUserSettingsLabel())!==null&&i!==void 0?i:void 0});return r}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class C5{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}C5.EMPTY=new C5(null);class $se{constructor(e,t,n,i,r,a,o){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?cG(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=cG(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=r,this.extensionId=a,this.isBuiltinExtension=o}}function cG(u){const e=[];for(let t=0,n=u.length;tthis._getLabel(e))}getAriaLabel(){return Qat.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Xat.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return eot.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new uJe(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class Ok extends uot{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Sh.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Sh.toString(e.keyCode)}_getElectronAccelerator(e){return Sh.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=Sh.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return Ok.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Sh.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=OQ[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof c4)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new c4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const n=cG(e.chords.map(i=>this._toKeyCodeChord(i)));return n.length>0?[new Ok(n,t)]:[]}}const cv=Ut("labelService"),xbe=Ut("progressService");class Yh{constructor(e,t){this.callback=e,this.report=t!=null&&t.async?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(e){this._value=e,this.callback(this._value)}_reportAsync(e){Promise.resolve(this._lastTask).finally(()=>{this._value=e;const t=this.callback(this._value);this._lastTask=Promise.resolve(t).finally(()=>this._lastTask=void 0)})}}Yh.None=Object.freeze({report(){}});const Dg=Ut("editorProgressService");class not{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new px(new aot(e,t))}static forStrings(){return new px(new not)}static forConfigKeys(){return new px(new iot)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let i;this._root||(this._root=new C9,this._root.segment=n.value());const r=[];for(i=this._root;;){const o=n.cmp(i.segment);if(o>0)i.left||(i.left=new C9,i.left.segment=n.value()),r.push([-1,i]),i=i.left;else if(o<0)i.right||(i.right=new C9,i.right.segment=n.value()),r.push([1,i]),i=i.right;else if(n.hasNext())n.next(),i.mid||(i.mid=new C9,i.mid.segment=n.value()),r.push([0,i]),i=i.mid;else break}const a=i.value;i.value=t,i.key=e;for(let o=r.length-1;o>=0;o--){const s=r[o][1];s.updateHeight();const l=s.balanceFactor();if(l<-1||l>1){const c=r[o][0],d=r[o+1][0];if(c===1&&d===1)r[o][1]=s.rotateLeft();else if(c===-1&&d===-1)r[o][1]=s.rotateRight();else if(c===1&&d===-1)s.right=r[o+1][1]=r[o+1][1].rotateRight(),r[o][1]=s.rotateLeft();else if(c===-1&&d===1)s.left=r[o+1][1]=r[o+1][1].rotateLeft(),r[o][1]=s.rotateRight();else throw new Error;if(o>0)switch(r[o-1][0]){case-1:r[o-1][1].left=r[o][1];break;case 1:r[o-1][1].right=r[o][1];break;case 0:r[o-1][1].mid=r[o][1];break}else this._root=r[0][1]}}return a}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var n;const i=this._iter.reset(e),r=[];let a=this._root;for(;a;){const o=i.cmp(a.segment);if(o>0)r.push([-1,a]),a=a.left;else if(o<0)r.push([1,a]),a=a.right;else if(i.hasNext())i.next(),r.push([0,a]),a=a.mid;else break}if(a){if(t?(a.left=void 0,a.mid=void 0,a.right=void 0,a.height=1):(a.key=void 0,a.value=void 0),!a.mid&&!a.value)if(a.left&&a.right){const o=this._min(a.right);if(o.key){const{key:s,value:l,segment:c}=o;this._delete(o.key,!1),a.key=s,a.value=l,a.segment=c}}else{const o=(n=a.left)!==null&&n!==void 0?n:a.right;if(r.length>0){const[s,l]=r[r.length-1];switch(s){case-1:l.left=o;break;case 0:l.mid=o;break;case 1:l.right=o;break}}else this._root=o}for(let o=r.length-1;o>=0;o--){const s=r[o][1];s.updateHeight();const l=s.balanceFactor();if(l>1?(s.right.balanceFactor()>=0||(s.right=s.right.rotateRight()),r[o][1]=s.rotateLeft()):l<-1&&(s.left.balanceFactor()<=0||(s.left=s.left.rotateLeft()),r[o][1]=s.rotateRight()),o>0)switch(r[o-1][0]){case-1:r[o-1][1].left=r[o][1];break;case 1:r[o-1][1].right=r[o][1];break;case 0:r[o-1][1].mid=r[o][1];break}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let n=this._root,i;for(;n;){const r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),i=n.value||i,n=n.mid;else break}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const n=this._iter.reset(e);let i=this._root;for(;i;){const r=n.cmp(i.segment);if(r>0)i=i.left;else if(r<0)i=i.right;else if(n.hasNext())n.next(),i=i.mid;else return i.mid?this._entries(i.mid):t?i.value:void 0}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const M3=Ut("contextService");function dG(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&dt.isUri(e.uri)}function oot(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&!dG(u)&&!dot(u)}const sot={id:"ext-dev"},lot={id:"empty-window"};function cot(u,e){if(typeof u=="string"||typeof u>"u")return typeof u=="string"?{id:QE(u)}:e?sot:lot;const t=u;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function dot(u){const e=u;return typeof(e==null?void 0:e.id)=="string"&&dt.isUri(e.configPath)}let hot=class{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}};const hG="code-workspace";v("codeWorkspace","Code Workspace");const vbe="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function Eot(u){return u.id===vbe}var EG;(function(u){u.inspectTokensAction=v("inspectTokens","Developer: Inspect Tokens")})(EG||(EG={}));var nw;(function(u){u.gotoLineActionLabel=v("gotoLineActionLabel","Go to Line/Column...")})(nw||(nw={}));var mG;(function(u){u.helpQuickAccessActionLabel=v("helpQuickAccess","Show all Quick Access Providers")})(mG||(mG={}));var iw;(function(u){u.quickCommandActionLabel=v("quickCommandActionLabel","Command Palette"),u.quickCommandHelp=v("quickCommandActionHelp","Show And Run Commands")})(iw||(iw={}));var jk;(function(u){u.quickOutlineActionLabel=v("quickOutlineActionLabel","Go to Symbol..."),u.quickOutlineByCategoryActionLabel=v("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(jk||(jk={}));var rw;(function(u){u.editorViewAccessibleLabel=v("editorViewAccessibleLabel","Editor content"),u.accessibilityHelpMessage=v("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(rw||(rw={}));var gG;(function(u){u.toggleHighContrast=v("toggleHighContrast","Toggle High Contrast Theme")})(gG||(gG={}));var fG;(function(u){u.bulkEditServiceSummary=v("bulkEditServiceSummary","Made {0} edits in {1} files")})(fG||(fG={}));const Cbe=Ut("workspaceTrustManagementService"),F4=Ut("contextViewService"),Wl=Ut("contextMenuService");var aa;(function(u){function e(r,a){if(r.start>=a.end||a.start>=r.end)return{start:0,end:0};const o=Math.max(r.start,a.start),s=Math.min(r.end,a.end);return s-o<=0?{start:0,end:0}:{start:o,end:s}}u.intersect=e;function t(r){return r.end-r.start<=0}u.isEmpty=t;function n(r,a){return!t(e(r,a))}u.intersects=n;function i(r,a){const o=[],s={start:r.start,end:Math.min(a.start,r.end)},l={start:Math.max(a.end,r.start),end:r.end};return t(s)||o.push(s),t(l)||o.push(l),o}u.relativeComplement=i})(aa||(aa={}));function mot(u){const e=u;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var TE;(function(u){u[u.AVOID=0]="AVOID",u[u.ALIGN=1]="ALIGN"})(TE||(TE={}));function b5(u,e,t){const n=t.mode===TE.ALIGN?t.offset:t.offset+t.size,i=t.mode===TE.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=u-n?n:e<=i?i-e:Math.max(u-e,0):e<=i?i-e:e<=u-n?n:0}class dv extends ne{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=ne.None,this.toDisposeOnSetContainer=ne.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=ve(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Ya(this.view),this.setContainer(e,t),this._register(ft(()=>this.setContainer(null,1)))}setContainer(e,t){var n;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(n=this.shadowRootHostElement)===null||n===void 0||n.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=ve(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const r=document.createElement("style");r.textContent=got,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(ve("slot"))}else this.container.appendChild(this.view);const i=new pe;dv.BUBBLE_UP_EVENTS.forEach(r=>{i.add(xi(this.container,r,a=>{this.onDOMEvent(a,!1)}))}),dv.BUBBLE_DOWN_EVENTS.forEach(r=>{i.add(xi(this.container,r,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=i}}show(e){var t,n;this.isVisible()&&this.hide(),Nr(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",ns(this.view),this.toDisposeOnClean=e.render(this.view)||ne.None,this.delegate=e,this.doLayout(),(n=(t=this.delegate).focus)===null||n===void 0||n.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(Zc&&QQ.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(eX(e)){const d=ji(e),h=qJe(e);t={top:d.top*h,left:d.left*h,width:d.width*h,height:d.height*h}}else mot(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};const n=ko(this.view),i=Rf(this.view),r=this.delegate.anchorPosition||0,a=this.delegate.anchorAlignment||0,o=this.delegate.anchorAxisAlignment||0;let s,l;if(o===0){const d={offset:t.top-window.pageYOffset,size:t.height,position:r===0?0:1},h={offset:t.left,size:t.width,position:a===0?0:1,mode:TE.ALIGN};s=b5(window.innerHeight,i,d)+window.pageYOffset,aa.intersects({start:s,end:s+i},{start:d.offset,end:d.offset+d.size})&&(h.mode=TE.AVOID),l=b5(window.innerWidth,n,h)}else{const d={offset:t.left,size:t.width,position:a===0?0:1},h={offset:t.top,size:t.height,position:r===0?0:1,mode:TE.ALIGN};l=b5(window.innerWidth,n,d),aa.intersects({start:l,end:l+n},{start:d.offset,end:d.offset+d.size})&&(h.mode=TE.AVOID),s=b5(window.innerHeight,i,h)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(a===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=ji(this.container);this.view.style.top=`${s-(this.useFixedPosition?ji(this.view).top:c.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?ji(this.view).left:c.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Ya(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Qr(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}dv.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];dv.BUBBLE_DOWN_EVENTS=["click"];const got=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } @@ -160,11 +160,11 @@ Received: '{1}'.`,e,vf.getLexeme(t)),r=t.offset,a=vf.getLexeme(t);return this._p :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } -`;var fot=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},pot=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let pG=class extends ne{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=ne.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new dv(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,n){t?(t!==this.container||this.shadowRoot!==n)&&(this.container=t,this.setContainer(t,n?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=n,this.contextView.show(e);const i=ft(()=>{this.currentViewDisposable===i&&this.hideContextView()});return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};pG=fot([pot(0,f6)],pG);let hv=[],eee=[],bbe=[];function b9(u,e=!1){Dot(u,!1,e)}function Dot(u,e,t){const n=xot(u,e);hv.push(n),n.userConfigured?bbe.push(n):eee.push(n),t&&!n.userConfigured&&hv.forEach(i=>{i.mime===n.mime||i.userConfigured||(n.extension&&i.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&i.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&i.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&i.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function xot(u,e){return{id:u.id,mime:u.mime,filename:u.filename,extension:u.extension,filepattern:u.filepattern,firstline:u.firstline,userConfigured:e,filenameLowercase:u.filename?u.filename.toLowerCase():void 0,extensionLowercase:u.extension?u.extension.toLowerCase():void 0,filepatternLowercase:u.filepattern?mbe(u.filepattern.toLowerCase()):void 0,filepatternOnPath:u.filepattern?u.filepattern.indexOf(Oi.sep)>=0:!1}}function vot(){hv=hv.filter(u=>u.userConfigured),eee=[]}function Cot(u,e){return bot(u,e).map(t=>t.id)}function bot(u,e){let t;if(u)switch(u.scheme){case Ot.file:t=u.fsPath;break;case Ot.data:{t=$m.parseMetaData(u).get($m.META_DATA_LABEL);break}case Ot.vscodeNotebookCell:t=void 0;break;default:t=u.path}if(!t)return[{id:"unknown",mime:ci.unknown}];t=t.toLowerCase();const n=QE(t),i=Kse(t,n,bbe);if(i)return[i,{id:Ks,mime:ci.text}];const r=Kse(t,n,eee);if(r)return[r,{id:Ks,mime:ci.text}];if(e){const a=kot(e);if(a)return[a,{id:Ks,mime:ci.text}]}return[{id:"unknown",mime:ci.unknown}]}function Kse(u,e,t){var n;let i,r,a;for(let o=t.length-1;o>=0;o--){const s=t[o];if(e===s.filenameLowercase){i=s;break}if(s.filepattern&&(!r||s.filepattern.length>r.filepattern.length)){const l=s.filepatternOnPath?u:e;!((n=s.filepatternLowercase)===null||n===void 0)&&n.call(s,l)&&(r=s)}s.extension&&(!a||s.extension.length>a.extension.length)&&e.endsWith(s.extensionLowercase)&&(a=s)}if(i)return i;if(r)return r;if(a)return a}function kot(u){if(UQ(u)&&(u=u.substr(1)),u.length>0)for(let e=hv.length-1;e>=0;e--){const t=hv[e];if(!t.firstline)continue;const n=u.match(t.firstline);if(n&&n.length>0)return t}}const k9=Object.prototype.hasOwnProperty,Wse="vs.editor.nullLanguage";class Fot{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Wse,0),this._register(Ks,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Wse}}class Hk extends ne{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,Hk.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Fot,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Qx.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){Hk.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},vot();const e=[].concat(Qx.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(i=>{this._lowercaseNameMap[i.toLowerCase()]=n.identifier}),n.mimetypes.forEach(i=>{this._mimeTypesMap[i]=n.identifier})}),jn.as(Ed.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;k9.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const o of t.extensions)b9({id:n,mime:i,extension:o},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)b9({id:n,mime:i,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const o of t.filenamePatterns)b9({id:n,mime:i,filepattern:o},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let o=t.firstLine;o.charAt(0)!=="^"&&(o="^"+o);try{const s=new RegExp(o);bqe(s)||b9({id:n,mime:i,firstline:s},this._warnOnOverwrite)}catch(s){console.warn(`[${t.id}]: Invalid regular expression \`${o}\`: `,s)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(const o of r)!o||o.length===0||e.aliases.push(o);const a=r!==null&&r.length>0;if(!(a&&r[0]===null)){const o=(a?r[0]:null)||n;(a||!e.name)&&(e.name=o)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?k9.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return k9.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&k9.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Cot(e,t)}}Hk.instanceCount=0;class Vk extends ne{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new Q),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new Q),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new Q({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Vk.instanceCount++,this._registry=this._register(new Hk(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Vk.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return tve(n,null)}createById(e){return new Gse(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new Gse(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ks),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),qn.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}Vk.instanceCount=0;class Gse{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new Q({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}const $k={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:ci.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};function tee(...u){return function(e,t){for(let n=0,i=u.length;n0?[{start:0,end:e.length}]:[]:null}function Fbe(u,e){const t=e.toLowerCase().indexOf(u.toLowerCase());return t===-1?null:[{start:t,end:t+u.length}]}function ybe(u,e){return DG(u.toLowerCase(),e.toLowerCase(),0,0)}function DG(u,e,t,n){if(t===u.length)return[];if(n===e.length)return null;if(u[t]===e[n]){let i=null;return(i=DG(u,e,t+1,n+1))?iee({start:n,end:n+1},i):null}return DG(u,e,t,n+1)}function uee(u){return 97<=u&&u<=122}function _P(u){return 65<=u&&u<=90}function nee(u){return 48<=u&&u<=57}function Abe(u){return u===32||u===9||u===10||u===13}const _be=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(u=>_be.add(u.charCodeAt(0)));function aw(u){return Abe(u)||_be.has(u)}function yot(u,e){return u===e||aw(u)&&aw(e)}function Sbe(u){return uee(u)||_P(u)||nee(u)}function iee(u,e){return e.length===0?e=[u]:u.end===e[0].start?e[0].start=u.start:e.unshift(u),e}function Bbe(u,e){for(let t=e;t0&&!Sbe(u.charCodeAt(t-1)))return t}return u.length}function xG(u,e,t,n){if(t===u.length)return[];if(n===e.length)return null;if(u[t]!==e[n].toLowerCase())return null;{let i=null,r=n+1;for(i=xG(u,e,t+1,n+1);!i&&(r=Bbe(e,r)).6}function Sot(u){const{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:i}=u;return t>.2&&e<.8&&n>.6&&i<.2}function Bot(u){let e=0,t=0,n=0,i=0;for(let r=0;r60)return null;const t=Aot(e);if(!Sot(t)){if(!_ot(t))return null;e=e.toLowerCase()}let n=null,i=0;for(u=u.toLowerCase();i0&&aw(u.charCodeAt(t-1)))return t;return u.length}const Lot=tee(Kk,wbe,Fbe),zot=tee(Kk,wbe,ybe),Use=new gg(1e4);function qse(u,e,t=!1){if(typeof u!="string"||typeof e!="string")return null;let n=Use.get(u);n||(n=new RegExp(vqe(u),"i"),Use.set(u,n));const i=n.exec(e);return i?[{start:i.index,end:i.index+i[0].length}]:t?zot(u,e):Lot(u,e)}function Mot(u,e){const t=T3(u,u.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?vA(t):null}function Tot(u,e,t,n,i,r){const a=Math.min(13,u.length);for(;t"u")return[];const e=[],t=u[1];for(let n=u.length-1;n>1;n--){const i=u[n]+t,r=e[e.length-1];r&&r.end===i?r.end=i+1:e.push({start:i,end:i+1})}return e}const NE=128;function ree(){const u=[],e=[];for(let t=0;t<=NE;t++)e[t]=0;for(let t=0;t<=NE;t++)u.push(e.slice(0));return u}function zbe(u){const e=[];for(let t=0;t<=u;t++)e[t]=0;return e}const Mbe=zbe(2*NE),CG=zbe(2*NE),rh=ree(),$g=ree(),F9=ree();function y9(u,e){if(e<0||e>=u.length)return!1;const t=u.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!GQ(t)}}function Jse(u,e){if(e<0||e>=u.length)return!1;switch(u.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function u8(u,e,t){return e[u]!==t[u]}function Not(u,e,t,n,i,r,a=!1){for(;eNE?NE:u.length,s=n.length>NE?NE:n.length;if(t>=o||r>=s||o-t>s-r||!Not(e,t,o,i,r,s,!0))return;Pot(o,s,t,r,e,i);let l=1,c=1,d=t,h=r;const E=[!1];for(l=1,d=t;dD,w=S?$g[l][c-1]+(rh[l][c-1]>0?-5:0):0,z=h>D+1&&rh[l][c-1]>0,N=z?$g[l][c-2]+(rh[l][c-2]>0?-5:0):0;if(z&&(!S||N>=w)&&(!A||N>=F))$g[l][c]=N,F9[l][c]=3,rh[l][c]=0;else if(S&&(!A||w>=F))$g[l][c]=w,F9[l][c]=2,rh[l][c]=0;else if(A)$g[l][c]=F,F9[l][c]=1,rh[l][c]=rh[l-1][c-1]+1;else throw new Error("not possible")}}if(!E[0]&&!a.firstMatchCanBeWeak)return;l--,c--;const m=[$g[l][c],r];let g=0,f=0;for(;l>=1;){let D=c;do{const x=F9[l][D];if(x===3)D=D-2;else if(x===2)D=D-1;else break}while(D>=1);g>1&&e[t+l-1]===i[r+c-1]&&!u8(D+r-1,n,i)&&g+1>rh[l][D]&&(D=c),D===c?g++:g=1,f||(f=D),l--,c=D-1,m.push(c)}s===o&&a.boostFullMatch&&(m[0]+=2);const p=f-o;return m[0]-=p,m}function Pot(u,e,t,n,i,r){let a=u-1,o=e-1;for(;a>=t&&o>=n;)i[a]===r[o]&&(CG[a]=o,a--),o--}function Rot(u,e,t,n,i,r,a,o,s,l,c){if(e[t]!==r[a])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return a===t-n?d=u[t]===i[a]?7:5:u8(a,i,r)&&(a===0||!u8(a-1,i,r))?(d=u[t]===i[a]?7:5,h=!0):y9(r,a)&&(a===0||!y9(r,a-1))?d=5:(y9(r,a-1)||Jse(r,a-1))&&(d=5,h=!0),d>1&&t===n&&(c[0]=!0),h||(h=u8(a,i,r)||y9(r,a-1)||Jse(r,a-1)),t===n?a>s&&(d-=h?3:5):l?d+=h?2:0:d+=h?0:1,a+1===o&&(d-=h?3:5),d}function Iot(u,e,t,n,i,r,a){return Oot(u,e,t,n,i,r,!0,a)}function Oot(u,e,t,n,i,r,a,o){let s=T3(u,e,t,n,i,r,o);if(s&&!a)return s;if(u.length>=3){const l=Math.min(7,u.length-1);for(let c=t+1;cs[0])&&(s=h))}}}return s}function jot(u,e){if(e+1>=u.length)return;const t=u[e],n=u[e+1];if(t!==n)return u.slice(0,e)+n+t+u.slice(e+2)}const Hot="$(",aee=new RegExp(`\\$\\(${st.iconNameExpression}(?:${st.iconModifierExpression})?\\)`,"g"),Vot=new RegExp(`(\\\\)?${aee.source}`,"g");function $ot(u){return u.replace(Vot,(e,t)=>t?e:`\\${e}`)}const Kot=new RegExp(`\\\\${aee.source}`,"g");function Wot(u){return u.replace(Kot,e=>`\\${e}`)}const Got=new RegExp(`(\\s)?(\\\\)?${aee.source}(\\s)?`,"g");function oee(u){return u.indexOf(Hot)===-1?u:u.replace(Got,(e,t,n,i)=>n?e:t||i||"")}function Uot(u){return u?u.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const eH=new RegExp(`\\$\\(${st.iconNameCharacter}+\\)`,"g");function yb(u){eH.lastIndex=0;let e="";const t=[];let n=0;for(;;){const i=eH.lastIndex,r=eH.exec(u),a=u.substring(i,r==null?void 0:r.index);if(a.length>0){e+=a;for(let o=0;o" ".repeat(i.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`;var fot=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},pot=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let pG=class extends ne{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=ne.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new dv(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,n){t?(t!==this.container||this.shadowRoot!==n)&&(this.container=t,this.setContainer(t,n?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=n,this.contextView.show(e);const i=ft(()=>{this.currentViewDisposable===i&&this.hideContextView()});return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};pG=fot([pot(0,f6)],pG);let hv=[],eee=[],bbe=[];function b9(u,e=!1){Dot(u,!1,e)}function Dot(u,e,t){const n=xot(u,e);hv.push(n),n.userConfigured?bbe.push(n):eee.push(n),t&&!n.userConfigured&&hv.forEach(i=>{i.mime===n.mime||i.userConfigured||(n.extension&&i.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&i.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&i.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&i.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function xot(u,e){return{id:u.id,mime:u.mime,filename:u.filename,extension:u.extension,filepattern:u.filepattern,firstline:u.firstline,userConfigured:e,filenameLowercase:u.filename?u.filename.toLowerCase():void 0,extensionLowercase:u.extension?u.extension.toLowerCase():void 0,filepatternLowercase:u.filepattern?mbe(u.filepattern.toLowerCase()):void 0,filepatternOnPath:u.filepattern?u.filepattern.indexOf(Oi.sep)>=0:!1}}function vot(){hv=hv.filter(u=>u.userConfigured),eee=[]}function Cot(u,e){return bot(u,e).map(t=>t.id)}function bot(u,e){let t;if(u)switch(u.scheme){case Ot.file:t=u.fsPath;break;case Ot.data:{t=$m.parseMetaData(u).get($m.META_DATA_LABEL);break}case Ot.vscodeNotebookCell:t=void 0;break;default:t=u.path}if(!t)return[{id:"unknown",mime:ci.unknown}];t=t.toLowerCase();const n=QE(t),i=Kse(t,n,bbe);if(i)return[i,{id:Ws,mime:ci.text}];const r=Kse(t,n,eee);if(r)return[r,{id:Ws,mime:ci.text}];if(e){const a=kot(e);if(a)return[a,{id:Ws,mime:ci.text}]}return[{id:"unknown",mime:ci.unknown}]}function Kse(u,e,t){var n;let i,r,a;for(let o=t.length-1;o>=0;o--){const s=t[o];if(e===s.filenameLowercase){i=s;break}if(s.filepattern&&(!r||s.filepattern.length>r.filepattern.length)){const l=s.filepatternOnPath?u:e;!((n=s.filepatternLowercase)===null||n===void 0)&&n.call(s,l)&&(r=s)}s.extension&&(!a||s.extension.length>a.extension.length)&&e.endsWith(s.extensionLowercase)&&(a=s)}if(i)return i;if(r)return r;if(a)return a}function kot(u){if(UQ(u)&&(u=u.substr(1)),u.length>0)for(let e=hv.length-1;e>=0;e--){const t=hv[e];if(!t.firstline)continue;const n=u.match(t.firstline);if(n&&n.length>0)return t}}const k9=Object.prototype.hasOwnProperty,Wse="vs.editor.nullLanguage";class Fot{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Wse,0),this._register(Ws,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Wse}}class Hk extends ne{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,Hk.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Fot,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Qx.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){Hk.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},vot();const e=[].concat(Qx.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(i=>{this._lowercaseNameMap[i.toLowerCase()]=n.identifier}),n.mimetypes.forEach(i=>{this._mimeTypesMap[i]=n.identifier})}),jn.as(Ed.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;k9.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let i=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),i=t.mimetypes[0]),i||(i=`text/x-${n}`,e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const o of t.extensions)b9({id:n,mime:i,extension:o},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)b9({id:n,mime:i,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const o of t.filenamePatterns)b9({id:n,mime:i,filepattern:o},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let o=t.firstLine;o.charAt(0)!=="^"&&(o="^"+o);try{const s=new RegExp(o);bqe(s)||b9({id:n,mime:i,firstline:s},this._warnOnOverwrite)}catch(s){console.warn(`[${t.id}]: Invalid regular expression \`${o}\`: `,s)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(const o of r)!o||o.length===0||e.aliases.push(o);const a=r!==null&&r.length>0;if(!(a&&r[0]===null)){const o=(a?r[0]:null)||n;(a||!e.name)&&(e.name=o)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?k9.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return k9.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&k9.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:Cot(e,t)}}Hk.instanceCount=0;class Vk extends ne{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new Q),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new Q),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new Q({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Vk.instanceCount++,this._registry=this._register(new Hk(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){Vk.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return tve(n,null)}createById(e){return new Gse(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new Gse(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ws),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),qn.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}Vk.instanceCount=0;class Gse{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new Q({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,(e=this._emitter)===null||e===void 0||e.fire(this.languageId))}}const $k={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:ci.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};function tee(...u){return function(e,t){for(let n=0,i=u.length;n0?[{start:0,end:e.length}]:[]:null}function Fbe(u,e){const t=e.toLowerCase().indexOf(u.toLowerCase());return t===-1?null:[{start:t,end:t+u.length}]}function ybe(u,e){return DG(u.toLowerCase(),e.toLowerCase(),0,0)}function DG(u,e,t,n){if(t===u.length)return[];if(n===e.length)return null;if(u[t]===e[n]){let i=null;return(i=DG(u,e,t+1,n+1))?iee({start:n,end:n+1},i):null}return DG(u,e,t,n+1)}function uee(u){return 97<=u&&u<=122}function _P(u){return 65<=u&&u<=90}function nee(u){return 48<=u&&u<=57}function Abe(u){return u===32||u===9||u===10||u===13}const _be=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(u=>_be.add(u.charCodeAt(0)));function aw(u){return Abe(u)||_be.has(u)}function yot(u,e){return u===e||aw(u)&&aw(e)}function Sbe(u){return uee(u)||_P(u)||nee(u)}function iee(u,e){return e.length===0?e=[u]:u.end===e[0].start?e[0].start=u.start:e.unshift(u),e}function Bbe(u,e){for(let t=e;t0&&!Sbe(u.charCodeAt(t-1)))return t}return u.length}function xG(u,e,t,n){if(t===u.length)return[];if(n===e.length)return null;if(u[t]!==e[n].toLowerCase())return null;{let i=null,r=n+1;for(i=xG(u,e,t+1,n+1);!i&&(r=Bbe(e,r)).6}function Sot(u){const{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:i}=u;return t>.2&&e<.8&&n>.6&&i<.2}function Bot(u){let e=0,t=0,n=0,i=0;for(let r=0;r60)return null;const t=Aot(e);if(!Sot(t)){if(!_ot(t))return null;e=e.toLowerCase()}let n=null,i=0;for(u=u.toLowerCase();i0&&aw(u.charCodeAt(t-1)))return t;return u.length}const Lot=tee(Kk,wbe,Fbe),zot=tee(Kk,wbe,ybe),Use=new gg(1e4);function qse(u,e,t=!1){if(typeof u!="string"||typeof e!="string")return null;let n=Use.get(u);n||(n=new RegExp(vqe(u),"i"),Use.set(u,n));const i=n.exec(e);return i?[{start:i.index,end:i.index+i[0].length}]:t?zot(u,e):Lot(u,e)}function Mot(u,e){const t=T3(u,u.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?vA(t):null}function Tot(u,e,t,n,i,r){const a=Math.min(13,u.length);for(;t"u")return[];const e=[],t=u[1];for(let n=u.length-1;n>1;n--){const i=u[n]+t,r=e[e.length-1];r&&r.end===i?r.end=i+1:e.push({start:i,end:i+1})}return e}const NE=128;function ree(){const u=[],e=[];for(let t=0;t<=NE;t++)e[t]=0;for(let t=0;t<=NE;t++)u.push(e.slice(0));return u}function zbe(u){const e=[];for(let t=0;t<=u;t++)e[t]=0;return e}const Mbe=zbe(2*NE),CG=zbe(2*NE),rh=ree(),$g=ree(),F9=ree();function y9(u,e){if(e<0||e>=u.length)return!1;const t=u.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!GQ(t)}}function Jse(u,e){if(e<0||e>=u.length)return!1;switch(u.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function u8(u,e,t){return e[u]!==t[u]}function Not(u,e,t,n,i,r,a=!1){for(;eNE?NE:u.length,s=n.length>NE?NE:n.length;if(t>=o||r>=s||o-t>s-r||!Not(e,t,o,i,r,s,!0))return;Pot(o,s,t,r,e,i);let l=1,c=1,d=t,h=r;const E=[!1];for(l=1,d=t;dD,w=S?$g[l][c-1]+(rh[l][c-1]>0?-5:0):0,z=h>D+1&&rh[l][c-1]>0,N=z?$g[l][c-2]+(rh[l][c-2]>0?-5:0):0;if(z&&(!S||N>=w)&&(!A||N>=F))$g[l][c]=N,F9[l][c]=3,rh[l][c]=0;else if(S&&(!A||w>=F))$g[l][c]=w,F9[l][c]=2,rh[l][c]=0;else if(A)$g[l][c]=F,F9[l][c]=1,rh[l][c]=rh[l-1][c-1]+1;else throw new Error("not possible")}}if(!E[0]&&!a.firstMatchCanBeWeak)return;l--,c--;const m=[$g[l][c],r];let g=0,f=0;for(;l>=1;){let D=c;do{const x=F9[l][D];if(x===3)D=D-2;else if(x===2)D=D-1;else break}while(D>=1);g>1&&e[t+l-1]===i[r+c-1]&&!u8(D+r-1,n,i)&&g+1>rh[l][D]&&(D=c),D===c?g++:g=1,f||(f=D),l--,c=D-1,m.push(c)}s===o&&a.boostFullMatch&&(m[0]+=2);const p=f-o;return m[0]-=p,m}function Pot(u,e,t,n,i,r){let a=u-1,o=e-1;for(;a>=t&&o>=n;)i[a]===r[o]&&(CG[a]=o,a--),o--}function Rot(u,e,t,n,i,r,a,o,s,l,c){if(e[t]!==r[a])return Number.MIN_SAFE_INTEGER;let d=1,h=!1;return a===t-n?d=u[t]===i[a]?7:5:u8(a,i,r)&&(a===0||!u8(a-1,i,r))?(d=u[t]===i[a]?7:5,h=!0):y9(r,a)&&(a===0||!y9(r,a-1))?d=5:(y9(r,a-1)||Jse(r,a-1))&&(d=5,h=!0),d>1&&t===n&&(c[0]=!0),h||(h=u8(a,i,r)||y9(r,a-1)||Jse(r,a-1)),t===n?a>s&&(d-=h?3:5):l?d+=h?2:0:d+=h?0:1,a+1===o&&(d-=h?3:5),d}function Iot(u,e,t,n,i,r,a){return Oot(u,e,t,n,i,r,!0,a)}function Oot(u,e,t,n,i,r,a,o){let s=T3(u,e,t,n,i,r,o);if(s&&!a)return s;if(u.length>=3){const l=Math.min(7,u.length-1);for(let c=t+1;cs[0])&&(s=h))}}}return s}function jot(u,e){if(e+1>=u.length)return;const t=u[e],n=u[e+1];if(t!==n)return u.slice(0,e)+n+t+u.slice(e+2)}const Hot="$(",aee=new RegExp(`\\$\\(${st.iconNameExpression}(?:${st.iconModifierExpression})?\\)`,"g"),Vot=new RegExp(`(\\\\)?${aee.source}`,"g");function $ot(u){return u.replace(Vot,(e,t)=>t?e:`\\${e}`)}const Kot=new RegExp(`\\\\${aee.source}`,"g");function Wot(u){return u.replace(Kot,e=>`\\${e}`)}const Got=new RegExp(`(\\s)?(\\\\)?${aee.source}(\\s)?`,"g");function oee(u){return u.indexOf(Hot)===-1?u:u.replace(Got,(e,t,n,i)=>n?e:t||i||"")}function Uot(u){return u?u.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const eH=new RegExp(`\\$\\(${st.iconNameCharacter}+\\)`,"g");function yb(u){eH.lastIndex=0;let e="";const t=[];let n=0;for(;;){const i=eH.lastIndex,r=eH.exec(u),a=u.substring(i,r==null?void 0:r.index);if(a.length>0){e+=a;for(let o=0;o" ".repeat(i.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ `:` `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` -`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){const n=new RegExp(qs(t),"g");return e.replace(n,(i,r)=>e.charAt(r-1)!=="\\"?`\\${i}`:i)}}function Ev(u){return nm(u)?!u.value:Array.isArray(u)?u.every(Ev):!0}function nm(u){return u instanceof Zr?!0:u&&typeof u=="object"?typeof u.value=="string"&&(typeof u.isTrusted=="boolean"||typeof u.isTrusted=="object"||u.isTrusted===void 0)&&(typeof u.supportThemeIcons=="boolean"||u.supportThemeIcons===void 0):!1}function qot(u,e){return u===e?!0:!u||!e?!1:u.value===e.value&&u.isTrusted===e.isTrusted&&u.supportThemeIcons===e.supportThemeIcons&&u.supportHtml===e.supportHtml&&(u.baseUri===e.baseUri||!!u.baseUri&&!!e.baseUri&&TX(dt.from(u.baseUri),dt.from(e.baseUri)))}function Jot(u){return u.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function A9(u){return u.replace(/"/g,""")}function uH(u){return u&&u.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Zot(u){const e=[],t=u.split("|").map(i=>i.trim());u=t[0];const n=t[1];if(n){const i=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),a=i?i[1]:"",o=r?r[1]:"",s=isFinite(parseInt(o)),l=isFinite(parseInt(a));s&&e.push(`width="${o}"`),l&&e.push(`height="${a}"`)}return{href:u,dimensions:e}}var bG=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Yot(u,e){io(e)?u.title=oee(e):e!=null&&e.markdownNotSupportedFallback?u.title=e.markdownNotSupportedFallback:u.removeAttribute("title")}class Qot{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}update(e,t,n){var i;return bG(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||io(e)||e instanceof HTMLElement)r=e;else if(!uk(e.markdown))r=(i=e.markdown)!==null&&i!==void 0?i:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(v("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new vi;const a=this._cancellationTokenSource.token;if(r=yield e.markdown(a),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||a.isCancellationRequested)return}this.show(r,t,n)})}show(e,t,n){const i=this._hoverWidget;if(this.hasContent(e)){const r=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i},n);this._hoverWidget=this.hoverDelegate.showHover(r,t)}i==null||i.dispose()}hasContent(e){return e?nm(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function Tbe(u,e,t,n){let i,r;const a=(d,h)=>{var E;const m=r!==void 0;d&&(r==null||r.dispose(),r=void 0),h&&(i==null||i.dispose(),i=void 0),m&&((E=u.onDidHideHover)===null||E===void 0||E.call(u))},o=(d,h,E)=>new Vl(()=>bG(this,void 0,void 0,function*(){(!r||r.isDisposed)&&(r=new Qot(u,E||e,d>0),yield r.update(t,h,n))}),d),s=()=>{if(i)return;const d=new pe,h=g=>a(!1,g.fromElement===e);d.add(ce(e,Me.MOUSE_LEAVE,h,!0));const E=()=>a(!0,!0);d.add(ce(e,Me.MOUSE_DOWN,E,!0));const m={targetElements:[e],dispose:()=>{}};if(u.placement===void 0||u.placement==="mouse"){const g=f=>{m.x=f.x+10,f.target instanceof HTMLElement&&f.target.classList.contains("action-label")&&a(!0,!0)};d.add(ce(e,Me.MOUSE_MOVE,g,!0))}d.add(o(u.delay,!1,m)),i=d},l=ce(e,Me.MOUSE_OVER,s,!0);return{show:d=>{a(!1,!0),o(0,d)},hide:()=>{a(!0,!0)},update:(d,h)=>bG(this,void 0,void 0,function*(){t=d,yield r==null?void 0:r.update(t,void 0,h)}),dispose:()=>{l.dispose(),a(!0,!0)}}}function Xot(u,e={}){const t=see(e);return t.textContent=u,t}function est(u,e={}){const t=see(e);return Nbe(t,ust(u,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function see(u){const e=u.inline?"span":"div",t=document.createElement(e);return u.className&&(t.className=u.className),t}class tst{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function Nbe(u,e,t,n){let i;if(e.type===2)i=document.createTextNode(e.content||"");else if(e.type===3)i=document.createElement("b");else if(e.type===4)i=document.createElement("i");else if(e.type===7&&n)i=document.createElement("code");else if(e.type===5&&t){const r=document.createElement("a");t.disposables.add(xi(r,"click",a=>{t.callback(String(e.index),a)})),i=r}else e.type===8?i=document.createElement("br"):e.type===1&&(i=u);i&&u!==i&&u.appendChild(i),i&&Array.isArray(e.children)&&e.children.forEach(r=>{Nbe(i,r,t,n)})}function ust(u,e){const t={type:1,children:[]};let n=0,i=t;const r=[],a=new tst(u);for(;!a.eos();){let o=a.next();const s=o==="\\"&&kG(a.peek(),e)!==0;if(s&&(o=a.next()),!s&&nst(o,e)&&o===a.peek()){a.advance(),i.type===2&&(i=r.pop());const l=kG(o,e);if(i.type===l||i.type===5&&l===6)i=r.pop();else{const c={type:l,children:[]};l===5&&(c.index=n,n++),i.children.push(c),r.push(i),i=c}}else if(o===` +`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){const n=new RegExp(Js(t),"g");return e.replace(n,(i,r)=>e.charAt(r-1)!=="\\"?`\\${i}`:i)}}function Ev(u){return nm(u)?!u.value:Array.isArray(u)?u.every(Ev):!0}function nm(u){return u instanceof Zr?!0:u&&typeof u=="object"?typeof u.value=="string"&&(typeof u.isTrusted=="boolean"||typeof u.isTrusted=="object"||u.isTrusted===void 0)&&(typeof u.supportThemeIcons=="boolean"||u.supportThemeIcons===void 0):!1}function qot(u,e){return u===e?!0:!u||!e?!1:u.value===e.value&&u.isTrusted===e.isTrusted&&u.supportThemeIcons===e.supportThemeIcons&&u.supportHtml===e.supportHtml&&(u.baseUri===e.baseUri||!!u.baseUri&&!!e.baseUri&&TX(dt.from(u.baseUri),dt.from(e.baseUri)))}function Jot(u){return u.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function A9(u){return u.replace(/"/g,""")}function uH(u){return u&&u.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function Zot(u){const e=[],t=u.split("|").map(i=>i.trim());u=t[0];const n=t[1];if(n){const i=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),a=i?i[1]:"",o=r?r[1]:"",s=isFinite(parseInt(o)),l=isFinite(parseInt(a));s&&e.push(`width="${o}"`),l&&e.push(`height="${a}"`)}return{href:u,dimensions:e}}var bG=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Yot(u,e){io(e)?u.title=oee(e):e!=null&&e.markdownNotSupportedFallback?u.title=e.markdownNotSupportedFallback:u.removeAttribute("title")}class Qot{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}update(e,t,n){var i;return bG(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let r;if(e===void 0||io(e)||e instanceof HTMLElement)r=e;else if(!uk(e.markdown))r=(i=e.markdown)!==null&&i!==void 0?i:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(v("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new vi;const a=this._cancellationTokenSource.token;if(r=yield e.markdown(a),r===void 0&&(r=e.markdownNotSupportedFallback),this.isDisposed||a.isCancellationRequested)return}this.show(r,t,n)})}show(e,t,n){const i=this._hoverWidget;if(this.hasContent(e)){const r=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i},n);this._hoverWidget=this.hoverDelegate.showHover(r,t)}i==null||i.dispose()}hasContent(e){return e?nm(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function Tbe(u,e,t,n){let i,r;const a=(d,h)=>{var E;const m=r!==void 0;d&&(r==null||r.dispose(),r=void 0),h&&(i==null||i.dispose(),i=void 0),m&&((E=u.onDidHideHover)===null||E===void 0||E.call(u))},o=(d,h,E)=>new Vl(()=>bG(this,void 0,void 0,function*(){(!r||r.isDisposed)&&(r=new Qot(u,E||e,d>0),yield r.update(t,h,n))}),d),s=()=>{if(i)return;const d=new pe,h=g=>a(!1,g.fromElement===e);d.add(ce(e,Me.MOUSE_LEAVE,h,!0));const E=()=>a(!0,!0);d.add(ce(e,Me.MOUSE_DOWN,E,!0));const m={targetElements:[e],dispose:()=>{}};if(u.placement===void 0||u.placement==="mouse"){const g=f=>{m.x=f.x+10,f.target instanceof HTMLElement&&f.target.classList.contains("action-label")&&a(!0,!0)};d.add(ce(e,Me.MOUSE_MOVE,g,!0))}d.add(o(u.delay,!1,m)),i=d},l=ce(e,Me.MOUSE_OVER,s,!0);return{show:d=>{a(!1,!0),o(0,d)},hide:()=>{a(!0,!0)},update:(d,h)=>bG(this,void 0,void 0,function*(){t=d,yield r==null?void 0:r.update(t,void 0,h)}),dispose:()=>{l.dispose(),a(!0,!0)}}}function Xot(u,e={}){const t=see(e);return t.textContent=u,t}function est(u,e={}){const t=see(e);return Nbe(t,ust(u,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function see(u){const e=u.inline?"span":"div",t=document.createElement(e);return u.className&&(t.className=u.className),t}class tst{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function Nbe(u,e,t,n){let i;if(e.type===2)i=document.createTextNode(e.content||"");else if(e.type===3)i=document.createElement("b");else if(e.type===4)i=document.createElement("i");else if(e.type===7&&n)i=document.createElement("code");else if(e.type===5&&t){const r=document.createElement("a");t.disposables.add(xi(r,"click",a=>{t.callback(String(e.index),a)})),i=r}else e.type===8?i=document.createElement("br"):e.type===1&&(i=u);i&&u!==i&&u.appendChild(i),i&&Array.isArray(e.children)&&e.children.forEach(r=>{Nbe(i,r,t,n)})}function ust(u,e){const t={type:1,children:[]};let n=0,i=t;const r=[],a=new tst(u);for(;!a.eos();){let o=a.next();const s=o==="\\"&&kG(a.peek(),e)!==0;if(s&&(o=a.next()),!s&&nst(o,e)&&o===a.peek()){a.advance(),i.type===2&&(i=r.pop());const l=kG(o,e);if(i.type===l||i.type===5&&l===6)i=r.pop();else{const c={type:l,children:[]};l===5&&(c.index=n,n++),i.children.push(c),r.push(i),i=c}}else if(o===` `)i.type===2&&(i=r.pop()),i.children.push({type:8});else if(i.type!==2){const l={type:2,content:o};i.children.push(l),r.push(i),i=l}else i.content+=o}return i.type===2&&(i=r.pop()),t}function nst(u,e){return kG(u,e)!==0}function kG(u,e){switch(u){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}const ist=new RegExp(`(\\\\)?\\$\\((${st.iconNameExpression}(?:${st.iconModifierExpression})?)\\)`,"g");function im(u){const e=new Array;let t,n=0,i=0;for(;(t=ist.exec(u))!==null;){i=t.index||0,noe.length)&&(se=oe.length);for(var ie=0,$=new Array(se);ie=oe.length?{done:!0}:{done:!1,value:oe[$++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=o();function s(oe){e.defaults=oe}var l=/[&<>"']/,c=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,E={"&":"&","<":"<",">":">",'"':""","'":"'"},m=function(se){return E[se]};function g(oe,se){if(se){if(l.test(oe))return oe.replace(c,m)}else if(d.test(oe))return oe.replace(h,m);return oe}var f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function p(oe){return oe.replace(f,function(se,ie){return ie=ie.toLowerCase(),ie==="colon"?":":ie.charAt(0)==="#"?ie.charAt(1)==="x"?String.fromCharCode(parseInt(ie.substring(2),16)):String.fromCharCode(+ie.substring(1)):""})}var D=/(^|[^\[])\^/g;function x(oe,se){oe=typeof oe=="string"?oe:oe.source,se=se||"";var ie={replace:function(Z,ue){return ue=ue.source||ue,ue=ue.replace(D,"$1"),oe=oe.replace(Z,ue),ie},getRegex:function(){return new RegExp(oe,se)}};return ie}var b=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(oe,se,ie){if(oe){var $;try{$=decodeURIComponent(p(ie)).replace(b,"").toLowerCase()}catch{return null}if($.indexOf("javascript:")===0||$.indexOf("vbscript:")===0||$.indexOf("data:")===0)return null}se&&!k.test(ie)&&(ie=N(se,ie));try{ie=encodeURI(ie).replace(/%25/g,"%")}catch{return null}return ie}var F={},S=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function N(oe,se){F[" "+oe]||(S.test(oe)?F[" "+oe]=oe+"/":F[" "+oe]=L(oe,"/",!0)),oe=F[" "+oe];var ie=oe.indexOf(":")===-1;return se.substring(0,2)==="//"?ie?se:oe.replace(w,"$1")+se:se.charAt(0)==="/"?ie?se:oe.replace(z,"$1")+se:oe+se}var O={exec:function(){}};function y(oe){for(var se=1,ie,$;se=0&&fe[Je]==="\\";)Le=!Le;return Le?"|":" |"}),$=ie.split(/ \|/),Z=0;if($[0].trim()||$.shift(),$.length>0&&!$[$.length-1].trim()&&$.pop(),$.length>se)$.splice(se);else for(;$.length1;)se&1&&(ie+=oe),se>>=1,oe+=oe;return ie+oe}function H(oe,se,ie,$){var Z=se.href,ue=se.title?g(se.title):null,te=oe[1].replace(/\\([\[\]])/g,"$1");if(oe[0].charAt(0)!=="!"){$.state.inLink=!0;var fe={type:"link",raw:ie,href:Z,title:ue,text:te,tokens:$.inlineTokens(te)};return $.state.inLink=!1,fe}return{type:"image",raw:ie,href:Z,title:ue,text:g(te)}}function V(oe,se){var ie=oe.match(/^(\s+)(?:```)/);if(ie===null)return se;var $=ie[1];return se.split(` `).map(function(Z){var ue=Z.match(/^\s+/);if(ue===null)return Z;var te=ue[0];return te.length>=$.length?Z.slice($.length):Z}).join(` @@ -213,7 +213,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)},se.strong=function($){return""+$+""},se.em=function($){return""+$+""},se.codespan=function($){return""+$+""},se.br=function(){return this.options.xhtml?"
":"
"},se.del=function($){return""+$+""},se.link=function($,Z,ue){if($=A(this.options.sanitize,this.options.baseUrl,$),$===null)return ue;var te='",te},se.image=function($,Z,ue){if($=A(this.options.sanitize,this.options.baseUrl,$),$===null)return ue;var te=''+ue+'":">",te},se.text=function($){return $},oe}(),Ve=function(){function oe(){}var se=oe.prototype;return se.strong=function($){return $},se.em=function($){return $},se.codespan=function($){return $},se.del=function($){return $},se.html=function($){return $},se.text=function($){return $},se.link=function($,Z,ue){return""+ue},se.image=function($,Z,ue){return""+ue},se.br=function(){return""},oe}(),Ue=function(){function oe(){this.seen={}}var se=oe.prototype;return se.serialize=function($){return $.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},se.getNextSafeSlug=function($,Z){var ue=$,te=0;if(this.seen.hasOwnProperty(ue)){te=this.seen[$];do te++,ue=$+"-"+te;while(this.seen.hasOwnProperty(ue))}return Z||(this.seen[$]=te,this.seen[ue]=0),ue},se.slug=function($,Z){Z===void 0&&(Z={});var ue=this.serialize($);return this.getNextSafeSlug(ue,Z.dryrun)},oe}(),qe=function(){function oe(ie){this.options=ie||e.defaults,this.options.renderer=this.options.renderer||new _e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ve,this.slugger=new Ue}oe.parse=function($,Z){var ue=new oe(Z);return ue.parse($)},oe.parseInline=function($,Z){var ue=new oe(Z);return ue.parseInline($)};var se=oe.prototype;return se.parse=function($,Z){Z===void 0&&(Z=!0);var ue="",te,fe,Le,Je,it,ct,xt,Jt,Ze,Ie,Tu,gu,fn,Wt,Ln,Vu,un,zn,bn,$u=$.length;for(te=0;te<$u;te++){if(Ie=$[te],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Ie.type]&&(bn=this.options.extensions.renderers[Ie.type].call({parser:this},Ie),bn!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Ie.type))){ue+=bn||"";continue}switch(Ie.type){case"space":continue;case"hr":{ue+=this.renderer.hr();continue}case"heading":{ue+=this.renderer.heading(this.parseInline(Ie.tokens),Ie.depth,p(this.parseInline(Ie.tokens,this.textRenderer)),this.slugger);continue}case"code":{ue+=this.renderer.code(Ie.text,Ie.lang,Ie.escaped);continue}case"table":{for(Jt="",xt="",Je=Ie.header.length,fe=0;fe0&&Ln.tokens[0].type==="paragraph"?(Ln.tokens[0].text=zn+" "+Ln.tokens[0].text,Ln.tokens[0].tokens&&Ln.tokens[0].tokens.length>0&&Ln.tokens[0].tokens[0].type==="text"&&(Ln.tokens[0].tokens[0].text=zn+" "+Ln.tokens[0].tokens[0].text)):Ln.tokens.unshift({type:"text",text:zn}):Wt+=zn),Wt+=this.parse(Ln.tokens,fn),Ze+=this.renderer.listitem(Wt,un,Vu);ue+=this.renderer.list(Ze,Tu,gu);continue}case"html":{ue+=this.renderer.html(Ie.text);continue}case"paragraph":{ue+=this.renderer.paragraph(this.parseInline(Ie.tokens));continue}case"text":{for(Ze=Ie.tokens?this.parseInline(Ie.tokens):Ie.text;te+1<$u&&$[te+1].type==="text";)Ie=$[++te],Ze+=` `+(Ie.tokens?this.parseInline(Ie.tokens):Ie.text);ue+=Z?this.renderer.paragraph(Ze):Ze;continue}default:{var wu='Token with "'+Ie.type+'" type was not found.';if(this.options.silent){console.error(wu);return}else throw new Error(wu)}}}return ue},se.parseInline=function($,Z){Z=Z||this.renderer;var ue="",te,fe,Le,Je=$.length;for(te=0;te"u"||oe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");if(typeof se=="function"&&(ie=se,se=null),se=y({},Se.defaults,se||{}),R(se),ie){var $=se.highlight,Z;try{Z=ge.lex(oe,se)}catch(Je){return ie(Je)}var ue=function(it){var ct;if(!it)try{se.walkTokens&&Se.walkTokens(Z,se.walkTokens),ct=qe.parse(Z,se)}catch(xt){it=xt}return se.highlight=$,it?ie(it):ie(null,ct)};if(!$||$.length<3||(delete se.highlight,!Z.length))return ue();var te=0;Se.walkTokens(Z,function(Je){Je.type==="code"&&(te++,setTimeout(function(){$(Je.text,Je.lang,function(it,ct){if(it)return ue(it);ct!=null&&ct!==Je.text&&(Je.text=ct,Je.escaped=!0),te--,te===0&&ue()})},0))}),te===0&&ue();return}function fe(Je){if(Je.message+=` Please report this to https://github.com/markedjs/marked.`,se.silent)return"

An error occurred:

"+g(Je.message+"",!0)+"
";throw Je}try{var Le=ge.lex(oe,se);if(se.walkTokens){if(se.async)return Promise.all(Se.walkTokens(Le,se.walkTokens)).then(function(){return qe.parse(Le,se)}).catch(fe);Se.walkTokens(Le,se.walkTokens)}return qe.parse(Le,se)}catch(Je){fe(Je)}}Se.options=Se.setOptions=function(oe){return y(Se.defaults,oe),s(Se.defaults),Se},Se.getDefaults=o,Se.defaults=e.defaults,Se.use=function(){for(var oe=arguments.length,se=new Array(oe),ie=0;ie"u"||oe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");se=y({},Se.defaults,se||{}),R(se);try{var ie=ge.lexInline(oe,se);return se.walkTokens&&Se.walkTokens(ie,se.walkTokens),qe.parseInline(ie,se)}catch($){if($.message+=` -Please report this to https://github.com/markedjs/marked.`,se.silent)return"

An error occurred:

"+g($.message+"",!0)+"
";throw $}},Se.Parser=qe,Se.parser=qe.parse,Se.Renderer=_e,Se.TextRenderer=Ve,Se.Lexer=ge,Se.lexer=ge.lex,Se.Tokenizer=U,Se.Slugger=Ue,Se.parse=Se;var de=Se.options,he=Se.setOptions,Be=Se.use,je=Se.walkTokens,bt=Se.parseInline,qt=Se,ou=qe.parse,Vt=ge.lex;e.Lexer=ge,e.Parser=qe,e.Renderer=_e,e.Slugger=Ue,e.TextRenderer=Ve,e.Tokenizer=U,e.getDefaults=o,e.lexer=Vt,e.marked=Se,e.options=de,e.parse=qt,e.parseInline=bt,e.parser=ou,e.setOptions=he,e.use=Be,e.walkTokens=je,Object.defineProperty(e,"__esModule",{value:!0})})})();ho.Lexer||exports.Lexer;ho.Parser||exports.Parser;ho.Renderer||exports.Renderer;ho.Slugger||exports.Slugger;ho.TextRenderer||exports.TextRenderer;ho.Tokenizer||exports.Tokenizer;ho.getDefaults||exports.getDefaults;ho.lexer||exports.lexer;var Ud=ho.marked||exports.marked;ho.options||exports.options;ho.parse||exports.parse;ho.parseInline||exports.parseInline;ho.parser||exports.parser;ho.setOptions||exports.setOptions;ho.use||exports.use;ho.walkTokens||exports.walkTokens;function rst(u){return JSON.stringify(u,ast)}function AG(u){let e=JSON.parse(u);return e=_G(e),e}function ast(u,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function _G(u,e=0){if(!u||e>200)return u;if(typeof u=="object"){switch(u.$mid){case 1:return dt.revive(u);case 2:return new RegExp(u.source,u.flags);case 17:return new Date(u.source)}if(u instanceof tP||u instanceof Uint8Array)return u;if(Array.isArray(u))for(let t=0;t{let n=[],i=[];return u&&({href:u,dimensions:n}=Zot(u),i.push(`src="${A9(u)}"`)),t&&i.push(`alt="${A9(t)}"`),e&&i.push(`title="${A9(e)}"`),n.length&&(i=i.concat(n)),""},paragraph:u=>`

${u}

`,link:(u,e,t)=>typeof u!="string"?"":(u===t&&(t=uH(t)),e=typeof e=="string"?A9(uH(e)):"",u=uH(u),u=u.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
${t}`)});function BP(u,e={},t={}){var n,i;const r=new pe;let a=!1;const o=see(e),s=function(p){let D;try{D=AG(decodeURIComponent(p))}catch{}return D?(D=ave(D,x=>{if(u.uris&&u.uris[x])return dt.revive(u.uris[x])}),encodeURIComponent(JSON.stringify(D))):p},l=function(p,D){const x=u.uris&&u.uris[p];let b=dt.revive(x);return D?p.startsWith(Ot.data+":")?p:(b||(b=dt.parse(p)),i6e.uriToBrowserUri(b).toString(!0)):!b||dt.parse(p).toString()===b.toString()?p:(b.query&&(b=b.with({query:s(b.query)})),b.toString())},c=new Ud.Renderer;c.image=nH.image,c.link=nH.link,c.paragraph=nH.paragraph;const d=[],h=[];if(e.codeBlockRendererSync?c.code=(p,D)=>{const x=yG.nextId(),b=e.codeBlockRendererSync(Zse(D),p);return h.push([x,b]),`
${pB(p)}
`}:e.codeBlockRenderer&&(c.code=(p,D)=>{const x=yG.nextId(),b=e.codeBlockRenderer(Zse(D),p);return d.push(b.then(k=>[x,k])),`
${pB(p)}
`}),e.actionHandler){const p=function(b){let k=b.target;if(!(k.tagName!=="A"&&(k=k.parentElement,!k||k.tagName!=="A")))try{let A=k.dataset.href;A&&(u.baseUri&&(A=iH(dt.from(u.baseUri),A)),e.actionHandler.callback(A,b))}catch(A){zt(A)}finally{b.preventDefault()}},D=e.actionHandler.disposables.add(new Zt(o,"click")),x=e.actionHandler.disposables.add(new Zt(o,"auxclick"));e.actionHandler.disposables.add(Ne.any(D.event,x.event)(b=>{const k=new D0(b);!k.leftButton&&!k.middleButton||p(k)})),e.actionHandler.disposables.add(ce(o,"keydown",b=>{const k=new ln(b);!k.equals(10)&&!k.equals(3)||p(k)}))}u.supportHtml||(t.sanitizer=p=>(u.isTrusted?p.match(/^(]+>)|(<\/\s*span>)$/):void 0)?p:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let E=(n=u.value)!==null&&n!==void 0?n:"";E.length>1e5&&(E=`${E.substr(0,1e5)}…`),u.supportThemeIcons&&(E=Wot(E));let m;if(e.fillInIncompleteTokens){const p=Object.assign(Object.assign({},Ud.defaults),t),D=Ud.lexer(E,p),x=mst(D);m=Ud.parser(x,p)}else m=Ud.parse(E,t);u.supportThemeIcons&&(m=im(m).map(D=>typeof D=="string"?D:D.outerHTML).join(""));const f=new DOMParser().parseFromString(SG(u,m),"text/html");if(f.body.querySelectorAll("img").forEach(p=>{const D=p.getAttribute("src");if(D){let x=D;try{u.baseUri&&(x=iH(dt.from(u.baseUri),x))}catch{}p.src=l(x,!0)}}),f.body.querySelectorAll("a").forEach(p=>{const D=p.getAttribute("href");if(p.setAttribute("href",""),!D||/^data:|javascript:/i.test(D)||/^command:/i.test(D)&&!u.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(D))p.replaceWith(...p.childNodes);else{let x=l(D,!1);u.baseUri&&(x=iH(dt.from(u.baseUri),D)),p.dataset.href=x}}),o.innerHTML=SG(u,f.body.innerHTML),d.length>0)Promise.all(d).then(p=>{var D,x;if(a)return;const b=new Map(p),k=o.querySelectorAll("div[data-code]");for(const A of k){const F=b.get((D=A.dataset.code)!==null&&D!==void 0?D:"");F&&Pr(A,F)}(x=e.asyncRenderCallback)===null||x===void 0||x.call(e)});else if(h.length>0){const p=new Map(h),D=o.querySelectorAll("div[data-code]");for(const x of D){const b=p.get((i=x.dataset.code)!==null&&i!==void 0?i:"");b&&Pr(x,b)}}if(e.asyncRenderCallback)for(const p of o.getElementsByTagName("img")){const D=r.add(ce(p,"load",()=>{D.dispose(),e.asyncRenderCallback()}))}return{element:o,dispose:()=>{a=!0,r.dispose()}}}function Zse(u){if(!u)return"";const e=u.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:u}function iH(u,e){return/^\w[\w\d+.-]*:/.test(e)?e:u.path.endsWith("/")?qoe(u,e).toString():qoe(xP(u),e).toString()}function SG(u,e){const{config:t,allowedSchemes:n}=sst(u);t6e("uponSanitizeAttribute",(r,a)=>{if(a.attrName==="style"||a.attrName==="class"){if(r.tagName==="SPAN"){if(a.attrName==="style"){a.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(a.attrValue);return}else if(a.attrName==="class"){a.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(a.attrValue);return}}a.keepAttr=!1;return}});const i=iZe(n);try{return e6e(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{u6e("uponSanitizeAttribute"),i.dispose()}}const ost=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function sst(u){const e=[Ot.http,Ot.https,Ot.mailto,Ot.data,Ot.file,Ot.vscodeFileResource,Ot.vscodeRemote,Ot.vscodeRemoteResource];return u.isTrusted&&e.push(Ot.command),{config:{ALLOWED_TAGS:[...rZe],ALLOWED_ATTR:ost,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function lst(u){return typeof u=="string"?u:cst(u)}function cst(u){var e;let t=(e=u.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const n=Ud.parse(t,{renderer:hst.value}).replace(/&(#\d+|[a-zA-Z]+);/g,i=>{var r;return(r=dst.get(i))!==null&&r!==void 0?r:i});return SG({isTrusted:!1},n).toString()}const dst=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),hst=new mg(()=>{const u=new Ud.Renderer;return u.code=e=>e,u.blockquote=e=>e,u.html=e=>"",u.heading=(e,t,n)=>e+` +Please report this to https://github.com/markedjs/marked.`,se.silent)return"

An error occurred:

"+g($.message+"",!0)+"
";throw $}},Se.Parser=qe,Se.parser=qe.parse,Se.Renderer=_e,Se.TextRenderer=Ve,Se.Lexer=ge,Se.lexer=ge.lex,Se.Tokenizer=U,Se.Slugger=Ue,Se.parse=Se;var de=Se.options,he=Se.setOptions,Be=Se.use,je=Se.walkTokens,bt=Se.parseInline,qt=Se,ou=qe.parse,Vt=ge.lex;e.Lexer=ge,e.Parser=qe,e.Renderer=_e,e.Slugger=Ue,e.TextRenderer=Ve,e.Tokenizer=U,e.getDefaults=o,e.lexer=Vt,e.marked=Se,e.options=de,e.parse=qt,e.parseInline=bt,e.parser=ou,e.setOptions=he,e.use=Be,e.walkTokens=je,Object.defineProperty(e,"__esModule",{value:!0})})})();ho.Lexer||exports.Lexer;ho.Parser||exports.Parser;ho.Renderer||exports.Renderer;ho.Slugger||exports.Slugger;ho.TextRenderer||exports.TextRenderer;ho.Tokenizer||exports.Tokenizer;ho.getDefaults||exports.getDefaults;ho.lexer||exports.lexer;var Ud=ho.marked||exports.marked;ho.options||exports.options;ho.parse||exports.parse;ho.parseInline||exports.parseInline;ho.parser||exports.parser;ho.setOptions||exports.setOptions;ho.use||exports.use;ho.walkTokens||exports.walkTokens;function rst(u){return JSON.stringify(u,ast)}function AG(u){let e=JSON.parse(u);return e=_G(e),e}function ast(u,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function _G(u,e=0){if(!u||e>200)return u;if(typeof u=="object"){switch(u.$mid){case 1:return dt.revive(u);case 2:return new RegExp(u.source,u.flags);case 17:return new Date(u.source)}if(u instanceof tP||u instanceof Uint8Array)return u;if(Array.isArray(u))for(let t=0;t{let n=[],i=[];return u&&({href:u,dimensions:n}=Zot(u),i.push(`src="${A9(u)}"`)),t&&i.push(`alt="${A9(t)}"`),e&&i.push(`title="${A9(e)}"`),n.length&&(i=i.concat(n)),""},paragraph:u=>`

${u}

`,link:(u,e,t)=>typeof u!="string"?"":(u===t&&(t=uH(t)),e=typeof e=="string"?A9(uH(e)):"",u=uH(u),u=u.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`${t}`)});function BP(u,e={},t={}){var n,i;const r=new pe;let a=!1;const o=see(e),s=function(p){let D;try{D=AG(decodeURIComponent(p))}catch{}return D?(D=ave(D,x=>{if(u.uris&&u.uris[x])return dt.revive(u.uris[x])}),encodeURIComponent(JSON.stringify(D))):p},l=function(p,D){const x=u.uris&&u.uris[p];let b=dt.revive(x);return D?p.startsWith(Ot.data+":")?p:(b||(b=dt.parse(p)),i6e.uriToBrowserUri(b).toString(!0)):!b||dt.parse(p).toString()===b.toString()?p:(b.query&&(b=b.with({query:s(b.query)})),b.toString())},c=new Ud.Renderer;c.image=nH.image,c.link=nH.link,c.paragraph=nH.paragraph;const d=[],h=[];if(e.codeBlockRendererSync?c.code=(p,D)=>{const x=yG.nextId(),b=e.codeBlockRendererSync(Zse(D),p);return h.push([x,b]),`
${pB(p)}
`}:e.codeBlockRenderer&&(c.code=(p,D)=>{const x=yG.nextId(),b=e.codeBlockRenderer(Zse(D),p);return d.push(b.then(k=>[x,k])),`
${pB(p)}
`}),e.actionHandler){const p=function(b){let k=b.target;if(!(k.tagName!=="A"&&(k=k.parentElement,!k||k.tagName!=="A")))try{let A=k.dataset.href;A&&(u.baseUri&&(A=iH(dt.from(u.baseUri),A)),e.actionHandler.callback(A,b))}catch(A){zt(A)}finally{b.preventDefault()}},D=e.actionHandler.disposables.add(new Zt(o,"click")),x=e.actionHandler.disposables.add(new Zt(o,"auxclick"));e.actionHandler.disposables.add(Ne.any(D.event,x.event)(b=>{const k=new x0(b);!k.leftButton&&!k.middleButton||p(k)})),e.actionHandler.disposables.add(ce(o,"keydown",b=>{const k=new ln(b);!k.equals(10)&&!k.equals(3)||p(k)}))}u.supportHtml||(t.sanitizer=p=>(u.isTrusted?p.match(/^(]+>)|(<\/\s*span>)$/):void 0)?p:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let E=(n=u.value)!==null&&n!==void 0?n:"";E.length>1e5&&(E=`${E.substr(0,1e5)}…`),u.supportThemeIcons&&(E=Wot(E));let m;if(e.fillInIncompleteTokens){const p=Object.assign(Object.assign({},Ud.defaults),t),D=Ud.lexer(E,p),x=mst(D);m=Ud.parser(x,p)}else m=Ud.parse(E,t);u.supportThemeIcons&&(m=im(m).map(D=>typeof D=="string"?D:D.outerHTML).join(""));const f=new DOMParser().parseFromString(SG(u,m),"text/html");if(f.body.querySelectorAll("img").forEach(p=>{const D=p.getAttribute("src");if(D){let x=D;try{u.baseUri&&(x=iH(dt.from(u.baseUri),x))}catch{}p.src=l(x,!0)}}),f.body.querySelectorAll("a").forEach(p=>{const D=p.getAttribute("href");if(p.setAttribute("href",""),!D||/^data:|javascript:/i.test(D)||/^command:/i.test(D)&&!u.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(D))p.replaceWith(...p.childNodes);else{let x=l(D,!1);u.baseUri&&(x=iH(dt.from(u.baseUri),D)),p.dataset.href=x}}),o.innerHTML=SG(u,f.body.innerHTML),d.length>0)Promise.all(d).then(p=>{var D,x;if(a)return;const b=new Map(p),k=o.querySelectorAll("div[data-code]");for(const A of k){const F=b.get((D=A.dataset.code)!==null&&D!==void 0?D:"");F&&Pr(A,F)}(x=e.asyncRenderCallback)===null||x===void 0||x.call(e)});else if(h.length>0){const p=new Map(h),D=o.querySelectorAll("div[data-code]");for(const x of D){const b=p.get((i=x.dataset.code)!==null&&i!==void 0?i:"");b&&Pr(x,b)}}if(e.asyncRenderCallback)for(const p of o.getElementsByTagName("img")){const D=r.add(ce(p,"load",()=>{D.dispose(),e.asyncRenderCallback()}))}return{element:o,dispose:()=>{a=!0,r.dispose()}}}function Zse(u){if(!u)return"";const e=u.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:u}function iH(u,e){return/^\w[\w\d+.-]*:/.test(e)?e:u.path.endsWith("/")?qoe(u,e).toString():qoe(xP(u),e).toString()}function SG(u,e){const{config:t,allowedSchemes:n}=sst(u);t6e("uponSanitizeAttribute",(r,a)=>{if(a.attrName==="style"||a.attrName==="class"){if(r.tagName==="SPAN"){if(a.attrName==="style"){a.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(a.attrValue);return}else if(a.attrName==="class"){a.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(a.attrValue);return}}a.keepAttr=!1;return}});const i=iZe(n);try{return e6e(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{u6e("uponSanitizeAttribute"),i.dispose()}}const ost=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function sst(u){const e=[Ot.http,Ot.https,Ot.mailto,Ot.data,Ot.file,Ot.vscodeFileResource,Ot.vscodeRemote,Ot.vscodeRemoteResource];return u.isTrusted&&e.push(Ot.command),{config:{ALLOWED_TAGS:[...rZe],ALLOWED_ATTR:ost,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}function lst(u){return typeof u=="string"?u:cst(u)}function cst(u){var e;let t=(e=u.value)!==null&&e!==void 0?e:"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const n=Ud.parse(t,{renderer:hst.value}).replace(/&(#\d+|[a-zA-Z]+);/g,i=>{var r;return(r=dst.get(i))!==null&&r!==void 0?r:i});return SG({isTrusted:!1},n).toString()}const dst=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),hst=new mg(()=>{const u=new Ud.Renderer;return u.code=e=>e,u.blockquote=e=>e,u.html=e=>"",u.heading=(e,t,n)=>e+` `,u.hr=()=>"",u.list=(e,t)=>e,u.listitem=e=>e+` `,u.paragraph=e=>e+` `,u.table=(e,t)=>e+t+` @@ -222,7 +222,7 @@ Please report this to https://github.com/markedjs/marked.`,se.silent)return"

A `),n=t[t.length-1];if(n.includes("`"))return fst(u);if(n.includes("**"))return Cst(u);if(n.match(/\*\w/))return pst(u);if(n.match(/(^|\s)__\w/))return bst(u);if(n.match(/(^|\s)_\w/))return Dst(u);if(n.match(/(^|\s)\[.*\]\(\w*/))return xst(u);if(n.match(/(^|\s)\[\w/))return vst(u)}}function mst(u){let e,t;for(e=0;e"u"&&a.match(/^\s*\|/)){const o=a.match(/(\|[^\|]+)(?=\||$)/g);o&&(n=o.length)}else if(typeof n=="number")if(a.match(/^\s*\|/)){if(r!==t.length-1)return;i=!0}else return}if(typeof n=="number"&&n>0){const r=i?t.slice(0,-1).join(` `):e,a=!!r.match(/\|\s*$/),o=r+(a?"":"|")+` -|${" --- |".repeat(n)}`;return Ud.lexer(o)}}class Fst{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(i=>i.splice(e,t,n))}}class pD extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function Yse(u,e){const t=[];for(const n of e){if(u.start>=n.range.end)continue;if(u.ende.concat(t),[]))}class Qse{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){const i=n.length-t,r=Yse({start:0,end:e},this.groups),a=Yse({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(s=>({range:BG(s.range,i),size:s.size})),o=n.map((s,l)=>({range:{start:e+l,end:e+l+1},size:s.size}));this.groups=Ast(r,o,a),this._size=this._paddingTop+this.groups.reduce((s,l)=>s+l.size*(l.range.end-l.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var y4=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const Kg={CurrentDragAndDropData:void 0},bd={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(u){return[u]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class CA{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Bst{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class wst{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class q0{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:cj(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,i=bd){var r,a,o,s,l,c,d,h,E,m,g,f,p;if(this.virtualDelegate=t,this.domId=`list_id_${++q0.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Tl(50),this.splicing=!1,this.dragOverAnimationStopDisposable=ne.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=ne.None,this.onDragLeaveTimeout=ne.None,this.disposables=new pe,this._onDidChangeContentHeight=new Q,this._onDidChangeContentWidth=new Q,this._horizontalScrolling=!1,i.horizontalScrolling&&i.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new Qse((r=i.paddingTop)!==null&&r!==void 0?r:0);for(const x of n)this.renderers.set(x.templateId,x);this.cache=this.disposables.add(new Sst(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof i.mouseSupport=="boolean"?i.mouseSupport:!0),this._horizontalScrolling=(a=i.horizontalScrolling)!==null&&a!==void 0?a:bd.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof i.paddingBottom>"u"?0:i.paddingBottom,this.accessibilityProvider=new zst(i.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((o=i.transformOptimization)!==null&&o!==void 0?o:bd.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Zu.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new hA({forceIntegerValues:!0,smoothScrollDuration:(s=i.smoothScrolling)!==null&&s!==void 0&&s?125:0,scheduleAtNextAnimationFrame:x=>T0(x)})),this.scrollableElement=this.disposables.add(new AX(this.rowsContainer,{alwaysConsumeMouseWheel:(l=i.alwaysConsumeMouseWheel)!==null&&l!==void 0?l:bd.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=i.verticalScrollMode)!==null&&c!==void 0?c:bd.verticalScrollMode,useShadows:(d=i.useShadows)!==null&&d!==void 0?d:bd.useShadows,mouseWheelScrollSensitivity:i.mouseWheelScrollSensitivity,fastScrollSensitivity:i.fastScrollSensitivity,scrollByPage:i.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(ce(this.rowsContainer,Yu.Change,x=>this.onTouchChange(x))),this.disposables.add(ce(this.scrollableElement.getDomNode(),"scroll",x=>x.target.scrollTop=0)),this.disposables.add(ce(this.domNode,"dragover",x=>this.onDragOver(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"drop",x=>this.onDrop(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"dragleave",x=>this.onDragLeave(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"dragend",x=>this.onDragEnd(x))),this.setRowLineHeight=(h=i.setRowLineHeight)!==null&&h!==void 0?h:bd.setRowLineHeight,this.setRowHeight=(E=i.setRowHeight)!==null&&E!==void 0?E:bd.setRowHeight,this.supportDynamicHeights=(m=i.supportDynamicHeights)!==null&&m!==void 0?m:bd.supportDynamicHeights,this.dnd=(g=i.dnd)!==null&&g!==void 0?g:this.disposables.add(bd.dnd),this.layout((f=i.initialSize)===null||f===void 0?void 0:f.height,(p=i.initialSize)===null||p===void 0?void 0:p.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t=Object.assign(Object.assign({},t??{}),{scrollByPage:e.scrollByPage})),e.mouseWheelScrollSensitivity!==void 0&&(t=Object.assign(Object.assign({},t??{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),e.fastScrollSensitivity!==void 0&&(t=Object.assign(Object.assign({},t??{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},a=aa.intersect(i,r),o=new Map;for(let A=a.end-1;A>=a.start;A--){const F=this.items[A];if(F.dragStartDisposable.dispose(),F.checkedDisposable.dispose(),F.row){let S=o.get(F.templateId);S||(S=[],o.set(F.templateId,S));const w=this.renderers.get(F.templateId);w&&w.disposeElement&&w.disposeElement(F.element,A,F.row.templateData,F.size),S.push(F.row)}F.row=null}const s={start:e+t,end:this.items.length},l=aa.intersect(s,i),c=aa.relativeComplement(s,i),d=n.map(A=>({id:String(this.itemId++),element:A,templateId:this.virtualDelegate.getTemplateId(A),size:this.virtualDelegate.getHeight(A),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(A),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:ne.None,checkedDisposable:ne.None}));let h;e===0&&t>=this.items.length?(this.rangeMap=new Qse(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const E=n.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),g=BG(l,E),f=aa.intersect(m,g);for(let A=f.start;ABG(A,E)),b=[{start:e,end:e+n.length},...D].map(A=>aa.intersect(m,A)),k=this.getNextToLastElement(b);for(const A of b)for(let F=A.start;FA.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=T0(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),n=this.rangeMap.positionAt(e.start+1);return n!==-1&&(n-t)/2+t{for(const d of l)for(let h=d.start;hi.row.domNode.setAttribute("aria-checked",String(!!d));c(o.value),i.checkedDisposable=o.onDidChange(c)}(r||!i.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(i.row.domNode,t):this.rowsContainer.appendChild(i.row.domNode)),this.updateItemInDOM(i,e);const s=this.renderers.get(i.templateId);if(!s)throw new Error(`No renderer found for template id ${i.templateId}`);s==null||s.renderElement(i.element,e,i.row.templateData,i.size);const l=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!l,l&&(i.dragStartDisposable=ce(i.row.domNode,"dragstart",c=>this.onDragStart(i.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=cj(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Ne.map(this.disposables.add(new Zt(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Ne.map(this.disposables.add(new Zt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Ne.filter(Ne.map(this.disposables.add(new Zt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Ne.any(Ne.map(this.disposables.add(new Zt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Ne.map(this.disposables.add(new Zt(this.domNode,Yu.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Ne.map(this.disposables.add(new Zt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Ne.map(this.disposables.add(new Zt(this.rowsContainer,Yu.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){var i,r;if(!n.dataTransfer)return;const a=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData($k.TEXT,t),n.dataTransfer.setDragImage){let o;this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(a,n)),typeof o>"u"&&(o=String(a.length));const s=ve(".monaco-drag-image");s.textContent=o;const c=(d=>{for(;d&&!d.classList.contains("monaco-workbench");)d=d.parentElement;return d||document.body})(this.domNode);c.appendChild(s),n.dataTransfer.setDragImage(s,-10,-10),setTimeout(()=>c.removeChild(s),0)}this.domNode.classList.add("dragging"),this.currentDragData=new CA(a),Kg.CurrentDragAndDropData=new Bst(a),(r=(i=this.dnd).onDragStart)===null||r===void 0||r.call(i,this.currentDragData,n)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Kg.CurrentDragAndDropData&&Kg.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Kg.CurrentDragAndDropData)this.currentDragData=Kg.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new wst}const n=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof n=="boolean"?n:n.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof n!="boolean"&&n.effect===0?"copy":"move";let i;if(typeof n!="boolean"&&n.feedback?i=n.feedback:typeof e.index>"u"?i=[-1]:i=[e.index],i=Lm(i).filter(r=>r>=-1&&rr-a),i=i[0]===-1?[-1]:i,Lst(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=ft(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const r of i){const a=this.items[r];a.dropTarget=!0,(t=a.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=ft(()=>{var r;for(const a of i){const o=this.items[a];o.dropTarget=!1,(r=o.row)===null||r===void 0||r.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Rm(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(t=this.dnd).onDragLeave)===null||n===void 0||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Kg.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Kg.CurrentDragAndDropData=void 0,(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=ne.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=a6e(this.domNode).top;this.dragOverAnimationDisposable=nZe(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Rm(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){const i=n.getAttribute("data-index");if(i){const r=Number(i);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){const i=this.getRenderRange(e,t);let r,a;e===this.elementTop(i.start)?(r=i.start,a=0):i.end-i.start>1&&(r=i.start+1,a=this.elementTop(r)-e);let o=0;for(;;){const s=this.getRenderRange(e,t);let l=!1;for(let c=s.start;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Xse=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Mst{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){const i=this.renderedElements.findIndex(r=>r.templateData===n);if(i>=0){const r=this.renderedElements[i];this.trait.unrender(n),r.index=t}else{const r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){const i=[];for(const r of this.renderedElements)r.index=e+t&&i.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=i}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}}let ow=class{get name(){return this._trait}get renderer(){return new Mst(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new Q,this.onChange=this._onChange.event}splice(e,t,n){var i;t=Math.max(0,Math.min(t,this.length-e));const r=n.length-t,a=e+t,o=[];let s=0;for(;s=a;)o.push(this.sortedIndexes[s++]+r);const l=this.length+r;if(this.sortedIndexes.length>0&&o.length===0&&l>0){const c=(i=this.sortedIndexes.find(d=>d>=e))!==null&&i!==void 0?i:l-1;o.push(Math.min(c,l-1))}this.renderer.splice(e,t,n.length),this._set(o,o),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(t0e),t)}_set(e,t,n){const i=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const a=wG(r,e);return this.renderer.renderIndexes(a),this._onChange.fire({indexes:e,browserEvent:n}),i}get(){return this.indexes}contains(e){return X2(this.sortedIndexes,e,t0e)>=0}dispose(){Su(this._onChange)}};Mp([Ci],ow.prototype,"renderer",null);class Tst extends ow{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class rH{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));const i=this.trait.get().map(o=>this.identityProvider.getId(this.view.element(o)).toString());if(i.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));const r=new Set(i),a=n.map(o=>r.has(this.identityProvider.getId(o).toString()));this.trait.splice(e,t,a)}}function rm(u){return u.tagName==="INPUT"||u.tagName==="TEXTAREA"}function k5(u){return u.classList.contains("monaco-editor")?!0:u.classList.contains("monaco-list")||!u.parentElement?!1:k5(u.parentElement)}function Pbe(u){return u.tagName==="A"&&u.classList.contains("monaco-button")||u.tagName==="DIV"&&u.classList.contains("monaco-button-dropdown")?!0:u.classList.contains("monaco-list")||!u.parentElement?!1:Pbe(u.parentElement)}class Rbe{get onKeyDown(){return Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keydown")).event,e=>e.filter(t=>!rm(t.target)).map(t=>new ln(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new pe,this.multipleSelectionDisposables=new pe,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(i=>{switch(i.keyCode){case 3:return this.onEnter(i);case 16:return this.onUpArrow(i);case 18:return this.onDownArrow(i);case 11:return this.onPageUpArrow(i);case 12:return this.onPageDownArrow(i);case 9:return this.onEscape(i);case 31:this.multipleSelectionSupport&&(iu?i.metaKey:i.ctrlKey)&&this.onCtrlA(i)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Wa(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Mp([Ci],Rbe.prototype,"onKeyDown",null);var qd;(function(u){u[u.Automatic=0]="Automatic",u[u.Trigger=1]="Trigger"})(qd||(qd={}));var F5;(function(u){u[u.Idle=0]="Idle",u[u.Typing=1]="Typing"})(F5||(F5={}));const Nst=new class{mightProducePrintableCharacter(u){return u.ctrlKey||u.metaKey||u.altKey?!1:u.keyCode>=31&&u.keyCode<=56||u.keyCode>=21&&u.keyCode<=30||u.keyCode>=98&&u.keyCode<=107||u.keyCode>=85&&u.keyCode<=95}};class Pst{constructor(e,t,n,i,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=i,this.delegate=r,this.enabled=!1,this.state=F5.Idle,this.mode=qd.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new pe,this.disposables=new pe,this.updateOptions(e.options)}updateOptions(e){var t,n;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(n=e.typeNavigationMode)!==null&&n!==void 0?n:qd.Automatic}enable(){if(this.enabled)return;let e=!1;const t=Ne.chain(this.enabledDisposables.add(new Zt(this.view.domNode,"keydown")).event,r=>r.filter(a=>!rm(a.target)).filter(()=>this.mode===qd.Automatic||this.triggered).map(a=>new ln(a)).filter(a=>e||this.keyboardNavigationEventFilter(a)).filter(a=>this.delegate.mightProducePrintableCharacter(a)).forEach(a=>It.stop(a,!0)).map(a=>a.browserEvent.key)),n=Ne.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Ne.reduce(Ne.any(t,n),(r,a)=>a===null?null:(r||"")+a,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const n=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));n&&ga(n)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=F5.Idle,this.triggered=!1;return}const t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===F5.Idle?1:0;this.state=F5.Typing;for(let r=0;r1&&l.length===1){this.previouslyFocused=n,this.list.setFocus([a]),this.list.reveal(a);return}}}else if(typeof s>"u"||Kk(e,s)){this.previouslyFocused=n,this.list.setFocus([a]),this.list.reveal(a);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class Rst{constructor(e,t){this.list=e,this.view=t,this.disposables=new pe;const n=Ne.chain(this.disposables.add(new Zt(t.domNode,"keydown")).event,r=>r.filter(a=>!rm(a.target)).map(a=>new ln(a)));Ne.chain(n,r=>r.filter(a=>a.keyCode===2&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&!a.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const n=this.view.domElement(t[0]);if(!n)return;const i=n.querySelector("[tabIndex]");if(!i||!(i instanceof HTMLElement)||i.tabIndex===-1)return;const r=window.getComputedStyle(i);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),i.focus())}dispose(){this.disposables.dispose()}}function Ibe(u){return iu?u.browserEvent.metaKey:u.browserEvent.ctrlKey}function Obe(u){return u.browserEvent.shiftKey}function Ist(u){return u instanceof MouseEvent&&u.button===2}const e0e={isSelectionSingleChangeEvent:Ibe,isSelectionRangeChangeEvent:Obe};class jbe{constructor(e){this.list=e,this.disposables=new pe,this._onPointer=new Q,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||e0e),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Zu.addTarget(e.getHTMLElement()))),Ne.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||e0e))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){k5(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(rm(e.browserEvent.target)||k5(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||rm(e.browserEvent.target)||k5(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Ist(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(rm(e.browserEvent.target)||k5(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof n>"u"){const c=this.list.getFocus()[0];n=c??t,this.list.setAnchor(n)}const i=Math.min(n,t),r=Math.max(n,t),a=Wa(i,r+1),o=this.list.getSelection(),s=Hst(wG(o,[n]),n);if(s.length===0)return;const l=wG(a,Vst(o,s));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),r=i.filter(a=>a!==t);this.list.setFocus([t]),this.list.setAnchor(t),i.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}}class Hbe{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,n;const i=this.selectorSuffix&&`.${this.selectorSuffix}`,r=[];e.listBackground&&r.push(`.monaco-list${i} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(r.push(`.monaco-list${i}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),r.push(`.monaco-list${i}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(r.push(`.monaco-list${i}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),r.push(`.monaco-list${i}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&r.push(` +|${" --- |".repeat(n)}`;return Ud.lexer(o)}}class Fst{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(i=>i.splice(e,t,n))}}class pD extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function Yse(u,e){const t=[];for(const n of e){if(u.start>=n.range.end)continue;if(u.ende.concat(t),[]))}class Qse{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){const i=n.length-t,r=Yse({start:0,end:e},this.groups),a=Yse({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(s=>({range:BG(s.range,i),size:s.size})),o=n.map((s,l)=>({range:{start:e+l,end:e+l+1},size:s.size}));this.groups=Ast(r,o,a),this._size=this._paddingTop+this.groups.reduce((s,l)=>s+l.size*(l.range.end-l.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var y4=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const Kg={CurrentDragAndDropData:void 0},bd={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(u){return[u]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class CA{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Bst{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class wst{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class J0{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:cj(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,i=bd){var r,a,o,s,l,c,d,h,E,m,g,f,p;if(this.virtualDelegate=t,this.domId=`list_id_${++J0.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Tl(50),this.splicing=!1,this.dragOverAnimationStopDisposable=ne.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=ne.None,this.onDragLeaveTimeout=ne.None,this.disposables=new pe,this._onDidChangeContentHeight=new Q,this._onDidChangeContentWidth=new Q,this._horizontalScrolling=!1,i.horizontalScrolling&&i.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new Qse((r=i.paddingTop)!==null&&r!==void 0?r:0);for(const x of n)this.renderers.set(x.templateId,x);this.cache=this.disposables.add(new Sst(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof i.mouseSupport=="boolean"?i.mouseSupport:!0),this._horizontalScrolling=(a=i.horizontalScrolling)!==null&&a!==void 0?a:bd.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof i.paddingBottom>"u"?0:i.paddingBottom,this.accessibilityProvider=new zst(i.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((o=i.transformOptimization)!==null&&o!==void 0?o:bd.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Zu.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new hA({forceIntegerValues:!0,smoothScrollDuration:(s=i.smoothScrolling)!==null&&s!==void 0&&s?125:0,scheduleAtNextAnimationFrame:x=>N0(x)})),this.scrollableElement=this.disposables.add(new AX(this.rowsContainer,{alwaysConsumeMouseWheel:(l=i.alwaysConsumeMouseWheel)!==null&&l!==void 0?l:bd.alwaysConsumeMouseWheel,horizontal:1,vertical:(c=i.verticalScrollMode)!==null&&c!==void 0?c:bd.verticalScrollMode,useShadows:(d=i.useShadows)!==null&&d!==void 0?d:bd.useShadows,mouseWheelScrollSensitivity:i.mouseWheelScrollSensitivity,fastScrollSensitivity:i.fastScrollSensitivity,scrollByPage:i.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(ce(this.rowsContainer,Yu.Change,x=>this.onTouchChange(x))),this.disposables.add(ce(this.scrollableElement.getDomNode(),"scroll",x=>x.target.scrollTop=0)),this.disposables.add(ce(this.domNode,"dragover",x=>this.onDragOver(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"drop",x=>this.onDrop(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"dragleave",x=>this.onDragLeave(this.toDragEvent(x)))),this.disposables.add(ce(this.domNode,"dragend",x=>this.onDragEnd(x))),this.setRowLineHeight=(h=i.setRowLineHeight)!==null&&h!==void 0?h:bd.setRowLineHeight,this.setRowHeight=(E=i.setRowHeight)!==null&&E!==void 0?E:bd.setRowHeight,this.supportDynamicHeights=(m=i.supportDynamicHeights)!==null&&m!==void 0?m:bd.supportDynamicHeights,this.dnd=(g=i.dnd)!==null&&g!==void 0?g:this.disposables.add(bd.dnd),this.layout((f=i.initialSize)===null||f===void 0?void 0:f.height,(p=i.initialSize)===null||p===void 0?void 0:p.width)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t=Object.assign(Object.assign({},t??{}),{scrollByPage:e.scrollByPage})),e.mouseWheelScrollSensitivity!==void 0&&(t=Object.assign(Object.assign({},t??{}),{mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity})),e.fastScrollSensitivity!==void 0&&(t=Object.assign(Object.assign({},t??{}),{fastScrollSensitivity:e.fastScrollSensitivity})),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},a=aa.intersect(i,r),o=new Map;for(let A=a.end-1;A>=a.start;A--){const F=this.items[A];if(F.dragStartDisposable.dispose(),F.checkedDisposable.dispose(),F.row){let S=o.get(F.templateId);S||(S=[],o.set(F.templateId,S));const w=this.renderers.get(F.templateId);w&&w.disposeElement&&w.disposeElement(F.element,A,F.row.templateData,F.size),S.push(F.row)}F.row=null}const s={start:e+t,end:this.items.length},l=aa.intersect(s,i),c=aa.relativeComplement(s,i),d=n.map(A=>({id:String(this.itemId++),element:A,templateId:this.virtualDelegate.getTemplateId(A),size:this.virtualDelegate.getHeight(A),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(A),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:ne.None,checkedDisposable:ne.None}));let h;e===0&&t>=this.items.length?(this.rangeMap=new Qse(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const E=n.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),g=BG(l,E),f=aa.intersect(m,g);for(let A=f.start;ABG(A,E)),b=[{start:e,end:e+n.length},...D].map(A=>aa.intersect(m,A)),k=this.getNextToLastElement(b);for(const A of b)for(let F=A.start;FA.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=N0(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),t=this.rangeMap.positionAt(e.start),n=this.rangeMap.positionAt(e.start+1);return n!==-1&&(n-t)/2+t{for(const d of l)for(let h=d.start;hi.row.domNode.setAttribute("aria-checked",String(!!d));c(o.value),i.checkedDisposable=o.onDidChange(c)}(r||!i.row.domNode.parentElement)&&(t?this.rowsContainer.insertBefore(i.row.domNode,t):this.rowsContainer.appendChild(i.row.domNode)),this.updateItemInDOM(i,e);const s=this.renderers.get(i.templateId);if(!s)throw new Error(`No renderer found for template id ${i.templateId}`);s==null||s.renderElement(i.element,e,i.row.templateData,i.size);const l=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!l,l&&(i.dragStartDisposable=ce(i.row.domNode,"dragstart",c=>this.onDragStart(i.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=cj(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Ne.map(this.disposables.add(new Zt(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return Ne.map(this.disposables.add(new Zt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return Ne.filter(Ne.map(this.disposables.add(new Zt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return Ne.map(this.disposables.add(new Zt(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return Ne.any(Ne.map(this.disposables.add(new Zt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),Ne.map(this.disposables.add(new Zt(this.domNode,Yu.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return Ne.map(this.disposables.add(new Zt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return Ne.map(this.disposables.add(new Zt(this.rowsContainer,Yu.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],i=n&&n.element;return{browserEvent:e,index:t,element:i}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){var i,r;if(!n.dataTransfer)return;const a=this.dnd.getDragElements(e);if(n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData($k.TEXT,t),n.dataTransfer.setDragImage){let o;this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(a,n)),typeof o>"u"&&(o=String(a.length));const s=ve(".monaco-drag-image");s.textContent=o;const c=(d=>{for(;d&&!d.classList.contains("monaco-workbench");)d=d.parentElement;return d||document.body})(this.domNode);c.appendChild(s),n.dataTransfer.setDragImage(s,-10,-10),setTimeout(()=>c.removeChild(s),0)}this.domNode.classList.add("dragging"),this.currentDragData=new CA(a),Kg.CurrentDragAndDropData=new Bst(a),(r=(i=this.dnd).onDragStart)===null||r===void 0||r.call(i,this.currentDragData,n)}onDragOver(e){var t;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Kg.CurrentDragAndDropData&&Kg.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Kg.CurrentDragAndDropData)this.currentDragData=Kg.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new wst}const n=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof n=="boolean"?n:n.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof n!="boolean"&&n.effect===0?"copy":"move";let i;if(typeof n!="boolean"&&n.feedback?i=n.feedback:typeof e.index>"u"?i=[-1]:i=[e.index],i=Lm(i).filter(r=>r>=-1&&rr-a),i=i[0]===-1?[-1]:i,Lst(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=ft(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const r of i){const a=this.items[r];a.dropTarget=!0,(t=a.row)===null||t===void 0||t.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=ft(()=>{var r;for(const a of i){const o=this.items[a];o.dropTarget=!1,(r=o.row)===null||r===void 0||r.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Rm(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(t=this.dnd).onDragLeave)===null||n===void 0||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Kg.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){var t,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,Kg.CurrentDragAndDropData=void 0,(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=ne.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=a6e(this.domNode).top;this.dragOverAnimationDisposable=nZe(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Rm(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;for(;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){const i=n.getAttribute("data-index");if(i){const r=Number(i);if(!isNaN(r))return r}n=n.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,n){const i=this.getRenderRange(e,t);let r,a;e===this.elementTop(i.start)?(r=i.start,a=0):i.end-i.start>1&&(r=i.start+1,a=this.elementTop(r)-e);let o=0;for(;;){const s=this.getRenderRange(e,t);let l=!1;for(let c=s.start;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Xse=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Mst{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){const i=this.renderedElements.findIndex(r=>r.templateData===n);if(i>=0){const r=this.renderedElements[i];this.trait.unrender(n),r.index=t}else{const r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){const i=[];for(const r of this.renderedElements)r.index=e+t&&i.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=i}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}}let ow=class{get name(){return this._trait}get renderer(){return new Mst(this)}constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new Q,this.onChange=this._onChange.event}splice(e,t,n){var i;t=Math.max(0,Math.min(t,this.length-e));const r=n.length-t,a=e+t,o=[];let s=0;for(;s=a;)o.push(this.sortedIndexes[s++]+r);const l=this.length+r;if(this.sortedIndexes.length>0&&o.length===0&&l>0){const c=(i=this.sortedIndexes.find(d=>d>=e))!==null&&i!==void 0?i:l-1;o.push(Math.min(c,l-1))}this.renderer.splice(e,t,n.length),this._set(o,o),this.length=l}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(t0e),t)}_set(e,t,n){const i=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const a=wG(r,e);return this.renderer.renderIndexes(a),this._onChange.fire({indexes:e,browserEvent:n}),i}get(){return this.indexes}contains(e){return X2(this.sortedIndexes,e,t0e)>=0}dispose(){Su(this._onChange)}};Mp([Ci],ow.prototype,"renderer",null);class Tst extends ow{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class rH{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));const i=this.trait.get().map(o=>this.identityProvider.getId(this.view.element(o)).toString());if(i.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));const r=new Set(i),a=n.map(o=>r.has(this.identityProvider.getId(o).toString()));this.trait.splice(e,t,a)}}function rm(u){return u.tagName==="INPUT"||u.tagName==="TEXTAREA"}function k5(u){return u.classList.contains("monaco-editor")?!0:u.classList.contains("monaco-list")||!u.parentElement?!1:k5(u.parentElement)}function Pbe(u){return u.tagName==="A"&&u.classList.contains("monaco-button")||u.tagName==="DIV"&&u.classList.contains("monaco-button-dropdown")?!0:u.classList.contains("monaco-list")||!u.parentElement?!1:Pbe(u.parentElement)}class Rbe{get onKeyDown(){return Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keydown")).event,e=>e.filter(t=>!rm(t.target)).map(t=>new ln(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new pe,this.multipleSelectionDisposables=new pe,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(i=>{switch(i.keyCode){case 3:return this.onEnter(i);case 16:return this.onUpArrow(i);case 18:return this.onDownArrow(i);case 11:return this.onPageUpArrow(i);case 12:return this.onPageDownArrow(i);case 9:return this.onEscape(i);case 31:this.multipleSelectionSupport&&(iu?i.metaKey:i.ctrlKey)&&this.onCtrlA(i)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Wa(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Mp([Ci],Rbe.prototype,"onKeyDown",null);var qd;(function(u){u[u.Automatic=0]="Automatic",u[u.Trigger=1]="Trigger"})(qd||(qd={}));var F5;(function(u){u[u.Idle=0]="Idle",u[u.Typing=1]="Typing"})(F5||(F5={}));const Nst=new class{mightProducePrintableCharacter(u){return u.ctrlKey||u.metaKey||u.altKey?!1:u.keyCode>=31&&u.keyCode<=56||u.keyCode>=21&&u.keyCode<=30||u.keyCode>=98&&u.keyCode<=107||u.keyCode>=85&&u.keyCode<=95}};class Pst{constructor(e,t,n,i,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=i,this.delegate=r,this.enabled=!1,this.state=F5.Idle,this.mode=qd.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new pe,this.disposables=new pe,this.updateOptions(e.options)}updateOptions(e){var t,n;!((t=e.typeNavigationEnabled)!==null&&t!==void 0)||t?this.enable():this.disable(),this.mode=(n=e.typeNavigationMode)!==null&&n!==void 0?n:qd.Automatic}enable(){if(this.enabled)return;let e=!1;const t=Ne.chain(this.enabledDisposables.add(new Zt(this.view.domNode,"keydown")).event,r=>r.filter(a=>!rm(a.target)).filter(()=>this.mode===qd.Automatic||this.triggered).map(a=>new ln(a)).filter(a=>e||this.keyboardNavigationEventFilter(a)).filter(a=>this.delegate.mightProducePrintableCharacter(a)).forEach(a=>It.stop(a,!0)).map(a=>a.browserEvent.key)),n=Ne.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);Ne.reduce(Ne.any(t,n),(r,a)=>a===null?null:(r||"")+a,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const n=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));n&&ga(n)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=F5.Idle,this.triggered=!1;return}const t=this.list.getFocus(),n=t.length>0?t[0]:0,i=this.state===F5.Idle?1:0;this.state=F5.Typing;for(let r=0;r1&&l.length===1){this.previouslyFocused=n,this.list.setFocus([a]),this.list.reveal(a);return}}}else if(typeof s>"u"||Kk(e,s)){this.previouslyFocused=n,this.list.setFocus([a]),this.list.reveal(a);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class Rst{constructor(e,t){this.list=e,this.view=t,this.disposables=new pe;const n=Ne.chain(this.disposables.add(new Zt(t.domNode,"keydown")).event,r=>r.filter(a=>!rm(a.target)).map(a=>new ln(a)));Ne.chain(n,r=>r.filter(a=>a.keyCode===2&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&!a.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const n=this.view.domElement(t[0]);if(!n)return;const i=n.querySelector("[tabIndex]");if(!i||!(i instanceof HTMLElement)||i.tabIndex===-1)return;const r=window.getComputedStyle(i);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),i.focus())}dispose(){this.disposables.dispose()}}function Ibe(u){return iu?u.browserEvent.metaKey:u.browserEvent.ctrlKey}function Obe(u){return u.browserEvent.shiftKey}function Ist(u){return u instanceof MouseEvent&&u.button===2}const e0e={isSelectionSingleChangeEvent:Ibe,isSelectionRangeChangeEvent:Obe};class jbe{constructor(e){this.list=e,this.disposables=new pe,this._onPointer=new Q,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||e0e),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Zu.addTarget(e.getHTMLElement()))),Ne.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||e0e))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){k5(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(rm(e.browserEvent.target)||k5(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||rm(e.browserEvent.target)||k5(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Ist(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(rm(e.browserEvent.target)||k5(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof n>"u"){const c=this.list.getFocus()[0];n=c??t,this.list.setAnchor(n)}const i=Math.min(n,t),r=Math.max(n,t),a=Wa(i,r+1),o=this.list.getSelection(),s=Hst(wG(o,[n]),n);if(s.length===0)return;const l=wG(a,Vst(o,s));this.list.setSelection(l,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const i=this.list.getSelection(),r=i.filter(a=>a!==t);this.list.setFocus([t]),this.list.setAnchor(t),i.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}}class Hbe{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,n;const i=this.selectorSuffix&&`.${this.selectorSuffix}`,r=[];e.listBackground&&r.push(`.monaco-list${i} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(r.push(`.monaco-list${i}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),r.push(`.monaco-list${i}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(r.push(`.monaco-list${i}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),r.push(`.monaco-list${i}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&r.push(`.monaco-list${i}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&r.push(` .monaco-drag-image, .monaco-list${i}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } `),e.listFocusAndSelectionForeground&&r.push(` @@ -255,9 +255,9 @@ Please report this to https://github.com/markedjs/marked.`,se.silent)return"

A background-color: ${e.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=r.join(` -`)}}const Ost={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:ae.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:ae.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:ae.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},jst={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Hst(u,e){const t=u.indexOf(e);if(t===-1)return[];const n=[];let i=t-1;for(;i>=0&&u[i]===e-(t-i);)n.push(u[i--]);for(n.reverse(),i=t;i=u.length)t.push(e[i++]);else if(i>=e.length)t.push(u[n++]);else if(u[n]===e[i]){t.push(u[n]),n++,i++;continue}else u[n]=u.length)t.push(e[i++]);else if(i>=e.length)t.push(u[n++]);else if(u[n]===e[i]){n++,i++;continue}else u[n]u-e;class $st{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,i){let r=0;for(const a of this.renderers)a.renderElement(e,t,n[r++],i)}disposeElement(e,t,n,i){var r;let a=0;for(const o of this.renderers)(r=o.disposeElement)===null||r===void 0||r.call(o,e,t,n[a],i),a+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class Kst{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?n.setAttribute("aria-level",`${r}`):n.removeAttribute("aria-level")}disposeTemplate(e){}}class Wst{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,e,t)}onDragOver(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}onDragLeave(e,t,n,i){var r,a;(a=(r=this.dnd).onDragLeave)===null||a===void 0||a.call(r,e,t,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}drop(e,t,n,i){this.dnd.drop(e,t,n,i)}dispose(){this.dnd.dispose()}}class Gl{get onDidChangeFocus(){return Ne.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Ne.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keydown")).event,r=>r.map(a=>new ln(a)).filter(a=>e=a.keyCode===58||a.shiftKey&&a.keyCode===68).map(a=>It.stop(a,!0)).filter(()=>!1)),n=Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(a=>new ln(a)).filter(a=>a.keyCode===58||a.shiftKey&&a.keyCode===68).map(a=>It.stop(a,!0)).map(({browserEvent:a})=>{const o=this.getFocus(),s=o.length?o[0]:void 0,l=typeof s<"u"?this.view.element(s):void 0,c=typeof s<"u"?this.view.domElement(s):this.view.domNode;return{index:s,element:l,anchor:c,browserEvent:a}})),i=Ne.chain(this.view.onContextMenu,r=>r.filter(a=>!e).map(({element:a,index:o,browserEvent:s})=>({element:a,index:o,anchor:new D0(s),browserEvent:s})));return Ne.any(t,n,i)}get onKeyDown(){return this.disposables.add(new Zt(this.view.domNode,"keydown")).event}get onDidFocus(){return Ne.signal(this.disposables.add(new Zt(this.view.domNode,"focus",!0)).event)}constructor(e,t,n,i,r=jst){var a,o,s,l;this.user=e,this._options=r,this.focus=new ow("focused"),this.anchor=new ow("anchor"),this.eventBufferer=new RQ,this._ariaLabel="",this.disposables=new pe,this._onDidDispose=new Q,this.onDidDispose=this._onDidDispose.event;const c=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(a=this._options.accessibilityProvider)===null||a===void 0?void 0:a.getWidgetRole():"list";this.selection=new Tst(c!=="listbox");const d=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(d.push(new Kst(this.accessibilityProvider)),(s=(o=this.accessibilityProvider).onDidChangeActiveDescendant)===null||s===void 0||s.call(o,this.onDidChangeActiveDescendant,this,this.disposables)),i=i.map(E=>new $st(E.templateId,[...d,E]));const h=Object.assign(Object.assign({},r),{dnd:r.dnd&&new Wst(this,r.dnd)});if(this.view=this.createListView(t,n,i,h),this.view.domNode.setAttribute("role",c),r.styleController)this.styleController=r.styleController(this.view.domId);else{const E=N0(this.view.domNode);this.styleController=new Hbe(E,this.view.domId)}if(this.spliceable=new Fst([new rH(this.focus,this.view,r.identityProvider),new rH(this.selection,this.view,r.identityProvider),new rH(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new Rst(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new Rbe(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){const E=r.keyboardNavigationDelegate||Nst;this.typeNavigationController=new Pst(this,this.view,r.keyboardNavigationLabelProvider,(l=r.keyboardNavigationEventFilter)!==null&&l!==void 0?l:()=>!0,E),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,i){return new q0(e,t,n,i)}createMouseController(e){return new jbe(this)}updateOptions(e={}){var t,n;this._options=Object.assign(Object.assign({},this._options),e),(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)===null||n===void 0||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new pD(this.user,`Invalid start index: ${e}`);if(t<0)throw new pD(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const n of e)if(n<0||n>=this.length)throw new pD(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new pD(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return tve(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const n of e)if(n<0||n>=this.length)throw new pD(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,i){if(this.length===0)return;const r=this.focus.get(),a=this.findNextIndex(r.length>0?r[0]+e:0,t,i);a>-1&&this.setFocus([a],n)}focusPrevious(e=1,t=!1,n,i){if(this.length===0)return;const r=this.focus.get(),a=this.findPreviousIndex(r.length>0?r[0]-e:0,t,i);a>-1&&this.setFocus([a],n)}focusNextPage(e,t){return Xse(this,void 0,void 0,function*(){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const i=this.getFocus()[0];if(i!==n&&(i===void 0||n>i)){const r=this.findPreviousIndex(n,!1,t);r>-1&&i!==r?this.setFocus([r],e):this.setFocus([n],e)}else{const r=this.view.getScrollTop();let a=r+this.view.renderHeight;n>i&&(a-=this.view.elementHeight(n)),this.view.setScrollTop(a),this.view.getScrollTop()!==r&&(this.setFocus([]),yield Pm(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return Xse(this,void 0,void 0,function*(){let n;const i=this.view.getScrollTop();i===0?n=this.view.indexAt(i):n=this.view.indexAfter(i-1);const r=this.getFocus()[0];if(r!==n&&(r===void 0||r>=n)){const a=this.findNextIndex(n,!1,t);a>-1&&r!==a?this.setFocus([a],e):this.setFocus([n],e)}else{const a=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==a&&(this.setFocus([]),yield Pm(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;const i=this.findNextIndex(e,!1,n);i>-1&&this.setFocus([i],t)}findNextIndex(e,t=!1,n){for(let i=0;i=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let i=0;ithis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new pD(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),i=this.view.elementTop(e),r=this.view.elementHeight(e);if(zm(t)){const a=r-this.view.renderHeight;this.view.setScrollTop(a*Yo(t,0,1)+i)}else{const a=i+r,o=n+this.view.renderHeight;i=o||(i=o&&r>=this.view.renderHeight?this.view.setScrollTop(i):a>=o&&this.view.setScrollTop(a-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let n;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Mp([Ci],Gl.prototype,"onDidChangeFocus",null);Mp([Ci],Gl.prototype,"onDidChangeSelection",null);Mp([Ci],Gl.prototype,"onContextMenu",null);Mp([Ci],Gl.prototype,"onKeyDown",null);Mp([Ci],Gl.prototype,"onDidFocus",null);const $f=ve,Vbe="selectOption.entry.template";class Gst{get templateId(){return Vbe}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=me(e,$f(".option-text")),t.detail=me(e,$f(".option-detail")),t.decoratorRight=me(e,$f(".option-decorator-right")),t}renderElement(e,t,n){const i=n,r=e.text,a=e.detail,o=e.decoratorRight,s=e.isDisabled;i.text.textContent=r,i.detail.textContent=a||"",i.decoratorRight.innerText=o||"",s?i.root.classList.add("option-disabled"):i.root.classList.remove("option-disabled")}disposeTemplate(e){}}class Jd extends ne{constructor(e,t,n,i,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=i,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=Jd.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new Q,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return Vbe}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=ve(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=me(this.selectDropDownContainer,$f(".select-box-details-pane"));const t=me(this.selectDropDownContainer,$f(".select-box-dropdown-container-width-control")),n=me(t,$f(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",me(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=N0(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(ce(this.selectDropDownContainer,Me.DRAG_START,i=>{It.stop(i,!0)}))}registerListeners(){this._register(xi(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(ce(this.selectElement,Me.CLICK,t=>{It.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Me.MOUSE_DOWN,t=>{It.stop(t)}));let e;this._register(ce(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(ce(this.selectElement,"touchend",t=>{It.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Me.KEY_DOWN,t=>{const n=new ln(t);let i=!1;iu?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(i=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(i=!0),i&&(this.showSelectDropDown(),It.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){di(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,i)=>{this.selectElement.add(this.createOption(n.text,i,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` -`)}styleSelectElement(){var e,t,n;const i=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",r=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",a=(n=this.styles.selectBorder)!==null&&n!==void 0?n:"";this.selectElement.style.backgroundColor=i,this.selectElement.style.color=r,this.selectElement.style.borderColor=a}styleList(){var e,t;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",i=n3(this.styles.selectListBackground,n);this.selectDropDownListContainer.style.backgroundColor=i,this.selectionDetailsPane.style.backgroundColor=i;const r=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=r,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){const i=document.createElement("option");return i.value=e,i.text=e,i.disabled=!!n,i}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=ji(this.selectElement),n=getComputedStyle(this.selectElement),i=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),a=t.top-Jd.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,o=this.selectElement.offsetWidth,s=this.setWidthControlElement(this.widthControlElement),l=Math.max(s,Math.round(o)).toString()+"px";this.selectDropDownContainer.style.width=l,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let c=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,h=c+i+d,E=Math.floor((r-i-d)/this.getHeight()),m=Math.floor((a-i-d)/this.getHeight());if(e)return t.top+t.height>window.innerHeight-22||t.topE&&this.options.length>E?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(t.top+t.height>window.innerHeight-22||t.topr&&(c=E*this.getHeight())}else h>a&&(c=m*this.getHeight());return this.selectList.layout(c),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=c+i+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=c+i+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=l,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,i=0;this.options.forEach((r,a)=>{const o=r.detail?r.detail.length:0,s=r.decoratorRight?r.decoratorRight.length:0,l=r.text.length+o+s;l>i&&(n=a,i=l)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=ko(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=me(e,$f(".select-box-dropdown-list-container")),this.listRenderer=new Gst,this.selectList=new Gl("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:i=>{let r=i.text;return i.detail&&(r+=`. ${i.detail}`),i.decoratorRight&&(r+=`. ${i.decoratorRight}`),i.description&&(r+=`. ${i.description}`),r},getWidgetAriaLabel:()=>v({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>iu?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new Zt(this.selectDropDownListContainer,"keydown")),n=Ne.chain(t.event,i=>i.filter(()=>this.selectList.length>0).map(r=>new ln(r)));this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(ce(this.selectList.getHTMLElement(),Me.POINTER_UP,i=>this.onPointerUp(i))),this._register(this.selectList.onMouseOver(i=>typeof i.index<"u"&&this.selectList.setFocus([i.index]))),this._register(this.selectList.onDidChangeFocus(i=>this.onListFocus(i))),this._register(ce(this.selectDropDownContainer,Me.FOCUS_OUT,i=>{!this._isVisible||Qr(i.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;It.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const n=t.closest(".monaco-list-row");if(!n)return;const i=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");i>=0&&i{for(let a=0;athis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(It.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){It.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){It.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){It.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=Sh.toString(e.keyCode);let n=-1;for(let i=0;i{this._register(ce(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(xi(this.selectElement,"click",e=>{It.stop(e,!0)})),this._register(xi(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(xi(this.selectElement,"keydown",e=>{let t=!1;iu?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!di(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,i)=>{this.selectElement.add(this.createOption(n.text,i,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(i)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Jx)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Zu.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,M0&&this._register(ce(e,Me.DRAG_START,i=>{var r;return(r=i.dataTransfer)===null||r===void 0?void 0:r.setData($k.TEXT,this._action.label)}))),this._register(ce(t,Yu.Tap,i=>this.onClick(i,!0))),this._register(ce(t,Me.MOUSE_DOWN,i=>{n||It.stop(i,!0),this._action.enabled&&i.button===0&&t.classList.add("active")})),iu&&this._register(ce(t,Me.CONTEXT_MENU,i=>{i.button===0&&i.ctrlKey===!0&&this.onClick(i)})),this._register(ce(t,Me.CLICK,i=>{It.stop(i,!0),this.options&&this.options.isMenu||this.onClick(i)})),this._register(ce(t,Me.DBLCLICK,i=>{It.stop(i,!0)})),[Me.MOUSE_UP,Me.MOUSE_OUT].forEach(i=>{this._register(ce(t,i,r=>{It.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){var n;It.stop(e,!0);const i=zs(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=Tbe(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class mv extends vc{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=me(this.element,ve("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&(me(this.element,ve("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Dr.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Jst extends vc{constructor(e,t,n,i,r,a,o){super(e,t),this.selectBox=new qst(n,i,r,a,o),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}class Zst extends Jx{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new Q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=me(e,ve(".monaco-dropdown")),this._label=me(this._element,ve(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(const r of[Me.CLICK,Me.MOUSE_DOWN,Yu.Tap])this._register(ce(this.element,r,a=>It.stop(a,!0)));for(const r of[Me.MOUSE_DOWN,Yu.Tap])this._register(ce(this._label,r,a=>{a instanceof MouseEvent&&(a.detail>1||a.button!==0)||(this.visible?this.hide():this.show())}));this._register(ce(this._label,Me.KEY_UP,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(It.stop(r,!0),this.visible?this.hide():this.show())}));const i=n(this._label);i&&this._register(i),this._register(Zu.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Yst extends Zst{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class sw extends vc{constructor(e,t,n,i=Object.create(null)){super(null,e,i),this.actionItem=null,this._onDidChangeVisibility=this._register(new Q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=i,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=r=>{this.element=me(r,ve("a.action-label"));let a=[];return typeof this.options.classNames=="string"?a=this.options.classNames.split(/\s+/g).filter(o=>!!o):this.options.classNames&&(a=this.options.classNames),a.find(o=>o==="icon")||a.push("codicon"),this.element.classList.add(...a),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new Yst(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{var a;(a=this.element)===null||a===void 0||a.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const r=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return r.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;const n=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",n),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",n)}}function Qst(u){return u?u.condition!==void 0:!1}var Ab=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Dx;(function(u){u[u.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",u[u.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(Dx||(Dx={}));var y5;(function(u){u[u.None=0]="None",u[u.Initialized=1]="Initialized",u[u.Closed=2]="Closed"})(y5||(y5={}));class xx extends ne{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new F3),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=y5.None,this.cache=new Map,this.flushDelayer=this._register(new D6e(xx.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((i,r)=>this.acceptExternal(r,i)),(n=e.deleted)===null||n===void 0||n.forEach(i=>this.acceptExternal(i,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===y5.Closed)return;let n=!1;zs(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const n=this.cache.get(e);return zs(n)?t:n}getBoolean(e,t){const n=this.get(e);return zs(n)?t:n==="true"}getNumber(e,t){const n=this.get(e);return zs(n)?t:parseInt(n,10)}set(e,t,n=!1){return Ab(this,void 0,void 0,function*(){if(this.state===y5.Closed)return;if(zs(t))return this.delete(e,n);const i=eo(t)||Array.isArray(t)?rst(t):String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()})}delete(e,t=!1){return Ab(this,void 0,void 0,function*(){if(!(this.state===y5.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Ab(this,void 0,void 0,function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(e){return Ab(this,void 0,void 0,function*(){return this.options.hint===Dx.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)})}}xx.DEFAULT_FLUSH_DELAY=100;class aH{constructor(){this.onDidChangeItemsExternal=Ne.None,this.items=new Map}updateItems(e){var t,n;return Ab(this,void 0,void 0,function*(){(t=e.insert)===null||t===void 0||t.forEach((i,r)=>this.items.set(r,i)),(n=e.delete)===null||n===void 0||n.forEach(i=>this.items.delete(i))})}}const n8="__$__targetStorageMarker",Ul=Ut("storageService");var lw;(function(u){u[u.NONE=0]="NONE",u[u.SHUTDOWN=1]="SHUTDOWN"})(lw||(lw={}));function Xst(u){const e=u.get(n8);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}class wP extends ne{constructor(e={flushInterval:wP.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new F3),this._onDidChangeTarget=this._register(new F3),this._onWillSaveState=this._register(new Q),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Ne.filter(this._onDidChangeValue.event,i=>i.scope===e&&(t===void 0||i.key===t),n)}emitDidChangeValue(e,t){const{key:n,external:i}=t;if(n===n8){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:i})}get(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.get(e,n)}getBoolean(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.getBoolean(e,n)}getNumber(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.getNumber(e,n)}store(e,t,n,i,r=!1){if(zs(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{var a;this.updateKeyTarget(e,n,i),(a=this.getStorage(n))===null||a===void 0||a.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),(i=this.getStorage(t))===null||i===void 0||i.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,i=!1){var r,a;const o=this.getKeyTargets(t);typeof n=="number"?o[e]!==n&&(o[e]=n,(r=this.getStorage(t))===null||r===void 0||r.set(n8,JSON.stringify(o),i)):typeof o[e]=="number"&&(delete o[e],(a=this.getStorage(t))===null||a===void 0||a.set(n8,JSON.stringify(o),i))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?Xst(t):Object.create(null)}}wP.DEFAULT_FLUSH_INTERVAL=60*1e3;class e0t extends wP{constructor(){super(),this.applicationStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function t0t(u,e){const t=Object.assign({},e);for(const n in u){const i=u[n];t[n]=i!==void 0?Re(i):void 0}return t}const u0t={keybindingLabelBackground:Re(NXe),keybindingLabelForeground:Re(PXe),keybindingLabelBorder:Re(RXe),keybindingLabelBottomBorder:Re(IXe),keybindingLabelShadow:Re(t1)},n0t={buttonForeground:Re(Eb),buttonSeparator:Re(CXe),buttonBackground:Re(mb),buttonHoverBackground:Re(bXe),buttonSecondaryForeground:Re(FXe),buttonSecondaryBackground:Re(zW),buttonSecondaryHoverBackground:Re(yXe),buttonBorder:Re(kXe)},i0t={progressBarBackground:Re(SXe)},cw={inputActiveOptionBorder:Re(pX),inputActiveOptionForeground:Re(DX),inputActiveOptionBackground:Re(If)};Re(Det),Re(vet),Re(xet);Re(ti),Re(i1),Re(t1),Re(eu),Re(Ret),Re(Iet),Re(Oet),Re(cXe);const dw={inputBackground:Re(Z6e),inputForeground:Re(Y6e),inputBorder:Re(Q6e),inputValidationInfoBorder:Re(EXe),inputValidationInfoBackground:Re(dXe),inputValidationInfoForeground:Re(hXe),inputValidationWarningBorder:Re(fXe),inputValidationWarningBackground:Re(mXe),inputValidationWarningForeground:Re(gXe),inputValidationErrorBorder:Re(xXe),inputValidationErrorBackground:Re(pXe),inputValidationErrorForeground:Re(DXe)},r0t={listFilterWidgetBackground:Re(det),listFilterWidgetOutline:Re(het),listFilterWidgetNoMatchesOutline:Re(Eet),listFilterWidgetShadow:Re(met),inputBoxStyles:dw,toggleStyles:cw},$be={badgeBackground:Re(qS),badgeForeground:Re(AXe),badgeBorder:Re(eu)};Re(wet),Re(Bet),Re(foe),Re(foe),Re(Let);const Tp={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Re(eet),listFocusForeground:Re(tet),listFocusOutline:Re(uet),listActiveSelectionBackground:Re(Hh),listActiveSelectionForeground:Re(o1),listActiveSelectionIconForeground:Re(Db),listFocusAndSelectionOutline:Re(net),listFocusAndSelectionBackground:Re(Hh),listFocusAndSelectionForeground:Re(o1),listInactiveSelectionBackground:Re(iet),listInactiveSelectionIconForeground:Re(aet),listInactiveSelectionForeground:Re(ret),listInactiveFocusBackground:Re(oet),listInactiveFocusOutline:Re(set),listHoverBackground:Re(tCe),listHoverForeground:Re(uCe),listDropBackground:Re(cet),listSelectionOutline:Re(En),listHoverOutline:Re(En),treeIndentGuidesStroke:Re(xb),treeInactiveIndentGuidesStroke:Re(get),tableColumnsBorder:Re(fet),tableOddRowsBackgroundColor:Re(pet)};function p6(u){return t0t(u,Tp)}const a0t={selectBackground:Re(u1),selectListBackground:Re(vXe),selectForeground:Re(Ih),decoratorRightForeground:Re(X6e),selectBorder:Re(h5),focusBorder:Re(Os),listFocusBackground:Re(jf),listInactiveSelectionIconForeground:Re(E5),listFocusForeground:Re(Of),listFocusOutline:oXe(En,ae.transparent.toString()),listHoverBackground:Re(tCe),listHoverForeground:Re(uCe),listHoverOutline:Re(En),selectListBorder:Re(r1),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},o0t={shadowColor:Re(t1),borderColor:Re(Cet),foregroundColor:Re(bet),backgroundColor:Re(ket),selectionForegroundColor:Re(Fet),selectionBackgroundColor:Re(yet),selectionBorderColor:Re(Aet),separatorColor:Re(_et),scrollbarShadow:Re(_Xe),scrollbarSliderBackground:Re(gb),scrollbarSliderHoverBackground:Re(fb),scrollbarSliderActiveBackground:Re(pb)};var LP=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_o=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Kbe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function s0t(u,e,t,n){const i=u.getActions(e),r=Nh.getInstance(),a=r.keyStatus.altKey||(na||Pa)&&r.keyStatus.shiftKey;Gbe(i,t,a,n?o=>o===n:o=>o==="navigation")}function Wbe(u,e,t,n,i,r){const a=u.getActions(e);Gbe(a,t,!1,typeof n=="string"?s=>s===n:n,i,r)}function Gbe(u,e,t,n=a=>a==="navigation",i=()=>!1,r=!1){let a,o;Array.isArray(e)?(a=e,o=e):(a=e.primary,o=e.secondary);const s=new Set;for(const[l,c]of u){let d;n(l)?(d=a,d.length>0&&r&&d.push(new Dr)):(d=o,d.length>0&&d.push(new Dr));for(let h of c){t&&(h=h instanceof zl&&h.alt?h.alt:h);const E=d.push(h);h instanceof Zx&&s.add({group:l,action:h,index:E-1})}}for(const{group:l,action:c,index:d}of s){const h=n(l)?a:o,E=c.actions;i(c,l,h.length)&&h.splice(d,1,...E)}}let N3=class extends mv{constructor(e,t,n,i,r,a,o,s){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate}),this._keybindingService=n,this._notificationService=i,this._contextKeyService=r,this._themeService=a,this._contextMenuService=o,this._accessibilityService=s,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Ir),this._altKey=Nh.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return Kbe(this,void 0,void 0,function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}})}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const n=()=>{var i;const r=!!(!((i=this._menuItemAction.alt)===null||i===void 0)&&i.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(ce(e,"mouseleave",i=>{t=!1,n()})),this._register(ce(e,"mouseenter",i=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=t&&t.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let r=n?v("titleAndKb","{0} ({1})",i,n):i;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const a=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,o=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),s=o&&o.getLabel(),l=s?v("titleAndKb","{0} ({1})",a,s):a;r=v("titleAndKbAndAlt",`{0} -[{1}] {2}`,r,XX.modifierLabels[Is].altKey,l)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:n}=this;if(!t||!n)return;const i=this._commandAction.checked&&Qst(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(i)if(st.isThemeIcon(i)){const r=st.asClassNameArray(i);n.classList.add(...r),this._itemClassDispose.value=ft(()=>{n.classList.remove(...r)})}else{const r=iv(this._themeService.getColorTheme().type)?Nm(i.dark):Nm(i.light),a=ve("span");a.style.webkitMask=a.style.mask=`${r} no-repeat 50% 50%`,a.style.background="var(--vscode-icon-foreground)",a.style.display="inline-block",a.style.width="100%",a.style.height="100%",n.appendChild(a),n.classList.add("icon"),this._itemClassDispose.value=Fl(ft(()=>{n.classList.remove("icon"),Pr(n)}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}}};N3=LP([_o(2,qu),_o(3,bi),_o(4,pt),_o(5,sr),_o(6,Wl),_o(7,k4)],N3);let LG=class extends sw{constructor(e,t,n,i,r){var a,o,s;const l=Object.assign(Object.assign({},t),{menuAsChild:(a=t==null?void 0:t.menuAsChild)!==null&&a!==void 0?a:!1,classNames:(o=t==null?void 0:t.classNames)!==null&&o!==void 0?o:st.isThemeIcon(e.item.icon)?st.asClassName(e.item.icon):void 0,keybindingProvider:(s=t==null?void 0:t.keybindingProvider)!==null&&s!==void 0?s:c=>n.lookupKeybinding(c.id)});super(e,{getActions:()=>e.actions},i,l),this._keybindingService=n,this._contextMenuService=i,this._themeService=r}render(e){super.render(e),Ru(this.element),e.classList.add("menu-entry");const t=this._action,{icon:n}=t.item;if(n&&!st.isThemeIcon(n)){this.element.classList.add("icon");const i=()=>{this.element&&(this.element.style.backgroundImage=iv(this._themeService.getColorTheme().type)?Nm(n.dark):Nm(n.light))};i(),this._register(this._themeService.onDidColorThemeChange(()=>{i()}))}}};LG=LP([_o(2,qu),_o(3,Wl),_o(4,sr)],LG);let zG=class extends vc{constructor(e,t,n,i,r,a,o,s){var l,c,d;super(null,e),this._keybindingService=n,this._notificationService=i,this._contextMenuService=r,this._menuService=a,this._instaService=o,this._storageService=s,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const E=t!=null&&t.persistLastActionId?s.get(this._storageKey,1):void 0;E&&(h=e.actions.find(g=>E===g.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(N3,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const m=Object.assign(Object.assign({keybindingProvider:g=>this._keybindingService.lookupKeybinding(g.id)},t),{menuAsChild:(l=t==null?void 0:t.menuAsChild)!==null&&l!==void 0?l:!0,classNames:(c=t==null?void 0:t.classNames)!==null&&c!==void 0?c:["codicon","codicon-chevron-down"],actionRunner:(d=t==null?void 0:t.actionRunner)!==null&&d!==void 0?d:new Jx});this._dropdown=new sw(e,e.actions,this._contextMenuService,m),this._dropdown.actionRunner.onDidRun(g=>{g.action instanceof zl&&this.update(g.action)})}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(N3,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Jx{runAction(n,i){return Kbe(this,void 0,void 0,function*(){yield n.run(void 0)})}},this._container&&this._defaultAction.render(l6e(this._container,ve(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let n;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(n=`(${i.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=ve(".action-container");this._defaultAction.render(me(this._container,t)),this._register(ce(t,Me.KEY_DOWN,i=>{const r=new ln(i);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));const n=ve(".dropdown-action-container");this._dropdown.render(me(this._container,n)),this._register(ce(n,Me.KEY_DOWN,i=>{var r;const a=new ln(i);a.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(r=this._defaultAction.element)===null||r===void 0||r.focus(),a.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};zG=LP([_o(2,qu),_o(3,bi),_o(4,Wl),_o(5,$1),_o(6,mt),_o(7,Ul)],zG);let MG=class extends Jst{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===Dr.ID?"─────────":n.label,isDisabled:!n.enabled})),0,t,a0t,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=Re(h5)}runAction(e,t){const n=this.action.actions[t];n&&this.actionRunner.run(n)}};MG=LP([_o(1,F4)],MG);function l0t(u,e,t){return e instanceof zl?u.createInstance(N3,e,t):e instanceof dk?e.item.isSelection?u.createInstance(MG,e):e.item.rememberDefaultAction?u.createInstance(zG,e,Object.assign(Object.assign({},t),{persistLastActionId:!0})):u.createInstance(LG,e,t):void 0}var c0t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class O0 extends ne{constructor(e,t={}){var n,i,r,a,o,s;super(),this._actionRunnerDisposables=this._register(new pe),this.viewItemDisposables=this._register(new NQ),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new Q({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new Q),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new Q),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(n=t.context)!==null&&n!==void 0?n:null,this._orientation=(i=this.options.orientation)!==null&&i!==void 0?i:0,this._triggerKeys={keyDown:(a=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&a!==void 0?a:!1,keys:(s=(o=this.options.triggerKeys)===null||o===void 0?void 0:o.keys)!==null&&s!==void 0?s:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Jx,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(d=>this._onDidRun.fire(d))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(d=>this._onWillRun.fire(d))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let l,c;switch(this._orientation){case 0:l=[15],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical";break}this._register(ce(this.domNode,Me.KEY_DOWN,d=>{const h=new ln(d);let E=!0;const m=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;l&&(h.equals(l[0])||h.equals(l[1]))?E=this.focusPrevious():c&&(h.equals(c[0])||h.equals(c[1]))?E=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?E=this.focusFirst():h.equals(13)?E=this.focusLast():h.equals(2)&&m instanceof vc&&m.trapsArrowNavigation?E=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:E=!1,E&&(h.preventDefault(),h.stopPropagation())})),this._register(ce(this.domNode,Me.KEY_UP,d=>{const h=new ln(d);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(y1(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(yl()===this.domNode||!Qr(yl(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(n=>n instanceof vc&&n.isEnabled());t instanceof vc&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof vc&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{const a=document.createElement("li");a.className="action-item",a.setAttribute("role","presentation");let o;const s=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(r,s)),o||(o=new mv(this.context,r,s)),this.options.allowContextMenu||this.viewItemDisposables.set(o,ce(a,Me.CONTEXT_MENU,l=>{It.stop(l,!0)})),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(a),this.focusable&&o instanceof vc&&this.viewItems.length===0&&o.setFocusable(!0),i===null||i<0||i>=this.actionsList.children.length?(this.actionsList.appendChild(a),this.viewItems.push(o)):(this.actionsList.insertBefore(a,this.actionsList.children[i]),this.viewItems.splice(i,0,o),i++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Su(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),Nr(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const i=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=i===-1?void 0:i,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Dr.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Dr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var i;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((i=this.viewItems[this.previouslyFocusedItem])===null||i===void 0||i.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let a=!0;uk(r.focus)||(a=!1),this.options.focusOnlyEnabledItems&&uk(r.isEnabled)&&!r.isEnabled()&&(a=!1),r.action.id===Dr.ID&&(a=!1),a?(n||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof vc){const n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}run(e,t){return c0t(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){this._context=void 0,this.viewItems=Su(this.viewItems),this.getContainer().remove(),super.dispose()}}const TG=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,oH=/(&)?(&)([^\s&])/g;var hw;(function(u){u[u.Right=0]="Right",u[u.Left=1]="Left"})(hw||(hw={}));let Ube=class i8 extends O0{constructor(e,t,n,i){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:s=>this.doGetActionViewItem(s,n,a),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...iu||Pa?[10]:[]],keyDown:!0}}),this.menuStyles=i,this.menuElement=r,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new pe),this.initializeOrUpdateStyleSheet(e,i),this._register(Zu.addTarget(r)),ce(r,Me.KEY_DOWN,s=>{new ln(s).equals(2)&&s.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(ce(r,Me.KEY_DOWN,s=>{const l=s.key.toLocaleLowerCase();if(this.mnemonics.has(l)){It.stop(s,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof u0e&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(s)),c.length>1){const d=c.shift();d&&d.container&&(this.focusItemByElement(d.container),c.push(d)),this.mnemonics.set(l,c)}}})),Pa&&this._register(ce(r,Me.KEY_DOWN,s=>{const l=new ln(s);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),It.stop(s,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),It.stop(s,!0))})),this._register(ce(this.domNode,Me.MOUSE_OUT,s=>{const l=s.relatedTarget;Qr(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),s.stopPropagation())})),this._register(ce(this.actionsList,Me.MOUSE_OVER,s=>{let l=s.target;if(!(!l||!Qr(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(Zu.addTarget(this.actionsList)),this._register(ce(this.actionsList,Yu.Tap,s=>{let l=s.initialTarget;if(!(!l||!Qr(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));const a={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new EA(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this.styleScrollElement(o,i),this._register(ce(r,Yu.Change,s=>{It.stop(s,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-s.translationY})})),this._register(ce(o,Me.MOUSE_UP,s=>{s.preventDefault()})),r.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(s=>{var l;return!((l=n.submenuIds)===null||l===void 0)&&l.has(s.id)?(console.warn(`Found submenu cycle: ${s.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(s=>!(s instanceof n0e)).forEach((s,l,c)=>{s.updatePositionInSet(l+1,c.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(bB(e)?this.styleSheet=N0(e):(i8.globalStyleSheet||(i8.globalStyleSheet=N0()),this.styleSheet=i8.globalStyleSheet)),this.styleSheet.textContent=h0t(t,bB(e))}styleScrollElement(e,t){var n,i;const r=(n=t.foregroundColor)!==null&&n!==void 0?n:"",a=(i=t.backgroundColor)!==null&&i!==void 0?i:"",o=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",l=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=r,e.style.backgroundColor=a,e.style.boxShadow=l}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(ce(this.element,Me.MOUSE_UP,r=>{if(It.stop(r,!0),M0){if(new D0(r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(ce(this.element,Me.CONTEXT_MENU,r=>{It.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=me(this.element,ve("a.action-menu-item")),this._action.id===Dr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=me(this.item,ve("span.menu-item-check"+st.asCSSSelector(we.menuSelection))),this.check.setAttribute("role","none"),this.label=me(this.item,ve("span.action-label")),this.options.label&&this.options.keybinding&&(me(this.item,ve("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){Nr(this.label);let t=oee(this.action.label);if(t){const n=d0t(t);this.options.enableMnemonics||(t=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));const i=TG.exec(t);if(i){t=pB(t),oH.lastIndex=0;let r=oH.exec(t);for(;r&&r[1];)r=oH.exec(t);const a=o=>o.replace(/&&/g,"&");r?this.label.append(tA(a(t.substr(0,r.index))," "),ve("u",{"aria-hidden":"true"},r[3]),Tve(a(t.substr(r.index+r[0].length))," ")):this.label.innerText=a(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=i,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}}class u0e extends qbe{constructor(e,t,n,i,r){super(e,e,i,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=i,this.mysubmenu=null,this.submenuDisposables=this._register(new pe),this.mouseOver=!1,this.expandDirection=i&&i.expandDirection!==void 0?i.expandDirection:hw.Right,this.showScheduler=new Hu(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Hu(()=>{this.element&&!Qr(yl(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=me(this.item,ve("span.submenu-indicator"+st.asCSSSelector(we.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(ce(this.element,Me.KEY_UP,t=>{const n=new ln(t);(n.equals(17)||n.equals(3))&&(It.stop(t,!0),this.createSubmenu(!0))})),this._register(ce(this.element,Me.KEY_DOWN,t=>{const n=new ln(t);yl()===this.item&&(n.equals(17)||n.equals(3))&&It.stop(t,!0)})),this._register(ce(this.element,Me.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(ce(this.element,Me.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(ce(this.element,Me.FOCUS_OUT,t=>{this.element&&!Qr(yl(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){It.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,i){const r={top:0,left:0};return r.left=b5(e.width,t.width,{position:i===hw.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new ln(l).equals(15)&&(It.stop(l,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(ce(this.submenuContainer,Me.KEY_DOWN,l=>{new ln(l).equals(15)&&It.stop(l,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class n0e extends mv{constructor(e,t,n,i){super(e,t,n),this.menuStyles=i}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function d0t(u){const e=TG,t=e.exec(u);if(!t)return u;const n=!t[1];return u.replace(e,n?"$2$3":"").trim()}function i0e(u){const e=wve()[u.id];return`.codicon-${u.id}:before { content: '\\${e.toString(16)}'; }`}function h0t(u,e){let t=` +`)}}const Ost={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:ae.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:ae.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:ae.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0},jst={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Hst(u,e){const t=u.indexOf(e);if(t===-1)return[];const n=[];let i=t-1;for(;i>=0&&u[i]===e-(t-i);)n.push(u[i--]);for(n.reverse(),i=t;i=u.length)t.push(e[i++]);else if(i>=e.length)t.push(u[n++]);else if(u[n]===e[i]){t.push(u[n]),n++,i++;continue}else u[n]=u.length)t.push(e[i++]);else if(i>=e.length)t.push(u[n++]);else if(u[n]===e[i]){n++,i++;continue}else u[n]u-e;class $st{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,i){let r=0;for(const a of this.renderers)a.renderElement(e,t,n[r++],i)}disposeElement(e,t,n,i){var r;let a=0;for(const o of this.renderers)(r=o.disposeElement)===null||r===void 0||r.call(o,e,t,n[a],i),a+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class Kst{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,n){const i=this.accessibilityProvider.getAriaLabel(e);i?n.setAttribute("aria-label",i):n.removeAttribute("aria-label");const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof r=="number"?n.setAttribute("aria-level",`${r}`):n.removeAttribute("aria-level")}disposeTemplate(e){}}class Wst{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,e,t)}onDragOver(e,t,n,i){return this.dnd.onDragOver(e,t,n,i)}onDragLeave(e,t,n,i){var r,a;(a=(r=this.dnd).onDragLeave)===null||a===void 0||a.call(r,e,t,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}drop(e,t,n,i){this.dnd.drop(e,t,n,i)}dispose(){this.dnd.dispose()}}class Gl{get onDidChangeFocus(){return Ne.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return Ne.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keydown")).event,r=>r.map(a=>new ln(a)).filter(a=>e=a.keyCode===58||a.shiftKey&&a.keyCode===68).map(a=>It.stop(a,!0)).filter(()=>!1)),n=Ne.chain(this.disposables.add(new Zt(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(a=>new ln(a)).filter(a=>a.keyCode===58||a.shiftKey&&a.keyCode===68).map(a=>It.stop(a,!0)).map(({browserEvent:a})=>{const o=this.getFocus(),s=o.length?o[0]:void 0,l=typeof s<"u"?this.view.element(s):void 0,c=typeof s<"u"?this.view.domElement(s):this.view.domNode;return{index:s,element:l,anchor:c,browserEvent:a}})),i=Ne.chain(this.view.onContextMenu,r=>r.filter(a=>!e).map(({element:a,index:o,browserEvent:s})=>({element:a,index:o,anchor:new x0(s),browserEvent:s})));return Ne.any(t,n,i)}get onKeyDown(){return this.disposables.add(new Zt(this.view.domNode,"keydown")).event}get onDidFocus(){return Ne.signal(this.disposables.add(new Zt(this.view.domNode,"focus",!0)).event)}constructor(e,t,n,i,r=jst){var a,o,s,l;this.user=e,this._options=r,this.focus=new ow("focused"),this.anchor=new ow("anchor"),this.eventBufferer=new RQ,this._ariaLabel="",this.disposables=new pe,this._onDidDispose=new Q,this.onDidDispose=this._onDidDispose.event;const c=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(a=this._options.accessibilityProvider)===null||a===void 0?void 0:a.getWidgetRole():"list";this.selection=new Tst(c!=="listbox");const d=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(d.push(new Kst(this.accessibilityProvider)),(s=(o=this.accessibilityProvider).onDidChangeActiveDescendant)===null||s===void 0||s.call(o,this.onDidChangeActiveDescendant,this,this.disposables)),i=i.map(E=>new $st(E.templateId,[...d,E]));const h=Object.assign(Object.assign({},r),{dnd:r.dnd&&new Wst(this,r.dnd)});if(this.view=this.createListView(t,n,i,h),this.view.domNode.setAttribute("role",c),r.styleController)this.styleController=r.styleController(this.view.domId);else{const E=P0(this.view.domNode);this.styleController=new Hbe(E,this.view.domId)}if(this.spliceable=new Fst([new rH(this.focus,this.view,r.identityProvider),new rH(this.selection,this.view,r.identityProvider),new rH(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new Rst(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new Rbe(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){const E=r.keyboardNavigationDelegate||Nst;this.typeNavigationController=new Pst(this,this.view,r.keyboardNavigationLabelProvider,(l=r.keyboardNavigationEventFilter)!==null&&l!==void 0?l:()=>!0,E),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,i){return new J0(e,t,n,i)}createMouseController(e){return new jbe(this)}updateOptions(e={}){var t,n;this._options=Object.assign(Object.assign({},this._options),e),(t=this.typeNavigationController)===null||t===void 0||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)===null||n===void 0||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new pD(this.user,`Invalid start index: ${e}`);if(t<0)throw new pD(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const n of e)if(n<0||n>=this.length)throw new pD(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new pD(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return tve(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const n of e)if(n<0||n>=this.length)throw new pD(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,i){if(this.length===0)return;const r=this.focus.get(),a=this.findNextIndex(r.length>0?r[0]+e:0,t,i);a>-1&&this.setFocus([a],n)}focusPrevious(e=1,t=!1,n,i){if(this.length===0)return;const r=this.focus.get(),a=this.findPreviousIndex(r.length>0?r[0]-e:0,t,i);a>-1&&this.setFocus([a],n)}focusNextPage(e,t){return Xse(this,void 0,void 0,function*(){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const i=this.getFocus()[0];if(i!==n&&(i===void 0||n>i)){const r=this.findPreviousIndex(n,!1,t);r>-1&&i!==r?this.setFocus([r],e):this.setFocus([n],e)}else{const r=this.view.getScrollTop();let a=r+this.view.renderHeight;n>i&&(a-=this.view.elementHeight(n)),this.view.setScrollTop(a),this.view.getScrollTop()!==r&&(this.setFocus([]),yield Pm(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return Xse(this,void 0,void 0,function*(){let n;const i=this.view.getScrollTop();i===0?n=this.view.indexAt(i):n=this.view.indexAfter(i-1);const r=this.getFocus()[0];if(r!==n&&(r===void 0||r>=n)){const a=this.findNextIndex(n,!1,t);a>-1&&r!==a?this.setFocus([a],e):this.setFocus([n],e)}else{const a=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==a&&(this.setFocus([]),yield Pm(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;const i=this.findNextIndex(e,!1,n);i>-1&&this.setFocus([i],t)}findNextIndex(e,t=!1,n){for(let i=0;i=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let i=0;ithis.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new pD(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),i=this.view.elementTop(e),r=this.view.elementHeight(e);if(zm(t)){const a=r-this.view.renderHeight;this.view.setScrollTop(a*Qo(t,0,1)+i)}else{const a=i+r,o=n+this.view.renderHeight;i=o||(i=o&&r>=this.view.renderHeight?this.view.setScrollTop(i):a>=o&&this.view.setScrollTop(a-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(e){return this.view.getElementDomId(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let n;!((e=this.accessibilityProvider)===null||e===void 0)&&e.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Mp([Ci],Gl.prototype,"onDidChangeFocus",null);Mp([Ci],Gl.prototype,"onDidChangeSelection",null);Mp([Ci],Gl.prototype,"onContextMenu",null);Mp([Ci],Gl.prototype,"onKeyDown",null);Mp([Ci],Gl.prototype,"onDidFocus",null);const $f=ve,Vbe="selectOption.entry.template";class Gst{get templateId(){return Vbe}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=me(e,$f(".option-text")),t.detail=me(e,$f(".option-detail")),t.decoratorRight=me(e,$f(".option-decorator-right")),t}renderElement(e,t,n){const i=n,r=e.text,a=e.detail,o=e.decoratorRight,s=e.isDisabled;i.text.textContent=r,i.detail.textContent=a||"",i.decoratorRight.innerText=o||"",s?i.root.classList.add("option-disabled"):i.root.classList.remove("option-disabled")}disposeTemplate(e){}}class Jd extends ne{constructor(e,t,n,i,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=i,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=Jd.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new Q,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return Vbe}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=ve(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=me(this.selectDropDownContainer,$f(".select-box-details-pane"));const t=me(this.selectDropDownContainer,$f(".select-box-dropdown-container-width-control")),n=me(t,$f(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",me(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=P0(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(ce(this.selectDropDownContainer,Me.DRAG_START,i=>{It.stop(i,!0)}))}registerListeners(){this._register(xi(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(ce(this.selectElement,Me.CLICK,t=>{It.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Me.MOUSE_DOWN,t=>{It.stop(t)}));let e;this._register(ce(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(ce(this.selectElement,"touchend",t=>{It.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(ce(this.selectElement,Me.KEY_DOWN,t=>{const n=new ln(t);let i=!1;iu?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(i=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(i=!0),i&&(this.showSelectDropDown(),It.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){di(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,i)=>{this.selectElement.add(this.createOption(n.text,i,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)===null||e===void 0||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){var e,t,n;const i=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",r=(t=this.styles.selectForeground)!==null&&t!==void 0?t:"",a=(n=this.styles.selectBorder)!==null&&n!==void 0?n:"";this.selectElement.style.backgroundColor=i,this.selectElement.style.color=r,this.selectElement.style.borderColor=a}styleList(){var e,t;const n=(e=this.styles.selectBackground)!==null&&e!==void 0?e:"",i=n3(this.styles.selectListBackground,n);this.selectDropDownListContainer.style.backgroundColor=i,this.selectionDetailsPane.style.backgroundColor=i;const r=(t=this.styles.focusBorder)!==null&&t!==void 0?t:"";this.selectDropDownContainer.style.outlineColor=r,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){const i=document.createElement("option");return i.value=e,i.text=e,i.disabled=!!n,i}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=ji(this.selectElement),n=getComputedStyle(this.selectElement),i=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=window.innerHeight-t.top-t.height-(this.selectBoxOptions.minBottomMargin||0),a=t.top-Jd.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,o=this.selectElement.offsetWidth,s=this.setWidthControlElement(this.widthControlElement),l=Math.max(s,Math.round(o)).toString()+"px";this.selectDropDownContainer.style.width=l,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let c=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const d=this._hasDetails?this._cachedMaxDetailsHeight:0,h=c+i+d,E=Math.floor((r-i-d)/this.getHeight()),m=Math.floor((a-i-d)/this.getHeight());if(e)return t.top+t.height>window.innerHeight-22||t.topE&&this.options.length>E?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(t.top+t.height>window.innerHeight-22||t.topr&&(c=E*this.getHeight())}else h>a&&(c=m*this.getHeight());return this.selectList.layout(c),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=c+i+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=c+i+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=l,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,i=0;this.options.forEach((r,a)=>{const o=r.detail?r.detail.length:0,s=r.decoratorRight?r.decoratorRight.length:0,l=r.text.length+o+s;l>i&&(n=a,i=l)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=ko(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=me(e,$f(".select-box-dropdown-list-container")),this.listRenderer=new Gst,this.selectList=new Gl("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:i=>{let r=i.text;return i.detail&&(r+=`. ${i.detail}`),i.decoratorRight&&(r+=`. ${i.decoratorRight}`),i.description&&(r+=`. ${i.description}`),r},getWidgetAriaLabel:()=>v({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>iu?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new Zt(this.selectDropDownListContainer,"keydown")),n=Ne.chain(t.event,i=>i.filter(()=>this.selectList.length>0).map(r=>new ln(r)));this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(Ne.chain(n,i=>i.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(ce(this.selectList.getHTMLElement(),Me.POINTER_UP,i=>this.onPointerUp(i))),this._register(this.selectList.onMouseOver(i=>typeof i.index<"u"&&this.selectList.setFocus([i.index]))),this._register(this.selectList.onDidChangeFocus(i=>this.onListFocus(i))),this._register(ce(this.selectDropDownContainer,Me.FOCUS_OUT,i=>{!this._isVisible||Qr(i.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;It.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const n=t.closest(".monaco-list-row");if(!n)return;const i=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");i>=0&&i{for(let a=0;athis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(It.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){It.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){It.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){It.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=Sh.toString(e.keyCode);let n=-1;for(let i=0;i{this._register(ce(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(xi(this.selectElement,"click",e=>{It.stop(e,!0)})),this._register(xi(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(xi(this.selectElement,"keydown",e=>{let t=!1;iu?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!di(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,i)=>{this.selectElement.add(this.createOption(n.text,i,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(i)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Jx)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Zu.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,T0&&this._register(ce(e,Me.DRAG_START,i=>{var r;return(r=i.dataTransfer)===null||r===void 0?void 0:r.setData($k.TEXT,this._action.label)}))),this._register(ce(t,Yu.Tap,i=>this.onClick(i,!0))),this._register(ce(t,Me.MOUSE_DOWN,i=>{n||It.stop(i,!0),this._action.enabled&&i.button===0&&t.classList.add("active")})),iu&&this._register(ce(t,Me.CONTEXT_MENU,i=>{i.button===0&&i.ctrlKey===!0&&this.onClick(i)})),this._register(ce(t,Me.CLICK,i=>{It.stop(i,!0),this.options&&this.options.isMenu||this.onClick(i)})),this._register(ce(t,Me.DBLCLICK,i=>{It.stop(i,!0)})),[Me.MOUSE_UP,Me.MOUSE_OUT].forEach(i=>{this._register(ce(t,i,r=>{It.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){var n;It.stop(e,!0);const i=Ms(this._context)?!((n=this.options)===null||n===void 0)&&n.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var e;if(!this.element)return;const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(t):(this.customHover=Tbe(this.options.hoverDelegate,this.element,t),this._store.add(this.customHover))):this.element.title=t}updateAriaLabel(){var e;if(this.element){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class mv extends vc{constructor(e,t,n){super(e,t,n),this.options=n,this.options.icon=n.icon!==void 0?n.icon:!1,this.options.label=n.label!==void 0?n.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=me(this.element,ve("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&(me(this.element,ve("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Dr.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)===null||e===void 0||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)===null||e===void 0||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)===null||t===void 0||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=(e=this.getTooltip())!==null&&e!==void 0?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class Jst extends vc{constructor(e,t,n,i,r,a,o){super(e,t),this.selectBox=new qst(n,i,r,a,o),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)===null||e===void 0||e.focus()}blur(){var e;(e=this.selectBox)===null||e===void 0||e.blur()}render(e){this.selectBox.render(e)}}class Zst extends Jx{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new Q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=me(e,ve(".monaco-dropdown")),this._label=me(this._element,ve(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(const r of[Me.CLICK,Me.MOUSE_DOWN,Yu.Tap])this._register(ce(this.element,r,a=>It.stop(a,!0)));for(const r of[Me.MOUSE_DOWN,Yu.Tap])this._register(ce(this._label,r,a=>{a instanceof MouseEvent&&(a.detail>1||a.button!==0)||(this.visible?this.hide():this.show())}));this._register(ce(this._label,Me.KEY_UP,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(It.stop(r,!0),this.visible?this.hide():this.show())}));const i=n(this._label);i&&this._register(i),this._register(Zu.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Yst extends Zst{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class sw extends vc{constructor(e,t,n,i=Object.create(null)){super(null,e,i),this.actionItem=null,this._onDidChangeVisibility=this._register(new Q),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=i,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=r=>{this.element=me(r,ve("a.action-label"));let a=[];return typeof this.options.classNames=="string"?a=this.options.classNames.split(/\s+/g).filter(o=>!!o):this.options.classNames&&(a=this.options.classNames),a.find(o=>o==="icon")||a.push("codicon"),this.element.classList.add(...a),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},n=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new Yst(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{var a;(a=this.element)===null||a===void 0||a.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const r=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return r.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)===null||e===void 0||e.show()}updateEnabled(){var e,t;const n=!this.action.enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",n),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",n)}}function Qst(u){return u?u.condition!==void 0:!1}var Ab=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Dx;(function(u){u[u.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",u[u.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(Dx||(Dx={}));var y5;(function(u){u[u.None=0]="None",u[u.Initialized=1]="Initialized",u[u.Closed=2]="Closed"})(y5||(y5={}));class xx extends ne{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new F3),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=y5.None,this.cache=new Map,this.flushDelayer=this._register(new D6e(xx.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;this._onDidChangeStorage.pause();try{(t=e.changed)===null||t===void 0||t.forEach((i,r)=>this.acceptExternal(r,i)),(n=e.deleted)===null||n===void 0||n.forEach(i=>this.acceptExternal(i,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===y5.Closed)return;let n=!1;Ms(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const n=this.cache.get(e);return Ms(n)?t:n}getBoolean(e,t){const n=this.get(e);return Ms(n)?t:n==="true"}getNumber(e,t){const n=this.get(e);return Ms(n)?t:parseInt(n,10)}set(e,t,n=!1){return Ab(this,void 0,void 0,function*(){if(this.state===y5.Closed)return;if(Ms(t))return this.delete(e,n);const i=eo(t)||Array.isArray(t)?rst(t):String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()})}delete(e,t=!1){return Ab(this,void 0,void 0,function*(){if(!(this.state===y5.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return Ab(this,void 0,void 0,function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}doFlush(e){return Ab(this,void 0,void 0,function*(){return this.options.hint===Dx.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)})}}xx.DEFAULT_FLUSH_DELAY=100;class aH{constructor(){this.onDidChangeItemsExternal=Ne.None,this.items=new Map}updateItems(e){var t,n;return Ab(this,void 0,void 0,function*(){(t=e.insert)===null||t===void 0||t.forEach((i,r)=>this.items.set(r,i)),(n=e.delete)===null||n===void 0||n.forEach(i=>this.items.delete(i))})}}const n8="__$__targetStorageMarker",Ul=Ut("storageService");var lw;(function(u){u[u.NONE=0]="NONE",u[u.SHUTDOWN=1]="SHUTDOWN"})(lw||(lw={}));function Xst(u){const e=u.get(n8);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}class wP extends ne{constructor(e={flushInterval:wP.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new F3),this._onDidChangeTarget=this._register(new F3),this._onWillSaveState=this._register(new Q),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,n){return Ne.filter(this._onDidChangeValue.event,i=>i.scope===e&&(t===void 0||i.key===t),n)}emitDidChangeValue(e,t){const{key:n,external:i}=t;if(n===n8){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:i})}get(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.get(e,n)}getBoolean(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.getBoolean(e,n)}getNumber(e,t,n){var i;return(i=this.getStorage(t))===null||i===void 0?void 0:i.getNumber(e,n)}store(e,t,n,i,r=!1){if(Ms(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{var a;this.updateKeyTarget(e,n,i),(a=this.getStorage(n))===null||a===void 0||a.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),(i=this.getStorage(t))===null||i===void 0||i.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,i=!1){var r,a;const o=this.getKeyTargets(t);typeof n=="number"?o[e]!==n&&(o[e]=n,(r=this.getStorage(t))===null||r===void 0||r.set(n8,JSON.stringify(o),i)):typeof o[e]=="number"&&(delete o[e],(a=this.getStorage(t))===null||a===void 0||a.set(n8,JSON.stringify(o),i))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?Xst(t):Object.create(null)}}wP.DEFAULT_FLUSH_INTERVAL=60*1e3;class e0t extends wP{constructor(){super(),this.applicationStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new xx(new aH,{hint:Dx.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}function t0t(u,e){const t=Object.assign({},e);for(const n in u){const i=u[n];t[n]=i!==void 0?Re(i):void 0}return t}const u0t={keybindingLabelBackground:Re(NXe),keybindingLabelForeground:Re(PXe),keybindingLabelBorder:Re(RXe),keybindingLabelBottomBorder:Re(IXe),keybindingLabelShadow:Re(t1)},n0t={buttonForeground:Re(Eb),buttonSeparator:Re(CXe),buttonBackground:Re(mb),buttonHoverBackground:Re(bXe),buttonSecondaryForeground:Re(FXe),buttonSecondaryBackground:Re(zW),buttonSecondaryHoverBackground:Re(yXe),buttonBorder:Re(kXe)},i0t={progressBarBackground:Re(SXe)},cw={inputActiveOptionBorder:Re(pX),inputActiveOptionForeground:Re(DX),inputActiveOptionBackground:Re(If)};Re(Det),Re(vet),Re(xet);Re(ti),Re(i1),Re(t1),Re(eu),Re(Ret),Re(Iet),Re(Oet),Re(cXe);const dw={inputBackground:Re(Z6e),inputForeground:Re(Y6e),inputBorder:Re(Q6e),inputValidationInfoBorder:Re(EXe),inputValidationInfoBackground:Re(dXe),inputValidationInfoForeground:Re(hXe),inputValidationWarningBorder:Re(fXe),inputValidationWarningBackground:Re(mXe),inputValidationWarningForeground:Re(gXe),inputValidationErrorBorder:Re(xXe),inputValidationErrorBackground:Re(pXe),inputValidationErrorForeground:Re(DXe)},r0t={listFilterWidgetBackground:Re(det),listFilterWidgetOutline:Re(het),listFilterWidgetNoMatchesOutline:Re(Eet),listFilterWidgetShadow:Re(met),inputBoxStyles:dw,toggleStyles:cw},$be={badgeBackground:Re(qS),badgeForeground:Re(AXe),badgeBorder:Re(eu)};Re(wet),Re(Bet),Re(foe),Re(foe),Re(Let);const Tp={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Re(eet),listFocusForeground:Re(tet),listFocusOutline:Re(uet),listActiveSelectionBackground:Re(Hh),listActiveSelectionForeground:Re(o1),listActiveSelectionIconForeground:Re(Db),listFocusAndSelectionOutline:Re(net),listFocusAndSelectionBackground:Re(Hh),listFocusAndSelectionForeground:Re(o1),listInactiveSelectionBackground:Re(iet),listInactiveSelectionIconForeground:Re(aet),listInactiveSelectionForeground:Re(ret),listInactiveFocusBackground:Re(oet),listInactiveFocusOutline:Re(set),listHoverBackground:Re(tCe),listHoverForeground:Re(uCe),listDropBackground:Re(cet),listSelectionOutline:Re(En),listHoverOutline:Re(En),treeIndentGuidesStroke:Re(xb),treeInactiveIndentGuidesStroke:Re(get),tableColumnsBorder:Re(fet),tableOddRowsBackgroundColor:Re(pet)};function p6(u){return t0t(u,Tp)}const a0t={selectBackground:Re(u1),selectListBackground:Re(vXe),selectForeground:Re(Ih),decoratorRightForeground:Re(X6e),selectBorder:Re(h5),focusBorder:Re(js),listFocusBackground:Re(jf),listInactiveSelectionIconForeground:Re(E5),listFocusForeground:Re(Of),listFocusOutline:oXe(En,ae.transparent.toString()),listHoverBackground:Re(tCe),listHoverForeground:Re(uCe),listHoverOutline:Re(En),selectListBorder:Re(r1),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},o0t={shadowColor:Re(t1),borderColor:Re(Cet),foregroundColor:Re(bet),backgroundColor:Re(ket),selectionForegroundColor:Re(Fet),selectionBackgroundColor:Re(yet),selectionBorderColor:Re(Aet),separatorColor:Re(_et),scrollbarShadow:Re(_Xe),scrollbarSliderBackground:Re(gb),scrollbarSliderHoverBackground:Re(fb),scrollbarSliderActiveBackground:Re(pb)};var LP=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_o=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Kbe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function s0t(u,e,t,n){const i=u.getActions(e),r=Nh.getInstance(),a=r.keyStatus.altKey||(na||Pa)&&r.keyStatus.shiftKey;Gbe(i,t,a,n?o=>o===n:o=>o==="navigation")}function Wbe(u,e,t,n,i,r){const a=u.getActions(e);Gbe(a,t,!1,typeof n=="string"?s=>s===n:n,i,r)}function Gbe(u,e,t,n=a=>a==="navigation",i=()=>!1,r=!1){let a,o;Array.isArray(e)?(a=e,o=e):(a=e.primary,o=e.secondary);const s=new Set;for(const[l,c]of u){let d;n(l)?(d=a,d.length>0&&r&&d.push(new Dr)):(d=o,d.length>0&&d.push(new Dr));for(let h of c){t&&(h=h instanceof zl&&h.alt?h.alt:h);const E=d.push(h);h instanceof Zx&&s.add({group:l,action:h,index:E-1})}}for(const{group:l,action:c,index:d}of s){const h=n(l)?a:o,E=c.actions;i(c,l,h.length)&&h.splice(d,1,...E)}}let N3=class extends mv{constructor(e,t,n,i,r,a,o,s){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate}),this._keybindingService=n,this._notificationService=i,this._contextKeyService=r,this._themeService=a,this._contextMenuService=o,this._accessibilityService=s,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Ir),this._altKey=Nh.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return Kbe(this,void 0,void 0,function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}})}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const n=()=>{var i;const r=!!(!((i=this._menuItemAction.alt)===null||i===void 0)&&i.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);r!==this._wantsAltCommand&&(this._wantsAltCommand=r,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(ce(e,"mouseleave",i=>{t=!1,n()})),this._register(ce(e,"mouseenter",i=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),n=t&&t.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let r=n?v("titleAndKb","{0} ({1})",i,n):i;if(!this._wantsAltCommand&&(!((e=this._menuItemAction.alt)===null||e===void 0)&&e.enabled)){const a=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,o=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),s=o&&o.getLabel(),l=s?v("titleAndKb","{0} ({1})",a,s):a;r=v("titleAndKbAndAlt",`{0} +[{1}] {2}`,r,XX.modifierLabels[Os].altKey,l)}return r}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:n}=this;if(!t||!n)return;const i=this._commandAction.checked&&Qst(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(i)if(st.isThemeIcon(i)){const r=st.asClassNameArray(i);n.classList.add(...r),this._itemClassDispose.value=ft(()=>{n.classList.remove(...r)})}else{const r=iv(this._themeService.getColorTheme().type)?Nm(i.dark):Nm(i.light),a=ve("span");a.style.webkitMask=a.style.mask=`${r} no-repeat 50% 50%`,a.style.background="var(--vscode-icon-foreground)",a.style.display="inline-block",a.style.width="100%",a.style.height="100%",n.appendChild(a),n.classList.add("icon"),this._itemClassDispose.value=Fl(ft(()=>{n.classList.remove("icon"),Pr(n)}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}}};N3=LP([_o(2,qu),_o(3,bi),_o(4,pt),_o(5,sr),_o(6,Wl),_o(7,k4)],N3);let LG=class extends sw{constructor(e,t,n,i,r){var a,o,s;const l=Object.assign(Object.assign({},t),{menuAsChild:(a=t==null?void 0:t.menuAsChild)!==null&&a!==void 0?a:!1,classNames:(o=t==null?void 0:t.classNames)!==null&&o!==void 0?o:st.isThemeIcon(e.item.icon)?st.asClassName(e.item.icon):void 0,keybindingProvider:(s=t==null?void 0:t.keybindingProvider)!==null&&s!==void 0?s:c=>n.lookupKeybinding(c.id)});super(e,{getActions:()=>e.actions},i,l),this._keybindingService=n,this._contextMenuService=i,this._themeService=r}render(e){super.render(e),Ru(this.element),e.classList.add("menu-entry");const t=this._action,{icon:n}=t.item;if(n&&!st.isThemeIcon(n)){this.element.classList.add("icon");const i=()=>{this.element&&(this.element.style.backgroundImage=iv(this._themeService.getColorTheme().type)?Nm(n.dark):Nm(n.light))};i(),this._register(this._themeService.onDidColorThemeChange(()=>{i()}))}}};LG=LP([_o(2,qu),_o(3,Wl),_o(4,sr)],LG);let zG=class extends vc{constructor(e,t,n,i,r,a,o,s){var l,c,d;super(null,e),this._keybindingService=n,this._notificationService=i,this._contextMenuService=r,this._menuService=a,this._instaService=o,this._storageService=s,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let h;const E=t!=null&&t.persistLastActionId?s.get(this._storageKey,1):void 0;E&&(h=e.actions.find(g=>E===g.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(N3,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const m=Object.assign(Object.assign({keybindingProvider:g=>this._keybindingService.lookupKeybinding(g.id)},t),{menuAsChild:(l=t==null?void 0:t.menuAsChild)!==null&&l!==void 0?l:!0,classNames:(c=t==null?void 0:t.classNames)!==null&&c!==void 0?c:["codicon","codicon-chevron-down"],actionRunner:(d=t==null?void 0:t.actionRunner)!==null&&d!==void 0?d:new Jx});this._dropdown=new sw(e,e.actions,this._contextMenuService,m),this._dropdown.actionRunner.onDidRun(g=>{g.action instanceof zl&&this.update(g.action)})}update(e){var t;!((t=this._options)===null||t===void 0)&&t.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(N3,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Jx{runAction(n,i){return Kbe(this,void 0,void 0,function*(){yield n.run(void 0)})}},this._container&&this._defaultAction.render(l6e(this._container,ve(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let n;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(n=`(${i.getLabel()})`)}return n}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=ve(".action-container");this._defaultAction.render(me(this._container,t)),this._register(ce(t,Me.KEY_DOWN,i=>{const r=new ln(i);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));const n=ve(".dropdown-action-container");this._dropdown.render(me(this._container,n)),this._register(ce(n,Me.KEY_DOWN,i=>{var r;const a=new ln(i);a.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(r=this._defaultAction.element)===null||r===void 0||r.focus(),a.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};zG=LP([_o(2,qu),_o(3,bi),_o(4,Wl),_o(5,$1),_o(6,mt),_o(7,Ul)],zG);let MG=class extends Jst{constructor(e,t){super(null,e,e.actions.map(n=>({text:n.id===Dr.ID?"─────────":n.label,isDisabled:!n.enabled})),0,t,a0t,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex(n=>n.checked)))}render(e){super.render(e),e.style.borderColor=Re(h5)}runAction(e,t){const n=this.action.actions[t];n&&this.actionRunner.run(n)}};MG=LP([_o(1,F4)],MG);function l0t(u,e,t){return e instanceof zl?u.createInstance(N3,e,t):e instanceof dk?e.item.isSelection?u.createInstance(MG,e):e.item.rememberDefaultAction?u.createInstance(zG,e,Object.assign(Object.assign({},t),{persistLastActionId:!0})):u.createInstance(LG,e,t):void 0}var c0t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class j0 extends ne{constructor(e,t={}){var n,i,r,a,o,s;super(),this._actionRunnerDisposables=this._register(new pe),this.viewItemDisposables=this._register(new NQ),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new Q({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new Q),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new Q),this.onWillRun=this._onWillRun.event,this.options=t,this._context=(n=t.context)!==null&&n!==void 0?n:null,this._orientation=(i=this.options.orientation)!==null&&i!==void 0?i:0,this._triggerKeys={keyDown:(a=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&a!==void 0?a:!1,keys:(s=(o=this.options.triggerKeys)===null||o===void 0?void 0:o.keys)!==null&&s!==void 0?s:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Jx,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(d=>this._onDidRun.fire(d))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(d=>this._onWillRun.fire(d))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let l,c;switch(this._orientation){case 0:l=[15],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical";break}this._register(ce(this.domNode,Me.KEY_DOWN,d=>{const h=new ln(d);let E=!0;const m=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;l&&(h.equals(l[0])||h.equals(l[1]))?E=this.focusPrevious():c&&(h.equals(c[0])||h.equals(c[1]))?E=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?E=this.focusFirst():h.equals(13)?E=this.focusLast():h.equals(2)&&m instanceof vc&&m.trapsArrowNavigation?E=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:E=!1,E&&(h.preventDefault(),h.stopPropagation())})),this._register(ce(this.domNode,Me.KEY_UP,d=>{const h=new ln(d);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(y1(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(yl()===this.domNode||!Qr(yl(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(n=>n instanceof vc&&n.isEnabled());t instanceof vc&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof vc&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){for(let e=0;et.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])===null||t===void 0?void 0:t.action;if(e instanceof HTMLElement){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{const a=document.createElement("li");a.className="action-item",a.setAttribute("role","presentation");let o;const s=Object.assign({hoverDelegate:this.options.hoverDelegate},t);this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(r,s)),o||(o=new mv(this.context,r,s)),this.options.allowContextMenu||this.viewItemDisposables.set(o,ce(a,Me.CONTEXT_MENU,l=>{It.stop(l,!0)})),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(a),this.focusable&&o instanceof vc&&this.viewItems.length===0&&o.setFocusable(!0),i===null||i<0||i>=this.actionsList.children.length?(this.actionsList.appendChild(a),this.viewItems.push(o)):(this.actionsList.insertBefore(a,this.actionsList.children[i]),this.viewItems.splice(i,0,o),i++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=Su(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),Nr(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(e){let t=!1,n;if(e===void 0?t=!0:typeof e=="number"?n=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem>"u"){const i=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=i===-1?void 0:i,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Dr.ID));return this.updateFocus(),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Dr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var i;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((i=this.viewItems[this.previouslyFocusedItem])===null||i===void 0||i.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let a=!0;uk(r.focus)||(a=!1),this.options.focusOnlyEnabledItems&&uk(r.isEnabled)&&!r.isEnabled()&&(a=!1),r.action.id===Dr.ID&&(a=!1),a?(n||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof vc){const n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}run(e,t){return c0t(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){this._context=void 0,this.viewItems=Su(this.viewItems),this.getContainer().remove(),super.dispose()}}const TG=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,oH=/(&)?(&)([^\s&])/g;var hw;(function(u){u[u.Right=0]="Right",u[u.Left=1]="Left"})(hw||(hw={}));let Ube=class i8 extends j0{constructor(e,t,n,i){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:s=>this.doGetActionViewItem(s,n,a),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...iu||Pa?[10]:[]],keyDown:!0}}),this.menuStyles=i,this.menuElement=r,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new pe),this.initializeOrUpdateStyleSheet(e,i),this._register(Zu.addTarget(r)),ce(r,Me.KEY_DOWN,s=>{new ln(s).equals(2)&&s.preventDefault()}),n.enableMnemonics&&this.menuDisposables.add(ce(r,Me.KEY_DOWN,s=>{const l=s.key.toLocaleLowerCase();if(this.mnemonics.has(l)){It.stop(s,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof u0e&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(s)),c.length>1){const d=c.shift();d&&d.container&&(this.focusItemByElement(d.container),c.push(d)),this.mnemonics.set(l,c)}}})),Pa&&this._register(ce(r,Me.KEY_DOWN,s=>{const l=new ln(s);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),It.stop(s,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),It.stop(s,!0))})),this._register(ce(this.domNode,Me.MOUSE_OUT,s=>{const l=s.relatedTarget;Qr(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),s.stopPropagation())})),this._register(ce(this.actionsList,Me.MOUSE_OVER,s=>{let l=s.target;if(!(!l||!Qr(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(Zu.addTarget(this.actionsList)),this._register(ce(this.actionsList,Yu.Tap,s=>{let l=s.initialTarget;if(!(!l||!Qr(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));const a={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new EA(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this.styleScrollElement(o,i),this._register(ce(r,Yu.Change,s=>{It.stop(s,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-s.translationY})})),this._register(ce(o,Me.MOUSE_UP,s=>{s.preventDefault()})),r.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(s=>{var l;return!((l=n.submenuIds)===null||l===void 0)&&l.has(s.id)?(console.warn(`Found submenu cycle: ${s.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(s=>!(s instanceof n0e)).forEach((s,l,c)=>{s.updatePositionInSet(l+1,c.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(bB(e)?this.styleSheet=P0(e):(i8.globalStyleSheet||(i8.globalStyleSheet=P0()),this.styleSheet=i8.globalStyleSheet)),this.styleSheet.textContent=h0t(t,bB(e))}styleScrollElement(e,t){var n,i;const r=(n=t.foregroundColor)!==null&&n!==void 0?n:"",a=(i=t.backgroundColor)!==null&&i!==void 0?i:"",o=t.borderColor?`1px solid ${t.borderColor}`:"",s="5px",l=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=o,e.style.borderRadius=s,e.style.color=r,e.style.backgroundColor=a,e.style.boxShadow=l}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(ce(this.element,Me.MOUSE_UP,r=>{if(It.stop(r,!0),T0){if(new x0(r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(ce(this.element,Me.CONTEXT_MENU,r=>{It.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=me(this.element,ve("a.action-menu-item")),this._action.id===Dr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=me(this.item,ve("span.menu-item-check"+st.asCSSSelector(we.menuSelection))),this.check.setAttribute("role","none"),this.label=me(this.item,ve("span.action-label")),this.options.label&&this.options.keybinding&&(me(this.item,ve("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)===null||e===void 0||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){Nr(this.label);let t=oee(this.action.label);if(t){const n=d0t(t);this.options.enableMnemonics||(t=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));const i=TG.exec(t);if(i){t=pB(t),oH.lastIndex=0;let r=oH.exec(t);for(;r&&r[1];)r=oH.exec(t);const a=o=>o.replace(/&&/g,"&");r?this.label.append(tA(a(t.substr(0,r.index))," "),ve("u",{"aria-hidden":"true"},r[3]),Tve(a(t.substr(r.index+r[0].length))," ")):this.label.innerText=a(t).trim(),(e=this.item)===null||e===void 0||e.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,i=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=i,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}}class u0e extends qbe{constructor(e,t,n,i,r){super(e,e,i,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=i,this.mysubmenu=null,this.submenuDisposables=this._register(new pe),this.mouseOver=!1,this.expandDirection=i&&i.expandDirection!==void 0?i.expandDirection:hw.Right,this.showScheduler=new Hu(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Hu(()=>{this.element&&!Qr(yl(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=me(this.item,ve("span.submenu-indicator"+st.asCSSSelector(we.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(ce(this.element,Me.KEY_UP,t=>{const n=new ln(t);(n.equals(17)||n.equals(3))&&(It.stop(t,!0),this.createSubmenu(!0))})),this._register(ce(this.element,Me.KEY_DOWN,t=>{const n=new ln(t);yl()===this.item&&(n.equals(17)||n.equals(3))&&It.stop(t,!0)})),this._register(ce(this.element,Me.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(ce(this.element,Me.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(ce(this.element,Me.FOCUS_OUT,t=>{this.element&&!Qr(yl(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){It.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,i){const r={top:0,left:0};return r.left=b5(e.width,t.width,{position:i===hw.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new ln(l).equals(15)&&(It.stop(l,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(ce(this.submenuContainer,Me.KEY_DOWN,l=>{new ln(l).equals(15)&&It.stop(l,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class n0e extends mv{constructor(e,t,n,i){super(e,t,n),this.menuStyles=i}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function d0t(u){const e=TG,t=e.exec(u);if(!t)return u;const n=!t[1];return u.replace(e,n?"$2$3":"").trim()}function i0e(u){const e=wve()[u.id];return`.codicon-${u.id}:before { content: '\\${e.toString(16)}'; }`}function h0t(u,e){let t=` .monaco-menu { font-size: 13px; border-radius: 5px; @@ -625,25 +625,25 @@ ${i0e(we.menuSubmenu)} .monaco-scrollable-element > .scrollbar > .slider.active { background: ${a}; } - `)}return t}class E0t{constructor(e,t,n,i){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let n;const i=eX(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:r=>{var a;this.lastContainer=r;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(r.className+=" "+o),this.options.blockMouse&&(this.block=r.appendChild(ve(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=ce(this.block,Me.MOUSE_DOWN,c=>c.stopPropagation()));const s=new pe,l=e.actionRunner||new Jx;return l.onWillRun(c=>this.onActionRun(c,!e.skipTelemetry),this,s),l.onDidRun(this.onDidActionRun,this,s),n=new Ube(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)},o0t),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,s),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,s),s.add(ce(window,Me.BLUR,()=>this.contextViewService.hideContextView(!0))),s.add(ce(window,Me.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new D0(c);let h=d.target;if(!d.rightButton){for(;h;){if(h===r)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),Fl(s,n)},focus:()=>{n==null||n.focus(!!e.autoSelectFirstItem)},onHide:r=>{var a,o,s;(a=e.onHide)===null||a===void 0||a.call(e,!!r),this.block&&(this.block.remove(),this.block=null),(o=this.blockDisposable)===null||o===void 0||o.dispose(),this.blockDisposable=null,this.lastContainer&&(yl()===this.lastContainer||Qr(yl(),this.lastContainer))&&((s=this.focusToReturn)===null||s===void 0||s.focus()),this.lastContainer=null}},i,!!i)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!dd(e.error)&&this.notificationService.error(e.error)}}var m0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},DD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let NG=class extends ne{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new E0t(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,i,r,a){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=i,this.menuService=r,this.contextKeyService=a,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new Q),this._onDidHideContextMenu=this._store.add(new Q)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=PG.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var n;(n=e.onHide)===null||n===void 0||n.call(e,t),this._onDidHideContextMenu.fire()}})),Nh.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};NG=m0t([DD(0,n0),DD(1,bi),DD(2,F4),DD(3,qu),DD(4,$1),DD(5,pt)],NG);var PG;(function(u){function e(n){return n&&n.menuId instanceof K}function t(n,i,r){if(!e(n))return n;const{menuId:a,menuActionOptions:o,contextKeyService:s}=n;return Object.assign(Object.assign({},n),{getActions:()=>{const l=[];if(a){const c=i.createMenu(a,s??r);s0t(c,o,l),c.dispose()}return n.getActions?Dr.join(n.getActions(),l):l}})}u.transform=t})(PG||(PG={}));var Ew;(function(u){u[u.API=0]="API",u[u.USER=1]="USER"})(Ew||(Ew={}));var dee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sf=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let RG=class{constructor(e){this._commandService=e}open(e,t){return Sf(this,void 0,void 0,function*(){if(!ZX(e,Ot.command))return!1;if(!(t!=null&&t.allowCommands)||(typeof e=="string"&&(e=dt.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=AG(decodeURIComponent(e.query))}catch{try{n=AG(e.query)}catch{}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0})}};RG=dee([mw(0,ni)],RG);let IG=class{constructor(e){this._editorService=e}open(e,t){return Sf(this,void 0,void 0,function*(){typeof e=="string"&&(e=dt.parse(e));const{selection:n,uri:i}=Dat(e);return e=i,e.scheme===Ot.file&&(e=eit(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,source:t!=null&&t.fromUserGesture?Ew.USER:Ew.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};IG=dee([mw(0,Cu)],IG);let OG=class{constructor(e,t){this._openers=new to,this._validators=new to,this._resolvers=new to,this._resolvedUriTargets=new ma(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new to,this._defaultExternalOpener={openExternal:n=>Sf(this,void 0,void 0,function*(){return Bse(n,Ot.http,Ot.https)?d6e(n):window.location.href=n,!0})},this._openers.push({open:(n,i)=>Sf(this,void 0,void 0,function*(){return i!=null&&i.openExternal||Bse(n,Ot.mailto,Ot.http,Ot.https,Ot.vsls)?(yield this._doOpenExternal(n,i),!0):!1})}),this._openers.push(new RG(t)),this._openers.push(new IG(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}open(e,t){var n;return Sf(this,void 0,void 0,function*(){const i=typeof e=="string"?dt.parse(e):e,r=(n=this._resolvedUriTargets.get(i))!==null&&n!==void 0?n:e;for(const a of this._validators)if(!(yield a.shouldOpen(r,t)))return!1;for(const a of this._openers)if(yield a.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return Sf(this,void 0,void 0,function*(){for(const n of this._resolvers)try{const i=yield n.resolveExternalUri(e,t);if(i)return this._resolvedUriTargets.has(i.resolved)||this._resolvedUriTargets.set(i.resolved,e),i}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return Sf(this,void 0,void 0,function*(){const n=typeof e=="string"?dt.parse(e):e;let i;try{i=(yield this.resolveExternalUri(n,t)).resolved}catch{i=n}let r;if(typeof e=="string"&&n.toString()===i.toString()?r=e:r=encodeURI(i.toString(!0)),t!=null&&t.allowContributedOpeners){const a=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const o of this._externalOpeners)if(yield o.openExternal(r,{sourceUri:n,preferredOpenerId:a},Kt.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},Kt.None)})}dispose(){this._validators.clear()}};OG=dee([mw(0,Cu),mw(1,ni)],OG);const ql=Ut("editorWorkerService");var Yn;(function(u){u[u.Hint=1]="Hint",u[u.Info=2]="Info",u[u.Warning=4]="Warning",u[u.Error=8]="Error"})(Yn||(Yn={}));(function(u){function e(a,o){return o-a}u.compare=e;const t=Object.create(null);t[u.Error]=v("sev.error","Error"),t[u.Warning]=v("sev.warning","Warning"),t[u.Info]=v("sev.info","Info");function n(a){return t[a]||""}u.toString=n;function i(a){switch(a){case si.Error:return u.Error;case si.Warning:return u.Warning;case si.Info:return u.Info;case si.Ignore:return u.Hint}}u.fromSeverity=i;function r(a){switch(a){case u.Error:return si.Error;case u.Warning:return si.Warning;case u.Info:return si.Info;case u.Hint:return si.Ignore}}u.toSeverity=r})(Yn||(Yn={}));var gw;(function(u){const e="";function t(i){return n(i,!0)}u.makeKey=t;function n(i,r){const a=[e];return i.source?a.push(i.source.replace("¦","\\¦")):a.push(e),i.code?typeof i.code=="string"?a.push(i.code.replace("¦","\\¦")):a.push(i.code.value.replace("¦","\\¦")):a.push(e),i.severity!==void 0&&i.severity!==null?a.push(Yn.toString(i.severity)):a.push(e),i.message&&r?a.push(i.message.replace("¦","\\¦")):a.push(e),i.startLineNumber!==void 0&&i.startLineNumber!==null?a.push(i.startLineNumber.toString()):a.push(e),i.startColumn!==void 0&&i.startColumn!==null?a.push(i.startColumn.toString()):a.push(e),i.endLineNumber!==void 0&&i.endLineNumber!==null?a.push(i.endLineNumber.toString()):a.push(e),i.endColumn!==void 0&&i.endColumn!==null?a.push(i.endColumn.toString()):a.push(e),a.push(e),a.join("¦")}u.makeKeyOptionalMessage=n})(gw||(gw={}));const G1=Ut("markerService");function g0t(u,e){const t=[],n=[];for(const i of u)e.has(i)||t.push(i);for(const i of e)u.has(i)||n.push(i);return{removed:t,added:n}}function f0t(u,e){const t=new Set;for(const n of e)u.has(n)&&t.add(n);return t}var p0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},r0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let jG=class extends ne{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new Q),this._markerDecorations=new ma,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){const t=new D0t(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ot.inMemory||e.uri.scheme===Ot.internal||e.uri.scheme===Ot.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};jG=p0t([r0e(0,_n),r0e(1,G1)],jG);class D0t extends ne{constructor(e){super(),this.model=e,this._map=new YYe,this._register(ft(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:n}=g0t(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;const i=n.map(o=>this._map.get(o)),r=t.map(o=>({range:this._createDecorationRange(this.model,o),options:this._createDecorationOption(o)})),a=this.model.deltaDecorations(i,r);for(const o of n)this._map.delete(o);for(let o=0;o=i)return n;const r=e.getWordAtPosition(n.getStartPosition());r&&(n=new j(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0:!1}}var x0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},UD;function Wg(u){return u.toString()}class v0t{constructor(e,t,n){this.model=e,this._modelEventListeners=new pe,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(i=>n(e,i)))}dispose(){this._modelEventListeners.dispose()}}const C0t=Pa||iu?1:2;class b0t{constructor(e,t,n,i,r,a,o,s){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=a,this.versionId=o,this.alternativeVersionId=s}}let fw=UD=class extends ne{constructor(e,t,n,i,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._languageService=i,this._languageConfigurationService=r,this._onModelAdded=this._register(new Q),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new Q),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new Q),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(a=>this._updateModelOptions(a))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var n;let i=Ea.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const E=parseInt(e.editor.tabSize,10);isNaN(E)||(i=E),i<1&&(i=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const E=parseInt(e.editor.indentSize,10);isNaN(E)||(r=Math.max(E,1))}let a=Ea.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(a=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let o=C0t;const s=e.eol;s===`\r + `)}return t}class E0t{constructor(e,t,n,i){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=i,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let n;const i=eX(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:r=>{var a;this.lastContainer=r;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(r.className+=" "+o),this.options.blockMouse&&(this.block=r.appendChild(ve(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(a=this.blockDisposable)===null||a===void 0||a.dispose(),this.blockDisposable=ce(this.block,Me.MOUSE_DOWN,c=>c.stopPropagation()));const s=new pe,l=e.actionRunner||new Jx;return l.onWillRun(c=>this.onActionRun(c,!e.skipTelemetry),this,s),l.onDidRun(this.onDidActionRun,this,s),n=new Ube(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)},o0t),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,s),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,s),s.add(ce(window,Me.BLUR,()=>this.contextViewService.hideContextView(!0))),s.add(ce(window,Me.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new x0(c);let h=d.target;if(!d.rightButton){for(;h;){if(h===r)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),Fl(s,n)},focus:()=>{n==null||n.focus(!!e.autoSelectFirstItem)},onHide:r=>{var a,o,s;(a=e.onHide)===null||a===void 0||a.call(e,!!r),this.block&&(this.block.remove(),this.block=null),(o=this.blockDisposable)===null||o===void 0||o.dispose(),this.blockDisposable=null,this.lastContainer&&(yl()===this.lastContainer||Qr(yl(),this.lastContainer))&&((s=this.focusToReturn)===null||s===void 0||s.focus()),this.lastContainer=null}},i,!!i)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!dd(e.error)&&this.notificationService.error(e.error)}}var m0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},DD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let NG=class extends ne{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new E0t(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,i,r,a){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=i,this.menuService=r,this.contextKeyService=a,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new Q),this._onDidHideContextMenu=this._store.add(new Q)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=PG.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var n;(n=e.onHide)===null||n===void 0||n.call(e,t),this._onDidHideContextMenu.fire()}})),Nh.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};NG=m0t([DD(0,i0),DD(1,bi),DD(2,F4),DD(3,qu),DD(4,$1),DD(5,pt)],NG);var PG;(function(u){function e(n){return n&&n.menuId instanceof K}function t(n,i,r){if(!e(n))return n;const{menuId:a,menuActionOptions:o,contextKeyService:s}=n;return Object.assign(Object.assign({},n),{getActions:()=>{const l=[];if(a){const c=i.createMenu(a,s??r);s0t(c,o,l),c.dispose()}return n.getActions?Dr.join(n.getActions(),l):l}})}u.transform=t})(PG||(PG={}));var Ew;(function(u){u[u.API=0]="API",u[u.USER=1]="USER"})(Ew||(Ew={}));var dee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sf=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let RG=class{constructor(e){this._commandService=e}open(e,t){return Sf(this,void 0,void 0,function*(){if(!ZX(e,Ot.command))return!1;if(!(t!=null&&t.allowCommands)||(typeof e=="string"&&(e=dt.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=AG(decodeURIComponent(e.query))}catch{try{n=AG(e.query)}catch{}}return Array.isArray(n)||(n=[n]),yield this._commandService.executeCommand(e.path,...n),!0})}};RG=dee([mw(0,ni)],RG);let IG=class{constructor(e){this._editorService=e}open(e,t){return Sf(this,void 0,void 0,function*(){typeof e=="string"&&(e=dt.parse(e));const{selection:n,uri:i}=Dat(e);return e=i,e.scheme===Ot.file&&(e=eit(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:n,source:t!=null&&t.fromUserGesture?Ew.USER:Ew.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};IG=dee([mw(0,Cu)],IG);let OG=class{constructor(e,t){this._openers=new to,this._validators=new to,this._resolvers=new to,this._resolvedUriTargets=new ma(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new to,this._defaultExternalOpener={openExternal:n=>Sf(this,void 0,void 0,function*(){return Bse(n,Ot.http,Ot.https)?d6e(n):window.location.href=n,!0})},this._openers.push({open:(n,i)=>Sf(this,void 0,void 0,function*(){return i!=null&&i.openExternal||Bse(n,Ot.mailto,Ot.http,Ot.https,Ot.vsls)?(yield this._doOpenExternal(n,i),!0):!1})}),this._openers.push(new RG(t)),this._openers.push(new IG(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}open(e,t){var n;return Sf(this,void 0,void 0,function*(){const i=typeof e=="string"?dt.parse(e):e,r=(n=this._resolvedUriTargets.get(i))!==null&&n!==void 0?n:e;for(const a of this._validators)if(!(yield a.shouldOpen(r,t)))return!1;for(const a of this._openers)if(yield a.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return Sf(this,void 0,void 0,function*(){for(const n of this._resolvers)try{const i=yield n.resolveExternalUri(e,t);if(i)return this._resolvedUriTargets.has(i.resolved)||this._resolvedUriTargets.set(i.resolved,e),i}catch{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return Sf(this,void 0,void 0,function*(){const n=typeof e=="string"?dt.parse(e):e;let i;try{i=(yield this.resolveExternalUri(n,t)).resolved}catch{i=n}let r;if(typeof e=="string"&&n.toString()===i.toString()?r=e:r=encodeURI(i.toString(!0)),t!=null&&t.allowContributedOpeners){const a=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const o of this._externalOpeners)if(yield o.openExternal(r,{sourceUri:n,preferredOpenerId:a},Kt.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},Kt.None)})}dispose(){this._validators.clear()}};OG=dee([mw(0,Cu),mw(1,ni)],OG);const ql=Ut("editorWorkerService");var Yn;(function(u){u[u.Hint=1]="Hint",u[u.Info=2]="Info",u[u.Warning=4]="Warning",u[u.Error=8]="Error"})(Yn||(Yn={}));(function(u){function e(a,o){return o-a}u.compare=e;const t=Object.create(null);t[u.Error]=v("sev.error","Error"),t[u.Warning]=v("sev.warning","Warning"),t[u.Info]=v("sev.info","Info");function n(a){return t[a]||""}u.toString=n;function i(a){switch(a){case si.Error:return u.Error;case si.Warning:return u.Warning;case si.Info:return u.Info;case si.Ignore:return u.Hint}}u.fromSeverity=i;function r(a){switch(a){case u.Error:return si.Error;case u.Warning:return si.Warning;case u.Info:return si.Info;case u.Hint:return si.Ignore}}u.toSeverity=r})(Yn||(Yn={}));var gw;(function(u){const e="";function t(i){return n(i,!0)}u.makeKey=t;function n(i,r){const a=[e];return i.source?a.push(i.source.replace("¦","\\¦")):a.push(e),i.code?typeof i.code=="string"?a.push(i.code.replace("¦","\\¦")):a.push(i.code.value.replace("¦","\\¦")):a.push(e),i.severity!==void 0&&i.severity!==null?a.push(Yn.toString(i.severity)):a.push(e),i.message&&r?a.push(i.message.replace("¦","\\¦")):a.push(e),i.startLineNumber!==void 0&&i.startLineNumber!==null?a.push(i.startLineNumber.toString()):a.push(e),i.startColumn!==void 0&&i.startColumn!==null?a.push(i.startColumn.toString()):a.push(e),i.endLineNumber!==void 0&&i.endLineNumber!==null?a.push(i.endLineNumber.toString()):a.push(e),i.endColumn!==void 0&&i.endColumn!==null?a.push(i.endColumn.toString()):a.push(e),a.push(e),a.join("¦")}u.makeKeyOptionalMessage=n})(gw||(gw={}));const G1=Ut("markerService");function g0t(u,e){const t=[],n=[];for(const i of u)e.has(i)||t.push(i);for(const i of e)u.has(i)||n.push(i);return{removed:t,added:n}}function f0t(u,e){const t=new Set;for(const n of e)u.has(n)&&t.add(n);return t}var p0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},r0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let jG=class extends ne{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new Q),this._markerDecorations=new ma,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){const t=new D0t(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const n=this._markerDecorations.get(e.uri);n&&(n.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ot.inMemory||e.uri.scheme===Ot.internal||e.uri.scheme===Ot.vscode)&&((t=this._markerService)===null||t===void 0||t.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};jG=p0t([r0e(0,_n),r0e(1,G1)],jG);class D0t extends ne{constructor(e){super(),this.model=e,this._map=new YYe,this._register(ft(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:n}=g0t(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;const i=n.map(o=>this._map.get(o)),r=t.map(o=>({range:this._createDecorationRange(this.model,o),options:this._createDecorationOption(o)})),a=this.model.deltaDecorations(i,r);for(const o of n)this._map.delete(o);for(let o=0;o=i)return n;const r=e.getWordAtPosition(n.getStartPosition());r&&(n=new j(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){const i=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);i=0:!1}}var x0t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},UD;function Wg(u){return u.toString()}class v0t{constructor(e,t,n){this.model=e,this._modelEventListeners=new pe,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(i=>n(e,i)))}dispose(){this._modelEventListeners.dispose()}}const C0t=Pa||iu?1:2;class b0t{constructor(e,t,n,i,r,a,o,s){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=i,this.heapSize=r,this.sha1=a,this.versionId=o,this.alternativeVersionId=s}}let fw=UD=class extends ne{constructor(e,t,n,i,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._languageService=i,this._languageConfigurationService=r,this._onModelAdded=this._register(new Q),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new Q),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new Q),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(a=>this._updateModelOptions(a))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var n;let i=Ea.tabSize;if(e.editor&&typeof e.editor.tabSize<"u"){const E=parseInt(e.editor.tabSize,10);isNaN(E)||(i=E),i<1&&(i=1)}let r="tabSize";if(e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"){const E=parseInt(e.editor.indentSize,10);isNaN(E)||(r=Math.max(E,1))}let a=Ea.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(a=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let o=C0t;const s=e.eol;s===`\r `?o=2:s===` -`&&(o=1);let l=Ea.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=Ea.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=Ea.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=Ea.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:r,insertSpaces:a,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Is===3||Is===2?` +`&&(o=1);let l=Ea.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=Ea.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let d=Ea.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(d=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=Ea.bracketPairColorizationOptions;return!((n=e.editor)===null||n===void 0)&&n.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:r,insertSpaces:a,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Os===3||Os===2?` `:`\r -`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){const i=typeof e=="string"?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const a=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),o=this._getEOL(t,i);r=UD._readModelOptions({editor:a,eol:o},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,i)=>n.time-i.time);t.length>0&&this._disposedModelsHeapSize>e;){const n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),a=new B1(e,t,r,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(Wg(n))){const l=this._removeDisposedModel(n),c=this._undoRedoService.getElements(n),d=this._getSHA1Computer(),h=d.canComputeSHA1(a)?d.computeSHA1(a)===l.sha1:!1;if(h||l.sharesUndoRedoStack){for(const E of c.past)Ch(E)&&E.matchesResource(n)&&E.setModel(a);for(const E of c.future)Ch(E)&&E.matchesResource(n)&&E.setModel(a);this._undoRedoService.setElementsValidFlag(n,!0,E=>Ch(E)&&E.matchesResource(n)),h&&(a._overwriteVersionId(l.versionId),a._overwriteAlternativeVersionId(l.alternativeVersionId),a._overwriteInitialUndoRedoSnapshot(l.initialUndoRedoSnapshot))}else l.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(l.initialUndoRedoSnapshot)}const o=Wg(a.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const s=new v0t(a,l=>this._onWillDispose(l),(l,c)=>this._onDidChangeLanguage(l,c));return this._models[o]=s,s}createModel(e,t,n,i=!1){let r;return t?r=this._createModelData(e,t,n,i):r=this._createModelData(e,Ks,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||l.future.length>0){for(const c of l.past)Ch(c)&&c.matchesResource(e.uri)&&(r=!0,a+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)Ch(c)&&c.matchesResource(e.uri)&&(r=!0,a+=c.heapSize(e.uri),c.setModel(e.uri))}}const o=UD.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,s=this._getSHA1Computer();if(r)if(!i&&(a>o||!s.canComputeSHA1(e))){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(o-a),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>Ch(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new b0t(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,a,s.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!i){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),a=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);UD._setModelOptionsForModel(e,a,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new zP}};fw.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;fw=UD=x0t([fC(0,tu),fC(1,H6e),fC(2,vP),fC(3,vn),fC(4,tn)],fw);class zP{canComputeSHA1(e){return e.getValueLength()<=zP.MAX_MODEL_SIZE}computeSHA1(e){const t=new aP,n=e.createSnapshot();let i;for(;i=n.read();)t.update(i);return t.digest()}}zP.MAX_MODEL_SIZE=10*1024*1024;class k0t{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:ne.None}}renderElement(e,t,n,i){var r;if((r=n.disposable)===null||r===void 0||r.dispose(),!n.data)return;const a=this.modelProvider();if(a.isResolved(e))return this.renderer.renderElement(a.get(e),e,n.data,i);const o=new vi,s=a.resolve(e,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,n.data),s.then(l=>this.renderer.renderElement(l,e,n.data,i))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class F0t{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function y0t(u,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new F0t(u,e.accessibilityProvider)})}class A0t{constructor(e,t,n,i,r={}){const a=()=>this.model,o=i.map(s=>new k0t(s,a));this.list=new Gl(e,t,n,o,y0t(a,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Ne.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Ne.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Ne.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(i=>this._model.get(i)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Wa(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var D6=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const _0t=!1;var pw;(function(u){u.North="north",u.South="south",u.East="east",u.West="west"})(pw||(pw={}));let S0t=4;const B0t=new Q;let w0t=300;const L0t=new Q;class hee{constructor(){this.disposables=new pe}get onPointerMove(){return this.disposables.add(new Zt(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Zt(window,"mouseup")).event}dispose(){this.disposables.dispose()}}D6([Ci],hee.prototype,"onPointerMove",null);D6([Ci],hee.prototype,"onPointerUp",null);class Eee{get onPointerMove(){return this.disposables.add(new Zt(this.el,Yu.Change)).event}get onPointerUp(){return this.disposables.add(new Zt(this.el,Yu.End)).event}constructor(e){this.el=e,this.disposables=new pe}dispose(){this.disposables.dispose()}}D6([Ci],Eee.prototype,"onPointerMove",null);D6([Ci],Eee.prototype,"onPointerUp",null);class Dw{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}D6([Ci],Dw.prototype,"onPointerMove",null);D6([Ci],Dw.prototype,"onPointerUp",null);const a0e="pointer-events-disabled";class oa extends ne{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=me(this.el,ve(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(ft(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Zt(this._orthogonalStartDragHandle,"mouseenter")).event(()=>oa.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Zt(this._orthogonalStartDragHandle,"mouseleave")).event(()=>oa.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=me(this.el,ve(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(ft(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Zt(this._orthogonalEndDragHandle,"mouseenter")).event(()=>oa.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Zt(this._orthogonalEndDragHandle,"mouseleave")).event(()=>oa.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=w0t,this.hoverDelayer=this._register(new Tl(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new Q),this._onDidStart=this._register(new Q),this._onDidChange=this._register(new Q),this._onDidReset=this._register(new Q),this._onDidEnd=this._register(new Q),this.orthogonalStartSashDisposables=this._register(new pe),this.orthogonalStartDragHandleDisposables=this._register(new pe),this.orthogonalEndSashDisposables=this._register(new pe),this.orthogonalEndDragHandleDisposables=this._register(new pe),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=me(e,ve(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),iu&&this.el.classList.add("mac");const i=this._register(new Zt(this.el,"mousedown")).event;this._register(i(d=>this.onPointerStart(d,new hee),this));const r=this._register(new Zt(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));const a=this._register(new Zt(this.el,"mouseenter")).event;this._register(a(()=>oa.onMouseEnter(this)));const o=this._register(new Zt(this.el,"mouseleave")).event;this._register(o(()=>oa.onMouseLeave(this))),this._register(Zu.addTarget(this.el));const s=this._register(new Zt(this.el,Yu.Start)).event;this._register(s(d=>this.onPointerStart(d,new Eee(this.el)),this));const l=this._register(new Zt(this.el,Yu.Tap)).event;let c;this._register(l(d=>{if(c){clearTimeout(c),c=void 0,this.onPointerDoublePress(d);return}clearTimeout(c),c=setTimeout(()=>c=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=S0t,this._register(B0t.event(d=>{this.size=d,this.layout()}))),this._register(L0t.event(d=>this.hoverDelay=d)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",_0t),this.layout()}onPointerStart(e,t){It.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(n=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new Dw(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Dw(t))),!this.state)return;const i=document.getElementsByTagName("iframe");for(const m of i)m.classList.add(a0e);const r=e.pageX,a=e.pageY,o=e.altKey,s={startX:r,currentX:r,startY:a,currentY:a,altKey:o};this.el.classList.add("active"),this._onDidStart.fire(s);const l=N0(this.el),c=()=>{let m="";n?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=iu?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=iu?"col-resize":"ew-resize",l.textContent=`* { cursor: ${m} !important; }`},d=new pe;c(),n||this.onDidEnablementChange.event(c,null,d);const h=m=>{It.stop(m,!1);const g={startX:r,currentX:m.pageX,startY:a,currentY:m.pageY,altKey:o};this._onDidChange.fire(g)},E=m=>{It.stop(m,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const g of i)g.classList.remove(a0e)};t.onPointerMove(h,null,d),t.onPointerUp(E,null,d),d.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&oa.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&oa.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){oa.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const n=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!n||!(n instanceof HTMLElement))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const z0t={separatorBorder:ae.transparent};class Jbe{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var n,i;e!==this.visible&&(e?(this.size=Yo(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),(i=(n=this.view).setVisible)===null||i===void 0||i.call(n,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,i){this.container=e,this.view=t,this.disposable=i,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){this.disposable.dispose()}}class M0t extends Jbe{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class T0t extends Jbe{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var fh;(function(u){u[u.Idle=0]="Idle",u[u.Busy=1]="Busy"})(fh||(fh={}));var xw;(function(u){u.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}u.Split=e;function t(i){return{type:"auto",index:i}}u.Auto=t;function n(i){return{type:"invisible",cachedVisibleSize:i}}u.Invisible=n})(xw||(xw={}));class Zbe extends ne{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var n,i,r,a,o;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=fh.Idle,this._onDidSashChange=this._register(new Q),this._onDidSashReset=this._register(new Q),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(n=t.orientation)!==null&&n!==void 0?n:0,this.inverseAltBehavior=(i=t.inverseAltBehavior)!==null&&i!==void 0?i:!1,this.proportionalLayout=(r=t.proportionalLayout)!==null&&r!==void 0?r:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=me(this.el,ve(".sash-container")),this.viewContainer=ve(".split-view-container"),this.scrollable=this._register(new hA({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:T0})),this.scrollableElement=this._register(new AX(this.viewContainer,{vertical:this.orientation===0?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2,horizontal:this.orientation===1?(o=t.scrollbarVisibility)!==null&&o!==void 0?o:1:2},this.scrollable));const s=this._register(new Zt(this.viewContainer,"scroll")).event;this._register(s(l=>{const c=this.scrollableElement.getScrollPosition(),d=Math.abs(this.viewContainer.scrollLeft-c.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-c.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(d!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:d,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(l=>{l.scrollTopChanged&&(this.viewContainer.scrollTop=l.scrollTop),l.scrollLeftChanged&&(this.viewContainer.scrollLeft=l.scrollLeft)})),me(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||z0t),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((l,c)=>{const d=is(l.visible)||l.visible?l.size:{type:"invisible",cachedVisibleSize:l.size},h=l.view;this.doAddView(h,d,c,!0)}),this.contentSize=this.viewItems.reduce((l,c)=>l+c.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,i){this.doAddView(e,t,n,i)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let i=0;for(let r=0;rthis.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,a)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout?e.size/this.contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(const o of this.viewItems)o.enabled=!1;const i=this.sashItems.findIndex(o=>o.sash===e),r=Fl(ce(document.body,"keydown",o=>a(this.sashDragState.current,o.altKey)),ce(document.body,"keyup",()=>a(this.sashDragState.current,!1))),a=(o,s)=>{const l=this.viewItems.map(m=>m.size);let c=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(s=!s),s)if(i===this.sashItems.length-1){const g=this.viewItems[i];c=(g.minimumSize-g.size)/2,d=(g.maximumSize-g.size)/2}else{const g=this.viewItems[i+1];c=(g.size-g.maximumSize)/2,d=(g.size-g.minimumSize)/2}let h,E;if(!s){const m=Wa(i,-1),g=Wa(i+1,this.viewItems.length),f=m.reduce((S,w)=>S+(this.viewItems[w].minimumSize-l[w]),0),p=m.reduce((S,w)=>S+(this.viewItems[w].viewMaximumSize-l[w]),0),D=g.length===0?Number.POSITIVE_INFINITY:g.reduce((S,w)=>S+(l[w]-this.viewItems[w].minimumSize),0),x=g.length===0?Number.NEGATIVE_INFINITY:g.reduce((S,w)=>S+(l[w]-this.viewItems[w].viewMaximumSize),0),b=Math.max(f,x),k=Math.min(D,p),A=this.findFirstSnapIndex(m),F=this.findFirstSnapIndex(g);if(typeof A=="number"){const S=this.viewItems[A],w=Math.floor(S.viewMinimumSize/2);h={index:A,limitDelta:S.visible?b-w:b+w,size:S.size}}if(typeof F=="number"){const S=this.viewItems[F],w=Math.floor(S.viewMinimumSize/2);E={index:F,limitDelta:S.visible?k+w:k-w,size:S.size}}}this.sashDragState={start:o,current:o,index:i,sizes:l,minDelta:c,maxDelta:d,alt:s,snapBefore:h,snapAfter:E,disposable:r}};a(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:i,alt:r,minDelta:a,maxDelta:o,snapBefore:s,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-n,d=this.resize(t,c,i,void 0,void 0,a,o,s,l);if(r){const h=t===this.sashItems.length-1,E=this.viewItems.map(x=>x.size),m=h?t:t+1,g=this.viewItems[m],f=g.size-g.maximumSize,p=g.size-g.minimumSize,D=h?t-1:t+1;this.resize(D,-d,E,void 0,void 0,f,p)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Yo(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(this.state!==fh.Idle)throw new Error("Cant modify splitview");if(this.state=fh.Busy,e<0||e>=this.viewItems.length)return;const n=Wa(this.viewItems.length).filter(o=>o!==e),i=[...n.filter(o=>this.viewItems[o].priority===1),e],r=n.filter(o=>this.viewItems[o].priority===2),a=this.viewItems[e];t=Math.round(t),t=Yo(t,a.minimumSize,Math.min(a.maximumSize,this.size)),a.size=t,this.relayout(i,r),this.state=fh.Idle}distributeViewSizes(){const e=[];let t=0;for(const o of this.viewItems)o.maximumSize-o.minimumSize>0&&(e.push(o),t+=o.size);const n=Math.floor(t/e.length);for(const o of e)o.size=Yo(n,o.minimumSize,o.maximumSize);const i=Wa(this.viewItems.length),r=i.filter(o=>this.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);this.relayout(r,a)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,i){if(this.state!==fh.Idle)throw new Error("Cant modify splitview");this.state=fh.Busy;const r=ve(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));const a=e.onDidChange(h=>this.onViewChange(c,h)),o=ft(()=>this.viewContainer.removeChild(r)),s=Fl(a,o);let l;typeof t=="number"?l=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?l=this.getViewSize(t.index)/2:t.type==="invisible"?l={cachedVisibleSize:t.cachedVisibleSize}:l=e.minimumSize);const c=this.orientation===0?new M0t(r,e,l,s):new T0t(r,e,l,s);if(this.viewItems.splice(n,0,c),this.viewItems.length>1){const h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},E=this.orientation===0?new oa(this.sashContainer,{getHorizontalSashTop:S=>this.getSashPosition(S),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:1})):new oa(this.sashContainer,{getVerticalSashLeft:S=>this.getSashPosition(S),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:0})),m=this.orientation===0?S=>({sash:E,start:S.startY,current:S.currentY,alt:S.altKey}):S=>({sash:E,start:S.startX,current:S.currentX,alt:S.altKey}),f=Ne.map(E.onDidStart,m)(this.onSashStart,this),D=Ne.map(E.onDidChange,m)(this.onSashChange,this),b=Ne.map(E.onDidEnd,()=>this.sashItems.findIndex(S=>S.sash===E))(this.onSashEnd,this),k=E.onDidReset(()=>{const S=this.sashItems.findIndex(y=>y.sash===E),w=Wa(S,-1),z=Wa(S+1,this.viewItems.length),N=this.findFirstSnapIndex(w),O=this.findFirstSnapIndex(z);typeof N=="number"&&!this.viewItems[N].visible||typeof O=="number"&&!this.viewItems[O].visible||this._onDidSashReset.fire(S)}),A=Fl(f,D,b,k,E),F={sash:E,disposable:A};this.sashItems.splice(n-1,0,F)}r.appendChild(e.element);let d;typeof t!="number"&&t.type==="split"&&(d=[t.index]),i||this.relayout([n],d),this.state=fh.Idle,!i&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce((i,r)=>i+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(c=>c.size),i,r,a=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,s,l){if(e<0||e>=this.viewItems.length)return 0;const c=Wa(e,-1),d=Wa(e+1,this.viewItems.length);if(r)for(const F of r)ZO(c,F),ZO(d,F);if(i)for(const F of i)H7(c,F),H7(d,F);const h=c.map(F=>this.viewItems[F]),E=c.map(F=>n[F]),m=d.map(F=>this.viewItems[F]),g=d.map(F=>n[F]),f=c.reduce((F,S)=>F+(this.viewItems[S].minimumSize-n[S]),0),p=c.reduce((F,S)=>F+(this.viewItems[S].maximumSize-n[S]),0),D=d.length===0?Number.POSITIVE_INFINITY:d.reduce((F,S)=>F+(n[S]-this.viewItems[S].minimumSize),0),x=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((F,S)=>F+(n[S]-this.viewItems[S].maximumSize),0),b=Math.max(f,x,a),k=Math.min(D,p,o);let A=!1;if(s){const F=this.viewItems[s.index],S=t>=s.limitDelta;A=S!==F.visible,F.setVisible(S,s.size)}if(!A&&l){const F=this.viewItems[l.index],S=to+s.size,0);let n=this.size-t;const i=Wa(this.viewItems.length-1,-1),r=i.filter(o=>this.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);for(const o of a)ZO(i,o);for(const o of r)H7(i,o);typeof e=="number"&&H7(i,e);for(let o=0;n!==0&&ot+n.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(s=>e=s.size-s.minimumSize>0||e);e=!1;const n=this.viewItems.map(s=>e=s.maximumSize-s.size>0||e),i=[...this.viewItems].reverse();e=!1;const r=i.map(s=>e=s.size-s.minimumSize>0||e).reverse();e=!1;const a=i.map(s=>e=s.maximumSize-s.size>0||e).reverse();let o=0;for(let s=0;s0||this.startSnappingEnabled)?l.state=1:D&&t[s]&&(o0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(const n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),Su(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}class bA{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=bA.TemplateId,this.renderedTemplates=new Set;const i=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(const r of e){const a=i.get(r.templateId);if(!a)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(a)}}renderTemplate(e){const t=me(e,ve(".monaco-table-tr")),n=[],i=[];for(let a=0;anew P0t(c,d)),s={size:o.reduce((c,d)=>c+d.column.weight,0),views:o.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new Zbe(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:s})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const l=new bA(i,r,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new Gl(e,this.domNode,N0t(n),[l],a)),Ne.any(...o.map(c=>c.onDidLayout))(([c,d])=>l.layoutColumn(c,d),null,this.disposables),this.splitview.onDidSashReset(c=>{const d=i.reduce((E,m)=>E+m.weight,0),h=i[c].weight/d*this.cachedWidth;this.splitview.resizeView(c,h)},null,this.disposables),this.styleElement=N0(this.domNode),this.style(Ost)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){const i=typeof e=="string"?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[i+t];if(!r){const a=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:t}),o=this._getEOL(t,i);r=UD._readModelOptions({editor:a,eol:o},n),this._modelCreationOptionsByLanguageAndResource[i+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let i=0,r=n.length;ie){const t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,i)=>n.time-i.time);t.length>0&&this._disposedModelsHeapSize>e;){const n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,i){const r=this.getCreationOptions(t,n,i),a=new B1(e,t,r,n,this._undoRedoService,this._languageService,this._languageConfigurationService);if(n&&this._disposedModels.has(Wg(n))){const l=this._removeDisposedModel(n),c=this._undoRedoService.getElements(n),d=this._getSHA1Computer(),h=d.canComputeSHA1(a)?d.computeSHA1(a)===l.sha1:!1;if(h||l.sharesUndoRedoStack){for(const E of c.past)Ch(E)&&E.matchesResource(n)&&E.setModel(a);for(const E of c.future)Ch(E)&&E.matchesResource(n)&&E.setModel(a);this._undoRedoService.setElementsValidFlag(n,!0,E=>Ch(E)&&E.matchesResource(n)),h&&(a._overwriteVersionId(l.versionId),a._overwriteAlternativeVersionId(l.alternativeVersionId),a._overwriteInitialUndoRedoSnapshot(l.initialUndoRedoSnapshot))}else l.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(l.initialUndoRedoSnapshot)}const o=Wg(a.uri);if(this._models[o])throw new Error("ModelService: Cannot add model because it already exists!");const s=new v0t(a,l=>this._onWillDispose(l),(l,c)=>this._onDidChangeLanguage(l,c));return this._models[o]=s,s}createModel(e,t,n,i=!1){let r;return t?r=this._createModelData(e,t,n,i):r=this._createModelData(e,Ws,n,i),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,i=t.length;n0||l.future.length>0){for(const c of l.past)Ch(c)&&c.matchesResource(e.uri)&&(r=!0,a+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)Ch(c)&&c.matchesResource(e.uri)&&(r=!0,a+=c.heapSize(e.uri),c.setModel(e.uri))}}const o=UD.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,s=this._getSHA1Computer();if(r)if(!i&&(a>o||!s.canComputeSHA1(e))){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(o-a),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>Ch(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new b0t(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),i,a,s.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!i){const l=n.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,i=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),a=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);UD._setModelOptionsForModel(e,a,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new zP}};fw.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;fw=UD=x0t([fC(0,tu),fC(1,H6e),fC(2,vP),fC(3,vn),fC(4,tn)],fw);class zP{canComputeSHA1(e){return e.getValueLength()<=zP.MAX_MODEL_SIZE}computeSHA1(e){const t=new aP,n=e.createSnapshot();let i;for(;i=n.read();)t.update(i);return t.digest()}}zP.MAX_MODEL_SIZE=10*1024*1024;class k0t{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:ne.None}}renderElement(e,t,n,i){var r;if((r=n.disposable)===null||r===void 0||r.dispose(),!n.data)return;const a=this.modelProvider();if(a.isResolved(e))return this.renderer.renderElement(a.get(e),e,n.data,i);const o=new vi,s=a.resolve(e,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,n.data),s.then(l=>this.renderer.renderElement(l,e,n.data,i))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class F0t{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function y0t(u,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new F0t(u,e.accessibilityProvider)})}class A0t{constructor(e,t,n,i,r={}){const a=()=>this.model,o=i.map(s=>new k0t(s,a));this.list=new Gl(e,t,n,o,y0t(a,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Ne.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return Ne.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return Ne.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(i=>this._model.get(i)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Wa(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var D6=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};const _0t=!1;var pw;(function(u){u.North="north",u.South="south",u.East="east",u.West="west"})(pw||(pw={}));let S0t=4;const B0t=new Q;let w0t=300;const L0t=new Q;class hee{constructor(){this.disposables=new pe}get onPointerMove(){return this.disposables.add(new Zt(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Zt(window,"mouseup")).event}dispose(){this.disposables.dispose()}}D6([Ci],hee.prototype,"onPointerMove",null);D6([Ci],hee.prototype,"onPointerUp",null);class Eee{get onPointerMove(){return this.disposables.add(new Zt(this.el,Yu.Change)).event}get onPointerUp(){return this.disposables.add(new Zt(this.el,Yu.End)).event}constructor(e){this.el=e,this.disposables=new pe}dispose(){this.disposables.dispose()}}D6([Ci],Eee.prototype,"onPointerMove",null);D6([Ci],Eee.prototype,"onPointerUp",null);class Dw{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}D6([Ci],Dw.prototype,"onPointerMove",null);D6([Ci],Dw.prototype,"onPointerUp",null);const a0e="pointer-events-disabled";class oa extends ne{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=me(this.el,ve(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(ft(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Zt(this._orthogonalStartDragHandle,"mouseenter")).event(()=>oa.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Zt(this._orthogonalStartDragHandle,"mouseleave")).event(()=>oa.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=me(this.el,ve(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(ft(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Zt(this._orthogonalEndDragHandle,"mouseenter")).event(()=>oa.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Zt(this._orthogonalEndDragHandle,"mouseleave")).event(()=>oa.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=w0t,this.hoverDelayer=this._register(new Tl(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new Q),this._onDidStart=this._register(new Q),this._onDidChange=this._register(new Q),this._onDidReset=this._register(new Q),this._onDidEnd=this._register(new Q),this.orthogonalStartSashDisposables=this._register(new pe),this.orthogonalStartDragHandleDisposables=this._register(new pe),this.orthogonalEndSashDisposables=this._register(new pe),this.orthogonalEndDragHandleDisposables=this._register(new pe),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=me(e,ve(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),iu&&this.el.classList.add("mac");const i=this._register(new Zt(this.el,"mousedown")).event;this._register(i(d=>this.onPointerStart(d,new hee),this));const r=this._register(new Zt(this.el,"dblclick")).event;this._register(r(this.onPointerDoublePress,this));const a=this._register(new Zt(this.el,"mouseenter")).event;this._register(a(()=>oa.onMouseEnter(this)));const o=this._register(new Zt(this.el,"mouseleave")).event;this._register(o(()=>oa.onMouseLeave(this))),this._register(Zu.addTarget(this.el));const s=this._register(new Zt(this.el,Yu.Start)).event;this._register(s(d=>this.onPointerStart(d,new Eee(this.el)),this));const l=this._register(new Zt(this.el,Yu.Tap)).event;let c;this._register(l(d=>{if(c){clearTimeout(c),c=void 0,this.onPointerDoublePress(d);return}clearTimeout(c),c=setTimeout(()=>c=void 0,250)},this)),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=S0t,this._register(B0t.event(d=>{this.size=d,this.layout()}))),this._register(L0t.event(d=>this.hoverDelay=d)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",_0t),this.layout()}onPointerStart(e,t){It.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(n=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new Dw(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Dw(t))),!this.state)return;const i=document.getElementsByTagName("iframe");for(const m of i)m.classList.add(a0e);const r=e.pageX,a=e.pageY,o=e.altKey,s={startX:r,currentX:r,startY:a,currentY:a,altKey:o};this.el.classList.add("active"),this._onDidStart.fire(s);const l=P0(this.el),c=()=>{let m="";n?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=iu?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=iu?"col-resize":"ew-resize",l.textContent=`* { cursor: ${m} !important; }`},d=new pe;c(),n||this.onDidEnablementChange.event(c,null,d);const h=m=>{It.stop(m,!1);const g={startX:r,currentX:m.pageX,startY:a,currentY:m.pageY,altKey:o};this._onDidChange.fire(g)},E=m=>{It.stop(m,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),d.dispose();for(const g of i)g.classList.remove(a0e)};t.onPointerMove(h,null,d),t.onPointerUp(E,null,d),d.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&oa.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&oa.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){oa.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const n=(t=e.initialTarget)!==null&&t!==void 0?t:e.target;if(!(!n||!(n instanceof HTMLElement))&&n.classList.contains("orthogonal-drag-handle"))return n.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}const z0t={separatorBorder:ae.transparent};class Jbe{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var n,i;e!==this.visible&&(e?(this.size=Qo(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),(i=(n=this.view).setVisible)===null||i===void 0||i.call(n,e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return(e=this.view.proportionalLayout)!==null&&e!==void 0?e:!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,i){this.container=e,this.view=t,this.disposable=i,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){this.disposable.dispose()}}class M0t extends Jbe{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class T0t extends Jbe{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var fh;(function(u){u[u.Idle=0]="Idle",u[u.Busy=1]="Busy"})(fh||(fh={}));var xw;(function(u){u.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}u.Split=e;function t(i){return{type:"auto",index:i}}u.Auto=t;function n(i){return{type:"invisible",cachedVisibleSize:i}}u.Invisible=n})(xw||(xw={}));class Zbe extends ne{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var n,i,r,a,o;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=fh.Idle,this._onDidSashChange=this._register(new Q),this._onDidSashReset=this._register(new Q),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(n=t.orientation)!==null&&n!==void 0?n:0,this.inverseAltBehavior=(i=t.inverseAltBehavior)!==null&&i!==void 0?i:!1,this.proportionalLayout=(r=t.proportionalLayout)!==null&&r!==void 0?r:!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=me(this.el,ve(".sash-container")),this.viewContainer=ve(".split-view-container"),this.scrollable=this._register(new hA({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:N0})),this.scrollableElement=this._register(new AX(this.viewContainer,{vertical:this.orientation===0?(a=t.scrollbarVisibility)!==null&&a!==void 0?a:1:2,horizontal:this.orientation===1?(o=t.scrollbarVisibility)!==null&&o!==void 0?o:1:2},this.scrollable));const s=this._register(new Zt(this.viewContainer,"scroll")).event;this._register(s(l=>{const c=this.scrollableElement.getScrollPosition(),d=Math.abs(this.viewContainer.scrollLeft-c.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,h=Math.abs(this.viewContainer.scrollTop-c.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(d!==void 0||h!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:d,scrollTop:h})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(l=>{l.scrollTopChanged&&(this.viewContainer.scrollTop=l.scrollTop),l.scrollLeftChanged&&(this.viewContainer.scrollLeft=l.scrollLeft)})),me(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||z0t),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((l,c)=>{const d=rs(l.visible)||l.visible?l.size:{type:"invisible",cachedVisibleSize:l.size},h=l.view;this.doAddView(h,d,c,!0)}),this.contentSize=this.viewItems.reduce((l,c)=>l+c.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,i){this.doAddView(e,t,n,i)}layout(e,t){const n=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let i=0;for(let r=0;rthis.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,a)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout?e.size/this.contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(const o of this.viewItems)o.enabled=!1;const i=this.sashItems.findIndex(o=>o.sash===e),r=Fl(ce(document.body,"keydown",o=>a(this.sashDragState.current,o.altKey)),ce(document.body,"keyup",()=>a(this.sashDragState.current,!1))),a=(o,s)=>{const l=this.viewItems.map(m=>m.size);let c=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(s=!s),s)if(i===this.sashItems.length-1){const g=this.viewItems[i];c=(g.minimumSize-g.size)/2,d=(g.maximumSize-g.size)/2}else{const g=this.viewItems[i+1];c=(g.size-g.maximumSize)/2,d=(g.size-g.minimumSize)/2}let h,E;if(!s){const m=Wa(i,-1),g=Wa(i+1,this.viewItems.length),f=m.reduce((S,w)=>S+(this.viewItems[w].minimumSize-l[w]),0),p=m.reduce((S,w)=>S+(this.viewItems[w].viewMaximumSize-l[w]),0),D=g.length===0?Number.POSITIVE_INFINITY:g.reduce((S,w)=>S+(l[w]-this.viewItems[w].minimumSize),0),x=g.length===0?Number.NEGATIVE_INFINITY:g.reduce((S,w)=>S+(l[w]-this.viewItems[w].viewMaximumSize),0),b=Math.max(f,x),k=Math.min(D,p),A=this.findFirstSnapIndex(m),F=this.findFirstSnapIndex(g);if(typeof A=="number"){const S=this.viewItems[A],w=Math.floor(S.viewMinimumSize/2);h={index:A,limitDelta:S.visible?b-w:b+w,size:S.size}}if(typeof F=="number"){const S=this.viewItems[F],w=Math.floor(S.viewMinimumSize/2);E={index:F,limitDelta:S.visible?k+w:k-w,size:S.size}}}this.sashDragState={start:o,current:o,index:i,sizes:l,minDelta:c,maxDelta:d,alt:s,snapBefore:h,snapAfter:E,disposable:r}};a(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:i,alt:r,minDelta:a,maxDelta:o,snapBefore:s,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-n,d=this.resize(t,c,i,void 0,void 0,a,o,s,l);if(r){const h=t===this.sashItems.length-1,E=this.viewItems.map(x=>x.size),m=h?t:t+1,g=this.viewItems[m],f=g.size-g.maximumSize,p=g.size-g.minimumSize,D=h?t-1:t+1;this.resize(D,-d,E,void 0,void 0,f,p)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Qo(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(this.state!==fh.Idle)throw new Error("Cant modify splitview");if(this.state=fh.Busy,e<0||e>=this.viewItems.length)return;const n=Wa(this.viewItems.length).filter(o=>o!==e),i=[...n.filter(o=>this.viewItems[o].priority===1),e],r=n.filter(o=>this.viewItems[o].priority===2),a=this.viewItems[e];t=Math.round(t),t=Qo(t,a.minimumSize,Math.min(a.maximumSize,this.size)),a.size=t,this.relayout(i,r),this.state=fh.Idle}distributeViewSizes(){const e=[];let t=0;for(const o of this.viewItems)o.maximumSize-o.minimumSize>0&&(e.push(o),t+=o.size);const n=Math.floor(t/e.length);for(const o of e)o.size=Qo(n,o.minimumSize,o.maximumSize);const i=Wa(this.viewItems.length),r=i.filter(o=>this.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);this.relayout(r,a)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,i){if(this.state!==fh.Idle)throw new Error("Cant modify splitview");this.state=fh.Busy;const r=ve(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));const a=e.onDidChange(h=>this.onViewChange(c,h)),o=ft(()=>this.viewContainer.removeChild(r)),s=Fl(a,o);let l;typeof t=="number"?l=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?l=this.getViewSize(t.index)/2:t.type==="invisible"?l={cachedVisibleSize:t.cachedVisibleSize}:l=e.minimumSize);const c=this.orientation===0?new M0t(r,e,l,s):new T0t(r,e,l,s);if(this.viewItems.splice(n,0,c),this.viewItems.length>1){const h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},E=this.orientation===0?new oa(this.sashContainer,{getHorizontalSashTop:S=>this.getSashPosition(S),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:1})):new oa(this.sashContainer,{getVerticalSashLeft:S=>this.getSashPosition(S),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:0})),m=this.orientation===0?S=>({sash:E,start:S.startY,current:S.currentY,alt:S.altKey}):S=>({sash:E,start:S.startX,current:S.currentX,alt:S.altKey}),f=Ne.map(E.onDidStart,m)(this.onSashStart,this),D=Ne.map(E.onDidChange,m)(this.onSashChange,this),b=Ne.map(E.onDidEnd,()=>this.sashItems.findIndex(S=>S.sash===E))(this.onSashEnd,this),k=E.onDidReset(()=>{const S=this.sashItems.findIndex(y=>y.sash===E),w=Wa(S,-1),z=Wa(S+1,this.viewItems.length),N=this.findFirstSnapIndex(w),O=this.findFirstSnapIndex(z);typeof N=="number"&&!this.viewItems[N].visible||typeof O=="number"&&!this.viewItems[O].visible||this._onDidSashReset.fire(S)}),A=Fl(f,D,b,k,E),F={sash:E,disposable:A};this.sashItems.splice(n-1,0,F)}r.appendChild(e.element);let d;typeof t!="number"&&t.type==="split"&&(d=[t.index]),i||this.relayout([n],d),this.state=fh.Idle,!i&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const n=this.viewItems.reduce((i,r)=>i+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(c=>c.size),i,r,a=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,s,l){if(e<0||e>=this.viewItems.length)return 0;const c=Wa(e,-1),d=Wa(e+1,this.viewItems.length);if(r)for(const F of r)ZO(c,F),ZO(d,F);if(i)for(const F of i)H7(c,F),H7(d,F);const h=c.map(F=>this.viewItems[F]),E=c.map(F=>n[F]),m=d.map(F=>this.viewItems[F]),g=d.map(F=>n[F]),f=c.reduce((F,S)=>F+(this.viewItems[S].minimumSize-n[S]),0),p=c.reduce((F,S)=>F+(this.viewItems[S].maximumSize-n[S]),0),D=d.length===0?Number.POSITIVE_INFINITY:d.reduce((F,S)=>F+(n[S]-this.viewItems[S].minimumSize),0),x=d.length===0?Number.NEGATIVE_INFINITY:d.reduce((F,S)=>F+(n[S]-this.viewItems[S].maximumSize),0),b=Math.max(f,x,a),k=Math.min(D,p,o);let A=!1;if(s){const F=this.viewItems[s.index],S=t>=s.limitDelta;A=S!==F.visible,F.setVisible(S,s.size)}if(!A&&l){const F=this.viewItems[l.index],S=to+s.size,0);let n=this.size-t;const i=Wa(this.viewItems.length-1,-1),r=i.filter(o=>this.viewItems[o].priority===1),a=i.filter(o=>this.viewItems[o].priority===2);for(const o of a)ZO(i,o);for(const o of r)H7(i,o);typeof e=="number"&&H7(i,e);for(let o=0;n!==0&&ot+n.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(s=>e=s.size-s.minimumSize>0||e);e=!1;const n=this.viewItems.map(s=>e=s.maximumSize-s.size>0||e),i=[...this.viewItems].reverse();e=!1;const r=i.map(s=>e=s.size-s.minimumSize>0||e).reverse();e=!1;const a=i.map(s=>e=s.maximumSize-s.size>0||e).reverse();let o=0;for(let s=0;s0||this.startSnappingEnabled)?l.state=1:D&&t[s]&&(o0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(const n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)===null||e===void 0||e.disposable.dispose(),Su(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}class bA{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=bA.TemplateId,this.renderedTemplates=new Set;const i=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(const r of e){const a=i.get(r.templateId);if(!a)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(a)}}renderTemplate(e){const t=me(e,ve(".monaco-table-tr")),n=[],i=[];for(let a=0;anew P0t(c,d)),s={size:o.reduce((c,d)=>c+d.column.weight,0),views:o.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new Zbe(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:s})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const l=new bA(i,r,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new Gl(e,this.domNode,N0t(n),[l],a)),Ne.any(...o.map(c=>c.onDidLayout))(([c,d])=>l.layoutColumn(c,d),null,this.disposables),this.splitview.onDidSashReset(c=>{const d=i.reduce((E,m)=>E+m.weight,0),h=i[c].weight/d*this.cachedWidth;this.splitview.resizeView(c,h)},null,this.disposables),this.styleElement=P0(this.domNode),this.style(Ost)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { top: ${this.virtualDelegate.headerRowHeight+1}px; height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}MP.InstanceCount=0;class x6 extends $l{constructor(e){super(),this._onChange=this._register(new Q),this.onChange=this._onChange.event,this._onKeyDown=this._register(new Q),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...st.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const R0t=v("caseDescription","Match Case"),I0t=v("wordsDescription","Match Whole Word"),O0t=v("regexDescription","Use Regular Expression");class Ybe extends x6{constructor(e){super({icon:we.caseSensitive,title:R0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Qbe extends x6{constructor(e){super({icon:we.wholeWord,title:I0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Xbe extends x6{constructor(e){super({icon:we.regex,title:O0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class j0t{constructor(e,t=0,n=e.length,i=t-1){this.items=e,this.start=t,this.end=n,this.index=i}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class H0t{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new j0t(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const pC=ve;let V0t=class extends $l{constructor(e,t,n){var i;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new Q),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(i=this.options.tooltip)!==null&&i!==void 0?i:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=me(e,pC(".monaco-inputbox.idle"));const r=this.options.flexibleHeight?"textarea":"input",a=me(this.element,pC(".ibwrapper"));if(this.input=me(a,pC(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=me(a,pC("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new dCe(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),me(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const o=this._register(new Zt(document,"selectionchange")),s=Ne.filter(o.event,()=>{const l=document.getSelection();return(l==null?void 0:l.anchorNode)===a});this._register(s(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new O0(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Rf(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&$s(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n3(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=ko(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var r,a;if(!this.message)return null;e=me(i,pC(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?est(this.message.content,o):Xot(this.message.content,o);s.classList.add(this.classForType(this.message.type));const l=this.stylesForType(this.message.type);return s.style.backgroundColor=(r=l.background)!==null&&r!==void 0?r:"",s.style.color=(a=l.foreground)!==null&&a!==void 0?a:"",s.style.border=l.border?`1px solid ${l.border}`:"",me(e,s),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=v("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=v("alertWarningMessage","Warning: {0}",this.message.content):n=v("alertInfoMessage","Info: {0}",this.message.content),ga(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,n;const i=this.options.inputBoxStyles,r=(e=i.inputBackground)!==null&&e!==void 0?e:"",a=(t=i.inputForeground)!==null&&t!==void 0?t:"",o=(n=i.inputBorder)!==null&&n!==void 0?n:"";this.element.style.backgroundColor=r,this.element.style.color=a,this.input.style.backgroundColor="inherit",this.input.style.color=a,this.element.style.border=`1px solid ${n3(o,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Rf(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,i=t.selectionEnd,r=t.value;n!==null&&i!==null&&(this.value=r.substr(0,n)+e+r.substr(i),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}};class e2e extends V0t{constructor(e,t,n){const i=v({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),r=` or ⇅ ${i}`,a=` (⇅ ${i})`;super(e,t,n),this._onDidFocus=this._register(new Q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event,this.history=new H0t(n.history,100);const o=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(a)&&this.history.getHistory().length){const s=this.placeholder.endsWith(")")?r:a,l=this.placeholder+s;n.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((s,l)=>{s.forEach(c=>{c.target.textContent||o()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>o()),this.onblur(this.input,()=>{const s=l=>{if(this.placeholder.endsWith(l)){const c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};s(a)||s(r)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",jm(this.value?this.value:v("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,jm(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const $0t=v("defaultLabel","input");class t2e extends $l{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Ir),this.additionalToggles=[],this._onDidOptionChange=this._register(new Q),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Q),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Q),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Q),this._onKeyUp=this._register(new Q),this._onCaseSensitiveKeyDown=this._register(new Q),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Q),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||$0t,this.showCommonFindToggles=!!n.showCommonFindToggles;const i=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",a=n.appendRegexLabel||"",o=n.history||[],s=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new e2e(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:s,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:n.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new Xbe(Object.assign({appendTitle:a,isChecked:!1},n.toggleStyles))),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new Qbe(Object.assign({appendTitle:r,isChecked:!1},n.toggleStyles))),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new Ybe(Object.assign({appendTitle:i,isChecked:!1},n.toggleStyles))),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));const d=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const E=d.indexOf(document.activeElement);if(E>=0){let m=-1;h.equals(17)?m=(E+1)%d.length:h.equals(15)&&(E===0?m=d.length-1:m=E-1),h.equals(9)?(d[E].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),It.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n==null?void 0:n.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(ce(this.inputBox.inputElement,"compositionstart",d=>{this.imeSessionInProgress=!0})),this._register(ce(this.inputBox.inputElement,"compositionend",d=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(const i of this.additionalToggles)i.enable()}disable(){var e,t,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(n=this.caseSensitive)===null||n===void 0||n.disable();for(const i of this.additionalToggles)i.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new pe;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,n,i,r,a,o;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&n!==void 0?n:0)+((r=(i=this.wholeWords)===null||i===void 0?void 0:i.width())!==null&&r!==void 0?r:0)+((o=(a=this.regex)===null||a===void 0?void 0:a.width())!==null&&o!==void 0?o:0)+this.additionalToggles.reduce((s,l)=>s+l.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var Ld;(function(u){u[u.Expanded=0]="Expanded",u[u.Collapsed=1]="Collapsed",u[u.PreserveOrExpanded=2]="PreserveOrExpanded",u[u.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Ld||(Ld={}));var Kf;(function(u){u[u.Unknown=0]="Unknown",u[u.Twistie=1]="Twistie",u[u.Element=2]="Element",u[u.Filter=3]="Filter"})(Kf||(Kf={}));class Ts extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class mee{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function gee(u){return typeof u=="object"&&"visibility"in u&&"data"in u}function Wk(u){switch(u){case!0:return 1;case!1:return 0;default:return u}}function sH(u){return typeof u.collapsible=="boolean"}class K0t{constructor(e,t,n,i={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new RQ,this._onDidChangeCollapseState=new Q,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new Q,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new Q,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Tl(p6e),this.collapseByDefault=typeof i.collapseByDefault>"u"?!1:i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren=typeof i.autoExpandSingleChildren>"u"?!1:i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=$t.empty(),i={}){if(e.length===0)throw new Ts(this.user,"Invalid tree location");i.diffIdentityProvider?this.spliceSmart(i.diffIdentityProvider,e,t,n,i):this.spliceSimple(e,t,n,i)}spliceSmart(e,t,n,i,r,a){var o;i===void 0&&(i=$t.empty()),a===void 0&&(a=(o=r.diffDepth)!==null&&o!==void 0?o:0);const{parentNode:s}=this.getParentNodeWithListIndex(t);if(!s.lastDiffIds)return this.spliceSimple(t,n,i,r);const l=[...i],c=t[t.length-1],d=new $d({getElements:()=>s.lastDiffIds},{getElements:()=>[...s.children.slice(0,c),...l,...s.children.slice(c+n)].map(f=>e.getId(f.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return s.lastDiffIds=void 0,this.spliceSimple(t,n,l,r);const h=t.slice(0,-1),E=(f,p,D)=>{if(a>0)for(let x=0;xD.originalStart-p.originalStart))E(m,g,m-(f.originalStart+f.originalLength)),m=f.originalStart,g=f.modifiedStart-c,this.spliceSimple([...h,m],f.originalLength,$t.slice(l,g,g+f.modifiedLength),r);E(m,g,m)}spliceSimple(e,t,n=$t.empty(),{onDidCreateNode:i,onDidDeleteNode:r,diffIdentityProvider:a}){const{parentNode:o,listIndex:s,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],h=$t.map(n,F=>this.createTreeNode(F,o,o.visible?1:0,l,d,i)),E=e[e.length-1],m=o.children.length>0;let g=0;for(let F=E;F>=0&&Fa.getId(F.element).toString())):o.lastDiffIds=o.children.map(F=>a.getId(F.element).toString()):o.lastDiffIds=void 0;let b=0;for(const F of x)F.visible&&b++;if(b!==0)for(let F=E+f.length;FS+(w.visible?w.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,D-F),this.list.splice(s,F,d)}if(x.length>0&&r){const F=S=>{r(S),S.children.forEach(F)};x.forEach(F)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:x});const k=o.children.length>0;m!==k&&this.setCollapsible(e.slice(0,-1),k);let A=o;for(;A;){if(A.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}A=A.parent}}rerender(e){if(e.length===0)throw new Ts(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:i}=this.getTreeNodeWithListIndex(e);t.visible&&i&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:i}=this.getTreeNodeWithListIndex(e);return n&&i?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);const i={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,i))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsed);const r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){const{node:n,listIndex:i,revealed:r}=this.getTreeNodeWithListIndex(e),a=this._setListNodeCollapseState(n,i,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&a&&!sH(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let o=-1;for(let s=0;s-1){o=-1;break}else o=s;o>-1&&this._setCollapseState([...e,o],t)}return a}_setListNodeCollapseState(e,t,n,i){const r=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!r)return r;const a=e.renderNodeCount,o=this.updateNodeAfterCollapseChange(e),s=a-(t===-1?0:1);return this.list.splice(t+1,s,o.slice(1)),r}_setNodeCollapseState(e,t,n){let i;if(e===this.root?i=!1:(sH(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!sH(t)&&t.recursive)for(const r of e.children)i=this._setNodeCollapseState(r,t,!0)||i;return i}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,i,r,a){const o={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},s=this._filterNode(o,n);o.visibility=s,i&&r.push(o);const l=e.children||$t.empty(),c=i&&s!==0&&!o.collapsed;let d=0,h=1;for(const E of l){const m=this.createTreeNode(E,o,s,c,r,a);o.children.push(m),h+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=d++)}return o.collapsible=o.collapsible||o.children.length>0,o.visibleChildrenCount=d,o.visible=s===2?d>0:s===1,o.visible?o.collapsed||(o.renderNodeCount=h):(o.renderNodeCount=0,i&&r.pop()),a==null||a(o),o}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,i=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}const a=n.length;e.renderNodeCount=e===this.root?0:1;let o=!1;if(!e.collapsed||r!==0){let s=0;for(const l of e.children)o=this._updateNodeAfterFilterChange(l,r,n,i&&!e.collapsed)||o,l.visible&&(l.visibleChildIndex=s++);e.visibleChildrenCount=s}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?o:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-a):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):gee(n)?(e.filterData=n.data,Wk(n.visibility)):(e.filterData=void 0,Wk(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[n,...i]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(i,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[n,...i]=e;if(n<0||n>t.children.length)throw new Ts(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:i,visible:r}=this.getParentNodeWithListIndex(e),a=e[e.length-1];if(a<0||a>t.children.length)throw new Ts(this.user,"Invalid tree location");const o=t.children[a];return{node:o,listIndex:n,revealed:i,visible:r&&o.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,i=!0,r=!0){const[a,...o]=e;if(a<0||a>t.children.length)throw new Ts(this.user,"Invalid tree location");for(let s=0;st.element)),this.data=e}}function lH(u){return u instanceof CA?new W0t(u):u}class G0t{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=ne.None,this.disposables=new pe}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,lH(e),t)}onDragOver(e,t,n,i,r=!0){const a=this.dnd.onDragOver(lH(e),t&&t.element,n,i),o=this.autoExpandNode!==t;if(o&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(o&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=Rm(()=>{const h=this.modelProvider(),E=h.getNodeLocation(t);h.isCollapsed(E)&&h.setCollapsed(E,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!r){const h=typeof a=="boolean"?a:a.accept,E=typeof a=="boolean"?void 0:a.effect;return{accept:h,effect:E,feedback:[n]}}return a}if(a.bubble===1){const h=this.modelProvider(),E=h.getNodeLocation(t),m=h.getParentNodeLocation(E),g=h.getNode(m),f=m&&h.getListIndex(m);return this.onDragOver(e,g,f,i,!1)}const s=this.modelProvider(),l=s.getNodeLocation(t),c=s.getListIndex(l),d=s.getListRenderCount(l);return Object.assign(Object.assign({},a),{feedback:Wa(c,c+d)})}drop(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(lH(e),t&&t.element,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function U0t(u,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new G0t(u,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const n=u(),i=n.getNodeLocation(t),r=n.getParentNodeLocation(i);return n.getNode(r).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}})})}class fee{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var n,i;(i=(n=this.delegate).setDynamicHeight)===null||i===void 0||i.call(n,e.element,t)}}var Gk;(function(u){u.None="none",u.OnHover="onHover",u.Always="always"})(Gk||(Gk={}));class q0t{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new pe,this.onDidChange=Ne.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}}class Uk{constructor(e,t,n,i,r,a={}){var o;this.renderer=e,this.modelProvider=t,this.activeNodes=i,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Uk.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=ne.None,this.disposables=new pe,this.templateId=e.templateId,this.updateOptions(a),Ne.map(n,s=>s.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(o=e.onDidChangeTwistieState)===null||o===void 0||o.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const t=Yo(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[n,i]of this.renderedNodes)this.renderTreeElement(n,i)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==Gk.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[n,i]of this.renderedNodes)this._renderIndentGuides(n,i);if(this.indentGuidesDisposable.dispose(),t){const n=new pe;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=me(e,ve(".monaco-tl-row")),n=me(t,ve(".monaco-tl-indent")),i=me(t,ve(".monaco-tl-twistie")),r=me(t,ve(".monaco-tl-contents")),a=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:i,indentGuidesDisposable:ne.None,templateData:a}}renderElement(e,t,n,i){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,i)}disposeElement(e,t,n,i){var r,a;n.indentGuidesDisposable.dispose(),(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,e,t,n.templateData,i),typeof i=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const n=Uk.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...st.asClassNameArray(we.treeItemExpanded));let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...st.asClassNameArray(we.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Nr(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new pe,i=this.modelProvider();for(;;){const r=i.getNodeLocation(e),a=i.getParentNodeLocation(r);if(!a)break;const o=i.getNode(a),s=ve(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(o)&&s.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(s):t.indent.insertBefore(s,t.indent.firstElementChild),this.renderedIndentGuides.add(o,s),n.add(ft(()=>this.renderedIndentGuides.delete(o,s))),e=o}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach(i=>{const r=n.getNodeLocation(i);try{const a=n.getParentNodeLocation(r);i.collapsible&&i.children.length>0&&!i.collapsed?t.add(i):a&&t.add(n.getNode(a))}catch{}}),this.activeIndentNodes.forEach(i=>{t.has(i)||this.renderedIndentGuides.forEach(i,r=>r.classList.remove("active"))}),t.forEach(i=>{this.activeIndentNodes.has(i)||this.renderedIndentGuides.forEach(i,r=>r.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Su(this.disposables)}}Uk.DefaultIndent=8;class J0t{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new pe,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){const a=this._filter.filter(e,t);if(typeof a=="boolean"?n=a?1:0:gee(a)?n=Wk(a.visibility):n=a,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Kc.Default,visibility:n};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(i)?i:[i];for(const a of r){const o=a&&a.toString();if(typeof o>"u")return{data:Kc.Default,visibility:n};let s;if(this.tree.findMatchType===P3.Contiguous){const l=o.toLowerCase().indexOf(this._lowercasePattern);if(l>-1){s=[Number.MAX_SAFE_INTEGER,0];for(let c=this._lowercasePattern.length;c>0;c--)s.push(l+c-1)}}else s=T3(this._pattern,this._lowercasePattern,0,o,o.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(s)return this._matchCount++,r.length===1?{data:s,visibility:n}:{data:{label:o,score:s},visibility:n}}return this.tree.findMode===s1.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Kc.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Su(this.disposables)}}var s1;(function(u){u[u.Highlight=0]="Highlight",u[u.Filter=1]="Filter"})(s1||(s1={}));var P3;(function(u){u[u.Fuzzy=0]="Fuzzy",u[u.Contiguous=1]="Contiguous"})(P3||(P3={}));let Z0t=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,i,r,a={}){var o,s;this.tree=e,this.view=n,this.filter=i,this.contextViewProvider=r,this.options=a,this._pattern="",this.width=0,this._onDidChangeMode=new Q,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new Q,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new Q,this._onDidChangeOpenState=new Q,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new pe,this.disposables=new pe,this._mode=(o=e.options.defaultFindMode)!==null&&o!==void 0?o:s1.Highlight,this._matchType=(s=e.options.defaultFindMatchType)!==null&&s!==void 0?s:P3.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,n,i;const r=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&r?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:v("not found","No elements found.")}):(n=this.widget)===null||n===void 0||n.showMessage({type:2}):(i=this.widget)===null||i===void 0||i.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===s1.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Kc.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function o0e(u){let e=Kf.Unknown;return dj(u.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Kf.Twistie:dj(u.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Kf.Element:dj(u.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Kf.Filter),{browserEvent:u.browserEvent,element:u.element?u.element.element:null,target:e}}function r8(u,e){e(u),u.children.forEach(t=>r8(t,e))}class cH{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new Q,this.onDidChange=this._onDidChange.event}set(e,t){!(t!=null&&t.__forceEvent)&&di(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const i=this;this._onDidChange.fire({get elements(){return i.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const s=this.createNodeSet(),l=c=>s.delete(c);t.forEach(c=>r8(c,l)),this.set([...s.values()]);return}const n=new Set,i=s=>n.add(this.identityProvider.getId(s.element).toString());t.forEach(s=>r8(s,i));const r=new Map,a=s=>r.set(this.identityProvider.getId(s.element).toString(),s);e.forEach(s=>r8(s,a));const o=[];for(const s of this.nodes){const l=this.identityProvider.getId(s.element).toString();if(!n.has(l))o.push(s);else{const d=r.get(l);d&&d.visible&&o.push(d)}}if(this.nodes.length>0&&o.length===0){const s=this.getFirstViewElementWithTrait();s&&o.push(s)}this._set(o,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Y0t extends jbe{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(Pbe(e.browserEvent.target)||rm(e.browserEvent.target)||k5(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,i=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let r=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,r&&!i&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const a=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,o),r&&i){e.browserEvent.isHandledByList=!0;return}}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}}class Q0t extends Gl{constructor(e,t,n,i,r,a,o,s){super(e,t,n,i,s),this.focusTrait=r,this.selectionTrait=a,this.anchorTrait=o}createMouseController(e){return new Y0t(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;const i=[],r=[];let a;n.forEach((o,s)=>{this.focusTrait.has(o)&&i.push(e+s),this.selectionTrait.has(o)&&r.push(e+s),this.anchorTrait.has(o)&&(a=e+s)}),i.length>0&&super.setFocus(Lm([...super.getFocus(),...i])),r.length>0&&super.setSelection(Lm([...super.getSelection(),...r])),typeof a=="number"&&super.setAnchor(a)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(i=>this.element(i)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(i=>this.element(i)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class u2e{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Ne.filter(Ne.map(this.view.onMouseDblClick,o0e),e=>e.target!==Kf.Filter)}get onPointer(){return Ne.map(this.view.onPointer,o0e)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Ne.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:s1.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:P3.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,i,r={}){var a;this._user=e,this._options=r,this.eventBufferer=new RQ,this.onDidChangeFindOpenState=Ne.None,this.disposables=new pe,this._onWillRefilter=new Q,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new Q;const o=new fee(n),s=new Qre,l=new Qre,c=this.disposables.add(new q0t(l.event)),d=new aX;this.renderers=i.map(f=>new Uk(f,()=>this.model,s.event,c,d,r));for(const f of this.renderers)this.disposables.add(f);let h;r.keyboardNavigationLabelProvider&&(h=new J0t(this,r.keyboardNavigationLabelProvider,r.filter),r=Object.assign(Object.assign({},r),{filter:h}),this.disposables.add(h)),this.focus=new cH(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new cH(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new cH(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new Q0t(e,t,o,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},U0t(()=>this.model,r)),{tree:this})),this.model=this.createModel(e,this.view,r),s.input=this.model.onDidChangeCollapseState;const E=Ne.forEach(this.model.onDidSplice,f=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(f),this.selection.onDidModelSplice(f)})},this.disposables);E(()=>null,null,this.disposables);const m=this.disposables.add(new Q),g=this.disposables.add(new Tl(0));if(this.disposables.add(Ne.any(E,this.focus.onDidChange,this.selection.onDidChange)(()=>{g.trigger(()=>{const f=new Set;for(const p of this.focus.getNodes())f.add(p);for(const p of this.selection.getNodes())f.add(p);m.fire([...f.values()])})})),l.input=m.event,r.keyboardSupport!==!1){const f=Ne.chain(this.view.onKeyDown,p=>p.filter(D=>!rm(D.target)).map(D=>new ln(D)));Ne.chain(f,p=>p.filter(D=>D.keyCode===15))(this.onLeftArrow,this,this.disposables),Ne.chain(f,p=>p.filter(D=>D.keyCode===17))(this.onRightArrow,this,this.disposables),Ne.chain(f,p=>p.filter(D=>D.keyCode===10))(this.onSpace,this,this.disposables)}if((!((a=r.findWidgetEnabled)!==null&&a!==void 0)||a)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){const f=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new Z0t(this,this.model,this.view,h,r.contextViewProvider,f),this.focusNavigationFilter=p=>this.findController.shouldAllowFocus(p),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Ne.None,this.onDidChangeFindMatchType=Ne.None;this.styleElement=N0(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Gk.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Gk.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var n;this.view.layout(e,t),zm(t)&&((n=this.findController)===null||n===void 0||n.layout(t))}style(e){const t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join(` -`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);const i=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(i,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);const i=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(i,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);n!==-1&&this.view.reveal(n,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!0)){const a=this.model.getParentNodeLocation(i);if(!a)return;const o=this.model.getListIndex(a);this.view.reveal(o),this.view.setFocus([o])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!1)){if(!n.children.some(s=>s.visible))return;const[a]=this.view.getFocus(),o=a+1;this.view.reveal(o),this.view.setFocus([o])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,r)}dispose(){Su(this.disposables),this.view.dispose()}}class pee{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new K0t(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(i,r){return n.sorter.compare(i.element,r.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=$t.empty(),n={}){const i=this.getElementLocation(e);this._setChildren(i,this.preserveCollapseState(t),n)}_setChildren(e,t=$t.empty(),n){const i=new Set,r=new Set,a=s=>{var l;if(s.element===null)return;const c=s;if(i.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();r.add(d),this.nodesByIdentity.set(d,c)}(l=n.onDidCreateNode)===null||l===void 0||l.call(n,c)},o=s=>{var l;if(s.element===null)return;const c=s;if(i.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();r.has(d)||this.nodesByIdentity.delete(d)}(l=n.onDidDeleteNode)===null||l===void 0||l.call(n,c)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},n),{onDidCreateNode:a,onDidDeleteNode:o}))}preserveCollapseState(e=$t.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),$t.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){const a=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(a)}if(!n){let a;return typeof t.collapsed>"u"?a=void 0:t.collapsed===Ld.Collapsed||t.collapsed===Ld.PreserveOrCollapsed?a=!0:t.collapsed===Ld.Expanded||t.collapsed===Ld.PreserveOrExpanded?a=!1:a=!!t.collapsed,Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children),collapsed:a})}const i=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible;let r;return typeof t.collapsed>"u"||t.collapsed===Ld.PreserveOrCollapsed||t.collapsed===Ld.PreserveOrExpanded?r=n.collapsed:t.collapsed===Ld.Collapsed?r=!0:t.collapsed===Ld.Expanded?r=!1:r=!!t.collapsed,Object.assign(Object.assign({},t),{collapsible:i,collapsed:r,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Ts(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Ts(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Ts(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n);return this.model.getNode(i).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Ts(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function a8(u){const e=[u.element],t=u.incompressible||!1;return{element:{elements:e,incompressible:t},children:$t.map($t.from(u.children),a8),collapsible:u.collapsible,collapsed:u.collapsed}}function o8(u){const e=[u.element],t=u.incompressible||!1;let n,i;for(;[i,n]=$t.consume($t.from(u.children),2),!(i.length!==1||i[0].incompressible);)u=i[0],e.push(u.element);return{element:{elements:e,incompressible:t},children:$t.map($t.concat(i,n),o8),collapsible:u.collapsible,collapsed:u.collapsed}}function HG(u,e=0){let t;return eHG(n,0)),e===0&&u.element.incompressible?{element:u.element.elements[e],children:t,incompressible:!0,collapsible:u.collapsible,collapsed:u.collapsed}:{element:u.element.elements[e],children:t,collapsible:u.collapsible,collapsed:u.collapsed}}function s0e(u){return HG(u,0)}function n2e(u,e,t){return u.element===e?Object.assign(Object.assign({},u),{children:t}):Object.assign(Object.assign({},u),{children:$t.map($t.from(u.children),n=>n2e(n,e,t))})}const X0t=u=>({getId(e){return e.elements.map(t=>u.getId(t).toString()).join("\0")}});class elt{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new pee(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=$t.empty(),n){const i=n.diffIdentityProvider&&X0t(n.diffIdentityProvider);if(e===null){const m=$t.map(t,this.enabled?o8:a8);this._setChildren(null,m,{diffIdentityProvider:i,diffDepth:1/0});return}const r=this.nodes.get(e);if(!r)throw new Ts(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),o=this.model.getParentNodeLocation(r),s=this.model.getNode(o),l=s0e(a),c=n2e(l,e,t),d=(this.enabled?o8:a8)(c),h=n.diffIdentityProvider?(m,g)=>n.diffIdentityProvider.getId(m)===n.diffIdentityProvider.getId(g):void 0;if(di(d.element.elements,a.element.elements,h)){this._setChildren(r,d.children||$t.empty(),{diffIdentityProvider:i,diffDepth:1});return}const E=s.children.map(m=>m===a?d:m);this._setChildren(s.element,E,{diffIdentityProvider:i,diffDepth:a.depth-s.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,i=$t.map(n,s0e),r=$t.map(i,e?o8:a8);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const i=new Set,r=o=>{for(const s of o.element.elements)i.add(s),this.nodes.set(s,o.element)},a=o=>{for(const s of o.element.elements)i.has(s)||this.nodes.delete(s)};this.model.setChildren(e,t,Object.assign(Object.assign({},n),{onDidCreateNode:r,onDidDeleteNode:a}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Ts(this.user,`Tree element not found: ${e}`);return t}}const tlt=u=>u[u.length-1];class Dee{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new Dee(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function ult(u,e){return{splice(t,n,i){e.splice(t,n,i.map(r=>u.map(r)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function nlt(u,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(u(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(u(t),n)}}})}class ilt{get onDidSplice(){return Ne.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Ne.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Ne.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||tlt;const i=r=>this.elementMapper(r.elements);this.nodeMapper=new mee(r=>new Dee(i,r)),this.model=new elt(e,ult(this.nodeMapper,t),nlt(i,n))}setChildren(e,t=$t.empty(),n={}){this.model.setChildren(e,t,n)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var rlt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};class xee extends u2e{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,i,r={}){super(e,t,n,i,r),this.user=e}setChildren(e,t=$t.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new pee(e,t,n)}}class i2e{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){const r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,i))}disposeElement(e,t,n,i){var r,a,o,s;n.compressedTreeNode?(a=(r=this.renderer).disposeCompressedElements)===null||a===void 0||a.call(r,n.compressedTreeNode,t,n.data,i):(s=(o=this.renderer).disposeElement)===null||s===void 0||s.call(o,e,t,n.data,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}rlt([Ci],i2e.prototype,"compressedTreeNodeProvider",null);function alt(u,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=u().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}class r2e extends xee{constructor(e,t,n,i,r={}){const a=()=>this,o=i.map(s=>new i2e(a,s));super(e,t,n,o,alt(a,r))}setChildren(e,t=$t.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new ilt(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var V4=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function dH(u){return Object.assign(Object.assign({},u),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function VG(u,e){return e.parent?e.parent===u?!0:VG(u,e.parent):!1}function olt(u,e){return u===e||VG(u,e)||VG(e,u)}class vee{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new vee(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class slt{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...st.asClassNameArray(we.treeItemLoading)),!0):(t.classList.remove(...st.asClassNameArray(we.treeItemLoading)),!1)}disposeElement(e,t,n,i){var r,a;(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,this.nodeMapper.map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function l0e(u){return{browserEvent:u.browserEvent,elements:u.elements.map(e=>e.element)}}function c0e(u){return{browserEvent:u.browserEvent,element:u.element&&u.element.element,target:u.target}}class llt extends CA{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function hH(u){return u instanceof CA?new llt(u):u}class clt{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,hH(e),t)}onDragOver(e,t,n,i,r=!0){return this.dnd.onDragOver(hH(e),t&&t.element,n,i)}drop(e,t,n,i){this.dnd.drop(hH(e),t&&t.element,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.dnd.dispose()}}function a2e(u){return u&&Object.assign(Object.assign({},u),{collapseByDefault:!0,identityProvider:u.identityProvider&&{getId(e){return u.identityProvider.getId(e.element)}},dnd:u.dnd&&new clt(u.dnd),multipleSelectionController:u.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return u.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return u.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:u.accessibilityProvider&&Object.assign(Object.assign({},u.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:u.accessibilityProvider.getRole?e=>u.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:u.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=u.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return u.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return u.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:u.accessibilityProvider.getWidgetRole?()=>u.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:u.accessibilityProvider.getAriaLevel&&(e=>u.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:u.accessibilityProvider.getActiveDescendantId&&(e=>u.accessibilityProvider.getActiveDescendantId(e.element))}),filter:u.filter&&{filter(e,t){return u.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:u.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},u.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return u.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof u.expandOnlyOnTwistieClick>"u"?void 0:typeof u.expandOnlyOnTwistieClick!="function"?u.expandOnlyOnTwistieClick:e=>u.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof u.defaultFindVisibility=="number"?u.defaultFindVisibility:typeof u.defaultFindVisibility>"u"?2:u.defaultFindVisibility(e.element)})}function $G(u,e){e(u),u.children.forEach(t=>$G(t,e))}class o2e{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Ne.map(this.tree.onDidChangeFocus,l0e)}get onDidChangeSelection(){return Ne.map(this.tree.onDidChangeSelection,l0e)}get onMouseDblClick(){return Ne.map(this.tree.onMouseDblClick,c0e)}get onPointer(){return Ne.map(this.tree.onPointer,c0e)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,i,r,a={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new Q,this._onDidChangeNodeSlowState=new Q,this.nodeMapper=new mee(o=>new vee(o)),this.disposables=new pe,this.identityProvider=a.identityProvider,this.autoExpandSingleChildren=typeof a.autoExpandSingleChildren>"u"?!1:a.autoExpandSingleChildren,this.sorter=a.sorter,this.collapseByDefault=a.collapseByDefault,this.tree=this.createTree(e,t,n,i,a),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=dH({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,i,r){const a=new fee(n),o=i.map(l=>new slt(l,this.nodeMapper,this._onDidChangeNodeSlowState.event)),s=a2e(r)||{};return new xee(e,t,a,o,s)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return V4(this,void 0,void 0,function*(){this.refreshPromises.forEach(i=>i.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,n=!1,i,r){return V4(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ts(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event));const a=this.getDataNode(e);if(yield this.refreshAndRenderNode(a,t,i,r),n)try{this.tree.rerender(a)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}expand(e,t=!1){return V4(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ts(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const i=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event)),i})}setSelection(e,t){const n=e.map(i=>this.getDataNode(i));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const n=e.map(i=>this.getDataNode(i));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Ts(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,n,i){return V4(this,void 0,void 0,function*(){yield this.refreshNode(e,t,n),this.render(e,n,i)})}refreshNode(e,t,n){return V4(this,void 0,void 0,function*(){let i;if(this.subTreeRefreshPromises.forEach((r,a)=>{!i&&olt(a,e)&&(i=r.then(()=>this.refreshNode(e,t,n)))}),i)return i;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,n)})}doRefreshSubTree(e,t,n){return V4(this,void 0,void 0,function*(){let i;e.refreshPromise=new Promise(r=>i=r),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const r=yield this.doRefreshNode(e,t,n);e.stale=!1,yield gW.settled(r.map(a=>this.doRefreshSubTree(a,t,n)))}finally{i()}})}doRefreshNode(e,t,n){return V4(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let i;if(!e.hasChildren)i=Promise.resolve($t.empty());else{const r=this.doGetChildren(e);if(Gre(r))i=Promise.resolve(r);else{const a=Pm(800);a.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},o=>null),i=r.finally(()=>a.cancel())}}try{const r=yield i;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),dd(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const n=this.dataSource.getChildren(e.element);return Gre(n)?this.processChildren(n):(t=Ui(()=>V4(this,void 0,void 0,function*(){return this.processChildren(yield n)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(zt))}setChildren(e,t,n,i){const r=[...t];if(e.children.length===0&&r.length===0)return[];const a=new Map,o=new Map;for(const c of e.children)if(a.set(c.element,c),this.identityProvider){const d=this.tree.isCollapsed(c);o.set(c.id,{node:c,collapsed:d})}const s=[],l=r.map(c=>{const d=!!this.dataSource.hasChildren(c);if(!this.identityProvider){const g=dH({element:c,parent:e,hasChildren:d});return d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(g.collapsedByDefault=!1,s.push(g)),g}const h=this.identityProvider.getId(c).toString(),E=o.get(h);if(E){const g=E.node;return a.delete(g.element),this.nodes.delete(g.element),this.nodes.set(c,g),g.element=c,g.hasChildren=d,n?E.collapsed?(g.children.forEach(f=>$G(f,p=>this.nodes.delete(p.element))),g.children.splice(0,g.children.length),g.stale=!0):s.push(g):d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(g.collapsedByDefault=!1,s.push(g)),g}const m=dH({element:c,parent:e,id:h,hasChildren:d});return i&&i.viewState.focus&&i.viewState.focus.indexOf(h)>-1&&i.focus.push(m),i&&i.viewState.selection&&i.viewState.selection.indexOf(h)>-1&&i.selection.push(m),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(h)>-1?s.push(m):d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(m.collapsedByDefault=!1,s.push(m)),m});for(const c of a.values())$G(c,d=>this.nodes.delete(d.element));for(const c of l)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&l.length===1&&s.length===0&&(l[0].collapsedByDefault=!1,s.push(l[0])),s}render(e,t,n){const i=e.children.map(a=>this.asTreeElement(a,t)),r=n&&Object.assign(Object.assign({},n),{diffIdentityProvider:n.diffIdentityProvider&&{getId(a){return n.diffIdentityProvider.getId(a.element)}}});this.tree.setChildren(e===this.root?null:e,i,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:n=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?$t.map(e.children,i=>this.asTreeElement(i,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class Cee{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new Cee(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class dlt{constructor(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderCompressedElements(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...st.asClassNameArray(we.treeItemLoading)),!0):(t.classList.remove(...st.asClassNameArray(we.treeItemLoading)),!1)}disposeElement(e,t,n,i){var r,a;(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,this.nodeMapper.map(e),t,n.templateData,i)}disposeCompressedElements(e,t,n,i){var r,a;(a=(r=this.renderer).disposeCompressedElements)===null||a===void 0||a.call(r,this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Su(this.disposables)}}function hlt(u){const e=u&&a2e(u);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return u.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}})})}class Elt extends o2e{constructor(e,t,n,i,r,a,o={}){super(e,t,n,r,a,o),this.compressionDelegate=i,this.compressibleNodeMapper=new mee(s=>new Cee(s)),this.filter=o.filter}createTree(e,t,n,i,r){const a=new fee(n),o=i.map(l=>new dlt(l,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),s=hlt(r)||{};return new r2e(e,t,a,o,s)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const n=h=>this.identityProvider.getId(h).toString(),i=h=>{const E=new Set;for(const m of h){const g=this.tree.getCompressedTreeNode(m===this.root?null:m);if(g.element)for(const f of g.element.elements)E.add(n(f.element))}return E},r=i(this.tree.getSelection()),a=i(this.tree.getFocus());super.render(e,t);const o=this.getSelection();let s=!1;const l=this.getFocus();let c=!1;const d=h=>{const E=h.element;if(E)for(let m=0;m{const n=this.filter.filter(t,1),i=mlt(n);if(i===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return i===1})),super.processChildren(e)}}function mlt(u){return typeof u=="boolean"?u?1:0:gee(u)?Wk(u.visibility):Wk(u)}class glt extends u2e{constructor(e,t,n,i,r,a={}){super(e,t,n,i,a),this.user=e,this.dataSource=r,this.identityProvider=a.identityProvider}createModel(e,t,n){return new pee(e,t,n)}}new Pe("isMac",iu,v("isMac","Whether the operating system is macOS"));new Pe("isLinux",Pa,v("isLinux","Whether the operating system is Linux"));const TP=new Pe("isWindows",na,v("isWindows","Whether the operating system is Windows")),s2e=new Pe("isWeb",dg,v("isWeb","Whether the platform is a web browser"));new Pe("isMacNative",iu&&!dg,v("isMacNative","Whether the operating system is macOS on a non-browser platform"));new Pe("isIOS",Zc,v("isIOS","Whether the operating system is iOS"));new Pe("isMobile",PGe,v("isMobile","Whether the platform is a mobile web browser"));new Pe("isDevelopment",!1,!0);new Pe("productQualityType","",v("productQualityType","Quality type of VS Code"));const l2e="inputFocus";new Pe(l2e,!1,v("inputFocus","Whether keyboard focus is inside an input box"));var A4=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cn=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const J0=Ut("listService");class flt{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new pe,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,n;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new Hbe(N0(),"").style(Tp)),this.lists.some(i=>i.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),Fl(e.onDidFocus(()=>this.setLastFocusedList(e)),ft(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(i=>i!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const qk=new Pe("listScrollAtBoundary","none");Ee.or(qk.isEqualTo("top"),qk.isEqualTo("both"));Ee.or(qk.isEqualTo("bottom"),qk.isEqualTo("both"));const c2e=new Pe("listFocus",!0),NP=new Pe("listSupportsMultiselect",!0),d2e=Ee.and(c2e,Ee.not(l2e)),bee=new Pe("listHasSelectionOrFocus",!1),kee=new Pe("listDoubleSelection",!1),Fee=new Pe("listMultiSelection",!1),PP=new Pe("listSelectionNavigation",!1),plt=new Pe("listSupportsFind",!0),yee=new Pe("treeElementCanCollapse",!1),Dlt=new Pe("treeElementHasParent",!1),Aee=new Pe("treeElementCanExpand",!1),xlt=new Pe("treeElementHasChild",!1),vlt=new Pe("treeFindOpen",!1),h2e="listTypeNavigationMode",E2e="listAutomaticKeyboardNavigation";function RP(u,e){const t=u.createScoped(e.getHTMLElement());return c2e.bindTo(t),t}function IP(u,e){const t=qk.bindTo(u),n=()=>{const i=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;i&&r?t.set("both"):i?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}const Np="workbench.list.multiSelectModifier",s8="workbench.list.openMode",S0="workbench.list.horizontalScrolling",_ee="workbench.list.defaultFindMode",See="workbench.list.typeNavigationMode",vw="workbench.list.keyboardNavigation",Xc="workbench.list.scrollByPage",Bee="workbench.list.defaultFindMatchType",Jk="workbench.tree.indent",Cw="workbench.tree.renderIndentGuides",ed="workbench.list.smoothScrolling",w1="workbench.list.mouseWheelScrollSensitivity",L1="workbench.list.fastScrollSensitivity",bw="workbench.tree.expandMode";function z1(u){return u.getValue(Np)==="alt"}class Clt extends ne{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=z1(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Np)&&(this.useAltAsMultipleSelectionModifier=z1(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Ibe(e)}isSelectionRangeChangeEvent(e){return Obe(e)}}function OP(u,e){var t;const n=u.get(tu),i=u.get(qu),r=new pe;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return i.mightProducePrintableCharacter(o)}},smoothScrolling:!!n.getValue(ed),mouseWheelScrollSensitivity:n.getValue(w1),fastScrollSensitivity:n.getValue(L1),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:r.add(new Clt(n)),keyboardNavigationEventFilter:Flt(i),scrollByPage:!!n.getValue(Xc)}),r]}let KG=class extends Gl{constructor(e,t,n,i,r,a,o,s,l){const c=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!s.getValue(S0),[d,h]=l.invokeFunction(OP,r);super(e,t,n,i,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:c})),this.disposables.add(h),this.contextKeyService=RP(a,this),this.disposables.add(IP(this.contextKeyService,this)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.listDoubleSelection=kee.bindTo(this.contextKeyService),this.listMultiSelection=Fee.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z1(s),this.disposables.add(this.contextKeyService),this.disposables.add(o.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),g=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||g.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),g=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||g.length>0)})),this.disposables.add(s.onDidChangeConfiguration(m=>{m.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(s));let g={};if(m.affectsConfiguration(S0)&&this.horizontalScrolling===void 0){const f=!!s.getValue(S0);g=Object.assign(Object.assign({},g),{horizontalScrolling:f})}if(m.affectsConfiguration(Xc)){const f=!!s.getValue(Xc);g=Object.assign(Object.assign({},g),{scrollByPage:f})}if(m.affectsConfiguration(ed)){const f=!!s.getValue(ed);g=Object.assign(Object.assign({},g),{smoothScrolling:f})}if(m.affectsConfiguration(w1)){const f=s.getValue(w1);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:f})}if(m.affectsConfiguration(L1)){const f=s.getValue(L1);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:f})}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new m2e(this,Object.assign({configurationService:s},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}};KG=A4([cn(5,pt),cn(6,J0),cn(7,tu),cn(8,mt)],KG);let d0e=class extends A0t{constructor(e,t,n,i,r,a,o,s,l){const c=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!s.getValue(S0),[d,h]=l.invokeFunction(OP,r);super(e,t,n,i,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:c})),this.disposables=new pe,this.disposables.add(h),this.contextKeyService=RP(a,this),this.disposables.add(IP(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=z1(s),this.disposables.add(this.contextKeyService),this.disposables.add(o.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(s.onDidChangeConfiguration(m=>{m.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(s));let g={};if(m.affectsConfiguration(S0)&&this.horizontalScrolling===void 0){const f=!!s.getValue(S0);g=Object.assign(Object.assign({},g),{horizontalScrolling:f})}if(m.affectsConfiguration(Xc)){const f=!!s.getValue(Xc);g=Object.assign(Object.assign({},g),{scrollByPage:f})}if(m.affectsConfiguration(ed)){const f=!!s.getValue(ed);g=Object.assign(Object.assign({},g),{smoothScrolling:f})}if(m.affectsConfiguration(w1)){const f=s.getValue(w1);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:f})}if(m.affectsConfiguration(L1)){const f=s.getValue(L1);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:f})}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new m2e(this,Object.assign({configurationService:s},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}dispose(){this.disposables.dispose(),super.dispose()}};d0e=A4([cn(5,pt),cn(6,J0),cn(7,tu),cn(8,mt)],d0e);let h0e=class extends MP{constructor(e,t,n,i,r,a,o,s,l,c){const d=typeof a.horizontalScrolling<"u"?a.horizontalScrolling:!!l.getValue(S0),[h,E]=c.invokeFunction(OP,a);super(e,t,n,i,r,Object.assign(Object.assign({keyboardSupport:!1},h),{horizontalScrolling:d})),this.disposables.add(E),this.contextKeyService=RP(o,this),this.disposables.add(IP(this.contextKeyService,this)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(a.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!a.selectionNavigation),this.listHasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.listDoubleSelection=kee.bindTo(this.contextKeyService),this.listMultiSelection=Fee.bindTo(this.contextKeyService),this.horizontalScrolling=a.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z1(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),this.updateStyles(a.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const g=this.getSelection(),f=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(g.length>0||f.length>0),this.listMultiSelection.set(g.length>1),this.listDoubleSelection.set(g.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const g=this.getSelection(),f=this.getFocus();this.listHasSelectionOrFocus.set(g.length>0||f.length>0)})),this.disposables.add(l.onDidChangeConfiguration(g=>{g.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(l));let f={};if(g.affectsConfiguration(S0)&&this.horizontalScrolling===void 0){const p=!!l.getValue(S0);f=Object.assign(Object.assign({},f),{horizontalScrolling:p})}if(g.affectsConfiguration(Xc)){const p=!!l.getValue(Xc);f=Object.assign(Object.assign({},f),{scrollByPage:p})}if(g.affectsConfiguration(ed)){const p=!!l.getValue(ed);f=Object.assign(Object.assign({},f),{smoothScrolling:p})}if(g.affectsConfiguration(w1)){const p=l.getValue(w1);f=Object.assign(Object.assign({},f),{mouseWheelScrollSensitivity:p})}if(g.affectsConfiguration(L1)){const p=l.getValue(L1);f=Object.assign(Object.assign({},f),{fastScrollSensitivity:p})}Object.keys(f).length>0&&this.updateOptions(f)})),this.navigator=new blt(this,Object.assign({configurationService:l},a)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}dispose(){this.disposables.dispose(),super.dispose()}};h0e=A4([cn(6,pt),cn(7,J0),cn(8,tu),cn(9,mt)],h0e);class wee extends ne{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new Q),this.onDidOpen=this._onDidOpen.event,this._register(Ne.filter(this.widget.onDidChangeSelection,i=>i.browserEvent instanceof KeyboardEvent)(i=>this.onSelectionFromKeyboard(i))),this._register(this.widget.onPointer(i=>this.onPointer(i.element,i.browserEvent))),this._register(this.widget.onMouseDblClick(i=>this.onMouseDblClick(i.element,i.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(s8))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(s8)&&(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(s8))!=="doubleClick")}))):this.openOnSingleClick=(n=t==null?void 0:t.openOnSingleClick)!==null&&n!==void 0?n:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,i=typeof t.pinned=="boolean"?t.pinned:!n,r=!1;this._open(this.getSelectedElement(),n,i,r,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const i=t.button===1,r=!0,a=i,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,a,o,t)}onMouseDblClick(e,t){if(!t)return;const n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;const r=!1,a=!0,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,a,o,t)}_open(e,t,n,i,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:i,element:e,browserEvent:r})}}class m2e extends wee{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class blt extends wee{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class klt extends wee{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function Flt(u){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const n=u.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}let E0e=class extends xee{constructor(e,t,n,i,r,a,o,s,l){const{options:c,getTypeNavigationMode:d,disposable:h}=a.invokeFunction(kA,r);super(e,t,n,i,c),this.disposables.add(h),this.internals=new R3(this,r,d,r.overrideStyles,o,s,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};E0e=A4([cn(5,mt),cn(6,pt),cn(7,J0),cn(8,tu)],E0e);let m0e=class extends r2e{constructor(e,t,n,i,r,a,o,s,l){const{options:c,getTypeNavigationMode:d,disposable:h}=a.invokeFunction(kA,r);super(e,t,n,i,c),this.disposables.add(h),this.internals=new R3(this,r,d,r.overrideStyles,o,s,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};m0e=A4([cn(5,mt),cn(6,pt),cn(7,J0),cn(8,tu)],m0e);let g0e=class extends glt{constructor(e,t,n,i,r,a,o,s,l,c){const{options:d,getTypeNavigationMode:h,disposable:E}=o.invokeFunction(kA,a);super(e,t,n,i,r,d),this.disposables.add(E),this.internals=new R3(this,a,h,a.overrideStyles,s,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};g0e=A4([cn(6,mt),cn(7,pt),cn(8,J0),cn(9,tu)],g0e);let WG=class extends o2e{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,i,r,a,o,s,l,c){const{options:d,getTypeNavigationMode:h,disposable:E}=o.invokeFunction(kA,a);super(e,t,n,i,r,d),this.disposables.add(E),this.internals=new R3(this,a,h,a.overrideStyles,s,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};WG=A4([cn(6,mt),cn(7,pt),cn(8,J0),cn(9,tu)],WG);let f0e=class extends Elt{constructor(e,t,n,i,r,a,o,s,l,c,d){const{options:h,getTypeNavigationMode:E,disposable:m}=s.invokeFunction(kA,o);super(e,t,n,i,r,a,h),this.disposables.add(m),this.internals=new R3(this,o,E,o.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};f0e=A4([cn(7,mt),cn(8,pt),cn(9,J0),cn(10,tu)],f0e);function g2e(u){const e=u.getValue(_ee);if(e==="highlight")return s1.Highlight;if(e==="filter")return s1.Filter;const t=u.getValue(vw);if(t==="simple"||t==="highlight")return s1.Highlight;if(t==="filter")return s1.Filter}function f2e(u){const e=u.getValue(Bee);if(e==="fuzzy")return P3.Fuzzy;if(e==="contiguous")return P3.Contiguous}function kA(u,e){var t;const n=u.get(tu),i=u.get(F4),r=u.get(pt),a=u.get(mt),o=()=>{const E=r.getContextKeyValue(h2e);if(E==="automatic")return qd.Automatic;if(E==="trigger"||r.getContextKeyValue(E2e)===!1)return qd.Trigger;const g=n.getValue(See);if(g==="automatic")return qd.Automatic;if(g==="trigger")return qd.Trigger},s=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(S0),[l,c]=a.invokeFunction(OP,e),d=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue(Cw);return{getTypeNavigationMode:o,disposable:c,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:typeof n.getValue(Jk)=="number"?n.getValue(Jk):void 0,renderIndentGuides:h,smoothScrolling:!!n.getValue(ed),defaultFindMode:g2e(n),defaultFindMatchType:f2e(n),horizontalScrolling:s,scrollByPage:!!n.getValue(Xc),paddingBottom:d,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:n.getValue(bw)==="doubleClick",contextViewProvider:i,findWidgetStyles:r0t})}}let R3=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,i,r,a,o){var s;this.tree=e,this.disposables=[],this.contextKeyService=RP(r,e),this.disposables.push(IP(this.contextKeyService,e)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=plt.bindTo(this.contextKeyService),this.listSupportFindWidget.set((s=t.findWidgetEnabled)!==null&&s!==void 0?s:!0),this.hasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.hasDoubleSelection=kee.bindTo(this.contextKeyService),this.hasMultiSelection=Fee.bindTo(this.contextKeyService),this.treeElementCanCollapse=yee.bindTo(this.contextKeyService),this.treeElementHasParent=Dlt.bindTo(this.contextKeyService),this.treeElementCanExpand=Aee.bindTo(this.contextKeyService),this.treeElementHasChild=xlt.bindTo(this.contextKeyService),this.treeFindOpen=vlt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=z1(o),this.updateStyleOverrides(i);const c=()=>{const h=e.getFocus()[0];if(!h)return;const E=e.getNode(h);this.treeElementCanCollapse.set(E.collapsible&&!E.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(E.collapsible&&E.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},d=new Set;d.add(h2e),d.add(E2e),this.disposables.push(this.contextKeyService,a.register(e),e.onDidChangeSelection(()=>{const h=e.getSelection(),E=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||E.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{const h=e.getSelection(),E=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||E.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),o.onDidChangeConfiguration(h=>{let E={};if(h.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(o)),h.affectsConfiguration(Jk)){const m=o.getValue(Jk);E=Object.assign(Object.assign({},E),{indent:m})}if(h.affectsConfiguration(Cw)&&t.renderIndentGuides===void 0){const m=o.getValue(Cw);E=Object.assign(Object.assign({},E),{renderIndentGuides:m})}if(h.affectsConfiguration(ed)){const m=!!o.getValue(ed);E=Object.assign(Object.assign({},E),{smoothScrolling:m})}if(h.affectsConfiguration(_ee)||h.affectsConfiguration(vw)){const m=g2e(o);E=Object.assign(Object.assign({},E),{defaultFindMode:m})}if(h.affectsConfiguration(See)||h.affectsConfiguration(vw)){const m=n();E=Object.assign(Object.assign({},E),{typeNavigationMode:m})}if(h.affectsConfiguration(Bee)){const m=f2e(o);E=Object.assign(Object.assign({},E),{defaultFindMatchType:m})}if(h.affectsConfiguration(S0)&&t.horizontalScrolling===void 0){const m=!!o.getValue(S0);E=Object.assign(Object.assign({},E),{horizontalScrolling:m})}if(h.affectsConfiguration(Xc)){const m=!!o.getValue(Xc);E=Object.assign(Object.assign({},E),{scrollByPage:m})}if(h.affectsConfiguration(bw)&&t.expandOnlyOnTwistieClick===void 0&&(E=Object.assign(Object.assign({},E),{expandOnlyOnTwistieClick:o.getValue(bw)==="doubleClick"})),h.affectsConfiguration(w1)){const m=o.getValue(w1);E=Object.assign(Object.assign({},E),{mouseWheelScrollSensitivity:m})}if(h.affectsConfiguration(L1)){const m=o.getValue(L1);E=Object.assign(Object.assign({},E),{fastScrollSensitivity:m})}Object.keys(E).length>0&&e.updateOptions(E)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(d)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new klt(e,Object.assign({configurationService:o},t)),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?p6(e):Tp)}dispose(){this.disposables=Su(this.disposables)}};R3=A4([cn(4,pt),cn(5,J0),cn(6,tu)],R3);const ylt=jn.as(Ed.Configuration);ylt.registerConfiguration({id:"workbench",order:7,title:v("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Np]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[v("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),v("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:v({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[s8]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[S0]:{type:"boolean",default:!1,description:v("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Xc]:{type:"boolean",default:!1,description:v("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[Jk]:{type:"number",default:8,minimum:4,maximum:40,description:v("tree indent setting","Controls tree indentation in pixels.")},[Cw]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:v("render tree indent guides","Controls whether the tree should render indent guides.")},[ed]:{type:"boolean",default:!1,description:v("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[w1]:{type:"number",default:1,markdownDescription:v("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[L1]:{type:"number",default:5,markdownDescription:v("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[_ee]:{type:"string",enum:["highlight","filter"],enumDescriptions:[v("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),v("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:v("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[vw]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[v("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),v("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),v("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:v("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:v("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[Bee]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[v("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),v("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:v("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[bw]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[See]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:v("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var GG;(function(u){u[u.PRESERVE=0]="PRESERVE",u[u.LAST=1]="LAST"})(GG||(GG={}));const Pp={Quickaccess:"workbench.contributions.quickaccess"};class Alt{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),ft(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return b1([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}jn.add(Pp.Quickaccess,new Alt);const _lt={ctrlCmd:!1,alt:!1};var Zk;(function(u){u[u.Blur=1]="Blur",u[u.Gesture=2]="Gesture",u[u.Other=3]="Other"})(Zk||(Zk={}));var Ec;(function(u){u[u.NONE=0]="NONE",u[u.FIRST=1]="FIRST",u[u.SECOND=2]="SECOND",u[u.LAST=3]="LAST"})(Ec||(Ec={}));const md=Ut("quickInputService");var Slt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},p0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let UG=class extends ne{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=jn.as(Pp.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var i;const[r,a]=this.getOrInstantiateProvider(e),o=this.visibleQuickAccess,s=o==null?void 0:o.descriptor;if(o&&a&&s===a){e!==a.prefix&&!(n!=null&&n.preserveValue)&&(o.picker.value=e),this.adjustValueSelection(o.picker,a,n);return}if(a&&!(n!=null&&n.preserveValue)){let E;if(o&&s&&s!==a){const m=o.value.substr(s.prefix.length);m&&(E=`${a.prefix}${m}`)}if(!E){const m=r==null?void 0:r.defaultFilterValue;m===GG.LAST?E=this.lastAcceptedPickerValues.get(a):typeof m=="string"&&(E=`${a.prefix}${m}`)}typeof E=="string"&&(e=E)}const l=new pe,c=l.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,a,n),c.placeholder=a==null?void 0:a.placeholder,c.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!o,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(c.itemActivation=(i=n==null?void 0:n.itemActivation)!==null&&i!==void 0?i:Ec.SECOND),c.contextKey=a==null?void 0:a.contextKey,c.filterValue=E=>E.substring(a?a.prefix.length:0);let d;t&&(d=new QN,l.add(Ne.once(c.onWillAccept)(E=>{E.veto(),c.hide()}))),l.add(this.registerPickerListeners(c,r,a,e,n==null?void 0:n.providerOptions));const h=l.add(new vi);if(r&&l.add(r.provide(c,h.token,n==null?void 0:n.providerOptions)),Ne.once(c.onDidHide)(()=>{c.selectedItems.length===0&&h.cancel(),l.dispose(),d==null||d.complete(c.selectedItems.slice(0))}),c.show(),t)return d==null?void 0:d.p}adjustValueSelection(e,t,n){var i;let r;n!=null&&n.preserveValue?r=[e.value.length,e.value.length]:r=[(i=t==null?void 0:t.prefix.length)!==null&&i!==void 0?i:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,i,r){const a=new pe,o=this.visibleQuickAccess={picker:e,descriptor:n,value:i};return a.add(ft(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),a.add(e.onDidChangeValue(s=>{const[l]=this.getOrInstantiateProvider(s);l!==t?this.show(s,{preserveValue:!0,providerOptions:r}):o.value=s})),n&&a.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),a}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};UG=Slt([p0e(0,md),p0e(1,mt)],UG);ae.white.toString(),ae.white.toString();let qG=class extends ne{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new Q),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,i=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=i||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(Zu.addTarget(this._element)),[Me.CLICK,Yu.Tap].forEach(r=>{this._register(ce(this._element,r,a=>{if(!this.enabled){It.stop(a);return}this._onDidClick.fire(a)}))}),this._register(ce(this._element,Me.KEY_DOWN,r=>{const a=new ln(r);let o=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(r),o=!0):a.equals(9)&&(this._element.blur(),o=!0),o&&It.stop(a,!0)})),this._register(ce(this._element,Me.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(ce(this._element,Me.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register(y1(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let n of im(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;const i=document.createElement("span");i.textContent=n,t.push(i)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||nm(this._label)&&nm(e)&&qot(this._label,e))return;this._element.classList.add("monaco-text-button");const n=this.options.supportShortLabel?this._labelElement:this._element;if(nm(e)){const i=BP(e,{inline:!0});i.dispose();const r=(t=i.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(r){const a=e6e(r,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=a}else Pr(n)}else this.options.supportIcons?Pr(n,...this.getContentElements(e)):n.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=lst(e)),this._label=e}get label(){return this._label}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}};class JG{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=me(e,ve(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=y3(this.countFormat,this.count),this.element.title=y3(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const D0e="done",x0e="active",EH="infinite",mH="infinite-long-running",v0e="discrete";class jP extends ne{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new Hu(()=>us(this.element),0)),this.longRunningScheduler=this._register(new Hu(()=>this.infiniteLongRunning(),jP.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(t==null?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(x0e,EH,mH,v0e),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(D0e),this.element.classList.contains(EH)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(v0e,D0e,mH),this.element.classList.add(x0e,EH),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(mH)}getContainer(){return this.element}}jP.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const Blt=ve;class wlt extends ne{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=r=>ce(this.findInput.inputBox.inputElement,Me.KEY_DOWN,a=>{r(new ln(a))}),this.onMouseDown=r=>ce(this.findInput.inputBox.inputElement,Me.MOUSE_DOWN,a=>{r(new D0(a))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=me(this.parent,Blt(".quick-input-box")),this.findInput=this._register(new t2e(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));const i=this.findInput.inputBox.inputElement;i.role="combobox",i.ariaHasPopup="menu",i.ariaAutoComplete="list",i.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===si.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===si.Info?1:e===si.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===si.Info?1:e===si.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class am{constructor(e,t){var n;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=t==null?void 0:t.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=me(e,ve("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",i){e||(e=""),i&&(e=am.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&$s(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const n of this.highlights){if(n.end===n.start)continue;if(t{i=r===`\r -`?-1:0,a+=n;for(const o of t)o.end<=a||(o.start>=a&&(o.start+=i),o.end>=a&&(o.end+=i));return n+=i,"⏎"})}}class gH{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class kw extends ne{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new gH(me(e,ve(".monaco-icon-label")))),this.labelContainer=me(this.domNode.element,ve(".monaco-icon-label-container"));const n=me(this.labelContainer,ve("span.monaco-icon-name-container"));t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new Mlt(n,!!t.supportIcons):this.nameNode=new Llt(n),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){const i=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";if(n&&(n.extraClasses&&i.push(...n.extraClasses),n.italic&&i.push("italic"),n.strikethrough&&i.push("strikethrough"),n.disabledCommand&&r.push("disabled"),n.title&&(a+=n.title)),this.domNode.className=i.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=r.join(" "),this.setupHover(n!=null&&n.descriptionTitle?this.labelContainer:this.element,n==null?void 0:n.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){const o=this.getOrCreateDescriptionNode();o instanceof am?(o.set(t||"",n?n.descriptionMatches:void 0,void 0,n==null?void 0:n.labelEscapeNewLines),this.setupHover(o.element,n==null?void 0:n.descriptionTitle)):(o.textContent=t&&(n!=null&&n.labelEscapeNewLines)?am.escapeNewLines(t,[]):t||"",this.setupHover(o.element,(n==null?void 0:n.descriptionTitle)||""),o.empty=!t)}}setupHover(e,t){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Yot(e,t);else{const i=Tbe(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new gH(me(this.labelContainer,ve("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new am(me(t.element,ve("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new gH(me(t.element,ve("span.label-description"))))}return this.descriptionNode}}class Llt{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=me(this.container,ve("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{const r={start:n,end:n+i.length},a=t.map(o=>aa.intersect(r,o)).filter(o=>!aa.isEmpty(o)).map(({start:o,end:s})=>({start:o-n,end:s-n}));return n=r.end+e.length,a})}class Mlt{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new am(me(this.container,ve("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=(t==null?void 0:t.separator)||"/",i=zlt(e,n,t==null?void 0:t.matches);for(let r=0;r{const u=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:u,collatorIsNumeric:u.resolvedOptions().numeric}});function Nlt(u,e,t=!1){const n=u||"",i=e||"",r=C0e.value.collator.compare(n,i);return C0e.value.collatorIsNumeric&&r===0&&n!==i?ni.length)return 1}return 0}var Ilt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};class p2e{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Ilt([Ci],p2e.prototype,"toString",null);const Olt=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function jlt(u){const e=[];let t=0,n;for(;n=Olt.exec(u);){n.index-t>0&&e.push(u.substring(t,n.index));const[,i,r,,a]=n;a?e.push({label:i,href:r,title:a}):e.push({label:i,href:r}),t=n.index+n[0].length}return t{QJe(E)&&It.stop(E,!0),t.callback(r.href)},l=t.disposables.add(new Zt(o,Me.CLICK)).event,c=t.disposables.add(new Zt(o,Me.KEY_DOWN)).event,d=Ne.chain(c,E=>E.filter(m=>{const g=new ln(m);return g.equals(10)||g.equals(3)}));t.disposables.add(Zu.addTarget(o));const h=t.disposables.add(new Zt(o,Yu.Tap)).event;Ne.any(l,h,d)(s,null,t.disposables),e.appendChild(o)}}var D2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},b0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const ac=ve;class $lt{constructor(e,t,n,i,r,a,o){var s,l,c;this._checked=!1,this._hidden=!1,this.hasCheckbox=i,this.index=n,this.fireButtonTriggered=r,this.fireSeparatorButtonTriggered=a,this._onChecked=o,this.onChecked=i?Ne.map(Ne.filter(this._onChecked.event,d=>d.listElement===this),d=>d.checked):Ne.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(s=this.item.highlights)===null||s===void 0?void 0:s.label,this._descriptionHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.description,this._detailHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.detail,this.saneTooltip=this.item.tooltip),this._init=new mg(()=>{var d;const h=(d=e.label)!==null&&d!==void 0?d:"",E=yb(h).text.trim(),m=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(g=>Uot(g)).filter(g=>!!g).join(", ");return{saneLabel:h,saneSortLabel:E,saneAriaLabel:m}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class yA{constructor(e){this.themeService=e}get templateId(){return yA.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=me(e,ac(".quick-input-list-entry"));const n=me(t.entry,ac("label.quick-input-list-label"));t.toDisposeTemplate.push(xi(n,Me.CLICK,l=>{t.checkbox.offsetParent||l.preventDefault()})),t.checkbox=me(n,ac("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(xi(t.checkbox,Me.CHANGE,l=>{t.element.checked=t.checkbox.checked}));const i=me(n,ac(".quick-input-list-rows")),r=me(i,ac(".quick-input-list-row")),a=me(i,ac(".quick-input-list-row"));t.label=new kw(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=l6e(t.label.element,ac(".quick-input-list-icon"));const o=me(r,ac(".quick-input-list-entry-keybinding"));t.keybinding=new FA(o,Is);const s=me(a,ac(".quick-input-list-label-meta"));return t.detail=new kw(s,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=me(t.entry,ac(".quick-input-list-separator")),t.actionBar=new O0(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){var i,r,a,o;n.element=e,e.element=(i=n.entry)!==null&&i!==void 0?i:void 0;const s=e.item?e.item:e.separator;n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(m=>n.checkbox.checked=m));const{labelHighlights:l,descriptionHighlights:c,detailHighlights:d}=e;if(!((r=e.item)===null||r===void 0)&&r.iconPath){const m=iv(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(a=e.item.iconPath.light)!==null&&a!==void 0?a:e.item.iconPath.dark,g=dt.revive(m);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=Nm(g)}else n.icon.style.backgroundImage="",n.icon.className=!((o=e.item)===null||o===void 0)&&o.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";const h={matches:l||[],descriptionTitle:e.saneDescription,descriptionMatches:c||[],labelEscapeNewLines:!0};s.type!=="separator"?(h.extraClasses=s.iconClasses,h.italic=s.italic,h.strikethrough=s.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item")):n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(e.saneLabel,e.saneDescription,h),n.keybinding.set(s.type==="separator"?void 0:s.keybinding),e.saneDetail?(n.detail.element.style.display="",n.detail.setLabel(e.saneDetail,void 0,{matches:d,title:e.saneDetail,labelEscapeNewLines:!0})):n.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const E=s.buttons;E&&E.length?(n.actionBar.push(E.map((m,g)=>{let f=m.iconClass||(m.iconPath?ZG(m.iconPath):void 0);return m.alwaysVisible&&(f=f?`${f} always-visible`:"always-visible"),{id:`id-${g}`,class:f,enabled:!0,label:"",tooltip:m.tooltip||"",run:()=>{s.type!=="separator"?e.fireButtonTriggered({button:m,item:s}):e.fireSeparatorButtonTriggered({button:m,separator:s})}}}),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=Su(n.toDisposeElement),n.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=Su(e.toDisposeElement),e.toDisposeTemplate=Su(e.toDisposeTemplate)}}yA.ID="listelement";class Klt{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return yA.ID}}var hr;(function(u){u[u.First=1]="First",u[u.Second=2]="Second",u[u.Last=3]="Last",u[u.Next=4]="Next",u[u.Previous=5]="Previous",u[u.NextPage=6]="NextPage",u[u.PreviousPage=7]="PreviousPage"})(hr||(hr={}));class Lee{constructor(e,t,n,i){this.parent=e,this.options=n,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new Q,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new Q,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new Q,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new Q,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new Q,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new Q,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new Q,this.onKeyDown=this._onKeyDown.event,this._onLeave=new Q,this.onLeave=this._onLeave.event,this._listElementChecked=new Q,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=me(this.parent,ac(".quick-input-list"));const r=new Klt,a=new Ult;if(this.list=n.createList("QuickInput",this.container,r,[new yA(i)],{identityProvider:{getId:o=>{var s,l,c,d,h,E,m,g;return(g=(E=(d=(l=(s=o.item)===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:(c=o.item)===null||c===void 0?void 0:c.label)!==null&&d!==void 0?d:(h=o.separator)===null||h===void 0?void 0:h.id)!==null&&E!==void 0?E:(m=o.separator)===null||m===void 0?void 0:m.label)!==null&&g!==void 0?g:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:a}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(o=>{const s=new ln(o);switch(s.keyCode){case 10:this.toggleCheckbox();break;case 31:(iu?o.metaKey:o.ctrlKey)&&this.list.setFocus(Wa(this.list.length));break;case 16:{const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break}case 18:{const l=this.list.getFocus();l.length===1&&l[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(s)})),this.disposables.push(this.list.onMouseDown(o=>{o.browserEvent.button!==2&&o.browserEvent.preventDefault()})),this.disposables.push(ce(this.container,Me.CLICK,o=>{(o.x||o.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(o=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(o=>{typeof o.index=="number"&&(o.browserEvent.preventDefault(),this.list.setSelection([o.index]))})),n.hoverDelegate){const o=new D6e(n.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(s=>b0e(this,void 0,void 0,function*(){var l;if(s.browserEvent.target instanceof HTMLAnchorElement){o.cancel();return}if(!(!(s.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&Qr(s.browserEvent.relatedTarget,(l=s.element)===null||l===void 0?void 0:l.element)))try{yield o.trigger(()=>b0e(this,void 0,void 0,function*(){s.element&&this.showHover(s.element)}))}catch(c){if(!dd(c))throw c}}))),this.disposables.push(this.list.onMouseOut(s=>{var l;Qr(s.browserEvent.relatedTarget,(l=s.element)===null||l===void 0?void 0:l.element)||o.cancel()})),this.disposables.push(o)}this.disposables.push(this._listElementChecked.event(o=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Ne.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return Ne.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,i=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Su(this.elementDisposables);const t=a=>this.fireButtonTriggered(a),n=a=>this.fireSeparatorButtonTriggered(a);this.inputElements=e;const i=new Map,r=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((a,o,s)=>{var l;const c=s>0?e[s-1]:void 0;if(o.type==="separator"&&!o.buttons)return a;const d=new $lt(o,c,s,r,t,n,this._listElementChecked),h=a.length;return a.push(d),i.set((l=d.item)!==null&&l!==void 0?l:d.separator,h),a},[]),this.elementsToIndexes=i,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const n of e)t.add(n);for(const n of this.elements)n.checked=t.has(n.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===hr.Second&&this.list.length<2&&(e=hr.First),e){case hr.First:this.list.scrollTop=0,this.list.focusFirst(void 0,n=>!!n.item);break;case hr.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,n=>!!n.item);break;case hr.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,n=>!!n.item);break;case hr.Next:{this.list.focusNext(void 0,!0,void 0,i=>!!i.item);const n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case hr.Previous:{this.list.focusPrevious(void 0,!0,void 0,i=>!!i.item);const n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case hr.NextPage:this.list.focusNextPage(void 0,n=>!!n.item);break;case hr.PreviousPage:this.list.focusPreviousPage(void 0,n=>!!n.item);break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,n,i;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((n=(t=this.options.hoverDelegate).onDidHideHover)===null||n===void 0||n.call(t),(i=this._lastHover)===null||i===void 0||i.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:r=>{this.options.linkOpenerDelegate(r)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const r=i.index&&this.inputElements[i.index-1];i.item&&(i.separator=r&&r.type==="separator"&&!r.buttons?r:void 0)});else{let i;this.elements.forEach(r=>{var a,o,s,l;let c;this.matchOnLabelMode==="fuzzy"?c=this.matchOnLabel&&(a=tH(e,yb(r.saneLabel)))!==null&&a!==void 0?a:void 0:c=this.matchOnLabel&&(o=Wlt(t,yb(r.saneLabel)))!==null&&o!==void 0?o:void 0;const d=this.matchOnDescription&&(s=tH(e,yb(r.saneDescription||"")))!==null&&s!==void 0?s:void 0,h=this.matchOnDetail&&(l=tH(e,yb(r.saneDetail||"")))!==null&&l!==void 0?l:void 0;if(c||d||h?(r.labelHighlights=c,r.descriptionHighlights=d,r.detailHighlights=h,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=r.item?!r.item.alwaysShow:!0),r.item?r.separator=void 0:r.separator&&(r.hidden=!0),!this.sortByLabel){const E=r.index&&this.inputElements[r.index-1];i=E&&E.type==="separator"?E:i,i&&!r.hidden&&(r.separator=i,i=void 0)}})}const n=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();n.sort((r,a)=>Glt(r,a,i))}return this.elementsToIndexes=n.reduce((i,r,a)=>{var o;return i.set((o=r.item)!==null&&o!==void 0?o:r.separator,a),i},new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Su(this.elementDisposables),this.disposables=Su(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(e!=null&&e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const n=new pe;n.add(this.list.onDidChangeFocus(i=>{i.indexes.length&&this.showHover(i.elements[0])})),this._lastHover&&n.add(this._lastHover),this._toggleHover=n,this.elementDisposables.push(this._toggleHover)}}D2e([Ci],Lee.prototype,"onDidChangeFocus",null);D2e([Ci],Lee.prototype,"onDidChangeSelection",null);function Wlt(u,e){const{text:t,iconOffsets:n}=e;if(!n||n.length===0)return k0e(u,t);const i=tA(t," "),r=t.length-i.length,a=k0e(u,i);if(a)for(const o of a){const s=n[o.start+r]+r;o.start+=s,o.end+=s}return a}function k0e(u,e){const t=e.toLowerCase().indexOf(u.toLowerCase());return t!==-1?[{start:t,end:t+u.length}]:null}function Glt(u,e,t){const n=u.labelHighlights||[],i=e.labelHighlights||[];return n.length&&!i.length?-1:!n.length&&i.length?1:n.length===0&&i.length===0?0:Plt(u.saneSortLabel,e.saneSortLabel,t)}class Ult{getWidgetAriaLabel(){return v("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var F0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const YG={iconClass:st.asClassName(we.quickInputBack),tooltip:v("quickInput.back","Back"),handle:-1};class AA extends ne{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=AA.noPromptMessage,this._severity=si.Ignore,this.onDidTriggerButtonEmitter=this._register(new Q),this.onDidHideEmitter=this._register(new Q),this.onDisposeEmitter=this._register(new Q),this.visibleDisposables=this._register(new pe),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Zc;this._ignoreFocusOut=e&&!Zc,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Zk.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const n=this.getTitle();n&&this.ui.title.textContent!==n?this.ui.title.textContent=n:!n&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?Pr(this.ui.widget,this._widget):Pr(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Vl,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const a=this.buttons.filter(s=>s===YG);this.ui.leftActionBar.push(a.map((s,l)=>{const c=new ro(`id-${l}`,"",s.iconClass||ZG(s.iconPath),!0,()=>F0e(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(s)}));return c.tooltip=s.tooltip||"",c}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const o=this.buttons.filter(s=>s!==YG);this.ui.rightActionBar.push(o.map((s,l)=>{const c=new ro(`id-${l}`,"",s.iconClass||ZG(s.iconPath),!0,()=>F0e(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(s)}));return c.tooltip=s.tooltip||"",c}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const a=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(o=>o instanceof x6))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=a}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const r=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==r&&(this._lastValidationMessage=r,Pr(this.ui.message),Vlt(r,this.ui.message,{callback:a=>{this.ui.linkOpenerDelegate(a)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?v("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==si.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}AA.noPromptMessage=v("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Yk extends AA{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new Q),this.onWillAcceptEmitter=this._register(new Q),this.onDidAcceptEmitter=this._register(new Q),this.onDidCustomEmitter=this._register(new Q),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=Ec.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new Q),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new Q),this.onDidTriggerItemButtonEmitter=this._register(new Q),this.onDidTriggerSeparatorButtonEmitter=this._register(new Q),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?_lt:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(hr.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(hr.Next),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(hr.Previous):this.ui.list.focus(hr.Last),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 12:this.ui.list.focus(hr.NextPage),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 11:this.ui.list.focus(hr.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(hr.First),It.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(hr.Last),It.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&di(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&di(e,this._selectedItems,(n,i)=>n===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&di(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ce(this.ui.container,Me.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ln(e),n=t.keyCode;this._quickNavigate.keybindings.some(a=>{const o=a.getChords();return o.length>1?!1:o[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(o[0].altKey&&n===6||o[0].ctrlKey&&n===5||o[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let i=this.ariaLabel;if(!i&&n.inputBox&&(i=this.placeholder||Yk.DEFAULT_ARIA_LABEL,this.title&&(i+=` - ${this.title}`)),this.ui.list.ariaLabel!==i&&(this.ui.list.ariaLabel=i??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Ec.NONE:this._itemActivation=Ec.FIRST;break;case Ec.SECOND:this.ui.list.focus(hr.Second),this._itemActivation=Ec.FIRST;break;case Ec.LAST:this.ui.list.focus(hr.Last),this._itemActivation=Ec.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(hr.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Yk.DEFAULT_ARIA_LABEL=v("quickInputBox.ariaLabel","Type to narrow down results.");class qlt extends AA{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new Q),this.onDidAcceptEmitter=this._register(new Q),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const Go=ve;class HP extends ne{constructor(e,t){super(),this.options=e,this.themeService=t,this.enabled=!0,this.onDidAcceptEmitter=this._register(new Q),this.onDidCustomEmitter=this._register(new Q),this.onDidTriggerButtonEmitter=this._register(new Q),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new Q),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new Q),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(ce(window,Me.KEY_DOWN,e,!0)),this._register(ce(window,Me.KEY_UP,e,!0)),this._register(ce(window,Me.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=me(this.parentElement,Go(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=N0(e),n=me(e,Go(".quick-input-titlebar")),i=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,r=this._register(new O0(n,i));r.domNode.classList.add("quick-input-left-action-bar");const a=me(n,Go(".quick-input-title")),o=this._register(new O0(n,i));o.domNode.classList.add("quick-input-right-action-bar");const s=me(e,Go(".quick-input-header")),l=me(s,Go("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",v("quickInput.checkAll","Toggle all checkboxes")),this._register(xi(l,Me.CHANGE,y=>{const _=l.checked;N.setAllVisibleChecked(_)})),this._register(ce(l,Me.CLICK,y=>{(y.x||y.y)&&E.setFocus()}));const c=me(s,Go(".quick-input-description")),d=me(s,Go(".quick-input-and-message")),h=me(d,Go(".quick-input-filter")),E=this._register(new wlt(h,this.styles.inputBox,this.styles.toggle));E.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=me(h,Go(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const g=new JG(m,{countFormat:v({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=me(h,Go(".quick-input-count"));f.setAttribute("aria-live","polite");const p=new JG(f,{countFormat:v({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),D=me(s,Go(".quick-input-action")),x=this._register(new qG(D,this.styles.button));x.label=v("ok","OK"),this._register(x.onDidClick(y=>{this.onDidAcceptEmitter.fire()}));const b=me(s,Go(".quick-input-action")),k=this._register(new qG(b,this.styles.button));k.label=v("custom","Custom"),this._register(k.onDidClick(y=>{this.onDidCustomEmitter.fire()}));const A=me(d,Go(`#${this.idPrefix}message.quick-input-message`)),F=this._register(new jP(e,this.styles.progressBar));F.getContainer().classList.add("quick-input-progress");const S=me(e,Go(".quick-input-html-widget"));S.tabIndex=-1;const w=me(e,Go(".quick-input-description")),z=this.idPrefix+"list",N=this._register(new Lee(e,z,this.options,this.themeService));E.setAttribute("aria-controls",z),this._register(N.onDidChangeFocus(()=>{var y;E.setAttribute("aria-activedescendant",(y=N.getActiveDescendant())!==null&&y!==void 0?y:"")})),this._register(N.onChangedAllVisibleChecked(y=>{l.checked=y})),this._register(N.onChangedVisibleCount(y=>{g.setCount(y)})),this._register(N.onChangedCheckedCount(y=>{p.setCount(y)})),this._register(N.onLeave(()=>{setTimeout(()=>{E.setFocus(),this.controller instanceof Yk&&this.controller.canSelectMany&&N.clearFocus()},0)}));const O=y1(e);return this._register(O),this._register(ce(e,Me.FOCUS,y=>{Qr(y.relatedTarget,e)||(this.previousFocusElement=y.relatedTarget instanceof HTMLElement?y.relatedTarget:void 0)},!0)),this._register(O.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Zk.Blur),this.previousFocusElement=void 0})),this._register(ce(e,Me.FOCUS,y=>{E.setFocus()})),this._register(xi(e,Me.KEY_DOWN,y=>{if(!Qr(y.target,S))switch(y.keyCode){case 3:It.stop(y,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:It.stop(y,!0),this.hide(Zk.Gesture);break;case 2:if(!y.altKey&&!y.ctrlKey&&!y.metaKey){const _=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(e.classList.contains("show-checkboxes")?_.push("input"):_.push("input[type=text]"),this.getUI().list.isDisplayed()&&_.push(".monaco-list"),this.getUI().message&&_.push(".quick-input-message a"),this.getUI().widget){if(Qr(y.target,this.getUI().widget))break;_.push(".quick-input-html-widget")}const L=e.querySelectorAll(_.join(", "));y.shiftKey&&y.target===L[0]?(It.stop(y,!0),N.clearFocus()):!y.shiftKey&&Qr(y.target,L[L.length-1])&&(It.stop(y,!0),L[0].focus())}break;case 10:y.ctrlKey&&(It.stop(y,!0),this.getUI().list.toggleHover());break}})),this.ui={container:e,styleSheet:t,leftActionBar:r,titleBar:n,title:a,description1:w,description2:c,widget:S,rightActionBar:o,checkAll:l,inputContainer:d,filterContainer:h,inputBox:E,visibleCountContainer:m,visibleCount:g,countContainer:f,count:p,okContainer:D,ok:x,message:A,customButtonContainer:b,customButton:k,list:N,progressBar:F,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:y=>this.show(y),hide:()=>this.hide(),setVisibilities:y=>this.setVisibilities(y),setEnabled:y=>this.setEnabled(y),setContextKey:y=>this.options.setContextKey(y),linkOpenerDelegate:y=>this.options.linkOpenerDelegate(y)},this.updateStyles(),this.ui}pick(e,t={},n=Kt.None){return new Promise((i,r)=>{let a=c=>{var d;a=i,(d=t.onKeyMods)===null||d===void 0||d.call(t,o.keyMods),i(c)};if(n.isCancellationRequested){a(void 0);return}const o=this.createQuickPick();let s;const l=[o,o.onDidAccept(()=>{if(o.canSelectMany)a(o.selectedItems.slice()),o.hide();else{const c=o.activeItems[0];c&&(a(c),o.hide())}}),o.onDidChangeActive(c=>{const d=c[0];d&&t.onDidFocus&&t.onDidFocus(d)}),o.onDidChangeSelection(c=>{if(!o.canSelectMany){const d=c[0];d&&(a(d),o.hide())}}),o.onDidTriggerItemButton(c=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},c),{removeItem:()=>{const d=o.items.indexOf(c.item);if(d!==-1){const h=o.items.slice(),E=h.splice(d,1),m=o.activeItems.filter(f=>f!==E[0]),g=o.keepScrollPosition;o.keepScrollPosition=!0,o.items=h,m&&(o.activeItems=m),o.keepScrollPosition=g}}}))),o.onDidTriggerSeparatorButton(c=>{var d;return(d=t.onDidTriggerSeparatorButton)===null||d===void 0?void 0:d.call(t,c)}),o.onDidChangeValue(c=>{s&&!c&&(o.activeItems.length!==1||o.activeItems[0]!==s)&&(o.activeItems=[s])}),n.onCancellationRequested(()=>{o.hide()}),o.onDidHide(()=>{Su(l),a(void 0)})];o.title=t.title,o.canSelectMany=!!t.canPickMany,o.placeholder=t.placeHolder,o.ignoreFocusOut=!!t.ignoreFocusLost,o.matchOnDescription=!!t.matchOnDescription,o.matchOnDetail=!!t.matchOnDetail,o.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,o.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,o.quickNavigate=t.quickNavigate,o.hideInput=!!t.hideInput,o.contextKey=t.contextKey,o.busy=!0,Promise.all([e,t.activeItem]).then(([c,d])=>{s=d,o.busy=!1,o.items=c,o.canSelectMany&&(o.selectedItems=c.filter(h=>h.type!=="separator"&&h.picked)),s&&(o.activeItems=[s])}),o.show(),Promise.resolve(e).then(void 0,c=>{r(c),o.hide()})})}createQuickPick(){const e=this.getUI();return new Yk(e)}createInputBox(){const e=this.getUI();return new qlt(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n==null||n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",Pr(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(si.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Pr(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const i=this.options.backKeybindingLabel();YG.tooltip=i?v("quickInput.backWithKeybinding","Back ({0})",i):v("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,n,i;const r=this.controller;if(!r)return;const a=!Qr(document.activeElement,(n=(t=this.ui)===null||t===void 0?void 0:t.container)!==null&&n!==void 0?n:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!a){let o=this.previousFocusElement;for(;o&&!o.offsetParent;)o=(i=o.parentElement)!==null&&i!==void 0?i:void 0;o!=null&&o.offsetParent?(o.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}r.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,HP.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:i,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=i?`1px solid ${i}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list);const a=[];this.styles.pickerGroup.pickerGroupBorder&&a.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&a.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&a.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(a.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&a.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&a.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&a.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&a.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&a.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),a.push("}"));const o=a.join(` -`);o!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=o)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}HP.MAX_WIDTH=600;var Jlt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},S9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let QG=class extends Stt{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(UG))),this._quickAccess}constructor(e,t,n,i){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=i,this._onShow=this._register(new Q),this._onHide=this._register(new Q),this.contexts=new Map}createController(e=this.layoutService,t){const n={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(a=>{a.get(vs).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(r,a,o,s,l)=>this.instantiationService.createInstance(KG,r,a,o,s,l),styles:this.computeStyles()},i=this._register(new HP(Object.assign(Object.assign({},n),t),this.themeService));return i.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout(r=>i.layout(r,e.offset.quickPickTop))),this._register(i.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(i.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),i}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Pe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=Kt.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Re(moe),quickInputForeground:Re(zXe),quickInputTitleBackground:Re(MXe),widgetBorder:Re(fX),widgetShadow:Re(t1)},inputBox:dw,toggle:cw,countBadge:$be,button:n0t,progressBar:i0t,keybindingLabel:u0t,list:p6({listBackground:moe,listFocusBackground:jf,listFocusForeground:Of,listInactiveFocusForeground:Of,listInactiveSelectionIconForeground:E5,listInactiveFocusBackground:jf,listFocusOutline:En,listInactiveFocusOutline:En}),pickerGroup:{pickerGroupBorder:Re(TXe),pickerGroupForeground:Re(X6e)}}}};QG=Jlt([S9(0,mt),S9(1,pt),S9(2,sr),S9(3,f6)],QG);var x2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},A5=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let XG=class extends QG{constructor(e,t,n,i,r){super(t,n,i,new rG(e.getContainerDomNode(),r)),this.host=void 0;const a=gv.get(e);if(a){const o=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return o.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};XG=x2e([A5(1,mt),A5(2,pt),A5(3,sr),A5(4,Cu)],XG);let eU=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance(XG,e);this.mapEditorToService.set(e,t),Mm(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},n=Kt.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};eU=x2e([A5(0,mt),A5(1,Cu)],eU);class gv{static get(e){return e.getContribution(gv.ID)}constructor(e){this.editor=e,this.widget=new VP(this.editor)}dispose(){this.widget.dispose()}}gv.ID="editor.controller.quickInput";class VP{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return VP.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}VP.ID="editor.contrib.quickInputWidget";fu(gv.ID,gv,4);class Zlt{constructor(e,t,n,i,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=r}}function Ylt(u){if(!u||!Array.isArray(u))return[];const e=[];let t=0;for(let n=0,i=u.length;n{const h=nct(c.token,d.token);return h!==0?h:c.index-d.index});let t=0,n="000000",i="ffffff";for(;u.length>=1&&u[0].token==="";){const c=u.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(i=c.background)}const r=new ect;for(const c of e)r.getId(c);const a=r.getId(n),o=r.getId(i),s=new zee(t,a,o),l=new Mee(s);for(let c=0,d=u.length;c"u"){const i=this._match(t),r=uct(t);n=(i.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const tct=/\b(comment|string|regex|regexp)\b/;function uct(u){const e=u.match(tct);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function nct(u,e){return ue?1:0}class zee{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new zee(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class Mee{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let n,i;t===-1?(n=e,i=""):(n=e.substring(0,t),i=e.substring(t+1));const r=this._children.get(n);return typeof r<"u"?r.match(i):this._mainRule}insert(e,t,n,i){if(e===""){this._mainRule.acceptOverwrite(t,n,i);return}const r=e.indexOf(".");let a,o;r===-1?(a=e,o=""):(a=e.substring(0,r),o=e.substring(r+1));let s=this._children.get(a);typeof s>"u"&&(s=new Mee(this._mainRule.clone()),this._children.set(a,s)),s.insert(o,t,n,i)}}function ict(u){const e=[];for(let t=1,n=u.length;t{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const R0t=v("caseDescription","Match Case"),I0t=v("wordsDescription","Match Whole Word"),O0t=v("regexDescription","Use Regular Expression");class Ybe extends x6{constructor(e){super({icon:we.caseSensitive,title:R0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Qbe extends x6{constructor(e){super({icon:we.wholeWord,title:I0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Xbe extends x6{constructor(e){super({icon:we.regex,title:O0t+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class j0t{constructor(e,t=0,n=e.length,i=t-1){this.items=e,this.start=t,this.end=n,this.index=i}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class H0t{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new j0t(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const pC=ve;let V0t=class extends $l{constructor(e,t,n){var i;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new Q),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new Q),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(i=this.options.tooltip)!==null&&i!==void 0?i:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=me(e,pC(".monaco-inputbox.idle"));const r=this.options.flexibleHeight?"textarea":"input",a=me(this.element,pC(".ibwrapper"));if(this.input=me(a,pC(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=me(a,pC("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new dCe(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),me(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const o=this._register(new Zt(document,"selectionchange")),s=Ne.filter(o.event,()=>{const l=document.getSelection();return(l==null?void 0:l.anchorNode)===a});this._register(s(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new j0(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:Rf(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&Ks(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n3(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=ko(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var r,a;if(!this.message)return null;e=me(i,pC(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?est(this.message.content,o):Xot(this.message.content,o);s.classList.add(this.classForType(this.message.type));const l=this.stylesForType(this.message.type);return s.style.backgroundColor=(r=l.background)!==null&&r!==void 0?r:"",s.style.color=(a=l.foreground)!==null&&a!==void 0?a:"",s.style.border=l.border?`1px solid ${l.border}`:"",me(e,s),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=v("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?n=v("alertWarningMessage","Warning: {0}",this.message.content):n=v("alertInfoMessage","Info: {0}",this.message.content),ga(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,n;const i=this.options.inputBoxStyles,r=(e=i.inputBackground)!==null&&e!==void 0?e:"",a=(t=i.inputForeground)!==null&&t!==void 0?t:"",o=(n=i.inputBorder)!==null&&n!==void 0?n:"";this.element.style.backgroundColor=r,this.element.style.color=a,this.input.style.backgroundColor="inherit",this.input.style.color=a,this.element.style.border=`1px solid ${n3(o,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Rf(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,i=t.selectionEnd,r=t.value;n!==null&&i!==null&&(this.value=r.substr(0,n)+e+r.substr(i),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)===null||e===void 0||e.dispose(),super.dispose()}};class e2e extends V0t{constructor(e,t,n){const i=v({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),r=` or ⇅ ${i}`,a=` (⇅ ${i})`;super(e,t,n),this._onDidFocus=this._register(new Q),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Q),this.onDidBlur=this._onDidBlur.event,this.history=new H0t(n.history,100);const o=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(a)&&this.history.getHistory().length){const s=this.placeholder.endsWith(")")?r:a,l=this.placeholder+s;n.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((s,l)=>{s.forEach(c=>{c.target.textContent||o()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>o()),this.onblur(this.input,()=>{const s=l=>{if(this.placeholder.endsWith(l)){const c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};s(a)||s(r)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",jm(this.value?this.value:v("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,jm(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const $0t=v("defaultLabel","input");class t2e extends $l{constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Ir),this.additionalToggles=[],this._onDidOptionChange=this._register(new Q),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Q),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Q),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Q),this._onKeyUp=this._register(new Q),this._onCaseSensitiveKeyDown=this._register(new Q),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Q),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||$0t,this.showCommonFindToggles=!!n.showCommonFindToggles;const i=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",a=n.appendRegexLabel||"",o=n.history||[],s=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new e2e(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:s,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:n.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new Xbe(Object.assign({appendTitle:a,isChecked:!1},n.toggleStyles))),this._register(this.regex.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(h=>{this._onRegexKeyDown.fire(h)})),this.wholeWords=this._register(new Qbe(Object.assign({appendTitle:r,isChecked:!1},n.toggleStyles))),this._register(this.wholeWords.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new Ybe(Object.assign({appendTitle:i,isChecked:!1},n.toggleStyles))),this._register(this.caseSensitive.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(h=>{this._onCaseSensitiveKeyDown.fire(h)}));const d=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const E=d.indexOf(document.activeElement);if(E>=0){let m=-1;h.equals(17)?m=(E+1)%d.length:h.equals(15)&&(E===0?m=d.length-1:m=E-1),h.equals(9)?(d[E].blur(),this.inputBox.focus()):m>=0&&d[m].focus(),It.stop(h,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n==null?void 0:n.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(ce(this.inputBox.inputElement,"compositionstart",d=>{this.imeSessionInProgress=!0})),this._register(ce(this.inputBox.inputElement,"compositionend",d=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)===null||e===void 0||e.enable(),(t=this.wholeWords)===null||t===void 0||t.enable(),(n=this.caseSensitive)===null||n===void 0||n.enable();for(const i of this.additionalToggles)i.enable()}disable(){var e,t,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)===null||e===void 0||e.disable(),(t=this.wholeWords)===null||t===void 0||t.disable(),(n=this.caseSensitive)===null||n===void 0||n.disable();for(const i of this.additionalToggles)i.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new pe;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,n,i,r,a,o;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((n=(t=this.caseSensitive)===null||t===void 0?void 0:t.width())!==null&&n!==void 0?n:0)+((r=(i=this.wholeWords)===null||i===void 0?void 0:i.width())!==null&&r!==void 0?r:0)+((o=(a=this.regex)===null||a===void 0?void 0:a.width())!==null&&o!==void 0?o:0)+this.additionalToggles.reduce((s,l)=>s+l.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return(t=(e=this.caseSensitive)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return(t=(e=this.wholeWords)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return(t=(e=this.regex)===null||e===void 0?void 0:e.checked)!==null&&t!==void 0?t:!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)===null||e===void 0||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var Ld;(function(u){u[u.Expanded=0]="Expanded",u[u.Collapsed=1]="Collapsed",u[u.PreserveOrExpanded=2]="PreserveOrExpanded",u[u.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Ld||(Ld={}));var Kf;(function(u){u[u.Unknown=0]="Unknown",u[u.Twistie=1]="Twistie",u[u.Element=2]="Element",u[u.Filter=3]="Filter"})(Kf||(Kf={}));class Ns extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class mee{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function gee(u){return typeof u=="object"&&"visibility"in u&&"data"in u}function Wk(u){switch(u){case!0:return 1;case!1:return 0;default:return u}}function sH(u){return typeof u.collapsible=="boolean"}class K0t{constructor(e,t,n,i={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new RQ,this._onDidChangeCollapseState=new Q,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new Q,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new Q,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new Tl(p6e),this.collapseByDefault=typeof i.collapseByDefault>"u"?!1:i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren=typeof i.autoExpandSingleChildren>"u"?!1:i.autoExpandSingleChildren,this.root={parent:void 0,element:n,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=$t.empty(),i={}){if(e.length===0)throw new Ns(this.user,"Invalid tree location");i.diffIdentityProvider?this.spliceSmart(i.diffIdentityProvider,e,t,n,i):this.spliceSimple(e,t,n,i)}spliceSmart(e,t,n,i,r,a){var o;i===void 0&&(i=$t.empty()),a===void 0&&(a=(o=r.diffDepth)!==null&&o!==void 0?o:0);const{parentNode:s}=this.getParentNodeWithListIndex(t);if(!s.lastDiffIds)return this.spliceSimple(t,n,i,r);const l=[...i],c=t[t.length-1],d=new $d({getElements:()=>s.lastDiffIds},{getElements:()=>[...s.children.slice(0,c),...l,...s.children.slice(c+n)].map(f=>e.getId(f.element).toString())}).ComputeDiff(!1);if(d.quitEarly)return s.lastDiffIds=void 0,this.spliceSimple(t,n,l,r);const h=t.slice(0,-1),E=(f,p,D)=>{if(a>0)for(let x=0;xD.originalStart-p.originalStart))E(m,g,m-(f.originalStart+f.originalLength)),m=f.originalStart,g=f.modifiedStart-c,this.spliceSimple([...h,m],f.originalLength,$t.slice(l,g,g+f.modifiedLength),r);E(m,g,m)}spliceSimple(e,t,n=$t.empty(),{onDidCreateNode:i,onDidDeleteNode:r,diffIdentityProvider:a}){const{parentNode:o,listIndex:s,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],h=$t.map(n,F=>this.createTreeNode(F,o,o.visible?1:0,l,d,i)),E=e[e.length-1],m=o.children.length>0;let g=0;for(let F=E;F>=0&&Fa.getId(F.element).toString())):o.lastDiffIds=o.children.map(F=>a.getId(F.element).toString()):o.lastDiffIds=void 0;let b=0;for(const F of x)F.visible&&b++;if(b!==0)for(let F=E+f.length;FS+(w.visible?w.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,D-F),this.list.splice(s,F,d)}if(x.length>0&&r){const F=S=>{r(S),S.children.forEach(F)};x.forEach(F)}this._onDidSplice.fire({insertedNodes:f,deletedNodes:x});const k=o.children.length>0;m!==k&&this.setCollapsible(e.slice(0,-1),k);let A=o;for(;A;){if(A.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}A=A.parent}}rerender(e){if(e.length===0)throw new Ns(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:i}=this.getTreeNodeWithListIndex(e);t.visible&&i&&this.list.splice(n,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:i}=this.getTreeNodeWithListIndex(e);return n&&i?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);const i={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,i))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const i=this.getTreeNode(e);typeof t>"u"&&(t=!i.collapsed);const r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){const{node:n,listIndex:i,revealed:r}=this.getTreeNodeWithListIndex(e),a=this._setListNodeCollapseState(n,i,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&a&&!sH(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let o=-1;for(let s=0;s-1){o=-1;break}else o=s;o>-1&&this._setCollapseState([...e,o],t)}return a}_setListNodeCollapseState(e,t,n,i){const r=this._setNodeCollapseState(e,i,!1);if(!n||!e.visible||!r)return r;const a=e.renderNodeCount,o=this.updateNodeAfterCollapseChange(e),s=a-(t===-1?0:1);return this.list.splice(t+1,s,o.slice(1)),r}_setNodeCollapseState(e,t,n){let i;if(e===this.root?i=!1:(sH(t)?(i=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(i=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):i=!1,i&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!sH(t)&&t.recursive)for(const r of e.children)i=this._setNodeCollapseState(r,t,!0)||i;return i}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,n,i,r,a){const o={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},s=this._filterNode(o,n);o.visibility=s,i&&r.push(o);const l=e.children||$t.empty(),c=i&&s!==0&&!o.collapsed;let d=0,h=1;for(const E of l){const m=this.createTreeNode(E,o,s,c,r,a);o.children.push(m),h+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=d++)}return o.collapsible=o.collapsible||o.children.length>0,o.visibleChildrenCount=d,o.visible=s===2?d>0:s===1,o.visible?o.collapsed||(o.renderNodeCount=h):(o.renderNodeCount=0,i&&r.pop()),a==null||a(o),o}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,i=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}const a=n.length;e.renderNodeCount=e===this.root?0:1;let o=!1;if(!e.collapsed||r!==0){let s=0;for(const l of e.children)o=this._updateNodeAfterFilterChange(l,r,n,i&&!e.collapsed)||o,l.visible&&(l.visibleChildIndex=s++);e.visibleChildrenCount=s}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?o:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-a):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):gee(n)?(e.filterData=n.data,Wk(n.visibility)):(e.filterData=void 0,Wk(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[n,...i]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(i,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[n,...i]=e;if(n<0||n>t.children.length)throw new Ns(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:i,visible:r}=this.getParentNodeWithListIndex(e),a=e[e.length-1];if(a<0||a>t.children.length)throw new Ns(this.user,"Invalid tree location");const o=t.children[a];return{node:o,listIndex:n,revealed:i,visible:r&&o.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,i=!0,r=!0){const[a,...o]=e;if(a<0||a>t.children.length)throw new Ns(this.user,"Invalid tree location");for(let s=0;st.element)),this.data=e}}function lH(u){return u instanceof CA?new W0t(u):u}class G0t{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=ne.None,this.disposables=new pe}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,lH(e),t)}onDragOver(e,t,n,i,r=!0){const a=this.dnd.onDragOver(lH(e),t&&t.element,n,i),o=this.autoExpandNode!==t;if(o&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(o&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=Rm(()=>{const h=this.modelProvider(),E=h.getNodeLocation(t);h.isCollapsed(E)&&h.setCollapsed(E,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!r){const h=typeof a=="boolean"?a:a.accept,E=typeof a=="boolean"?void 0:a.effect;return{accept:h,effect:E,feedback:[n]}}return a}if(a.bubble===1){const h=this.modelProvider(),E=h.getNodeLocation(t),m=h.getParentNodeLocation(E),g=h.getNode(m),f=m&&h.getListIndex(m);return this.onDragOver(e,g,f,i,!1)}const s=this.modelProvider(),l=s.getNodeLocation(t),c=s.getListIndex(l),d=s.getListRenderCount(l);return Object.assign(Object.assign({},a),{feedback:Wa(c,c+d)})}drop(e,t,n,i){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(lH(e),t&&t.element,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function U0t(u,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new G0t(u,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const n=u(),i=n.getNodeLocation(t),r=n.getParentNodeLocation(i);return n.getNode(r).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}})})}class fee{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var n,i;(i=(n=this.delegate).setDynamicHeight)===null||i===void 0||i.call(n,e.element,t)}}var Gk;(function(u){u.None="none",u.OnHover="onHover",u.Always="always"})(Gk||(Gk={}));class q0t{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new pe,this.onDidChange=Ne.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}}class Uk{constructor(e,t,n,i,r,a={}){var o;this.renderer=e,this.modelProvider=t,this.activeNodes=i,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Uk.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=ne.None,this.disposables=new pe,this.templateId=e.templateId,this.updateOptions(a),Ne.map(n,s=>s.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(o=e.onDidChangeTwistieState)===null||o===void 0||o.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const t=Qo(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[n,i]of this.renderedNodes)this.renderTreeElement(n,i)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==Gk.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[n,i]of this.renderedNodes)this._renderIndentGuides(n,i);if(this.indentGuidesDisposable.dispose(),t){const n=new pe;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=me(e,ve(".monaco-tl-row")),n=me(t,ve(".monaco-tl-indent")),i=me(t,ve(".monaco-tl-twistie")),r=me(t,ve(".monaco-tl-contents")),a=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:i,indentGuidesDisposable:ne.None,templateData:a}}renderElement(e,t,n,i){this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,i)}disposeElement(e,t,n,i){var r,a;n.indentGuidesDisposable.dispose(),(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,e,t,n.templateData,i),typeof i=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const n=Uk.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${n}px`,t.indent.style.width=`${n+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...st.asClassNameArray(we.treeItemExpanded));let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...st.asClassNameArray(we.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Nr(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new pe,i=this.modelProvider();for(;;){const r=i.getNodeLocation(e),a=i.getParentNodeLocation(r);if(!a)break;const o=i.getNode(a),s=ve(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(o)&&s.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(s):t.indent.insertBefore(s,t.indent.firstElementChild),this.renderedIndentGuides.add(o,s),n.add(ft(()=>this.renderedIndentGuides.delete(o,s))),e=o}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,n=this.modelProvider();e.forEach(i=>{const r=n.getNodeLocation(i);try{const a=n.getParentNodeLocation(r);i.collapsible&&i.children.length>0&&!i.collapsed?t.add(i):a&&t.add(n.getNode(a))}catch{}}),this.activeIndentNodes.forEach(i=>{t.has(i)||this.renderedIndentGuides.forEach(i,r=>r.classList.remove("active"))}),t.forEach(i=>{this.activeIndentNodes.has(i)||this.renderedIndentGuides.forEach(i,r=>r.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Su(this.disposables)}}Uk.DefaultIndent=8;class J0t{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,n){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=n,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new pe,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let n=1;if(this._filter){const a=this._filter.filter(e,t);if(typeof a=="boolean"?n=a?1:0:gee(a)?n=Wk(a.visibility):n=a,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:Kc.Default,visibility:n};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(i)?i:[i];for(const a of r){const o=a&&a.toString();if(typeof o>"u")return{data:Kc.Default,visibility:n};let s;if(this.tree.findMatchType===P3.Contiguous){const l=o.toLowerCase().indexOf(this._lowercasePattern);if(l>-1){s=[Number.MAX_SAFE_INTEGER,0];for(let c=this._lowercasePattern.length;c>0;c--)s.push(l+c-1)}}else s=T3(this._pattern,this._lowercasePattern,0,o,o.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(s)return this._matchCount++,r.length===1?{data:s,visibility:n}:{data:{label:o,score:s},visibility:n}}return this.tree.findMode===s1.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:Kc.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Su(this.disposables)}}var s1;(function(u){u[u.Highlight=0]="Highlight",u[u.Filter=1]="Filter"})(s1||(s1={}));var P3;(function(u){u[u.Fuzzy=0]="Fuzzy",u[u.Contiguous=1]="Contiguous"})(P3||(P3={}));let Z0t=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,i,r,a={}){var o,s;this.tree=e,this.view=n,this.filter=i,this.contextViewProvider=r,this.options=a,this._pattern="",this.width=0,this._onDidChangeMode=new Q,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new Q,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new Q,this._onDidChangeOpenState=new Q,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new pe,this.disposables=new pe,this._mode=(o=e.options.defaultFindMode)!==null&&o!==void 0?o:s1.Highlight,this._matchType=(s=e.options.defaultFindMatchType)!==null&&s!==void 0?s:P3.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var e,t,n,i;const r=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&r?!((e=this.tree.options.showNotFoundMessage)!==null&&e!==void 0)||e?(t=this.widget)===null||t===void 0||t.showMessage({type:2,content:v("not found","No elements found.")}):(n=this.widget)===null||n===void 0||n.showMessage({type:2}):(i=this.widget)===null||i===void 0||i.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this._mode===s1.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!Kc.isDefault(e.filterData)}layout(e){var t;this.width=e,(t=this.widget)===null||t===void 0||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}};function o0e(u){let e=Kf.Unknown;return dj(u.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=Kf.Twistie:dj(u.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=Kf.Element:dj(u.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=Kf.Filter),{browserEvent:u.browserEvent,element:u.element?u.element.element:null,target:e}}function r8(u,e){e(u),u.children.forEach(t=>r8(t,e))}class cH{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new Q,this.onDidChange=this._onDidChange.event}set(e,t){!(t!=null&&t.__forceEvent)&&di(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const i=this;this._onDidChange.fire({get elements(){return i.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const s=this.createNodeSet(),l=c=>s.delete(c);t.forEach(c=>r8(c,l)),this.set([...s.values()]);return}const n=new Set,i=s=>n.add(this.identityProvider.getId(s.element).toString());t.forEach(s=>r8(s,i));const r=new Map,a=s=>r.set(this.identityProvider.getId(s.element).toString(),s);e.forEach(s=>r8(s,a));const o=[];for(const s of this.nodes){const l=this.identityProvider.getId(s.element).toString();if(!n.has(l))o.push(s);else{const d=r.get(l);d&&d.visible&&o.push(d)}}if(this.nodes.length>0&&o.length===0){const s=this.getFirstViewElementWithTrait();s&&o.push(s)}this._set(o,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Y0t extends jbe{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(Pbe(e.browserEvent.target)||rm(e.browserEvent.target)||k5(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,i=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let r=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?r=this.tree.expandOnlyOnTwistieClick(t.element):r=!!this.tree.expandOnlyOnTwistieClick,r&&!i&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const a=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,o),r&&i){e.browserEvent.isHandledByList=!0;return}}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}}class Q0t extends Gl{constructor(e,t,n,i,r,a,o,s){super(e,t,n,i,s),this.focusTrait=r,this.selectionTrait=a,this.anchorTrait=o}createMouseController(e){return new Y0t(this,e.tree)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;const i=[],r=[];let a;n.forEach((o,s)=>{this.focusTrait.has(o)&&i.push(e+s),this.selectionTrait.has(o)&&r.push(e+s),this.anchorTrait.has(o)&&(a=e+s)}),i.length>0&&super.setFocus(Lm([...super.getFocus(),...i])),r.length>0&&super.setSelection(Lm([...super.getSelection(),...r])),typeof a=="number"&&super.setAnchor(a)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(i=>this.element(i)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(i=>this.element(i)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class u2e{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Ne.filter(Ne.map(this.view.onMouseDblClick,o0e),e=>e.target!==Kf.Filter)}get onPointer(){return Ne.map(this.view.onPointer,o0e)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Ne.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.mode)!==null&&t!==void 0?t:s1.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return(t=(e=this.findController)===null||e===void 0?void 0:e.matchType)!==null&&t!==void 0?t:P3.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,i,r={}){var a;this._user=e,this._options=r,this.eventBufferer=new RQ,this.onDidChangeFindOpenState=Ne.None,this.disposables=new pe,this._onWillRefilter=new Q,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new Q;const o=new fee(n),s=new Qre,l=new Qre,c=this.disposables.add(new q0t(l.event)),d=new aX;this.renderers=i.map(f=>new Uk(f,()=>this.model,s.event,c,d,r));for(const f of this.renderers)this.disposables.add(f);let h;r.keyboardNavigationLabelProvider&&(h=new J0t(this,r.keyboardNavigationLabelProvider,r.filter),r=Object.assign(Object.assign({},r),{filter:h}),this.disposables.add(h)),this.focus=new cH(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new cH(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new cH(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new Q0t(e,t,o,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},U0t(()=>this.model,r)),{tree:this})),this.model=this.createModel(e,this.view,r),s.input=this.model.onDidChangeCollapseState;const E=Ne.forEach(this.model.onDidSplice,f=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(f),this.selection.onDidModelSplice(f)})},this.disposables);E(()=>null,null,this.disposables);const m=this.disposables.add(new Q),g=this.disposables.add(new Tl(0));if(this.disposables.add(Ne.any(E,this.focus.onDidChange,this.selection.onDidChange)(()=>{g.trigger(()=>{const f=new Set;for(const p of this.focus.getNodes())f.add(p);for(const p of this.selection.getNodes())f.add(p);m.fire([...f.values()])})})),l.input=m.event,r.keyboardSupport!==!1){const f=Ne.chain(this.view.onKeyDown,p=>p.filter(D=>!rm(D.target)).map(D=>new ln(D)));Ne.chain(f,p=>p.filter(D=>D.keyCode===15))(this.onLeftArrow,this,this.disposables),Ne.chain(f,p=>p.filter(D=>D.keyCode===17))(this.onRightArrow,this,this.disposables),Ne.chain(f,p=>p.filter(D=>D.keyCode===10))(this.onSpace,this,this.disposables)}if((!((a=r.findWidgetEnabled)!==null&&a!==void 0)||a)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){const f=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new Z0t(this,this.model,this.view,h,r.contextViewProvider,f),this.focusNavigationFilter=p=>this.findController.shouldAllowFocus(p),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=Ne.None,this.onDidChangeFindMatchType=Ne.None;this.styleElement=P0(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Gk.Always)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e);for(const n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)===null||t===void 0||t.updateOptions(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Gk.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(e,t){var n;this.view.layout(e,t),zm(t)&&((n=this.findController)===null||n===void 0||n.layout(t))}style(e){const t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=n.join(` +`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);const i=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(i,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);const i=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(i,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);n!==-1&&this.view.reveal(n,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!0)){const a=this.model.getParentNodeLocation(i);if(!a)return;const o=this.model.getListIndex(a);this.view.reveal(o),this.view.setFocus([o])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n);if(!this.model.setCollapsed(i,!1)){if(!n.children.some(s=>s.visible))return;const[a]=this.view.getFocus(),o=a+1;this.view.reveal(o),this.view.setFocus([o])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],i=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(i,void 0,r)}dispose(){Su(this.disposables),this.view.dispose()}}class pee{constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new K0t(e,t,null,n),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,n.sorter&&(this.sorter={compare(i,r){return n.sorter.compare(i.element,r.element)}}),this.identityProvider=n.identityProvider}setChildren(e,t=$t.empty(),n={}){const i=this.getElementLocation(e);this._setChildren(i,this.preserveCollapseState(t),n)}_setChildren(e,t=$t.empty(),n){const i=new Set,r=new Set,a=s=>{var l;if(s.element===null)return;const c=s;if(i.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();r.add(d),this.nodesByIdentity.set(d,c)}(l=n.onDidCreateNode)===null||l===void 0||l.call(n,c)},o=s=>{var l;if(s.element===null)return;const c=s;if(i.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const d=this.identityProvider.getId(c.element).toString();r.has(d)||this.nodesByIdentity.delete(d)}(l=n.onDidDeleteNode)===null||l===void 0||l.call(n,c)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},n),{onDidCreateNode:a,onDidDeleteNode:o}))}preserveCollapseState(e=$t.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),$t.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){const a=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(a)}if(!n){let a;return typeof t.collapsed>"u"?a=void 0:t.collapsed===Ld.Collapsed||t.collapsed===Ld.PreserveOrCollapsed?a=!0:t.collapsed===Ld.Expanded||t.collapsed===Ld.PreserveOrExpanded?a=!1:a=!!t.collapsed,Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children),collapsed:a})}const i=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible;let r;return typeof t.collapsed>"u"||t.collapsed===Ld.PreserveOrCollapsed||t.collapsed===Ld.PreserveOrExpanded?r=n.collapsed:t.collapsed===Ld.Collapsed?r=!0:t.collapsed===Ld.Expanded?r=!1:r=!!t.collapsed,Object.assign(Object.assign({},t),{collapsible:i,collapsed:r,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getElementLocation(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Ns(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Ns(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Ns(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),i=this.model.getParentNodeLocation(n);return this.model.getNode(i).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Ns(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function a8(u){const e=[u.element],t=u.incompressible||!1;return{element:{elements:e,incompressible:t},children:$t.map($t.from(u.children),a8),collapsible:u.collapsible,collapsed:u.collapsed}}function o8(u){const e=[u.element],t=u.incompressible||!1;let n,i;for(;[i,n]=$t.consume($t.from(u.children),2),!(i.length!==1||i[0].incompressible);)u=i[0],e.push(u.element);return{element:{elements:e,incompressible:t},children:$t.map($t.concat(i,n),o8),collapsible:u.collapsible,collapsed:u.collapsed}}function HG(u,e=0){let t;return eHG(n,0)),e===0&&u.element.incompressible?{element:u.element.elements[e],children:t,incompressible:!0,collapsible:u.collapsible,collapsed:u.collapsed}:{element:u.element.elements[e],children:t,collapsible:u.collapsible,collapsed:u.collapsed}}function s0e(u){return HG(u,0)}function n2e(u,e,t){return u.element===e?Object.assign(Object.assign({},u),{children:t}):Object.assign(Object.assign({},u),{children:$t.map($t.from(u.children),n=>n2e(n,e,t))})}const X0t=u=>({getId(e){return e.elements.map(t=>u.getId(t).toString()).join("\0")}});class elt{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,n={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new pee(e,t,n),this.enabled=typeof n.compressionEnabled>"u"?!0:n.compressionEnabled,this.identityProvider=n.identityProvider}setChildren(e,t=$t.empty(),n){const i=n.diffIdentityProvider&&X0t(n.diffIdentityProvider);if(e===null){const m=$t.map(t,this.enabled?o8:a8);this._setChildren(null,m,{diffIdentityProvider:i,diffDepth:1/0});return}const r=this.nodes.get(e);if(!r)throw new Ns(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),o=this.model.getParentNodeLocation(r),s=this.model.getNode(o),l=s0e(a),c=n2e(l,e,t),d=(this.enabled?o8:a8)(c),h=n.diffIdentityProvider?(m,g)=>n.diffIdentityProvider.getId(m)===n.diffIdentityProvider.getId(g):void 0;if(di(d.element.elements,a.element.elements,h)){this._setChildren(r,d.children||$t.empty(),{diffIdentityProvider:i,diffDepth:1});return}const E=s.children.map(m=>m===a?d:m);this._setChildren(s.element,E,{diffIdentityProvider:i,diffDepth:a.depth-s.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,i=$t.map(n,s0e),r=$t.map(i,e?o8:a8);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const i=new Set,r=o=>{for(const s of o.element.elements)i.add(s),this.nodes.set(s,o.element)},a=o=>{for(const s of o.element.elements)i.has(s)||this.nodes.delete(s)};this.model.setChildren(e,t,Object.assign(Object.assign({},n),{onDidCreateNode:r,onDidDeleteNode:a}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const i=this.getCompressedNode(e);return this.model.setCollapsed(i,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Ns(this.user,`Tree element not found: ${e}`);return t}}const tlt=u=>u[u.length-1];class Dee{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new Dee(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function ult(u,e){return{splice(t,n,i){e.splice(t,n,i.map(r=>u.map(r)))},updateElementHeight(t,n){e.updateElementHeight(t,n)}}}function nlt(u,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(u(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){return e.filter.filter(u(t),n)}}})}class ilt{get onDidSplice(){return Ne.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidChangeCollapseState(){return Ne.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Ne.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t,n={}){this.rootRef=null,this.elementMapper=n.elementMapper||tlt;const i=r=>this.elementMapper(r.elements);this.nodeMapper=new mee(r=>new Dee(i,r)),this.model=new elt(e,ult(this.nodeMapper,t),nlt(i,n))}setChildren(e,t=$t.empty(),n={}){this.model.setChildren(e,t,n)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var rlt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};class xee extends u2e{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,i,r={}){super(e,t,n,i,r),this.user=e}setChildren(e,t=$t.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,n){return new pee(e,t,n)}}class i2e{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){const r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,i)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,i))}disposeElement(e,t,n,i){var r,a,o,s;n.compressedTreeNode?(a=(r=this.renderer).disposeCompressedElements)===null||a===void 0||a.call(r,n.compressedTreeNode,t,n.data,i):(s=(o=this.renderer).disposeElement)===null||s===void 0||s.call(o,e,t,n.data,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}rlt([Ci],i2e.prototype,"compressedTreeNodeProvider",null);function alt(u,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let n;try{n=u().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return n.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}class r2e extends xee{constructor(e,t,n,i,r={}){const a=()=>this,o=i.map(s=>new i2e(a,s));super(e,t,n,o,alt(a,r))}setChildren(e,t=$t.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t,n){return new ilt(e,t,n)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var V4=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function dH(u){return Object.assign(Object.assign({},u),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function VG(u,e){return e.parent?e.parent===u?!0:VG(u,e.parent):!1}function olt(u,e){return u===e||VG(u,e)||VG(e,u)}class vee{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new vee(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class slt{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...st.asClassNameArray(we.treeItemLoading)),!0):(t.classList.remove(...st.asClassNameArray(we.treeItemLoading)),!1)}disposeElement(e,t,n,i){var r,a;(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,this.nodeMapper.map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function l0e(u){return{browserEvent:u.browserEvent,elements:u.elements.map(e=>e.element)}}function c0e(u){return{browserEvent:u.browserEvent,element:u.element&&u.element.element,target:u.target}}class llt extends CA{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function hH(u){return u instanceof CA?new llt(u):u}class clt{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,i;(i=(n=this.dnd).onDragStart)===null||i===void 0||i.call(n,hH(e),t)}onDragOver(e,t,n,i,r=!0){return this.dnd.onDragOver(hH(e),t&&t.element,n,i)}drop(e,t,n,i){this.dnd.drop(hH(e),t&&t.element,n,i)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)===null||n===void 0||n.call(t,e)}dispose(){this.dnd.dispose()}}function a2e(u){return u&&Object.assign(Object.assign({},u),{collapseByDefault:!0,identityProvider:u.identityProvider&&{getId(e){return u.identityProvider.getId(e.element)}},dnd:u.dnd&&new clt(u.dnd),multipleSelectionController:u.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return u.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return u.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:u.accessibilityProvider&&Object.assign(Object.assign({},u.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:u.accessibilityProvider.getRole?e=>u.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:u.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=u.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return u.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return u.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:u.accessibilityProvider.getWidgetRole?()=>u.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:u.accessibilityProvider.getAriaLevel&&(e=>u.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:u.accessibilityProvider.getActiveDescendantId&&(e=>u.accessibilityProvider.getActiveDescendantId(e.element))}),filter:u.filter&&{filter(e,t){return u.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:u.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},u.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return u.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof u.expandOnlyOnTwistieClick>"u"?void 0:typeof u.expandOnlyOnTwistieClick!="function"?u.expandOnlyOnTwistieClick:e=>u.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof u.defaultFindVisibility=="number"?u.defaultFindVisibility:typeof u.defaultFindVisibility>"u"?2:u.defaultFindVisibility(e.element)})}function $G(u,e){e(u),u.children.forEach(t=>$G(t,e))}class o2e{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Ne.map(this.tree.onDidChangeFocus,l0e)}get onDidChangeSelection(){return Ne.map(this.tree.onDidChangeSelection,l0e)}get onMouseDblClick(){return Ne.map(this.tree.onMouseDblClick,c0e)}get onPointer(){return Ne.map(this.tree.onPointer,c0e)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,i,r,a={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new Q,this._onDidChangeNodeSlowState=new Q,this.nodeMapper=new mee(o=>new vee(o)),this.disposables=new pe,this.identityProvider=a.identityProvider,this.autoExpandSingleChildren=typeof a.autoExpandSingleChildren>"u"?!1:a.autoExpandSingleChildren,this.sorter=a.sorter,this.collapseByDefault=a.collapseByDefault,this.tree=this.createTree(e,t,n,i,a),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=dH({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,n,i,r){const a=new fee(n),o=i.map(l=>new slt(l,this.nodeMapper,this._onDidChangeNodeSlowState.event)),s=a2e(r)||{};return new xee(e,t,a,o,s)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return V4(this,void 0,void 0,function*(){this.refreshPromises.forEach(i=>i.cancel()),this.refreshPromises.clear(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,n=!1,i,r){return V4(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ns(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event));const a=this.getDataNode(e);if(yield this.refreshAndRenderNode(a,t,i,r),n)try{this.tree.rerender(a)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}expand(e,t=!1){return V4(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new Ns(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const i=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(yield this.root.refreshPromise,yield Ne.toPromise(this._onDidRender.event)),i})}setSelection(e,t){const n=e.map(i=>this.getDataNode(i));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const n=e.map(i=>this.getDataNode(i));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Ns(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,n,i){return V4(this,void 0,void 0,function*(){yield this.refreshNode(e,t,n),this.render(e,n,i)})}refreshNode(e,t,n){return V4(this,void 0,void 0,function*(){let i;if(this.subTreeRefreshPromises.forEach((r,a)=>{!i&&olt(a,e)&&(i=r.then(()=>this.refreshNode(e,t,n)))}),i)return i;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0;return}return this.doRefreshSubTree(e,t,n)})}doRefreshSubTree(e,t,n){return V4(this,void 0,void 0,function*(){let i;e.refreshPromise=new Promise(r=>i=r),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const r=yield this.doRefreshNode(e,t,n);e.stale=!1,yield gW.settled(r.map(a=>this.doRefreshSubTree(a,t,n)))}finally{i()}})}doRefreshNode(e,t,n){return V4(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let i;if(!e.hasChildren)i=Promise.resolve($t.empty());else{const r=this.doGetChildren(e);if(Gre(r))i=Promise.resolve(r);else{const a=Pm(800);a.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},o=>null),i=r.finally(()=>a.cancel())}}try{const r=yield i;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),dd(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const n=this.dataSource.getChildren(e.element);return Gre(n)?this.processChildren(n):(t=Ui(()=>V4(this,void 0,void 0,function*(){return this.processChildren(yield n)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(zt))}setChildren(e,t,n,i){const r=[...t];if(e.children.length===0&&r.length===0)return[];const a=new Map,o=new Map;for(const c of e.children)if(a.set(c.element,c),this.identityProvider){const d=this.tree.isCollapsed(c);o.set(c.id,{node:c,collapsed:d})}const s=[],l=r.map(c=>{const d=!!this.dataSource.hasChildren(c);if(!this.identityProvider){const g=dH({element:c,parent:e,hasChildren:d});return d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(g.collapsedByDefault=!1,s.push(g)),g}const h=this.identityProvider.getId(c).toString(),E=o.get(h);if(E){const g=E.node;return a.delete(g.element),this.nodes.delete(g.element),this.nodes.set(c,g),g.element=c,g.hasChildren=d,n?E.collapsed?(g.children.forEach(f=>$G(f,p=>this.nodes.delete(p.element))),g.children.splice(0,g.children.length),g.stale=!0):s.push(g):d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(g.collapsedByDefault=!1,s.push(g)),g}const m=dH({element:c,parent:e,id:h,hasChildren:d});return i&&i.viewState.focus&&i.viewState.focus.indexOf(h)>-1&&i.focus.push(m),i&&i.viewState.selection&&i.viewState.selection.indexOf(h)>-1&&i.selection.push(m),i&&i.viewState.expanded&&i.viewState.expanded.indexOf(h)>-1?s.push(m):d&&this.collapseByDefault&&!this.collapseByDefault(c)&&(m.collapsedByDefault=!1,s.push(m)),m});for(const c of a.values())$G(c,d=>this.nodes.delete(d.element));for(const c of l)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&l.length===1&&s.length===0&&(l[0].collapsedByDefault=!1,s.push(l[0])),s}render(e,t,n){const i=e.children.map(a=>this.asTreeElement(a,t)),r=n&&Object.assign(Object.assign({},n),{diffIdentityProvider:n.diffIdentityProvider&&{getId(a){return n.diffIdentityProvider.getId(a.element)}}});this.tree.setChildren(e===this.root?null:e,i,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:n=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?$t.map(e.children,i=>this.asTreeElement(i,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class Cee{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new Cee(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class dlt{constructor(e,t,n,i){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,i){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,i)}renderCompressedElements(e,t,n,i){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}renderTwistie(e,t){return e.slow?(t.classList.add(...st.asClassNameArray(we.treeItemLoading)),!0):(t.classList.remove(...st.asClassNameArray(we.treeItemLoading)),!1)}disposeElement(e,t,n,i){var r,a;(a=(r=this.renderer).disposeElement)===null||a===void 0||a.call(r,this.nodeMapper.map(e),t,n.templateData,i)}disposeCompressedElements(e,t,n,i){var r,a;(a=(r=this.renderer).disposeCompressedElements)===null||a===void 0||a.call(r,this.compressibleNodeMapperProvider().map(e),t,n.templateData,i)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Su(this.disposables)}}function hlt(u){const e=u&&a2e(u);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return u.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}})})}class Elt extends o2e{constructor(e,t,n,i,r,a,o={}){super(e,t,n,r,a,o),this.compressionDelegate=i,this.compressibleNodeMapper=new mee(s=>new Cee(s)),this.filter=o.filter}createTree(e,t,n,i,r){const a=new fee(n),o=i.map(l=>new dlt(l,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),s=hlt(r)||{};return new r2e(e,t,a,o,s)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const n=h=>this.identityProvider.getId(h).toString(),i=h=>{const E=new Set;for(const m of h){const g=this.tree.getCompressedTreeNode(m===this.root?null:m);if(g.element)for(const f of g.element.elements)E.add(n(f.element))}return E},r=i(this.tree.getSelection()),a=i(this.tree.getFocus());super.render(e,t);const o=this.getSelection();let s=!1;const l=this.getFocus();let c=!1;const d=h=>{const E=h.element;if(E)for(let m=0;m{const n=this.filter.filter(t,1),i=mlt(n);if(i===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return i===1})),super.processChildren(e)}}function mlt(u){return typeof u=="boolean"?u?1:0:gee(u)?Wk(u.visibility):Wk(u)}class glt extends u2e{constructor(e,t,n,i,r,a={}){super(e,t,n,i,a),this.user=e,this.dataSource=r,this.identityProvider=a.identityProvider}createModel(e,t,n){return new pee(e,t,n)}}new Pe("isMac",iu,v("isMac","Whether the operating system is macOS"));new Pe("isLinux",Pa,v("isLinux","Whether the operating system is Linux"));const TP=new Pe("isWindows",na,v("isWindows","Whether the operating system is Windows")),s2e=new Pe("isWeb",dg,v("isWeb","Whether the platform is a web browser"));new Pe("isMacNative",iu&&!dg,v("isMacNative","Whether the operating system is macOS on a non-browser platform"));new Pe("isIOS",Zc,v("isIOS","Whether the operating system is iOS"));new Pe("isMobile",PGe,v("isMobile","Whether the platform is a mobile web browser"));new Pe("isDevelopment",!1,!0);new Pe("productQualityType","",v("productQualityType","Quality type of VS Code"));const l2e="inputFocus";new Pe(l2e,!1,v("inputFocus","Whether keyboard focus is inside an input box"));var A4=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cn=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Z0=Ut("listService");class flt{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new pe,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,n;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)===null||t===void 0||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)===null||n===void 0||n.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new Hbe(P0(),"").style(Tp)),this.lists.some(i=>i.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),Fl(e.onDidFocus(()=>this.setLastFocusedList(e)),ft(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(i=>i!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const qk=new Pe("listScrollAtBoundary","none");Ee.or(qk.isEqualTo("top"),qk.isEqualTo("both"));Ee.or(qk.isEqualTo("bottom"),qk.isEqualTo("both"));const c2e=new Pe("listFocus",!0),NP=new Pe("listSupportsMultiselect",!0),d2e=Ee.and(c2e,Ee.not(l2e)),bee=new Pe("listHasSelectionOrFocus",!1),kee=new Pe("listDoubleSelection",!1),Fee=new Pe("listMultiSelection",!1),PP=new Pe("listSelectionNavigation",!1),plt=new Pe("listSupportsFind",!0),yee=new Pe("treeElementCanCollapse",!1),Dlt=new Pe("treeElementHasParent",!1),Aee=new Pe("treeElementCanExpand",!1),xlt=new Pe("treeElementHasChild",!1),vlt=new Pe("treeFindOpen",!1),h2e="listTypeNavigationMode",E2e="listAutomaticKeyboardNavigation";function RP(u,e){const t=u.createScoped(e.getHTMLElement());return c2e.bindTo(t),t}function IP(u,e){const t=qk.bindTo(u),n=()=>{const i=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;i&&r?t.set("both"):i?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}const Np="workbench.list.multiSelectModifier",s8="workbench.list.openMode",B0="workbench.list.horizontalScrolling",_ee="workbench.list.defaultFindMode",See="workbench.list.typeNavigationMode",vw="workbench.list.keyboardNavigation",Xc="workbench.list.scrollByPage",Bee="workbench.list.defaultFindMatchType",Jk="workbench.tree.indent",Cw="workbench.tree.renderIndentGuides",ed="workbench.list.smoothScrolling",w1="workbench.list.mouseWheelScrollSensitivity",L1="workbench.list.fastScrollSensitivity",bw="workbench.tree.expandMode";function z1(u){return u.getValue(Np)==="alt"}class Clt extends ne{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=z1(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Np)&&(this.useAltAsMultipleSelectionModifier=z1(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Ibe(e)}isSelectionRangeChangeEvent(e){return Obe(e)}}function OP(u,e){var t;const n=u.get(tu),i=u.get(qu),r=new pe;return[Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return i.mightProducePrintableCharacter(o)}},smoothScrolling:!!n.getValue(ed),mouseWheelScrollSensitivity:n.getValue(w1),fastScrollSensitivity:n.getValue(L1),multipleSelectionController:(t=e.multipleSelectionController)!==null&&t!==void 0?t:r.add(new Clt(n)),keyboardNavigationEventFilter:Flt(i),scrollByPage:!!n.getValue(Xc)}),r]}let KG=class extends Gl{constructor(e,t,n,i,r,a,o,s,l){const c=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!s.getValue(B0),[d,h]=l.invokeFunction(OP,r);super(e,t,n,i,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:c})),this.disposables.add(h),this.contextKeyService=RP(a,this),this.disposables.add(IP(this.contextKeyService,this)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.listDoubleSelection=kee.bindTo(this.contextKeyService),this.listMultiSelection=Fee.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z1(s),this.disposables.add(this.contextKeyService),this.disposables.add(o.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),g=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||g.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),g=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||g.length>0)})),this.disposables.add(s.onDidChangeConfiguration(m=>{m.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(s));let g={};if(m.affectsConfiguration(B0)&&this.horizontalScrolling===void 0){const f=!!s.getValue(B0);g=Object.assign(Object.assign({},g),{horizontalScrolling:f})}if(m.affectsConfiguration(Xc)){const f=!!s.getValue(Xc);g=Object.assign(Object.assign({},g),{scrollByPage:f})}if(m.affectsConfiguration(ed)){const f=!!s.getValue(ed);g=Object.assign(Object.assign({},g),{smoothScrolling:f})}if(m.affectsConfiguration(w1)){const f=s.getValue(w1);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:f})}if(m.affectsConfiguration(L1)){const f=s.getValue(L1);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:f})}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new m2e(this,Object.assign({configurationService:s},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}};KG=A4([cn(5,pt),cn(6,Z0),cn(7,tu),cn(8,mt)],KG);let d0e=class extends A0t{constructor(e,t,n,i,r,a,o,s,l){const c=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!s.getValue(B0),[d,h]=l.invokeFunction(OP,r);super(e,t,n,i,Object.assign(Object.assign({keyboardSupport:!1},d),{horizontalScrolling:c})),this.disposables=new pe,this.disposables.add(h),this.contextKeyService=RP(a,this),this.disposables.add(IP(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=z1(s),this.disposables.add(this.contextKeyService),this.disposables.add(o.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(s.onDidChangeConfiguration(m=>{m.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(s));let g={};if(m.affectsConfiguration(B0)&&this.horizontalScrolling===void 0){const f=!!s.getValue(B0);g=Object.assign(Object.assign({},g),{horizontalScrolling:f})}if(m.affectsConfiguration(Xc)){const f=!!s.getValue(Xc);g=Object.assign(Object.assign({},g),{scrollByPage:f})}if(m.affectsConfiguration(ed)){const f=!!s.getValue(ed);g=Object.assign(Object.assign({},g),{smoothScrolling:f})}if(m.affectsConfiguration(w1)){const f=s.getValue(w1);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:f})}if(m.affectsConfiguration(L1)){const f=s.getValue(L1);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:f})}Object.keys(g).length>0&&this.updateOptions(g)})),this.navigator=new m2e(this,Object.assign({configurationService:s},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}dispose(){this.disposables.dispose(),super.dispose()}};d0e=A4([cn(5,pt),cn(6,Z0),cn(7,tu),cn(8,mt)],d0e);let h0e=class extends MP{constructor(e,t,n,i,r,a,o,s,l,c){const d=typeof a.horizontalScrolling<"u"?a.horizontalScrolling:!!l.getValue(B0),[h,E]=c.invokeFunction(OP,a);super(e,t,n,i,r,Object.assign(Object.assign({keyboardSupport:!1},h),{horizontalScrolling:d})),this.disposables.add(E),this.contextKeyService=RP(o,this),this.disposables.add(IP(this.contextKeyService,this)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(a.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!a.selectionNavigation),this.listHasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.listDoubleSelection=kee.bindTo(this.contextKeyService),this.listMultiSelection=Fee.bindTo(this.contextKeyService),this.horizontalScrolling=a.horizontalScrolling,this._useAltAsMultipleSelectionModifier=z1(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),this.updateStyles(a.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const g=this.getSelection(),f=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(g.length>0||f.length>0),this.listMultiSelection.set(g.length>1),this.listDoubleSelection.set(g.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const g=this.getSelection(),f=this.getFocus();this.listHasSelectionOrFocus.set(g.length>0||f.length>0)})),this.disposables.add(l.onDidChangeConfiguration(g=>{g.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(l));let f={};if(g.affectsConfiguration(B0)&&this.horizontalScrolling===void 0){const p=!!l.getValue(B0);f=Object.assign(Object.assign({},f),{horizontalScrolling:p})}if(g.affectsConfiguration(Xc)){const p=!!l.getValue(Xc);f=Object.assign(Object.assign({},f),{scrollByPage:p})}if(g.affectsConfiguration(ed)){const p=!!l.getValue(ed);f=Object.assign(Object.assign({},f),{smoothScrolling:p})}if(g.affectsConfiguration(w1)){const p=l.getValue(w1);f=Object.assign(Object.assign({},f),{mouseWheelScrollSensitivity:p})}if(g.affectsConfiguration(L1)){const p=l.getValue(L1);f=Object.assign(Object.assign({},f),{fastScrollSensitivity:p})}Object.keys(f).length>0&&this.updateOptions(f)})),this.navigator=new blt(this,Object.assign({configurationService:l},a)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?p6(e):Tp)}dispose(){this.disposables.dispose(),super.dispose()}};h0e=A4([cn(6,pt),cn(7,Z0),cn(8,tu),cn(9,mt)],h0e);class wee extends ne{constructor(e,t){var n;super(),this.widget=e,this._onDidOpen=this._register(new Q),this.onDidOpen=this._onDidOpen.event,this._register(Ne.filter(this.widget.onDidChangeSelection,i=>i.browserEvent instanceof KeyboardEvent)(i=>this.onSelectionFromKeyboard(i))),this._register(this.widget.onPointer(i=>this.onPointer(i.element,i.browserEvent))),this._register(this.widget.onMouseDblClick(i=>this.onMouseDblClick(i.element,i.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(s8))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration(s8)&&(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(s8))!=="doubleClick")}))):this.openOnSingleClick=(n=t==null?void 0:t.openOnSingleClick)!==null&&n!==void 0?n:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,i=typeof t.pinned=="boolean"?t.pinned:!n,r=!1;this._open(this.getSelectedElement(),n,i,r,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const i=t.button===1,r=!0,a=i,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,a,o,t)}onMouseDblClick(e,t){if(!t)return;const n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;const r=!1,a=!0,o=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,a,o,t)}_open(e,t,n,i,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:i,element:e,browserEvent:r})}}class m2e extends wee{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class blt extends wee{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class klt extends wee{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function Flt(u){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const n=u.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}let E0e=class extends xee{constructor(e,t,n,i,r,a,o,s,l){const{options:c,getTypeNavigationMode:d,disposable:h}=a.invokeFunction(kA,r);super(e,t,n,i,c),this.disposables.add(h),this.internals=new R3(this,r,d,r.overrideStyles,o,s,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};E0e=A4([cn(5,mt),cn(6,pt),cn(7,Z0),cn(8,tu)],E0e);let m0e=class extends r2e{constructor(e,t,n,i,r,a,o,s,l){const{options:c,getTypeNavigationMode:d,disposable:h}=a.invokeFunction(kA,r);super(e,t,n,i,c),this.disposables.add(h),this.internals=new R3(this,r,d,r.overrideStyles,o,s,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};m0e=A4([cn(5,mt),cn(6,pt),cn(7,Z0),cn(8,tu)],m0e);let g0e=class extends glt{constructor(e,t,n,i,r,a,o,s,l,c){const{options:d,getTypeNavigationMode:h,disposable:E}=o.invokeFunction(kA,a);super(e,t,n,i,r,d),this.disposables.add(E),this.internals=new R3(this,a,h,a.overrideStyles,s,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};g0e=A4([cn(6,mt),cn(7,pt),cn(8,Z0),cn(9,tu)],g0e);let WG=class extends o2e{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,i,r,a,o,s,l,c){const{options:d,getTypeNavigationMode:h,disposable:E}=o.invokeFunction(kA,a);super(e,t,n,i,r,d),this.disposables.add(E),this.internals=new R3(this,a,h,a.overrideStyles,s,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};WG=A4([cn(6,mt),cn(7,pt),cn(8,Z0),cn(9,tu)],WG);let f0e=class extends Elt{constructor(e,t,n,i,r,a,o,s,l,c,d){const{options:h,getTypeNavigationMode:E,disposable:m}=s.invokeFunction(kA,o);super(e,t,n,i,r,a,h),this.disposables.add(m),this.internals=new R3(this,o,E,o.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};f0e=A4([cn(7,mt),cn(8,pt),cn(9,Z0),cn(10,tu)],f0e);function g2e(u){const e=u.getValue(_ee);if(e==="highlight")return s1.Highlight;if(e==="filter")return s1.Filter;const t=u.getValue(vw);if(t==="simple"||t==="highlight")return s1.Highlight;if(t==="filter")return s1.Filter}function f2e(u){const e=u.getValue(Bee);if(e==="fuzzy")return P3.Fuzzy;if(e==="contiguous")return P3.Contiguous}function kA(u,e){var t;const n=u.get(tu),i=u.get(F4),r=u.get(pt),a=u.get(mt),o=()=>{const E=r.getContextKeyValue(h2e);if(E==="automatic")return qd.Automatic;if(E==="trigger"||r.getContextKeyValue(E2e)===!1)return qd.Trigger;const g=n.getValue(See);if(g==="automatic")return qd.Automatic;if(g==="trigger")return qd.Trigger},s=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!n.getValue(B0),[l,c]=a.invokeFunction(OP,e),d=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:n.getValue(Cw);return{getTypeNavigationMode:o,disposable:c,options:Object.assign(Object.assign({keyboardSupport:!1},l),{indent:typeof n.getValue(Jk)=="number"?n.getValue(Jk):void 0,renderIndentGuides:h,smoothScrolling:!!n.getValue(ed),defaultFindMode:g2e(n),defaultFindMatchType:f2e(n),horizontalScrolling:s,scrollByPage:!!n.getValue(Xc),paddingBottom:d,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(t=e.expandOnlyOnTwistieClick)!==null&&t!==void 0?t:n.getValue(bw)==="doubleClick",contextViewProvider:i,findWidgetStyles:r0t})}}let R3=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,i,r,a,o){var s;this.tree=e,this.disposables=[],this.contextKeyService=RP(r,e),this.disposables.push(IP(this.contextKeyService,e)),this.listSupportsMultiSelect=NP.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),PP.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=plt.bindTo(this.contextKeyService),this.listSupportFindWidget.set((s=t.findWidgetEnabled)!==null&&s!==void 0?s:!0),this.hasSelectionOrFocus=bee.bindTo(this.contextKeyService),this.hasDoubleSelection=kee.bindTo(this.contextKeyService),this.hasMultiSelection=Fee.bindTo(this.contextKeyService),this.treeElementCanCollapse=yee.bindTo(this.contextKeyService),this.treeElementHasParent=Dlt.bindTo(this.contextKeyService),this.treeElementCanExpand=Aee.bindTo(this.contextKeyService),this.treeElementHasChild=xlt.bindTo(this.contextKeyService),this.treeFindOpen=vlt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=z1(o),this.updateStyleOverrides(i);const c=()=>{const h=e.getFocus()[0];if(!h)return;const E=e.getNode(h);this.treeElementCanCollapse.set(E.collapsible&&!E.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(E.collapsible&&E.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},d=new Set;d.add(h2e),d.add(E2e),this.disposables.push(this.contextKeyService,a.register(e),e.onDidChangeSelection(()=>{const h=e.getSelection(),E=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||E.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{const h=e.getSelection(),E=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||E.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),o.onDidChangeConfiguration(h=>{let E={};if(h.affectsConfiguration(Np)&&(this._useAltAsMultipleSelectionModifier=z1(o)),h.affectsConfiguration(Jk)){const m=o.getValue(Jk);E=Object.assign(Object.assign({},E),{indent:m})}if(h.affectsConfiguration(Cw)&&t.renderIndentGuides===void 0){const m=o.getValue(Cw);E=Object.assign(Object.assign({},E),{renderIndentGuides:m})}if(h.affectsConfiguration(ed)){const m=!!o.getValue(ed);E=Object.assign(Object.assign({},E),{smoothScrolling:m})}if(h.affectsConfiguration(_ee)||h.affectsConfiguration(vw)){const m=g2e(o);E=Object.assign(Object.assign({},E),{defaultFindMode:m})}if(h.affectsConfiguration(See)||h.affectsConfiguration(vw)){const m=n();E=Object.assign(Object.assign({},E),{typeNavigationMode:m})}if(h.affectsConfiguration(Bee)){const m=f2e(o);E=Object.assign(Object.assign({},E),{defaultFindMatchType:m})}if(h.affectsConfiguration(B0)&&t.horizontalScrolling===void 0){const m=!!o.getValue(B0);E=Object.assign(Object.assign({},E),{horizontalScrolling:m})}if(h.affectsConfiguration(Xc)){const m=!!o.getValue(Xc);E=Object.assign(Object.assign({},E),{scrollByPage:m})}if(h.affectsConfiguration(bw)&&t.expandOnlyOnTwistieClick===void 0&&(E=Object.assign(Object.assign({},E),{expandOnlyOnTwistieClick:o.getValue(bw)==="doubleClick"})),h.affectsConfiguration(w1)){const m=o.getValue(w1);E=Object.assign(Object.assign({},E),{mouseWheelScrollSensitivity:m})}if(h.affectsConfiguration(L1)){const m=o.getValue(L1);E=Object.assign(Object.assign({},E),{fastScrollSensitivity:m})}Object.keys(E).length>0&&e.updateOptions(E)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(d)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new klt(e,Object.assign({configurationService:o},t)),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?p6(e):Tp)}dispose(){this.disposables=Su(this.disposables)}};R3=A4([cn(4,pt),cn(5,Z0),cn(6,tu)],R3);const ylt=jn.as(Ed.Configuration);ylt.registerConfiguration({id:"workbench",order:7,title:v("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Np]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[v("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),v("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:v({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[s8]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[B0]:{type:"boolean",default:!1,description:v("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Xc]:{type:"boolean",default:!1,description:v("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[Jk]:{type:"number",default:8,minimum:4,maximum:40,description:v("tree indent setting","Controls tree indentation in pixels.")},[Cw]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:v("render tree indent guides","Controls whether the tree should render indent guides.")},[ed]:{type:"boolean",default:!1,description:v("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[w1]:{type:"number",default:1,markdownDescription:v("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[L1]:{type:"number",default:5,markdownDescription:v("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[_ee]:{type:"string",enum:["highlight","filter"],enumDescriptions:[v("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),v("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:v("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[vw]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[v("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),v("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),v("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:v("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:v("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[Bee]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[v("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),v("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:v("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[bw]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[See]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:v("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});var GG;(function(u){u[u.PRESERVE=0]="PRESERVE",u[u.LAST=1]="LAST"})(GG||(GG={}));const Pp={Quickaccess:"workbench.contributions.quickaccess"};class Alt{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,n)=>n.prefix.length-t.prefix.length),ft(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return b1([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}jn.add(Pp.Quickaccess,new Alt);const _lt={ctrlCmd:!1,alt:!1};var Zk;(function(u){u[u.Blur=1]="Blur",u[u.Gesture=2]="Gesture",u[u.Other=3]="Other"})(Zk||(Zk={}));var Ec;(function(u){u[u.NONE=0]="NONE",u[u.FIRST=1]="FIRST",u[u.SECOND=2]="SECOND",u[u.LAST=3]="LAST"})(Ec||(Ec={}));const md=Ut("quickInputService");var Slt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},p0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let UG=class extends ne{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=jn.as(Pp.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var i;const[r,a]=this.getOrInstantiateProvider(e),o=this.visibleQuickAccess,s=o==null?void 0:o.descriptor;if(o&&a&&s===a){e!==a.prefix&&!(n!=null&&n.preserveValue)&&(o.picker.value=e),this.adjustValueSelection(o.picker,a,n);return}if(a&&!(n!=null&&n.preserveValue)){let E;if(o&&s&&s!==a){const m=o.value.substr(s.prefix.length);m&&(E=`${a.prefix}${m}`)}if(!E){const m=r==null?void 0:r.defaultFilterValue;m===GG.LAST?E=this.lastAcceptedPickerValues.get(a):typeof m=="string"&&(E=`${a.prefix}${m}`)}typeof E=="string"&&(e=E)}const l=new pe,c=l.add(this.quickInputService.createQuickPick());c.value=e,this.adjustValueSelection(c,a,n),c.placeholder=a==null?void 0:a.placeholder,c.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!o,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(c.itemActivation=(i=n==null?void 0:n.itemActivation)!==null&&i!==void 0?i:Ec.SECOND),c.contextKey=a==null?void 0:a.contextKey,c.filterValue=E=>E.substring(a?a.prefix.length:0);let d;t&&(d=new QN,l.add(Ne.once(c.onWillAccept)(E=>{E.veto(),c.hide()}))),l.add(this.registerPickerListeners(c,r,a,e,n==null?void 0:n.providerOptions));const h=l.add(new vi);if(r&&l.add(r.provide(c,h.token,n==null?void 0:n.providerOptions)),Ne.once(c.onDidHide)(()=>{c.selectedItems.length===0&&h.cancel(),l.dispose(),d==null||d.complete(c.selectedItems.slice(0))}),c.show(),t)return d==null?void 0:d.p}adjustValueSelection(e,t,n){var i;let r;n!=null&&n.preserveValue?r=[e.value.length,e.value.length]:r=[(i=t==null?void 0:t.prefix.length)!==null&&i!==void 0?i:0,e.value.length],e.valueSelection=r}registerPickerListeners(e,t,n,i,r){const a=new pe,o=this.visibleQuickAccess={picker:e,descriptor:n,value:i};return a.add(ft(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),a.add(e.onDidChangeValue(s=>{const[l]=this.getOrInstantiateProvider(s);l!==t?this.show(s,{preserveValue:!0,providerOptions:r}):o.value=s})),n&&a.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),a}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}};UG=Slt([p0e(0,md),p0e(1,mt)],UG);ae.white.toString(),ae.white.toString();let qG=class extends ne{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new Q),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,i=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=i||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),e.appendChild(this._element),this._register(Zu.addTarget(this._element)),[Me.CLICK,Yu.Tap].forEach(r=>{this._register(ce(this._element,r,a=>{if(!this.enabled){It.stop(a);return}this._onDidClick.fire(a)}))}),this._register(ce(this._element,Me.KEY_DOWN,r=>{const a=new ln(r);let o=!1;this.enabled&&(a.equals(3)||a.equals(10))?(this._onDidClick.fire(r),o=!0):a.equals(9)&&(this._element.blur(),o=!0),o&&It.stop(a,!0)})),this._register(ce(this._element,Me.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(ce(this._element,Me.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register(y1(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let n of im(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;const i=document.createElement("span");i.textContent=n,t.push(i)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t;if(this._label===e||nm(this._label)&&nm(e)&&qot(this._label,e))return;this._element.classList.add("monaco-text-button");const n=this.options.supportShortLabel?this._labelElement:this._element;if(nm(e)){const i=BP(e,{inline:!0});i.dispose();const r=(t=i.element.querySelector("p"))===null||t===void 0?void 0:t.innerHTML;if(r){const a=e6e(r,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});n.innerHTML=a}else Pr(n)}else this.options.supportIcons?Pr(n,...this.getContentElements(e)):n.textContent=e;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=lst(e)),this._label=e}get label(){return this._label}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}};class JG{constructor(e,t,n){this.options=t,this.styles=n,this.count=0,this.element=me(e,ve(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=y3(this.countFormat,this.count),this.element.title=y3(this.titleFormat,this.count),this.element.style.backgroundColor=(e=this.styles.badgeBackground)!==null&&e!==void 0?e:"",this.element.style.color=(t=this.styles.badgeForeground)!==null&&t!==void 0?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}const D0e="done",x0e="active",EH="infinite",mH="infinite-long-running",v0e="discrete";class jP extends ne{constructor(e,t){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new Hu(()=>ns(this.element),0)),this.longRunningScheduler=this._register(new Hu(()=>this.infiniteLongRunning(),jP.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(t==null?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(x0e,EH,mH,v0e),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(D0e),this.element.classList.contains(EH)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(v0e,D0e,mH),this.element.classList.add(x0e,EH),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(mH)}getContainer(){return this.element}}jP.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const Blt=ve;class wlt extends ne{constructor(e,t,n){super(),this.parent=e,this.onKeyDown=r=>ce(this.findInput.inputBox.inputElement,Me.KEY_DOWN,a=>{r(new ln(a))}),this.onMouseDown=r=>ce(this.findInput.inputBox.inputElement,Me.MOUSE_DOWN,a=>{r(new x0(a))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=me(this.parent,Blt(".quick-input-box")),this.findInput=this._register(new t2e(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));const i=this.findInput.inputBox.inputElement;i.role="combobox",i.ariaHasPopup="menu",i.ariaAutoComplete="list",i.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===si.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===si.Info?1:e===si.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===si.Info?1:e===si.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}class am{constructor(e,t){var n;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(n=t==null?void 0:t.supportIcons)!==null&&n!==void 0?n:!1,this.domNode=me(e,ve("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",i){e||(e=""),i&&(e=am.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&Ks(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const n of this.highlights){if(n.end===n.start)continue;if(t{i=r===`\r +`?-1:0,a+=n;for(const o of t)o.end<=a||(o.start>=a&&(o.start+=i),o.end>=a&&(o.end+=i));return n+=i,"⏎"})}}class gH{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class kw extends ne{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new gH(me(e,ve(".monaco-icon-label")))),this.labelContainer=me(this.domNode.element,ve(".monaco-icon-label-container"));const n=me(this.labelContainer,ve("span.monaco-icon-name-container"));t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new Mlt(n,!!t.supportIcons):this.nameNode=new Llt(n),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,n){const i=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";if(n&&(n.extraClasses&&i.push(...n.extraClasses),n.italic&&i.push("italic"),n.strikethrough&&i.push("strikethrough"),n.disabledCommand&&r.push("disabled"),n.title&&(a+=n.title)),this.domNode.className=i.join(" "),this.domNode.element.setAttribute("aria-label",a),this.labelContainer.className=r.join(" "),this.setupHover(n!=null&&n.descriptionTitle?this.labelContainer:this.element,n==null?void 0:n.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){const o=this.getOrCreateDescriptionNode();o instanceof am?(o.set(t||"",n?n.descriptionMatches:void 0,void 0,n==null?void 0:n.labelEscapeNewLines),this.setupHover(o.element,n==null?void 0:n.descriptionTitle)):(o.textContent=t&&(n!=null&&n.labelEscapeNewLines)?am.escapeNewLines(t,[]):t||"",this.setupHover(o.element,(n==null?void 0:n.descriptionTitle)||""),o.empty=!t)}}setupHover(e,t){const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)Yot(e,t);else{const i=Tbe(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new gH(me(this.labelContainer,ve("span.monaco-icon-description-container"))));!((e=this.creationOptions)===null||e===void 0)&&e.supportDescriptionHighlights?this.descriptionNode=new am(me(t.element,ve("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new gH(me(t.element,ve("span.label-description"))))}return this.descriptionNode}}class Llt{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Ks(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=me(this.container,ve("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{const r={start:n,end:n+i.length},a=t.map(o=>aa.intersect(r,o)).filter(o=>!aa.isEmpty(o)).map(({start:o,end:s})=>({start:o-n,end:s-n}));return n=r.end+e.length,a})}class Mlt{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&Ks(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new am(me(this.container,ve("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const n=(t==null?void 0:t.separator)||"/",i=zlt(e,n,t==null?void 0:t.matches);for(let r=0;r{const u=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:u,collatorIsNumeric:u.resolvedOptions().numeric}});function Nlt(u,e,t=!1){const n=u||"",i=e||"",r=C0e.value.collator.compare(n,i);return C0e.value.collatorIsNumeric&&r===0&&n!==i?ni.length)return 1}return 0}var Ilt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r};class p2e{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Ilt([Ci],p2e.prototype,"toString",null);const Olt=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function jlt(u){const e=[];let t=0,n;for(;n=Olt.exec(u);){n.index-t>0&&e.push(u.substring(t,n.index));const[,i,r,,a]=n;a?e.push({label:i,href:r,title:a}):e.push({label:i,href:r}),t=n.index+n[0].length}return t{QJe(E)&&It.stop(E,!0),t.callback(r.href)},l=t.disposables.add(new Zt(o,Me.CLICK)).event,c=t.disposables.add(new Zt(o,Me.KEY_DOWN)).event,d=Ne.chain(c,E=>E.filter(m=>{const g=new ln(m);return g.equals(10)||g.equals(3)}));t.disposables.add(Zu.addTarget(o));const h=t.disposables.add(new Zt(o,Yu.Tap)).event;Ne.any(l,h,d)(s,null,t.disposables),e.appendChild(o)}}var D2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},b0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const ac=ve;class $lt{constructor(e,t,n,i,r,a,o){var s,l,c;this._checked=!1,this._hidden=!1,this.hasCheckbox=i,this.index=n,this.fireButtonTriggered=r,this.fireSeparatorButtonTriggered=a,this._onChecked=o,this.onChecked=i?Ne.map(Ne.filter(this._onChecked.event,d=>d.listElement===this),d=>d.checked):Ne.None,e.type==="separator"?this._separator=e:(this.item=e,t&&t.type==="separator"&&!t.buttons&&(this._separator=t),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(s=this.item.highlights)===null||s===void 0?void 0:s.label,this._descriptionHighlights=(l=this.item.highlights)===null||l===void 0?void 0:l.description,this._detailHighlights=(c=this.item.highlights)===null||c===void 0?void 0:c.detail,this.saneTooltip=this.item.tooltip),this._init=new mg(()=>{var d;const h=(d=e.label)!==null&&d!==void 0?d:"",E=yb(h).text.trim(),m=e.ariaLabel||[h,this.saneDescription,this.saneDetail].map(g=>Uot(g)).filter(g=>!!g).join(", ");return{saneLabel:h,saneSortLabel:E,saneAriaLabel:m}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({listElement:this,checked:e}))}get separator(){return this._separator}set separator(e){this._separator=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class yA{constructor(e){this.themeService=e}get templateId(){return yA.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=me(e,ac(".quick-input-list-entry"));const n=me(t.entry,ac("label.quick-input-list-label"));t.toDisposeTemplate.push(xi(n,Me.CLICK,l=>{t.checkbox.offsetParent||l.preventDefault()})),t.checkbox=me(n,ac("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(xi(t.checkbox,Me.CHANGE,l=>{t.element.checked=t.checkbox.checked}));const i=me(n,ac(".quick-input-list-rows")),r=me(i,ac(".quick-input-list-row")),a=me(i,ac(".quick-input-list-row"));t.label=new kw(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.label),t.icon=l6e(t.label.element,ac(".quick-input-list-icon"));const o=me(r,ac(".quick-input-list-entry-keybinding"));t.keybinding=new FA(o,Os);const s=me(a,ac(".quick-input-list-label-meta"));return t.detail=new kw(s,{supportHighlights:!0,supportIcons:!0}),t.toDisposeTemplate.push(t.detail),t.separator=me(t.entry,ac(".quick-input-list-separator")),t.actionBar=new j0(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,n){var i,r,a,o;n.element=e,e.element=(i=n.entry)!==null&&i!==void 0?i:void 0;const s=e.item?e.item:e.separator;n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked(m=>n.checkbox.checked=m));const{labelHighlights:l,descriptionHighlights:c,detailHighlights:d}=e;if(!((r=e.item)===null||r===void 0)&&r.iconPath){const m=iv(this.themeService.getColorTheme().type)?e.item.iconPath.dark:(a=e.item.iconPath.light)!==null&&a!==void 0?a:e.item.iconPath.dark,g=dt.revive(m);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=Nm(g)}else n.icon.style.backgroundImage="",n.icon.className=!((o=e.item)===null||o===void 0)&&o.iconClass?`quick-input-list-icon ${e.item.iconClass}`:"";const h={matches:l||[],descriptionTitle:e.saneDescription,descriptionMatches:c||[],labelEscapeNewLines:!0};s.type!=="separator"?(h.extraClasses=s.iconClasses,h.italic=s.italic,h.strikethrough=s.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item")):n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(e.saneLabel,e.saneDescription,h),n.keybinding.set(s.type==="separator"?void 0:s.keybinding),e.saneDetail?(n.detail.element.style.display="",n.detail.setLabel(e.saneDetail,void 0,{matches:d,title:e.saneDetail,labelEscapeNewLines:!0})):n.detail.element.style.display="none",e.item&&e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!e.separator);const E=s.buttons;E&&E.length?(n.actionBar.push(E.map((m,g)=>{let f=m.iconClass||(m.iconPath?ZG(m.iconPath):void 0);return m.alwaysVisible&&(f=f?`${f} always-visible`:"always-visible"),{id:`id-${g}`,class:f,enabled:!0,label:"",tooltip:m.tooltip||"",run:()=>{s.type!=="separator"?e.fireButtonTriggered({button:m,item:s}):e.fireSeparatorButtonTriggered({button:m,separator:s})}}}),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){n.toDisposeElement=Su(n.toDisposeElement),n.actionBar.clear()}disposeTemplate(e){e.toDisposeElement=Su(e.toDisposeElement),e.toDisposeTemplate=Su(e.toDisposeTemplate)}}yA.ID="listelement";class Klt{getHeight(e){return e.item?e.saneDetail?44:22:24}getTemplateId(e){return yA.ID}}var hr;(function(u){u[u.First=1]="First",u[u.Second=2]="Second",u[u.Last=3]="Last",u[u.Next=4]="Next",u[u.Previous=5]="Previous",u[u.NextPage=6]="NextPage",u[u.PreviousPage=7]="PreviousPage"})(hr||(hr={}));class Lee{constructor(e,t,n,i){this.parent=e,this.options=n,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new Q,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new Q,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new Q,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new Q,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new Q,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new Q,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new Q,this.onKeyDown=this._onKeyDown.event,this._onLeave=new Q,this.onLeave=this._onLeave.event,this._listElementChecked=new Q,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=me(this.parent,ac(".quick-input-list"));const r=new Klt,a=new Ult;if(this.list=n.createList("QuickInput",this.container,r,[new yA(i)],{identityProvider:{getId:o=>{var s,l,c,d,h,E,m,g;return(g=(E=(d=(l=(s=o.item)===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:(c=o.item)===null||c===void 0?void 0:c.label)!==null&&d!==void 0?d:(h=o.separator)===null||h===void 0?void 0:h.id)!==null&&E!==void 0?E:(m=o.separator)===null||m===void 0?void 0:m.label)!==null&&g!==void 0?g:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:a}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(o=>{const s=new ln(o);switch(s.keyCode){case 10:this.toggleCheckbox();break;case 31:(iu?o.metaKey:o.ctrlKey)&&this.list.setFocus(Wa(this.list.length));break;case 16:{const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break}case 18:{const l=this.list.getFocus();l.length===1&&l[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(s)})),this.disposables.push(this.list.onMouseDown(o=>{o.browserEvent.button!==2&&o.browserEvent.preventDefault()})),this.disposables.push(ce(this.container,Me.CLICK,o=>{(o.x||o.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(o=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(o=>{typeof o.index=="number"&&(o.browserEvent.preventDefault(),this.list.setSelection([o.index]))})),n.hoverDelegate){const o=new D6e(n.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(s=>b0e(this,void 0,void 0,function*(){var l;if(s.browserEvent.target instanceof HTMLAnchorElement){o.cancel();return}if(!(!(s.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&Qr(s.browserEvent.relatedTarget,(l=s.element)===null||l===void 0?void 0:l.element)))try{yield o.trigger(()=>b0e(this,void 0,void 0,function*(){s.element&&this.showHover(s.element)}))}catch(c){if(!dd(c))throw c}}))),this.disposables.push(this.list.onMouseOut(s=>{var l;Qr(s.browserEvent.relatedTarget,(l=s.element)===null||l===void 0?void 0:l.element)||o.cancel()})),this.disposables.push(o)}this.disposables.push(this._listElementChecked.event(o=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Ne.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return Ne.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(e){this.list.getHTMLElement().ariaLabel=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let n=0,i=e.length;n{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Su(this.elementDisposables);const t=a=>this.fireButtonTriggered(a),n=a=>this.fireSeparatorButtonTriggered(a);this.inputElements=e;const i=new Map,r=this.parent.classList.contains("show-checkboxes");this.elements=e.reduce((a,o,s)=>{var l;const c=s>0?e[s-1]:void 0;if(o.type==="separator"&&!o.buttons)return a;const d=new $lt(o,c,s,r,t,n,this._listElementChecked),h=a.length;return a.push(d),i.set((l=d.item)!==null&&l!==void 0?l:d.separator,h),a},[]),this.elementsToIndexes=i,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item).filter(e=>!!e)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const n of e)t.add(n);for(const n of this.elements)n.checked=t.has(n.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===hr.Second&&this.list.length<2&&(e=hr.First),e){case hr.First:this.list.scrollTop=0,this.list.focusFirst(void 0,n=>!!n.item);break;case hr.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,n=>!!n.item);break;case hr.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,n=>!!n.item);break;case hr.Next:{this.list.focusNext(void 0,!0,void 0,i=>!!i.item);const n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case hr.Previous:{this.list.focusPrevious(void 0,!0,void 0,i=>!!i.item);const n=this.list.getFocus()[0];n!==0&&!this.elements[n-1].item&&this.list.firstVisibleIndex>n-1&&this.list.reveal(n-1);break}case hr.NextPage:this.list.focusNextPage(void 0,n=>!!n.item);break;case hr.PreviousPage:this.list.focusPreviousPage(void 0,n=>!!n.item);break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(e){var t,n,i;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((n=(t=this.options.hoverDelegate).onDidHideHover)===null||n===void 0||n.call(t),(i=this._lastHover)===null||i===void 0||i.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:r=>{this.options.linkOpenerDelegate(r)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(e){this.list.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const r=i.index&&this.inputElements[i.index-1];i.item&&(i.separator=r&&r.type==="separator"&&!r.buttons?r:void 0)});else{let i;this.elements.forEach(r=>{var a,o,s,l;let c;this.matchOnLabelMode==="fuzzy"?c=this.matchOnLabel&&(a=tH(e,yb(r.saneLabel)))!==null&&a!==void 0?a:void 0:c=this.matchOnLabel&&(o=Wlt(t,yb(r.saneLabel)))!==null&&o!==void 0?o:void 0;const d=this.matchOnDescription&&(s=tH(e,yb(r.saneDescription||"")))!==null&&s!==void 0?s:void 0,h=this.matchOnDetail&&(l=tH(e,yb(r.saneDetail||"")))!==null&&l!==void 0?l:void 0;if(c||d||h?(r.labelHighlights=c,r.descriptionHighlights=d,r.detailHighlights=h,r.hidden=!1):(r.labelHighlights=void 0,r.descriptionHighlights=void 0,r.detailHighlights=void 0,r.hidden=r.item?!r.item.alwaysShow:!0),r.item?r.separator=void 0:r.separator&&(r.hidden=!0),!this.sortByLabel){const E=r.index&&this.inputElements[r.index-1];i=E&&E.type==="separator"?E:i,i&&!r.hidden&&(r.separator=i,i=void 0)}})}const n=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();n.sort((r,a)=>Glt(r,a,i))}return this.elementsToIndexes=n.reduce((i,r,a)=>{var o;return i.set((o=r.item)!==null&&o!==void 0?o:r.separator,a),i},new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const n of e)n.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Su(this.elementDisposables),this.disposables=Su(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}fireSeparatorButtonTriggered(e){this._onSeparatorButtonTriggered.fire(e)}style(e){this.list.style(e)}toggleHover(){const e=this.list.getFocusedElements()[0];if(!(e!=null&&e.saneTooltip))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const t=this.list.getFocusedElements()[0];if(!t)return;this.showHover(t);const n=new pe;n.add(this.list.onDidChangeFocus(i=>{i.indexes.length&&this.showHover(i.elements[0])})),this._lastHover&&n.add(this._lastHover),this._toggleHover=n,this.elementDisposables.push(this._toggleHover)}}D2e([Ci],Lee.prototype,"onDidChangeFocus",null);D2e([Ci],Lee.prototype,"onDidChangeSelection",null);function Wlt(u,e){const{text:t,iconOffsets:n}=e;if(!n||n.length===0)return k0e(u,t);const i=tA(t," "),r=t.length-i.length,a=k0e(u,i);if(a)for(const o of a){const s=n[o.start+r]+r;o.start+=s,o.end+=s}return a}function k0e(u,e){const t=e.toLowerCase().indexOf(u.toLowerCase());return t!==-1?[{start:t,end:t+u.length}]:null}function Glt(u,e,t){const n=u.labelHighlights||[],i=e.labelHighlights||[];return n.length&&!i.length?-1:!n.length&&i.length?1:n.length===0&&i.length===0?0:Plt(u.saneSortLabel,e.saneSortLabel,t)}class Ult{getWidgetAriaLabel(){return v("quickInput","Quick Input")}getAriaLabel(e){var t;return!((t=e.separator)===null||t===void 0)&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox)return{value:e.checked,onDidChange:e.onChecked}}}var F0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const YG={iconClass:st.asClassName(we.quickInputBack),tooltip:v("quickInput.back","Back"),handle:-1};class AA extends ne{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=AA.noPromptMessage,this._severity=si.Ignore,this.onDidTriggerButtonEmitter=this._register(new Q),this.onDidHideEmitter=this._register(new Q),this.onDisposeEmitter=this._register(new Q),this.visibleDisposables=this._register(new pe),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Zc;this._ignoreFocusOut=e&&!Zc,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Zk.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const n=this.getTitle();n&&this.ui.title.textContent!==n?this.ui.title.textContent=n:!n&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?Pr(this.ui.widget,this._widget):Pr(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Vl,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const a=this.buttons.filter(s=>s===YG);this.ui.leftActionBar.push(a.map((s,l)=>{const c=new ro(`id-${l}`,"",s.iconClass||ZG(s.iconPath),!0,()=>F0e(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(s)}));return c.tooltip=s.tooltip||"",c}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const o=this.buttons.filter(s=>s!==YG);this.ui.rightActionBar.push(o.map((s,l)=>{const c=new ro(`id-${l}`,"",s.iconClass||ZG(s.iconPath),!0,()=>F0e(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(s)}));return c.tooltip=s.tooltip||"",c}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const a=(t=(e=this.toggles)===null||e===void 0?void 0:e.filter(o=>o instanceof x6))!==null&&t!==void 0?t:[];this.ui.inputBox.toggles=a}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const r=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==r&&(this._lastValidationMessage=r,Pr(this.ui.message),Vlt(r,this.ui.message,{callback:a=>{this.ui.linkOpenerDelegate(a)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?v("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==si.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}AA.noPromptMessage=v("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Yk extends AA{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new Q),this.onWillAcceptEmitter=this._register(new Q),this.onDidAcceptEmitter=this._register(new Q),this.onDidCustomEmitter=this._register(new Q),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=Ec.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new Q),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new Q),this.onDidTriggerItemButtonEmitter=this._register(new Q),this.onDidTriggerSeparatorButtonEmitter=this._register(new Q),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?_lt:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(hr.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(hr.Next),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(hr.Previous):this.ui.list.focus(hr.Last),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 12:this.ui.list.focus(hr.NextPage),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 11:this.ui.list.focus(hr.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),It.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(hr.First),It.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(hr.Last),It.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&di(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&di(e,this._selectedItems,(n,i)=>n===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&di(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ce(this.ui.container,Me.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ln(e),n=t.keyCode;this._quickNavigate.keybindings.some(a=>{const o=a.getChords();return o.length>1?!1:o[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(o[0].altKey&&n===6||o[0].ctrlKey&&n===5||o[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let i=this.ariaLabel;if(!i&&n.inputBox&&(i=this.placeholder||Yk.DEFAULT_ARIA_LABEL,this.title&&(i+=` - ${this.title}`)),this.ui.list.ariaLabel!==i&&(this.ui.list.ariaLabel=i??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Ec.NONE:this._itemActivation=Ec.FIRST;break;case Ec.SECOND:this.ui.list.focus(hr.Second),this._itemActivation=Ec.FIRST;break;case Ec.LAST:this.ui.list.focus(hr.Last),this._itemActivation=Ec.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(hr.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Yk.DEFAULT_ARIA_LABEL=v("quickInputBox.ariaLabel","Type to narrow down results.");class qlt extends AA{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new Q),this.onDidAcceptEmitter=this._register(new Q),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}const Go=ve;class HP extends ne{constructor(e,t){super(),this.options=e,this.themeService=t,this.enabled=!0,this.onDidAcceptEmitter=this._register(new Q),this.onDidCustomEmitter=this._register(new Q),this.onDidTriggerButtonEmitter=this._register(new Q),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new Q),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new Q),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(ce(window,Me.KEY_DOWN,e,!0)),this._register(ce(window,Me.KEY_UP,e,!0)),this._register(ce(window,Me.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=me(this.parentElement,Go(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=P0(e),n=me(e,Go(".quick-input-titlebar")),i=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,r=this._register(new j0(n,i));r.domNode.classList.add("quick-input-left-action-bar");const a=me(n,Go(".quick-input-title")),o=this._register(new j0(n,i));o.domNode.classList.add("quick-input-right-action-bar");const s=me(e,Go(".quick-input-header")),l=me(s,Go("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",v("quickInput.checkAll","Toggle all checkboxes")),this._register(xi(l,Me.CHANGE,y=>{const _=l.checked;N.setAllVisibleChecked(_)})),this._register(ce(l,Me.CLICK,y=>{(y.x||y.y)&&E.setFocus()}));const c=me(s,Go(".quick-input-description")),d=me(s,Go(".quick-input-and-message")),h=me(d,Go(".quick-input-filter")),E=this._register(new wlt(h,this.styles.inputBox,this.styles.toggle));E.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=me(h,Go(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const g=new JG(m,{countFormat:v({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=me(h,Go(".quick-input-count"));f.setAttribute("aria-live","polite");const p=new JG(f,{countFormat:v({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),D=me(s,Go(".quick-input-action")),x=this._register(new qG(D,this.styles.button));x.label=v("ok","OK"),this._register(x.onDidClick(y=>{this.onDidAcceptEmitter.fire()}));const b=me(s,Go(".quick-input-action")),k=this._register(new qG(b,this.styles.button));k.label=v("custom","Custom"),this._register(k.onDidClick(y=>{this.onDidCustomEmitter.fire()}));const A=me(d,Go(`#${this.idPrefix}message.quick-input-message`)),F=this._register(new jP(e,this.styles.progressBar));F.getContainer().classList.add("quick-input-progress");const S=me(e,Go(".quick-input-html-widget"));S.tabIndex=-1;const w=me(e,Go(".quick-input-description")),z=this.idPrefix+"list",N=this._register(new Lee(e,z,this.options,this.themeService));E.setAttribute("aria-controls",z),this._register(N.onDidChangeFocus(()=>{var y;E.setAttribute("aria-activedescendant",(y=N.getActiveDescendant())!==null&&y!==void 0?y:"")})),this._register(N.onChangedAllVisibleChecked(y=>{l.checked=y})),this._register(N.onChangedVisibleCount(y=>{g.setCount(y)})),this._register(N.onChangedCheckedCount(y=>{p.setCount(y)})),this._register(N.onLeave(()=>{setTimeout(()=>{E.setFocus(),this.controller instanceof Yk&&this.controller.canSelectMany&&N.clearFocus()},0)}));const O=y1(e);return this._register(O),this._register(ce(e,Me.FOCUS,y=>{Qr(y.relatedTarget,e)||(this.previousFocusElement=y.relatedTarget instanceof HTMLElement?y.relatedTarget:void 0)},!0)),this._register(O.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Zk.Blur),this.previousFocusElement=void 0})),this._register(ce(e,Me.FOCUS,y=>{E.setFocus()})),this._register(xi(e,Me.KEY_DOWN,y=>{if(!Qr(y.target,S))switch(y.keyCode){case 3:It.stop(y,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:It.stop(y,!0),this.hide(Zk.Gesture);break;case 2:if(!y.altKey&&!y.ctrlKey&&!y.metaKey){const _=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(e.classList.contains("show-checkboxes")?_.push("input"):_.push("input[type=text]"),this.getUI().list.isDisplayed()&&_.push(".monaco-list"),this.getUI().message&&_.push(".quick-input-message a"),this.getUI().widget){if(Qr(y.target,this.getUI().widget))break;_.push(".quick-input-html-widget")}const L=e.querySelectorAll(_.join(", "));y.shiftKey&&y.target===L[0]?(It.stop(y,!0),N.clearFocus()):!y.shiftKey&&Qr(y.target,L[L.length-1])&&(It.stop(y,!0),L[0].focus())}break;case 10:y.ctrlKey&&(It.stop(y,!0),this.getUI().list.toggleHover());break}})),this.ui={container:e,styleSheet:t,leftActionBar:r,titleBar:n,title:a,description1:w,description2:c,widget:S,rightActionBar:o,checkAll:l,inputContainer:d,filterContainer:h,inputBox:E,visibleCountContainer:m,visibleCount:g,countContainer:f,count:p,okContainer:D,ok:x,message:A,customButtonContainer:b,customButton:k,list:N,progressBar:F,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:y=>this.show(y),hide:()=>this.hide(),setVisibilities:y=>this.setVisibilities(y),setEnabled:y=>this.setEnabled(y),setContextKey:y=>this.options.setContextKey(y),linkOpenerDelegate:y=>this.options.linkOpenerDelegate(y)},this.updateStyles(),this.ui}pick(e,t={},n=Kt.None){return new Promise((i,r)=>{let a=c=>{var d;a=i,(d=t.onKeyMods)===null||d===void 0||d.call(t,o.keyMods),i(c)};if(n.isCancellationRequested){a(void 0);return}const o=this.createQuickPick();let s;const l=[o,o.onDidAccept(()=>{if(o.canSelectMany)a(o.selectedItems.slice()),o.hide();else{const c=o.activeItems[0];c&&(a(c),o.hide())}}),o.onDidChangeActive(c=>{const d=c[0];d&&t.onDidFocus&&t.onDidFocus(d)}),o.onDidChangeSelection(c=>{if(!o.canSelectMany){const d=c[0];d&&(a(d),o.hide())}}),o.onDidTriggerItemButton(c=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},c),{removeItem:()=>{const d=o.items.indexOf(c.item);if(d!==-1){const h=o.items.slice(),E=h.splice(d,1),m=o.activeItems.filter(f=>f!==E[0]),g=o.keepScrollPosition;o.keepScrollPosition=!0,o.items=h,m&&(o.activeItems=m),o.keepScrollPosition=g}}}))),o.onDidTriggerSeparatorButton(c=>{var d;return(d=t.onDidTriggerSeparatorButton)===null||d===void 0?void 0:d.call(t,c)}),o.onDidChangeValue(c=>{s&&!c&&(o.activeItems.length!==1||o.activeItems[0]!==s)&&(o.activeItems=[s])}),n.onCancellationRequested(()=>{o.hide()}),o.onDidHide(()=>{Su(l),a(void 0)})];o.title=t.title,o.canSelectMany=!!t.canPickMany,o.placeholder=t.placeHolder,o.ignoreFocusOut=!!t.ignoreFocusLost,o.matchOnDescription=!!t.matchOnDescription,o.matchOnDetail=!!t.matchOnDetail,o.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,o.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,o.quickNavigate=t.quickNavigate,o.hideInput=!!t.hideInput,o.contextKey=t.contextKey,o.busy=!0,Promise.all([e,t.activeItem]).then(([c,d])=>{s=d,o.busy=!1,o.items=c,o.canSelectMany&&(o.selectedItems=c.filter(h=>h.type!=="separator"&&h.picked)),s&&(o.activeItems=[s])}),o.show(),Promise.resolve(e).then(void 0,c=>{r(c),o.hide()})})}createQuickPick(){const e=this.getUI();return new Yk(e)}createInputBox(){const e=this.getUI();return new qlt(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=e,n==null||n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",Pr(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(si.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Pr(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const i=this.options.backKeybindingLabel();YG.tooltip=i?v("quickInput.backWithKeybinding","Back ({0})",i):v("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,n,i;const r=this.controller;if(!r)return;const a=!Qr(document.activeElement,(n=(t=this.ui)===null||t===void 0?void 0:t.container)!==null&&n!==void 0?n:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!a){let o=this.previousFocusElement;for(;o&&!o.offsetParent;)o=(i=o.parentElement)!==null&&i!==void 0?i:void 0;o!=null&&o.offsetParent?(o.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}r.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,HP.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:i,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=i?`1px solid ${i}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list);const a=[];this.styles.pickerGroup.pickerGroupBorder&&a.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&a.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&a.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(a.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&a.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&a.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&a.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&a.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&a.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),a.push("}"));const o=a.join(` +`);o!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=o)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}HP.MAX_WIDTH=600;var Jlt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},S9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let QG=class extends Stt{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(UG))),this._quickAccess}constructor(e,t,n,i){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=i,this._onShow=this._register(new Q),this._onHide=this._register(new Q),this.contexts=new Map}createController(e=this.layoutService,t){const n={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(a=>{a.get(Cs).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),createList:(r,a,o,s,l)=>this.instantiationService.createInstance(KG,r,a,o,s,l),styles:this.computeStyles()},i=this._register(new HP(Object.assign(Object.assign({},n),t),this.themeService));return i.layout(e.dimension,e.offset.quickPickTop),this._register(e.onDidLayout(r=>i.layout(r,e.offset.quickPickTop))),this._register(i.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(i.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),i}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Pe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},n=Kt.None){return this.controller.pick(e,t,n)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Re(moe),quickInputForeground:Re(zXe),quickInputTitleBackground:Re(MXe),widgetBorder:Re(fX),widgetShadow:Re(t1)},inputBox:dw,toggle:cw,countBadge:$be,button:n0t,progressBar:i0t,keybindingLabel:u0t,list:p6({listBackground:moe,listFocusBackground:jf,listFocusForeground:Of,listInactiveFocusForeground:Of,listInactiveSelectionIconForeground:E5,listInactiveFocusBackground:jf,listFocusOutline:En,listInactiveFocusOutline:En}),pickerGroup:{pickerGroupBorder:Re(TXe),pickerGroupForeground:Re(X6e)}}}};QG=Jlt([S9(0,mt),S9(1,pt),S9(2,sr),S9(3,f6)],QG);var x2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},A5=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let XG=class extends QG{constructor(e,t,n,i,r){super(t,n,i,new rG(e.getContainerDomNode(),r)),this.host=void 0;const a=gv.get(e);if(a){const o=a.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return o.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};XG=x2e([A5(1,mt),A5(2,pt),A5(3,sr),A5(4,Cu)],XG);let eU=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance(XG,e);this.mapEditorToService.set(e,t),Mm(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},n=Kt.None){return this.activeService.pick(e,t,n)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};eU=x2e([A5(0,mt),A5(1,Cu)],eU);class gv{static get(e){return e.getContribution(gv.ID)}constructor(e){this.editor=e,this.widget=new VP(this.editor)}dispose(){this.widget.dispose()}}gv.ID="editor.controller.quickInput";class VP{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return VP.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}VP.ID="editor.contrib.quickInputWidget";fu(gv.ID,gv,4);class Zlt{constructor(e,t,n,i,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=r}}function Ylt(u){if(!u||!Array.isArray(u))return[];const e=[];let t=0;for(let n=0,i=u.length;n{const h=nct(c.token,d.token);return h!==0?h:c.index-d.index});let t=0,n="000000",i="ffffff";for(;u.length>=1&&u[0].token==="";){const c=u.shift();c.fontStyle!==-1&&(t=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(i=c.background)}const r=new ect;for(const c of e)r.getId(c);const a=r.getId(n),o=r.getId(i),s=new zee(t,a,o),l=new Mee(s);for(let c=0,d=u.length;c"u"){const i=this._match(t),r=uct(t);n=(i.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const tct=/\b(comment|string|regex|regexp)\b/;function uct(u){const e=u.match(tct);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function nct(u,e){return ue?1:0}class zee{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new zee(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class Mee{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let n,i;t===-1?(n=e,i=""):(n=e.substring(0,t),i=e.substring(t+1));const r=this._children.get(n);return typeof r<"u"?r.match(i):this._mainRule}insert(e,t,n,i){if(e===""){this._mainRule.acceptOverwrite(t,n,i);return}const r=e.indexOf(".");let a,o;r===-1?(a=e,o=""):(a=e.substring(0,r),o=e.substring(r+1));let s=this._children.get(a);typeof s>"u"&&(s=new Mee(this._mainRule.clone()),this._children.set(a,s)),s.insert(o,t,n,i)}}function ict(u){const e=[];for(let t=1,n=u.length;t({format:i.format,location:i.location.toString()}))}}u.toJSONObject=e;function t(n){const i=r=>io(r)?r:void 0;if(n&&Array.isArray(n.src)&&n.src.every(r=>io(r.format)&&io(r.location)))return{weight:i(n.weight),style:i(n.style),src:n.src.map(r=>({format:r.format,location:dt.parse(r.location)}))}}u.fromJSONObject=t})(A0e||(A0e={}));class cct{constructor(){this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:v("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:v("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${st.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,i){const r=this.iconsById[e];if(r){if(n&&!r.description){r.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const s=this.iconReferenceSchema.enum.indexOf(e);s!==-1&&(this.iconReferenceSchema.enumDescriptions[s]=n),this._onDidChange.fire()}return r}const a={id:e,description:n,defaults:t,deprecationMessage:i};this.iconsById[e]=a;const o={$ref:"#/definitions/icons"};return i&&(o.deprecationMessage=i),n&&(o.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=o,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(r,a)=>r.id.localeCompare(a.id),t=r=>{for(;st.isThemeIcon(r.defaults);)r=this.iconsById[r.defaults.id];return`codicon codicon-${r?r.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const i=Object.keys(this.iconsById).map(r=>this.iconsById[r]);for(const r of i.filter(a=>!!a.description).sort(e))n.push(`||${r.id}|${st.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const r of i.filter(a=>!st.isThemeIcon(a.defaults)).sort(e))n.push(`||${r.id}|`);return n.join(` `)}}const Rp=new cct;jn.add(lct.IconContribution,Rp);function hi(u,e,t,n){return Rp.registerIcon(u,e,t,n)}function C2e(){return Rp}function dct(){const u=wve();for(const e in u){const t="\\"+u[e].toString(16);Rp.registerIcon(e,{fontCharacter:t})}}dct();const b2e="vscode://schemas/icons",k2e=jn.as(iP.JSONContribution);k2e.registerSchema(b2e,Rp.getIconSchema());const _0e=new Hu(()=>k2e.notifySchemaChanged(b2e),200);Rp.onDidChange(()=>{_0e.isScheduled()||_0e.schedule()});const F2e=hi("widget-close",we.close,v("widgetClose","Icon for the close action in widgets."));hi("goto-previous-location",we.arrowUp,v("previousChangeIcon","Icon for goto previous editor location."));hi("goto-next-location",we.arrowDown,v("nextChangeIcon","Icon for goto next editor location."));st.modify(we.sync,"spin");st.modify(we.loading,"spin");function hct(u){const e=new pe,t=e.add(new Q),n=C2e();return e.add(n.onDidChange(()=>t.fire())),u&&e.add(u.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const i=u?u.getProductIconTheme():new y2e,r={},a=s=>{const l=i.getIcon(s);if(!l)return;const c=l.font;return c?(r[c.id]=c.definition,`.codicon-${s.id}:before { content: '${l.fontCharacter}'; font-family: ${vae(c.id)}; }`):`.codicon-${s.id}:before { content: '${l.fontCharacter}'; }`},o=[];for(const s of n.getIcons()){const l=a(s);l&&o.push(l)}for(const s in r){const l=r[s],c=l.weight?`font-weight: ${l.weight};`:"",d=l.style?`font-style: ${l.style};`:"",h=l.src.map(E=>`${Nm(E.location)} format('${E.format}')`).join(", ");o.push(`@font-face { src: ${h}; font-family: ${vae(s)};${c}${d} font-display: block; }`)}return o.join(` -`)}}}class y2e{getIcon(e){const t=C2e();let n=e.defaults;for(;st.isThemeIcon(n);){const i=t.getIcon(n.id);if(!i)return;n=i.defaults}return n}}const Mh="vs",vx="vs-dark",s3="hc-black",l3="hc-light",A2e=jn.as(J6e.ColorContribution),Ect=jn.as(hCe.ThemingContribution);class _2e{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const n=t.base;e.length>0?(l8(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,ae.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=tU(this.themeData.base);for(const n in t.colors)e.has(n)||e.set(n,ae.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){const n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=A2e.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Mh:return x0.LIGHT;case s3:return x0.HIGH_CONTRAST_DARK;case l3:return x0.HIGH_CONTRAST_LIGHT;default:return x0.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const r=tU(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],i=this.themeData.colors["editor.background"];if(n||i){const r={token:""};n&&(r.foreground=n),i&&(r.background=i),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=v2e.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const r=this.tokenTheme._match([e].concat(t).join(".")).metadata,a=Jr.getForeground(r),o=Jr.getFontStyle(r);return{foreground:a,italic:!!(o&1),bold:!!(o&2),underline:!!(o&4),strikethrough:!!(o&8)}}}function l8(u){return u===Mh||u===vx||u===s3||u===l3}function tU(u){switch(u){case Mh:return rct;case vx:return act;case s3:return oct;case l3:return sct}}function B9(u){const e=tU(u);return new _2e(u,e)}class mct extends ne{constructor(){super(),this._onColorThemeChange=this._register(new Q),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new Q),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new y2e,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Mh,B9(Mh)),this._knownThemes.set(vx,B9(vx)),this._knownThemes.set(s3,B9(s3)),this._knownThemes.set(l3,B9(l3));const e=this._register(hct(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Mh),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),Hve("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return bB(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=N0(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),ne.None}_registerShadowDomContainer(e){const t=N0(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Mh),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==$c(this._theme.type)){let t;iv(this._theme.type)?t=e?s3:vx:t=e?l3:Mh,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},n={addRule:a=>{t[a]||(e.push(a),t[a]=!0)}};Ect.getThemingParticipants().forEach(a=>a(this._theme,n,this._environment));const i=[];for(const a of A2e.getColors()){const o=this._theme.getColor(a.id,!0);o&&i.push(`${gX(a.id)}: ${o.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor { ${i.join(` +`)}}}class y2e{getIcon(e){const t=C2e();let n=e.defaults;for(;st.isThemeIcon(n);){const i=t.getIcon(n.id);if(!i)return;n=i.defaults}return n}}const Mh="vs",vx="vs-dark",s3="hc-black",l3="hc-light",A2e=jn.as(J6e.ColorContribution),Ect=jn.as(hCe.ThemingContribution);class _2e{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const n=t.base;e.length>0?(l8(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,ae.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=tU(this.themeData.base);for(const n in t.colors)e.has(n)||e.set(n,ae.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){const n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=A2e.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Mh:return v0.LIGHT;case s3:return v0.HIGH_CONTRAST_DARK;case l3:return v0.HIGH_CONTRAST_LIGHT;default:return v0.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const r=tU(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],i=this.themeData.colors["editor.background"];if(n||i){const r={token:""};n&&(r.foreground=n),i&&(r.background=i),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=v2e.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const r=this.tokenTheme._match([e].concat(t).join(".")).metadata,a=Jr.getForeground(r),o=Jr.getFontStyle(r);return{foreground:a,italic:!!(o&1),bold:!!(o&2),underline:!!(o&4),strikethrough:!!(o&8)}}}function l8(u){return u===Mh||u===vx||u===s3||u===l3}function tU(u){switch(u){case Mh:return rct;case vx:return act;case s3:return oct;case l3:return sct}}function B9(u){const e=tU(u);return new _2e(u,e)}class mct extends ne{constructor(){super(),this._onColorThemeChange=this._register(new Q),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new Q),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new y2e,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Mh,B9(Mh)),this._knownThemes.set(vx,B9(vx)),this._knownThemes.set(s3,B9(s3)),this._knownThemes.set(l3,B9(l3));const e=this._register(hct(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Mh),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),Hve("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return bB(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=P0(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),ne.None}_registerShadowDomContainer(e){const t=P0(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Mh),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==$c(this._theme.type)){let t;iv(this._theme.type)?t=e?s3:vx:t=e?l3:Mh,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},n={addRule:a=>{t[a]||(e.push(a),t[a]=!0)}};Ect.getThemingParticipants().forEach(a=>a(this._theme,n,this._environment));const i=[];for(const a of A2e.getColors()){const o=this._theme.getColor(a.id,!0);o&&i.push(`${gX(a.id)}: ${o.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor { ${i.join(` `)} }`);const r=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(ict(r)),this._themeCSS=e.join(` `),this._updateCSS(),qn.setColorMap(r),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const r0=Ut("themeService");var gct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},pH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let uU=class extends ne{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new Q,this._onDidChangeReducedMotion=new Q,this._accessibilityModeEnabledContext=lA.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire()),a.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),i(),this._register(this.onDidChangeScreenReaderOptimized(()=>i()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(ce(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const n=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",n),this._layoutService.container.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};uU=gct([pH(0,pt),pH(1,f6),pH(2,tu)],uU);var $P=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},I3=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},qD,nE;let nU=class{constructor(e,t){this._commandService=e,this._hiddenStates=new Fw(t)}createMenu(e,t,n){return new rU(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};nU=$P([I3(0,ni),I3(1,Ul)],nU);let Fw=qD=class{constructor(e){this._storageService=e,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(qD._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,qD._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(qD._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var n;return(n=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&n!==void 0?n:!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){var n,i;const r=this._isHiddenByDefault(e,t),a=(i=(n=this._data[e.id])===null||n===void 0?void 0:n.includes(t))!==null&&i!==void 0?i:!1;return r?!a:a}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);const r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){const a=r.indexOf(t);a>=0&&DGe(r,a),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(qD._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};Fw._key="menu.hiddenCommands";Fw=qD=$P([I3(0,Ul)],Fw);let iU=nE=class{constructor(e,t,n,i,r){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=n,this._commandService=i,this._contextKeyService=r,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=Lr.getMenuItems(this._id);let t;e.sort(nE._compareMenuItems);for(const n of e){const i=n.group||"";(!t||t[0]!==i)&&(t=[i,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(nE._fillInKbExprKeys(e.when,this._structureContextKeys),s5(e)){if(e.command.precondition&&nE._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;nE._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&Lr.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const n of this._menuGroups){const[i,r]=n,a=[];for(const o of r)if(this._contextKeyService.contextMatchesRules(o.when)){const s=s5(o);s&&this._hiddenStates.setDefaultState(this._id,o.command.id,!!o.isHiddenByDefault);const l=fct(this._id,s?o.command:o,this._hiddenStates);if(s)a.push(new zl(o.command,o.alt,e,l,this._contextKeyService,this._commandService));else{const c=new nE(o.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),d=Dr.join(...c.map(h=>h[1]));d.length>0&&a.push(new dk(o,l,d))}}a.length>0&&t.push([i,a])}return t}static _fillInKbExprKeys(e,t){if(e)for(const n of e.keys())t.add(n)}static _compareMenuItems(e,t){const n=e.group,i=t.group;if(n!==i){if(n){if(!i)return-1}else return 1;if(n==="navigation")return-1;if(i==="navigation")return 1;const o=n.localeCompare(i);if(o!==0)return o}const r=e.order||0,a=t.order||0;return ra?1:nE._compareTitles(s5(e)?e.command.title:e.title,s5(t)?t.command.title:t.title)}static _compareTitles(e,t){const n=typeof e=="string"?e:e.original,i=typeof t=="string"?t:t.original;return n.localeCompare(i)}};iU=nE=$P([I3(3,ni),I3(4,pt)],iU);let rU=class{constructor(e,t,n,i,r){this._disposables=new pe,this._menuInfo=new iU(e,t,n.emitEventsForSubmenuChanges,i,r);const a=new Hu(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Lr.onDidChangeMenu(c=>{c.has(e)&&a.schedule()}));const o=this._disposables.add(new pe),s=c=>{let d=!1,h=!1,E=!1;for(const m of c)if(d=d||m.isStructuralChange,h=h||m.isEnablementChange,E=E||m.isToggleChange,d&&h&&E)break;return{menu:this,isStructuralChange:d,isEnablementChange:h,isToggleChange:E}},l=()=>{o.add(r.onDidChangeContext(c=>{const d=c.affectsSome(this._menuInfo.structureContextKeys),h=c.affectsSome(this._menuInfo.preconditionContextKeys),E=c.affectsSome(this._menuInfo.toggledContextKeys);(d||h||E)&&this._onDidChange.fire({menu:this,isStructuralChange:d,isEnablementChange:h,isToggleChange:E})})),o.add(t.onDidChange(c=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new xve({onWillAddFirstListener:l,onDidRemoveLastListener:o.clear.bind(o),delay:n.eventDebounceDelay,merge:s}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};rU=$P([I3(3,ni),I3(4,pt)],rU);function fct(u,e,t){const n=lJe(e)?e.submenu.id:e.id,i=typeof e.title=="string"?e.title:e.title.value,r=tx({id:`hide/${u.id}/${n}`,label:v("hide.label","Hide '{0}'",i),run(){t.updateHidden(u,n,!0)}}),a=tx({id:`toggle/${u.id}/${n}`,label:i,get checked(){return!t.isHidden(u,n)},run(){t.updateHidden(u,n,!!this.checked)}});return{hide:r,toggle:a,get isHidden(){return!a.checked}}}var pct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},S0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gg=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let aU=class extends ne{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(l4||Vve)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new QN;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(n=>Gg(this,void 0,void 0,function*(){(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)}))};this.layoutService.hasContainer&&(this._register(ce(this.layoutService.container,"click",e)),this._register(ce(this.layoutService.container,"keydown",e)))}writeText(e,t){return Gg(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(r){console.error(r)}const n=document.activeElement,i=document.body.appendChild(ve("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(i)})}readText(e){return Gg(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}})}readFindText(){return Gg(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return Gg(this,void 0,void 0,function*(){this.findText=e})}writeResources(e){return Gg(this,void 0,void 0,function*(){this.resources=e})}readResources(){return Gg(this,void 0,void 0,function*(){return this.resources})}};aU=pct([S0e(0,f6),S0e(1,i0)],aU);const _4=Ut("clipboardService");var Dct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xct=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const m2="data-keybinding-context";let Tee=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},fv=class extends Tee{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};fv.INSTANCE=new fv;class Qk extends Tee{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=px.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(i=>{if(i.source===7){const r=Array.from(this._values,([a])=>a);this._values.clear(),n.fire(new w0e(r))}else{const r=[];for(const a of i.affectedKeys){const o=`config.${a}`,s=this._values.findSuperstr(o);s!==void 0&&(r.push(...$t.map(s,([l])=>l)),this._values.deleteSuperstr(o)),this._values.has(o)&&(r.push(o),this._values.delete(o))}n.fire(new w0e(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Qk._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Qk._keyPrefix.length),n=this._configurationService.getValue(t);let i;switch(typeof n){case"number":case"boolean":case"string":i=n;break;default:Array.isArray(n)?i=JSON.stringify(n):i=n}return this._values.set(e,i),i}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Qk._keyPrefix="config.";class vct{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class B0e{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class w0e{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class Cct{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function bct(u,e){return u.allKeysContainedIn(new Set(Object.keys(e)))}class S2e extends ne{constructor(e){super(),this._onDidChangeContext=this._register(new F3({merge:t=>new Cct(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new vct(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new kct(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new B0e(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new B0e(e))}getContext(e){return this._isDisposed?fv.INSTANCE:this.getContextValuesContainer(Fct(e))}dispose(){super.dispose(),this._isDisposed=!0}}let oU=class extends S2e{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new Qk(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?fv.INSTANCE:this._contexts.get(e)||fv.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Tee(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};oU=Dct([xct(0,tu)],oU);class kct extends S2e{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Ir),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(m2)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(m2,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const n=this._parent.getContextValuesContainer(this._myContextId).value;bct(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(m2),super.dispose())}getContextValuesContainer(e){return this._isDisposed?fv.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function Fct(u){for(;u;){if(u.hasAttribute(m2)){const e=u.getAttribute(m2);return e?parseInt(e,10):NaN}u=u.parentElement}return 0}function yct(u,e,t){u.get(pt).createKey(String(e),Act(t))}function Act(u){return ave(u,e=>{if(typeof e=="object"&&e.$mid===1)return dt.revive(e).toString();if(e instanceof dt)return e.toString()})}ru.registerCommand("_setContext",yct);ru.registerCommand({id:"getContextKeyInfo",handler(){return[...Pe.all()].sort((u,e)=>u.key.localeCompare(e.key))},description:{description:v("getContextKeyInfo","A command that returns information about context keys"),args:[]}});ru.registerCommand("_generateContextKeyInfo",function(){const u=[],e=new Set;for(const t of Pe.all())e.has(t.key)||(e.add(t.key),u.push(t));u.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(u,void 0,2))});let _ct=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class L0e{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing.set(i.key,i),i.incoming.set(n.key,n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new _ct(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,n]of this._nodes)e.push(`${t} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const a0=Ut("themeService");var gct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},pH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let uU=class extends ne{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new Q,this._onDidChangeReducedMotion=new Q,this._accessibilityModeEnabledContext=lA.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire()),a.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),i(),this._register(this.onDidChangeScreenReaderOptimized(()=>i()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(ce(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const n=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",n),this._layoutService.container.classList.toggle("enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};uU=gct([pH(0,pt),pH(1,f6),pH(2,tu)],uU);var $P=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},I3=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},qD,nE;let nU=class{constructor(e,t){this._commandService=e,this._hiddenStates=new Fw(t)}createMenu(e,t,n){return new rU(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},n),this._commandService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};nU=$P([I3(0,ni),I3(1,Ul)],nU);let Fw=qD=class{constructor(e){this._storageService=e,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(qD._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,qD._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(qD._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var n;return(n=this._hiddenByDefaultCache.get(`${e.id}/${t}`))!==null&&n!==void 0?n:!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){var n,i;const r=this._isHiddenByDefault(e,t),a=(i=(n=this._data[e.id])===null||n===void 0?void 0:n.includes(t))!==null&&i!==void 0?i:!1;return r?!a:a}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);const r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){const a=r.indexOf(t);a>=0&&DGe(r,a),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(qD._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};Fw._key="menu.hiddenCommands";Fw=qD=$P([I3(0,Ul)],Fw);let iU=nE=class{constructor(e,t,n,i,r){this._id=e,this._hiddenStates=t,this._collectContextKeysForSubmenus=n,this._commandService=i,this._contextKeyService=r,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=Lr.getMenuItems(this._id);let t;e.sort(nE._compareMenuItems);for(const n of e){const i=n.group||"";(!t||t[0]!==i)&&(t=[i,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(e){if(nE._fillInKbExprKeys(e.when,this._structureContextKeys),s5(e)){if(e.command.precondition&&nE._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;nE._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&Lr.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}createActionGroups(e){const t=[];for(const n of this._menuGroups){const[i,r]=n,a=[];for(const o of r)if(this._contextKeyService.contextMatchesRules(o.when)){const s=s5(o);s&&this._hiddenStates.setDefaultState(this._id,o.command.id,!!o.isHiddenByDefault);const l=fct(this._id,s?o.command:o,this._hiddenStates);if(s)a.push(new zl(o.command,o.alt,e,l,this._contextKeyService,this._commandService));else{const c=new nE(o.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(e),d=Dr.join(...c.map(h=>h[1]));d.length>0&&a.push(new dk(o,l,d))}}a.length>0&&t.push([i,a])}return t}static _fillInKbExprKeys(e,t){if(e)for(const n of e.keys())t.add(n)}static _compareMenuItems(e,t){const n=e.group,i=t.group;if(n!==i){if(n){if(!i)return-1}else return 1;if(n==="navigation")return-1;if(i==="navigation")return 1;const o=n.localeCompare(i);if(o!==0)return o}const r=e.order||0,a=t.order||0;return ra?1:nE._compareTitles(s5(e)?e.command.title:e.title,s5(t)?t.command.title:t.title)}static _compareTitles(e,t){const n=typeof e=="string"?e:e.original,i=typeof t=="string"?t:t.original;return n.localeCompare(i)}};iU=nE=$P([I3(3,ni),I3(4,pt)],iU);let rU=class{constructor(e,t,n,i,r){this._disposables=new pe,this._menuInfo=new iU(e,t,n.emitEventsForSubmenuChanges,i,r);const a=new Hu(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Lr.onDidChangeMenu(c=>{c.has(e)&&a.schedule()}));const o=this._disposables.add(new pe),s=c=>{let d=!1,h=!1,E=!1;for(const m of c)if(d=d||m.isStructuralChange,h=h||m.isEnablementChange,E=E||m.isToggleChange,d&&h&&E)break;return{menu:this,isStructuralChange:d,isEnablementChange:h,isToggleChange:E}},l=()=>{o.add(r.onDidChangeContext(c=>{const d=c.affectsSome(this._menuInfo.structureContextKeys),h=c.affectsSome(this._menuInfo.preconditionContextKeys),E=c.affectsSome(this._menuInfo.toggledContextKeys);(d||h||E)&&this._onDidChange.fire({menu:this,isStructuralChange:d,isEnablementChange:h,isToggleChange:E})})),o.add(t.onDidChange(c=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new xve({onWillAddFirstListener:l,onDidRemoveLastListener:o.clear.bind(o),delay:n.eventDebounceDelay,merge:s}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};rU=$P([I3(3,ni),I3(4,pt)],rU);function fct(u,e,t){const n=lJe(e)?e.submenu.id:e.id,i=typeof e.title=="string"?e.title:e.title.value,r=tx({id:`hide/${u.id}/${n}`,label:v("hide.label","Hide '{0}'",i),run(){t.updateHidden(u,n,!0)}}),a=tx({id:`toggle/${u.id}/${n}`,label:i,get checked(){return!t.isHidden(u,n)},run(){t.updateHidden(u,n,!!this.checked)}});return{hide:r,toggle:a,get isHidden(){return!a.checked}}}var pct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},S0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gg=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let aU=class extends ne{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],(l4||Vve)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const t=new QN;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(n=>Gg(this,void 0,void 0,function*(){(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)}))};this.layoutService.hasContainer&&(this._register(ce(this.layoutService.container,"click",e)),this._register(ce(this.layoutService.container,"keydown",e)))}writeText(e,t){return Gg(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,e);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(r){console.error(r)}const n=document.activeElement,i=document.body.appendChild(ve("textarea",{"aria-hidden":!0}));i.style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),n instanceof HTMLElement&&n.focus(),document.body.removeChild(i)})}readText(e){return Gg(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}})}readFindText(){return Gg(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return Gg(this,void 0,void 0,function*(){this.findText=e})}writeResources(e){return Gg(this,void 0,void 0,function*(){this.resources=e})}readResources(){return Gg(this,void 0,void 0,function*(){return this.resources})}};aU=pct([S0e(0,f6),S0e(1,r0)],aU);const _4=Ut("clipboardService");var Dct=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xct=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const m2="data-keybinding-context";let Tee=class{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return Object.assign({},this._value)}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}},fv=class extends Tee{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};fv.INSTANCE=new fv;class Qk extends Tee{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=px.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(i=>{if(i.source===7){const r=Array.from(this._values,([a])=>a);this._values.clear(),n.fire(new w0e(r))}else{const r=[];for(const a of i.affectedKeys){const o=`config.${a}`,s=this._values.findSuperstr(o);s!==void 0&&(r.push(...$t.map(s,([l])=>l)),this._values.deleteSuperstr(o)),this._values.has(o)&&(r.push(o),this._values.delete(o))}n.fire(new w0e(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Qk._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Qk._keyPrefix.length),n=this._configurationService.getValue(t);let i;switch(typeof n){case"number":case"boolean":case"string":i=n;break;default:Array.isArray(n)?i=JSON.stringify(n):i=n}return this._values.set(e,i),i}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Qk._keyPrefix="config.";class vct{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class B0e{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class w0e{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class Cct{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function bct(u,e){return u.allKeysContainedIn(new Set(Object.keys(e)))}class S2e extends ne{constructor(e){super(),this._onDidChangeContext=this._register(new F3({merge:t=>new Cct(t)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new vct(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new kct(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new B0e(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new B0e(e))}getContext(e){return this._isDisposed?fv.INSTANCE:this.getContextValuesContainer(Fct(e))}dispose(){super.dispose(),this._isDisposed=!0}}let oU=class extends S2e{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new Qk(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?fv.INSTANCE:this._contexts.get(e)||fv.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Tee(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};oU=Dct([xct(0,tu)],oU);class kct extends S2e{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Ir),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(m2)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(m2,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const n=this._parent.getContextValuesContainer(this._myContextId).value;bct(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(m2),super.dispose())}getContextValuesContainer(e){return this._isDisposed?fv.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function Fct(u){for(;u;){if(u.hasAttribute(m2)){const e=u.getAttribute(m2);return e?parseInt(e,10):NaN}u=u.parentElement}return 0}function yct(u,e,t){u.get(pt).createKey(String(e),Act(t))}function Act(u){return ave(u,e=>{if(typeof e=="object"&&e.$mid===1)return dt.revive(e).toString();if(e instanceof dt)return e.toString()})}ru.registerCommand("_setContext",yct);ru.registerCommand({id:"getContextKeyInfo",handler(){return[...Pe.all()].sort((u,e)=>u.key.localeCompare(e.key))},description:{description:v("getContextKeyInfo","A command that returns information about context keys"),args:[]}});ru.registerCommand("_generateContextKeyInfo",function(){const u=[],e=new Set;for(const t of Pe.all())e.has(t.key)||(e.add(t.key),u.push(t));u.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(u,void 0,2))});let _ct=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class L0e{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing.set(i.key,i),i.incoming.set(n.key,n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new _ct(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,n]of this._nodes)e.push(`${t} (-> incoming)[${[...n.incoming.keys()].join(", ")}] (outgoing ->)[${[...n.outgoing.keys()].join(",")}] `);return e.join(` @@ -654,41 +654,41 @@ ${e.toString()}`}}class yw{constructor(e=new CP,t=!1,n,i=Sct){var r;this._servic `)}const i=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Fo._totals.toFixed(2)}ms)`];(e>2||t)&&Fo.all.add(i.join(` `))}}Fo.all=new Set;Fo._None=new class extends Fo{constructor(){super(0,null)}stop(){}branch(){return this}};Fo._totals=0;const Bct=new Set([Ot.inMemory,Ot.vscodeSourceControl,Ot.walkThrough,Ot.walkThroughSnippet]);class wct{constructor(){this._byResource=new ma,this._byOwner=new Map}set(e,t,n){let i=this._byResource.get(e);i||(i=new Map,this._byResource.set(e,i)),i.set(t,n);let r=this._byOwner.get(t);r||(r=new ma,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){const n=this._byResource.get(e);return n==null?void 0:n.get(t)}delete(e,t){let n=!1,i=!1;const r=this._byResource.get(e);r&&(n=r.delete(t));const a=this._byOwner.get(t);if(a&&(i=a.delete(e)),n!==i)throw new Error("illegal state");return n&&i}values(e){var t,n,i,r;return typeof e=="string"?(n=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&n!==void 0?n:$t.empty():dt.isUri(e)?(r=(i=this._byResource.get(e))===null||i===void 0?void 0:i.values())!==null&&r!==void 0?r:$t.empty():$t.map($t.concat(...this._byOwner.values()),a=>a[1])}}class Lct{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new ma,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const n=this._data.get(t);n&&this._substract(n);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Bct.has(e.scheme))return t;for(const{severity:n}of this._service.read({resource:e}))n===Yn.Error?t.errors+=1:n===Yn.Warning?t.warnings+=1:n===Yn.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class lE{constructor(){this._onMarkerChanged=new xve({delay:0,merge:lE._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new wct,this._stats=new Lct(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(eve(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const i=[];for(const r of n){const a=lE._toMarker(e,t,r);a&&i.push(a)}this._data.set(t,e,i),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:i,severity:r,message:a,source:o,startLineNumber:s,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:E}=n;if(a)return s=s>0?s:1,l=l>0?l:1,c=c>=s?c:s,d=d>0?d:l,{resource:t,owner:e,code:i,severity:r,message:a,source:o,startLineNumber:s,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:E}}changeAll(e,t){const n=[],i=this._data.values(e);if(i)for(const r of i){const a=$t.first(r);a&&(n.push(a.resource),this._data.delete(a.resource,e))}if(pa(t)){const r=new ma;for(const{resource:a,marker:o}of t){const s=lE._toMarker(e,a,o);if(!s)continue;const l=r.get(a);l?l.push(s):(r.set(a,[s]),n.push(a))}for(const[a,o]of r)this._data.set(a,e,o)}n.length>0&&this._onMarkerChanged.fire(n)}read(e=Object.create(null)){let{owner:t,resource:n,severities:i,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){const a=this._data.get(n,t);if(a){const o=[];for(const s of a)if(lE._accept(s,i)){const l=o.push(s);if(r>0&&l===r)break}return o}else return[]}else if(!t&&!n){const a=[];for(const o of this._data.values())for(const s of o)if(lE._accept(s,i)){const l=a.push(s);if(r>0&&l===r)return a}return a}else{const a=this._data.values(n??t),o=[];for(const s of a)for(const l of s)if(lE._accept(l,i)){const c=o.push(l);if(r>0&&c===r)return o}return o}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new ma;for(const n of e)for(const i of n)t.set(i,!0);return Array.from(t.keys())}}class zct extends ne{constructor(){super(...arguments),this._configurationModel=new ca}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new ca;const e=jn.as(Ed.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const n=this.getConfigurationDefaultOverrides();for(const i of e){const r=n[i],a=t[i];r!==void 0?this._configurationModel.addValue(i,r):a?this._configurationModel.addValue(i,a.default):this._configurationModel.removeValue(i)}}}const _A=Ut("audioCue");class jt{static register(e){return new jt(e.fileName)}constructor(e){this.fileName=e}}jt.error=jt.register({fileName:"error.mp3"});jt.warning=jt.register({fileName:"warning.mp3"});jt.foldedArea=jt.register({fileName:"foldedAreas.mp3"});jt.break=jt.register({fileName:"break.mp3"});jt.quickFixes=jt.register({fileName:"quickFixes.mp3"});jt.taskCompleted=jt.register({fileName:"taskCompleted.mp3"});jt.taskFailed=jt.register({fileName:"taskFailed.mp3"});jt.terminalBell=jt.register({fileName:"terminalBell.mp3"});jt.diffLineInserted=jt.register({fileName:"diffLineInserted.mp3"});jt.diffLineDeleted=jt.register({fileName:"diffLineDeleted.mp3"});jt.diffLineModified=jt.register({fileName:"diffLineModified.mp3"});jt.chatRequestSent=jt.register({fileName:"chatRequestSent.mp3"});jt.chatResponsePending=jt.register({fileName:"chatResponsePending.mp3"});jt.chatResponseReceived1=jt.register({fileName:"chatResponseReceived1.mp3"});jt.chatResponseReceived2=jt.register({fileName:"chatResponseReceived2.mp3"});jt.chatResponseReceived3=jt.register({fileName:"chatResponseReceived3.mp3"});jt.chatResponseReceived4=jt.register({fileName:"chatResponseReceived4.mp3"});class Mct{constructor(e){this.randomOneOf=e}}class hu{static register(e){const t=new Mct("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new hu(t,e.name,e.settingsKey);return hu._audioCues.add(n),n}constructor(e,t,n){this.sound=e,this.name=t,this.settingsKey=n}}hu._audioCues=new Set;hu.error=hu.register({name:v("audioCues.lineHasError.name","Error on Line"),sound:jt.error,settingsKey:"audioCues.lineHasError"});hu.warning=hu.register({name:v("audioCues.lineHasWarning.name","Warning on Line"),sound:jt.warning,settingsKey:"audioCues.lineHasWarning"});hu.foldedArea=hu.register({name:v("audioCues.lineHasFoldedArea.name","Folded Area on Line"),sound:jt.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"});hu.break=hu.register({name:v("audioCues.lineHasBreakpoint.name","Breakpoint on Line"),sound:jt.break,settingsKey:"audioCues.lineHasBreakpoint"});hu.inlineSuggestion=hu.register({name:v("audioCues.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:jt.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"});hu.terminalQuickFix=hu.register({name:v("audioCues.terminalQuickFix.name","Terminal Quick Fix"),sound:jt.quickFixes,settingsKey:"audioCues.terminalQuickFix"});hu.onDebugBreak=hu.register({name:v("audioCues.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:jt.break,settingsKey:"audioCues.onDebugBreak"});hu.noInlayHints=hu.register({name:v("audioCues.noInlayHints","No Inlay Hints on Line"),sound:jt.error,settingsKey:"audioCues.noInlayHints"});hu.taskCompleted=hu.register({name:v("audioCues.taskCompleted","Task Completed"),sound:jt.taskCompleted,settingsKey:"audioCues.taskCompleted"});hu.taskFailed=hu.register({name:v("audioCues.taskFailed","Task Failed"),sound:jt.taskFailed,settingsKey:"audioCues.taskFailed"});hu.terminalCommandFailed=hu.register({name:v("audioCues.terminalCommandFailed","Terminal Command Failed"),sound:jt.error,settingsKey:"audioCues.terminalCommandFailed"});hu.terminalBell=hu.register({name:v("audioCues.terminalBell","Terminal Bell"),sound:jt.terminalBell,settingsKey:"audioCues.terminalBell"});hu.notebookCellCompleted=hu.register({name:v("audioCues.notebookCellCompleted","Notebook Cell Completed"),sound:jt.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"});hu.notebookCellFailed=hu.register({name:v("audioCues.notebookCellFailed","Notebook Cell Failed"),sound:jt.taskFailed,settingsKey:"audioCues.notebookCellFailed"});hu.diffLineInserted=hu.register({name:v("audioCues.diffLineInserted","Diff Line Inserted"),sound:jt.diffLineInserted,settingsKey:"audioCues.diffLineInserted"});hu.diffLineDeleted=hu.register({name:v("audioCues.diffLineDeleted","Diff Line Deleted"),sound:jt.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"});hu.diffLineModified=hu.register({name:v("audioCues.diffLineModified","Diff Line Modified"),sound:jt.diffLineModified,settingsKey:"audioCues.diffLineModified"});hu.chatRequestSent=hu.register({name:v("audioCues.chatRequestSent","Chat Request Sent"),sound:jt.chatRequestSent,settingsKey:"audioCues.chatRequestSent"});hu.chatResponseReceived=hu.register({name:v("audioCues.chatResponseReceived","Chat Response Received"),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[jt.chatResponseReceived1,jt.chatResponseReceived2,jt.chatResponseReceived3,jt.chatResponseReceived4]}});hu.chatResponsePending=hu.register({name:v("audioCues.chatResponsePending","Chat Response Pending"),sound:jt.chatResponsePending,settingsKey:"audioCues.chatResponsePending"});class Tct extends ne{constructor(e,t=[]){super(),this.logger=new dJe([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}const B2e=[];function KP(u){B2e.push(u)}function Nct(){return B2e.slice(0)}var xg=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Br=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Cx=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Pct{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new Q}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let sU=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new PUe(new Pct(t))):Promise.reject(new Error("Model not found"))}};sU=xg([Br(0,_n)],sU);class WP{show(){return WP.NULL_PROGRESS_RUNNER}showWhile(e,t){return Cx(this,void 0,void 0,function*(){yield e})}}WP.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Rct{withProgress(e,t,n){return t({report:()=>{}})}}class Ict{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Oct{confirm(e){return Cx(this,void 0,void 0,function*(){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}})}doConfirm(e,t){let n=e;return t&&(n=n+` -`+t),window.confirm(n)}prompt(e){var t,n;return Cx(this,void 0,void 0,function*(){let i;if(this.doConfirm(e.message,e.detail)){const a=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&a.push(e.cancelButton),i=yield(n=a[0])===null||n===void 0?void 0:n.run({checkboxChecked:!1})}return{result:i}})}error(e,t){return Cx(this,void 0,void 0,function*(){yield this.prompt({type:si.Error,message:e,detail:t})})}}class Xk{info(e){return this.notify({severity:si.Info,message:e})}warn(e){return this.notify({severity:si.Warning,message:e})}error(e){return this.notify({severity:si.Error,message:e})}notify(e){switch(e.severity){case si.Error:console.error(e.message);break;case si.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Xk.NO_OP}prompt(e,t,n,i){return Xk.NO_OP}status(e,t){return ne.None}}Xk.NO_OP=new $rt;let lU=class{constructor(e){this._onWillExecuteCommand=new Q,this._onDidExecuteCommand=new Q,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=ru.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const i=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(i)}catch(i){return Promise.reject(i)}}};lU=xg([Br(0,mt)],lU);let pv=class extends Yat{constructor(e,t,n,i,r,a){super(e,t,n,i,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const o=E=>{const m=new pe;m.add(ce(E,Me.KEY_DOWN,g=>{const f=new ln(g);this._dispatch(f,f.target)&&(f.preventDefault(),f.stopPropagation())})),m.add(ce(E,Me.KEY_UP,g=>{const f=new ln(g);this._singleModifierDispatch(f,f.target)&&f.preventDefault()})),this._domNodeListeners.push(new jct(E,m))},s=E=>{for(let m=0;m{E.getOption(61)||o(E.getContainerDomNode())},c=E=>{E.getOption(61)||s(E.getContainerDomNode())};this._register(a.onCodeEditorAdd(l)),this._register(a.onCodeEditorRemove(c)),a.listCodeEditors().forEach(l);const d=E=>{o(E.getContainerDomNode())},h=E=>{s(E.getContainerDomNode())};this._register(a.onDiffEditorAdd(d)),this._register(a.onDiffEditorRemove(h)),a.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,n,i){return Fl(ru.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:i}]))}addDynamicKeybindings(e){const t=e.map(n=>{var i;return{keybinding:cW(n.keybinding,Is),command:(i=n.command)!==null&&i!==void 0?i:null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),ft(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const n=[];let i=0;for(const r of e){const a=r.when||void 0,o=r.keybinding;if(!o)n[i++]=new $se(void 0,r.command,r.commandArgs,a,t,null,!1);else{const s=Ok.resolveKeybinding(o,Is);for(const l of s)n[i++]=new $se(l,r.command,r.commandArgs,a,t,null,!1)}}return n}resolveKeyboardEvent(e){const t=new c4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Ok([t],Is)}};pv=xg([Br(0,pt),Br(1,ni),Br(2,n0),Br(3,bi),Br(4,i0),Br(5,Cu)],pv);class jct extends ne{constructor(e,t){super(),this.domNode=e,this._register(t)}}function M0e(u){return u&&typeof u=="object"&&(!u.overrideIdentifier||typeof u.overrideIdentifier=="string")&&(!u.resource||u.resource instanceof dt)}class w2e{constructor(){this._onDidChangeConfiguration=new Q,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new zct;this._configuration=new yP(e.reload(),new ca,new ca,new ca),e.dispose()}getValue(e,t){const n=typeof e=="string"?e:void 0,i=M0e(e)?e:M0e(t)?t:{};return this._configuration.getValue(n,i,void 0)}updateValues(e){const t={data:this._configuration.toData()},n=[];for(const i of e){const[r,a]=i;this.getValue(r)!==a&&(this._configuration.updateValue(r,a),n.push(r))}if(n.length>0){const i=new Uat({keys:n,overrides:[]},t,this._configuration);i.source=8,i.sourceConfig=null,this._onDidChangeConfiguration.fire(i)}return Promise.resolve()}updateValue(e,t,n,i){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let cU=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new Q,this.configurationService.onDidChangeConfiguration(i=>{this._onDidChangeConfiguration.fire({affectedKeys:i.affectedKeys,affectsConfiguration:(r,a)=>i.affectsConfiguration(a)})})}getValue(e,t,n){const i=ee.isIPosition(t)?t:null,r=i?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,a=e?this.getLanguage(e,i):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:a}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:a})}getLanguage(e,t){const n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};cU=xg([Br(0,tu),Br(1,_n),Br(2,vn)],cU);let dU=class{constructor(e){this.configurationService=e}getEOL(e,t){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Pa||iu?` +`+t),window.confirm(n)}prompt(e){var t,n;return Cx(this,void 0,void 0,function*(){let i;if(this.doConfirm(e.message,e.detail)){const a=[...(t=e.buttons)!==null&&t!==void 0?t:[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&a.push(e.cancelButton),i=yield(n=a[0])===null||n===void 0?void 0:n.run({checkboxChecked:!1})}return{result:i}})}error(e,t){return Cx(this,void 0,void 0,function*(){yield this.prompt({type:si.Error,message:e,detail:t})})}}class Xk{info(e){return this.notify({severity:si.Info,message:e})}warn(e){return this.notify({severity:si.Warning,message:e})}error(e){return this.notify({severity:si.Error,message:e})}notify(e){switch(e.severity){case si.Error:console.error(e.message);break;case si.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Xk.NO_OP}prompt(e,t,n,i){return Xk.NO_OP}status(e,t){return ne.None}}Xk.NO_OP=new $rt;let lU=class{constructor(e){this._onWillExecuteCommand=new Q,this._onDidExecuteCommand=new Q,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=ru.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const i=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(i)}catch(i){return Promise.reject(i)}}};lU=xg([Br(0,mt)],lU);let pv=class extends Yat{constructor(e,t,n,i,r,a){super(e,t,n,i,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const o=E=>{const m=new pe;m.add(ce(E,Me.KEY_DOWN,g=>{const f=new ln(g);this._dispatch(f,f.target)&&(f.preventDefault(),f.stopPropagation())})),m.add(ce(E,Me.KEY_UP,g=>{const f=new ln(g);this._singleModifierDispatch(f,f.target)&&f.preventDefault()})),this._domNodeListeners.push(new jct(E,m))},s=E=>{for(let m=0;m{E.getOption(61)||o(E.getContainerDomNode())},c=E=>{E.getOption(61)||s(E.getContainerDomNode())};this._register(a.onCodeEditorAdd(l)),this._register(a.onCodeEditorRemove(c)),a.listCodeEditors().forEach(l);const d=E=>{o(E.getContainerDomNode())},h=E=>{s(E.getContainerDomNode())};this._register(a.onDiffEditorAdd(d)),this._register(a.onDiffEditorRemove(h)),a.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,n,i){return Fl(ru.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:i}]))}addDynamicKeybindings(e){const t=e.map(n=>{var i;return{keybinding:cW(n.keybinding,Os),command:(i=n.command)!==null&&i!==void 0?i:null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),ft(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const n=[];let i=0;for(const r of e){const a=r.when||void 0,o=r.keybinding;if(!o)n[i++]=new $se(void 0,r.command,r.commandArgs,a,t,null,!1);else{const s=Ok.resolveKeybinding(o,Os);for(const l of s)n[i++]=new $se(l,r.command,r.commandArgs,a,t,null,!1)}}return n}resolveKeyboardEvent(e){const t=new c4(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Ok([t],Os)}};pv=xg([Br(0,pt),Br(1,ni),Br(2,i0),Br(3,bi),Br(4,r0),Br(5,Cu)],pv);class jct extends ne{constructor(e,t){super(),this.domNode=e,this._register(t)}}function M0e(u){return u&&typeof u=="object"&&(!u.overrideIdentifier||typeof u.overrideIdentifier=="string")&&(!u.resource||u.resource instanceof dt)}class w2e{constructor(){this._onDidChangeConfiguration=new Q,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const e=new zct;this._configuration=new yP(e.reload(),new ca,new ca,new ca),e.dispose()}getValue(e,t){const n=typeof e=="string"?e:void 0,i=M0e(e)?e:M0e(t)?t:{};return this._configuration.getValue(n,i,void 0)}updateValues(e){const t={data:this._configuration.toData()},n=[];for(const i of e){const[r,a]=i;this.getValue(r)!==a&&(this._configuration.updateValue(r,a),n.push(r))}if(n.length>0){const i=new Uat({keys:n,overrides:[]},t,this._configuration);i.source=8,i.sourceConfig=null,this._onDidChangeConfiguration.fire(i)}return Promise.resolve()}updateValue(e,t,n,i){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let cU=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new Q,this.configurationService.onDidChangeConfiguration(i=>{this._onDidChangeConfiguration.fire({affectedKeys:i.affectedKeys,affectsConfiguration:(r,a)=>i.affectsConfiguration(a)})})}getValue(e,t,n){const i=ee.isIPosition(t)?t:null,r=i?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,a=e?this.getLanguage(e,i):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:a}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:a})}getLanguage(e,t){const n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};cU=xg([Br(0,tu),Br(1,_n),Br(2,vn)],cU);let dU=class{constructor(e){this.configurationService=e}getEOL(e,t){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:Pa||iu?` `:`\r -`}};dU=xg([Br(0,tu)],dU);class Hct{publicLog2(){}}class eF{constructor(){const e=dt.from({scheme:eF.SCHEME,authority:"model",path:"/"});this.workspace={id:vbe,folders:[new hot({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===eF.SCHEME?this.workspace.folders[0]:null}}eF.SCHEME="inmemory";function Aw(u,e,t){if(!e||!(u instanceof w2e))return;const n=[];Object.keys(e).forEach(i=>{Vat(i)&&n.push([`editor.${i}`,e[i]]),t&&$at(i)&&n.push([`diffEditor.${i}`,e[i]])}),n.length>0&&u.updateValues(n)}let hU=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Cx(this,void 0,void 0,function*(){const n=Array.isArray(e)?e:QX.convert(e),i=new Map;for(const o of n){if(!(o instanceof Zh))throw new Error("bad edit - only text edits are supported");const s=this._modelService.getModel(o.resource);if(!s)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&s.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(s);l||(l=[],i.set(s,l)),l.push(yn.replaceMove(j.lift(o.textEdit.range),o.textEdit.text))}let r=0,a=0;for(const[o,s]of i)o.pushStackElement(),o.pushEditOperations([],s,()=>[]),o.pushStackElement(),a+=1,r+=s.length;return{ariaSummary:y3(fG.bulkEditServiceSummary,r,a),isApplied:r>0}})}};hU=xg([Br(0,_n)],hU);class Vct{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return I0(e)}}let EU=class extends pG{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){const i=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();i&&(t=i.getContainerDomNode())}return super.showContextView(e,t,n)}};EU=xg([Br(0,f6),Br(1,Cu)],EU);class $ct{constructor(){this._neverEmitter=new Q,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Kct extends Vk{constructor(){super()}}class Wct extends Tct{constructor(){super(new cJe)}}let mU=class extends NG{constructor(e,t,n,i,r,a){super(e,t,n,i,r,a),this.configure({blockMouse:!1})}};mU=xg([Br(0,n0),Br(1,bi),Br(2,F4),Br(3,qu),Br(4,$1),Br(5,pt)],mU);class Gct{playAudioCue(e,t){return Cx(this,void 0,void 0,function*(){})}}au(tu,w2e,0);au(sX,cU,0);au(H6e,dU,0);au(M3,eF,0);au(cv,Vct,0);au(n0,Hct,0);au(DA,Oct,0);au(JX,Ict,0);au(bi,Xk,0);au(G1,lE,0);au(vn,Kct,0);au(r0,mct,0);au(i0,Wct,0);au(_n,fw,0);au(mX,jG,0);au(pt,oU,0);au(xbe,Rct,0);au(Dg,WP,0);au(Ul,e0t,0);au(ql,yW,0);au(xA,hU,0);au(Cbe,$ct,0);au(Vo,sU,0);au(k4,uU,0);au(J0,flt,0);au(ni,lU,0);au(qu,pv,0);au(md,eU,0);au(F4,EU,0);au(vs,OG,0);au(_4,aU,0);au(Wl,mU,0);au($1,nU,0);au(_A,Gct,0);var ht;(function(u){const e=new CP;for(const[s,l]of Bae())e.set(s,l);const t=new yw(e,!0);e.set(mt,t);function n(s){i||a({});const l=e.get(s);if(!l)throw new Error("Missing service "+s);return l instanceof Rd?t.invokeFunction(c=>c.get(s)):l}u.get=n;let i=!1;const r=new Q;function a(s){if(i)return t;i=!0;for(const[c,d]of Bae())e.get(c)||e.set(c,d);for(const c in s)if(s.hasOwnProperty(c)){const d=Ut(c);e.get(d)instanceof Rd&&e.set(d,s[c])}const l=Nct();for(const c of l)try{t.createInstance(c)}catch(d){zt(d)}return r.fire(),t}u.initialize=a;function o(s){if(i)return s();const l=new pe,c=l.add(r.event(()=>{c.dispose(),l.add(s())}));return l}u.withServices=o})(ht||(ht={}));let Uct;function Qh(){return Uct}let L2e;function qct(u){L2e=u}class z2e{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const n=t===void 0?void 0:e,i=t===void 0?e:t;return L2e({owner:n,debugName:()=>{const r=Ip(i);if(r!==void 0)return r;const o=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());if(o)return`${this.debugName}.${o[2]}`;if(!n)return`${this.debugName} (mapped)`}},r=>i(this.read(r),r))}}class SA extends z2e{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function Fn(u,e){const t=new M2e(u,e);try{u(t)}finally{t.finish()}}function gU(u,e,t){u?e(u):Fn(e,t)}class M2e{constructor(e,t){var n;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(n=Qh())===null||n===void 0||n.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Ip(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;this.updatingObservers=null;for(const{observer:n,observable:i}of t)n.endUpdate(i);(e=Qh())===null||e===void 0||e.handleEndTransaction()}}function Nee(u,e,t,n){let i;if(u!==void 0)if(typeof u=="function"){if(i=u(),i!==void 0)return i}else return u;if(e!==void 0&&(i=Ip(e),i!==void 0))return i;if(t!==void 0){for(const r in t)if(t[r]===n)return r}}function Ip(u){const e=u.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),i=n?n[1]:void 0;return i==null?void 0:i.trim()}function on(u,e){return typeof u=="string"?new fU(void 0,u,e):new fU(u,void 0,e)}class fU extends SA{get debugName(){var e;return(e=Nee(this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"ObservableValue"}constructor(e,t,n){super(),this._owner=e,this._debugName=t,this._value=n}get(){return this._value}set(e,t,n){var i;if(this._value===e)return;let r;t||(t=r=new M2e(()=>{},()=>`Setting ${this.debugName}`));try{const a=this._value;this._setValue(e),(i=Qh())===null||i===void 0||i.handleObservableChanged(this,{oldValue:a,newValue:e,change:n,didChange:!0,hadValue:!0});for(const o of this.observers)t.updateObserver(o,this),o.handleChange(this,n)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function _w(u,e){return typeof u=="string"?new T0e(void 0,u,e):new T0e(u,void 0,e)}class T0e extends fU{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}const tF=(u,e)=>u===e;function uu(u,e){return e!==void 0?new nF(u,void 0,e,void 0,void 0,void 0,tF):new nF(void 0,void 0,u,void 0,void 0,void 0,tF)}function N0e(u,e){var t;return new nF(u.owner,u.debugName,e,void 0,void 0,void 0,(t=u.equalityComparer)!==null&&t!==void 0?t:tF)}function Jct(u,e){var t;return new nF(u.owner,u.debugName,e,u.createEmptyChangeSummary,u.handleChange,void 0,(t=u.equalityComparer)!==null&&t!==void 0?t:tF)}function uF(u,e){let t,n;e===void 0?(t=u,n=void 0):(n=u,t=e);const i=new pe;return new nF(n,()=>{var r;return(r=Ip(t))!==null&&r!==void 0?r:"(anonymous)"},r=>(i.clear(),t(r,i)),void 0,void 0,()=>i.dispose(),tF)}qct(uu);class nF extends SA{get debugName(){var e;return(e=Nee(this._debugName,this._computeFn,this._owner,this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,n,i,r,a=void 0,o){var s,l;super(),this._owner=e,this._debugName=t,this._computeFn=n,this.createChangeSummary=i,this._handleChange=r,this._handleLastObserverRemoved=a,this._equalityComparator=o,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(s=this.createChangeSummary)===null||s===void 0?void 0:s.call(this),(l=Qh())===null||l===void 0||l.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){const t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;const i=this.state!==0,r=this.value;this.state=3;const a=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,a)}finally{for(const s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}const o=i&&!this._equalityComparator(r,this.value);if((t=Qh())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:r,newValue:this.value,change:void 0,didChange:o,hadValue:i}),o)for(const s of this.observers)s.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const n of this.observers)n.handlePossibleChange(this);if(t)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const n of t)n.endUpdate(this)}if(this.updateCount<0)throw new Si}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0,i=this.state===3;if(n&&(this.state===1||i)&&(this.state=2,i))for(const r of this.observers)r.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function Pee(u,e){return new UP(u.debugName,e,void 0,void 0)}function Xu(u){return new UP(void 0,u,void 0,void 0)}function GP(u,e){return new UP(u.debugName,e,u.createEmptyChangeSummary,u.handleChange)}function Xo(u){const e=new pe,t=Pee({debugName:()=>Ip(u)||"(anonymous)"},n=>{e.clear(),u(n,e)});return ft(()=>{t.dispose(),e.dispose()})}class UP{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const t=this._debugName();if(t!==void 0)return t}const e=Ip(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,n,i){var r,a;this._debugName=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(r=this.createChangeSummary)===null||r===void 0?void 0:r.call(this),(a=Qh())===null||a===void 0||a.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t,n;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i,this.state=3;try{if(!this.disposed){(e=Qh())===null||e===void 0||e.handleAutorunTriggered(this);const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,r)}}finally{(n=Qh())===null||n===void 0||n.handleAutorunFinished(this);for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,ck(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:i=>i===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(u){u.Observer=UP})(Xu||(Xu={}));function Sw(u){return new Zct(u)}class Zct extends z2e{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Yct(u,e){return new Promise(t=>{let n=!1,i=!1;const r=Xu(a=>{const o=u.read(a);e(o)&&(n?r.dispose():i=!0,t(o))});n=!0,i&&r.dispose()})}function zr(u,e){return new T2e(u,e)}class T2e extends SA{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=n=>{var i;const r=this._getValue(n),a=!this.hasValue||this.value!==r;(i=Qh())===null||i===void 0||i.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue}),a&&(this.value=r,this.hasValue&&Fn(o=>{for(const s of this.observers)o.updateObserver(s,this),s.handleChange(this,void 0)},()=>{const o=this.getDebugName();return"Event fired"+(o?`: ${o}`:"")}),this.hasValue=!0)}}getDebugName(){return Ip(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(u){u.Observer=T2e})(zr||(zr={}));function Ns(u,e){return new Qct(u,e)}class Qct extends SA{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{Fn(n=>{for(const i of this.observers)n.updateObserver(i,this),i.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function N2e(u){return typeof u=="string"?new P0e(u):new P0e(void 0,u)}class P0e extends SA{get debugName(){var e;return(e=Nee(this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){Fn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(const n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}}function iF(u){const e=new Xct(!0);return u.addObserver(e),u.reportChanges(),ft(()=>{u.removeObserver(e)})}class Xct{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}function P2e(){return!!bve.VSCODE_DEV}function edt(u){if(P2e()){const e=tdt();return e.add(u),{dispose(){e.delete(u)}}}else return{dispose(){}}}function tdt(){w9||(w9=new Set);const u=globalThis;return u.$hotReload_applyNewExports||(u.$hotReload_applyNewExports=e=>{for(const t of w9){const n=t(e);if(n)return n}}),w9}let w9;function udt(u,e,t,n){if(u.length===0)return e;if(e.length===0)return u;const i=[];let r=0,a=0;for(;rc?(i.push(s),a++):(i.push(n(o,s)),r++,a++)}for(;r`Apply decorations from ${e.debugName}`},i=>{const r=e.read(i);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function L9(u,e){return u.appendChild(e),ft(()=>{u.removeChild(e)})}class ndt extends ne{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new q6e(e,t)),this._width=on(this,this.elementSizeObserver.getWidth()),this._height=on(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>Fn(i=>{this._width.set(this.elementSizeObserver.getWidth(),i),this._height.set(this.elementSizeObserver.getHeight(),i)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function R0e(u,e){let t=u.get(),n=t,i=t;const r=on("animatedValue",t);let a=-1;const o=300;let s;e.add(GP({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(c,d)=>(c.didChange(u)&&(d.animate=d.animate||c.change),!0)},(c,d)=>{s!==void 0&&(cancelAnimationFrame(s),s=void 0),n=i,t=u.read(c),a=Date.now()-(d.animate?0:o),l()}));function l(){const c=Date.now()-a;i=Math.floor(idt(c,n,t-n,o)),c{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}}class qP{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${qP._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}qP._counter=0;function om(u,e){return Xu(t=>{for(let[n,i]of Object.entries(e))i&&typeof i=="object"&&"read"in i&&(i=i.read(t)),typeof i=="number"&&(i=`${i}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),u.style[n]=i})}function cE(u,e){return rdt([u],e),u}function rdt(u,e){P2e()&&Ns("reload",n=>edt(i=>{if([...Object.values(i)].some(r=>u.includes(r)))return r=>(n(void 0),!0)})).read(e)}function Lw(u,e,t){const n=new pe,i=[];return n.add(Xu(r=>{const a=e.read(r),o=new Map,s=new Map;t&&t(!0),u.changeViewZones(l=>{for(const c of i)l.removeZone(c);i.length=0;for(const c of a){const d=l.addZone(c);i.push(d),o.set(c,d)}}),t&&t(!1),n.add(GP({createEmptyChangeSummary(){return[]},handleChange(l,c){const d=s.get(l.changedObservable);return d!==void 0&&c.push(d),!0}},(l,c)=>{for(const d of a)d.onChange&&(s.set(d.onChange,o.get(d)),d.onChange.read(l));t&&t(!0),u.changeViewZones(d=>{for(const h of c)d.layoutZone(h)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),u.changeViewZones(r=>{for(const a of i)r.removeZone(a)}),t&&t(!1)}}),n}class adt extends vi{dispose(){super.dispose(!0)}}var Ree=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Iee=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},odt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const sdt=hi("diff-review-insert",we.add,v("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),ldt=hi("diff-review-remove",we.remove,v("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),cdt=hi("diff-review-close",we.close,v("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let PE=class extends ne{constructor(e,t,n,i,r,a,o,s,l){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=i,this._width=r,this._height=a,this._diffs=o,this._editors=s,this._instantiationService=l,this.model=uF(this,(c,d)=>{const h=this._visible.read(c);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const E=d.add(this._instantiationService.createInstance(pU,this._diffs,this._editors,this._setVisible,this._canClose)),m=d.add(this._instantiationService.createInstance(DU,this._parentNode,E,this._width,this._height,this._editors));return{model:E,view:m}}),this._register(iF(this.model))}next(){Fn(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this.model.get().model.nextGroup(e)})}prev(){Fn(e=>{this._setVisible(!0,e),this.model.get().model.previousGroup(e)})}close(){Fn(e=>{this._setVisible(!1,e)})}};PE._ttPolicy=b4("diffReview",{createHTML:u=>u});PE=Ree([Iee(8,mt)],PE);let pU=class extends ne{constructor(e,t,n,i,r){super(),this._diffs=e,this._editors=t,this._setVisible=n,this.canClose=i,this._audioCueService=r,this._groups=on(this,[]),this._currentGroupIdx=on(this,0),this._currentElementIdx=on(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((a,o)=>this._groups.read(o)[a]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((a,o)=>{var s;return(s=this.currentGroup.read(o))===null||s===void 0?void 0:s.lines[a]}),this._register(Xu(a=>{const o=this._diffs.read(a);if(!o){this._groups.set([],void 0);return}const s=ddt(o,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());Fn(l=>{const c=this._editors.modified.getPosition();if(c){const d=s.findIndex(h=>(c==null?void 0:c.lineNumber){const o=this.currentElement.read(a);(o==null?void 0:o.type)===Qa.Deleted?this._audioCueService.playAudioCue(hu.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(o==null?void 0:o.type)===Qa.Added&&this._audioCueService.playAudioCue(hu.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Xu(a=>{var o;const s=this.currentElement.read(a);if(s&&s.type!==Qa.Header){const l=(o=s.modifiedLineNumber)!==null&&o!==void 0?o:s.diff.modified.startLineNumber;this._editors.modified.setSelection(j.fromPositions(new ee(l,1)))}}))}_goToGroupDelta(e,t){const n=this.groups.get();!n||n.length<=1||gU(t,i=>{this._currentGroupIdx.set(Gt.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),i),this._currentElementIdx.set(0,i)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Fn(n=>{this._currentElementIdx.set(Gt.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const n=t.lines.indexOf(e);n!==-1&&Fn(i=>{this._currentElementIdx.set(n,i)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Qa.Deleted?(this._editors.original.setSelection(j.fromPositions(new ee(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==Qa.Header&&(this._editors.modified.setSelection(j.fromPositions(new ee(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};pU=Ree([Iee(4,_A)],pU);const DC=3;function ddt(u,e,t){const n=[];for(const i of Qxe(u,(r,a)=>a.modified.startLineNumber-r.modified.endLineNumberExclusive<2*DC)){const r=[];r.push(new Edt);const a=new Xt(Math.max(1,i[0].original.startLineNumber-DC),Math.min(i[i.length-1].original.endLineNumberExclusive+DC,e+1)),o=new Xt(Math.max(1,i[0].modified.startLineNumber-DC),Math.min(i[i.length-1].modified.endLineNumberExclusive+DC,t+1));Xxe(i,(c,d)=>{const h=new Xt(c?c.original.endLineNumberExclusive:a.startLineNumber,d?d.original.startLineNumber:a.endLineNumberExclusive),E=new Xt(c?c.modified.endLineNumberExclusive:o.startLineNumber,d?d.modified.startLineNumber:o.endLineNumberExclusive);h.forEach(m=>{r.push(new fdt(m,E.startLineNumber+(m-h.startLineNumber)))}),d&&(d.original.forEach(m=>{r.push(new mdt(d,m))}),d.modified.forEach(m=>{r.push(new gdt(d,m))}))});const s=i[0].modified.join(i[i.length-1].modified),l=i[0].original.join(i[i.length-1].original);n.push(new hdt(new A1(s,l),r))}return n}var Qa;(function(u){u[u.Header=0]="Header",u[u.Unchanged=1]="Unchanged",u[u.Deleted=2]="Deleted",u[u.Added=3]="Added"})(Qa||(Qa={}));class hdt{constructor(e,t){this.range=e,this.lines=t}}class Edt{constructor(){this.type=Qa.Header}}class mdt{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Qa.Deleted,this.modifiedLineNumber=void 0}}class gdt{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Qa.Added,this.originalLineNumber=void 0}}class fdt{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Qa.Unchanged}}let DU=class extends ne{constructor(e,t,n,i,r,a){super(),this._element=e,this._model=t,this._width=n,this._height=i,this._editors=r,this._languageService=a,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const o=document.createElement("div");o.className="diff-review-actions",this._actionBar=this._register(new O0(o)),this._register(Xu(s=>{this._actionBar.clear(),this._model.canClose.read(s)&&this._actionBar.push(new ro("diffreview.close",v("label.close","Close"),"close-diff-review "+st.asClassName(cdt),!0,()=>odt(this,void 0,void 0,function*(){return t.close()})),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new EA(this._content,{})),Pr(this.domNode,this._scrollbar.getDomNode(),o),this._register(ft(()=>{Pr(this.domNode)})),this._register(om(this.domNode,{width:this._width,height:this._height})),this._register(om(this._content,{width:this._width,height:this._height})),this._register(Xo((s,l)=>{this._model.currentGroup.read(s),this._render(l)})),this._register(xi(this.domNode,"keydown",s=>{(s.equals(18)||s.equals(2066)||s.equals(530))&&(s.preventDefault(),this._model.goToNextLine()),(s.equals(16)||s.equals(2064)||s.equals(528))&&(s.preventDefault(),this._model.goToPreviousLine()),(s.equals(9)||s.equals(2057)||s.equals(521)||s.equals(1033))&&(s.preventDefault(),this._model.close()),(s.equals(10)||s.equals(3))&&(s.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._editors.original.getOptions(),n=this._editors.modified.getOptions(),i=document.createElement("div");i.className="diff-review-table",i.setAttribute("role","list"),i.setAttribute("aria-label",v("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),ea(i,n.get(50)),Pr(this._content,i);const r=this._editors.original.getModel(),a=this._editors.modified.getModel();if(!r||!a)return;const o=r.getOptions(),s=a.getOptions(),l=n.get(66),c=this._model.currentGroup.get();for(const d of(c==null?void 0:c.lines)||[]){if(!c)break;let h;if(d.type===Qa.Header){const m=document.createElement("div");m.className="diff-review-row",m.setAttribute("role","listitem");const g=c.range,f=this._model.currentGroupIndex.get(),p=this._model.groups.get().length,D=A=>A===0?v("no_lines_changed","no lines changed"):A===1?v("one_line_changed","1 line changed"):v("more_lines_changed","{0} lines changed",A),x=D(g.original.length),b=D(g.modified.length);m.setAttribute("aria-label",v({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",f+1,p,g.original.startLineNumber,x,g.modified.startLineNumber,b));const k=document.createElement("div");k.className="diff-review-cell diff-review-summary",k.appendChild(document.createTextNode(`${f+1}/${p}: @@ -${g.original.startLineNumber},${g.original.length} +${g.modified.startLineNumber},${g.modified.length} @@`)),m.appendChild(k),h=m}else h=this._createRow(d,l,this._width.get(),t,r,o,n,a,s);i.appendChild(h);const E=uu(m=>this._model.currentElement.read(m)===d);e.add(Xu(m=>{const g=E.read(m);h.tabIndex=g?0:-1,g&&h.focus()})),e.add(ce(h,"focus",()=>{this._model.goToLine(d)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,i,r,a,o,s,l){const c=i.get(143),d=c.glyphMarginWidth+c.lineNumbersWidth,h=o.get(143),E=10+h.glyphMarginWidth+h.lineNumbersWidth;let m="diff-review-row",g="";const f="diff-review-spacer";let p=null;switch(e.type){case Qa.Added:m="diff-review-row line-insert",g=" char-insert",p=sdt;break;case Qa.Deleted:m="diff-review-row line-delete",g=" char-delete",p=ldt;break}const D=document.createElement("div");D.style.minWidth=n+"px",D.className=m,D.setAttribute("role","listitem"),D.ariaLevel="";const x=document.createElement("div");x.className="diff-review-cell",x.style.height=`${t}px`,D.appendChild(x);const b=document.createElement("span");b.style.width=d+"px",b.style.minWidth=d+"px",b.className="diff-review-line-number"+g,e.originalLineNumber!==void 0?b.appendChild(document.createTextNode(String(e.originalLineNumber))):b.innerText=" ",x.appendChild(b);const k=document.createElement("span");k.style.width=E+"px",k.style.minWidth=E+"px",k.style.paddingRight="10px",k.className="diff-review-line-number"+g,e.modifiedLineNumber!==void 0?k.appendChild(document.createTextNode(String(e.modifiedLineNumber))):k.innerText=" ",x.appendChild(k);const A=document.createElement("span");if(A.className=f,p){const w=document.createElement("span");w.className=st.asClassName(p),w.innerText="  ",A.appendChild(w)}else A.innerText="  ";x.appendChild(A);let F;if(e.modifiedLineNumber!==void 0){let w=this._getLineHtml(s,o,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);PE._ttPolicy&&(w=PE._ttPolicy.createHTML(w)),x.insertAdjacentHTML("beforeend",w),F=s.getLineContent(e.modifiedLineNumber)}else{let w=this._getLineHtml(r,i,a.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);PE._ttPolicy&&(w=PE._ttPolicy.createHTML(w)),x.insertAdjacentHTML("beforeend",w),F=r.getLineContent(e.originalLineNumber)}F.length===0&&(F=v("blankLine","blank"));let S="";switch(e.type){case Qa.Unchanged:e.originalLineNumber===e.modifiedLineNumber?S=v({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",F,e.originalLineNumber):S=v("equalLine","{0} original line {1} modified line {2}",F,e.originalLineNumber,e.modifiedLineNumber);break;case Qa.Added:S=v("insertLine","+ {0} modified line {1}",F,e.modifiedLineNumber);break;case Qa.Deleted:S=v("deleteLine","- {0} original line {1}",F,e.originalLineNumber);break}return D.setAttribute("aria-label",S),D}_getLineHtml(e,t,n,i,r){const a=e.getLineContent(i),o=t.get(50),s=nr.createEmpty(a,r),l=Zs.isBasicASCII(a,e.mightContainNonBasicASCII()),c=Zs.containsRTL(a,l,e.mightContainRTL());return sP(new fg(o.isMonospace&&!t.get(33),o.canUseHalfwidthRightwardsArrow,a,!1,l,c,0,s,[],n,0,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==Ms.OFF,null)).html}};DU=Ree([Iee(5,vn)],DU);const pdt=hi("diff-insert",we.add,v("diffInsertIcon","Line decoration for inserts in the diff editor.")),I2e=hi("diff-remove",we.remove,v("diffRemoveIcon","Line decoration for removals in the diff editor.")),I0e=Lt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+st.asClassName(pdt),marginClassName:"gutter-insert"}),O0e=Lt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+st.asClassName(I2e),marginClassName:"gutter-delete"}),j0e=Lt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),H0e=Lt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),V0e=Lt.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),Ddt=Lt.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),xdt=Lt.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),xU=Lt.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),vdt=Lt.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Cdt=Lt.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),bdt=Lt.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Zr(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(v("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+st.asClassName(we.arrowRight),zIndex:10001});class sm extends ne{constructor(e,t,n,i,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=i,this._editors=r,this._originalScrollTop=zr(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Ns("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=on(this,0),this._modifiedViewZonesChangedSignal=Ns("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Ns("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=uF((h,E)=>{var m;this._element.replaceChildren();const g=this._diffModel.read(h),f=(m=g==null?void 0:g.diff.read(h))===null||m===void 0?void 0:m.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);const p=this._originalEditorLayoutInfo.read(h),D=this._modifiedEditorLayoutInfo.read(h);if(!p||!D){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);const x=f.map(z=>{function N(V,U){const J=U.getTopForLineNumber(V.startLineNumber,!0),Y=U.getTopForLineNumber(V.endLineNumberExclusive,!0);return(J+Y)/2}const O=N(z.lineRangeMapping.original,this._editors.original),y=this._originalScrollTop.read(h),_=N(z.lineRangeMapping.modified,this._editors.modified),L=this._modifiedScrollTop.read(h),T=O-y,R=_-L,I=Math.min(O,_),H=Math.max(O,_);return{range:new Gt(I,H),from:T,to:R,fromWithoutScroll:O,toWithoutScroll:_,move:z}});x.sort(bGe(y0(z=>z.fromWithoutScroll>z.toWithoutScroll,kGe),y0(z=>z.fromWithoutScroll>z.toWithoutScroll?z.fromWithoutScroll:-z.toWithoutScroll,Uh)));const b=Oee.compute(x.map(z=>z.range)),k=10,A=p.verticalScrollbarWidth,F=(b.getTrackCount()-1)*10+k*2,S=A+F+(D.contentLeft-sm.movedCodeBlockPadding);let w=0;for(const z of x){const N=b.getTrack(w),O=A+k+N*10,y=15,_=15,L=S,T=D.glyphMarginWidth+D.lineNumbersWidth,R=18,I=document.createElementNS("http://www.w3.org/2000/svg","rect");I.classList.add("arrow-rectangle"),I.setAttribute("x",`${L-T}`),I.setAttribute("y",`${z.to-R/2}`),I.setAttribute("width",`${T}`),I.setAttribute("height",`${R}`),this._element.appendChild(I);const H=document.createElementNS("http://www.w3.org/2000/svg","g"),V=document.createElementNS("http://www.w3.org/2000/svg","path");V.setAttribute("d",`M 0 ${z.from} L ${O} ${z.from} L ${O} ${z.to} L ${L-_} ${z.to}`),V.setAttribute("fill","none"),H.appendChild(V);const U=document.createElementNS("http://www.w3.org/2000/svg","polygon");U.classList.add("arrow"),E.add(Xu(J=>{V.classList.toggle("currentMove",z.move===g.activeMovedText.read(J)),U.classList.toggle("currentMove",z.move===g.activeMovedText.read(J))})),U.setAttribute("points",`${L-_},${z.to-y/2} ${L},${z.to} ${L-_},${z.to+y/2}`),H.appendChild(U),this._element.appendChild(H),w++}this.width.set(F,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(ft(()=>this._element.remove())),this._register(Xu(h=>{const E=this._originalEditorLayoutInfo.read(h),m=this._modifiedEditorLayoutInfo.read(h);!E||!m||(this._element.style.left=`${E.width-E.verticalScrollbarWidth}px`,this._element.style.height=`${E.height}px`,this._element.style.width=`${E.verticalScrollbarWidth+E.contentLeft-sm.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register(iF(this._state));const a=uu(h=>{const E=this._diffModel.read(h),m=E==null?void 0:E.diff.read(h);return m?m.movedTexts.map(g=>({move:g,original:new ww(Sw(g.lineRangeMapping.original.startLineNumber-1),18),modified:new ww(Sw(g.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(Lw(this._editors.original,a.map(h=>h.map(E=>E.original)))),this._register(Lw(this._editors.modified,a.map(h=>h.map(E=>E.modified)))),this._register(Xo((h,E)=>{const m=a.read(h);for(const g of m)E.add(new $0e(this._editors.original,g.original,g.move,"original",this._diffModel.get())),E.add(new $0e(this._editors.modified,g.modified,g.move,"modified",this._diffModel.get()))}));const o=zr(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),s=zr(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),l=Ns("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),c=Ns("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0)));let d="modified";this._register(GP({createEmptyChangeSummary:()=>{},handleChange:(h,E)=>(h.didChange(l)&&(d="original"),h.didChange(c)&&(d="modified"),!0)},h=>{l.read(h),c.read(h);const E=this._diffModel.read(h);if(!E)return;const m=E.diff.read(h);let g;if(m&&d==="original"){const f=o.read(h);f&&(g=m.movedTexts.find(p=>p.lineRangeMapping.original.contains(f.lineNumber)))}if(m&&d==="modified"){const f=s.read(h);f&&(g=m.movedTexts.find(p=>p.lineRangeMapping.modified.contains(f.lineNumber)))}g!==E.movedTextToCompare.get()&&E.movedTextToCompare.set(void 0,void 0),E.setActiveMovedText(g)}))}}sm.movedCodeBlockPadding=4;class Oee{static compute(e){const t=[],n=[];for(const i of e){let r=t.findIndex(a=>!a.intersectsStrict(i));r===-1&&(t.length>=6?r=RYe(t,y0(o=>o.intersectWithRangeLength(i),Uh)):(r=t.length,t.push(new rX))),t[r].addRange(i),n.push(r)}return new Oee(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class $0e extends R2e{constructor(e,t,n,i,r){const a=yr("div.diff-hidden-lines-widget");super(e,t,a.root),this._editor=e,this._move=n,this._kind=i,this._diffModel=r,this._nodes=yr("div.diff-moved-code-block",{style:{marginRight:"4px"}},[yr("div.text-content@textContent"),yr("div.action-bar@actionBar")]),a.root.appendChild(this._nodes.root);const o=zr(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(om(this._nodes.root,{paddingRight:o.map(h=>h.verticalScrollbarWidth)}));let s;n.changes.length>0?s=this._kind==="original"?v("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):s=this._kind==="original"?v("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const l=this._register(new O0(this._nodes.actionBar,{highlightToggledItems:!0})),c=new ro("",s,"",!1);l.push(c,{icon:!1,label:!0});const d=new ro("","Compare",st.asClassName(we.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Xu(h=>{const E=this._diffModel.movedTextToCompare.read(h)===n;d.checked=E})),l.push(d,{icon:!1,label:!0})}}class kdt extends ne{constructor(e,t,n){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=uu(this,i=>{var r;const a=(r=this._diffModel.read(i))===null||r===void 0?void 0:r.diff.read(i);if(!a)return null;const o=this._diffModel.read(i).movedTextToCompare.read(i),s=this._options.renderIndicators.read(i),l=this._options.showEmptyDecorations.read(i),c=[],d=[];if(!o)for(const E of a.mappings){if(E.lineRangeMapping.original.isEmpty||c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:s?O0e:H0e}),E.lineRangeMapping.modified.isEmpty||d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:s?I0e:j0e}),E.lineRangeMapping.modified.isEmpty||E.lineRangeMapping.original.isEmpty)E.lineRangeMapping.original.isEmpty||c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:vdt}),E.lineRangeMapping.modified.isEmpty||d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:Ddt});else for(const m of E.lineRangeMapping.innerChanges||[])E.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&c.push({range:m.originalRange,options:m.originalRange.isEmpty()&&l?Cdt:xU}),E.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&d.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&l?xdt:V0e});!E.lineRangeMapping.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(i)&&!o&&d.push({range:j.fromPositions(new ee(E.lineRangeMapping.modified.startLineNumber,1)),options:bdt})}if(o)for(const E of o.changes){const m=E.original.toInclusiveRange();m&&c.push({range:m,options:s?O0e:H0e});const g=E.modified.toInclusiveRange();g&&d.push({range:g,options:s?I0e:j0e});for(const f of E.innerChanges||[])c.push({range:f.originalRange,options:xU}),d.push({range:f.modifiedRange,options:V0e})}const h=this._diffModel.read(i).activeMovedText.read(i);for(const E of a.movedTexts)c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(E===h?" currentMove":""),blockPadding:[sm.movedCodeBlockPadding,0,sm.movedCodeBlockPadding,sm.movedCodeBlockPadding]}}),d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(E===h?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:c,modifiedDecorations:d}}),this._register(Bw(this._editors.original,this._decorations.map(i=>(i==null?void 0:i.originalDecorations)||[]))),this._register(Bw(this._editors.modified,this._decorations.map(i=>(i==null?void 0:i.modifiedDecorations)||[])))}}class Fdt extends ne{constructor(e,t,n){super(),this._options=e,this._domNode=t,this._dimensions=n,this._sashRatio=on(this,void 0),this.sashLeft=uu(this,i=>{var r;const a=(r=this._sashRatio.read(i))!==null&&r!==void 0?r:this._options.splitViewDefaultRatio.read(i);return this._computeSashLeft(a,i)}),this._sash=this._register(new oa(this._domNode,{getVerticalSashTop:i=>0,getVerticalSashLeft:i=>this.sashLeft.get(),getVerticalSashHeight:i=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(i=>{const r=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(i.currentX-i.startX))/r,void 0);this._sashRatio.set(a/r,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(Xu(i=>{const r=this._options.enableSplitViewResizing.read(i);this._sash.state=r?3:0,this.sashLeft.read(i),this._dimensions.height.read(i),this._sash.layout()}))}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_computeSashLeft(e,t){const n=this._dimensions.width.read(t),i=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):i,a=100;return n<=a*2?i:rn-a?n-a:r}}let _5=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let r=0;t.children.get(i)!==void 0;r++)i=`${n}_${r}`;return i}static empty(e){return e.children.size===0}},K0e=class extends _5{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},ydt=class extends _5{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}},Adt=class cf extends _5{static create(e,t,n){const i=new vi(n),r=new cf(t.uri),a=e.ordered(t),o=a.map((l,c)=>{var d;const h=_5.findId(`provider_${c}`,r),E=new ydt(h,r,(d=l.displayName)!==null&&d!==void 0?d:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(t,i.token)).then(m=>{for(const g of m||[])cf._makeOutlineElement(g,E);return E},m=>(Mi(m),E)).then(m=>{_5.empty(m)?m.remove():r._groups.set(h,m)})}),s=e.onDidChange(()=>{const l=e.ordered(t);di(l,a)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!n.isCancellationRequested?cf.create(e,t,n):r._compact()).finally(()=>{i.dispose(),s.dispose()})}static _makeOutlineElement(e,t){const n=_5.findId(e,t),i=new K0e(n,t,e);if(e.children)for(const r of e.children)cf._makeOutlineElement(r,i);t.children.set(i.id,i)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=$t.first(this._groups.values());for(const[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof K0e?e.push(t.symbol):e.push(...$t.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>j.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return cf._flattenDocumentSymbols(t,e,""),t.sort((n,i)=>ee.compare(j.getStartPosition(n.range),j.getStartPosition(i.range))||ee.compare(j.getEndPosition(i.range),j.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&cf._flattenDocumentSymbols(e,i.children,i.name)}};var O2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_dt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vU=class extends ne{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(e,t,n,i){super(),this._editors=e,this._diffModel=t,this._options=n,this._languageFeaturesService=i,this._isUpdatingViewZones=!1,this._modifiedOutlineSource=uF(this,(l,c)=>{const d=this._editors.modifiedModel.read(l);if(d)return c.add(new CU(this._languageFeaturesService,d))}),this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){const c=this._diffModel.get();Fn(d=>{for(const h of this._editors.original.getSelections()||[])c==null||c.ensureOriginalLineIsVisible(h.getStartPosition().lineNumber,d),c==null||c.ensureOriginalLineIsVisible(h.getEndPosition().lineNumber,d)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){const c=this._diffModel.get();Fn(d=>{for(const h of this._editors.modified.getSelections()||[])c==null||c.ensureModifiedLineIsVisible(h.getStartPosition().lineNumber,d),c==null||c.ensureModifiedLineIsVisible(h.getEndPosition().lineNumber,d)})}}));const r=this._diffModel.map((l,c)=>{var d,h;return((d=l==null?void 0:l.diff.read(c))===null||d===void 0?void 0:d.mappings.length)===0?[]:(h=l==null?void 0:l.unchangedRegions.read(c))!==null&&h!==void 0?h:[]}),a=uF(this,(l,c)=>{const d=this._modifiedOutlineSource.read(l);if(!d)return{origViewZones:[],modViewZones:[]};const h=[],E=[],m=this._options.renderSideBySide.read(l),g=r.read(l);for(const f of g)if(!f.shouldHideControls(l)){{const p=uu(x=>f.getHiddenOriginalRange(x).startLineNumber-1),D=new ww(p,24);h.push(D),c.add(new W0e(this._editors.original,D,f,f.originalUnchangedRange,!m,d,x=>this._diffModel.get().ensureModifiedLineIsVisible(x,void 0),this._options))}{const p=uu(x=>f.getHiddenModifiedRange(x).startLineNumber-1),D=new ww(p,24);E.push(D),c.add(new W0e(this._editors.modified,D,f,f.modifiedUnchangedRange,!1,d,x=>this._diffModel.get().ensureModifiedLineIsVisible(x,void 0),this._options))}}return{origViewZones:h,modViewZones:E}}),o={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},s={description:"Fold Unchanged",glyphMarginHoverMessage:new Zr(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(v("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+st.asClassName(we.fold),zIndex:10001};this._register(Bw(this._editors.original,uu(l=>{const c=r.read(l),d=c.map(h=>({range:h.originalUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&d.push({range:j.fromPositions(new ee(h.originalLineNumber,1)),options:s});return d}))),this._register(Bw(this._editors.modified,uu(l=>{const c=r.read(l),d=c.map(h=>({range:h.modifiedUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&d.push({range:Xt.ofLength(h.modifiedLineNumber,1).toInclusiveRange(),options:s});return d}))),this._register(Lw(this._editors.original,a.map(l=>l.origViewZones),l=>this._isUpdatingViewZones=l)),this._register(Lw(this._editors.modified,a.map(l=>l.modViewZones),l=>this._isUpdatingViewZones=l)),this._register(Xu(l=>{const c=r.read(l);this._editors.original.setHiddenAreas(c.map(d=>d.getHiddenOriginalRange(l).toInclusiveRange()).filter(tk)),this._editors.modified.setHiddenAreas(c.map(d=>d.getHiddenModifiedRange(l).toInclusiveRange()).filter(tk))})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){const d=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const E=h.unchangedRegions.get().find(m=>m.modifiedUnchangedRange.includes(d));if(!E)return;E.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){const d=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const E=h.unchangedRegions.get().find(m=>m.originalUnchangedRange.includes(d));if(!E)return;E.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};vU=O2e([j2e(3,We)],vU);let CU=class extends ne{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=on(this,void 0);const n=Ns("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),i=Ns("_textModel.onDidChangeContent",Ne.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(Xo((r,a)=>_dt(this,void 0,void 0,function*(){n.read(r),i.read(r);const o=a.add(new adt),s=yield Adt.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,o.token);a.isDisposed||this._currentModel.set(s,void 0)})))}getBreadcrumbItems(e,t){const n=this._currentModel.read(t);if(!n)return[];const i=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return i.sort(nve(y0(r=>r.range.endLineNumber-r.range.startLineNumber,Uh))),i.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};CU=O2e([j2e(0,We)],CU);class W0e extends R2e{constructor(e,t,n,i,r,a,o,s){const l=yr("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=i,this.hide=r,this._modifiedOutlineSource=a,this._revealModifiedHiddenLine=o,this._options=s,this._nodes=yr("div.diff-hidden-lines",[yr("div.top@top",{title:v("diff.hiddenLines.top","Click or drag to show more above")}),yr("div.center@content",{style:{display:"flex"}},[yr("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[ve("a",{title:v("showAll","Show all"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...im("$(unfold)"))]),yr("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),yr("div.bottom@bottom",{title:v("diff.bottom","Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const c=zr(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this.hide?Pr(this._nodes.first):this._register(om(this._nodes.first,{width:c.map(h=>h.contentLeft)}));const d=this._editor;this._register(ce(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const E=h.clientY;let m=!1;const g=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const f=ce(window,"mousemove",D=>{const b=D.clientY-E;m=m||Math.abs(b)>2;const k=Math.round(b/d.getOption(66)),A=Math.max(0,Math.min(g+k,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(A,void 0)}),p=ce(window,"mouseup",D=>{m||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),f.dispose(),p.dispose()})})),this._register(ce(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const E=h.clientY;let m=!1;const g=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const f=ce(window,"mousemove",D=>{const b=D.clientY-E;m=m||Math.abs(b)>2;const k=Math.round(b/d.getOption(66)),A=Math.max(0,Math.min(g-k,this._unchangedRegion.getMaxVisibleLineCountBottom())),F=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(A,void 0);const S=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(S-F))}),p=ce(window,"mouseup",D=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!m){const x=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const b=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(b-x))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),f.dispose(),p.dispose()})})),this._register(Xu(h=>{const E=[];if(!this.hide){const m=n.getHiddenModifiedRange(h).length,g=v("hiddenLines","{0} hidden lines",m),f=ve("span",{title:v("diff.hiddenLines.expandAll","Double click to unfold")},g);f.addEventListener("dblclick",x=>{x.button===0&&(x.preventDefault(),this._unchangedRegion.showAll(void 0))}),E.push(f);const p=this._unchangedRegion.getHiddenModifiedRange(h),D=this._modifiedOutlineSource.getBreadcrumbItems(p,h);if(D.length>0){E.push(ve("span",void 0,"  |  "));for(let x=0;x{this._revealModifiedHiddenLine(b.startLineNumber)}}}}Pr(this._nodes.others,...E)}))}}class td{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new td(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0;const i=e.getVisibleRanges();if(i.length>0){t=i[0].getStartPosition();const r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new td(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,i,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=i,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}var Sdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},G0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Bdt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},df;let zw=df=class{constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new Q,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}computeDiff(e,t,n,i){var r,a;return Bdt(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,i);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new R0(new Xt(1,2),new Xt(1,t.getLineCount()+1),[new Om(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const o=JSON.stringify([e.uri.toString(),t.uri.toString()]),s=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),l=df.diffCache.get(o);if(l&&l.context===s)return l.result;const c=va.create(),d=yield this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),h=c.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(r=d==null?void 0:d.quitEarly)!==null&&r!==void 0?r:!0,detectedMoves:n.computeMoves?(a=d==null?void 0:d.moves.length)!==null&&a!==void 0?a:0:-1}),i.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!d)throw new Error("no diff result available");return df.diffCache.size>10&&df.diffCache.delete(df.diffCache.keys().next().value),df.diffCache.set(o,{result:d,context:s}),d})}setOptions(e){var t;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};zw.diffCache=new Map;zw=df=Sdt([G0e(1,ql),G0e(2,n0)],zw);var wdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ldt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const H2e=Ut("diffProviderFactoryService");let bU=class{constructor(e){this.instantiationService=e}createDiffProvider(e,t){return this.instantiationService.createInstance(zw,t)}};bU=wdt([Ldt(0,mt)],bU);au(H2e,bU,1);var zdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Mdt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},U0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let kU=class extends ne{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n,i){super(),this.model=e,this._options=t,this._editor=n,this._diffProviderFactoryService=i,this._isDiffUpToDate=on(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=on(this,void 0),this.diff=this._diff,this._unchangedRegions=on(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=uu(this,s=>this._options.hideUnchangedRegions.read(s)?this._unchangedRegions.read(s).regions:(Fn(l=>{for(const c of this._unchangedRegions.get().regions)c.collapseAll(l)}),[])),this.movedTextToCompare=on(this,void 0),this._activeMovedText=on(this,void 0),this._hoveredMovedText=on(this,void 0),this.activeMovedText=uu(this,s=>{var l,c;return(c=(l=this.movedTextToCompare.read(s))!==null&&l!==void 0?l:this._hoveredMovedText.read(s))!==null&&c!==void 0?c:this._activeMovedText.read(s)}),this._cancellationTokenSource=new vi,this._diffProvider=uu(this,s=>{const l=this._diffProviderFactoryService.createDiffProvider(this._editor,{diffAlgorithm:this._options.diffAlgorithm.read(s)}),c=Ns("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(ft(()=>this._cancellationTokenSource.cancel()));const r=N2e("contentChangedSignal"),a=this._register(new Hu(()=>r.trigger(void 0),200)),o=(s,l,c)=>{const d=Mw.fromDiffs(s.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),h=this._unchangedRegions.get(),E=h.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).filter(p=>!!p).map(p=>Xt.fromRange(p)),m=h.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).filter(p=>!!p).map(p=>Xt.fromRange(p)),g=e.original.deltaDecorations(h.originalDecorationIds,d.map(p=>({range:p.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),f=e.modified.deltaDecorations(h.modifiedDecorationIds,d.map(p=>({range:p.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const p of d)for(let D=0;D{if(this._diff.get()){const c=$h.fromModelContentChanges(s.changes);this._lastDiff,e.original,e.modified}a.schedule()})),this._register(e.original.onDidChangeContent(s=>{if(this._diff.get()){const c=$h.fromModelContentChanges(s.changes);this._lastDiff,e.original,e.modified}a.schedule()})),this._register(Xo((s,l)=>U0e(this,void 0,void 0,function*(){var c,d;this._options.hideUnchangedRegionsMinimumLineCount.read(s),this._options.hideUnchangedRegionsContextLineCount.read(s),a.cancel(),r.read(s);const h=this._diffProvider.read(s);h.onChangeSignal.read(s),cE(O6e,s),cE(FW,s),this._isDiffUpToDate.set(!1,void 0);let E=[];l.add(e.original.onDidChangeContent(f=>{const p=$h.fromModelContentChanges(f.changes);E=WB(E,p)}));let m=[];l.add(e.modified.onDidChangeContent(f=>{const p=$h.fromModelContentChanges(f.changes);m=WB(m,p)}));let g=yield h.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(s),maxComputationTimeMs:this._options.maxComputationTimeMs.read(s),computeMoves:this._options.showMoves.read(s)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(g=Tdt(g,e.original,e.modified),g=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:g,g=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:g,Fn(f=>{o(g,f),this._lastDiff=g;const p=jee.fromDiffResult(g);this._diff.set(p,f),this._isDiffUpToDate.set(!0,f);const D=this.movedTextToCompare.get();this.movedTextToCompare.set(D?this._lastDiff.moves.find(x=>x.lineRangeMapping.modified.intersect(D.lineRangeMapping.modified)):void 0,f)}))})))}ensureModifiedLineIsVisible(e,t){var n;if(((n=this.diff.get())===null||n===void 0?void 0:n.mappings.length)===0)return;const i=this._unchangedRegions.get().regions;for(const r of i)if(r.getHiddenModifiedRange(void 0).contains(e)){r.showModifiedLine(e,t);return}}ensureOriginalLineIsVisible(e,t){var n;if(((n=this.diff.get())===null||n===void 0?void 0:n.mappings.length)===0)return;const i=this._unchangedRegions.get().regions;for(const r of i)if(r.getHiddenOriginalRange(void 0).contains(e)){r.showOriginalLine(e,t);return}}waitForDiff(){return U0e(this,void 0,void 0,function*(){yield Yct(this.isDiffUpToDate,e=>e)})}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){const t=e.collapsedRegions.map(i=>Xt.deserialize(i.range)),n=this._unchangedRegions.get();Fn(i=>{for(const r of n.regions)for(const a of t)if(r.modifiedUnchangedRange.intersect(a)){r.setHiddenModifiedRange(a,i);break}})}};kU=zdt([Mdt(3,H2e)],kU);function Tdt(u,e,t){return{changes:u.changes.map(n=>new R0(n.original,n.modified,n.innerChanges?n.innerChanges.map(i=>Ndt(i,e,t)):void 0)),moves:u.moves,identical:u.identical,quitEarly:u.quitEarly}}function Ndt(u,e,t){let n=u.originalRange,i=u.modifiedRange;return(n.endColumn!==1||i.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&i.endColumn===t.getLineMaxColumn(i.endLineNumber)&&n.endLineNumbernew V2e(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,i){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=i}}class V2e{constructor(e){this.lineRangeMapping=e}}class Mw{static fromDiffs(e,t,n,i,r){const a=R0.inverse(e,t,n),o=[];for(const s of a){let l=s.original.startLineNumber,c=s.modified.startLineNumber,d=s.original.length;const h=l===1&&c===1,E=l+d===t+1&&c+d===n+1;(h||E)&&d>=r+i?(h&&!E&&(d-=r),E&&!h&&(l+=r,c+=r,d-=r),o.push(new Mw(l,c,d,0,0))):d>=r*2+i&&(l+=r,c+=r,d-=r*2,o.push(new Mw(l,c,d,0,0)))}return o}get originalUnchangedRange(){return Xt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Xt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,i,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=on(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=on(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=uu(this,a=>this.visibleLineCountTop.read(a)+this.visibleLineCountBottom.read(a)===this.lineCount&&!this.isDragged.read(a)),this.isDragged=on(this,!1),this._visibleLineCountTop.set(i,void 0),this._visibleLineCountBottom.set(r,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Xt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Xt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const n=e.startLineNumber-this.modifiedLineNumber,i=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,i,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){const n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),i=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;n{var f;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(f=n.getDomNode())!==null&&f!==void 0?f:void 0,getAnchor:()=>({x:m,y:g}),getActions:()=>{const p=[],D=i.modified.isEmpty;return p.push(new ro("diff.clipboard.copyDeletedContent",D?i.original.length>1?v("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):v("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):i.original.length>1?v("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):v("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>DH(this,void 0,void 0,function*(){const b=this._originalTextModel.getValueInRange(i.original.toExclusiveRange());yield this._clipboardService.writeText(b)}))),i.original.length>1&&p.push(new ro("diff.clipboard.copyDeletedLineContent",D?v("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.original.startLineNumber+d):v("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",i.original.startLineNumber+d),void 0,!0,()=>DH(this,void 0,void 0,function*(){let b=this._originalTextModel.getLineContent(i.original.startLineNumber+d);b===""&&(b=this._originalTextModel.getEndOfLineSequence()===0?` +`}};dU=xg([Br(0,tu)],dU);class Hct{publicLog2(){}}class eF{constructor(){const e=dt.from({scheme:eF.SCHEME,authority:"model",path:"/"});this.workspace={id:vbe,folders:[new hot({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===eF.SCHEME?this.workspace.folders[0]:null}}eF.SCHEME="inmemory";function Aw(u,e,t){if(!e||!(u instanceof w2e))return;const n=[];Object.keys(e).forEach(i=>{Vat(i)&&n.push([`editor.${i}`,e[i]]),t&&$at(i)&&n.push([`diffEditor.${i}`,e[i]])}),n.length>0&&u.updateValues(n)}let hU=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return Cx(this,void 0,void 0,function*(){const n=Array.isArray(e)?e:QX.convert(e),i=new Map;for(const o of n){if(!(o instanceof Zh))throw new Error("bad edit - only text edits are supported");const s=this._modelService.getModel(o.resource);if(!s)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&s.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(s);l||(l=[],i.set(s,l)),l.push(yn.replaceMove(j.lift(o.textEdit.range),o.textEdit.text))}let r=0,a=0;for(const[o,s]of i)o.pushStackElement(),o.pushEditOperations([],s,()=>[]),o.pushStackElement(),a+=1,r+=s.length;return{ariaSummary:y3(fG.bulkEditServiceSummary,r,a),isApplied:r>0}})}};hU=xg([Br(0,_n)],hU);class Vct{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return O0(e)}}let EU=class extends pG{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){const i=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();i&&(t=i.getContainerDomNode())}return super.showContextView(e,t,n)}};EU=xg([Br(0,f6),Br(1,Cu)],EU);class $ct{constructor(){this._neverEmitter=new Q,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Kct extends Vk{constructor(){super()}}class Wct extends Tct{constructor(){super(new cJe)}}let mU=class extends NG{constructor(e,t,n,i,r,a){super(e,t,n,i,r,a),this.configure({blockMouse:!1})}};mU=xg([Br(0,i0),Br(1,bi),Br(2,F4),Br(3,qu),Br(4,$1),Br(5,pt)],mU);class Gct{playAudioCue(e,t){return Cx(this,void 0,void 0,function*(){})}}au(tu,w2e,0);au(sX,cU,0);au(H6e,dU,0);au(M3,eF,0);au(cv,Vct,0);au(i0,Hct,0);au(DA,Oct,0);au(JX,Ict,0);au(bi,Xk,0);au(G1,lE,0);au(vn,Kct,0);au(a0,mct,0);au(r0,Wct,0);au(_n,fw,0);au(mX,jG,0);au(pt,oU,0);au(xbe,Rct,0);au(Dg,WP,0);au(Ul,e0t,0);au(ql,yW,0);au(xA,hU,0);au(Cbe,$ct,0);au(Vo,sU,0);au(k4,uU,0);au(Z0,flt,0);au(ni,lU,0);au(qu,pv,0);au(md,eU,0);au(F4,EU,0);au(Cs,OG,0);au(_4,aU,0);au(Wl,mU,0);au($1,nU,0);au(_A,Gct,0);var ht;(function(u){const e=new CP;for(const[s,l]of Bae())e.set(s,l);const t=new yw(e,!0);e.set(mt,t);function n(s){i||a({});const l=e.get(s);if(!l)throw new Error("Missing service "+s);return l instanceof Rd?t.invokeFunction(c=>c.get(s)):l}u.get=n;let i=!1;const r=new Q;function a(s){if(i)return t;i=!0;for(const[c,d]of Bae())e.get(c)||e.set(c,d);for(const c in s)if(s.hasOwnProperty(c)){const d=Ut(c);e.get(d)instanceof Rd&&e.set(d,s[c])}const l=Nct();for(const c of l)try{t.createInstance(c)}catch(d){zt(d)}return r.fire(),t}u.initialize=a;function o(s){if(i)return s();const l=new pe,c=l.add(r.event(()=>{c.dispose(),l.add(s())}));return l}u.withServices=o})(ht||(ht={}));let Uct;function Qh(){return Uct}let L2e;function qct(u){L2e=u}class z2e{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const n=t===void 0?void 0:e,i=t===void 0?e:t;return L2e({owner:n,debugName:()=>{const r=Ip(i);if(r!==void 0)return r;const o=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(i.toString());if(o)return`${this.debugName}.${o[2]}`;if(!n)return`${this.debugName} (mapped)`}},r=>i(this.read(r),r))}}class SA extends z2e{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function Fn(u,e){const t=new M2e(u,e);try{u(t)}finally{t.finish()}}function gU(u,e,t){u?e(u):Fn(e,t)}class M2e{constructor(e,t){var n;this._fn=e,this._getDebugName=t,this.updatingObservers=[],(n=Qh())===null||n===void 0||n.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():Ip(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;this.updatingObservers=null;for(const{observer:n,observable:i}of t)n.endUpdate(i);(e=Qh())===null||e===void 0||e.handleEndTransaction()}}function Nee(u,e,t,n){let i;if(u!==void 0)if(typeof u=="function"){if(i=u(),i!==void 0)return i}else return u;if(e!==void 0&&(i=Ip(e),i!==void 0))return i;if(t!==void 0){for(const r in t)if(t[r]===n)return r}}function Ip(u){const e=u.toString(),n=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),i=n?n[1]:void 0;return i==null?void 0:i.trim()}function on(u,e){return typeof u=="string"?new fU(void 0,u,e):new fU(u,void 0,e)}class fU extends SA{get debugName(){var e;return(e=Nee(this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"ObservableValue"}constructor(e,t,n){super(),this._owner=e,this._debugName=t,this._value=n}get(){return this._value}set(e,t,n){var i;if(this._value===e)return;let r;t||(t=r=new M2e(()=>{},()=>`Setting ${this.debugName}`));try{const a=this._value;this._setValue(e),(i=Qh())===null||i===void 0||i.handleObservableChanged(this,{oldValue:a,newValue:e,change:n,didChange:!0,hadValue:!0});for(const o of this.observers)t.updateObserver(o,this),o.handleChange(this,n)}finally{r&&r.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function _w(u,e){return typeof u=="string"?new T0e(void 0,u,e):new T0e(u,void 0,e)}class T0e extends fU{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}const tF=(u,e)=>u===e;function uu(u,e){return e!==void 0?new nF(u,void 0,e,void 0,void 0,void 0,tF):new nF(void 0,void 0,u,void 0,void 0,void 0,tF)}function N0e(u,e){var t;return new nF(u.owner,u.debugName,e,void 0,void 0,void 0,(t=u.equalityComparer)!==null&&t!==void 0?t:tF)}function Jct(u,e){var t;return new nF(u.owner,u.debugName,e,u.createEmptyChangeSummary,u.handleChange,void 0,(t=u.equalityComparer)!==null&&t!==void 0?t:tF)}function uF(u,e){let t,n;e===void 0?(t=u,n=void 0):(n=u,t=e);const i=new pe;return new nF(n,()=>{var r;return(r=Ip(t))!==null&&r!==void 0?r:"(anonymous)"},r=>(i.clear(),t(r,i)),void 0,void 0,()=>i.dispose(),tF)}qct(uu);class nF extends SA{get debugName(){var e;return(e=Nee(this._debugName,this._computeFn,this._owner,this))!==null&&e!==void 0?e:"(anonymous)"}constructor(e,t,n,i,r,a=void 0,o){var s,l;super(),this._owner=e,this._debugName=t,this._computeFn=n,this.createChangeSummary=i,this._handleChange=r,this._handleLastObserverRemoved=a,this._equalityComparator=o,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(s=this.createChangeSummary)===null||s===void 0?void 0:s.call(this),(l=Qh())===null||l===void 0||l.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(e=this._handleLastObserverRemoved)===null||e===void 0||e.call(this)}get(){var e;if(this.observers.size===0){const t=this._computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n;const i=this.state!==0,r=this.value;this.state=3;const a=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this._computeFn(this,a)}finally{for(const s of this.dependenciesToBeRemoved)s.removeObserver(this);this.dependenciesToBeRemoved.clear()}const o=i&&!this._equalityComparator(r,this.value);if((t=Qh())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:r,newValue:this.value,change:void 0,didChange:o,hadValue:i}),o)for(const s of this.observers)s.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const n of this.observers)n.handlePossibleChange(this);if(t)for(const n of this.observers)n.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const n of t)n.endUpdate(this)}if(this.updateCount<0)throw new Si}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const n=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0,i=this.state===3;if(n&&(this.state===1||i)&&(this.state=2,i))for(const r of this.observers)r.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function Pee(u,e){return new UP(u.debugName,e,void 0,void 0)}function Xu(u){return new UP(void 0,u,void 0,void 0)}function GP(u,e){return new UP(u.debugName,e,u.createEmptyChangeSummary,u.handleChange)}function es(u){const e=new pe,t=Pee({debugName:()=>Ip(u)||"(anonymous)"},n=>{e.clear(),u(n,e)});return ft(()=>{t.dispose(),e.dispose()})}class UP{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const t=this._debugName();if(t!==void 0)return t}const e=Ip(this._runFn);return e!==void 0?e:"(anonymous)"}constructor(e,t,n,i){var r,a;this._debugName=e,this._runFn=t,this.createChangeSummary=n,this._handleChange=i,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(r=this.createChangeSummary)===null||r===void 0?void 0:r.call(this),(a=Qh())===null||a===void 0||a.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t,n;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i,this.state=3;try{if(!this.disposed){(e=Qh())===null||e===void 0||e.handleAutorunTriggered(this);const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this._runFn(this,r)}}finally{(n=Qh())===null||n===void 0||n.handleAutorunFinished(this);for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,ck(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:i=>i===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(u){u.Observer=UP})(Xu||(Xu={}));function Sw(u){return new Zct(u)}class Zct extends z2e{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Yct(u,e){return new Promise(t=>{let n=!1,i=!1;const r=Xu(a=>{const o=u.read(a);e(o)&&(n?r.dispose():i=!0,t(o))});n=!0,i&&r.dispose()})}function zr(u,e){return new T2e(u,e)}class T2e extends SA{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=n=>{var i;const r=this._getValue(n),a=!this.hasValue||this.value!==r;(i=Qh())===null||i===void 0||i.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:r,change:void 0,didChange:a,hadValue:this.hasValue}),a&&(this.value=r,this.hasValue&&Fn(o=>{for(const s of this.observers)o.updateObserver(s,this),s.handleChange(this,void 0)},()=>{const o=this.getDebugName();return"Event fired"+(o?`: ${o}`:"")}),this.hasValue=!0)}}getDebugName(){return Ip(this._getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}(function(u){u.Observer=T2e})(zr||(zr={}));function Ps(u,e){return new Qct(u,e)}class Qct extends SA{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{Fn(n=>{for(const i of this.observers)n.updateObserver(i,this),i.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function N2e(u){return typeof u=="string"?new P0e(u):new P0e(void 0,u)}class P0e extends SA{get debugName(){var e;return(e=Nee(this._debugName,void 0,this._owner,this))!==null&&e!==void 0?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(!e){Fn(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(const n of this.observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}}function iF(u){const e=new Xct(!0);return u.addObserver(e),u.reportChanges(),ft(()=>{u.removeObserver(e)})}class Xct{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}function P2e(){return!!bve.VSCODE_DEV}function edt(u){if(P2e()){const e=tdt();return e.add(u),{dispose(){e.delete(u)}}}else return{dispose(){}}}function tdt(){w9||(w9=new Set);const u=globalThis;return u.$hotReload_applyNewExports||(u.$hotReload_applyNewExports=e=>{for(const t of w9){const n=t(e);if(n)return n}}),w9}let w9;function udt(u,e,t,n){if(u.length===0)return e;if(e.length===0)return u;const i=[];let r=0,a=0;for(;rc?(i.push(s),a++):(i.push(n(o,s)),r++,a++)}for(;r`Apply decorations from ${e.debugName}`},i=>{const r=e.read(i);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function L9(u,e){return u.appendChild(e),ft(()=>{u.removeChild(e)})}class ndt extends ne{get width(){return this._width}get height(){return this._height}constructor(e,t){super(),this.elementSizeObserver=this._register(new q6e(e,t)),this._width=on(this,this.elementSizeObserver.getWidth()),this._height=on(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>Fn(i=>{this._width.set(this.elementSizeObserver.getWidth(),i),this._height.set(this.elementSizeObserver.getHeight(),i)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function R0e(u,e){let t=u.get(),n=t,i=t;const r=on("animatedValue",t);let a=-1;const o=300;let s;e.add(GP({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(c,d)=>(c.didChange(u)&&(d.animate=d.animate||c.change),!0)},(c,d)=>{s!==void 0&&(cancelAnimationFrame(s),s=void 0),n=i,t=u.read(c),a=Date.now()-(d.animate?0:o),l()}));function l(){const c=Date.now()-a;i=Math.floor(idt(c,n,t-n,o)),c{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}}class qP{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${qP._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}qP._counter=0;function om(u,e){return Xu(t=>{for(let[n,i]of Object.entries(e))i&&typeof i=="object"&&"read"in i&&(i=i.read(t)),typeof i=="number"&&(i=`${i}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),u.style[n]=i})}function cE(u,e){return rdt([u],e),u}function rdt(u,e){P2e()&&Ps("reload",n=>edt(i=>{if([...Object.values(i)].some(r=>u.includes(r)))return r=>(n(void 0),!0)})).read(e)}function Lw(u,e,t){const n=new pe,i=[];return n.add(Xu(r=>{const a=e.read(r),o=new Map,s=new Map;t&&t(!0),u.changeViewZones(l=>{for(const c of i)l.removeZone(c);i.length=0;for(const c of a){const d=l.addZone(c);i.push(d),o.set(c,d)}}),t&&t(!1),n.add(GP({createEmptyChangeSummary(){return[]},handleChange(l,c){const d=s.get(l.changedObservable);return d!==void 0&&c.push(d),!0}},(l,c)=>{for(const d of a)d.onChange&&(s.set(d.onChange,o.get(d)),d.onChange.read(l));t&&t(!0),u.changeViewZones(d=>{for(const h of c)d.layoutZone(h)}),t&&t(!1)}))})),n.add({dispose(){t&&t(!0),u.changeViewZones(r=>{for(const a of i)r.removeZone(a)}),t&&t(!1)}}),n}class adt extends vi{dispose(){super.dispose(!0)}}var Ree=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Iee=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},odt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const sdt=hi("diff-review-insert",we.add,v("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),ldt=hi("diff-review-remove",we.remove,v("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),cdt=hi("diff-review-close",we.close,v("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let PE=class extends ne{constructor(e,t,n,i,r,a,o,s,l){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=i,this._width=r,this._height=a,this._diffs=o,this._editors=s,this._instantiationService=l,this.model=uF(this,(c,d)=>{const h=this._visible.read(c);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const E=d.add(this._instantiationService.createInstance(pU,this._diffs,this._editors,this._setVisible,this._canClose)),m=d.add(this._instantiationService.createInstance(DU,this._parentNode,E,this._width,this._height,this._editors));return{model:E,view:m}}),this._register(iF(this.model))}next(){Fn(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this.model.get().model.nextGroup(e)})}prev(){Fn(e=>{this._setVisible(!0,e),this.model.get().model.previousGroup(e)})}close(){Fn(e=>{this._setVisible(!1,e)})}};PE._ttPolicy=b4("diffReview",{createHTML:u=>u});PE=Ree([Iee(8,mt)],PE);let pU=class extends ne{constructor(e,t,n,i,r){super(),this._diffs=e,this._editors=t,this._setVisible=n,this.canClose=i,this._audioCueService=r,this._groups=on(this,[]),this._currentGroupIdx=on(this,0),this._currentElementIdx=on(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((a,o)=>this._groups.read(o)[a]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((a,o)=>{var s;return(s=this.currentGroup.read(o))===null||s===void 0?void 0:s.lines[a]}),this._register(Xu(a=>{const o=this._diffs.read(a);if(!o){this._groups.set([],void 0);return}const s=ddt(o,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());Fn(l=>{const c=this._editors.modified.getPosition();if(c){const d=s.findIndex(h=>(c==null?void 0:c.lineNumber){const o=this.currentElement.read(a);(o==null?void 0:o.type)===Qa.Deleted?this._audioCueService.playAudioCue(hu.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(o==null?void 0:o.type)===Qa.Added&&this._audioCueService.playAudioCue(hu.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Xu(a=>{var o;const s=this.currentElement.read(a);if(s&&s.type!==Qa.Header){const l=(o=s.modifiedLineNumber)!==null&&o!==void 0?o:s.diff.modified.startLineNumber;this._editors.modified.setSelection(j.fromPositions(new ee(l,1)))}}))}_goToGroupDelta(e,t){const n=this.groups.get();!n||n.length<=1||gU(t,i=>{this._currentGroupIdx.set(Gt.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),i),this._currentElementIdx.set(0,i)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Fn(n=>{this._currentElementIdx.set(Gt.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const n=t.lines.indexOf(e);n!==-1&&Fn(i=>{this._currentElementIdx.set(n,i)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Qa.Deleted?(this._editors.original.setSelection(j.fromPositions(new ee(e.originalLineNumber,1))),this._editors.original.revealLine(e.originalLineNumber),this._editors.original.focus()):(e.type!==Qa.Header&&(this._editors.modified.setSelection(j.fromPositions(new ee(e.modifiedLineNumber,1))),this._editors.modified.revealLine(e.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};pU=Ree([Iee(4,_A)],pU);const DC=3;function ddt(u,e,t){const n=[];for(const i of Qxe(u,(r,a)=>a.modified.startLineNumber-r.modified.endLineNumberExclusive<2*DC)){const r=[];r.push(new Edt);const a=new Xt(Math.max(1,i[0].original.startLineNumber-DC),Math.min(i[i.length-1].original.endLineNumberExclusive+DC,e+1)),o=new Xt(Math.max(1,i[0].modified.startLineNumber-DC),Math.min(i[i.length-1].modified.endLineNumberExclusive+DC,t+1));Xxe(i,(c,d)=>{const h=new Xt(c?c.original.endLineNumberExclusive:a.startLineNumber,d?d.original.startLineNumber:a.endLineNumberExclusive),E=new Xt(c?c.modified.endLineNumberExclusive:o.startLineNumber,d?d.modified.startLineNumber:o.endLineNumberExclusive);h.forEach(m=>{r.push(new fdt(m,E.startLineNumber+(m-h.startLineNumber)))}),d&&(d.original.forEach(m=>{r.push(new mdt(d,m))}),d.modified.forEach(m=>{r.push(new gdt(d,m))}))});const s=i[0].modified.join(i[i.length-1].modified),l=i[0].original.join(i[i.length-1].original);n.push(new hdt(new A1(s,l),r))}return n}var Qa;(function(u){u[u.Header=0]="Header",u[u.Unchanged=1]="Unchanged",u[u.Deleted=2]="Deleted",u[u.Added=3]="Added"})(Qa||(Qa={}));class hdt{constructor(e,t){this.range=e,this.lines=t}}class Edt{constructor(){this.type=Qa.Header}}class mdt{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Qa.Deleted,this.modifiedLineNumber=void 0}}class gdt{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Qa.Added,this.originalLineNumber=void 0}}class fdt{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Qa.Unchanged}}let DU=class extends ne{constructor(e,t,n,i,r,a){super(),this._element=e,this._model=t,this._width=n,this._height=i,this._editors=r,this._languageService=a,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const o=document.createElement("div");o.className="diff-review-actions",this._actionBar=this._register(new j0(o)),this._register(Xu(s=>{this._actionBar.clear(),this._model.canClose.read(s)&&this._actionBar.push(new ro("diffreview.close",v("label.close","Close"),"close-diff-review "+st.asClassName(cdt),!0,()=>odt(this,void 0,void 0,function*(){return t.close()})),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new EA(this._content,{})),Pr(this.domNode,this._scrollbar.getDomNode(),o),this._register(ft(()=>{Pr(this.domNode)})),this._register(om(this.domNode,{width:this._width,height:this._height})),this._register(om(this._content,{width:this._width,height:this._height})),this._register(es((s,l)=>{this._model.currentGroup.read(s),this._render(l)})),this._register(xi(this.domNode,"keydown",s=>{(s.equals(18)||s.equals(2066)||s.equals(530))&&(s.preventDefault(),this._model.goToNextLine()),(s.equals(16)||s.equals(2064)||s.equals(528))&&(s.preventDefault(),this._model.goToPreviousLine()),(s.equals(9)||s.equals(2057)||s.equals(521)||s.equals(1033))&&(s.preventDefault(),this._model.close()),(s.equals(10)||s.equals(3))&&(s.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._editors.original.getOptions(),n=this._editors.modified.getOptions(),i=document.createElement("div");i.className="diff-review-table",i.setAttribute("role","list"),i.setAttribute("aria-label",v("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),ea(i,n.get(50)),Pr(this._content,i);const r=this._editors.original.getModel(),a=this._editors.modified.getModel();if(!r||!a)return;const o=r.getOptions(),s=a.getOptions(),l=n.get(66),c=this._model.currentGroup.get();for(const d of(c==null?void 0:c.lines)||[]){if(!c)break;let h;if(d.type===Qa.Header){const m=document.createElement("div");m.className="diff-review-row",m.setAttribute("role","listitem");const g=c.range,f=this._model.currentGroupIndex.get(),p=this._model.groups.get().length,D=A=>A===0?v("no_lines_changed","no lines changed"):A===1?v("one_line_changed","1 line changed"):v("more_lines_changed","{0} lines changed",A),x=D(g.original.length),b=D(g.modified.length);m.setAttribute("aria-label",v({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",f+1,p,g.original.startLineNumber,x,g.modified.startLineNumber,b));const k=document.createElement("div");k.className="diff-review-cell diff-review-summary",k.appendChild(document.createTextNode(`${f+1}/${p}: @@ -${g.original.startLineNumber},${g.original.length} +${g.modified.startLineNumber},${g.modified.length} @@`)),m.appendChild(k),h=m}else h=this._createRow(d,l,this._width.get(),t,r,o,n,a,s);i.appendChild(h);const E=uu(m=>this._model.currentElement.read(m)===d);e.add(Xu(m=>{const g=E.read(m);h.tabIndex=g?0:-1,g&&h.focus()})),e.add(ce(h,"focus",()=>{this._model.goToLine(d)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,i,r,a,o,s,l){const c=i.get(143),d=c.glyphMarginWidth+c.lineNumbersWidth,h=o.get(143),E=10+h.glyphMarginWidth+h.lineNumbersWidth;let m="diff-review-row",g="";const f="diff-review-spacer";let p=null;switch(e.type){case Qa.Added:m="diff-review-row line-insert",g=" char-insert",p=sdt;break;case Qa.Deleted:m="diff-review-row line-delete",g=" char-delete",p=ldt;break}const D=document.createElement("div");D.style.minWidth=n+"px",D.className=m,D.setAttribute("role","listitem"),D.ariaLevel="";const x=document.createElement("div");x.className="diff-review-cell",x.style.height=`${t}px`,D.appendChild(x);const b=document.createElement("span");b.style.width=d+"px",b.style.minWidth=d+"px",b.className="diff-review-line-number"+g,e.originalLineNumber!==void 0?b.appendChild(document.createTextNode(String(e.originalLineNumber))):b.innerText=" ",x.appendChild(b);const k=document.createElement("span");k.style.width=E+"px",k.style.minWidth=E+"px",k.style.paddingRight="10px",k.className="diff-review-line-number"+g,e.modifiedLineNumber!==void 0?k.appendChild(document.createTextNode(String(e.modifiedLineNumber))):k.innerText=" ",x.appendChild(k);const A=document.createElement("span");if(A.className=f,p){const w=document.createElement("span");w.className=st.asClassName(p),w.innerText="  ",A.appendChild(w)}else A.innerText="  ";x.appendChild(A);let F;if(e.modifiedLineNumber!==void 0){let w=this._getLineHtml(s,o,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);PE._ttPolicy&&(w=PE._ttPolicy.createHTML(w)),x.insertAdjacentHTML("beforeend",w),F=s.getLineContent(e.modifiedLineNumber)}else{let w=this._getLineHtml(r,i,a.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);PE._ttPolicy&&(w=PE._ttPolicy.createHTML(w)),x.insertAdjacentHTML("beforeend",w),F=r.getLineContent(e.originalLineNumber)}F.length===0&&(F=v("blankLine","blank"));let S="";switch(e.type){case Qa.Unchanged:e.originalLineNumber===e.modifiedLineNumber?S=v({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",F,e.originalLineNumber):S=v("equalLine","{0} original line {1} modified line {2}",F,e.originalLineNumber,e.modifiedLineNumber);break;case Qa.Added:S=v("insertLine","+ {0} modified line {1}",F,e.modifiedLineNumber);break;case Qa.Deleted:S=v("deleteLine","- {0} original line {1}",F,e.originalLineNumber);break}return D.setAttribute("aria-label",S),D}_getLineHtml(e,t,n,i,r){const a=e.getLineContent(i),o=t.get(50),s=nr.createEmpty(a,r),l=Ys.isBasicASCII(a,e.mightContainNonBasicASCII()),c=Ys.containsRTL(a,l,e.mightContainRTL());return sP(new fg(o.isMonospace&&!t.get(33),o.canUseHalfwidthRightwardsArrow,a,!1,l,c,0,s,[],n,0,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,t.get(116),t.get(98),t.get(93),t.get(51)!==Ts.OFF,null)).html}};DU=Ree([Iee(5,vn)],DU);const pdt=hi("diff-insert",we.add,v("diffInsertIcon","Line decoration for inserts in the diff editor.")),I2e=hi("diff-remove",we.remove,v("diffRemoveIcon","Line decoration for removals in the diff editor.")),I0e=Lt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+st.asClassName(pdt),marginClassName:"gutter-insert"}),O0e=Lt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+st.asClassName(I2e),marginClassName:"gutter-delete"}),j0e=Lt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),H0e=Lt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),V0e=Lt.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),Ddt=Lt.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),xdt=Lt.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),xU=Lt.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),vdt=Lt.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),Cdt=Lt.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),bdt=Lt.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new Zr(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(v("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+st.asClassName(we.arrowRight),zIndex:10001});class sm extends ne{constructor(e,t,n,i,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=i,this._editors=r,this._originalScrollTop=zr(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Ps("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=on(this,0),this._modifiedViewZonesChangedSignal=Ps("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Ps("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=uF((h,E)=>{var m;this._element.replaceChildren();const g=this._diffModel.read(h),f=(m=g==null?void 0:g.diff.read(h))===null||m===void 0?void 0:m.movedTexts;if(!f||f.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(h);const p=this._originalEditorLayoutInfo.read(h),D=this._modifiedEditorLayoutInfo.read(h);if(!p||!D){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(h),this._originalViewZonesChangedSignal.read(h);const x=f.map(z=>{function N(V,U){const J=U.getTopForLineNumber(V.startLineNumber,!0),Y=U.getTopForLineNumber(V.endLineNumberExclusive,!0);return(J+Y)/2}const O=N(z.lineRangeMapping.original,this._editors.original),y=this._originalScrollTop.read(h),_=N(z.lineRangeMapping.modified,this._editors.modified),L=this._modifiedScrollTop.read(h),T=O-y,R=_-L,I=Math.min(O,_),H=Math.max(O,_);return{range:new Gt(I,H),from:T,to:R,fromWithoutScroll:O,toWithoutScroll:_,move:z}});x.sort(bGe(A0(z=>z.fromWithoutScroll>z.toWithoutScroll,kGe),A0(z=>z.fromWithoutScroll>z.toWithoutScroll?z.fromWithoutScroll:-z.toWithoutScroll,Uh)));const b=Oee.compute(x.map(z=>z.range)),k=10,A=p.verticalScrollbarWidth,F=(b.getTrackCount()-1)*10+k*2,S=A+F+(D.contentLeft-sm.movedCodeBlockPadding);let w=0;for(const z of x){const N=b.getTrack(w),O=A+k+N*10,y=15,_=15,L=S,T=D.glyphMarginWidth+D.lineNumbersWidth,R=18,I=document.createElementNS("http://www.w3.org/2000/svg","rect");I.classList.add("arrow-rectangle"),I.setAttribute("x",`${L-T}`),I.setAttribute("y",`${z.to-R/2}`),I.setAttribute("width",`${T}`),I.setAttribute("height",`${R}`),this._element.appendChild(I);const H=document.createElementNS("http://www.w3.org/2000/svg","g"),V=document.createElementNS("http://www.w3.org/2000/svg","path");V.setAttribute("d",`M 0 ${z.from} L ${O} ${z.from} L ${O} ${z.to} L ${L-_} ${z.to}`),V.setAttribute("fill","none"),H.appendChild(V);const U=document.createElementNS("http://www.w3.org/2000/svg","polygon");U.classList.add("arrow"),E.add(Xu(J=>{V.classList.toggle("currentMove",z.move===g.activeMovedText.read(J)),U.classList.toggle("currentMove",z.move===g.activeMovedText.read(J))})),U.setAttribute("points",`${L-_},${z.to-y/2} ${L},${z.to} ${L-_},${z.to+y/2}`),H.appendChild(U),this._element.appendChild(H),w++}this.width.set(F,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(ft(()=>this._element.remove())),this._register(Xu(h=>{const E=this._originalEditorLayoutInfo.read(h),m=this._modifiedEditorLayoutInfo.read(h);!E||!m||(this._element.style.left=`${E.width-E.verticalScrollbarWidth}px`,this._element.style.height=`${E.height}px`,this._element.style.width=`${E.verticalScrollbarWidth+E.contentLeft-sm.movedCodeBlockPadding+this.width.read(h)}px`)})),this._register(iF(this._state));const a=uu(h=>{const E=this._diffModel.read(h),m=E==null?void 0:E.diff.read(h);return m?m.movedTexts.map(g=>({move:g,original:new ww(Sw(g.lineRangeMapping.original.startLineNumber-1),18),modified:new ww(Sw(g.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(Lw(this._editors.original,a.map(h=>h.map(E=>E.original)))),this._register(Lw(this._editors.modified,a.map(h=>h.map(E=>E.modified)))),this._register(es((h,E)=>{const m=a.read(h);for(const g of m)E.add(new $0e(this._editors.original,g.original,g.move,"original",this._diffModel.get())),E.add(new $0e(this._editors.modified,g.modified,g.move,"modified",this._diffModel.get()))}));const o=zr(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),s=zr(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),l=Ps("original.onDidFocusEditorWidget",h=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0))),c=Ps("modified.onDidFocusEditorWidget",h=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>h(void 0),0)));let d="modified";this._register(GP({createEmptyChangeSummary:()=>{},handleChange:(h,E)=>(h.didChange(l)&&(d="original"),h.didChange(c)&&(d="modified"),!0)},h=>{l.read(h),c.read(h);const E=this._diffModel.read(h);if(!E)return;const m=E.diff.read(h);let g;if(m&&d==="original"){const f=o.read(h);f&&(g=m.movedTexts.find(p=>p.lineRangeMapping.original.contains(f.lineNumber)))}if(m&&d==="modified"){const f=s.read(h);f&&(g=m.movedTexts.find(p=>p.lineRangeMapping.modified.contains(f.lineNumber)))}g!==E.movedTextToCompare.get()&&E.movedTextToCompare.set(void 0,void 0),E.setActiveMovedText(g)}))}}sm.movedCodeBlockPadding=4;class Oee{static compute(e){const t=[],n=[];for(const i of e){let r=t.findIndex(a=>!a.intersectsStrict(i));r===-1&&(t.length>=6?r=RYe(t,A0(o=>o.intersectWithRangeLength(i),Uh)):(r=t.length,t.push(new rX))),t[r].addRange(i),n.push(r)}return new Oee(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class $0e extends R2e{constructor(e,t,n,i,r){const a=yr("div.diff-hidden-lines-widget");super(e,t,a.root),this._editor=e,this._move=n,this._kind=i,this._diffModel=r,this._nodes=yr("div.diff-moved-code-block",{style:{marginRight:"4px"}},[yr("div.text-content@textContent"),yr("div.action-bar@actionBar")]),a.root.appendChild(this._nodes.root);const o=zr(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(om(this._nodes.root,{paddingRight:o.map(h=>h.verticalScrollbarWidth)}));let s;n.changes.length>0?s=this._kind==="original"?v("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):s=this._kind==="original"?v("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const l=this._register(new j0(this._nodes.actionBar,{highlightToggledItems:!0})),c=new ro("",s,"",!1);l.push(c,{icon:!1,label:!0});const d=new ro("","Compare",st.asClassName(we.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Xu(h=>{const E=this._diffModel.movedTextToCompare.read(h)===n;d.checked=E})),l.push(d,{icon:!1,label:!0})}}class kdt extends ne{constructor(e,t,n){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=uu(this,i=>{var r;const a=(r=this._diffModel.read(i))===null||r===void 0?void 0:r.diff.read(i);if(!a)return null;const o=this._diffModel.read(i).movedTextToCompare.read(i),s=this._options.renderIndicators.read(i),l=this._options.showEmptyDecorations.read(i),c=[],d=[];if(!o)for(const E of a.mappings){if(E.lineRangeMapping.original.isEmpty||c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:s?O0e:H0e}),E.lineRangeMapping.modified.isEmpty||d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:s?I0e:j0e}),E.lineRangeMapping.modified.isEmpty||E.lineRangeMapping.original.isEmpty)E.lineRangeMapping.original.isEmpty||c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:vdt}),E.lineRangeMapping.modified.isEmpty||d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:Ddt});else for(const m of E.lineRangeMapping.innerChanges||[])E.lineRangeMapping.original.contains(m.originalRange.startLineNumber)&&c.push({range:m.originalRange,options:m.originalRange.isEmpty()&&l?Cdt:xU}),E.lineRangeMapping.modified.contains(m.modifiedRange.startLineNumber)&&d.push({range:m.modifiedRange,options:m.modifiedRange.isEmpty()&&l?xdt:V0e});!E.lineRangeMapping.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(i)&&!o&&d.push({range:j.fromPositions(new ee(E.lineRangeMapping.modified.startLineNumber,1)),options:bdt})}if(o)for(const E of o.changes){const m=E.original.toInclusiveRange();m&&c.push({range:m,options:s?O0e:H0e});const g=E.modified.toInclusiveRange();g&&d.push({range:g,options:s?I0e:j0e});for(const f of E.innerChanges||[])c.push({range:f.originalRange,options:xU}),d.push({range:f.modifiedRange,options:V0e})}const h=this._diffModel.read(i).activeMovedText.read(i);for(const E of a.movedTexts)c.push({range:E.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(E===h?" currentMove":""),blockPadding:[sm.movedCodeBlockPadding,0,sm.movedCodeBlockPadding,sm.movedCodeBlockPadding]}}),d.push({range:E.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(E===h?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:c,modifiedDecorations:d}}),this._register(Bw(this._editors.original,this._decorations.map(i=>(i==null?void 0:i.originalDecorations)||[]))),this._register(Bw(this._editors.modified,this._decorations.map(i=>(i==null?void 0:i.modifiedDecorations)||[])))}}class Fdt extends ne{constructor(e,t,n){super(),this._options=e,this._domNode=t,this._dimensions=n,this._sashRatio=on(this,void 0),this.sashLeft=uu(this,i=>{var r;const a=(r=this._sashRatio.read(i))!==null&&r!==void 0?r:this._options.splitViewDefaultRatio.read(i);return this._computeSashLeft(a,i)}),this._sash=this._register(new oa(this._domNode,{getVerticalSashTop:i=>0,getVerticalSashLeft:i=>this.sashLeft.get(),getVerticalSashHeight:i=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(i=>{const r=this._dimensions.width.get(),a=this._computeSashLeft((this._startSashPosition+(i.currentX-i.startX))/r,void 0);this._sashRatio.set(a/r,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register(Xu(i=>{const r=this._options.enableSplitViewResizing.read(i);this._sash.state=r?3:0,this.sashLeft.read(i),this._dimensions.height.read(i),this._sash.layout()}))}setBoundarySashes(e){this._sash.orthogonalEndSash=e.bottom}_computeSashLeft(e,t){const n=this._dimensions.width.read(t),i=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):i,a=100;return n<=a*2?i:rn-a?n-a:r}}let _5=class{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let r=0;t.children.get(i)!==void 0;r++)i=`${n}_${r}`;return i}static empty(e){return e.children.size===0}},K0e=class extends _5{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}},ydt=class extends _5{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}},Adt=class cf extends _5{static create(e,t,n){const i=new vi(n),r=new cf(t.uri),a=e.ordered(t),o=a.map((l,c)=>{var d;const h=_5.findId(`provider_${c}`,r),E=new ydt(h,r,(d=l.displayName)!==null&&d!==void 0?d:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(t,i.token)).then(m=>{for(const g of m||[])cf._makeOutlineElement(g,E);return E},m=>(Mi(m),E)).then(m=>{_5.empty(m)?m.remove():r._groups.set(h,m)})}),s=e.onDidChange(()=>{const l=e.ordered(t);di(l,a)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!n.isCancellationRequested?cf.create(e,t,n):r._compact()).finally(()=>{i.dispose(),s.dispose()})}static _makeOutlineElement(e,t){const n=_5.findId(e,t),i=new K0e(n,t,e);if(e.children)for(const r of e.children)cf._makeOutlineElement(r,i);t.children.set(i.id,i)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=$t.first(this._groups.values());for(const[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof K0e?e.push(t.symbol):e.push(...$t.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>j.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return cf._flattenDocumentSymbols(t,e,""),t.sort((n,i)=>ee.compare(j.getStartPosition(n.range),j.getStartPosition(i.range))||ee.compare(j.getEndPosition(i.range),j.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&cf._flattenDocumentSymbols(e,i.children,i.name)}};var O2e=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j2e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_dt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vU=class extends ne{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(e,t,n,i){super(),this._editors=e,this._diffModel=t,this._options=n,this._languageFeaturesService=i,this._isUpdatingViewZones=!1,this._modifiedOutlineSource=uF(this,(l,c)=>{const d=this._editors.modifiedModel.read(l);if(d)return c.add(new CU(this._languageFeaturesService,d))}),this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===3){const c=this._diffModel.get();Fn(d=>{for(const h of this._editors.original.getSelections()||[])c==null||c.ensureOriginalLineIsVisible(h.getStartPosition().lineNumber,d),c==null||c.ensureOriginalLineIsVisible(h.getEndPosition().lineNumber,d)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===3){const c=this._diffModel.get();Fn(d=>{for(const h of this._editors.modified.getSelections()||[])c==null||c.ensureModifiedLineIsVisible(h.getStartPosition().lineNumber,d),c==null||c.ensureModifiedLineIsVisible(h.getEndPosition().lineNumber,d)})}}));const r=this._diffModel.map((l,c)=>{var d,h;return((d=l==null?void 0:l.diff.read(c))===null||d===void 0?void 0:d.mappings.length)===0?[]:(h=l==null?void 0:l.unchangedRegions.read(c))!==null&&h!==void 0?h:[]}),a=uF(this,(l,c)=>{const d=this._modifiedOutlineSource.read(l);if(!d)return{origViewZones:[],modViewZones:[]};const h=[],E=[],m=this._options.renderSideBySide.read(l),g=r.read(l);for(const f of g)if(!f.shouldHideControls(l)){{const p=uu(x=>f.getHiddenOriginalRange(x).startLineNumber-1),D=new ww(p,24);h.push(D),c.add(new W0e(this._editors.original,D,f,f.originalUnchangedRange,!m,d,x=>this._diffModel.get().ensureModifiedLineIsVisible(x,void 0),this._options))}{const p=uu(x=>f.getHiddenModifiedRange(x).startLineNumber-1),D=new ww(p,24);E.push(D),c.add(new W0e(this._editors.modified,D,f,f.modifiedUnchangedRange,!1,d,x=>this._diffModel.get().ensureModifiedLineIsVisible(x,void 0),this._options))}}return{origViewZones:h,modViewZones:E}}),o={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},s={description:"Fold Unchanged",glyphMarginHoverMessage:new Zr(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(v("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+st.asClassName(we.fold),zIndex:10001};this._register(Bw(this._editors.original,uu(l=>{const c=r.read(l),d=c.map(h=>({range:h.originalUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&d.push({range:j.fromPositions(new ee(h.originalLineNumber,1)),options:s});return d}))),this._register(Bw(this._editors.modified,uu(l=>{const c=r.read(l),d=c.map(h=>({range:h.modifiedUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&d.push({range:Xt.ofLength(h.modifiedLineNumber,1).toInclusiveRange(),options:s});return d}))),this._register(Lw(this._editors.original,a.map(l=>l.origViewZones),l=>this._isUpdatingViewZones=l)),this._register(Lw(this._editors.modified,a.map(l=>l.modViewZones),l=>this._isUpdatingViewZones=l)),this._register(Xu(l=>{const c=r.read(l);this._editors.original.setHiddenAreas(c.map(d=>d.getHiddenOriginalRange(l).toInclusiveRange()).filter(tk)),this._editors.modified.setHiddenAreas(c.map(d=>d.getHiddenModifiedRange(l).toInclusiveRange()).filter(tk))})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){const d=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const E=h.unchangedRegions.get().find(m=>m.modifiedUnchangedRange.includes(d));if(!E)return;E.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&(!((c=l.target.element)===null||c===void 0)&&c.className.includes("fold-unchanged"))){const d=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const E=h.unchangedRegions.get().find(m=>m.originalUnchangedRange.includes(d));if(!E)return;E.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}};vU=O2e([j2e(3,We)],vU);let CU=class extends ne{constructor(e,t){super(),this._languageFeaturesService=e,this._textModel=t,this._currentModel=on(this,void 0);const n=Ps("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),i=Ps("_textModel.onDidChangeContent",Ne.debounce(r=>this._textModel.onDidChangeContent(r),()=>{},100));this._register(es((r,a)=>_dt(this,void 0,void 0,function*(){n.read(r),i.read(r);const o=a.add(new adt),s=yield Adt.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,o.token);a.isDisposed||this._currentModel.set(s,void 0)})))}getBreadcrumbItems(e,t){const n=this._currentModel.read(t);if(!n)return[];const i=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return i.sort(nve(A0(r=>r.range.endLineNumber-r.range.startLineNumber,Uh))),i.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};CU=O2e([j2e(0,We)],CU);class W0e extends R2e{constructor(e,t,n,i,r,a,o,s){const l=yr("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=i,this.hide=r,this._modifiedOutlineSource=a,this._revealModifiedHiddenLine=o,this._options=s,this._nodes=yr("div.diff-hidden-lines",[yr("div.top@top",{title:v("diff.hiddenLines.top","Click or drag to show more above")}),yr("div.center@content",{style:{display:"flex"}},[yr("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[ve("a",{title:v("showAll","Show all"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...im("$(unfold)"))]),yr("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),yr("div.bottom@bottom",{title:v("diff.bottom","Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const c=zr(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this.hide?Pr(this._nodes.first):this._register(om(this._nodes.first,{width:c.map(h=>h.contentLeft)}));const d=this._editor;this._register(ce(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const E=h.clientY;let m=!1;const g=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const f=ce(window,"mousemove",D=>{const b=D.clientY-E;m=m||Math.abs(b)>2;const k=Math.round(b/d.getOption(66)),A=Math.max(0,Math.min(g+k,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(A,void 0)}),p=ce(window,"mouseup",D=>{m||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),f.dispose(),p.dispose()})})),this._register(ce(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const E=h.clientY;let m=!1;const g=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const f=ce(window,"mousemove",D=>{const b=D.clientY-E;m=m||Math.abs(b)>2;const k=Math.round(b/d.getOption(66)),A=Math.max(0,Math.min(g-k,this._unchangedRegion.getMaxVisibleLineCountBottom())),F=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(A,void 0);const S=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(S-F))}),p=ce(window,"mouseup",D=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!m){const x=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const b=d.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);d.setScrollTop(d.getScrollTop()+(b-x))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),f.dispose(),p.dispose()})})),this._register(Xu(h=>{const E=[];if(!this.hide){const m=n.getHiddenModifiedRange(h).length,g=v("hiddenLines","{0} hidden lines",m),f=ve("span",{title:v("diff.hiddenLines.expandAll","Double click to unfold")},g);f.addEventListener("dblclick",x=>{x.button===0&&(x.preventDefault(),this._unchangedRegion.showAll(void 0))}),E.push(f);const p=this._unchangedRegion.getHiddenModifiedRange(h),D=this._modifiedOutlineSource.getBreadcrumbItems(p,h);if(D.length>0){E.push(ve("span",void 0,"  |  "));for(let x=0;x{this._revealModifiedHiddenLine(b.startLineNumber)}}}}Pr(this._nodes.others,...E)}))}}class td{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new td(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0;const i=e.getVisibleRanges();if(i.length>0){t=i[0].getStartPosition();const r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new td(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,i,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=i,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}var Sdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},G0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Bdt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},df;let zw=df=class{constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new Q,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)===null||e===void 0||e.dispose()}computeDiff(e,t,n,i){var r,a;return Bdt(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,i);if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new I0(new Xt(1,2),new Xt(1,t.getLineCount()+1),[new Om(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const o=JSON.stringify([e.uri.toString(),t.uri.toString()]),s=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),l=df.diffCache.get(o);if(l&&l.context===s)return l.result;const c=va.create(),d=yield this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),h=c.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:(r=d==null?void 0:d.quitEarly)!==null&&r!==void 0?r:!0,detectedMoves:n.computeMoves?(a=d==null?void 0:d.moves.length)!==null&&a!==void 0?a:0:-1}),i.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!d)throw new Error("no diff result available");return df.diffCache.size>10&&df.diffCache.delete(df.diffCache.keys().next().value),df.diffCache.set(o,{result:d,context:s}),d})}setOptions(e){var t;let n=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};zw.diffCache=new Map;zw=df=Sdt([G0e(1,ql),G0e(2,i0)],zw);var wdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ldt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const H2e=Ut("diffProviderFactoryService");let bU=class{constructor(e){this.instantiationService=e}createDiffProvider(e,t){return this.instantiationService.createInstance(zw,t)}};bU=wdt([Ldt(0,mt)],bU);au(H2e,bU,1);var zdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Mdt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},U0e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let kU=class extends ne{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n,i){super(),this.model=e,this._options=t,this._editor=n,this._diffProviderFactoryService=i,this._isDiffUpToDate=on(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=on(this,void 0),this.diff=this._diff,this._unchangedRegions=on(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=uu(this,s=>this._options.hideUnchangedRegions.read(s)?this._unchangedRegions.read(s).regions:(Fn(l=>{for(const c of this._unchangedRegions.get().regions)c.collapseAll(l)}),[])),this.movedTextToCompare=on(this,void 0),this._activeMovedText=on(this,void 0),this._hoveredMovedText=on(this,void 0),this.activeMovedText=uu(this,s=>{var l,c;return(c=(l=this.movedTextToCompare.read(s))!==null&&l!==void 0?l:this._hoveredMovedText.read(s))!==null&&c!==void 0?c:this._activeMovedText.read(s)}),this._cancellationTokenSource=new vi,this._diffProvider=uu(this,s=>{const l=this._diffProviderFactoryService.createDiffProvider(this._editor,{diffAlgorithm:this._options.diffAlgorithm.read(s)}),c=Ps("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(ft(()=>this._cancellationTokenSource.cancel()));const r=N2e("contentChangedSignal"),a=this._register(new Hu(()=>r.trigger(void 0),200)),o=(s,l,c)=>{const d=Mw.fromDiffs(s.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c)),h=this._unchangedRegions.get(),E=h.originalDecorationIds.map(p=>e.original.getDecorationRange(p)).filter(p=>!!p).map(p=>Xt.fromRange(p)),m=h.modifiedDecorationIds.map(p=>e.modified.getDecorationRange(p)).filter(p=>!!p).map(p=>Xt.fromRange(p)),g=e.original.deltaDecorations(h.originalDecorationIds,d.map(p=>({range:p.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),f=e.modified.deltaDecorations(h.modifiedDecorationIds,d.map(p=>({range:p.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const p of d)for(let D=0;D{if(this._diff.get()){const c=$h.fromModelContentChanges(s.changes);this._lastDiff,e.original,e.modified}a.schedule()})),this._register(e.original.onDidChangeContent(s=>{if(this._diff.get()){const c=$h.fromModelContentChanges(s.changes);this._lastDiff,e.original,e.modified}a.schedule()})),this._register(es((s,l)=>U0e(this,void 0,void 0,function*(){var c,d;this._options.hideUnchangedRegionsMinimumLineCount.read(s),this._options.hideUnchangedRegionsContextLineCount.read(s),a.cancel(),r.read(s);const h=this._diffProvider.read(s);h.onChangeSignal.read(s),cE(O6e,s),cE(FW,s),this._isDiffUpToDate.set(!1,void 0);let E=[];l.add(e.original.onDidChangeContent(f=>{const p=$h.fromModelContentChanges(f.changes);E=WB(E,p)}));let m=[];l.add(e.modified.onDidChangeContent(f=>{const p=$h.fromModelContentChanges(f.changes);m=WB(m,p)}));let g=yield h.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(s),maxComputationTimeMs:this._options.maxComputationTimeMs.read(s),computeMoves:this._options.showMoves.read(s)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(g=Tdt(g,e.original,e.modified),g=(c=(e.original,e.modified,void 0))!==null&&c!==void 0?c:g,g=(d=(e.original,e.modified,void 0))!==null&&d!==void 0?d:g,Fn(f=>{o(g,f),this._lastDiff=g;const p=jee.fromDiffResult(g);this._diff.set(p,f),this._isDiffUpToDate.set(!0,f);const D=this.movedTextToCompare.get();this.movedTextToCompare.set(D?this._lastDiff.moves.find(x=>x.lineRangeMapping.modified.intersect(D.lineRangeMapping.modified)):void 0,f)}))})))}ensureModifiedLineIsVisible(e,t){var n;if(((n=this.diff.get())===null||n===void 0?void 0:n.mappings.length)===0)return;const i=this._unchangedRegions.get().regions;for(const r of i)if(r.getHiddenModifiedRange(void 0).contains(e)){r.showModifiedLine(e,t);return}}ensureOriginalLineIsVisible(e,t){var n;if(((n=this.diff.get())===null||n===void 0?void 0:n.mappings.length)===0)return;const i=this._unchangedRegions.get().regions;for(const r of i)if(r.getHiddenOriginalRange(void 0).contains(e)){r.showOriginalLine(e,t);return}}waitForDiff(){return U0e(this,void 0,void 0,function*(){yield Yct(this.isDiffUpToDate,e=>e)})}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){const t=e.collapsedRegions.map(i=>Xt.deserialize(i.range)),n=this._unchangedRegions.get();Fn(i=>{for(const r of n.regions)for(const a of t)if(r.modifiedUnchangedRange.intersect(a)){r.setHiddenModifiedRange(a,i);break}})}};kU=zdt([Mdt(3,H2e)],kU);function Tdt(u,e,t){return{changes:u.changes.map(n=>new I0(n.original,n.modified,n.innerChanges?n.innerChanges.map(i=>Ndt(i,e,t)):void 0)),moves:u.moves,identical:u.identical,quitEarly:u.quitEarly}}function Ndt(u,e,t){let n=u.originalRange,i=u.modifiedRange;return(n.endColumn!==1||i.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&i.endColumn===t.getLineMaxColumn(i.endLineNumber)&&n.endLineNumbernew V2e(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,i){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=i}}class V2e{constructor(e){this.lineRangeMapping=e}}class Mw{static fromDiffs(e,t,n,i,r){const a=I0.inverse(e,t,n),o=[];for(const s of a){let l=s.original.startLineNumber,c=s.modified.startLineNumber,d=s.original.length;const h=l===1&&c===1,E=l+d===t+1&&c+d===n+1;(h||E)&&d>=r+i?(h&&!E&&(d-=r),E&&!h&&(l+=r,c+=r,d-=r),o.push(new Mw(l,c,d,0,0))):d>=r*2+i&&(l+=r,c+=r,d-=r*2,o.push(new Mw(l,c,d,0,0)))}return o}get originalUnchangedRange(){return Xt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Xt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,i,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=on(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=on(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=uu(this,a=>this.visibleLineCountTop.read(a)+this.visibleLineCountBottom.read(a)===this.lineCount&&!this.isDragged.read(a)),this.isDragged=on(this,!1),this._visibleLineCountTop.set(i,void 0),this._visibleLineCountBottom.set(r,void 0)}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Xt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Xt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const n=e.startLineNumber-this.modifiedLineNumber,i=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,i,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){const n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),i=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;n{var f;this._contextMenuService.showContextMenu({domForShadowRoot:h&&(f=n.getDomNode())!==null&&f!==void 0?f:void 0,getAnchor:()=>({x:m,y:g}),getActions:()=>{const p=[],D=i.modified.isEmpty;return p.push(new ro("diff.clipboard.copyDeletedContent",D?i.original.length>1?v("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):v("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):i.original.length>1?v("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):v("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>DH(this,void 0,void 0,function*(){const b=this._originalTextModel.getValueInRange(i.original.toExclusiveRange());yield this._clipboardService.writeText(b)}))),i.original.length>1&&p.push(new ro("diff.clipboard.copyDeletedLineContent",D?v("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",i.original.startLineNumber+d):v("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",i.original.startLineNumber+d),void 0,!0,()=>DH(this,void 0,void 0,function*(){let b=this._originalTextModel.getLineContent(i.original.startLineNumber+d);b===""&&(b=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r -`),yield this._clipboardService.writeText(b)}))),n.getOption(90)||p.push(new ro("diff.inline.revertChange",v("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>DH(this,void 0,void 0,function*(){this._editor.revert(this._diff)}))),p},autoSelectFirstItem:!0})};this._register(xi(this._diffActions,"mousedown",m=>{const{top:g,height:f}=ji(this._diffActions),p=Math.floor(c/3);m.preventDefault(),E(m.posx,g+f+p)})),this._register(n.onMouseMove(m=>{(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()?(d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(m=>{m.event.rightButton&&(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()&&(m.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,c),E(m.event.posx,m.event.posy+c))}))}_updateLightBulbPosition(e,t,n){const{top:i}=ji(e),r=t-i,a=Math.floor(r/n),o=a*n;if(this._diffActions.style.top=`${o}px`,this._viewLineCounts){let s=0;for(let l=0;lu});function Rdt(u,e,t,n){ea(n,e.fontInfo);const i=t.length>0,r=new h6(1e4);let a=0,o=0;const s=[];for(let h=0;h');const s=e.getLineContent(),l=Zs.isBasicASCII(s,i),c=Zs.containsRTL(s,l,r),d=sA(new fg(a.fontInfo.isMonospace&&!a.disableMonospaceOptimizations,a.fontInfo.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,e,t,a.tabSize,0,a.fontInfo.spaceWidth,a.fontInfo.middotWidth,a.fontInfo.wsmiddotWidth,a.stopRenderingLineAfter,a.renderWhitespace,a.renderControlCharacters,a.fontLigatures!==Ms.OFF,null),o);return o.appendString(""),d.characterMapping.getHorizontalOffset(d.characterMapping.length)}var Odt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Z0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let FU=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._diffEditorWidget=i,this._canIgnoreViewZoneUpdateEvent=r,this._clipboardService=a,this._contextMenuService=o,this._originalTopPadding=on(this,0),this._originalScrollOffset=on(this,0),this._originalScrollOffsetAnimated=R0e(this._originalScrollOffset,this._store),this._modifiedTopPadding=on(this,0),this._modifiedScrollOffset=on(this,0),this._modifiedScrollOffsetAnimated=R0e(this._modifiedScrollOffset,this._store);let s=!1;const l=on("state",0),c=this._register(new Hu(()=>{l.set(l.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(b=>{!s&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(b=>{!s&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&c.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&c.schedule()}));const d=this._diffModel.map(b=>b?zr(b.model.original.onDidChangeTokens,()=>b.model.original.tokenization.backgroundTokenizationState===2):void 0).map((b,k)=>b==null?void 0:b.read(k)),h=new Set,E=new Set,m=uu(b=>{const k=this._diffModel.read(b),A=k==null?void 0:k.diff.read(b);if(!k||!A)return null;l.read(b);const S=this._options.renderSideBySide.read(b);return Y0e(this._editors.original,this._editors.modified,A.mappings,h,E,S)}),g=uu(b=>{var k;const A=(k=this._diffModel.read(b))===null||k===void 0?void 0:k.movedTextToCompare.read(b);if(!A)return null;l.read(b);const F=A.changes.map(S=>new V2e(S));return Y0e(this._editors.original,this._editors.modified,F,h,E,!0)});function f(){const b=document.createElement("div");return b.className="diagonal-fill",b}const p=this._register(new pe),D=uu(b=>{var k,A,F,S,w,z,N,O;p.clear();const y=m.read(b)||[],_=[],L=[],T=this._modifiedTopPadding.read(b);T>0&&L.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:T,showInHiddenAreas:!0,suppressMouseDown:!0});const R=this._originalTopPadding.read(b);R>0&&_.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:R,showInHiddenAreas:!0,suppressMouseDown:!0});const I=this._options.renderSideBySide.read(b),H=I||(k=this._editors.modified._getViewModel())===null||k===void 0?void 0:k.createLineBreaksComputer();if(H){for(const _e of y)if(_e.diff)for(let Ve=_e.originalRange.startLineNumber;Ve<_e.originalRange.endLineNumberExclusive;Ve++)H==null||H.addRequest(this._editors.original.getModel().getLineContent(Ve),null,null)}const V=(A=H==null?void 0:H.finalize())!==null&&A!==void 0?A:[];let U=0;const J=this._editors.modified.getOption(66),Y=(F=this._diffModel.read(b))===null||F===void 0?void 0:F.movedTextToCompare.read(b),X=(w=(S=this._editors.original.getModel())===null||S===void 0?void 0:S.mightContainNonBasicASCII())!==null&&w!==void 0?w:!1,re=(N=(z=this._editors.original.getModel())===null||z===void 0?void 0:z.mightContainRTL())!==null&&N!==void 0?N:!1,ge=Hee.fromEditor(this._editors.modified);for(const _e of y)if(_e.diff&&!I){if(!_e.originalRange.isEmpty){d.read(b);const Ue=document.createElement("div");Ue.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const qe=new Idt(_e.originalRange.mapToLineArray(je=>this._editors.original.getModel().tokenization.getLineTokens(je)),_e.originalRange.mapToLineArray(je=>V[U++]),X,re),Se=[];for(const je of _e.diff.innerChanges||[])Se.push(new Yb(je.originalRange.delta(-(_e.diff.original.startLineNumber-1)),xU.className,0));const de=Rdt(qe,ge,Se,Ue),he=document.createElement("div");if(he.className="inline-deleted-margin-view-zone",ea(he,ge.fontInfo),this._options.renderIndicators.read(b))for(let je=0;jeNf(Be),he,this._editors.modified,_e.diff,this._diffEditorWidget,de.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let je=0;je1&&_.push({afterLineNumber:_e.originalRange.startLineNumber+je,domNode:f(),heightInPx:(bt-1)*J,showInHiddenAreas:!0,suppressMouseDown:!0})}L.push({afterLineNumber:_e.modifiedRange.startLineNumber-1,domNode:Ue,heightInPx:de.heightInLines*J,minWidthInPx:de.minWidthInPx,marginDomNode:he,setZoneId(je){Be=je},showInHiddenAreas:!0,suppressMouseDown:!0})}const Ve=document.createElement("div");Ve.className="gutter-delete",_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:_e.modifiedHeightInPx,marginDomNode:Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Ve=_e.modifiedHeightInPx-_e.originalHeightInPx;if(Ve>0){if(Y!=null&&Y.lineRangeMapping.original.delta(-1).deltaLength(2).contains(_e.originalRange.endLineNumberExclusive-1))continue;_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Ue=function(){const Se=document.createElement("div");return Se.className="arrow-revert-change "+st.asClassName(we.arrowRight),ve("div",{},Se)};if(Y!=null&&Y.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(_e.modifiedRange.endLineNumberExclusive-1))continue;let qe;_e.diff&&_e.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(b)&&(qe=Ue()),L.push({afterLineNumber:_e.modifiedRange.endLineNumberExclusive-1,domNode:f(),heightInPx:-Ve,marginDomNode:qe,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const _e of(O=g.read(b))!==null&&O!==void 0?O:[]){if(!(Y!=null&&Y.lineRangeMapping.original.intersect(_e.originalRange))||!(Y!=null&&Y.lineRangeMapping.modified.intersect(_e.modifiedRange)))continue;const Ve=_e.modifiedHeightInPx-_e.originalHeightInPx;Ve>0?_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:Ve,showInHiddenAreas:!0,suppressMouseDown:!0}):L.push({afterLineNumber:_e.modifiedRange.endLineNumberExclusive-1,domNode:f(),heightInPx:-Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:_,mod:L}});this._register(Xo(b=>{const k=td.capture(this._editors.modified),A=D.read(b);s=!0,this._editors.original.changeViewZones(F=>{for(const S of h)F.removeZone(S);h.clear();for(const S of A.orig){const w=F.addZone(S);S.setZoneId&&S.setZoneId(w),h.add(w)}}),this._editors.modified.changeViewZones(F=>{for(const S of E)F.removeZone(S);E.clear();for(const S of A.mod){const w=F.addZone(S);S.setZoneId&&S.setZoneId(w),E.add(w)}}),s=!1,k.restore(this._editors.modified)})),this._register(ft(()=>{this._editors.original.changeViewZones(b=>{for(const k of h)b.removeZone(k);h.clear()}),this._editors.modified.changeViewZones(b=>{for(const k of E)b.removeZone(k);E.clear()})}));let x=!1;this._register(this._editors.original.onDidScrollChange(b=>{b.scrollLeftChanged&&!x&&(x=!0,this._editors.modified.setScrollLeft(b.scrollLeft),x=!1)})),this._register(this._editors.modified.onDidScrollChange(b=>{b.scrollLeftChanged&&!x&&(x=!0,this._editors.original.setScrollLeft(b.scrollLeft),x=!1)})),this._originalScrollTop=zr(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Xu(b=>{const k=this._originalScrollTop.read(b)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(b))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(b));k!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(k,1)})),this._register(Xu(b=>{const k=this._modifiedScrollTop.read(b)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(b))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(b));k!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(k,1)})),this._register(Xu(b=>{var k;const A=(k=this._diffModel.read(b))===null||k===void 0?void 0:k.movedTextToCompare.read(b);let F=0;if(A){const S=this._editors.original.getTopForLineNumber(A.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();F=this._editors.modified.getTopForLineNumber(A.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-S}F>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(F,void 0)):F<0?(this._modifiedTopPadding.set(-F,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-F,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+F,void 0,!0)}))}};FU=Odt([Z0e(5,_4),Z0e(6,Wl)],FU);function Y0e(u,e,t,n,i,r){const a=new s4(Q0e(u,n)),o=new s4(Q0e(e,i)),s=u.getOption(66),l=e.getOption(66),c=[];let d=0,h=0;function E(m,g){for(;;){let f=a.peek(),p=o.peek();if(f&&f.lineNumber>=m&&(f=void 0),p&&p.lineNumber>=g&&(p=void 0),!f&&!p)break;const D=f?f.lineNumber-d:Number.MAX_VALUE,x=p?p.lineNumber-h:Number.MAX_VALUE;Dx?(o.dequeue(),f={lineNumber:p.lineNumber-h+d,heightInPx:0}):(a.dequeue(),o.dequeue()),c.push({originalRange:Xt.ofLength(f.lineNumber,1),modifiedRange:Xt.ofLength(p.lineNumber,1),originalHeightInPx:s+f.heightInPx,modifiedHeightInPx:l+p.heightInPx,diff:void 0})}}for(const m of t){let x=function(b,k){var A,F,S,w;if(b_.lineNumber_+L.heightInPx,0))!==null&&F!==void 0?F:0,y=(w=(S=o.takeWhile(_=>_.lineNumber_+L.heightInPx,0))!==null&&w!==void 0?w:0;c.push({originalRange:z,modifiedRange:N,originalHeightInPx:z.length*s+O,modifiedHeightInPx:N.length*l+y,diff:m.lineRangeMapping}),D=b,p=k};const g=m.lineRangeMapping;E(g.original.startLineNumber,g.modified.startLineNumber);let f=!0,p=g.modified.startLineNumber,D=g.original.startLineNumber;if(r)for(const b of g.innerChanges||[])b.originalRange.startColumn>1&&b.modifiedRange.startColumn>1&&x(b.originalRange.startLineNumber,b.modifiedRange.startLineNumber),b.originalRange.endColumn1&&n.push({lineNumber:s,heightInPx:a*(l-1)})}for(const s of u.getWhitespaces()){if(e.has(s.id))continue;const l=s.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new ee(s.afterLineNumber,1)).lineNumber;t.push({lineNumber:l,heightInPx:s.height})}return udt(t,n,s=>s.lineNumber,(s,l)=>({lineNumber:s.lineNumber,heightInPx:s.heightInPx+l.heightInPx}))}var jdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hdt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sc;let Xh=sc=class extends ne{constructor(e,t,n,i,r,a,o,s){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=i,this._rootHeight=r,this._modifiedEditorLayoutInfo=a,this._options=o,this._themeService=s;const l=zr(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=uu(E=>{const m=l.read(E),g=m.getColor(QXe)||(m.getColor(ZXe)||MW).transparent(2),f=m.getColor(XXe)||(m.getColor(YXe)||TW).transparent(2);return{insertColor:g,removeColor:f}}),d=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),h=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollHeight());this._register(Xo((E,m)=>{if(!this._options.renderOverviewRuler.read(E))return;const g=ku(document.createElement("div"));g.setClassName("diffViewport"),g.setPosition("absolute");const f=yr("div.diffOverview",{style:{position:"absolute",top:"0px",width:sc.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;m.add(L9(f,g.domNode)),m.add(xi(f,Me.POINTER_DOWN,p=>{this._editors.modified.delegateVerticalScrollbarPointerDown(p)})),m.add(ce(f,Me.MOUSE_WHEEL,p=>{this._editors.modified.delegateScrollFromMouseWheelEvent(p)},{passive:!1})),m.add(L9(this._rootElement,f)),m.add(Xo((p,D)=>{const x=this._diffModel.read(p),b=this._editors.original.createOverviewRuler("original diffOverviewRuler");b&&(D.add(b),D.add(L9(f,b.getDomNode())));const k=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(k&&(D.add(k),D.add(L9(f,k.getDomNode()))),!b||!k)return;const A=Ns("viewZoneChanged",this._editors.original.onDidChangeViewZones),F=Ns("viewZoneChanged",this._editors.modified.onDidChangeViewZones),S=Ns("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),w=Ns("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);D.add(Xu(z=>{var N;A.read(z),F.read(z),S.read(z),w.read(z);const O=c.read(z),y=(N=x==null?void 0:x.diff.read(z))===null||N===void 0?void 0:N.mappings;function _(R,I,H){const V=H._getViewModel();return V?R.filter(U=>U.length>0).map(U=>{const J=V.coordinatesConverter.convertModelPositionToViewPosition(new ee(U.startLineNumber,1)),Y=V.coordinatesConverter.convertModelPositionToViewPosition(new ee(U.endLineNumberExclusive,1)),X=Y.lineNumber-J.lineNumber;return new MCe(J.lineNumber,Y.lineNumber,X,I.toString())}):[]}const L=_((y||[]).map(R=>R.lineRangeMapping.original),O.removeColor,this._editors.original),T=_((y||[]).map(R=>R.lineRangeMapping.modified),O.insertColor,this._editors.modified);b==null||b.setZones(L),k==null||k.setZones(T)})),D.add(Xu(z=>{const N=this._rootHeight.read(z),O=this._rootWidth.read(z),y=this._modifiedEditorLayoutInfo.read(z);if(y){const _=sc.ENTIRE_DIFF_OVERVIEW_WIDTH-2*sc.ONE_OVERVIEW_WIDTH;b.setLayout({top:0,height:N,right:_+sc.ONE_OVERVIEW_WIDTH,width:sc.ONE_OVERVIEW_WIDTH}),k.setLayout({top:0,height:N,right:0,width:sc.ONE_OVERVIEW_WIDTH});const L=d.read(z),T=h.read(z),R=this._editors.modified.getOption(102),I=new ov(R.verticalHasArrows?R.arrowSize:0,R.verticalScrollbarSize,0,y.height,T,L);g.setTop(I.getSliderPosition()),g.setHeight(I.getSliderSize())}else g.setTop(0),g.setHeight(0);f.style.height=N+"px",f.style.left=O-sc.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",g.setWidth(sc.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}))}};Xh.ONE_OVERVIEW_WIDTH=15;Xh.ENTIRE_DIFF_OVERVIEW_WIDTH=sc.ONE_OVERVIEW_WIDTH*2;Xh=sc=jdt([Hdt(7,sr)],Xh);q("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},v("diffEditor.move.border","The border color for text that got moved in the diff editor."));q("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},v("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));class JP extends ne{constructor(){super(...arguments),this._id=++JP.idCounter,this._onDidDispose=this._register(new Q),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,i=!0){this._targetEditor.revealRange(e,t,n,i)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}JP.idCounter=0;var Vdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let yU=class extends ne{constructor(e,t,n,i,r,a,o){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._createInnerEditor=r,this._instantiationService=a,this._keybindingService=o,this._onDidContentSizeChange=this._register(new Q),this.original=this._register(this._createLeftHandSideEditor(n.editorOptions.get(),i.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(n.editorOptions.get(),i.modifiedEditor||{})),this.modifiedModel=zr(this.modified.onDidChangeModel,()=>this.modified.getModel()),this._register(GP({createEmptyChangeSummary:()=>({}),handleChange:(s,l)=>(s.didChange(n.editorOptions)&&Object.assign(l,s.change.changedOptions),!0)},(s,l)=>{n.editorOptions.read(s),this._options.renderSideBySide.read(s),this.modified.updateOptions(this._adjustOptionsForRightHandSide(s,l)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(s,l))}))}_createLeftHandSideEditor(e,t){const n=this._adjustOptionsForLeftHandSide(void 0,e),i=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return i.setContextValue("isInDiffLeftEditor",!0),i}_createRightHandSideEditor(e,t){const n=this._adjustOptionsForRightHandSide(void 0,e),i=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return i.setContextValue("isInDiffRightEditor",!0),i}_constructInnerEditor(e,t,n,i){const r=this._createInnerEditor(e,t,n,i);return this._register(r.onDidContentSizeChange(a=>{const o=this.original.getContentWidth()+this.modified.getContentWidth()+Xh.ENTIRE_DIFF_OVERVIEW_WIDTH,s=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:s,contentWidth:o,contentHeightChanged:a.contentHeightChanged,contentWidthChanged:a.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=cd.revealHorizontalRightPadding.defaultValue+Xh.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){const t=Object.assign(Object.assign({},e),{dimension:{height:0,width:0}});return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const n=v("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};yU=Vdt([X0e(5,mt),X0e(6,qu)],yU);class $dt{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=uu(this,i=>this._options.read(i).renderSideBySide&&this.diffEditorWidth.read(i)<=this._options.read(i).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=uu(this,i=>this._options.read(i).renderOverviewRuler),this.renderSideBySide=uu(this,i=>this._options.read(i).renderSideBySide&&!(this._options.read(i).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(i))),this.readOnly=uu(this,i=>this._options.read(i).readOnly),this.shouldRenderRevertArrows=uu(this,i=>!(!this._options.read(i).renderMarginRevertIcon||!this.renderSideBySide.read(i)||this.readOnly.read(i))),this.renderIndicators=uu(this,i=>this._options.read(i).renderIndicators),this.enableSplitViewResizing=uu(this,i=>this._options.read(i).enableSplitViewResizing),this.splitViewDefaultRatio=uu(this,i=>this._options.read(i).splitViewDefaultRatio),this.ignoreTrimWhitespace=uu(this,i=>this._options.read(i).ignoreTrimWhitespace),this.maxComputationTimeMs=uu(this,i=>this._options.read(i).maxComputationTime),this.showMoves=uu(this,i=>this._options.read(i).experimental.showMoves&&this.renderSideBySide.read(i)),this.isInEmbeddedEditor=uu(this,i=>this._options.read(i).isInEmbeddedEditor),this.diffWordWrap=uu(this,i=>this._options.read(i).diffWordWrap),this.originalEditable=uu(this,i=>this._options.read(i).originalEditable),this.diffCodeLens=uu(this,i=>this._options.read(i).diffCodeLens),this.accessibilityVerbose=uu(this,i=>this._options.read(i).accessibilityVerbose),this.diffAlgorithm=uu(this,i=>this._options.read(i).diffAlgorithm),this.showEmptyDecorations=uu(this,i=>this._options.read(i).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=uu(this,i=>this._options.read(i).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=uu(this,i=>this._options.read(i).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.minimumLineCount);const n=Object.assign(Object.assign({},e),ele(e,ya));this._options=on(this,n)}updateOptions(e){const t=ele(e,this._options.get()),n=Object.assign(Object.assign(Object.assign({},this._options.get()),e),t);this._options.set(n,void 0,{changedOptions:e})}}function ele(u,e){var t,n,i,r,a,o,s,l;return{enableSplitViewResizing:ut(u.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:KGe(u.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:ut(u.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:ut(u.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:rf(u.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:rf(u.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:ut(u.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:ut(u.renderIndicators,e.renderIndicators),originalEditable:ut(u.originalEditable,e.originalEditable),diffCodeLens:ut(u.diffCodeLens,e.diffCodeLens),renderOverviewRuler:ut(u.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Di(u.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Di(u.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:ut(u.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:ut((t=u.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:ut((n=u.experimental)===null||n===void 0?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:ut((r=(i=u.hideUnchangedRegions)===null||i===void 0?void 0:i.enabled)!==null&&r!==void 0?r:(a=u.experimental)===null||a===void 0?void 0:a.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:rf((o=u.hideUnchangedRegions)===null||o===void 0?void 0:o.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:rf((s=u.hideUnchangedRegions)===null||s===void 0?void 0:s.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:rf((l=u.hideUnchangedRegions)===null||l===void 0?void 0:l.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:ut(u.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:ut(u.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:rf(u.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:ut(u.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var Kdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let O3=class extends JP{constructor(e,t,n,i,r,a,o,s){var l;super(),this._domElement=e,this._parentContextKeyService=i,this._parentInstantiationService=r,this._audioCueService=o,this._editorProgressService=s,this.elements=yr("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[yr("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[ve("span",{},"No Changes")]),yr("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),yr("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),yr("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register(_w("diffModel",void 0)),this.onDidChangeModel=Ne.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new CP([pt,this._contextKeyService])),this._boundarySashes=on(this,void 0),this._accessibleDiffViewerShouldBeVisible=on(this,!1),this._accessibleDiffViewerVisible=uu(this,g=>this._options.onlyShowAccessibleDiffViewer.read(g)?!0:this._accessibleDiffViewerShouldBeVisible.read(g)),this.movedBlocksLinesPart=on(this,void 0),this._layoutInfo=uu(this,g=>{var f,p,D;const x=this._rootSizeObserver.width.read(g),b=this._rootSizeObserver.height.read(g),k=(f=this._sash.read(g))===null||f===void 0?void 0:f.sashLeft.read(g),A=k??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),F=x-A-(this._options.renderOverviewRuler.read(g)?Xh.ENTIRE_DIFF_OVERVIEW_WIDTH:0),S=(D=(p=this.movedBlocksLinesPart.read(g))===null||p===void 0?void 0:p.width.read(g))!==null&&D!==void 0?D:0,w=A-S;return this.elements.original.style.width=w+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=F+"px",this.elements.modified.style.left=A+"px",this._editors.original.layout({width:w,height:b}),this._editors.modified.layout({width:F,height:b}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((g,f)=>g==null?void 0:g.diff.read(f)),this.onDidUpdateDiff=Ne.fromObservableLight(this._diffValue),a.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(ft(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new ndt(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((l=t.automaticLayout)!==null&&l!==void 0?l:!1),this._options=new $dt(t,this._rootSizeObserver.width),this._contextKeyService.createKey(W.isEmbeddedDiffEditor.key,!1);const c=W.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(Xu(g=>{c.set(this._options.isInEmbeddedEditor.read(g))}));const d=W.comparingMovedCode.bindTo(this._contextKeyService);this._register(Xu(g=>{var f;d.set(!!(!((f=this._diffModel.read(g))===null||f===void 0)&&f.movedTextToCompare.read(g)))}));const h=W.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(Xu(g=>{h.set(this._options.couldShowInlineViewBecauseOfSize.read(g))})),this._editors=this._register(this._instantiationService.createInstance(yU,this.elements.original,this.elements.modified,this._options,n,(g,f,p,D)=>this._createInnerEditor(g,f,p,D))),this._sash=uF(this,(g,f)=>{const p=this._options.renderSideBySide.read(g);if(this.elements.root.classList.toggle("side-by-side",p),!p)return;const D=f.add(new Fdt(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((x,b)=>x-(this._options.renderOverviewRuler.read(b)?Xh.ENTIRE_DIFF_OVERVIEW_WIDTH:0))}));return f.add(Xu(x=>{const b=this._boundarySashes.read(x);b&&D.setBoundarySashes(b)})),D}),this._register(iF(this._sash)),this._register(Xo((g,f)=>{this.unchangedRangesFeature=f.add(this._instantiationService.createInstance(cE(vU,g),this._editors,this._diffModel,this._options))})),this._register(Xo((g,f)=>{f.add(new(cE(kdt,g))(this._editors,this._diffModel,this._options))})),this._register(Xo((g,f)=>{f.add(this._instantiationService.createInstance(cE(FU,g),this._editors,this._diffModel,this._options,this,()=>this.unchangedRangesFeature.isUpdatingViewZones))})),this._register(Xo((g,f)=>{f.add(this._instantiationService.createInstance(cE(Xh,g),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(p=>p.modifiedEditor),this._options))})),this._register(Xo((g,f)=>{this._accessibleDiffViewer=f.add(this._register(this._instantiationService.createInstance(cE(PE,g),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(p,D)=>this._accessibleDiffViewerShouldBeVisible.set(p,D),this._options.onlyShowAccessibleDiffViewer.map(p=>!p),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((p,D)=>{var x;return(x=p==null?void 0:p.diff.read(D))===null||x===void 0?void 0:x.mappings.map(b=>b.lineRangeMapping)}),this._editors)))}));const E=this._accessibleDiffViewerVisible.map(g=>g?"hidden":"visible");this._register(om(this.elements.modified,{visibility:E})),this._register(om(this.elements.original,{visibility:E})),this._createDiffEditorContributions(),a.addDiffEditor(this),this._register(iF(this._layoutInfo)),this._register(Xo((g,f)=>{this.movedBlocksLinesPart.set(f.add(new(cE(sm,g))(this.elements.root,this._diffModel,this._layoutInfo.map(p=>p.originalEditor),this._layoutInfo.map(p=>p.modifiedEditor),this._editors)),void 0)})),this._register(om(this.elements.overlay,{width:this._layoutInfo.map((g,f)=>g.originalEditor.width+(this._options.renderSideBySide.read(f)?0:g.modifiedEditor.width)),visibility:uu(g=>{var f,p;return this._options.hideUnchangedRegions.read(g)&&((p=(f=this._diffModel.read(g))===null||f===void 0?void 0:f.diff.read(g))===null||p===void 0?void 0:p.mappings.length)===0?"visible":"hidden"})})),this._register(this._editors.modified.onMouseDown(g=>{var f,p;if(!g.event.rightButton&&g.target.position&&(!((f=g.target.element)===null||f===void 0)&&f.className.includes("arrow-revert-change"))){const D=g.target.position.lineNumber,x=g.target,b=this._diffModel.get();if(!b)return;const k=(p=b.diff.get())===null||p===void 0?void 0:p.mappings;if(!k)return;const A=k.find(F=>(x==null?void 0:x.detail.afterLineNumber)===F.lineRangeMapping.modified.startLineNumber-1||F.lineRangeMapping.modified.startLineNumber===D);if(!A)return;this.revert(A.lineRangeMapping),g.event.stopPropagation()}})),this._register(Ne.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,g=>{var f,p;if((g==null?void 0:g.reason)===3){const D=(p=(f=this._diffModel.get())===null||f===void 0?void 0:f.diff.get())===null||p===void 0?void 0:p.mappings.find(x=>x.lineRangeMapping.modified.contains(g.position.lineNumber));D!=null&&D.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(hu.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):D!=null&&D.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(hu.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):D&&this._audioCueService.playAudioCue(hu.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const m=this._diffModel.map((g,f)=>g==null?void 0:g.isDiffUpToDate.read(f));this._register(Xo((g,f)=>{if(m.read(g)===!1){const p=this._editorProgressService.show(!0,1e3);f.add(ft(()=>p.done()))}}))}_createInnerEditor(e,t,n,i){return e.createInstance(lv,t,n,i)}_createDiffEditorContributions(){const e=ux.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){zt(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return oA.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const t=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:t,modified:n,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(n.modelState))}}createViewModel(e){return this._instantiationService.createInstance(kU,e,this._options,this)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e){!e&&this._diffModel.get()&&this._accessibleDiffViewer.close();const t=e?"model"in e?e:this.createViewModel(e):void 0;this._editors.original.setModel(t?t.model.original:null),this._editors.modified.setModel(t?t.model.modified:null),Fn(n=>{this._diffModel.set(t,n)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?Udt(t):null}revert(e){var t;const n=(t=this._diffModel.get())===null||t===void 0?void 0:t.model;if(!n)return;const i=e.innerChanges?e.innerChanges.map(r=>({range:r.modifiedRange,text:n.original.getValueInRange(r.originalRange)})):[{range:e.modified.toExclusiveRange(),text:n.original.getValueInRange(e.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",i)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var e,t;const n=this._editors.modified.hasWidgetFocus(),i=n?this._editors.modified:this._editors.original,r=n?this._editors.original:this._editors.modified;let a;const o=i.getSelection();if(o){const s=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(l=>n?l.lineRangeMapping.flip():l.lineRangeMapping);if(s){const l=tle(o.getStartPosition(),s),c=tle(o.getEndPosition(),s);a=j.plusRange(l,c)}}return{destination:r,destinationSelection:a}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Fn(n=>{for(const i of t)i.collapseAll(n)})}showAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Fn(n=>{for(const i of t)i.showAll(n)})}};O3=Kdt([xC(3,pt),xC(4,mt),xC(5,Cu),xC(6,_A),xC(7,Dg)],O3);function tle(u,e){const t=BB(e,i=>i.original.startLineNumber<=u.lineNumber);if(!t)return j.fromPositions(u);if(t.original.endLineNumberExclusive<=u.lineNumber){const i=u.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return j.fromPositions(new ee(i,u.column))}if(!t.innerChanges)return j.fromPositions(new ee(t.modified.startLineNumber,1));const n=BB(t.innerChanges,i=>i.originalRange.getStartPosition().isBeforeOrEqual(u));if(!n){const i=u.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return j.fromPositions(new ee(i,u.column))}if(n.originalRange.containsPosition(u))return n.modifiedRange;{const i=Wdt(n.originalRange.getEndPosition(),u);return j.fromPositions(Gdt(n.modifiedRange.getEndPosition(),i))}}function Wdt(u,e){return u.lineNumber===e.lineNumber?new Mk(0,e.column-u.column):new Mk(e.lineNumber-u.lineNumber,e.column-1)}function Gdt(u,e){return e.lineCount===0?new ee(u.lineNumber,u.column+e.columnCount):new ee(u.lineNumber+e.lineCount,e.columnCount+1)}function Udt(u){return u.mappings.map(e=>{const t=e.lineRangeMapping;let n,i,r,a,o=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,i=0,o=void 0):(n=t.original.startLineNumber,i=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,a=0,o=void 0):(r=t.modified.startLineNumber,a=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:i,modifiedStartLineNumber:r,modifiedEndLineNumber:a,charChanges:o==null?void 0:o.map(s=>({originalStartLineNumber:s.originalRange.startLineNumber,originalStartColumn:s.originalRange.startColumn,originalEndLineNumber:s.originalRange.endLineNumber,originalEndColumn:s.originalRange.endColumn,modifiedStartLineNumber:s.modifiedRange.startLineNumber,modifiedStartColumn:s.modifiedRange.startColumn,modifiedEndLineNumber:s.modifiedRange.endLineNumber,modifiedEndColumn:s.modifiedRange.endColumn}))}})}var Vee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Dn=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let qdt=0,ule=!1;function Jdt(u){if(!u){if(ule)return;ule=!0}qQe(u||document.body)}let Tw=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h){const E=Object.assign({},t);E.ariaLabel=E.ariaLabel||rw.editorViewAccessibleLabel,E.ariaLabel=E.ariaLabel+";"+rw.accessibilityHelpMessage,super(e,E,{},n,i,r,a,s,l,c,d,h),o instanceof pv?this._standaloneKeybindingService=o:this._standaloneKeybindingService=null,Jdt(E.ariaContainerElement)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const i="DYNAMIC_"+ ++qdt,r=Ee.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,r),i}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ne.None;const t=e.id,n=e.label,i=Ee.and(Ee.equals("editorId",this.getId()),Ee.deserialize(e.precondition)),r=e.keybindings,a=Ee.and(i,Ee.deserialize(e.keybindingContext)),o=e.contextMenuGroupId||null,s=e.contextMenuOrder||0,l=(E,...m)=>Promise.resolve(e.run(this,...m)),c=new pe,d=this.getId()+":"+t;if(c.add(ru.registerCommand(d,l)),o){const E={command:{id:d,title:n},when:i,group:o,order:s};c.add(Lr.appendMenuItem(K.EditorContext,E))}if(Array.isArray(r))for(const E of r)c.add(this._standaloneKeybindingService.addDynamicKeybinding(d,E,l,a));const h=new TCe(d,n,n,i,(...E)=>Promise.resolve(e.run(this,...E)),this._contextKeyService);return this._actions.set(t,h),c.add(ft(()=>{this._actions.delete(t)})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof YB)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Tw=Vee([Dn(2,mt),Dn(3,Cu),Dn(4,ni),Dn(5,pt),Dn(6,qu),Dn(7,sr),Dn(8,bi),Dn(9,k4),Dn(10,tn),Dn(11,We)],Tw);let AU=class extends Tw{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g){const f=Object.assign({},t);Aw(c,f,!1);const p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast);const D=f.model;delete f.model,super(e,f,n,i,r,a,o,s,l,d,m,g),this._configurationService=c,this._standaloneThemeService=s,this._register(p);let x;if(typeof D>"u"){const b=E.getLanguageIdByMimeType(f.language)||f.language||Ks;x=$2e(h,E,f.value||"",b,void 0),this._ownsModel=!0}else x=D,this._ownsModel=!1;if(this._attachModel(x),x){const b={oldModelUrl:null,newModelUrl:x.uri};this._onDidChangeModel.fire(b)}}dispose(){super.dispose()}updateOptions(e){Aw(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};AU=Vee([Dn(2,mt),Dn(3,Cu),Dn(4,ni),Dn(5,pt),Dn(6,qu),Dn(7,r0),Dn(8,bi),Dn(9,tu),Dn(10,k4),Dn(11,_n),Dn(12,vn),Dn(13,tn),Dn(14,We)],AU);let _U=class extends O3{constructor(e,t,n,i,r,a,o,s,l,c,d,h){const E=Object.assign({},t);Aw(s,E,!0);const m=a.registerEditorContainer(e);typeof E.theme=="string"&&a.setTheme(E.theme),typeof E.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(!!E.autoDetectHighContrast),super(e,E,{},i,n,r,h,c),this._configurationService=s,this._standaloneThemeService=a,this._register(m)}dispose(){super.dispose()}updateOptions(e){Aw(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(Tw,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};_U=Vee([Dn(2,mt),Dn(3,pt),Dn(4,Cu),Dn(5,r0),Dn(6,bi),Dn(7,tu),Dn(8,Wl),Dn(9,Dg),Dn(10,_4),Dn(11,_A)],_U);function $2e(u,e,t,n,i){if(t=t||"",!n){const r=t.indexOf(` -`);let a=t;return r!==-1&&(a=t.substring(0,r)),nle(u,t,e.createByFilepathOrFirstLine(i||null,a),i)}return nle(u,t,e.createById(n),i)}function nle(u,e,t,n){return u.createModel(e,t,n)}var K2e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Zdt(u,e,t){return ht.initialize(t||{}).createInstance(AU,u,e)}function Ydt(u){return ht.get(Cu).onCodeEditorAdd(t=>{u(t)})}function Qdt(u){return ht.get(Cu).onDiffEditorAdd(t=>{u(t)})}function Xdt(){return ht.get(Cu).listCodeEditors()}function e1t(){return ht.get(Cu).listDiffEditors()}function t1t(u,e,t){return ht.initialize(t||{}).createInstance(_U,u,e)}function u1t(u){if(typeof u.id!="string"||typeof u.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return ru.registerCommand(u.id,u.run)}function n1t(u){if(typeof u.id!="string"||typeof u.label!="string"||typeof u.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=Ee.deserialize(u.precondition),t=(i,...r)=>xr.runEditorCommand(i,r,e,(a,o,s)=>Promise.resolve(u.run(o,...s))),n=new pe;if(n.add(ru.registerCommand(u.id,t)),u.contextMenuGroupId){const i={command:{id:u.id,title:u.label},when:e,group:u.contextMenuGroupId,order:u.contextMenuOrder||0};n.add(Lr.appendMenuItem(K.EditorContext,i))}if(Array.isArray(u.keybindings)){const i=ht.get(qu);if(!(i instanceof pv))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const r=Ee.and(e,Ee.deserialize(u.keybindingContext));n.add(i.addDynamicKeybindings(u.keybindings.map(a=>({keybinding:a,command:u.id,when:r}))))}}return n}function i1t(u){return W2e([u])}function W2e(u){const e=ht.get(qu);return e instanceof pv?e.addDynamicKeybindings(u.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:Ee.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ne.None)}function r1t(u,e,t){const n=ht.get(vn),i=n.getLanguageIdByMimeType(e)||e;return $2e(ht.get(_n),n,u,i,t)}function a1t(u,e){const t=ht.get(vn),n=t.getLanguageIdByMimeType(e)||e||Ks;u.setLanguage(t.createById(n))}function o1t(u,e,t){u&&ht.get(G1).changeOne(e,u.uri,t)}function s1t(u){ht.get(G1).changeAll(u,[])}function l1t(u){return ht.get(G1).read(u)}function c1t(u){return ht.get(G1).onMarkerChanged(u)}function d1t(u){return ht.get(_n).getModel(u)}function h1t(){return ht.get(_n).getModels()}function E1t(u){return ht.get(_n).onModelAdded(u)}function m1t(u){return ht.get(_n).onModelRemoved(u)}function g1t(u){return ht.get(_n).onModelLanguageChanged(t=>{u({model:t.model,oldLanguage:t.oldLanguageId})})}function f1t(u){return vQe(ht.get(_n),ht.get(tn),u)}function p1t(u,e){const t=ht.get(vn),n=ht.get(r0);return EX.colorizeElement(n,t,u,e).then(()=>{n.registerEditorContainer(u)})}function D1t(u,e,t){const n=ht.get(vn);return ht.get(r0).registerEditorContainer(document.body),EX.colorize(n,u,e,t)}function x1t(u,e,t=4){return ht.get(r0).registerEditorContainer(document.body),EX.colorizeModelLine(u,e,t)}function v1t(u){const e=qn.get(u);return e||{getInitialState:()=>ev,tokenize:(t,n,i)=>cX(u,i)}}function C1t(u,e){qn.getOrCreate(e);const t=v1t(e),n=F1(u),i=[];let r=t.getInitialState();for(let a=0,o=n.length;aK2e(this,void 0,void 0,function*(){var r;if(!n)return null;const a=(r=t.options)===null||r===void 0?void 0:r.selection;let o;return a&&typeof a.endLineNumber=="number"&&typeof a.endColumn=="number"?o=a:a&&(o={lineNumber:a.startLineNumber,column:a.startColumn}),(yield u.openCodeEditor(n,t.resource,o))?n:null}))}function S1t(){return{create:Zdt,getEditors:Xdt,getDiffEditors:e1t,onDidCreateEditor:Ydt,onDidCreateDiffEditor:Qdt,createDiffEditor:t1t,addCommand:u1t,addEditorAction:n1t,addKeybindingRule:i1t,addKeybindingRules:W2e,createModel:r1t,setModelLanguage:a1t,setModelMarkers:o1t,getModelMarkers:l1t,removeAllMarkers:s1t,onDidChangeMarkers:c1t,getModels:h1t,getModel:d1t,onDidCreateModel:E1t,onWillDisposeModel:m1t,onDidChangeModelLanguage:g1t,createWebWorker:f1t,colorizeElement:p1t,colorize:D1t,colorizeModelLine:x1t,tokenize:C1t,defineTheme:b1t,setTheme:k1t,remeasureFonts:F1t,registerCommand:y1t,registerLinkOpener:A1t,registerEditorOpener:_1t,AccessibilitySupport:DK,ContentWidgetPositionPreference:FK,CursorChangeReason:yK,DefaultEndOfLine:AK,EditorAutoIndentStrategy:SK,EditorOption:BK,EndOfLinePreference:wK,EndOfLineSequence:LK,MinimapPosition:jK,MouseTargetType:HK,OverlayWidgetPositionPreference:VK,OverviewRulerLane:$K,GlyphMarginLane:zK,RenderLineNumbersType:WK,RenderMinimap:GK,ScrollbarVisibility:qK,ScrollType:UK,TextEditorCursorBlinkingStyle:XK,TextEditorCursorStyle:eW,TrackedRangeStickiness:tW,WrappingIndent:uW,InjectedTextCursorStops:TK,PositionAffinity:KK,ConfigurationChangedEvent:gve,BareFontInfo:u3,FontInfo:rW,TextModelResolvedOptions:KS,FindMatch:mk,ApplyUpdateResult:qb,EditorZoom:g0,EditorType:oA,EditorOptions:cd}}function B1t(u,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!u(t))return!1;return!0}function z9(u,e){return typeof u=="boolean"?u:e}function ile(u,e){return typeof u=="string"?u:e}function w1t(u){const e={};for(const t of u)e[t]=!0;return e}function rle(u,e=!1){e&&(u=u.map(function(n){return n.toLowerCase()}));const t=w1t(u);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function SU(u,e){e=e.replace(/@@/g,"");let t=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let o="";if(typeof u[a]=="string")o=u[a];else if(u[a]&&u[a]instanceof RegExp)o=u[a].source;else throw u[a]===void 0?hn(u,"language definition does not contain attribute '"+a+"', used at: "+e):hn(u,"attribute reference '"+a+"' must be a string, used at: "+e);return GD(o)?"":"(?:"+o+")"}),t++;while(n&&t<5);e=e.replace(/\x01/g,"@");const i=(u.ignoreCase?"i":"")+(u.unicode?"u":"");return new RegExp(e,i)}function L1t(u,e,t,n){if(n<0)return u;if(n=100){n=n-100;const i=t.split(".");if(i.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw hn(u,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw hn(u,"the next state must be a string value in rule: "+e);{let i=t.next;if(!/^(@pop|@push|@popall)$/.test(i)&&(i[0]==="@"&&(i=i.substr(1)),i.indexOf("$")<0&&!jQe(u,xE(u,i,"",[],""))))throw hn(u,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=i}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,u.usesEmbedded=!0),n}}else if(Array.isArray(t)){const n=[];for(let i=0,r=t.length;i0&&n[0]==="^",this.name=this.name+": "+n,this.regex=SU(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=BU(e,this.name,t)}}function G2e(u,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=u,t.includeLF=z9(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=z9(e.ignoreCase,!1),t.unicode=z9(e.unicode,!1),t.tokenPostfix=ile(e.tokenPostfix,"."+t.languageId),t.defaultToken=ile(e.defaultToken,"source"),t.usesEmbedded=!1;const n=e;n.languageId=u,n.includeLF=t.includeLF,n.ignoreCase=t.ignoreCase,n.unicode=t.unicode,n.noThrow=t.noThrow,n.usesEmbedded=t.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=t.defaultToken;function i(a,o,s){for(const l of s){let c=l.include;if(c){if(typeof c!="string")throw hn(t,"an 'include' attribute must be a string at: "+a);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw hn(t,"include target '"+c+"' is not defined at: "+a);i(a+"."+c,o,e.tokenizer[c])}else{const d=new M1t(a);if(Array.isArray(l)&&l.length>=1&&l.length<=3)if(d.setRegex(n,l[0]),l.length>=3)if(typeof l[1]=="string")d.setAction(n,{token:l[1],next:l[2]});else if(typeof l[1]=="object"){const h=l[1];h.next=l[2],d.setAction(n,h)}else throw hn(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+a);else d.setAction(n,l[1]);else{if(!l.regex)throw hn(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+a);l.name&&typeof l.name=="string"&&(d.name=l.name),l.matchOnlyAtStart&&(d.matchOnlyAtLineStart=z9(l.matchOnlyAtLineStart,!1)),d.setRegex(n,l.regex),d.setAction(n,l.action)}o.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw hn(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const a in e.tokenizer)if(e.tokenizer.hasOwnProperty(a)){t.start||(t.start=a);const o=e.tokenizer[a];t.tokenizer[a]=new Array,i("tokenizer."+a,t.tokenizer[a],o)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw hn(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const r=[];for(const a of e.brackets){let o=a;if(o&&Array.isArray(o)&&o.length===3&&(o={token:o[2],open:o[0],close:o[1]}),o.open===o.close)throw hn(t,"open and close brackets in a 'brackets' attribute must be different: "+o.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof o.open=="string"&&typeof o.token=="string"&&typeof o.close=="string")r.push({token:o.token+t.tokenPostfix,open:tm(t,o.open),close:tm(t,o.close)});else throw hn(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}var T1t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function N1t(u){Qx.registerLanguage(u)}function P1t(){let u=[];return u=u.concat(Qx.getLanguages()),u}function R1t(u){return ht.get(vn).languageIdCodec.encodeLanguageId(u)}function I1t(u,e){return ht.withServices(()=>{const n=ht.get(vn).onDidRequestRichLanguageFeatures(i=>{i===u&&(n.dispose(),e())});return n})}function O1t(u,e){return ht.withServices(()=>{const n=ht.get(vn).onDidRequestBasicLanguageFeatures(i=>{i===u&&(n.dispose(),e())});return n})}function j1t(u,e){if(!ht.get(vn).isRegisteredLanguageId(u))throw new Error(`Cannot set configuration for unknown language ${u}`);return ht.get(tn).register(u,e,100)}class H1t{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return rF.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){const i=this._actual.tokenizeEncoded(e,n);return new RN(i.tokens,i.endState)}}class rF{constructor(e,t,n,i){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=i}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const n=[];let i=0;for(let r=0,a=e.length;r0&&r[a-1]===h)continue;let E=d.startIndex;l===0?E=0:ET1t(this,void 0,void 0,function*(){const n=yield Promise.resolve(e.create());return n?V1t(n)?q2e(u,n):new Ck(ht.get(vn),ht.get(r0),u,G2e(u,n),ht.get(tu)):null}));return qn.registerFactory(u,t)}function W1t(u,e){if(!ht.get(vn).isRegisteredLanguageId(u))throw new Error(`Cannot set tokens provider for unknown language ${u}`);return U2e(e)?$ee(u,{create:()=>e}):qn.register(u,q2e(u,e))}function G1t(u,e){const t=n=>new Ck(ht.get(vn),ht.get(r0),u,G2e(u,n),ht.get(tu));return U2e(e)?$ee(u,{create:()=>e}):qn.register(u,t(e))}function U1t(u,e){return ht.get(We).referenceProvider.register(u,e)}function q1t(u,e){return ht.get(We).renameProvider.register(u,e)}function J1t(u,e){return ht.get(We).signatureHelpProvider.register(u,e)}function Z1t(u,e){return ht.get(We).hoverProvider.register(u,{provideHover:(n,i,r)=>{const a=n.getWordAtPosition(i);return Promise.resolve(e.provideHover(n,i,r)).then(o=>{if(o)return!o.range&&a&&(o.range=new j(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn)),o.range||(o.range=new j(i.lineNumber,i.column,i.lineNumber,i.column)),o})}})}function Y1t(u,e){return ht.get(We).documentSymbolProvider.register(u,e)}function Q1t(u,e){return ht.get(We).documentHighlightProvider.register(u,e)}function X1t(u,e){return ht.get(We).linkedEditingRangeProvider.register(u,e)}function eht(u,e){return ht.get(We).definitionProvider.register(u,e)}function tht(u,e){return ht.get(We).implementationProvider.register(u,e)}function uht(u,e){return ht.get(We).typeDefinitionProvider.register(u,e)}function nht(u,e){return ht.get(We).codeLensProvider.register(u,e)}function iht(u,e,t){return ht.get(We).codeActionProvider.register(u,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(i,r,a,o)=>{const l=ht.get(G1).read({resource:i.uri}).filter(c=>j.areIntersectingOrTouching(c,r));return e.provideCodeActions(i,r,{markers:l,only:a.only,trigger:a.trigger},o)},resolveCodeAction:e.resolveCodeAction})}function rht(u,e){return ht.get(We).documentFormattingEditProvider.register(u,e)}function aht(u,e){return ht.get(We).documentRangeFormattingEditProvider.register(u,e)}function oht(u,e){return ht.get(We).onTypeFormattingEditProvider.register(u,e)}function sht(u,e){return ht.get(We).linkProvider.register(u,e)}function lht(u,e){return ht.get(We).completionProvider.register(u,e)}function cht(u,e){return ht.get(We).colorProvider.register(u,e)}function dht(u,e){return ht.get(We).foldingRangeProvider.register(u,e)}function hht(u,e){return ht.get(We).declarationProvider.register(u,e)}function Eht(u,e){return ht.get(We).selectionRangeProvider.register(u,e)}function mht(u,e){return ht.get(We).documentSemanticTokensProvider.register(u,e)}function ght(u,e){return ht.get(We).documentRangeSemanticTokensProvider.register(u,e)}function fht(u,e){return ht.get(We).inlineCompletionsProvider.register(u,e)}function pht(u,e){return ht.get(We).inlayHintsProvider.register(u,e)}function Dht(){return{register:N1t,getLanguages:P1t,onLanguage:I1t,onLanguageEncountered:O1t,getEncodedLanguageId:R1t,setLanguageConfiguration:j1t,setColorMap:K1t,registerTokensProviderFactory:$ee,setTokensProvider:W1t,setMonarchTokensProvider:G1t,registerReferenceProvider:U1t,registerRenameProvider:q1t,registerCompletionItemProvider:lht,registerSignatureHelpProvider:J1t,registerHoverProvider:Z1t,registerDocumentSymbolProvider:Y1t,registerDocumentHighlightProvider:Q1t,registerLinkedEditingRangeProvider:X1t,registerDefinitionProvider:eht,registerImplementationProvider:tht,registerTypeDefinitionProvider:uht,registerCodeLensProvider:nht,registerCodeActionProvider:iht,registerDocumentFormattingEditProvider:rht,registerDocumentRangeFormattingEditProvider:aht,registerOnTypeFormattingEditProvider:oht,registerLinkProvider:sht,registerColorProvider:cht,registerFoldingRangeProvider:dht,registerDeclarationProvider:hht,registerSelectionRangeProvider:Eht,registerDocumentSemanticTokensProvider:mht,registerDocumentRangeSemanticTokensProvider:ght,registerInlineCompletionsProvider:fht,registerInlayHintsProvider:pht,DocumentHighlightKind:_K,CompletionItemKind:CK,CompletionItemTag:bK,CompletionItemInsertTextRule:vK,SymbolKind:YK,SymbolTag:QK,IndentAction:MK,CompletionTriggerKind:kK,SignatureHelpTriggerKind:ZK,InlayHintKind:NK,InlineCompletionTriggerKind:PK,CodeActionTriggerType:xK,FoldingRangeKind:Ll,SelectedSuggestionInfo:Lve}}const Kee=Ut("IEditorCancelService"),J2e=new Pe("cancellableOperation",!1,v("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));au(Kee,class{constructor(){this._tokens=new WeakMap}add(u,e){let t=this._tokens.get(u);t||(t=u.invokeWithinContext(i=>{const r=J2e.bindTo(i.get(pt)),a=new to;return{key:r,tokens:a}}),this._tokens.set(u,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(u){const e=this._tokens.get(u);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class xht extends vi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(Kee).add(e,this))}dispose(){this._unregister(),super.dispose()}}ze(new class extends xr{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:J2e})}runEditorCommand(u,e){u.get(Kee).cancel(e)}});let Z2e=class wU{constructor(e,t){if(this.flags=t,this.flags&1){const n=e.getModel();this.modelVersionId=n?y3("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof wU))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new wU(e,this.flags))}};class Gm extends xht{constructor(e,t,n,i){super(e,i),this._listener=new pe,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!j.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!j.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class Wee extends vi{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function M1(u){return u&&typeof u.getEditorType=="function"?u.getEditorType()===oA.ICodeEditor:!1}function Y2e(u){return u&&typeof u.getEditorType=="function"?u.getEditorType()===oA.IDiffEditor:!1}function vht(u){return!!u&&typeof u=="object"&&typeof u.onDidChangeActiveEditor=="function"}function Q2e(u){return M1(u)?u:Y2e(u)?u.getModifiedEditor():vht(u)&&M1(u.activeCodeEditor)?u.activeCodeEditor:null}class Dv{static _handleEolEdits(e,t){let n;const i=[];for(const r of t)typeof r.eol=="number"&&(n=r.eol),r.range&&typeof r.text=="string"&&i.push(r);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),i}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const n=e.getModel(),i=n.validateRange(t.range);return n.getFullModelRange().equalsRange(i)}static execute(e,t,n){n&&e.pushUndoStop();const i=td.capture(e),r=Dv._handleEolEdits(e,t);r.length===1&&Dv._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(a=>yn.replace(j.lift(a.range),a.text))):e.executeEdits("formatEditsCommand",r.map(a=>yn.replaceMove(j.lift(a.range),a.text))),n&&e.pushUndoStop(),i.restoreRelativeVerticalPositionOfCursor(e)}}class ale{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class Cht{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(ale.toKey(e))}has(e){return this._set.has(ale.toKey(e))}}var ud=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Gee(u){if(u=u.filter(i=>i.range),!u.length)return;let{range:e}=u[0];for(let i=1;i0&&j.areIntersectingOrTouching(d[h-1],p)?d[h-1]=j.fromPositions(d[h-1].getStartPosition(),p.getEndPosition()):h=d.push(p);const E=p=>ud(this,void 0,void 0,function*(){var D,x;s.trace("[format][provideDocumentRangeFormattingEdits] (request)",(D=e.extensionId)===null||D===void 0?void 0:D.value,p);const b=(yield e.provideDocumentRangeFormattingEdits(l,p,l.getFormattingOptions(),c.token))||[];return s.trace("[format][provideDocumentRangeFormattingEdits] (response)",(x=e.extensionId)===null||x===void 0?void 0:x.value,b),b}),m=(p,D)=>{if(!p.length||!D.length)return!1;const x=p.reduce((b,k)=>j.plusRange(b,k.range),p[0].range);if(!D.some(b=>j.intersectRanges(x,b.range)))return!1;for(const b of p)for(const k of D)if(j.intersectRanges(b.range,k.range))return!0;return!1},g=[],f=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){s.trace("[format][provideDocumentRangeFormattingEdits] (request)",(r=e.extensionId)===null||r===void 0?void 0:r.value,d);const p=(yield e.provideDocumentRangesFormattingEdits(l,d,l.getFormattingOptions(),c.token))||[];s.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,p),f.push(p)}else{for(const p of d){if(c.token.isCancellationRequested)return!0;f.push(yield E(p))}for(let p=0;p({text:x.text,range:j.lift(x.range),forceMoveMarkers:!0})),x=>{for(const{range:b}of x)if(j.areIntersectingOrTouching(b,D))return[new Ye(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn)];return null})}return!0})}function kht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=u.get(mt),a=u.get(We),o=M1(e)?e.getModel():e,s=X2e(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,o),l=yield j3.select(s,o,t);l&&(n.report(l),yield r.invokeFunction(Fht,l,e,t,i))})}function Fht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=u.get(ql);let a,o;M1(t)?(a=t.getModel(),o=new Gm(t,5,void 0,i)):(a=t,o=new Wee(t,i));let s;try{const l=yield e.provideDocumentFormattingEdits(a,a.getFormattingOptions(),o.token);if(s=yield r.computeMoreMinimalEdits(a.uri,l),o.token.isCancellationRequested)return!0}finally{o.dispose()}if(!s||s.length===0)return!1;if(M1(t))Dv.execute(t,s,n!==2),n!==2&&(Gee(s),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:l}]=s,c=new Ye(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn);a.pushEditOperations([c],s.map(d=>({text:d.text,range:j.lift(d.range),forceMoveMarkers:!0})),d=>{for(const{range:h}of d)if(j.areIntersectingOrTouching(h,c))return[new Ye(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn)];return null})}return!0})}function yht(u,e,t,n,i,r){return ud(this,void 0,void 0,function*(){const a=e.documentRangeFormattingEditProvider.ordered(t);for(const o of a){const s=yield Promise.resolve(o.provideDocumentRangeFormattingEdits(t,n,i,r)).catch(Mi);if(pa(s))return yield u.computeMoreMinimalEdits(t.uri,s)}})}function Aht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=X2e(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const a of r){const o=yield Promise.resolve(a.provideDocumentFormattingEdits(t,n,i)).catch(Mi);if(pa(o))return yield u.computeMoreMinimalEdits(t.uri,o)}})}function tke(u,e,t,n,i,r,a){const o=e.onTypeFormattingEditProvider.ordered(t);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(t,n,i,r,a)).catch(Mi).then(s=>u.computeMoreMinimalEdits(t.uri,s))}ru.registerCommand("_executeFormatRangeProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n,i]=e;Ru(dt.isUri(t)),Ru(j.isIRange(n));const r=u.get(Vo),a=u.get(ql),o=u.get(We),s=yield r.createModelReference(t);try{return yht(a,o,s.object.textEditorModel,j.lift(n),i,Kt.None)}finally{s.dispose()}})});ru.registerCommand("_executeFormatDocumentProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n]=e;Ru(dt.isUri(t));const i=u.get(Vo),r=u.get(ql),a=u.get(We),o=yield i.createModelReference(t);try{return Aht(r,a,o.object.textEditorModel,n,Kt.None)}finally{o.dispose()}})});ru.registerCommand("_executeFormatOnTypeProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n,i,r]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string");const a=u.get(Vo),o=u.get(ql),s=u.get(We),l=yield a.createModelReference(t);try{return tke(o,s,l.object.textEditorModel,ee.lift(n),i,r,Kt.None)}finally{l.dispose()}})});cd.wrappingIndent.defaultValue=0;cd.glyphMargin.defaultValue=!1;cd.autoIndent.defaultValue=3;cd.overviewRulerLanes.defaultValue=2;j3.setFormatterSelector((u,e,t)=>Promise.resolve(u[0]));const Eo=zve();Eo.editor=S1t();Eo.languages=Dht();const uke=Eo.CancellationTokenSource,nke=Eo.Emitter,ike=Eo.KeyCode,rke=Eo.KeyMod,ake=Eo.Position,oke=Eo.Range,ske=Eo.Selection,lke=Eo.SelectionDirection,cke=Eo.MarkerSeverity,dke=Eo.MarkerTag,hke=Eo.Uri,Eke=Eo.Token,mke=Eo.editor,gke=Eo.languages,xH=globalThis.MonacoEnvironment;(xH!=null&&xH.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Eo);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const BA=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:uke,Emitter:nke,KeyCode:ike,KeyMod:rke,MarkerSeverity:cke,MarkerTag:dke,Position:ake,Range:oke,Selection:ske,SelectionDirection:lke,Token:Eke,Uri:hke,editor:mke,languages:gke},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- +`),yield this._clipboardService.writeText(b)}))),n.getOption(90)||p.push(new ro("diff.inline.revertChange",v("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>DH(this,void 0,void 0,function*(){this._editor.revert(this._diff)}))),p},autoSelectFirstItem:!0})};this._register(xi(this._diffActions,"mousedown",m=>{const{top:g,height:f}=ji(this._diffActions),p=Math.floor(c/3);m.preventDefault(),E(m.posx,g+f+p)})),this._register(n.onMouseMove(m=>{(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()?(d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(m=>{m.event.rightButton&&(m.target.type===8||m.target.type===5)&&m.target.detail.viewZoneId===this._getViewZoneId()&&(m.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,m.event.browserEvent.y,c),E(m.event.posx,m.event.posy+c))}))}_updateLightBulbPosition(e,t,n){const{top:i}=ji(e),r=t-i,a=Math.floor(r/n),o=a*n;if(this._diffActions.style.top=`${o}px`,this._viewLineCounts){let s=0;for(let l=0;lu});function Rdt(u,e,t,n){ea(n,e.fontInfo);const i=t.length>0,r=new h6(1e4);let a=0,o=0;const s=[];for(let h=0;h');const s=e.getLineContent(),l=Ys.isBasicASCII(s,i),c=Ys.containsRTL(s,l,r),d=sA(new fg(a.fontInfo.isMonospace&&!a.disableMonospaceOptimizations,a.fontInfo.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,e,t,a.tabSize,0,a.fontInfo.spaceWidth,a.fontInfo.middotWidth,a.fontInfo.wsmiddotWidth,a.stopRenderingLineAfter,a.renderWhitespace,a.renderControlCharacters,a.fontLigatures!==Ts.OFF,null),o);return o.appendString(""),d.characterMapping.getHorizontalOffset(d.characterMapping.length)}var Odt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Z0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let FU=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editors=e,this._diffModel=t,this._options=n,this._diffEditorWidget=i,this._canIgnoreViewZoneUpdateEvent=r,this._clipboardService=a,this._contextMenuService=o,this._originalTopPadding=on(this,0),this._originalScrollOffset=on(this,0),this._originalScrollOffsetAnimated=R0e(this._originalScrollOffset,this._store),this._modifiedTopPadding=on(this,0),this._modifiedScrollOffset=on(this,0),this._modifiedScrollOffsetAnimated=R0e(this._modifiedScrollOffset,this._store);let s=!1;const l=on("state",0),c=this._register(new Hu(()=>{l.set(l.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(b=>{!s&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(b=>{!s&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&c.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(b=>{(b.hasChanged(144)||b.hasChanged(66))&&c.schedule()}));const d=this._diffModel.map(b=>b?zr(b.model.original.onDidChangeTokens,()=>b.model.original.tokenization.backgroundTokenizationState===2):void 0).map((b,k)=>b==null?void 0:b.read(k)),h=new Set,E=new Set,m=uu(b=>{const k=this._diffModel.read(b),A=k==null?void 0:k.diff.read(b);if(!k||!A)return null;l.read(b);const S=this._options.renderSideBySide.read(b);return Y0e(this._editors.original,this._editors.modified,A.mappings,h,E,S)}),g=uu(b=>{var k;const A=(k=this._diffModel.read(b))===null||k===void 0?void 0:k.movedTextToCompare.read(b);if(!A)return null;l.read(b);const F=A.changes.map(S=>new V2e(S));return Y0e(this._editors.original,this._editors.modified,F,h,E,!0)});function f(){const b=document.createElement("div");return b.className="diagonal-fill",b}const p=this._register(new pe),D=uu(b=>{var k,A,F,S,w,z,N,O;p.clear();const y=m.read(b)||[],_=[],L=[],T=this._modifiedTopPadding.read(b);T>0&&L.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:T,showInHiddenAreas:!0,suppressMouseDown:!0});const R=this._originalTopPadding.read(b);R>0&&_.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:R,showInHiddenAreas:!0,suppressMouseDown:!0});const I=this._options.renderSideBySide.read(b),H=I||(k=this._editors.modified._getViewModel())===null||k===void 0?void 0:k.createLineBreaksComputer();if(H){for(const _e of y)if(_e.diff)for(let Ve=_e.originalRange.startLineNumber;Ve<_e.originalRange.endLineNumberExclusive;Ve++)H==null||H.addRequest(this._editors.original.getModel().getLineContent(Ve),null,null)}const V=(A=H==null?void 0:H.finalize())!==null&&A!==void 0?A:[];let U=0;const J=this._editors.modified.getOption(66),Y=(F=this._diffModel.read(b))===null||F===void 0?void 0:F.movedTextToCompare.read(b),X=(w=(S=this._editors.original.getModel())===null||S===void 0?void 0:S.mightContainNonBasicASCII())!==null&&w!==void 0?w:!1,re=(N=(z=this._editors.original.getModel())===null||z===void 0?void 0:z.mightContainRTL())!==null&&N!==void 0?N:!1,ge=Hee.fromEditor(this._editors.modified);for(const _e of y)if(_e.diff&&!I){if(!_e.originalRange.isEmpty){d.read(b);const Ue=document.createElement("div");Ue.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const qe=new Idt(_e.originalRange.mapToLineArray(je=>this._editors.original.getModel().tokenization.getLineTokens(je)),_e.originalRange.mapToLineArray(je=>V[U++]),X,re),Se=[];for(const je of _e.diff.innerChanges||[])Se.push(new Yb(je.originalRange.delta(-(_e.diff.original.startLineNumber-1)),xU.className,0));const de=Rdt(qe,ge,Se,Ue),he=document.createElement("div");if(he.className="inline-deleted-margin-view-zone",ea(he,ge.fontInfo),this._options.renderIndicators.read(b))for(let je=0;jeNf(Be),he,this._editors.modified,_e.diff,this._diffEditorWidget,de.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let je=0;je1&&_.push({afterLineNumber:_e.originalRange.startLineNumber+je,domNode:f(),heightInPx:(bt-1)*J,showInHiddenAreas:!0,suppressMouseDown:!0})}L.push({afterLineNumber:_e.modifiedRange.startLineNumber-1,domNode:Ue,heightInPx:de.heightInLines*J,minWidthInPx:de.minWidthInPx,marginDomNode:he,setZoneId(je){Be=je},showInHiddenAreas:!0,suppressMouseDown:!0})}const Ve=document.createElement("div");Ve.className="gutter-delete",_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:_e.modifiedHeightInPx,marginDomNode:Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Ve=_e.modifiedHeightInPx-_e.originalHeightInPx;if(Ve>0){if(Y!=null&&Y.lineRangeMapping.original.delta(-1).deltaLength(2).contains(_e.originalRange.endLineNumberExclusive-1))continue;_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Ue=function(){const Se=document.createElement("div");return Se.className="arrow-revert-change "+st.asClassName(we.arrowRight),ve("div",{},Se)};if(Y!=null&&Y.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(_e.modifiedRange.endLineNumberExclusive-1))continue;let qe;_e.diff&&_e.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(b)&&(qe=Ue()),L.push({afterLineNumber:_e.modifiedRange.endLineNumberExclusive-1,domNode:f(),heightInPx:-Ve,marginDomNode:qe,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const _e of(O=g.read(b))!==null&&O!==void 0?O:[]){if(!(Y!=null&&Y.lineRangeMapping.original.intersect(_e.originalRange))||!(Y!=null&&Y.lineRangeMapping.modified.intersect(_e.modifiedRange)))continue;const Ve=_e.modifiedHeightInPx-_e.originalHeightInPx;Ve>0?_.push({afterLineNumber:_e.originalRange.endLineNumberExclusive-1,domNode:f(),heightInPx:Ve,showInHiddenAreas:!0,suppressMouseDown:!0}):L.push({afterLineNumber:_e.modifiedRange.endLineNumberExclusive-1,domNode:f(),heightInPx:-Ve,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:_,mod:L}});this._register(es(b=>{const k=td.capture(this._editors.modified),A=D.read(b);s=!0,this._editors.original.changeViewZones(F=>{for(const S of h)F.removeZone(S);h.clear();for(const S of A.orig){const w=F.addZone(S);S.setZoneId&&S.setZoneId(w),h.add(w)}}),this._editors.modified.changeViewZones(F=>{for(const S of E)F.removeZone(S);E.clear();for(const S of A.mod){const w=F.addZone(S);S.setZoneId&&S.setZoneId(w),E.add(w)}}),s=!1,k.restore(this._editors.modified)})),this._register(ft(()=>{this._editors.original.changeViewZones(b=>{for(const k of h)b.removeZone(k);h.clear()}),this._editors.modified.changeViewZones(b=>{for(const k of E)b.removeZone(k);E.clear()})}));let x=!1;this._register(this._editors.original.onDidScrollChange(b=>{b.scrollLeftChanged&&!x&&(x=!0,this._editors.modified.setScrollLeft(b.scrollLeft),x=!1)})),this._register(this._editors.modified.onDidScrollChange(b=>{b.scrollLeftChanged&&!x&&(x=!0,this._editors.original.setScrollLeft(b.scrollLeft),x=!1)})),this._originalScrollTop=zr(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Xu(b=>{const k=this._originalScrollTop.read(b)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(b))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(b));k!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(k,1)})),this._register(Xu(b=>{const k=this._modifiedScrollTop.read(b)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(b))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(b));k!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(k,1)})),this._register(Xu(b=>{var k;const A=(k=this._diffModel.read(b))===null||k===void 0?void 0:k.movedTextToCompare.read(b);let F=0;if(A){const S=this._editors.original.getTopForLineNumber(A.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();F=this._editors.modified.getTopForLineNumber(A.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-S}F>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(F,void 0)):F<0?(this._modifiedTopPadding.set(-F,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-F,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+F,void 0,!0)}))}};FU=Odt([Z0e(5,_4),Z0e(6,Wl)],FU);function Y0e(u,e,t,n,i,r){const a=new s4(Q0e(u,n)),o=new s4(Q0e(e,i)),s=u.getOption(66),l=e.getOption(66),c=[];let d=0,h=0;function E(m,g){for(;;){let f=a.peek(),p=o.peek();if(f&&f.lineNumber>=m&&(f=void 0),p&&p.lineNumber>=g&&(p=void 0),!f&&!p)break;const D=f?f.lineNumber-d:Number.MAX_VALUE,x=p?p.lineNumber-h:Number.MAX_VALUE;Dx?(o.dequeue(),f={lineNumber:p.lineNumber-h+d,heightInPx:0}):(a.dequeue(),o.dequeue()),c.push({originalRange:Xt.ofLength(f.lineNumber,1),modifiedRange:Xt.ofLength(p.lineNumber,1),originalHeightInPx:s+f.heightInPx,modifiedHeightInPx:l+p.heightInPx,diff:void 0})}}for(const m of t){let x=function(b,k){var A,F,S,w;if(b_.lineNumber_+L.heightInPx,0))!==null&&F!==void 0?F:0,y=(w=(S=o.takeWhile(_=>_.lineNumber_+L.heightInPx,0))!==null&&w!==void 0?w:0;c.push({originalRange:z,modifiedRange:N,originalHeightInPx:z.length*s+O,modifiedHeightInPx:N.length*l+y,diff:m.lineRangeMapping}),D=b,p=k};const g=m.lineRangeMapping;E(g.original.startLineNumber,g.modified.startLineNumber);let f=!0,p=g.modified.startLineNumber,D=g.original.startLineNumber;if(r)for(const b of g.innerChanges||[])b.originalRange.startColumn>1&&b.modifiedRange.startColumn>1&&x(b.originalRange.startLineNumber,b.modifiedRange.startLineNumber),b.originalRange.endColumn1&&n.push({lineNumber:s,heightInPx:a*(l-1)})}for(const s of u.getWhitespaces()){if(e.has(s.id))continue;const l=s.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new ee(s.afterLineNumber,1)).lineNumber;t.push({lineNumber:l,heightInPx:s.height})}return udt(t,n,s=>s.lineNumber,(s,l)=>({lineNumber:s.lineNumber,heightInPx:s.heightInPx+l.heightInPx}))}var jdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hdt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},sc;let Xh=sc=class extends ne{constructor(e,t,n,i,r,a,o,s){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=i,this._rootHeight=r,this._modifiedEditorLayoutInfo=a,this._options=o,this._themeService=s;const l=zr(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=uu(E=>{const m=l.read(E),g=m.getColor(QXe)||(m.getColor(ZXe)||MW).transparent(2),f=m.getColor(XXe)||(m.getColor(YXe)||TW).transparent(2);return{insertColor:g,removeColor:f}}),d=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),h=zr(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollHeight());this._register(es((E,m)=>{if(!this._options.renderOverviewRuler.read(E))return;const g=ku(document.createElement("div"));g.setClassName("diffViewport"),g.setPosition("absolute");const f=yr("div.diffOverview",{style:{position:"absolute",top:"0px",width:sc.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;m.add(L9(f,g.domNode)),m.add(xi(f,Me.POINTER_DOWN,p=>{this._editors.modified.delegateVerticalScrollbarPointerDown(p)})),m.add(ce(f,Me.MOUSE_WHEEL,p=>{this._editors.modified.delegateScrollFromMouseWheelEvent(p)},{passive:!1})),m.add(L9(this._rootElement,f)),m.add(es((p,D)=>{const x=this._diffModel.read(p),b=this._editors.original.createOverviewRuler("original diffOverviewRuler");b&&(D.add(b),D.add(L9(f,b.getDomNode())));const k=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(k&&(D.add(k),D.add(L9(f,k.getDomNode()))),!b||!k)return;const A=Ps("viewZoneChanged",this._editors.original.onDidChangeViewZones),F=Ps("viewZoneChanged",this._editors.modified.onDidChangeViewZones),S=Ps("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),w=Ps("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);D.add(Xu(z=>{var N;A.read(z),F.read(z),S.read(z),w.read(z);const O=c.read(z),y=(N=x==null?void 0:x.diff.read(z))===null||N===void 0?void 0:N.mappings;function _(R,I,H){const V=H._getViewModel();return V?R.filter(U=>U.length>0).map(U=>{const J=V.coordinatesConverter.convertModelPositionToViewPosition(new ee(U.startLineNumber,1)),Y=V.coordinatesConverter.convertModelPositionToViewPosition(new ee(U.endLineNumberExclusive,1)),X=Y.lineNumber-J.lineNumber;return new MCe(J.lineNumber,Y.lineNumber,X,I.toString())}):[]}const L=_((y||[]).map(R=>R.lineRangeMapping.original),O.removeColor,this._editors.original),T=_((y||[]).map(R=>R.lineRangeMapping.modified),O.insertColor,this._editors.modified);b==null||b.setZones(L),k==null||k.setZones(T)})),D.add(Xu(z=>{const N=this._rootHeight.read(z),O=this._rootWidth.read(z),y=this._modifiedEditorLayoutInfo.read(z);if(y){const _=sc.ENTIRE_DIFF_OVERVIEW_WIDTH-2*sc.ONE_OVERVIEW_WIDTH;b.setLayout({top:0,height:N,right:_+sc.ONE_OVERVIEW_WIDTH,width:sc.ONE_OVERVIEW_WIDTH}),k.setLayout({top:0,height:N,right:0,width:sc.ONE_OVERVIEW_WIDTH});const L=d.read(z),T=h.read(z),R=this._editors.modified.getOption(102),I=new ov(R.verticalHasArrows?R.arrowSize:0,R.verticalScrollbarSize,0,y.height,T,L);g.setTop(I.getSliderPosition()),g.setHeight(I.getSliderSize())}else g.setTop(0),g.setHeight(0);f.style.height=N+"px",f.style.left=O-sc.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",g.setWidth(sc.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}))}};Xh.ONE_OVERVIEW_WIDTH=15;Xh.ENTIRE_DIFF_OVERVIEW_WIDTH=sc.ONE_OVERVIEW_WIDTH*2;Xh=sc=jdt([Hdt(7,sr)],Xh);q("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},v("diffEditor.move.border","The border color for text that got moved in the diff editor."));q("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},v("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));class JP extends ne{constructor(){super(...arguments),this._id=++JP.idCounter,this._onDidDispose=this._register(new Q),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,i=!0){this._targetEditor.revealRange(e,t,n,i)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}JP.idCounter=0;var Vdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X0e=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let yU=class extends ne{constructor(e,t,n,i,r,a,o){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._createInnerEditor=r,this._instantiationService=a,this._keybindingService=o,this._onDidContentSizeChange=this._register(new Q),this.original=this._register(this._createLeftHandSideEditor(n.editorOptions.get(),i.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(n.editorOptions.get(),i.modifiedEditor||{})),this.modifiedModel=zr(this.modified.onDidChangeModel,()=>this.modified.getModel()),this._register(GP({createEmptyChangeSummary:()=>({}),handleChange:(s,l)=>(s.didChange(n.editorOptions)&&Object.assign(l,s.change.changedOptions),!0)},(s,l)=>{n.editorOptions.read(s),this._options.renderSideBySide.read(s),this.modified.updateOptions(this._adjustOptionsForRightHandSide(s,l)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(s,l))}))}_createLeftHandSideEditor(e,t){const n=this._adjustOptionsForLeftHandSide(void 0,e),i=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t);return i.setContextValue("isInDiffLeftEditor",!0),i}_createRightHandSideEditor(e,t){const n=this._adjustOptionsForRightHandSide(void 0,e),i=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t);return i.setContextValue("isInDiffRightEditor",!0),i}_constructInnerEditor(e,t,n,i){const r=this._createInnerEditor(e,t,n,i);return this._register(r.onDidContentSizeChange(a=>{const o=this.original.getContentWidth()+this.modified.getContentWidth()+Xh.ENTIRE_DIFF_OVERVIEW_WIDTH,s=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:s,contentWidth:o,contentHeightChanged:a.contentHeightChanged,contentWidthChanged:a.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=cd.revealHorizontalRightPadding.defaultValue+Xh.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){const t=Object.assign(Object.assign({},e),{dimension:{height:0,width:0}});return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const n=v("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+n:e?e.replaceAll(n,""):""}};yU=Vdt([X0e(5,mt),X0e(6,qu)],yU);class $dt{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=uu(this,i=>this._options.read(i).renderSideBySide&&this.diffEditorWidth.read(i)<=this._options.read(i).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=uu(this,i=>this._options.read(i).renderOverviewRuler),this.renderSideBySide=uu(this,i=>this._options.read(i).renderSideBySide&&!(this._options.read(i).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(i))),this.readOnly=uu(this,i=>this._options.read(i).readOnly),this.shouldRenderRevertArrows=uu(this,i=>!(!this._options.read(i).renderMarginRevertIcon||!this.renderSideBySide.read(i)||this.readOnly.read(i))),this.renderIndicators=uu(this,i=>this._options.read(i).renderIndicators),this.enableSplitViewResizing=uu(this,i=>this._options.read(i).enableSplitViewResizing),this.splitViewDefaultRatio=uu(this,i=>this._options.read(i).splitViewDefaultRatio),this.ignoreTrimWhitespace=uu(this,i=>this._options.read(i).ignoreTrimWhitespace),this.maxComputationTimeMs=uu(this,i=>this._options.read(i).maxComputationTime),this.showMoves=uu(this,i=>this._options.read(i).experimental.showMoves&&this.renderSideBySide.read(i)),this.isInEmbeddedEditor=uu(this,i=>this._options.read(i).isInEmbeddedEditor),this.diffWordWrap=uu(this,i=>this._options.read(i).diffWordWrap),this.originalEditable=uu(this,i=>this._options.read(i).originalEditable),this.diffCodeLens=uu(this,i=>this._options.read(i).diffCodeLens),this.accessibilityVerbose=uu(this,i=>this._options.read(i).accessibilityVerbose),this.diffAlgorithm=uu(this,i=>this._options.read(i).diffAlgorithm),this.showEmptyDecorations=uu(this,i=>this._options.read(i).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=uu(this,i=>this._options.read(i).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=uu(this,i=>this._options.read(i).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=uu(this,i=>this._options.read(i).hideUnchangedRegions.minimumLineCount);const n=Object.assign(Object.assign({},e),ele(e,ya));this._options=on(this,n)}updateOptions(e){const t=ele(e,this._options.get()),n=Object.assign(Object.assign(Object.assign({},this._options.get()),e),t);this._options.set(n,void 0,{changedOptions:e})}}function ele(u,e){var t,n,i,r,a,o,s,l;return{enableSplitViewResizing:ut(u.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:KGe(u.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:ut(u.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:ut(u.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:rf(u.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:rf(u.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:ut(u.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:ut(u.renderIndicators,e.renderIndicators),originalEditable:ut(u.originalEditable,e.originalEditable),diffCodeLens:ut(u.diffCodeLens,e.diffCodeLens),renderOverviewRuler:ut(u.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Di(u.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Di(u.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:ut(u.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:ut((t=u.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:ut((n=u.experimental)===null||n===void 0?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:ut((r=(i=u.hideUnchangedRegions)===null||i===void 0?void 0:i.enabled)!==null&&r!==void 0?r:(a=u.experimental)===null||a===void 0?void 0:a.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:rf((o=u.hideUnchangedRegions)===null||o===void 0?void 0:o.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:rf((s=u.hideUnchangedRegions)===null||s===void 0?void 0:s.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:rf((l=u.hideUnchangedRegions)===null||l===void 0?void 0:l.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:ut(u.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:ut(u.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:rf(u.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:ut(u.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var Kdt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let O3=class extends JP{constructor(e,t,n,i,r,a,o,s){var l;super(),this._domElement=e,this._parentContextKeyService=i,this._parentInstantiationService=r,this._audioCueService=o,this._editorProgressService=s,this.elements=yr("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[yr("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[ve("span",{},"No Changes")]),yr("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),yr("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),yr("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register(_w("diffModel",void 0)),this.onDidChangeModel=Ne.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new CP([pt,this._contextKeyService])),this._boundarySashes=on(this,void 0),this._accessibleDiffViewerShouldBeVisible=on(this,!1),this._accessibleDiffViewerVisible=uu(this,g=>this._options.onlyShowAccessibleDiffViewer.read(g)?!0:this._accessibleDiffViewerShouldBeVisible.read(g)),this.movedBlocksLinesPart=on(this,void 0),this._layoutInfo=uu(this,g=>{var f,p,D;const x=this._rootSizeObserver.width.read(g),b=this._rootSizeObserver.height.read(g),k=(f=this._sash.read(g))===null||f===void 0?void 0:f.sashLeft.read(g),A=k??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),F=x-A-(this._options.renderOverviewRuler.read(g)?Xh.ENTIRE_DIFF_OVERVIEW_WIDTH:0),S=(D=(p=this.movedBlocksLinesPart.read(g))===null||p===void 0?void 0:p.width.read(g))!==null&&D!==void 0?D:0,w=A-S;return this.elements.original.style.width=w+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=F+"px",this.elements.modified.style.left=A+"px",this._editors.original.layout({width:w,height:b}),this._editors.modified.layout({width:F,height:b}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((g,f)=>g==null?void 0:g.diff.read(f)),this.onDidUpdateDiff=Ne.fromObservableLight(this._diffValue),a.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(ft(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new ndt(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((l=t.automaticLayout)!==null&&l!==void 0?l:!1),this._options=new $dt(t,this._rootSizeObserver.width),this._contextKeyService.createKey(W.isEmbeddedDiffEditor.key,!1);const c=W.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(Xu(g=>{c.set(this._options.isInEmbeddedEditor.read(g))}));const d=W.comparingMovedCode.bindTo(this._contextKeyService);this._register(Xu(g=>{var f;d.set(!!(!((f=this._diffModel.read(g))===null||f===void 0)&&f.movedTextToCompare.read(g)))}));const h=W.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(Xu(g=>{h.set(this._options.couldShowInlineViewBecauseOfSize.read(g))})),this._editors=this._register(this._instantiationService.createInstance(yU,this.elements.original,this.elements.modified,this._options,n,(g,f,p,D)=>this._createInnerEditor(g,f,p,D))),this._sash=uF(this,(g,f)=>{const p=this._options.renderSideBySide.read(g);if(this.elements.root.classList.toggle("side-by-side",p),!p)return;const D=f.add(new Fdt(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((x,b)=>x-(this._options.renderOverviewRuler.read(b)?Xh.ENTIRE_DIFF_OVERVIEW_WIDTH:0))}));return f.add(Xu(x=>{const b=this._boundarySashes.read(x);b&&D.setBoundarySashes(b)})),D}),this._register(iF(this._sash)),this._register(es((g,f)=>{this.unchangedRangesFeature=f.add(this._instantiationService.createInstance(cE(vU,g),this._editors,this._diffModel,this._options))})),this._register(es((g,f)=>{f.add(new(cE(kdt,g))(this._editors,this._diffModel,this._options))})),this._register(es((g,f)=>{f.add(this._instantiationService.createInstance(cE(FU,g),this._editors,this._diffModel,this._options,this,()=>this.unchangedRangesFeature.isUpdatingViewZones))})),this._register(es((g,f)=>{f.add(this._instantiationService.createInstance(cE(Xh,g),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(p=>p.modifiedEditor),this._options))})),this._register(es((g,f)=>{this._accessibleDiffViewer=f.add(this._register(this._instantiationService.createInstance(cE(PE,g),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(p,D)=>this._accessibleDiffViewerShouldBeVisible.set(p,D),this._options.onlyShowAccessibleDiffViewer.map(p=>!p),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((p,D)=>{var x;return(x=p==null?void 0:p.diff.read(D))===null||x===void 0?void 0:x.mappings.map(b=>b.lineRangeMapping)}),this._editors)))}));const E=this._accessibleDiffViewerVisible.map(g=>g?"hidden":"visible");this._register(om(this.elements.modified,{visibility:E})),this._register(om(this.elements.original,{visibility:E})),this._createDiffEditorContributions(),a.addDiffEditor(this),this._register(iF(this._layoutInfo)),this._register(es((g,f)=>{this.movedBlocksLinesPart.set(f.add(new(cE(sm,g))(this.elements.root,this._diffModel,this._layoutInfo.map(p=>p.originalEditor),this._layoutInfo.map(p=>p.modifiedEditor),this._editors)),void 0)})),this._register(om(this.elements.overlay,{width:this._layoutInfo.map((g,f)=>g.originalEditor.width+(this._options.renderSideBySide.read(f)?0:g.modifiedEditor.width)),visibility:uu(g=>{var f,p;return this._options.hideUnchangedRegions.read(g)&&((p=(f=this._diffModel.read(g))===null||f===void 0?void 0:f.diff.read(g))===null||p===void 0?void 0:p.mappings.length)===0?"visible":"hidden"})})),this._register(this._editors.modified.onMouseDown(g=>{var f,p;if(!g.event.rightButton&&g.target.position&&(!((f=g.target.element)===null||f===void 0)&&f.className.includes("arrow-revert-change"))){const D=g.target.position.lineNumber,x=g.target,b=this._diffModel.get();if(!b)return;const k=(p=b.diff.get())===null||p===void 0?void 0:p.mappings;if(!k)return;const A=k.find(F=>(x==null?void 0:x.detail.afterLineNumber)===F.lineRangeMapping.modified.startLineNumber-1||F.lineRangeMapping.modified.startLineNumber===D);if(!A)return;this.revert(A.lineRangeMapping),g.event.stopPropagation()}})),this._register(Ne.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,g=>{var f,p;if((g==null?void 0:g.reason)===3){const D=(p=(f=this._diffModel.get())===null||f===void 0?void 0:f.diff.get())===null||p===void 0?void 0:p.mappings.find(x=>x.lineRangeMapping.modified.contains(g.position.lineNumber));D!=null&&D.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(hu.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):D!=null&&D.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(hu.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):D&&this._audioCueService.playAudioCue(hu.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const m=this._diffModel.map((g,f)=>g==null?void 0:g.isDiffUpToDate.read(f));this._register(es((g,f)=>{if(m.read(g)===!1){const p=this._editorProgressService.show(!0,1e3);f.add(ft(()=>p.done()))}}))}_createInnerEditor(e,t,n,i){return e.createInstance(lv,t,n,i)}_createDiffEditorContributions(){const e=ux.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){zt(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return oA.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const t=this._editors.original.saveViewState(),n=this._editors.modified.saveViewState();return{original:t,modified:n,modelState:(e=this._diffModel.get())===null||e===void 0?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(n.modelState))}}createViewModel(e){return this._instantiationService.createInstance(kU,e,this._options,this)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?t:null}setModel(e){!e&&this._diffModel.get()&&this._accessibleDiffViewer.close();const t=e?"model"in e?e:this.createViewModel(e):void 0;this._editors.original.setModel(t?t.model.original:null),this._editors.modified.setModel(t?t.model.modified:null),Fn(n=>{this._diffModel.set(t,n)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?Udt(t):null}revert(e){var t;const n=(t=this._diffModel.get())===null||t===void 0?void 0:t.model;if(!n)return;const i=e.innerChanges?e.innerChanges.map(r=>({range:r.modifiedRange,text:n.original.getValueInRange(r.originalRange)})):[{range:e.modified.toExclusiveRange(),text:n.original.getValueInRange(e.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",i)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var e,t;const n=this._editors.modified.hasWidgetFocus(),i=n?this._editors.modified:this._editors.original,r=n?this._editors.original:this._editors.modified;let a;const o=i.getSelection();if(o){const s=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(l=>n?l.lineRangeMapping.flip():l.lineRangeMapping);if(s){const l=tle(o.getStartPosition(),s),c=tle(o.getEndPosition(),s);a=j.plusRange(l,c)}}return{destination:r,destinationSelection:a}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Fn(n=>{for(const i of t)i.collapseAll(n)})}showAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Fn(n=>{for(const i of t)i.showAll(n)})}};O3=Kdt([xC(3,pt),xC(4,mt),xC(5,Cu),xC(6,_A),xC(7,Dg)],O3);function tle(u,e){const t=BB(e,i=>i.original.startLineNumber<=u.lineNumber);if(!t)return j.fromPositions(u);if(t.original.endLineNumberExclusive<=u.lineNumber){const i=u.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return j.fromPositions(new ee(i,u.column))}if(!t.innerChanges)return j.fromPositions(new ee(t.modified.startLineNumber,1));const n=BB(t.innerChanges,i=>i.originalRange.getStartPosition().isBeforeOrEqual(u));if(!n){const i=u.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return j.fromPositions(new ee(i,u.column))}if(n.originalRange.containsPosition(u))return n.modifiedRange;{const i=Wdt(n.originalRange.getEndPosition(),u);return j.fromPositions(Gdt(n.modifiedRange.getEndPosition(),i))}}function Wdt(u,e){return u.lineNumber===e.lineNumber?new Mk(0,e.column-u.column):new Mk(e.lineNumber-u.lineNumber,e.column-1)}function Gdt(u,e){return e.lineCount===0?new ee(u.lineNumber,u.column+e.columnCount):new ee(u.lineNumber+e.lineCount,e.columnCount+1)}function Udt(u){return u.mappings.map(e=>{const t=e.lineRangeMapping;let n,i,r,a,o=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,i=0,o=void 0):(n=t.original.startLineNumber,i=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,a=0,o=void 0):(r=t.modified.startLineNumber,a=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:i,modifiedStartLineNumber:r,modifiedEndLineNumber:a,charChanges:o==null?void 0:o.map(s=>({originalStartLineNumber:s.originalRange.startLineNumber,originalStartColumn:s.originalRange.startColumn,originalEndLineNumber:s.originalRange.endLineNumber,originalEndColumn:s.originalRange.endColumn,modifiedStartLineNumber:s.modifiedRange.startLineNumber,modifiedStartColumn:s.modifiedRange.startColumn,modifiedEndLineNumber:s.modifiedRange.endLineNumber,modifiedEndColumn:s.modifiedRange.endColumn}))}})}var Vee=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Dn=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let qdt=0,ule=!1;function Jdt(u){if(!u){if(ule)return;ule=!0}qQe(u||document.body)}let Tw=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h){const E=Object.assign({},t);E.ariaLabel=E.ariaLabel||rw.editorViewAccessibleLabel,E.ariaLabel=E.ariaLabel+";"+rw.accessibilityHelpMessage,super(e,E,{},n,i,r,a,s,l,c,d,h),o instanceof pv?this._standaloneKeybindingService=o:this._standaloneKeybindingService=null,Jdt(E.ariaContainerElement)}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const i="DYNAMIC_"+ ++qdt,r=Ee.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,r),i}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ne.None;const t=e.id,n=e.label,i=Ee.and(Ee.equals("editorId",this.getId()),Ee.deserialize(e.precondition)),r=e.keybindings,a=Ee.and(i,Ee.deserialize(e.keybindingContext)),o=e.contextMenuGroupId||null,s=e.contextMenuOrder||0,l=(E,...m)=>Promise.resolve(e.run(this,...m)),c=new pe,d=this.getId()+":"+t;if(c.add(ru.registerCommand(d,l)),o){const E={command:{id:d,title:n},when:i,group:o,order:s};c.add(Lr.appendMenuItem(K.EditorContext,E))}if(Array.isArray(r))for(const E of r)c.add(this._standaloneKeybindingService.addDynamicKeybinding(d,E,l,a));const h=new TCe(d,n,n,i,(...E)=>Promise.resolve(e.run(this,...E)),this._contextKeyService);return this._actions.set(t,h),c.add(ft(()=>{this._actions.delete(t)})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof YB)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Tw=Vee([Dn(2,mt),Dn(3,Cu),Dn(4,ni),Dn(5,pt),Dn(6,qu),Dn(7,sr),Dn(8,bi),Dn(9,k4),Dn(10,tn),Dn(11,We)],Tw);let AU=class extends Tw{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E,m,g){const f=Object.assign({},t);Aw(c,f,!1);const p=s.registerEditorContainer(e);typeof f.theme=="string"&&s.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&s.setAutoDetectHighContrast(!!f.autoDetectHighContrast);const D=f.model;delete f.model,super(e,f,n,i,r,a,o,s,l,d,m,g),this._configurationService=c,this._standaloneThemeService=s,this._register(p);let x;if(typeof D>"u"){const b=E.getLanguageIdByMimeType(f.language)||f.language||Ws;x=$2e(h,E,f.value||"",b,void 0),this._ownsModel=!0}else x=D,this._ownsModel=!1;if(this._attachModel(x),x){const b={oldModelUrl:null,newModelUrl:x.uri};this._onDidChangeModel.fire(b)}}dispose(){super.dispose()}updateOptions(e){Aw(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};AU=Vee([Dn(2,mt),Dn(3,Cu),Dn(4,ni),Dn(5,pt),Dn(6,qu),Dn(7,a0),Dn(8,bi),Dn(9,tu),Dn(10,k4),Dn(11,_n),Dn(12,vn),Dn(13,tn),Dn(14,We)],AU);let _U=class extends O3{constructor(e,t,n,i,r,a,o,s,l,c,d,h){const E=Object.assign({},t);Aw(s,E,!0);const m=a.registerEditorContainer(e);typeof E.theme=="string"&&a.setTheme(E.theme),typeof E.autoDetectHighContrast<"u"&&a.setAutoDetectHighContrast(!!E.autoDetectHighContrast),super(e,E,{},i,n,r,h,c),this._configurationService=s,this._standaloneThemeService=a,this._register(m)}dispose(){super.dispose()}updateOptions(e){Aw(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,n){return e.createInstance(Tw,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};_U=Vee([Dn(2,mt),Dn(3,pt),Dn(4,Cu),Dn(5,a0),Dn(6,bi),Dn(7,tu),Dn(8,Wl),Dn(9,Dg),Dn(10,_4),Dn(11,_A)],_U);function $2e(u,e,t,n,i){if(t=t||"",!n){const r=t.indexOf(` +`);let a=t;return r!==-1&&(a=t.substring(0,r)),nle(u,t,e.createByFilepathOrFirstLine(i||null,a),i)}return nle(u,t,e.createById(n),i)}function nle(u,e,t,n){return u.createModel(e,t,n)}var K2e=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Zdt(u,e,t){return ht.initialize(t||{}).createInstance(AU,u,e)}function Ydt(u){return ht.get(Cu).onCodeEditorAdd(t=>{u(t)})}function Qdt(u){return ht.get(Cu).onDiffEditorAdd(t=>{u(t)})}function Xdt(){return ht.get(Cu).listCodeEditors()}function e1t(){return ht.get(Cu).listDiffEditors()}function t1t(u,e,t){return ht.initialize(t||{}).createInstance(_U,u,e)}function u1t(u){if(typeof u.id!="string"||typeof u.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return ru.registerCommand(u.id,u.run)}function n1t(u){if(typeof u.id!="string"||typeof u.label!="string"||typeof u.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=Ee.deserialize(u.precondition),t=(i,...r)=>xr.runEditorCommand(i,r,e,(a,o,s)=>Promise.resolve(u.run(o,...s))),n=new pe;if(n.add(ru.registerCommand(u.id,t)),u.contextMenuGroupId){const i={command:{id:u.id,title:u.label},when:e,group:u.contextMenuGroupId,order:u.contextMenuOrder||0};n.add(Lr.appendMenuItem(K.EditorContext,i))}if(Array.isArray(u.keybindings)){const i=ht.get(qu);if(!(i instanceof pv))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const r=Ee.and(e,Ee.deserialize(u.keybindingContext));n.add(i.addDynamicKeybindings(u.keybindings.map(a=>({keybinding:a,command:u.id,when:r}))))}}return n}function i1t(u){return W2e([u])}function W2e(u){const e=ht.get(qu);return e instanceof pv?e.addDynamicKeybindings(u.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:Ee.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),ne.None)}function r1t(u,e,t){const n=ht.get(vn),i=n.getLanguageIdByMimeType(e)||e;return $2e(ht.get(_n),n,u,i,t)}function a1t(u,e){const t=ht.get(vn),n=t.getLanguageIdByMimeType(e)||e||Ws;u.setLanguage(t.createById(n))}function o1t(u,e,t){u&&ht.get(G1).changeOne(e,u.uri,t)}function s1t(u){ht.get(G1).changeAll(u,[])}function l1t(u){return ht.get(G1).read(u)}function c1t(u){return ht.get(G1).onMarkerChanged(u)}function d1t(u){return ht.get(_n).getModel(u)}function h1t(){return ht.get(_n).getModels()}function E1t(u){return ht.get(_n).onModelAdded(u)}function m1t(u){return ht.get(_n).onModelRemoved(u)}function g1t(u){return ht.get(_n).onModelLanguageChanged(t=>{u({model:t.model,oldLanguage:t.oldLanguageId})})}function f1t(u){return vQe(ht.get(_n),ht.get(tn),u)}function p1t(u,e){const t=ht.get(vn),n=ht.get(a0);return EX.colorizeElement(n,t,u,e).then(()=>{n.registerEditorContainer(u)})}function D1t(u,e,t){const n=ht.get(vn);return ht.get(a0).registerEditorContainer(document.body),EX.colorize(n,u,e,t)}function x1t(u,e,t=4){return ht.get(a0).registerEditorContainer(document.body),EX.colorizeModelLine(u,e,t)}function v1t(u){const e=qn.get(u);return e||{getInitialState:()=>ev,tokenize:(t,n,i)=>cX(u,i)}}function C1t(u,e){qn.getOrCreate(e);const t=v1t(e),n=F1(u),i=[];let r=t.getInitialState();for(let a=0,o=n.length;aK2e(this,void 0,void 0,function*(){var r;if(!n)return null;const a=(r=t.options)===null||r===void 0?void 0:r.selection;let o;return a&&typeof a.endLineNumber=="number"&&typeof a.endColumn=="number"?o=a:a&&(o={lineNumber:a.startLineNumber,column:a.startColumn}),(yield u.openCodeEditor(n,t.resource,o))?n:null}))}function S1t(){return{create:Zdt,getEditors:Xdt,getDiffEditors:e1t,onDidCreateEditor:Ydt,onDidCreateDiffEditor:Qdt,createDiffEditor:t1t,addCommand:u1t,addEditorAction:n1t,addKeybindingRule:i1t,addKeybindingRules:W2e,createModel:r1t,setModelLanguage:a1t,setModelMarkers:o1t,getModelMarkers:l1t,removeAllMarkers:s1t,onDidChangeMarkers:c1t,getModels:h1t,getModel:d1t,onDidCreateModel:E1t,onWillDisposeModel:m1t,onDidChangeModelLanguage:g1t,createWebWorker:f1t,colorizeElement:p1t,colorize:D1t,colorizeModelLine:x1t,tokenize:C1t,defineTheme:b1t,setTheme:k1t,remeasureFonts:F1t,registerCommand:y1t,registerLinkOpener:A1t,registerEditorOpener:_1t,AccessibilitySupport:DK,ContentWidgetPositionPreference:FK,CursorChangeReason:yK,DefaultEndOfLine:AK,EditorAutoIndentStrategy:SK,EditorOption:BK,EndOfLinePreference:wK,EndOfLineSequence:LK,MinimapPosition:jK,MouseTargetType:HK,OverlayWidgetPositionPreference:VK,OverviewRulerLane:$K,GlyphMarginLane:zK,RenderLineNumbersType:WK,RenderMinimap:GK,ScrollbarVisibility:qK,ScrollType:UK,TextEditorCursorBlinkingStyle:XK,TextEditorCursorStyle:eW,TrackedRangeStickiness:tW,WrappingIndent:uW,InjectedTextCursorStops:TK,PositionAffinity:KK,ConfigurationChangedEvent:gve,BareFontInfo:u3,FontInfo:rW,TextModelResolvedOptions:KS,FindMatch:mk,ApplyUpdateResult:qb,EditorZoom:f0,EditorType:oA,EditorOptions:cd}}function B1t(u,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!u(t))return!1;return!0}function z9(u,e){return typeof u=="boolean"?u:e}function ile(u,e){return typeof u=="string"?u:e}function w1t(u){const e={};for(const t of u)e[t]=!0;return e}function rle(u,e=!1){e&&(u=u.map(function(n){return n.toLowerCase()}));const t=w1t(u);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function SU(u,e){e=e.replace(/@@/g,"");let t=0,n;do n=!1,e=e.replace(/@(\w+)/g,function(r,a){n=!0;let o="";if(typeof u[a]=="string")o=u[a];else if(u[a]&&u[a]instanceof RegExp)o=u[a].source;else throw u[a]===void 0?hn(u,"language definition does not contain attribute '"+a+"', used at: "+e):hn(u,"attribute reference '"+a+"' must be a string, used at: "+e);return GD(o)?"":"(?:"+o+")"}),t++;while(n&&t<5);e=e.replace(/\x01/g,"@");const i=(u.ignoreCase?"i":"")+(u.unicode?"u":"");return new RegExp(e,i)}function L1t(u,e,t,n){if(n<0)return u;if(n=100){n=n-100;const i=t.split(".");if(i.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw hn(u,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw hn(u,"the next state must be a string value in rule: "+e);{let i=t.next;if(!/^(@pop|@push|@popall)$/.test(i)&&(i[0]==="@"&&(i=i.substr(1)),i.indexOf("$")<0&&!jQe(u,xE(u,i,"",[],""))))throw hn(u,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=i}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,u.usesEmbedded=!0),n}}else if(Array.isArray(t)){const n=[];for(let i=0,r=t.length;i0&&n[0]==="^",this.name=this.name+": "+n,this.regex=SU(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}setAction(e,t){this.action=BU(e,this.name,t)}}function G2e(u,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=u,t.includeLF=z9(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=z9(e.ignoreCase,!1),t.unicode=z9(e.unicode,!1),t.tokenPostfix=ile(e.tokenPostfix,"."+t.languageId),t.defaultToken=ile(e.defaultToken,"source"),t.usesEmbedded=!1;const n=e;n.languageId=u,n.includeLF=t.includeLF,n.ignoreCase=t.ignoreCase,n.unicode=t.unicode,n.noThrow=t.noThrow,n.usesEmbedded=t.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=t.defaultToken;function i(a,o,s){for(const l of s){let c=l.include;if(c){if(typeof c!="string")throw hn(t,"an 'include' attribute must be a string at: "+a);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw hn(t,"include target '"+c+"' is not defined at: "+a);i(a+"."+c,o,e.tokenizer[c])}else{const d=new M1t(a);if(Array.isArray(l)&&l.length>=1&&l.length<=3)if(d.setRegex(n,l[0]),l.length>=3)if(typeof l[1]=="string")d.setAction(n,{token:l[1],next:l[2]});else if(typeof l[1]=="object"){const h=l[1];h.next=l[2],d.setAction(n,h)}else throw hn(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+a);else d.setAction(n,l[1]);else{if(!l.regex)throw hn(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+a);l.name&&typeof l.name=="string"&&(d.name=l.name),l.matchOnlyAtStart&&(d.matchOnlyAtLineStart=z9(l.matchOnlyAtLineStart,!1)),d.setRegex(n,l.regex),d.setAction(n,l.action)}o.push(d)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw hn(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const a in e.tokenizer)if(e.tokenizer.hasOwnProperty(a)){t.start||(t.start=a);const o=e.tokenizer[a];t.tokenizer[a]=new Array,i("tokenizer."+a,t.tokenizer[a],o)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw hn(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const r=[];for(const a of e.brackets){let o=a;if(o&&Array.isArray(o)&&o.length===3&&(o={token:o[2],open:o[0],close:o[1]}),o.open===o.close)throw hn(t,"open and close brackets in a 'brackets' attribute must be different: "+o.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof o.open=="string"&&typeof o.token=="string"&&typeof o.close=="string")r.push({token:o.token+t.tokenPostfix,open:tm(t,o.open),close:tm(t,o.close)});else throw hn(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}var T1t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function N1t(u){Qx.registerLanguage(u)}function P1t(){let u=[];return u=u.concat(Qx.getLanguages()),u}function R1t(u){return ht.get(vn).languageIdCodec.encodeLanguageId(u)}function I1t(u,e){return ht.withServices(()=>{const n=ht.get(vn).onDidRequestRichLanguageFeatures(i=>{i===u&&(n.dispose(),e())});return n})}function O1t(u,e){return ht.withServices(()=>{const n=ht.get(vn).onDidRequestBasicLanguageFeatures(i=>{i===u&&(n.dispose(),e())});return n})}function j1t(u,e){if(!ht.get(vn).isRegisteredLanguageId(u))throw new Error(`Cannot set configuration for unknown language ${u}`);return ht.get(tn).register(u,e,100)}class H1t{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return rF.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){const i=this._actual.tokenizeEncoded(e,n);return new RN(i.tokens,i.endState)}}class rF{constructor(e,t,n,i){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=i}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const n=[];let i=0;for(let r=0,a=e.length;r0&&r[a-1]===h)continue;let E=d.startIndex;l===0?E=0:ET1t(this,void 0,void 0,function*(){const n=yield Promise.resolve(e.create());return n?V1t(n)?q2e(u,n):new Ck(ht.get(vn),ht.get(a0),u,G2e(u,n),ht.get(tu)):null}));return qn.registerFactory(u,t)}function W1t(u,e){if(!ht.get(vn).isRegisteredLanguageId(u))throw new Error(`Cannot set tokens provider for unknown language ${u}`);return U2e(e)?$ee(u,{create:()=>e}):qn.register(u,q2e(u,e))}function G1t(u,e){const t=n=>new Ck(ht.get(vn),ht.get(a0),u,G2e(u,n),ht.get(tu));return U2e(e)?$ee(u,{create:()=>e}):qn.register(u,t(e))}function U1t(u,e){return ht.get(We).referenceProvider.register(u,e)}function q1t(u,e){return ht.get(We).renameProvider.register(u,e)}function J1t(u,e){return ht.get(We).signatureHelpProvider.register(u,e)}function Z1t(u,e){return ht.get(We).hoverProvider.register(u,{provideHover:(n,i,r)=>{const a=n.getWordAtPosition(i);return Promise.resolve(e.provideHover(n,i,r)).then(o=>{if(o)return!o.range&&a&&(o.range=new j(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn)),o.range||(o.range=new j(i.lineNumber,i.column,i.lineNumber,i.column)),o})}})}function Y1t(u,e){return ht.get(We).documentSymbolProvider.register(u,e)}function Q1t(u,e){return ht.get(We).documentHighlightProvider.register(u,e)}function X1t(u,e){return ht.get(We).linkedEditingRangeProvider.register(u,e)}function eht(u,e){return ht.get(We).definitionProvider.register(u,e)}function tht(u,e){return ht.get(We).implementationProvider.register(u,e)}function uht(u,e){return ht.get(We).typeDefinitionProvider.register(u,e)}function nht(u,e){return ht.get(We).codeLensProvider.register(u,e)}function iht(u,e,t){return ht.get(We).codeActionProvider.register(u,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(i,r,a,o)=>{const l=ht.get(G1).read({resource:i.uri}).filter(c=>j.areIntersectingOrTouching(c,r));return e.provideCodeActions(i,r,{markers:l,only:a.only,trigger:a.trigger},o)},resolveCodeAction:e.resolveCodeAction})}function rht(u,e){return ht.get(We).documentFormattingEditProvider.register(u,e)}function aht(u,e){return ht.get(We).documentRangeFormattingEditProvider.register(u,e)}function oht(u,e){return ht.get(We).onTypeFormattingEditProvider.register(u,e)}function sht(u,e){return ht.get(We).linkProvider.register(u,e)}function lht(u,e){return ht.get(We).completionProvider.register(u,e)}function cht(u,e){return ht.get(We).colorProvider.register(u,e)}function dht(u,e){return ht.get(We).foldingRangeProvider.register(u,e)}function hht(u,e){return ht.get(We).declarationProvider.register(u,e)}function Eht(u,e){return ht.get(We).selectionRangeProvider.register(u,e)}function mht(u,e){return ht.get(We).documentSemanticTokensProvider.register(u,e)}function ght(u,e){return ht.get(We).documentRangeSemanticTokensProvider.register(u,e)}function fht(u,e){return ht.get(We).inlineCompletionsProvider.register(u,e)}function pht(u,e){return ht.get(We).inlayHintsProvider.register(u,e)}function Dht(){return{register:N1t,getLanguages:P1t,onLanguage:I1t,onLanguageEncountered:O1t,getEncodedLanguageId:R1t,setLanguageConfiguration:j1t,setColorMap:K1t,registerTokensProviderFactory:$ee,setTokensProvider:W1t,setMonarchTokensProvider:G1t,registerReferenceProvider:U1t,registerRenameProvider:q1t,registerCompletionItemProvider:lht,registerSignatureHelpProvider:J1t,registerHoverProvider:Z1t,registerDocumentSymbolProvider:Y1t,registerDocumentHighlightProvider:Q1t,registerLinkedEditingRangeProvider:X1t,registerDefinitionProvider:eht,registerImplementationProvider:tht,registerTypeDefinitionProvider:uht,registerCodeLensProvider:nht,registerCodeActionProvider:iht,registerDocumentFormattingEditProvider:rht,registerDocumentRangeFormattingEditProvider:aht,registerOnTypeFormattingEditProvider:oht,registerLinkProvider:sht,registerColorProvider:cht,registerFoldingRangeProvider:dht,registerDeclarationProvider:hht,registerSelectionRangeProvider:Eht,registerDocumentSemanticTokensProvider:mht,registerDocumentRangeSemanticTokensProvider:ght,registerInlineCompletionsProvider:fht,registerInlayHintsProvider:pht,DocumentHighlightKind:_K,CompletionItemKind:CK,CompletionItemTag:bK,CompletionItemInsertTextRule:vK,SymbolKind:YK,SymbolTag:QK,IndentAction:MK,CompletionTriggerKind:kK,SignatureHelpTriggerKind:ZK,InlayHintKind:NK,InlineCompletionTriggerKind:PK,CodeActionTriggerType:xK,FoldingRangeKind:Ll,SelectedSuggestionInfo:Lve}}const Kee=Ut("IEditorCancelService"),J2e=new Pe("cancellableOperation",!1,v("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));au(Kee,class{constructor(){this._tokens=new WeakMap}add(u,e){let t=this._tokens.get(u);t||(t=u.invokeWithinContext(i=>{const r=J2e.bindTo(i.get(pt)),a=new to;return{key:r,tokens:a}}),this._tokens.set(u,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(u){const e=this._tokens.get(u);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class xht extends vi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get(Kee).add(e,this))}dispose(){this._unregister(),super.dispose()}}ze(new class extends xr{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:J2e})}runEditorCommand(u,e){u.get(Kee).cancel(e)}});let Z2e=class wU{constructor(e,t){if(this.flags=t,this.flags&1){const n=e.getModel();this.modelVersionId=n?y3("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=e.getPosition():this.position=null,this.flags&2?this.selection=e.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof wU))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new wU(e,this.flags))}};class Gm extends xht{constructor(e,t,n,i){super(e,i),this._listener=new pe,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!j.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!j.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class Wee extends vi{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function M1(u){return u&&typeof u.getEditorType=="function"?u.getEditorType()===oA.ICodeEditor:!1}function Y2e(u){return u&&typeof u.getEditorType=="function"?u.getEditorType()===oA.IDiffEditor:!1}function vht(u){return!!u&&typeof u=="object"&&typeof u.onDidChangeActiveEditor=="function"}function Q2e(u){return M1(u)?u:Y2e(u)?u.getModifiedEditor():vht(u)&&M1(u.activeCodeEditor)?u.activeCodeEditor:null}class Dv{static _handleEolEdits(e,t){let n;const i=[];for(const r of t)typeof r.eol=="number"&&(n=r.eol),r.range&&typeof r.text=="string"&&i.push(r);return typeof n=="number"&&e.hasModel()&&e.getModel().pushEOL(n),i}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const n=e.getModel(),i=n.validateRange(t.range);return n.getFullModelRange().equalsRange(i)}static execute(e,t,n){n&&e.pushUndoStop();const i=td.capture(e),r=Dv._handleEolEdits(e,t);r.length===1&&Dv._isFullModelReplaceEdit(e,r[0])?e.executeEdits("formatEditsCommand",r.map(a=>yn.replace(j.lift(a.range),a.text))):e.executeEdits("formatEditsCommand",r.map(a=>yn.replaceMove(j.lift(a.range),a.text))),n&&e.pushUndoStop(),i.restoreRelativeVerticalPositionOfCursor(e)}}class ale{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class Cht{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(ale.toKey(e))}has(e){return this._set.has(ale.toKey(e))}}var ud=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Gee(u){if(u=u.filter(i=>i.range),!u.length)return;let{range:e}=u[0];for(let i=1;i0&&j.areIntersectingOrTouching(d[h-1],p)?d[h-1]=j.fromPositions(d[h-1].getStartPosition(),p.getEndPosition()):h=d.push(p);const E=p=>ud(this,void 0,void 0,function*(){var D,x;s.trace("[format][provideDocumentRangeFormattingEdits] (request)",(D=e.extensionId)===null||D===void 0?void 0:D.value,p);const b=(yield e.provideDocumentRangeFormattingEdits(l,p,l.getFormattingOptions(),c.token))||[];return s.trace("[format][provideDocumentRangeFormattingEdits] (response)",(x=e.extensionId)===null||x===void 0?void 0:x.value,b),b}),m=(p,D)=>{if(!p.length||!D.length)return!1;const x=p.reduce((b,k)=>j.plusRange(b,k.range),p[0].range);if(!D.some(b=>j.intersectRanges(x,b.range)))return!1;for(const b of p)for(const k of D)if(j.intersectRanges(b.range,k.range))return!0;return!1},g=[],f=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){s.trace("[format][provideDocumentRangeFormattingEdits] (request)",(r=e.extensionId)===null||r===void 0?void 0:r.value,d);const p=(yield e.provideDocumentRangesFormattingEdits(l,d,l.getFormattingOptions(),c.token))||[];s.trace("[format][provideDocumentRangeFormattingEdits] (response)",(a=e.extensionId)===null||a===void 0?void 0:a.value,p),f.push(p)}else{for(const p of d){if(c.token.isCancellationRequested)return!0;f.push(yield E(p))}for(let p=0;p({text:x.text,range:j.lift(x.range),forceMoveMarkers:!0})),x=>{for(const{range:b}of x)if(j.areIntersectingOrTouching(b,D))return[new Ye(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn)];return null})}return!0})}function kht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=u.get(mt),a=u.get(We),o=M1(e)?e.getModel():e,s=X2e(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,o),l=yield j3.select(s,o,t);l&&(n.report(l),yield r.invokeFunction(Fht,l,e,t,i))})}function Fht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=u.get(ql);let a,o;M1(t)?(a=t.getModel(),o=new Gm(t,5,void 0,i)):(a=t,o=new Wee(t,i));let s;try{const l=yield e.provideDocumentFormattingEdits(a,a.getFormattingOptions(),o.token);if(s=yield r.computeMoreMinimalEdits(a.uri,l),o.token.isCancellationRequested)return!0}finally{o.dispose()}if(!s||s.length===0)return!1;if(M1(t))Dv.execute(t,s,n!==2),n!==2&&(Gee(s),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:l}]=s,c=new Ye(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn);a.pushEditOperations([c],s.map(d=>({text:d.text,range:j.lift(d.range),forceMoveMarkers:!0})),d=>{for(const{range:h}of d)if(j.areIntersectingOrTouching(h,c))return[new Ye(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn)];return null})}return!0})}function yht(u,e,t,n,i,r){return ud(this,void 0,void 0,function*(){const a=e.documentRangeFormattingEditProvider.ordered(t);for(const o of a){const s=yield Promise.resolve(o.provideDocumentRangeFormattingEdits(t,n,i,r)).catch(Mi);if(pa(s))return yield u.computeMoreMinimalEdits(t.uri,s)}})}function Aht(u,e,t,n,i){return ud(this,void 0,void 0,function*(){const r=X2e(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const a of r){const o=yield Promise.resolve(a.provideDocumentFormattingEdits(t,n,i)).catch(Mi);if(pa(o))return yield u.computeMoreMinimalEdits(t.uri,o)}})}function tke(u,e,t,n,i,r,a){const o=e.onTypeFormattingEditProvider.ordered(t);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(t,n,i,r,a)).catch(Mi).then(s=>u.computeMoreMinimalEdits(t.uri,s))}ru.registerCommand("_executeFormatRangeProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n,i]=e;Ru(dt.isUri(t)),Ru(j.isIRange(n));const r=u.get(Vo),a=u.get(ql),o=u.get(We),s=yield r.createModelReference(t);try{return yht(a,o,s.object.textEditorModel,j.lift(n),i,Kt.None)}finally{s.dispose()}})});ru.registerCommand("_executeFormatDocumentProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n]=e;Ru(dt.isUri(t));const i=u.get(Vo),r=u.get(ql),a=u.get(We),o=yield i.createModelReference(t);try{return Aht(r,a,o.object.textEditorModel,n,Kt.None)}finally{o.dispose()}})});ru.registerCommand("_executeFormatOnTypeProvider",function(u,...e){return ud(this,void 0,void 0,function*(){const[t,n,i,r]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string");const a=u.get(Vo),o=u.get(ql),s=u.get(We),l=yield a.createModelReference(t);try{return tke(o,s,l.object.textEditorModel,ee.lift(n),i,r,Kt.None)}finally{l.dispose()}})});cd.wrappingIndent.defaultValue=0;cd.glyphMargin.defaultValue=!1;cd.autoIndent.defaultValue=3;cd.overviewRulerLanes.defaultValue=2;j3.setFormatterSelector((u,e,t)=>Promise.resolve(u[0]));const Eo=zve();Eo.editor=S1t();Eo.languages=Dht();const uke=Eo.CancellationTokenSource,nke=Eo.Emitter,ike=Eo.KeyCode,rke=Eo.KeyMod,ake=Eo.Position,oke=Eo.Range,ske=Eo.Selection,lke=Eo.SelectionDirection,cke=Eo.MarkerSeverity,dke=Eo.MarkerTag,hke=Eo.Uri,Eke=Eo.Token,mke=Eo.editor,gke=Eo.languages,xH=globalThis.MonacoEnvironment;(xH!=null&&xH.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=Eo);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});const BA=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:uke,Emitter:nke,KeyCode:ike,KeyMod:rke,MarkerSeverity:cke,MarkerTag:dke,Position:ake,Range:oke,Selection:ske,SelectionDirection:lke,Token:Eke,Uri:hke,editor:mke,languages:gke},Symbol.toStringTag,{value:"Module"}));/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var _ht=Object.defineProperty,Sht=Object.getOwnPropertyDescriptor,Bht=Object.getOwnPropertyNames,wht=Object.prototype.hasOwnProperty,ole=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bht(e))!wht.call(u,i)&&i!==t&&_ht(u,i,{get:()=>e[i],enumerable:!(n=Sht(e,i))||n.enumerable});return u},Lht=(u,e,t)=>(ole(u,e,"default"),t&&ole(t,e,"default")),_b={};Lht(_b,BA);var fke={},vH={},pke=class{constructor(u){kn(this,"_languageId");kn(this,"_loadingTriggered");kn(this,"_lazyLoadPromise");kn(this,"_lazyLoadPromiseResolve");kn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return vH[u]||(vH[u]=new pke(u)),vH[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,fke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;fke[e]=u,_b.languages.register(u);const t=pke.getOrCreate(e);_b.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),_b.languages.onLanguageEncountered(e,async()=>{const n=await t.load();_b.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Te(()=>import("./abap-e5f08dc1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Te(()=>import("./apex-fc8a734c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Te(()=>import("./azcli-c4358445.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Te(()=>import("./bat-eaac827b.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Te(()=>import("./bicep-9f8671bb.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Te(()=>import("./cameligo-ff939f45.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Te(()=>import("./clojure-4a1da11c.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Te(()=>import("./coffee-97023918.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Te(()=>import("./csharp-0765aa28.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Te(()=>import("./csp-dba4fa86.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Te(()=>import("./css-f18eed00.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Te(()=>import("./cypher-4b1a5b20.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Te(()=>import("./dart-c70c4314.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Te(()=>import("./dockerfile-ff7f0401.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Te(()=>import("./ecl-3129e183.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Te(()=>import("./elixir-ac388b4d.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Te(()=>import("./flow9-049a8a6c.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Te(()=>import("./fsharp-535d9fe2.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Te(()=>import("./freemarker2-71c0b7fd.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Te(()=>import("./go-d4bfa116.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Te(()=>import("./graphql-e5a73eb7.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Te(()=>import("./handlebars-f41bb875.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Te(()=>import("./hcl-8b69c899.js"),[],import.meta.url)});rt({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Te(()=>import("./html-3ea238d3.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Te(()=>import("./ini-83ae2a3a.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Te(()=>import("./java-4806d9f5.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Te(()=>import("./javascript-edf6de70.js"),["./javascript-edf6de70.js","./typescript-06b5296a.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Te(()=>import("./julia-334b5fb9.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Te(()=>import("./kotlin-ed14cfc6.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Te(()=>import("./less-58d9b66b.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Te(()=>import("./lexon-8bf535e2.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Te(()=>import("./lua-96829d0e.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Te(()=>import("./liquid-5f4f03ad.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Te(()=>import("./m3-815f612a.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Te(()=>import("./markdown-1cddbf33.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Te(()=>import("./mdx-4632e9a4.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Te(()=>import("./mips-361940ec.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Te(()=>import("./msdax-b98f6248.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Te(()=>import("./mysql-b4d05809.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Te(()=>import("./objective-c-64e6f89b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Te(()=>import("./pascal-e1cbffd7.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Te(()=>import("./pascaligo-013c6c0b.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Te(()=>import("./perl-d9423546.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Te(()=>import("./pgsql-423e077d.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Te(()=>import("./php-fb65b6b4.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Te(()=>import("./pla-09e93e1b.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Te(()=>import("./postiats-429bd8e8.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Te(()=>import("./powerquery-0470a494.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Te(()=>import("./powershell-b433b622.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Te(()=>import("./protobuf-3e557056.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Te(()=>import("./pug-b7980504.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Te(()=>import("./python-1d0103e1.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Te(()=>import("./qsharp-eed62033.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Te(()=>import("./r-8ce27f67.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Te(()=>import("./razor-343a2f14.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Te(()=>import("./redis-aec7cdf4.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Te(()=>import("./redshift-7d933e7a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Te(()=>import("./restructuredtext-a9e4c4cc.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Te(()=>import("./ruby-c9974e35.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Te(()=>import("./rust-9669a673.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Te(()=>import("./sb-b221a0fc.js"),[],import.meta.url)});rt({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Te(()=>import("./scala-9222416a.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Te(()=>import("./scheme-86110af1.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Te(()=>import("./scss-7da24d39.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Te(()=>import("./shell-0ca4f4ad.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Te(()=>import("./solidity-0072896b.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Te(()=>import("./sophia-bc45fa87.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Te(()=>import("./sparql-28fc150c.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Te(()=>import("./sql-96f7b353.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Te(()=>import("./st-c45997f6.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Te(()=>import("./swift-3b85cc8e.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Te(()=>import("./tcl-37e129b8.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Te(()=>import("./twig-1734ec31.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Te(()=>import("./typescript-06b5296a.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Te(()=>import("./vb-77962f32.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Te(()=>import("./wgsl-e67d25e4.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Te(()=>import("./xml-dc74cb95.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Te(()=>import("./yaml-646d4ecb.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var _ht=Object.defineProperty,Sht=Object.getOwnPropertyDescriptor,Bht=Object.getOwnPropertyNames,wht=Object.prototype.hasOwnProperty,ole=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bht(e))!wht.call(u,i)&&i!==t&&_ht(u,i,{get:()=>e[i],enumerable:!(n=Sht(e,i))||n.enumerable});return u},Lht=(u,e,t)=>(ole(u,e,"default"),t&&ole(t,e,"default")),_b={};Lht(_b,BA);var fke={},vH={},pke=class{constructor(u){kn(this,"_languageId");kn(this,"_loadingTriggered");kn(this,"_lazyLoadPromise");kn(this,"_lazyLoadPromiseResolve");kn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return vH[u]||(vH[u]=new pke(u)),vH[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,fke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;fke[e]=u,_b.languages.register(u);const t=pke.getOrCreate(e);_b.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),_b.languages.onLanguageEncountered(e,async()=>{const n=await t.load();_b.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Te(()=>import("./abap-e5f08dc1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Te(()=>import("./apex-fc8a734c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Te(()=>import("./azcli-c4358445.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Te(()=>import("./bat-eaac827b.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Te(()=>import("./bicep-9f8671bb.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Te(()=>import("./cameligo-ff939f45.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Te(()=>import("./clojure-4a1da11c.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Te(()=>import("./coffee-97023918.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Te(()=>import("./csharp-0765aa28.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Te(()=>import("./csp-dba4fa86.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Te(()=>import("./css-f18eed00.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Te(()=>import("./cypher-4b1a5b20.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Te(()=>import("./dart-c70c4314.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Te(()=>import("./dockerfile-ff7f0401.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Te(()=>import("./ecl-3129e183.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Te(()=>import("./elixir-ac388b4d.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Te(()=>import("./flow9-049a8a6c.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Te(()=>import("./fsharp-535d9fe2.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Te(()=>import("./freemarker2-5a543fc1.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Te(()=>import("./go-d4bfa116.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Te(()=>import("./graphql-e5a73eb7.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Te(()=>import("./handlebars-48f0b00c.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Te(()=>import("./hcl-8b69c899.js"),[],import.meta.url)});rt({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Te(()=>import("./html-08d3ca77.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Te(()=>import("./ini-83ae2a3a.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Te(()=>import("./java-4806d9f5.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Te(()=>import("./javascript-c886ed23.js"),["./javascript-c886ed23.js","./typescript-7ecfa68d.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Te(()=>import("./julia-334b5fb9.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Te(()=>import("./kotlin-ed14cfc6.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Te(()=>import("./less-58d9b66b.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Te(()=>import("./lexon-8bf535e2.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Te(()=>import("./lua-96829d0e.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Te(()=>import("./liquid-109c0bcd.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Te(()=>import("./m3-815f612a.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Te(()=>import("./markdown-1cddbf33.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Te(()=>import("./mdx-73755bf2.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Te(()=>import("./mips-361940ec.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Te(()=>import("./msdax-b98f6248.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Te(()=>import("./mysql-b4d05809.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Te(()=>import("./objective-c-64e6f89b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Te(()=>import("./pascal-e1cbffd7.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Te(()=>import("./pascaligo-013c6c0b.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Te(()=>import("./perl-d9423546.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Te(()=>import("./pgsql-423e077d.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Te(()=>import("./php-fb65b6b4.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Te(()=>import("./pla-09e93e1b.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Te(()=>import("./postiats-429bd8e8.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Te(()=>import("./powerquery-0470a494.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Te(()=>import("./powershell-b433b622.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Te(()=>import("./protobuf-3e557056.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Te(()=>import("./pug-b7980504.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Te(()=>import("./python-de82f2f3.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Te(()=>import("./qsharp-eed62033.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Te(()=>import("./r-8ce27f67.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Te(()=>import("./razor-59d1607c.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Te(()=>import("./redis-aec7cdf4.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Te(()=>import("./redshift-7d933e7a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Te(()=>import("./restructuredtext-a9e4c4cc.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Te(()=>import("./ruby-c9974e35.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Te(()=>import("./rust-9669a673.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Te(()=>import("./sb-b221a0fc.js"),[],import.meta.url)});rt({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Te(()=>import("./scala-9222416a.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Te(()=>import("./scheme-86110af1.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Te(()=>import("./scss-7da24d39.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Te(()=>import("./shell-0ca4f4ad.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Te(()=>import("./solidity-0072896b.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Te(()=>import("./sophia-bc45fa87.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Te(()=>import("./sparql-28fc150c.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Te(()=>import("./sql-96f7b353.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Te(()=>import("./st-c45997f6.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Te(()=>import("./swift-3b85cc8e.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Te(()=>import("./tcl-37e129b8.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Te(()=>import("./twig-1734ec31.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Te(()=>import("./typescript-7ecfa68d.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Te(()=>import("./vb-77962f32.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Te(()=>import("./wgsl-e67d25e4.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Te(()=>import("./xml-d6213659.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Te(()=>import("./yaml-2410ac7e.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var zht=Object.defineProperty,Mht=Object.getOwnPropertyDescriptor,Tht=Object.getOwnPropertyNames,Nht=Object.prototype.hasOwnProperty,sle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tht(e))!Nht.call(u,i)&&i!==t&&zht(u,i,{get:()=>e[i],enumerable:!(n=Mht(e,i))||n.enumerable});return u},Pht=(u,e,t)=>(sle(u,e,"default"),t&&sle(t,e,"default")),v6={};Pht(v6,BA);var Uee=class{constructor(e,t,n){kn(this,"_onDidChange",new v6.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},qee={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Jee={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Dke=new Uee("css",qee,Jee),xke=new Uee("scss",qee,Jee),vke=new Uee("less",qee,Jee);v6.languages.css={cssDefaults:Dke,lessDefaults:vke,scssDefaults:xke};function Zee(){return Te(()=>import("./cssMode-476dcd26.js"),[],import.meta.url)}v6.languages.onLanguage("less",()=>{Zee().then(u=>u.setupMode(vke))});v6.languages.onLanguage("scss",()=>{Zee().then(u=>u.setupMode(xke))});v6.languages.onLanguage("css",()=>{Zee().then(u=>u.setupMode(Dke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var zht=Object.defineProperty,Mht=Object.getOwnPropertyDescriptor,Tht=Object.getOwnPropertyNames,Nht=Object.prototype.hasOwnProperty,sle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tht(e))!Nht.call(u,i)&&i!==t&&zht(u,i,{get:()=>e[i],enumerable:!(n=Mht(e,i))||n.enumerable});return u},Pht=(u,e,t)=>(sle(u,e,"default"),t&&sle(t,e,"default")),v6={};Pht(v6,BA);var Uee=class{constructor(e,t,n){kn(this,"_onDidChange",new v6.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},qee={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Jee={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Dke=new Uee("css",qee,Jee),xke=new Uee("scss",qee,Jee),vke=new Uee("less",qee,Jee);v6.languages.css={cssDefaults:Dke,lessDefaults:vke,scssDefaults:xke};function Zee(){return Te(()=>import("./cssMode-23f8cfa4.js"),[],import.meta.url)}v6.languages.onLanguage("less",()=>{Zee().then(u=>u.setupMode(vke))});v6.languages.onLanguage("scss",()=>{Zee().then(u=>u.setupMode(xke))});v6.languages.onLanguage("css",()=>{Zee().then(u=>u.setupMode(Dke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,lle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Hht=(u,e,t)=>(lle(u,e,"default"),t&&lle(t,e,"default")),ZP={};Hht(ZP,BA);var Vht=class{constructor(e,t,n){kn(this,"_onDidChange",new ZP.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},$ht={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},YP={format:$ht,suggest:{},data:{useDefaultDataProvider:!0}};function QP(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===g2,documentFormattingEdits:u===g2,documentRangeFormattingEdits:u===g2}}var g2="html",cle="handlebars",dle="razor",Cke=XP(g2,YP,QP(g2)),Kht=Cke.defaults,bke=XP(cle,YP,QP(cle)),Wht=bke.defaults,kke=XP(dle,YP,QP(dle)),Ght=kke.defaults;ZP.languages.html={htmlDefaults:Kht,razorDefaults:Ght,handlebarDefaults:Wht,htmlLanguageService:Cke,handlebarLanguageService:bke,razorLanguageService:kke,registerHTMLLanguageService:XP};function Uht(){return Te(()=>import("./htmlMode-c7f55510.js"),[],import.meta.url)}function XP(u,e=YP,t=QP(u)){const n=new Vht(u,e,t);let i;const r=ZP.languages.onLanguage(u,async()=>{i=(await Uht()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,lle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Hht=(u,e,t)=>(lle(u,e,"default"),t&&lle(t,e,"default")),ZP={};Hht(ZP,BA);var Vht=class{constructor(e,t,n){kn(this,"_onDidChange",new ZP.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},$ht={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},YP={format:$ht,suggest:{},data:{useDefaultDataProvider:!0}};function QP(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===g2,documentFormattingEdits:u===g2,documentRangeFormattingEdits:u===g2}}var g2="html",cle="handlebars",dle="razor",Cke=XP(g2,YP,QP(g2)),Kht=Cke.defaults,bke=XP(cle,YP,QP(cle)),Wht=bke.defaults,kke=XP(dle,YP,QP(dle)),Ght=kke.defaults;ZP.languages.html={htmlDefaults:Kht,razorDefaults:Ght,handlebarDefaults:Wht,htmlLanguageService:Cke,handlebarLanguageService:bke,razorLanguageService:kke,registerHTMLLanguageService:XP};function Uht(){return Te(()=>import("./htmlMode-e8ba8f80.js"),[],import.meta.url)}function XP(u,e=YP,t=QP(u)){const n=new Vht(u,e,t);let i;const r=ZP.languages.onLanguage(u,async()=>{i=(await Uht()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var qht=Object.defineProperty,Jht=Object.getOwnPropertyDescriptor,Zht=Object.getOwnPropertyNames,Yht=Object.prototype.hasOwnProperty,hle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zht(e))!Yht.call(u,i)&&i!==t&&qht(u,i,{get:()=>e[i],enumerable:!(n=Jht(e,i))||n.enumerable});return u},Qht=(u,e,t)=>(hle(u,e,"default"),t&&hle(t,e,"default")),wA={};Qht(wA,BA);var Xht=class{constructor(e,t,n){kn(this,"_onDidChange",new wA.Emitter);kn(this,"_diagnosticsOptions");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},e4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},t4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Fke=new Xht("json",e4t,t4t);wA.languages.json={jsonDefaults:Fke};function u4t(){return Te(()=>import("./jsonMode-132600a1.js"),[],import.meta.url)}wA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});wA.languages.onLanguage("json",()=>{u4t().then(u=>u.setupMode(Fke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var qht=Object.defineProperty,Jht=Object.getOwnPropertyDescriptor,Zht=Object.getOwnPropertyNames,Yht=Object.prototype.hasOwnProperty,hle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zht(e))!Yht.call(u,i)&&i!==t&&qht(u,i,{get:()=>e[i],enumerable:!(n=Jht(e,i))||n.enumerable});return u},Qht=(u,e,t)=>(hle(u,e,"default"),t&&hle(t,e,"default")),wA={};Qht(wA,BA);var Xht=class{constructor(e,t,n){kn(this,"_onDidChange",new wA.Emitter);kn(this,"_diagnosticsOptions");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},e4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},t4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Fke=new Xht("json",e4t,t4t);wA.languages.json={jsonDefaults:Fke};function u4t(){return Te(()=>import("./jsonMode-728df4b3.js"),[],import.meta.url)}wA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});wA.languages.onLanguage("json",()=>{u4t().then(u=>u.setupMode(Fke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var n4t=Object.defineProperty,i4t=Object.getOwnPropertyDescriptor,r4t=Object.getOwnPropertyNames,a4t=Object.prototype.hasOwnProperty,Ele=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of r4t(e))!a4t.call(u,i)&&i!==t&&n4t(u,i,{get:()=>e[i],enumerable:!(n=i4t(e,i))||n.enumerable});return u},o4t=(u,e,t)=>(Ele(u,e,"default"),t&&Ele(t,e,"default")),s4t="5.0.2",xv={};o4t(xv,BA);var yke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(yke||{}),Ake=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Ake||{}),_ke=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(_ke||{}),Ske=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(Ske||{}),Bke=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(Bke||{}),wke=class{constructor(u,e,t,n,i){kn(this,"_onDidChange",new xv.Emitter);kn(this,"_onDidExtraLibsChange",new xv.Emitter);kn(this,"_extraLibs");kn(this,"_removedExtraLibs");kn(this,"_eagerModelSync");kn(this,"_compilerOptions");kn(this,"_diagnosticsOptions");kn(this,"_workerOptions");kn(this,"_onDidExtraLibsChangeTimeout");kn(this,"_inlayHintsOptions");kn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},l4t=s4t,Lke={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},zke=new wke({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),Mke=new wke({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),c4t=()=>eR().then(u=>u.getTypeScriptWorker()),d4t=()=>eR().then(u=>u.getJavaScriptWorker());xv.languages.typescript={ModuleKind:yke,JsxEmit:Ake,NewLineKind:_ke,ScriptTarget:Ske,ModuleResolutionKind:Bke,typescriptVersion:l4t,typescriptDefaults:zke,javascriptDefaults:Mke,getTypeScriptWorker:c4t,getJavaScriptWorker:d4t};function eR(){return Te(()=>import("./tsMode-7da4817d.js"),[],import.meta.url)}xv.languages.onLanguage("typescript",()=>eR().then(u=>u.setupTypeScript(zke)));xv.languages.onLanguage("javascript",()=>eR().then(u=>u.setupJavaScript(Mke)));class h4t extends u0{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:v("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:we.map,toggled:Ee.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Ee.has("isInDiffEditor"),menu:{when:Ee.has("isInDiffEditor"),id:K.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}gn(h4t);class Tke extends u0{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:v("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}gn(Tke);class Nke extends u0{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:v("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}gn(Nke);Lr.appendMenuItem(K.EditorTitle,{command:{id:new Nke().desc.id,title:v("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Ee.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Ee.has("isInDiffEditor")},order:11,group:"1_diff",when:Ee.and(W.diffEditorRenderSideBySideInlineBreakpointReached,Ee.has("isInDiffEditor"))});Lr.appendMenuItem(K.EditorTitle,{command:{id:new Tke().desc.id,title:v("showMoves","Show Moved Code Blocks"),icon:we.move,toggled:l6.create("config.diffEditor.experimental.showMoves",!0),precondition:Ee.has("isInDiffEditor")},order:10,group:"1_diff",when:Ee.has("isInDiffEditor")});const tR={value:v("diffEditor","Diff Editor"),original:"Diff Editor"};class E4t extends hd{constructor(){super({id:"diffEditor.switchSide",title:{value:v("switchSide","Switch Side"),original:"Switch Side"},icon:we.arrowSwap,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,n){const i=b6(e);if(i instanceof O3){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}gn(E4t);class m4t extends hd{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:v("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:we.close,precondition:W.comparingMovedCode,f1:!1,category:tR,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.exitCompareMove()}}gn(m4t);class g4t extends hd{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:v("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:we.fold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.collapseAllUnchangedRegions()}}gn(g4t);class f4t extends hd{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:v("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:we.unfold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.showAllUnchangedRegions()}}gn(f4t);const Pke={value:v("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class C6 extends u0{constructor(){super({id:C6.id,title:{value:v("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerNext()}}C6.id="editor.action.accessibleDiffViewer.next";Lr.appendMenuItem(K.EditorTitle,{command:{id:C6.id,title:v("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Ee.has("isInDiffEditor")},order:10,group:"2_diff",when:Ee.and(W.accessibleDiffViewerVisible.negate(),Ee.has("isInDiffEditor"))});class LA extends u0{constructor(){super({id:LA.id,title:{value:v("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerPrev()}}LA.id="editor.action.accessibleDiffViewer.prev";function b6(u){var e;const t=u.get(Cu),n=t.listDiffEditors(),i=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!i)return null;for(let a=0,o=n.length;a=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},x4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},LU;const nR=new Pe("selectionAnchorSet",!1);let d4=LU=class{static get(e){return e.getContribution(LU.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=nR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Zr().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ga(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};d4.ID="editor.contrib.selectionAnchorController";d4=LU=D4t([x4t(1,pt)],d4);class v4t extends $e{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2080),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class C4t extends $e{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:nR})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class b4t extends $e{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2089),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class k4t extends $e{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}fu(d4.ID,d4,4);be(v4t);be(C4t);be(b4t);be(k4t);const F4t=q("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y4t extends $e{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.jumpToBracket()}}class A4t extends $e{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=Al.get(t))===null||i===void 0||i.selectToBracket(r)}}class _4t extends $e{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class S4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class Al extends ne{static get(e){return e.getContribution(Al.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ye(a.lineNumber,a.column,a.lineNumber,a.column):new Ye(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(j.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ye(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ee.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(z4t);var M4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const H3="9_cutcopypaste",T4t=Oc||document.queryCommandSupported("cut"),Ike=Oc||document.queryCommandSupported("copy"),N4t=typeof navigator.clipboard>"u"||M0?document.queryCommandSupported("paste"):!0;function Yee(u){return u.register(),u}const P4t=T4t?Yee(new d6({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Oc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1}]})):void 0,R4t=Ike?Yee(new d6({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Oc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Lr.appendMenuItem(K.MenubarEditMenu,{submenu:K.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:H3,order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:Ee.and(Ee.notEquals("resourceScheme","output"),W.editorTextFocus)});Lr.appendMenuItem(K.EditorTitleContext,{submenu:K.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});Lr.appendMenuItem(K.ExplorerContext,{submenu:K.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const CH=N4t?Yee(new d6({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Oc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4}]})):void 0;class I4t extends $e{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(PW.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),PW.forceCopyWithSyntaxHighlighting=!1)}}function Oke(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(Cu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(37),a=i.getSelection();return a&&a.isEmpty()&&!r||i.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(JN().execCommand(e),!0)))}Oke(P4t,"cut");Oke(R4t,"copy");CH&&(CH.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(Cu),n=u.get(_4),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!i.getContainerDomNode().ownerDocument.execCommand("paste")&&dg?(()=>M4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=Sk.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(37)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),CH.addImplementation(0,"generic-dom",(u,e)=>(JN().execCommand("paste"),!0)));Ike&&be(I4t);var O4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let gt=class c8{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+c8.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new c8(this.value+c8.sep+e)}};gt.sep=".";gt.None=new gt("@@none@@");gt.Empty=new gt("");gt.QuickFix=new gt("quickfix");gt.Refactor=new gt("refactor");gt.RefactorExtract=gt.Refactor.append("extract");gt.RefactorInline=gt.Refactor.append("inline");gt.RefactorMove=gt.Refactor.append("move");gt.RefactorRewrite=gt.Refactor.append("rewrite");gt.Notebook=new gt("notebook");gt.Source=new gt("source");gt.SourceOrganizeImports=gt.Source.append("organizeImports");gt.SourceFixAll=gt.Source.append("fixAll");gt.SurroundWith=gt.Refactor.append("surround");var gs;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(gs||(gs={}));function j4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>jke(e,t,u.include))||!u.includeSourceActions&>.Source.contains(e))}function H4t(u,e){const t=e.kind?new gt(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>jke(t,n,u.include))||!u.includeSourceActions&&t&>.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function jke(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Zd{static fromUser(e,t){return!e||typeof e!="object"?new Zd(t.kind,t.apply,!1):new Zd(Zd.getKindFromUser(e,t.kind),Zd.getApplyFromUser(e,t.apply),Zd.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new gt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class V4t{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}resolve(e){var t;return O4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Mi(i)}n&&(this.action.edit=n.edit)}return this})}}var Nw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Hke="editor.action.codeAction",Qee="editor.action.quickFix",Vke="editor.action.autoFix",$ke="editor.action.refactor",Kke="editor.action.sourceAction",Xee="editor.action.organizeImports",ete="editor.action.fixAll";class f2 extends ne{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return pa(e.diagnostics)?pa(t.diagnostics)?f2.codeActionsPreferredComparator(e,t):-1:pa(t.diagnostics)?1:f2.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(f2.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&>.QuickFix.contains(new gt(e.kind))&&!!e.isPreferred)}}const mle={actions:[],documentation:void 0};function p2(u,e,t,n,i,r){var a;return Nw(this,void 0,void 0,function*(){const o=n.filter||{},s=Object.assign(Object.assign({},o),{excludes:[...o.excludes||[],gt.Notebook]}),l={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},c=new Wee(e,r),d=n.type===2,h=$4t(u,e,d?s:o),E=new pe,m=h.map(f=>Nw(this,void 0,void 0,function*(){try{i.report(f);const p=yield f.provideCodeActions(e,t,l,c.token);if(p&&E.add(p),c.token.isCancellationRequested)return mle;const D=((p==null?void 0:p.actions)||[]).filter(b=>b&&H4t(o,b)),x=W4t(f,D,o.include);return{actions:D.map(b=>new V4t(b,f)),documentation:x}}catch(p){if(dd(p))throw p;return Mi(p),mle}})),g=u.onDidChange(()=>{const f=u.all(e);di(f,h)||c.cancel()});try{const f=yield Promise.all(m),p=f.map(x=>x.actions).flat(),D=[...b1(f.map(x=>x.documentation)),...K4t(u,e,n,p)];return new f2(p,D,E)}finally{g.dispose(),c.dispose()}})}function $4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>j4t(t,new gt(i))):!0)}function*K4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function W4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new gt(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new gt(i.kind)))return r.command}}var Pw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(Pw||(Pw={}));function G4t(u,e,t,n,i=Kt.None){var r;return Nw(this,void 0,void 0,function*(){const a=u.get(xA),o=u.get(ni),s=u.get(n0),l=u.get(bi);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Pw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=U4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function U4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}ru.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return Nw(this,void 0,void 0,function*(){if(!(e instanceof dt))throw A0();const{codeActionProvider:r}=u.get(We),a=u.get(_n).getModel(e);if(!a)throw A0();const o=Ye.isISelection(t)?Ye.liftSelection(t):j.isIRange(t)?a.validateRange(t):void 0;if(!o)throw A0();const s=typeof n=="string"?new gt(n):void 0,l=yield p2(r,a,o,{type:1,triggerAction:gs.Default,filter:{includeSourceActions:!0,include:s}},Yh.None,Kt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zU;let Rw=zU=class{constructor(e){this.keybindingService=e}getResolver(){const e=new mg(()=>this.keybindingService.getKeybindings().filter(t=>zU.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===Xee?n={kind:gt.SourceOrganizeImports.value}:t.command===ete&&(n={kind:gt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Zd.fromUser(n,{kind:gt.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new gt(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};Rw.codeActionCommands=[$ke,Hke,Kke,Xee,ete];Rw=zU=q4t([J4t(0,qu)],Rw);q("symbolIcon.arrayForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.booleanForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.colorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constantForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fileForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.folderForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keywordForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.moduleForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.namespaceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.nullForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.numberForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.objectForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.operatorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.packageForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.propertyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.referenceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.snippetForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.stringForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.structForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.textForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.typeParameterForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.unitForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const Wke=Object.freeze({kind:gt.Empty,title:v("codeAction.widget.id.more","More Actions...")}),Z4t=Object.freeze([{kind:gt.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix")},{kind:gt.RefactorExtract,title:v("codeAction.widget.id.extract","Extract"),icon:we.wrench},{kind:gt.RefactorInline,title:v("codeAction.widget.id.inline","Inline"),icon:we.wrench},{kind:gt.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite"),icon:we.wrench},{kind:gt.RefactorMove,title:v("codeAction.widget.id.move","Move"),icon:we.wrench},{kind:gt.SurroundWith,title:v("codeAction.widget.id.surround","Surround With"),icon:we.symbolSnippet},{kind:gt.Source,title:v("codeAction.widget.id.source","Source Action"),icon:we.symbolFile},Wke]);function Y4t(u,e,t){if(!e)return u.map(r=>{var a;return{kind:"action",item:r,group:Wke,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!(!((a=r.action.edit)===null||a===void 0)&&a.edits.length)}});const n=Z4t.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new gt(r.action.kind):gt.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},MU,S5;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(S5||(S5={}));let V3=MU=class extends ne{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Q),this.onClick=this._onClick.event,this._state=S5.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Zu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(WJe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=ji(this._domNode),a=this._editor.getOption(66);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(Ne.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i,r,a;this._preferredKbLabel=(i=(n=t.lookupKeybinding(Vke))===null||n===void 0?void 0:n.getLabel())!==null&&i!==void 0?i:void 0,this._quickFixKbLabel=(a=(r=t.lookupKeybinding(Qee))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(64).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(50),c=r.getLineContent(a),d=pP(c,s),h=l.spaceWidth*d>22,E=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1);let m=a;if(!h){if(a>1&&!E(a-1))m-=1;else if(!E(a+1))m+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new S5.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:MU._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==S5.Hidden&&(this.state=S5.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...st.asClassNameArray(we.lightBulb)),this._domNode.classList.add(...st.asClassNameArray(we.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...st.asClassNameArray(we.lightbulbAutofix)),this._domNode.classList.add(...st.asClassNameArray(we.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};V3.ID="editor.contrib.lightbulbWidget";V3._posPref=[0];V3=MU=Q4t([X4t(1,qu)],V3);var eEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},gle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gke=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},TU;let h4=TU=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Q,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new pe,r=i.add(BP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>Gke(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ks);const l=yield Frt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=TU._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(50);ea(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Uke(this._openerService,n,e.isTrusted),disposables:t}}}};h4._ttpTokenizer=b4("tokenizeToString",{createHTML(u){return u}});h4=TU=eEt([gle(1,vn),gle(2,vs)],h4);function Uke(u,e,t){return Gke(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:tEt(t)})}catch(n){return zt(n),!1}})}function tEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},d8;let ls=d8=class{static get(e){return e.getContribution(d8.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Ir,this._messageListeners=new pe,this._mouseOverMessage=!1,this._editor=e,this._visible=d8.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ga(nm(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=nm(e)?BP(e,{actionHandler:{callback:i=>Uke(this._openerService,i,nm(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new ple(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ne.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qr(yl(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new j(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ple.fadeOut(this._messageWidget.value))}};ls.ID="editor.contrib.messageController";ls.MESSAGE_VISIBLE=new Pe("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));ls=d8=uEt([fle(1,pt),fle(2,vs)],ls);const nEt=xr.bindToContribution(ls.get);ze(new nEt({id:"leaveEditorMessage",precondition:ls.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let ple=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fu(ls.ID,ls,4);var qke=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},NU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Jke="acceptSelectedCodeAction",Zke="previewSelectedCodeAction";class rEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let PU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new FA(e,Is);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=st.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Re(e.group.icon.color.id))):(n.icon.className=st.asClassName(we.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Yke(e.label),n.keybinding.set(e.keybinding),uZe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(Jke))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(Zke))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview&&e.canPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};PU=qke([NU(1,qu)],PU);class aEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Dle extends UIEvent{constructor(){super("previewSelectedAction")}}function oEt(u){if(u.kind==="action")return u.label}let RU=class extends ne{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new vi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Gl(e,this.domNode,o,[new PU(t,this._keybindingService),new rEt],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:oEt},accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?Yke(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Tp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new Dle:new aEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Dle):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,r.item)}onListHover(e){return iEt(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};RU=qke([NU(4,F4),NU(5,qu)],RU);function Yke(u){return u.replace(/\r\n|\r|\n/g," ")}var sEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};q("actionBar.toggledBackground",{dark:If,light:If,hcDark:If,hcLight:If},v("actionBar.toggledBackground","Background color for toggled action items in action bar."));const $3={Visible:new Pe("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},Op=Ut("actionWidgetService");let K3=class extends ne{get isVisible(){return $3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Ir)}show(e,t,n,i,r,a,o){const s=$3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(RU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new pe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const m=this._createActionBar(".action-widget-action-bar",n);m&&(r.appendChild(m.getContainer().parentElement),a.add(m),d=m.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(y1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new O0(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};K3=sEt([bH(0,F4),bH(1,pt),bH(2,mt)],K3);au(Op,K3,1);const zA=100+1e3;gn(class extends u0{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$3.Visible,keybinding:{weight:zA,primary:9,secondary:[1033]}})}run(u){u.get(Op).hide()}});gn(class extends u0{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$3.Visible,keybinding:{weight:zA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusPrevious()}});gn(class extends u0{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$3.Visible,keybinding:{weight:zA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusNext()}});gn(class extends u0{constructor(){super({id:Jke,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:3,secondary:[2137]}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected()}});gn(class extends u0{constructor(){super({id:Zke,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:2051}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected(!0)}});var lEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Qke=new Pe("supportedCodeAction","");class cEt extends ne{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Vl),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>TX(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:gs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Bf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(dd(a))return Xke;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(Bf||(Bf={}));const Xke=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class dEt extends ne{constructor(e,t,n,i,r,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=a,this._codeActionOracle=this._register(new Ir),this._state=Bf.Empty,this._onDidChangeState=this._register(new Q),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=Qke.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Bf.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Bf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new cEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(Bf.Empty);return}const r=n.selection.getStartPosition(),a=Ui(o=>lEt(this,void 0,void 0,function*(){var s,l,c,d,h,E;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===gs.QuickFix||!((l=(s=n.trigger.filter)===null||s===void 0?void 0:s.include)===null||l===void 0)&&l.contains(gt.QuickFix))){const m=yield p2(this._registry,e,n.selection,n.trigger,Yh.None,o);if(o.isCancellationRequested)return Xke;if(!((c=m.validActions)===null||c===void 0?void 0:c.some(f=>f.action.kind?gt.QuickFix.contains(new gt(f.action.kind)):!1))){const f=this._markerService.read({resource:e.uri});if(f.length>0){const p=n.selection.getPosition();let D=p,x=Number.MAX_VALUE,b=!1;for(const k of f){const A=k.endColumn,F=k.endLineNumber,S=k.startLineNumber;(F===p.lineNumber||S===p.lineNumber)&&Math.abs(p.column-A){w.highlightRange=w.action.isPreferred}),S.push(...F.validActions)),{validActions:S,allActions:m.allActions,documentation:m.documentation,hasAutoFix:m.hasAutoFix,dispose:()=>{m.dispose()}}}}}}return p2(this._registry,e,n.selection,n.trigger,Yh.None,o)}));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(a,250)),this.setState(new Bf.Triggered(n.trigger,r,a))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:gs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var hEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ah=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},h8;const EEt="quickfix-edit-highlight";let Um=h8=class extends ne{static get(e){return e.getContribution(h8.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Ir),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new dEt(this._editor,r.codeActionProvider,t,n,a,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new mg(()=>{const d=this._editor.getContribution(V3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(Rw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=ls.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return vC(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(G4t,e,Pw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:gs.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return vC(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){zt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=ls.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=ls.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return vC(this,void 0,void 0,function*(){const i=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const a=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!a.length)return;const o=ee.isIPosition(t)?this.toCoords(t):t,s={onSelect:(l,c)=>vC(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide(),i.clear()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus(),i.clear()},onHover:(l,c)=>vC(this,void 0,void 0,function*(){var d;if(yield l.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((d=l.action.edit)===null||d===void 0)&&d.edits.length)}}),onFocus:l=>{var c,d;if(l&&l.highlightRange&&l.action.diagnostics){const h=[{range:l.action.diagnostics[0],options:h8.DECORATION}];i.set(h);const E=l.action.diagnostics[0],m=(d=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:E.startLineNumber,column:E.startColumn}))===null||d===void 0?void 0:d.word;jm(v("editingNewSelection","Context: {0} at line {1} and column {2}.",m,E.startLineNumber,E.startColumn))}else i.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Y4t(a,this._shouldShowHeaders(),this._resolver.getResolver()),s,o,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=ji(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};Um.ID="editor.contrib.codeActionController";Um.DECORATION=Lt.register({description:"quickfix-highlight",className:EEt});Um=h8=hEt([ah(1,G1),ah(2,pt),ah(3,mt),ah(4,We),ah(5,Dg),ah(6,ni),ah(7,tu),ah(8,Op),ah(9,mt)],Um);Kl((u,e)=>{((i,r)=>{r&&e.addRule(`.monaco-editor ${i} { background-color: ${r}; }`)})(".quickfix-edit-highlight",u.getColor(a1));const n=u.getColor(LE);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${$c(u.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function MA(u){return Ee.regex(Qke.keys()[0],new RegExp("(\\s|^)"+qs(u.value)+"\\b"))}const tte={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function jp(u,e,t,n,i=gs.Default){if(u.hasModel()){const r=Um.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends $e{constructor(){super({id:Qee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:2137,weight:100}})}run(e,t){return jp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,gs.QuickFix)}}class gEt extends xr{constructor(){super({id:Hke,precondition:Ee.and(W.writable,W.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tte}]}})}runEditorCommand(e,t,n){const i=Zd.fromUser(n,{kind:gt.Empty,apply:"ifSingle"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class fEt extends $e{constructor(){super({id:$ke,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Ee.and(W.writable,MA(gt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Refactor,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:gt.Refactor.contains(i.kind)?i.kind:gt.None,onlyIncludePreferredActions:i.preferred},i.apply,gs.Refactor)}}class pEt extends $e{constructor(){super({id:Kke,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Ee.and(W.writable,MA(gt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Source,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:gt.Source.contains(i.kind)?i.kind:gt.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,gs.SourceAction)}}class DEt extends $e{constructor(){super({id:Xee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Ee.and(W.writable,MA(gt.SourceOrganizeImports)),kbOpts:{kbExpr:W.textInputFocus,primary:1581,weight:100}})}run(e,t){return jp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:gt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",gs.OrganizeImports)}}class xEt extends $e{constructor(){super({id:ete,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:Ee.and(W.writable,MA(gt.SourceFixAll))})}run(e,t){return jp(t,v("fixAll.noneMessage","No fix all action available"),{include:gt.SourceFixAll,includeSourceActions:!0},"ifSingle",gs.FixAll)}}class vEt extends $e{constructor(){super({id:Vke,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Ee.and(W.writable,MA(gt.QuickFix)),kbOpts:{kbExpr:W.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return jp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:gt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",gs.AutoFix)}}fu(Um.ID,Um,3);fu(V3.ID,V3,4);be(mEt);be(fEt);be(pEt);be(DEt);be(vEt);be(xEt);ze(new gEt);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:v("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var xle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class IU{constructor(){this.lenses=[],this._disposables=new pe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function eFe(u,e,t){return xle(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new IU,a=n.map((o,s)=>xle(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Mi(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}ru.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Ru(dt.isUri(t)),Ru(typeof n=="number"||!n);const{codeLensProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)throw A0();const a=[],o=new pe;return eFe(i,r,Kt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Kt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var CEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tFe=Ut("ICodeLensCache");class vle{constructor(e,t){this.lineCount=e,this.data=t}}let OU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new gg(20,.75);const t="codelens/cache";Ph(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),Ne.once(e.onWillSaveState)(r=>{r.reason===lw.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new IU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new vle(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new j(o,1,o,11)});const a=new IU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new vle(i.lineCount,a))}}catch{}}};OU=CEt([bEt(0,Ul)],OU);au(tFe,OU,1);class kEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iR{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iR._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:Cle},d=>this._decorationIds[c]=d),o?o=j.plusRange(o,l.symbol.range):o=j.lift(l.symbol.range)}),this._viewZone=new kEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iR(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&j.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:Cle},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},CC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new pe,this._localToDispose=new pe,this._lenses=[],this._oldCodeLensModels=new pe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(50)||o.hasChanged(19)||o.hasChanged(18))&&this._updateLensStyle(),o.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),i=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",os.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Rm(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=Ui(a=>eFe(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},zt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new kH;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ft(()=>{if(this._editor.getModel()){const i=td.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new kH;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=td.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new kH;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=Ui(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,m)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(g=>{d[m]=g},Mi):(d[m]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{zt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return uFe(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};vv.ID="css.editor.codeLens";vv=FEt([CC(1,We),CC(2,U0),CC(3,ni),CC(4,bi),CC(5,tFe)],vv);fu(vv.ID,vv,1);be(class extends $e{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:W.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return uFe(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(md),i=e.get(ni),r=e.get(bi),a=t.getSelection().positionLineNumber,o=t.getContribution(vv.ID);if(!o)return;const s=yield o.getModel();if(!s)return;const l=[];for(const h of s.lenses)h.symbol.command&&h.symbol.range.startLineNumber===a&&l.push({label:h.symbol.command.title,command:h.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1,placeHolder:v("placeHolder","Select a command")});if(!c)return;let d=c.command;if(s.isDisposed){const h=yield o.getModel(),E=h==null?void 0:h.lenses.find(m=>{var g;return m.symbol.range.startLineNumber===a&&((g=m.symbol.command)===null||g===void 0?void 0:g.title)===d.title});if(!E||!E.symbol.command)return;d=E.symbol.command}try{yield i.executeCommand(d.id,...d.arguments||[])}catch(h){r.error(h)}})}});var yEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class ute{constructor(e,t){this._editorWorkerClient=new lX(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return AEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new nu(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let jU=class extends ne{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new ute(e,t)))}};jU=yEt([FH(0,_n),FH(1,tn),FH(2,We)],jU);KP(jU);var TA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function nFe(u,e,t,n=!0){return TA(this,void 0,void 0,function*(){return nte(new _Et,u,e,t,n)})}function iFe(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class _Et{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class SEt{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class BEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Kt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function nte(u,e,t,n,i){return TA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof ute)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Mi(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function rFe(u,e){const{colorProvider:t}=u.get(We),n=u.get(_n).getModel(e);if(!n)throw A0();const i=u.get(tu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}ru.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof dt))throw A0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=rFe(u,t);return nte(new SEt,i,n,Kt.None,r)});ru.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof dt)||!Array.isArray(t)||t.length!==4||!j.isIRange(r))throw A0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=rFe(u,i),[l,c,d,h]=t;return nte(new BEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Kt.None,s)});var wEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},kle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},HU;const aFe=Object.create({});let qm=HU=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new pe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cA(this._editor),this._decoratorLimitReporter=new LEt,this._colorDecorationClassRefs=this._register(new pe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:HU.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(21),s=r.hasChanged(145);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Vl,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return kle(this,void 0,void 0,function*(){this._computePromise=Ui(e=>kle(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new va(!1),i=yield nFe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){zt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:Lt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(21);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qm.ID="editor.contrib.colorDetector";qm.RECOMPUTE_TIME=1e3;qm=HU=wEt([yH(1,tu),yH(2,We),yH(3,U0)],qm);class LEt{constructor(){this._onDidChange=new Q,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}fu(qm.ID,qm,1);class zEt{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Q,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Q,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(TB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new TEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}let TEt=class extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Ps(".button"+st.asCSSSelector(hi("color-picker-close",we.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class NEt extends ne{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Ps(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new PEt(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new REt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new IEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new OEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new e1(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new e1(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new e1(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class PEt extends ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Ps(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Ps(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new m6);const t=ji(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ae(new e1(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class oFe extends ne{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Ps(".standalone-strip")),this.overlay=me(this.domNode,Ps(".standalone-overlay"))):(this.domNode=me(e,Ps(".strip")),this.overlay=me(this.domNode,Ps(".overlay"))),this.slider=me(this.domNode,Ps(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new m6),n=ji(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class REt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:i}=e.rgba,r=new ae(new nu(t,n,i,1)),a=new ae(new nu(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class IEt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class OEt extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class jEt extends $l{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(sk.onDidChange(()=>this.layout()));const a=Ps(".colorpicker-widget");e.appendChild(a),this.header=this._register(new MEt(a,this.model,i,r)),this.body=this._register(new NEt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var sFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Cv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class HEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return _i.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=qm.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield cFe(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}};Iw=sFe([lFe(1,sr)],Iw);class VEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let aF=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!qm.get(this._editor))return null;const r=yield nFe(n,this._editor.getModel(),Kt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;j.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield cFe(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new j(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield E8(this._editor.getModel(),t,this._color,n,e),n=hFe(this._editor,n,t))})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};aF=sFe([lFe(1,sr)],aF);function cFe(u,e,t,n){return Cv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new nu(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield iFe(e,t,n,Kt.None),h=new zEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof Iw?new HEt(u,j.lift(t.range),h,n):new VEt(u,j.lift(t.range),h,n)})}function dFe(u,e,t,n,i){if(n.length===0||!e.hasModel())return ne.None;if(i.setMinimumDimensions){const h=e.getOption(66)+8;i.setMinimumDimensions(new pu(302,h))}const r=new pe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new jEt(i.fragment,s,e.getOption(141),t,u instanceof aF));i.setColorPicker(l);let c=!1,d=new j(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof aF){const h=n[0].model.color;u.color=h,E8(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>Cv(this,void 0,void 0,function*(){yield E8(o,s,h,d,a),c=!0,d=hFe(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{E8(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function hFe(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new j(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function E8(u,e,t,n,i){return Cv(this,void 0,void 0,function*(){const r=yield iFe(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Kt.None);e.colorPresentations=r||[]})}function VU(u,e){return!!u[e]}class AH{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=VU(e.event,t.triggerModifier),this.hasSideBySideModifier=VU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Fle{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=VU(e,t.triggerModifier)}}class M9{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function yle(u){return u==="altKey"?iu?new M9(57,"metaKey",6,"altKey"):new M9(5,"ctrlKey",6,"altKey"):iu?new M9(6,"altKey",57,"metaKey"):new M9(6,"altKey",5,"ctrlKey")}class rR extends ne{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Q),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Q),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Q),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:i=>i.target.position?i.target.position.lineNumber:0,this._opts=yle(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(77)){const r=yle(this._editor.getOption(77));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new AH(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new AH(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new AH(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Fle(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Fle(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var $Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},oh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Jm=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){NN(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Jm=$Et([oh(4,mt),oh(5,Cu),oh(6,ni),oh(7,pt),oh(8,sr),oh(9,bi),oh(10,k4),oh(11,tn),oh(12,We)],Jm);const Ale=new ae(new nu(0,122,204)),KEt={showArrow:!0,showFrame:!0,className:"",frameColor:Ale,arrowColor:Ale,keepEditorSelection:!1},WEt="vs.editor.contrib.zoneWidget";class GEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class UEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class aR{constructor(e){this._editor=e,this._ruleName=aR._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Dae(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){Dae(this._ruleName),EW(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:j.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}aR._IdGenerator=new lee(".arrow-decoration-");class qEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new pe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=xh(t),NN(this.options,KEt,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new aR(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=j.isIRange(e)?j.lift(e):j.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Lt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new GEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new UEt(WEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new j(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new oa(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(66),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var EFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const gFe=Ut("IPeekViewService");au(gFe,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Ro;(function(u){u.inPeekEditor=new Pe("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Ro||(Ro={}));let oF=class{constructor(e,t){e instanceof Jm&&Ro.inPeekEditor.bindTo(t)}dispose(){}};oF.ID="editor.contrib.referenceController";oF=EFe([mFe(1,pt)],oF);fu(oF.ID,oF,0);function JEt(u){const e=u.get(Cu).getFocusedCodeEditor();return e instanceof Jm?e.getParentEditor():e}const ZEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let Ow=class extends qEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,NN(this.options,ZEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),xi(this._titleElement,"click",r=>this._onTitleClick(r))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");me(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new O0(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ro("peekview.close",v("label.close","Close"),st.asClassName(we.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:l0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Nr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,us(this._metaHeading)):Ya(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(66)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Ow=EFe([mFe(2,mt)],Ow);const YEt=q("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),fFe=q("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ml},v("peekViewTitleForeground","Color of the peek view title.")),pFe=q("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),QEt=q("peekView.border",{dark:Mo,light:Mo,hcDark:eu,hcLight:eu},v("peekViewBorder","Color of the peek view borders and arrow.")),XEt=q("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));q("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ml},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));q("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ml},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));q("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));q("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ml},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const RE=q("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));q("peekViewEditorGutter.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));q("peekViewEditorStickyScroll.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));q("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));q("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));q("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Zm{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=yG.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,I0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",I0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tmt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new j(i,s.startColumn,i,r),c=new j(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class sF{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ma}dispose(){Su(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",I0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,I0(this.uri),this.uri.fsPath)}resolve(e){return emt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tmt(n))}catch(n){zt(n)}return this})}}class cs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Q,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(cs._compareReferences);let i;for(const r of e)if((!i||!mn.isEqual(i.uri,r.uri,!0))&&(i=new sF(this,r.uri),this.groups.push(i)),i.children.length===0||cs._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Zm(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Su(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new cs(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:A3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&j.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return mn.compare(e.uri,t.uri)||j.compareRangesUsingStarts(e.range,t.range)}}var oR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sR=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$U;let KU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof cs||e instanceof sF}getChildren(e){if(e instanceof cs)return e.groups;if(e instanceof sF)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};KU=oR([sR(0,Vo)],KU);class umt{getHeight(){return 23}getTemplateId(e){return e instanceof sF?lF.id:NA.id}}let WU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Zm){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return I0(e.uri)}};WU=oR([sR(0,qu)],WU);class nmt{getId(e){return e instanceof Zm?e.id:e.uri}}let GU=class extends ne{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new kw(n,{supportHighlights:!0})),this.badge=new JG(me(n,ve(".count")),{},$be),e.appendChild(n)}set(e,t){const n=xP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};GU=oR([sR(1,cv)],GU);let lF=$U=class{constructor(e){this._instantiationService=e,this.templateId=$U.id}renderTemplate(e){return this._instantiationService.createInstance(GU,e)}renderElement(e,t,n){n.set(e.element,vA(e.filterData))}disposeTemplate(e){e.dispose()}};lF.id="FileReferencesRenderer";lF=$U=oR([sR(0,mt)],lF);class imt{constructor(e){this.label=new am(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${I0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Kc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,vA(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class NA{constructor(){this.templateId=NA.id}renderTemplate(e){return new imt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}NA.id="OneReferenceRenderer";class rmt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var amt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class lR{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new pe,this._callOnModelChange=new pe,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(smt,"ReferencesWidget",this._treeContainer,new umt,[this._instantiationService.createInstance(lF),this._instantiationService.createInstance(NA)],this._instantiationService.createInstance(KU),n),this._splitView.addView({onDidChange:Ne.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},xw.Distribute),this._splitView.addView({onDidChange:Ne.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},xw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Zm&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ya(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new pu(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),us(this._messageContainer),Promise.resolve(void 0)):(Ya(this._messageContainer),this._decorationsManager=new lR(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),us(this._treeContainer),us(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Zm)return e;if(e instanceof sF&&e.children.length>0)return e.children[0]}revealReference(e){return _le(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return _le(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ot.inMemory?this.setTitle(Ynt(e.uri),this._uriLabel.getUriLabel(xP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Su(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=j.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};UU=amt([sh(3,sr),sh(4,Vo),sh(5,mt),sh(6,gFe),sh(7,cv),sh(8,vP),sh(9,qu),sh(10,vn),sh(11,tn)],UU);var lmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},m8;const Hp=new Pe("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ym=m8=class{static get(e){return e.getContribution(m8.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new pe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Hp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",a=omt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(UU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new ee(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return Sle(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return Sle(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=j.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=m8.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,Ui(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,zt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Ym.ID="editor.contrib.referencesController";Ym=m8=lmt([xD(2,pt),xD(3,Cu),xD(4,bi),xD(5,mt),xD(6,Ul),xD(7,tu)],Ym);function Vp(u,e){const t=JEt(u);if(!t)return;const n=Ym.get(t);n&&e(n)}Po.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Vi(2089,60),when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Po.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!0)})}});Po.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!1)})}});ru.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ru.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ru.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ru.registerCommand("closeReferenceSearch",u=>Vp(u,e=>e.closeWidget()));Po.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:Ee.and(Ro.inPeekEditor,Ee.not("config.editor.stablePeek"))});Po.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:Ee.and(Hp,Ee.not("config.editor.stablePeek"))});Po.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(J0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.revealReference(n[0]))}});Po.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(J0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!0,!0))}});ru.registerCommand("openReference",u=>{var e;const n=(e=u.get(J0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!1,!0))});var DFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const ite=new Pe("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),cR=Ut("ISymbolNavigationService");let qU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ite.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new JU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(TX(d.uri,o.uri))l=!0,c=c||j.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Fl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:j.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};qU=DFe([Sb(0,pt),Sb(1,Cu),Sb(2,bi),Sb(3,qu)],qU);au(cR,qU,1);ze(new class extends xr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ite,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(cR).revealNext(e)}});Po.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ite,primary:9,handler(u){u.get(cR).reset()}});let JU=class{constructor(e){this._listener=new Map,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Su(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Fl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};JU=DFe([Sb(0,Cu)],JU);var rte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function PA(u,e,t,n){return rte(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Mi(s)})),a=yield Promise.all(r);return b1(a.flat())})}function dR(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function xFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function vFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function CFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function hR(u,e,t,n,i){return PA(e,t,u,(r,a,o)=>rte(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function RA(u){return rte(this,void 0,void 0,function*(){const e=yield u(),t=new cs(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}W1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=dR(n.definitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=CFe(n.typeDefinitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get(We),i=xFe(n.declarationProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeReferenceProvider",(u,e,t)=>{const n=u.get(We),i=hR(n.referenceProvider,e,t,!1,Kt.None);return RA(()=>i)});W1("_executeImplementationProvider",(u,e,t)=>{const n=u.get(We),i=vFe(n.implementationProvider,e,t,Kt.None);return RA(()=>i)});var _l=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},bC,kC,FC,T9,N9,P9,R9,I9;Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class bv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bv||ee.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class Ba extends hd{static all(){return Ba._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of $t.wrap(t.menu))(n.id===K.EditorContext||n.id===K.EditorContextPeek)&&(n.when=Ee.and(e.precondition,n.when));return t}constructor(e,t){super(Ba._patchConfig(t)),this.configuration=e,Ba._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(bi),a=e.get(Cu),o=e.get(Dg),s=e.get(cR),l=e.get(We),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=bv.is(n)?n:new bv(d,h),m=new Gm(t,5),g=YN(this._getLocationModel(l,E.model,E.position,m.token),m.token).then(f=>_l(this,void 0,void 0,function*(){var p;if(!f||m.token.isCancellationRequested)return;ga(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!Ba._activeAlternativeCommands.has(b)&&Ba._allSymbolNavigationCommands.has(b)&&(D=Ba._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=ls.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)Ba._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{Ba._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{m.dispose()});return o.showWhile(g,250),g}_onResult(e,t,n,i,r){return _l(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Jm)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return _l(this,void 0,void 0,function*(){let a;if(Eqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:j.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=Ym.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),Ui(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}Ba._allSymbolNavigationCommands=new Map;Ba._activeAlternativeCommands=new Set;class IA extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield dR(e.definitionProvider,t,n,i),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}gn((bC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bC.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:70,weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:2118,weight:100}],menu:[{id:K.EditorContext,group:"navigation",order:1.1},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ru.registerCommandAlias("editor.action.goToDeclaration",bC.id)}},bC.id="editor.action.revealDefinition",bC));gn((kC=class extends IA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:kC.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:Vi(2089,70),weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:Vi(2089,2118),weight:100}]}),ru.registerCommandAlias("editor.action.openDeclarationToTheSide",kC.id)}},kC.id="editor.action.revealDefinitionAside",kC));gn((FC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:FC.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Ee.and(W.hasDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:2}}),ru.registerCommandAlias("editor.action.previewDeclaration",FC.id)}},FC.id="editor.action.peekDefinition",FC));class bFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield xFe(e.declarationProvider,t,n,i),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}gn((T9=class extends bFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T9.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:Ee.and(W.hasDeclarationProvider,W.isInWalkThroughSnippet.toNegated()),menu:[{id:K.EditorContext,group:"navigation",order:1.3},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},T9.id="editor.action.revealDeclaration",T9));gn(class extends bFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Ee.and(W.hasDeclarationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:3}})}});class kFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield CFe(e.typeDefinitionProvider,t,n,i),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}gn((N9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:N9.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Ee.and(W.hasTypeDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:0,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.4},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},N9.ID="editor.action.goToTypeDefinition",N9));gn((P9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:P9.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Ee.and(W.hasTypeDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:4}})}},P9.ID="editor.action.peekTypeDefinition",P9));class FFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield vFe(e.implementationProvider,t,n,i),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}gn((R9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R9.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Ee.and(W.hasImplementationProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:2118,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},R9.ID="editor.action.goToImplementation",R9));gn((I9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:I9.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Ee.and(W.hasImplementationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:3142,weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:5}})}},I9.ID="editor.action.peekImplementation",I9));class yFe extends Ba{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:1094,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield hR(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(yield hR(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class cmt extends Ba{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Ee.and(Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new cs(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ru.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(u,e,t,n,i,r,a)=>_l(void 0,void 0,void 0,function*(){Ru(dt.isUri(e)),Ru(ee.isIPosition(t)),Ru(Array.isArray(n)),Ru(typeof i>"u"||typeof i=="string"),Ru(typeof a>"u"||typeof a=="boolean");const o=u.get(Cu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(M1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends cmt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});ru.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(u,e,t,n,i)=>_l(void 0,void 0,void 0,function*(){u.get(ni).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});ru.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Ru(dt.isUri(e)),Ru(ee.isIPosition(t));const n=u.get(We),i=u.get(Cu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!M1(r)||!r.hasModel())return;const a=Ym.get(r);if(!a)return;const o=Ui(l=>hR(n.referenceProvider,r.getModel(),ee.lift(t),!1,l).then(c=>new cs(c,v("ref.title","References")))),s=new j(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});ru.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var dmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ble=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Bb;let W3=Bb=class{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new pe,this.toUnhookForKeyboard=new pe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new rR(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,o??void 0)})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{zt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Bb.ID)}startFindDefinitionFromCursor(e){return Ble(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return Ble(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new Z2e(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ui(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){zt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?j.lift(r[0].originSelectionRange):new j(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=j.plusRange(o,s));this.addDecoration(o,new Zr().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new Zr().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=Bb.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(n);return new IA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(pt);return Ro.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};W3.ID="editor.contrib.gotodefinitionatposition";W3.MAX_SOURCE_PREVIEW_LINES=8;W3=Bb=dmt([_H(1,Vo),_H(2,vn),_H(3,We)],W3);fu(W3.ID,W3,2);const O9=ve;class AFe extends ne{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new EA(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class ate extends ne{static render(e,t,n){return new ate(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,O9("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,O9("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,O9(`span.icon.${t.iconClass}`));const i=me(this.action,O9("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function hmt(u,e){return u&&e?v("acessibleViewHint","Inspect this in the accessible view with {0}.",e):u?v("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mmt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let gmt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class _Fe extends ne{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=gZe(e=>this._computer.computeAsync(e)),Emt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mmt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){zt(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new gmt(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class SH{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class g8{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const $p=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ote{constructor(){this._onDidWillResize=new Q,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Q,this.onDidResize=this._onDidResize.event,this._sashListener=new pe,this._size=new pu(0,0),this._minSize=new pu(0,0),this._maxSize=new pu(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new oa(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new oa(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new oa(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pw.North}),this._southSash=new oa(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ne.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ne.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ne.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ne.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new pu(t,e);pu.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const fmt=30,pmt=24;class Dmt extends ne{constructor(e,t=new pu(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new ote),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=pu.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new pu(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?ee.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:ji(t).top+n.top-fmt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=ji(t),r=c6(t.ownerDocument.body),a=i.top+n.top+n.height;return r.height-a-pmt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(60).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var ste=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f8,Bd;const wle=ve;let jw=f8=class extends ne{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(lm,this._editor)),this._participants=[];for(const i of $p.getAll())this._participants.push(this._instantiationService.createInstance(i,this._editor));this._participants.sort((i,r)=>i.hoverOrdinal-r.hoverOrdinal),this._computer=new Vw(this._editor,this._participants),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const r=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new SFe(this._computer.anchor,r,i.isComplete))})),this._register(xi(this._widget.getDomNode(),"keydown",i=>{i.equals(9)&&this.hide()})),this._register(qn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new SH(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new SH(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(60).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=f8.computeHoverRanges(this._editor,e.range,t),a=new pe,o=a.add(new Hw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(m=>m.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:f8._DECORATION_OPTIONS}]),a.add(ft(()=>{h.clear()}))}this._widget.showAt(s,new vmt(l,n,i,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ee(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=j.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ee(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ee(r,a),highlightRange:o}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};jw._DECORATION_OPTIONS=Lt.register({description:"content-hover-highlight",className:"hoverHighlight"});jw=f8=ste([Wf(1,mt),Wf(2,qu)],jw);class SFe{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new xmt(this,this.anchor,t,this.isComplete)}}class xmt extends SFe{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class vmt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const Lle=30,BH=10,Cmt=6;let lm=Bd=class extends Dmt{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,i,r){const a=e.getOption(66)+8,o=150,s=new pu(o,a);super(e,s),this._configurationService=n,this._accessibilityService=i,this._keybindingService=r,this._hover=this._register(new AFe),this._minimumSize=s,this._hoverVisibleKey=W.hoverVisible.bindTo(t),this._hoverFocusedKey=W.hoverFocused.bindTo(t),me(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const l=this._register(y1(this._resizableNode.domNode));this._register(l.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(l.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Bd.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return Bd._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return Bd._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){Bd._applyMaxDimensions(this._hover.contentsDomNode,e,t),Bd._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-BH))}_updateResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new pu(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;Bd._lastDimensions=new pu(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Cmt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=BH),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=ji(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=zle(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=zle(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Bd._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Bd._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,i,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const o=Rf(this._hover.containerDomNode),s=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(o,s))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout();const l=hmt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(a=(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||r===void 0?void 0:r.getAriaLabel())!==null&&a!==void 0?a:"");l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new pu(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ko(n),Math.min(r,e)),this._setContentsDomNodeDimensions(ko(i),Math.min(r,e-BH))}setMinimumDimensions(e){this._minimumSize=new pu(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new pu(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=Rf(t),i=ko(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=Rf(t),i=ko(t),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=Rf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-Lle})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+Lle})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};lm.ID="editor.contrib.resizableContentHoverWidget";lm._lastDimensions=new pu(0,0);lm=Bd=ste([Wf(1,pt),Wf(2,tu),Wf(3,k4),Wf(4,qu)],lm);let Hw=class extends ne{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=wle("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,wle("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(ate.render(this.actionsElement,e,n))}append(e){const t=me(this.actionsElement,e);return this._hasContent=!0,t}};Hw=ste([Wf(0,qu)],Hw);class Vw{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return _i.EMPTY;const n=Vw._getLineDecorations(this._editor,t);return _i.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):_i.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Vw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return b1(t)}}function zle(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const Mle=ve;class bx extends ne{constructor(e,t,n){super(),this._renderDisposeables=this._register(new pe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new AFe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new h4({editor:this._editor},t,n)),this._computer=new bmt(this._editor),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return bx.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=Mle("div.hover-row.markdown-hover"),a=me(r,Mle("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(66),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}bx.ID="editor.contrib.modesGlyphHoverWidget";class bmt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||Ev(r)||n.push(...SQ(r).map(e))}return n}}var kmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fmt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function ymt(u,e,t,n,i){return kmt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&_mt(r))return new Fmt(u,r,e)}catch(r){Mi(r)}})}function lte(u,e,t,n){const r=u.ordered(e).map((a,o)=>ymt(a,o,e,t,n));return _i.fromPromises(r).coalesce()}function Amt(u,e,t,n){return lte(u,e,t,n).map(i=>i.hover).toPromise()}W1("_executeHoverProvider",(u,e,t)=>{const n=u.get(We);return Amt(n.hoverProvider,e,t,Kt.None)});function _mt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Smt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Tle=ve;class Sc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let $w=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new Sc(this,e.range,[new Zr().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new Sc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new Sc(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,o++));let E=!1;for(const m of t){const g=m.range.startLineNumber===i?m.range.startColumn:1,f=m.range.endLineNumber===i?m.range.endColumn:r,p=m.options.hoverMessage;if(!p||Ev(p))continue;m.options.beforeContentClassName&&(E=!0);const D=new j(e.range.startLineNumber,g,e.range.startLineNumber,f);a.push(new Sc(this,D,SQ(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return _i.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return _i.EMPTY;const r=new ee(e.range.startLineNumber,e.range.startColumn);return lte(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!Ev(a.hover.contents)).map(a=>{const o=a.hover.range?j.lift(a.hover.range):e.range;return new Sc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};$w=Smt([j9(1,vn),j9(2,vs),j9(3,tu),j9(4,We)],$w);function BFe(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new pe;for(const a of e)for(const o of a.contents){if(Ev(o))continue;const s=Tle("div.hover-row.markdown-hover"),l=me(s,Tle("div.hover-contents")),c=r.add(new h4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var wFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Nle{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let ZU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._dispoables=new pe,this._markers=[],this._nextIdx=-1,dt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=ok(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=j.compareRangesUsingStarts(o,s)||Yn.compare(o.severity,s.severity):l=Yn.compare(o.severity,s.severity)||j.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:dt.isUri(e)?e:void 0,severities:Yn.Error|Yn.Warning|Yn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Nle(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=X2(this._markers,{resource:e.uri},(a,o)=>ok(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XU;class wmt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new pe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(xi(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new dCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Su(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=F1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);Nr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(r.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const E=me(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(Nr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),pa(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const E of i){const m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,g.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(g,E);const f=document.createElement("span");f.innerText=E.message,m.appendChild(g),m.appendChild(f),this._lines+=1,h.appendChild(m)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Yn.Error:t=v("Error","Error");break;case Yn.Warning:t=v("Warning","Warning");break;case Yn.Info:t=v("Info","Info");break;case Yn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let kv=XU=class extends Ow{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new pe,this._onDidSelectRelatedInformation=new Q,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Yn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Tmt);let t=eq,n=Lmt;this._severity===Yn.Warning?(t=p8,n=zmt):this._severity===Yn.Info&&(t=tq,n=Mmt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(fFe),secondaryHeadingColor:e.getColor(pFe)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(XU.TitleMenu,this._contextKeyService);Wbe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,ve(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new wmt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=j.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(I0(o.uri),s)}this._icon.className=`codicon ${QU.className(Yn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};kv.TitleMenu=new K("gotoErrorTitleMenu");kv=XU=Bmt([vD(1,sr),vD(2,vs),vD(3,$1),vD(4,mt),vD(5,pt),vD(6,cv)],kv);const Ple=yk(n1,BXe),Rle=yk(js,kk),Ile=yk(Mo,Fk),eq=q("editorMarkerNavigationError.background",{dark:Ple,light:Ple,hcDark:eu,hcLight:eu},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lmt=q("editorMarkerNavigationError.headerBackground",{dark:tt(eq,.1),light:tt(eq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),p8=q("editorMarkerNavigationWarning.background",{dark:Rle,light:Rle,hcDark:eu,hcLight:eu},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),zmt=q("editorMarkerNavigationWarning.headerBackground",{dark:tt(p8,.1),light:tt(p8,.1),hcDark:"#0C141F",hcLight:tt(p8,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),tq=q("editorMarkerNavigationInfo.background",{dark:Ile,light:Ile,hcDark:eu,hcLight:eu},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Mmt=q("editorMarkerNavigationInfo.headerBackground",{dark:tt(tq,.1),light:tt(tq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Tmt=q("editorMarkerNavigation.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Nmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},wb;let Qm=wb=class{static get(e){return e.getContribution(wb.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new pe,this._editor=e,this._widgetVisible=MFe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(kv,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!j.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:j.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ee(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return zFe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=wb.get(a))===null||n===void 0||n.close(),(i=wb.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Qm.ID="editor.contrib.markerController";Qm=wb=Nmt([H9(1,LFe),H9(2,pt),H9(3,Cu),H9(4,mt)],Qm);class ER extends $e{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return zFe(this,void 0,void 0,function*(){t.hasModel()&&((n=Qm.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class cm extends ER{constructor(){super(!0,!1,{id:cm.ID,label:cm.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:578,weight:100},menuOpts:{menuId:kv.TitleMenu,title:cm.LABEL,icon:hi("marker-navigation-next",we.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}cm.ID="editor.action.marker.next";cm.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class c3 extends ER{constructor(){super(!1,!1,{id:c3.ID,label:c3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1602,weight:100},menuOpts:{menuId:kv.TitleMenu,title:c3.LABEL,icon:hi("marker-navigation-previous",we.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}c3.ID="editor.action.marker.prev";c3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Pmt extends ER{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:66,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Rmt extends ER{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1090,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fu(Qm.ID,Qm,4);be(cm);be(c3);be(Pmt);be(Rmt);const MFe=new Pe("markersNavigationVisible",!1),Imt=xr.bindToContribution(Qm.get);ze(new Imt({id:"closeMarkersNavigation",precondition:MFe,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:W.focus,primary:9,secondary:[1033]}}));var Omt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const el=ve;class jmt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Ole={type:1,filter:{include:gt.QuickFix},triggerAction:gs.QuickFixHover};let uq=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new j(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new jmt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ne.None;const n=new pe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Yn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=el("div.hover-row"),i=me(n,el("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=me(i,el("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=el("span");if(r){const m=me(c,el("span"));m.innerText=r}const d=me(c,el("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));const h=me(d,el("span"));h.innerText=o.value;const E=me(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=me(i,el("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(pa(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const m=me(i,el("div"));m.style.marginTop="8px";const g=me(m,el("a"));g.innerText=`${I0(d)}(${h}, ${E}): `,g.style.cursor="pointer",t.add(ce(g,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(zt)}));const f=me(m,el("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Yn.Error||t.marker.severity===Yn.Warning||t.marker.severity===Yn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:cm.ID,run:()=>{var i;e.hide(),(i=Qm.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const i=e.statusBar.append(el("div"));this.recentMarkerCodeActionsInfo&&(gw.makeKey(this.recentMarkerCodeActionsInfo.marker)===gw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ne.None:n.add(Rm(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(ft(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(ft(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Qee,run:l=>{s=!0;const c=Um.get(this._editor),d=ji(l);e.hide(),c==null||c.showCodeActions(Ole,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},zt)}}getCodeActions(e){return Ui(t=>p2(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Ole,Yh.None,t))}};uq=Omt([wH(1,mX),wH(2,vs),wH(3,We)],uq);const TFe="editor.action.inlineSuggest.commit",NFe="editor.action.inlineSuggest.showPrevious",PFe="editor.action.inlineSuggest.showNext";var Hmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Vmt extends ne{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $Ue),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new pe),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new cF(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new O0(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(i,r)=>{var a;if(i.id===cF.ID)return this.toggleMenuActionViewItem=new sw(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:st.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:we.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof Zx){const o=new sw(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n,i;const r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(i=r==null?void 0:r.getLabel())!==null&&i!==void 0?i:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class cF extends ro{constructor(e,t){t=t||v("moreActions","More Actions..."),super(cF.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hmt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}cF.ID="toolbar.toggle.more";var $mt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let nq=class extends Vmt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new pe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;Ef==null?void 0:f.id)),m=this._options.overflowBehavior.maxItems-E.size;let g=0;for(let f=0;f=m&&(o[f]=void 0,d[f]=p))}}Kre(o),Kre(d),super.setActions(o,Dr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var m,g,f,p,D;const x=new D0(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>F,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};nq=$mt([yC(2,$1),yC(3,pt),yC(4,Wl),yC(5,qu),yC(6,n0)],nq);var cte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Bc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},D8;let iq=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=uu(this,i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ee(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Xo((i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Xm,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(ft(()=>e.removeContentWidget(o))),r.add(Xu(s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==qh.Explicit&&a.triggerExplicitly()}))}))}};iq=cte([Bc(2,mt)],iq);const Kmt=hi("inline-suggestion-hints-next",we.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Wmt=hi("inline-suggestion-hints-previous",we.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Xm=D8=class extends ne{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new ro(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${D8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=yr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[yr("div@toolBar")]),this.previousAction=this.createCommandAction(NFe,v("previous","Previous"),st.asClassName(Wmt)),this.availableSuggestionCountAction=new ro("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(PFe,v("next","Next"),st.asClassName(Kmt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(K.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(s.createInstance(rq,this.nodes.toolBar,K.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,E)=>{if(h instanceof zl)return s.createInstance(Umt,h,void 0);if(h===this.availableSuggestionCountAction){const m=new Gmt(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{D8._dropDownVisible=h})),this._register(Xu(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(Xu(h=>{const E=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);E!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${E}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),E!==void 0&&E>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Xu(h=>{const E=this._extraCommands.read(h);if(di(this.lastCommands,E))return;this.lastCommands=E;const m=E.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:f=>this._commandService.executeCommand(g.id)}));for(const[g,f]of this.inlineCompletionsActionsMenus.getActions())for(const p of f)p instanceof zl&&m.push(p);m.length>0&&m.unshift(new Dr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Xm._dropDownVisible=!1;Xm.id=0;Xm=D8=cte([Bc(6,ni),Bc(7,mt),Bc(8,qu),Bc(9,pt),Bc(10,$1)],Xm);class Gmt extends mv{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Umt=class extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=yr("div.keybinding").root;new FA(t,Is,Object.assign({disableTitle:!0},Tlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},rq=class extends nq{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];Wbe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),s.unshift(...this.prependedPrimaryActions),this.setActions(s,l)}setPrependedPrimaryActions(e){di(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){di(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};rq=cte([Bc(3,$1),Bc(4,pt),Bc(5,Wl),Bc(6,qu),Bc(7,n0)],rq);var qmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},V9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},aq;const Jmt=!1;let Io=aq=class extends ne{static get(e){return e.getContribution(aq.ID)}constructor(e,t,n,i,r){super(),this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new pe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Hu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===lm.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===bx.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_isMouseOverWidget(e){var t,n,i,r,a;const o=e.target;return!!(this._isHoverSticky&&o.type===9&&o.detail===lm.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((r=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||r===void 0)&&r.isCollapsed)||!this._isHoverSticky&&o.type===9&&o.detail===lm.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible)||this._isHoverSticky&&o.type===12&&o.detail===bx.ID)}_onEditorMouseMove(e){var t,n,i,r;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((r=this._contentWidget)===null||r===void 0)&&r.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,n,i;if(!e)return;const r=e.target,a=(t=r.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),o=this._editor.getOption(146);if(a&&(o==="click"&&!this._hoverActivatedByColorDecoratorClick||o==="hover"&&!this._isHoverEnabled&&!Jmt||o==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!a&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(n=this._glyphWidget)===null||n===void 0||n.hide();return}if(r.type===2&&r.position){(i=this._contentWidget)===null||i===void 0||i.hide(),this._glyphWidget||(this._glyphWidget=new bx(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(r.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Xm.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(jw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Io.ID="editor.contrib.hover";Io=aq=qmt([V9(1,mt),V9(2,vs),V9(3,vn),V9(4,qu)],Io);class Zmt extends $e{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const i=Io.get(t);if(!i)return;const r=t.getPosition(),a=new j(r.lineNumber,r.column,r.lineNumber,r.column),o=t.getOption(2)===2||!!(n!=null&&n.focus);i.isHoverVisible?i.focus():i.showContentHover(a,1,1,o)}}class Ymt extends $e{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const n=Io.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new j(i.lineNumber,i.column,i.lineNumber,i.column),a=W3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qmt extends $e{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:16,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollUp()}}class Xmt extends $e{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:18,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollDown()}}class egt extends $e{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:15,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollLeft()}}class tgt extends $e{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:17,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollRight()}}class ugt extends $e{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageUp()}}class ngt extends $e{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageDown()}}class igt extends $e{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToTop()}}class rgt extends $e{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToBottom()}}fu(Io.ID,Io,2);be(Zmt);be(Ymt);be(Qmt);be(Xmt);be(egt);be(tgt);be(ugt);be(ngt);be(igt);be(rgt);$p.register($w);$p.register(uq);Kl((u,e)=>{const t=u.getColor(KXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class oq extends ne{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==aFe||!n.range)return;const i=this._editor.getContribution(Io.ID);if(i&&!i.isColorPickerVisible){const r=new j(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}oq.ID="editor.contrib.colorContribution";fu(oq.ID,oq,2);$p.register(Iw);var RFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},jle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},sq,lq;let eg=sq=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=W.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=W.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ww(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(sq.ID)}};eg.ID="editor.contrib.standaloneColorPickerController";eg=sq=RFe([Cc(1,pt),Cc(2,_n),Cc(3,qu),Cc(4,mt),Cc(5,We),Cc(6,tn)],eg);fu(eg.ID,eg,1);const Hle=8,agt=22;let Ww=lq=class extends ne{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(aF,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(y1(this._body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var m;const g=(m=E.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return lq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return jle(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new ogt(t.result,t.foundInEditor))})}_computeAsync(e){return jle(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new ute(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new Hw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:g=>r=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-agt-Hle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+Hle+"px";const E=d.originalColorNode;E.style.width=l+"px";const m=r.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ww.ID="editor.contrib.standaloneColorPickerWidget";Ww=lq=RFe([Cc(3,mt),Cc(4,_n),Cc(5,qu),Cc(6,We),Cc(7,tn)],Ww);class ogt{constructor(e,t){this.value=e,this.foundInEditor=t}}class sgt extends hd{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=eg.get(t))===null||n===void 0||n.showOrFocus()}}class lgt extends $e{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:W.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.hide()}}class cgt extends $e{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:W.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.insertColor()}}be(lgt);be(cgt);gn(sgt);class IE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),m=h.indexOf(n,c-1-n.length);if(E!==-1&&m!==-1)if(o===l)d.substring(E+t.length,m).indexOf(n)>=0&&(E=-1,m=-1);else{const f=d.substring(E+t.length),p=h.substring(0,m);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,m=-1)}let g;E!==-1&&m!==-1?(i&&E+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=IE._createRemoveBlockCommentOperations(new j(o,E+t.length+1,l,m+1),t,n)):(g=IE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(const f of g)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return j.isEmpty(e)?i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(yn.delete(new j(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return j.isEmpty(e)?r.push(yn.replace(new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(yn.insert(new ee(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(yn.insert(new ee(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ye(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ye(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class ph{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;l{if(e&&typeof e=="object"||typeof e=="function")for(let i of r4t(e))!a4t.call(u,i)&&i!==t&&n4t(u,i,{get:()=>e[i],enumerable:!(n=i4t(e,i))||n.enumerable});return u},o4t=(u,e,t)=>(Ele(u,e,"default"),t&&Ele(t,e,"default")),s4t="5.0.2",xv={};o4t(xv,BA);var yke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(yke||{}),Ake=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Ake||{}),_ke=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(_ke||{}),Ske=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(Ske||{}),Bke=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(Bke||{}),wke=class{constructor(u,e,t,n,i){kn(this,"_onDidChange",new xv.Emitter);kn(this,"_onDidExtraLibsChange",new xv.Emitter);kn(this,"_extraLibs");kn(this,"_removedExtraLibs");kn(this,"_eagerModelSync");kn(this,"_compilerOptions");kn(this,"_diagnosticsOptions");kn(this,"_workerOptions");kn(this,"_onDidExtraLibsChangeTimeout");kn(this,"_inlayHintsOptions");kn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},l4t=s4t,Lke={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},zke=new wke({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),Mke=new wke({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),c4t=()=>eR().then(u=>u.getTypeScriptWorker()),d4t=()=>eR().then(u=>u.getJavaScriptWorker());xv.languages.typescript={ModuleKind:yke,JsxEmit:Ake,NewLineKind:_ke,ScriptTarget:Ske,ModuleResolutionKind:Bke,typescriptVersion:l4t,typescriptDefaults:zke,javascriptDefaults:Mke,getTypeScriptWorker:c4t,getJavaScriptWorker:d4t};function eR(){return Te(()=>import("./tsMode-07ff9492.js"),[],import.meta.url)}xv.languages.onLanguage("typescript",()=>eR().then(u=>u.setupTypeScript(zke)));xv.languages.onLanguage("javascript",()=>eR().then(u=>u.setupJavaScript(Mke)));class h4t extends n0{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:v("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:we.map,toggled:Ee.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Ee.has("isInDiffEditor"),menu:{when:Ee.has("isInDiffEditor"),id:K.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}gn(h4t);class Tke extends n0{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:v("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}gn(Tke);class Nke extends n0{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:v("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}gn(Nke);Lr.appendMenuItem(K.EditorTitle,{command:{id:new Nke().desc.id,title:v("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Ee.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Ee.has("isInDiffEditor")},order:11,group:"1_diff",when:Ee.and(W.diffEditorRenderSideBySideInlineBreakpointReached,Ee.has("isInDiffEditor"))});Lr.appendMenuItem(K.EditorTitle,{command:{id:new Tke().desc.id,title:v("showMoves","Show Moved Code Blocks"),icon:we.move,toggled:l6.create("config.diffEditor.experimental.showMoves",!0),precondition:Ee.has("isInDiffEditor")},order:10,group:"1_diff",when:Ee.has("isInDiffEditor")});const tR={value:v("diffEditor","Diff Editor"),original:"Diff Editor"};class E4t extends hd{constructor(){super({id:"diffEditor.switchSide",title:{value:v("switchSide","Switch Side"),original:"Switch Side"},icon:we.arrowSwap,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,n){const i=b6(e);if(i instanceof O3){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}gn(E4t);class m4t extends hd{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:v("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:we.close,precondition:W.comparingMovedCode,f1:!1,category:tR,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.exitCompareMove()}}gn(m4t);class g4t extends hd{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:v("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:we.fold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.collapseAllUnchangedRegions()}}gn(g4t);class f4t extends hd{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:v("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:we.unfold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.showAllUnchangedRegions()}}gn(f4t);const Pke={value:v("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class C6 extends n0{constructor(){super({id:C6.id,title:{value:v("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerNext()}}C6.id="editor.action.accessibleDiffViewer.next";Lr.appendMenuItem(K.EditorTitle,{command:{id:C6.id,title:v("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Ee.has("isInDiffEditor")},order:10,group:"2_diff",when:Ee.and(W.accessibleDiffViewerVisible.negate(),Ee.has("isInDiffEditor"))});class LA extends n0{constructor(){super({id:LA.id,title:{value:v("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerPrev()}}LA.id="editor.action.accessibleDiffViewer.prev";function b6(u){var e;const t=u.get(Cu),n=t.listDiffEditors(),i=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!i)return null;for(let a=0,o=n.length;a=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},x4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},LU;const nR=new Pe("selectionAnchorSet",!1);let d4=LU=class{static get(e){return e.getContribution(LU.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=nR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Zr().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ga(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};d4.ID="editor.contrib.selectionAnchorController";d4=LU=D4t([x4t(1,pt)],d4);class v4t extends $e{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2080),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class C4t extends $e{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:nR})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class b4t extends $e{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2089),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class k4t extends $e{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}fu(d4.ID,d4,4);be(v4t);be(C4t);be(b4t);be(k4t);const F4t=q("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y4t extends $e{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.jumpToBracket()}}class A4t extends $e{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=Al.get(t))===null||i===void 0||i.selectToBracket(r)}}class _4t extends $e{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class S4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class Al extends ne{static get(e){return e.getContribution(Al.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ye(a.lineNumber,a.column,a.lineNumber,a.column):new Ye(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(j.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ye(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ee.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(z4t);var M4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const H3="9_cutcopypaste",T4t=Oc||document.queryCommandSupported("cut"),Ike=Oc||document.queryCommandSupported("copy"),N4t=typeof navigator.clipboard>"u"||T0?document.queryCommandSupported("paste"):!0;function Yee(u){return u.register(),u}const P4t=T4t?Yee(new d6({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Oc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1}]})):void 0,R4t=Ike?Yee(new d6({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Oc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Lr.appendMenuItem(K.MenubarEditMenu,{submenu:K.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:H3,order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:Ee.and(Ee.notEquals("resourceScheme","output"),W.editorTextFocus)});Lr.appendMenuItem(K.EditorTitleContext,{submenu:K.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});Lr.appendMenuItem(K.ExplorerContext,{submenu:K.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const CH=N4t?Yee(new d6({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Oc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4}]})):void 0;class I4t extends $e{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(PW.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),PW.forceCopyWithSyntaxHighlighting=!1)}}function Oke(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(Cu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(37),a=i.getSelection();return a&&a.isEmpty()&&!r||i.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(JN().execCommand(e),!0)))}Oke(P4t,"cut");Oke(R4t,"copy");CH&&(CH.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(Cu),n=u.get(_4),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!i.getContainerDomNode().ownerDocument.execCommand("paste")&&dg?(()=>M4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=Sk.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(37)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),CH.addImplementation(0,"generic-dom",(u,e)=>(JN().execCommand("paste"),!0)));Ike&&be(I4t);var O4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let gt=class c8{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+c8.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new c8(this.value+c8.sep+e)}};gt.sep=".";gt.None=new gt("@@none@@");gt.Empty=new gt("");gt.QuickFix=new gt("quickfix");gt.Refactor=new gt("refactor");gt.RefactorExtract=gt.Refactor.append("extract");gt.RefactorInline=gt.Refactor.append("inline");gt.RefactorMove=gt.Refactor.append("move");gt.RefactorRewrite=gt.Refactor.append("rewrite");gt.Notebook=new gt("notebook");gt.Source=new gt("source");gt.SourceOrganizeImports=gt.Source.append("organizeImports");gt.SourceFixAll=gt.Source.append("fixAll");gt.SurroundWith=gt.Refactor.append("surround");var fs;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(fs||(fs={}));function j4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>jke(e,t,u.include))||!u.includeSourceActions&>.Source.contains(e))}function H4t(u,e){const t=e.kind?new gt(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>jke(t,n,u.include))||!u.includeSourceActions&&t&>.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function jke(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Zd{static fromUser(e,t){return!e||typeof e!="object"?new Zd(t.kind,t.apply,!1):new Zd(Zd.getKindFromUser(e,t.kind),Zd.getApplyFromUser(e,t.apply),Zd.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new gt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class V4t{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}resolve(e){var t;return O4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Mi(i)}n&&(this.action.edit=n.edit)}return this})}}var Nw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Hke="editor.action.codeAction",Qee="editor.action.quickFix",Vke="editor.action.autoFix",$ke="editor.action.refactor",Kke="editor.action.sourceAction",Xee="editor.action.organizeImports",ete="editor.action.fixAll";class f2 extends ne{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return pa(e.diagnostics)?pa(t.diagnostics)?f2.codeActionsPreferredComparator(e,t):-1:pa(t.diagnostics)?1:f2.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(f2.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&>.QuickFix.contains(new gt(e.kind))&&!!e.isPreferred)}}const mle={actions:[],documentation:void 0};function p2(u,e,t,n,i,r){var a;return Nw(this,void 0,void 0,function*(){const o=n.filter||{},s=Object.assign(Object.assign({},o),{excludes:[...o.excludes||[],gt.Notebook]}),l={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},c=new Wee(e,r),d=n.type===2,h=$4t(u,e,d?s:o),E=new pe,m=h.map(f=>Nw(this,void 0,void 0,function*(){try{i.report(f);const p=yield f.provideCodeActions(e,t,l,c.token);if(p&&E.add(p),c.token.isCancellationRequested)return mle;const D=((p==null?void 0:p.actions)||[]).filter(b=>b&&H4t(o,b)),x=W4t(f,D,o.include);return{actions:D.map(b=>new V4t(b,f)),documentation:x}}catch(p){if(dd(p))throw p;return Mi(p),mle}})),g=u.onDidChange(()=>{const f=u.all(e);di(f,h)||c.cancel()});try{const f=yield Promise.all(m),p=f.map(x=>x.actions).flat(),D=[...b1(f.map(x=>x.documentation)),...K4t(u,e,n,p)];return new f2(p,D,E)}finally{g.dispose(),c.dispose()}})}function $4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>j4t(t,new gt(i))):!0)}function*K4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function W4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new gt(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new gt(i.kind)))return r.command}}var Pw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(Pw||(Pw={}));function G4t(u,e,t,n,i=Kt.None){var r;return Nw(this,void 0,void 0,function*(){const a=u.get(xA),o=u.get(ni),s=u.get(i0),l=u.get(bi);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Pw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=U4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function U4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}ru.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return Nw(this,void 0,void 0,function*(){if(!(e instanceof dt))throw _0();const{codeActionProvider:r}=u.get(We),a=u.get(_n).getModel(e);if(!a)throw _0();const o=Ye.isISelection(t)?Ye.liftSelection(t):j.isIRange(t)?a.validateRange(t):void 0;if(!o)throw _0();const s=typeof n=="string"?new gt(n):void 0,l=yield p2(r,a,o,{type:1,triggerAction:fs.Default,filter:{includeSourceActions:!0,include:s}},Yh.None,Kt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zU;let Rw=zU=class{constructor(e){this.keybindingService=e}getResolver(){const e=new mg(()=>this.keybindingService.getKeybindings().filter(t=>zU.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===Xee?n={kind:gt.SourceOrganizeImports.value}:t.command===ete&&(n={kind:gt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Zd.fromUser(n,{kind:gt.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new gt(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};Rw.codeActionCommands=[$ke,Hke,Kke,Xee,ete];Rw=zU=q4t([J4t(0,qu)],Rw);q("symbolIcon.arrayForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.booleanForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.colorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constantForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fileForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.folderForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keywordForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.moduleForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.namespaceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.nullForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.numberForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.objectForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.operatorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.packageForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.propertyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.referenceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.snippetForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.stringForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.structForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.textForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.typeParameterForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.unitForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const Wke=Object.freeze({kind:gt.Empty,title:v("codeAction.widget.id.more","More Actions...")}),Z4t=Object.freeze([{kind:gt.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix")},{kind:gt.RefactorExtract,title:v("codeAction.widget.id.extract","Extract"),icon:we.wrench},{kind:gt.RefactorInline,title:v("codeAction.widget.id.inline","Inline"),icon:we.wrench},{kind:gt.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite"),icon:we.wrench},{kind:gt.RefactorMove,title:v("codeAction.widget.id.move","Move"),icon:we.wrench},{kind:gt.SurroundWith,title:v("codeAction.widget.id.surround","Surround With"),icon:we.symbolSnippet},{kind:gt.Source,title:v("codeAction.widget.id.source","Source Action"),icon:we.symbolFile},Wke]);function Y4t(u,e,t){if(!e)return u.map(r=>{var a;return{kind:"action",item:r,group:Wke,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!(!((a=r.action.edit)===null||a===void 0)&&a.edits.length)}});const n=Z4t.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new gt(r.action.kind):gt.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},MU,S5;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(S5||(S5={}));let V3=MU=class extends ne{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Q),this.onClick=this._onClick.event,this._state=S5.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Zu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(WJe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=ji(this._domNode),a=this._editor.getOption(66);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(Ne.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i,r,a;this._preferredKbLabel=(i=(n=t.lookupKeybinding(Vke))===null||n===void 0?void 0:n.getLabel())!==null&&i!==void 0?i:void 0,this._quickFixKbLabel=(a=(r=t.lookupKeybinding(Qee))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(64).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(50),c=r.getLineContent(a),d=pP(c,s),h=l.spaceWidth*d>22,E=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1);let m=a;if(!h){if(a>1&&!E(a-1))m-=1;else if(!E(a+1))m+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new S5.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:MU._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==S5.Hidden&&(this.state=S5.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...st.asClassNameArray(we.lightBulb)),this._domNode.classList.add(...st.asClassNameArray(we.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...st.asClassNameArray(we.lightbulbAutofix)),this._domNode.classList.add(...st.asClassNameArray(we.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};V3.ID="editor.contrib.lightbulbWidget";V3._posPref=[0];V3=MU=Q4t([X4t(1,qu)],V3);var eEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},gle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gke=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},TU;let h4=TU=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Q,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new pe,r=i.add(BP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>Gke(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ws);const l=yield Frt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=TU._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(50);ea(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Uke(this._openerService,n,e.isTrusted),disposables:t}}}};h4._ttpTokenizer=b4("tokenizeToString",{createHTML(u){return u}});h4=TU=eEt([gle(1,vn),gle(2,Cs)],h4);function Uke(u,e,t){return Gke(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:tEt(t)})}catch(n){return zt(n),!1}})}function tEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},d8;let cs=d8=class{static get(e){return e.getContribution(d8.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Ir,this._messageListeners=new pe,this._mouseOverMessage=!1,this._editor=e,this._visible=d8.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ga(nm(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=nm(e)?BP(e,{actionHandler:{callback:i=>Uke(this._openerService,i,nm(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new ple(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ne.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qr(yl(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new j(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ple.fadeOut(this._messageWidget.value))}};cs.ID="editor.contrib.messageController";cs.MESSAGE_VISIBLE=new Pe("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));cs=d8=uEt([fle(1,pt),fle(2,Cs)],cs);const nEt=xr.bindToContribution(cs.get);ze(new nEt({id:"leaveEditorMessage",precondition:cs.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let ple=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fu(cs.ID,cs,4);var qke=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},NU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Jke="acceptSelectedCodeAction",Zke="previewSelectedCodeAction";class rEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let PU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new FA(e,Os);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=st.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Re(e.group.icon.color.id))):(n.icon.className=st.asClassName(we.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Yke(e.label),n.keybinding.set(e.keybinding),uZe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(Jke))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(Zke))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview&&e.canPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};PU=qke([NU(1,qu)],PU);class aEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Dle extends UIEvent{constructor(){super("previewSelectedAction")}}function oEt(u){if(u.kind==="action")return u.label}let RU=class extends ne{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new vi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Gl(e,this.domNode,o,[new PU(t,this._keybindingService),new rEt],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:oEt},accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?Yke(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Tp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new Dle:new aEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Dle):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,r.item)}onListHover(e){return iEt(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};RU=qke([NU(4,F4),NU(5,qu)],RU);function Yke(u){return u.replace(/\r\n|\r|\n/g," ")}var sEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};q("actionBar.toggledBackground",{dark:If,light:If,hcDark:If,hcLight:If},v("actionBar.toggledBackground","Background color for toggled action items in action bar."));const $3={Visible:new Pe("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},Op=Ut("actionWidgetService");let K3=class extends ne{get isVisible(){return $3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Ir)}show(e,t,n,i,r,a,o){const s=$3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(RU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new pe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const m=this._createActionBar(".action-widget-action-bar",n);m&&(r.appendChild(m.getContainer().parentElement),a.add(m),d=m.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(y1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new j0(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};K3=sEt([bH(0,F4),bH(1,pt),bH(2,mt)],K3);au(Op,K3,1);const zA=100+1e3;gn(class extends n0{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$3.Visible,keybinding:{weight:zA,primary:9,secondary:[1033]}})}run(u){u.get(Op).hide()}});gn(class extends n0{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$3.Visible,keybinding:{weight:zA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusPrevious()}});gn(class extends n0{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$3.Visible,keybinding:{weight:zA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusNext()}});gn(class extends n0{constructor(){super({id:Jke,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:3,secondary:[2137]}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected()}});gn(class extends n0{constructor(){super({id:Zke,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:2051}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected(!0)}});var lEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Qke=new Pe("supportedCodeAction","");class cEt extends ne{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Vl),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>TX(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:fs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Bf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(dd(a))return Xke;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(Bf||(Bf={}));const Xke=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class dEt extends ne{constructor(e,t,n,i,r,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=a,this._codeActionOracle=this._register(new Ir),this._state=Bf.Empty,this._onDidChangeState=this._register(new Q),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=Qke.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Bf.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Bf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new cEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(Bf.Empty);return}const r=n.selection.getStartPosition(),a=Ui(o=>lEt(this,void 0,void 0,function*(){var s,l,c,d,h,E;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===fs.QuickFix||!((l=(s=n.trigger.filter)===null||s===void 0?void 0:s.include)===null||l===void 0)&&l.contains(gt.QuickFix))){const m=yield p2(this._registry,e,n.selection,n.trigger,Yh.None,o);if(o.isCancellationRequested)return Xke;if(!((c=m.validActions)===null||c===void 0?void 0:c.some(f=>f.action.kind?gt.QuickFix.contains(new gt(f.action.kind)):!1))){const f=this._markerService.read({resource:e.uri});if(f.length>0){const p=n.selection.getPosition();let D=p,x=Number.MAX_VALUE,b=!1;for(const k of f){const A=k.endColumn,F=k.endLineNumber,S=k.startLineNumber;(F===p.lineNumber||S===p.lineNumber)&&Math.abs(p.column-A){w.highlightRange=w.action.isPreferred}),S.push(...F.validActions)),{validActions:S,allActions:m.allActions,documentation:m.documentation,hasAutoFix:m.hasAutoFix,dispose:()=>{m.dispose()}}}}}}return p2(this._registry,e,n.selection,n.trigger,Yh.None,o)}));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(a,250)),this.setState(new Bf.Triggered(n.trigger,r,a))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var hEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ah=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},h8;const EEt="quickfix-edit-highlight";let Um=h8=class extends ne{static get(e){return e.getContribution(h8.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Ir),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new dEt(this._editor,r.codeActionProvider,t,n,a,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new mg(()=>{const d=this._editor.getContribution(V3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(Rw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=cs.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return vC(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(G4t,e,Pw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fs.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return vC(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){zt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=cs.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=cs.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return vC(this,void 0,void 0,function*(){const i=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const a=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!a.length)return;const o=ee.isIPosition(t)?this.toCoords(t):t,s={onSelect:(l,c)=>vC(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide(),i.clear()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus(),i.clear()},onHover:(l,c)=>vC(this,void 0,void 0,function*(){var d;if(yield l.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((d=l.action.edit)===null||d===void 0)&&d.edits.length)}}),onFocus:l=>{var c,d;if(l&&l.highlightRange&&l.action.diagnostics){const h=[{range:l.action.diagnostics[0],options:h8.DECORATION}];i.set(h);const E=l.action.diagnostics[0],m=(d=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:E.startLineNumber,column:E.startColumn}))===null||d===void 0?void 0:d.word;jm(v("editingNewSelection","Context: {0} at line {1} and column {2}.",m,E.startLineNumber,E.startColumn))}else i.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Y4t(a,this._shouldShowHeaders(),this._resolver.getResolver()),s,o,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=ji(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};Um.ID="editor.contrib.codeActionController";Um.DECORATION=Lt.register({description:"quickfix-highlight",className:EEt});Um=h8=hEt([ah(1,G1),ah(2,pt),ah(3,mt),ah(4,We),ah(5,Dg),ah(6,ni),ah(7,tu),ah(8,Op),ah(9,mt)],Um);Kl((u,e)=>{((i,r)=>{r&&e.addRule(`.monaco-editor ${i} { background-color: ${r}; }`)})(".quickfix-edit-highlight",u.getColor(a1));const n=u.getColor(LE);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${$c(u.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function MA(u){return Ee.regex(Qke.keys()[0],new RegExp("(\\s|^)"+Js(u.value)+"\\b"))}const tte={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function jp(u,e,t,n,i=fs.Default){if(u.hasModel()){const r=Um.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends $e{constructor(){super({id:Qee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:2137,weight:100}})}run(e,t){return jp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,fs.QuickFix)}}class gEt extends xr{constructor(){super({id:Hke,precondition:Ee.and(W.writable,W.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tte}]}})}runEditorCommand(e,t,n){const i=Zd.fromUser(n,{kind:gt.Empty,apply:"ifSingle"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class fEt extends $e{constructor(){super({id:$ke,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Ee.and(W.writable,MA(gt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Refactor,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:gt.Refactor.contains(i.kind)?i.kind:gt.None,onlyIncludePreferredActions:i.preferred},i.apply,fs.Refactor)}}class pEt extends $e{constructor(){super({id:Kke,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Ee.and(W.writable,MA(gt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Source,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:gt.Source.contains(i.kind)?i.kind:gt.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,fs.SourceAction)}}class DEt extends $e{constructor(){super({id:Xee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Ee.and(W.writable,MA(gt.SourceOrganizeImports)),kbOpts:{kbExpr:W.textInputFocus,primary:1581,weight:100}})}run(e,t){return jp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:gt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fs.OrganizeImports)}}class xEt extends $e{constructor(){super({id:ete,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:Ee.and(W.writable,MA(gt.SourceFixAll))})}run(e,t){return jp(t,v("fixAll.noneMessage","No fix all action available"),{include:gt.SourceFixAll,includeSourceActions:!0},"ifSingle",fs.FixAll)}}class vEt extends $e{constructor(){super({id:Vke,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Ee.and(W.writable,MA(gt.QuickFix)),kbOpts:{kbExpr:W.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return jp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:gt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fs.AutoFix)}}fu(Um.ID,Um,3);fu(V3.ID,V3,4);be(mEt);be(fEt);be(pEt);be(DEt);be(vEt);be(xEt);ze(new gEt);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:v("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var xle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class IU{constructor(){this.lenses=[],this._disposables=new pe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function eFe(u,e,t){return xle(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new IU,a=n.map((o,s)=>xle(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Mi(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}ru.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Ru(dt.isUri(t)),Ru(typeof n=="number"||!n);const{codeLensProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)throw _0();const a=[],o=new pe;return eFe(i,r,Kt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Kt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var CEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tFe=Ut("ICodeLensCache");class vle{constructor(e,t){this.lineCount=e,this.data=t}}let OU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new gg(20,.75);const t="codelens/cache";Ph(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),Ne.once(e.onWillSaveState)(r=>{r.reason===lw.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new IU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new vle(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new j(o,1,o,11)});const a=new IU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new vle(i.lineCount,a))}}catch{}}};OU=CEt([bEt(0,Ul)],OU);au(tFe,OU,1);class kEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iR{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iR._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:Cle},d=>this._decorationIds[c]=d),o?o=j.plusRange(o,l.symbol.range):o=j.lift(l.symbol.range)}),this._viewZone=new kEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iR(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&j.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:Cle},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},CC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new pe,this._localToDispose=new pe,this._lenses=[],this._oldCodeLensModels=new pe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(50)||o.hasChanged(19)||o.hasChanged(18))&&this._updateLensStyle(),o.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),i=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",ss.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Rm(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=Ui(a=>eFe(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},zt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new kH;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ft(()=>{if(this._editor.getModel()){const i=td.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new kH;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=td.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new kH;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=Ui(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,m)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(g=>{d[m]=g},Mi):(d[m]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{zt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return uFe(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};vv.ID="css.editor.codeLens";vv=FEt([CC(1,We),CC(2,q0),CC(3,ni),CC(4,bi),CC(5,tFe)],vv);fu(vv.ID,vv,1);be(class extends $e{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:W.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return uFe(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(md),i=e.get(ni),r=e.get(bi),a=t.getSelection().positionLineNumber,o=t.getContribution(vv.ID);if(!o)return;const s=yield o.getModel();if(!s)return;const l=[];for(const h of s.lenses)h.symbol.command&&h.symbol.range.startLineNumber===a&&l.push({label:h.symbol.command.title,command:h.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1,placeHolder:v("placeHolder","Select a command")});if(!c)return;let d=c.command;if(s.isDisposed){const h=yield o.getModel(),E=h==null?void 0:h.lenses.find(m=>{var g;return m.symbol.range.startLineNumber===a&&((g=m.symbol.command)===null||g===void 0?void 0:g.title)===d.title});if(!E||!E.symbol.command)return;d=E.symbol.command}try{yield i.executeCommand(d.id,...d.arguments||[])}catch(h){r.error(h)}})}});var yEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class ute{constructor(e,t){this._editorWorkerClient=new lX(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return AEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new nu(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let jU=class extends ne{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new ute(e,t)))}};jU=yEt([FH(0,_n),FH(1,tn),FH(2,We)],jU);KP(jU);var TA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function nFe(u,e,t,n=!0){return TA(this,void 0,void 0,function*(){return nte(new _Et,u,e,t,n)})}function iFe(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class _Et{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class SEt{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class BEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Kt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function nte(u,e,t,n,i){return TA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof ute)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Mi(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function rFe(u,e){const{colorProvider:t}=u.get(We),n=u.get(_n).getModel(e);if(!n)throw _0();const i=u.get(tu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}ru.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof dt))throw _0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=rFe(u,t);return nte(new SEt,i,n,Kt.None,r)});ru.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof dt)||!Array.isArray(t)||t.length!==4||!j.isIRange(r))throw _0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=rFe(u,i),[l,c,d,h]=t;return nte(new BEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Kt.None,s)});var wEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},kle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},HU;const aFe=Object.create({});let qm=HU=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new pe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cA(this._editor),this._decoratorLimitReporter=new LEt,this._colorDecorationClassRefs=this._register(new pe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:HU.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(21),s=r.hasChanged(145);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Vl,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return kle(this,void 0,void 0,function*(){this._computePromise=Ui(e=>kle(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new va(!1),i=yield nFe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){zt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:Lt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(21);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qm.ID="editor.contrib.colorDetector";qm.RECOMPUTE_TIME=1e3;qm=HU=wEt([yH(1,tu),yH(2,We),yH(3,q0)],qm);class LEt{constructor(){this._onDidChange=new Q,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}fu(qm.ID,qm,1);class zEt{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Q,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Q,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(TB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new TEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}let TEt=class extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Rs(".button"+st.asCSSSelector(hi("color-picker-close",we.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class NEt extends ne{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Rs(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new PEt(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new REt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new IEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new OEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new e1(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new e1(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new e1(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class PEt extends ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Rs(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Rs(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new m6);const t=ji(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ae(new e1(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class oFe extends ne{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Rs(".standalone-strip")),this.overlay=me(this.domNode,Rs(".standalone-overlay"))):(this.domNode=me(e,Rs(".strip")),this.overlay=me(this.domNode,Rs(".overlay"))),this.slider=me(this.domNode,Rs(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new m6),n=ji(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class REt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:i}=e.rgba,r=new ae(new nu(t,n,i,1)),a=new ae(new nu(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class IEt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class OEt extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class jEt extends $l{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(sk.onDidChange(()=>this.layout()));const a=Rs(".colorpicker-widget");e.appendChild(a),this.header=this._register(new MEt(a,this.model,i,r)),this.body=this._register(new NEt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var sFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Cv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class HEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return _i.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=qm.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield cFe(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}};Iw=sFe([lFe(1,sr)],Iw);class VEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let aF=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!qm.get(this._editor))return null;const r=yield nFe(n,this._editor.getModel(),Kt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;j.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield cFe(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new j(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield E8(this._editor.getModel(),t,this._color,n,e),n=hFe(this._editor,n,t))})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};aF=sFe([lFe(1,sr)],aF);function cFe(u,e,t,n){return Cv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new nu(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield iFe(e,t,n,Kt.None),h=new zEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof Iw?new HEt(u,j.lift(t.range),h,n):new VEt(u,j.lift(t.range),h,n)})}function dFe(u,e,t,n,i){if(n.length===0||!e.hasModel())return ne.None;if(i.setMinimumDimensions){const h=e.getOption(66)+8;i.setMinimumDimensions(new pu(302,h))}const r=new pe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new jEt(i.fragment,s,e.getOption(141),t,u instanceof aF));i.setColorPicker(l);let c=!1,d=new j(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof aF){const h=n[0].model.color;u.color=h,E8(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>Cv(this,void 0,void 0,function*(){yield E8(o,s,h,d,a),c=!0,d=hFe(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{E8(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function hFe(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new j(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function E8(u,e,t,n,i){return Cv(this,void 0,void 0,function*(){const r=yield iFe(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Kt.None);e.colorPresentations=r||[]})}function VU(u,e){return!!u[e]}class AH{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=VU(e.event,t.triggerModifier),this.hasSideBySideModifier=VU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Fle{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=VU(e,t.triggerModifier)}}class M9{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function yle(u){return u==="altKey"?iu?new M9(57,"metaKey",6,"altKey"):new M9(5,"ctrlKey",6,"altKey"):iu?new M9(6,"altKey",57,"metaKey"):new M9(6,"altKey",5,"ctrlKey")}class rR extends ne{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Q),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Q),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Q),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:i=>i.target.position?i.target.position.lineNumber:0,this._opts=yle(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(77)){const r=yle(this._editor.getOption(77));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new AH(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new AH(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new AH(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Fle(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Fle(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var $Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},oh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Jm=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){NN(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Jm=$Et([oh(4,mt),oh(5,Cu),oh(6,ni),oh(7,pt),oh(8,sr),oh(9,bi),oh(10,k4),oh(11,tn),oh(12,We)],Jm);const Ale=new ae(new nu(0,122,204)),KEt={showArrow:!0,showFrame:!0,className:"",frameColor:Ale,arrowColor:Ale,keepEditorSelection:!1},WEt="vs.editor.contrib.zoneWidget";class GEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class UEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class aR{constructor(e){this._editor=e,this._ruleName=aR._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Dae(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){Dae(this._ruleName),EW(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:j.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}aR._IdGenerator=new lee(".arrow-decoration-");class qEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new pe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=xh(t),NN(this.options,KEt,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new aR(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=j.isIRange(e)?j.lift(e):j.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Lt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new GEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new UEt(WEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new j(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new oa(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(66),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var EFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const gFe=Ut("IPeekViewService");au(gFe,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Ro;(function(u){u.inPeekEditor=new Pe("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Ro||(Ro={}));let oF=class{constructor(e,t){e instanceof Jm&&Ro.inPeekEditor.bindTo(t)}dispose(){}};oF.ID="editor.contrib.referenceController";oF=EFe([mFe(1,pt)],oF);fu(oF.ID,oF,0);function JEt(u){const e=u.get(Cu).getFocusedCodeEditor();return e instanceof Jm?e.getParentEditor():e}const ZEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let Ow=class extends qEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,NN(this.options,ZEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),xi(this._titleElement,"click",r=>this._onTitleClick(r))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");me(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new j0(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ro("peekview.close",v("label.close","Close"),st.asClassName(we.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:l0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Nr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,ns(this._metaHeading)):Ya(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(66)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Ow=EFe([mFe(2,mt)],Ow);const YEt=q("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),fFe=q("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ml},v("peekViewTitleForeground","Color of the peek view title.")),pFe=q("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),QEt=q("peekView.border",{dark:Mo,light:Mo,hcDark:eu,hcLight:eu},v("peekViewBorder","Color of the peek view borders and arrow.")),XEt=q("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));q("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ml},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));q("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ml},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));q("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));q("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ml},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const RE=q("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));q("peekViewEditorGutter.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));q("peekViewEditorStickyScroll.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));q("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));q("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));q("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Zm{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=yG.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,O0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",O0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tmt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new j(i,s.startColumn,i,r),c=new j(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class sF{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ma}dispose(){Su(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",O0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,O0(this.uri),this.uri.fsPath)}resolve(e){return emt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tmt(n))}catch(n){zt(n)}return this})}}class ds{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Q,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(ds._compareReferences);let i;for(const r of e)if((!i||!mn.isEqual(i.uri,r.uri,!0))&&(i=new sF(this,r.uri),this.groups.push(i)),i.children.length===0||ds._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Zm(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Su(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ds(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:A3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&j.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return mn.compare(e.uri,t.uri)||j.compareRangesUsingStarts(e.range,t.range)}}var oR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sR=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$U;let KU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ds||e instanceof sF}getChildren(e){if(e instanceof ds)return e.groups;if(e instanceof sF)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};KU=oR([sR(0,Vo)],KU);class umt{getHeight(){return 23}getTemplateId(e){return e instanceof sF?lF.id:NA.id}}let WU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Zm){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return O0(e.uri)}};WU=oR([sR(0,qu)],WU);class nmt{getId(e){return e instanceof Zm?e.id:e.uri}}let GU=class extends ne{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new kw(n,{supportHighlights:!0})),this.badge=new JG(me(n,ve(".count")),{},$be),e.appendChild(n)}set(e,t){const n=xP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};GU=oR([sR(1,cv)],GU);let lF=$U=class{constructor(e){this._instantiationService=e,this.templateId=$U.id}renderTemplate(e){return this._instantiationService.createInstance(GU,e)}renderElement(e,t,n){n.set(e.element,vA(e.filterData))}disposeTemplate(e){e.dispose()}};lF.id="FileReferencesRenderer";lF=$U=oR([sR(0,mt)],lF);class imt{constructor(e){this.label=new am(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${O0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Kc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,vA(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class NA{constructor(){this.templateId=NA.id}renderTemplate(e){return new imt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}NA.id="OneReferenceRenderer";class rmt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var amt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class lR{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new pe,this._callOnModelChange=new pe,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(smt,"ReferencesWidget",this._treeContainer,new umt,[this._instantiationService.createInstance(lF),this._instantiationService.createInstance(NA)],this._instantiationService.createInstance(KU),n),this._splitView.addView({onDidChange:Ne.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},xw.Distribute),this._splitView.addView({onDidChange:Ne.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},xw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Zm&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ya(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new pu(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),ns(this._messageContainer),Promise.resolve(void 0)):(Ya(this._messageContainer),this._decorationsManager=new lR(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),ns(this._treeContainer),ns(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Zm)return e;if(e instanceof sF&&e.children.length>0)return e.children[0]}revealReference(e){return _le(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return _le(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ot.inMemory?this.setTitle(Ynt(e.uri),this._uriLabel.getUriLabel(xP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Su(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=j.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};UU=amt([sh(3,sr),sh(4,Vo),sh(5,mt),sh(6,gFe),sh(7,cv),sh(8,vP),sh(9,qu),sh(10,vn),sh(11,tn)],UU);var lmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},m8;const Hp=new Pe("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ym=m8=class{static get(e){return e.getContribution(m8.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new pe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Hp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",a=omt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(UU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new ee(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return Sle(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return Sle(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=j.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=m8.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,Ui(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,zt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Ym.ID="editor.contrib.referencesController";Ym=m8=lmt([xD(2,pt),xD(3,Cu),xD(4,bi),xD(5,mt),xD(6,Ul),xD(7,tu)],Ym);function Vp(u,e){const t=JEt(u);if(!t)return;const n=Ym.get(t);n&&e(n)}Po.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Vi(2089,60),when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Po.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!0)})}});Po.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!1)})}});ru.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ru.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ru.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ru.registerCommand("closeReferenceSearch",u=>Vp(u,e=>e.closeWidget()));Po.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:Ee.and(Ro.inPeekEditor,Ee.not("config.editor.stablePeek"))});Po.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:Ee.and(Hp,Ee.not("config.editor.stablePeek"))});Po.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.revealReference(n[0]))}});Po.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!0,!0))}});ru.registerCommand("openReference",u=>{var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!1,!0))});var DFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const ite=new Pe("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),cR=Ut("ISymbolNavigationService");let qU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ite.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new JU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(TX(d.uri,o.uri))l=!0,c=c||j.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Fl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:j.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};qU=DFe([Sb(0,pt),Sb(1,Cu),Sb(2,bi),Sb(3,qu)],qU);au(cR,qU,1);ze(new class extends xr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ite,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(cR).revealNext(e)}});Po.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ite,primary:9,handler(u){u.get(cR).reset()}});let JU=class{constructor(e){this._listener=new Map,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Su(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Fl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};JU=DFe([Sb(0,Cu)],JU);var rte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function PA(u,e,t,n){return rte(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Mi(s)})),a=yield Promise.all(r);return b1(a.flat())})}function dR(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function xFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function vFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function CFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function hR(u,e,t,n,i){return PA(e,t,u,(r,a,o)=>rte(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function RA(u){return rte(this,void 0,void 0,function*(){const e=yield u(),t=new ds(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}W1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=dR(n.definitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=CFe(n.typeDefinitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get(We),i=xFe(n.declarationProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeReferenceProvider",(u,e,t)=>{const n=u.get(We),i=hR(n.referenceProvider,e,t,!1,Kt.None);return RA(()=>i)});W1("_executeImplementationProvider",(u,e,t)=>{const n=u.get(We),i=vFe(n.implementationProvider,e,t,Kt.None);return RA(()=>i)});var _l=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},bC,kC,FC,T9,N9,P9,R9,I9;Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class bv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bv||ee.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class Ba extends hd{static all(){return Ba._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of $t.wrap(t.menu))(n.id===K.EditorContext||n.id===K.EditorContextPeek)&&(n.when=Ee.and(e.precondition,n.when));return t}constructor(e,t){super(Ba._patchConfig(t)),this.configuration=e,Ba._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(bi),a=e.get(Cu),o=e.get(Dg),s=e.get(cR),l=e.get(We),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=bv.is(n)?n:new bv(d,h),m=new Gm(t,5),g=YN(this._getLocationModel(l,E.model,E.position,m.token),m.token).then(f=>_l(this,void 0,void 0,function*(){var p;if(!f||m.token.isCancellationRequested)return;ga(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!Ba._activeAlternativeCommands.has(b)&&Ba._allSymbolNavigationCommands.has(b)&&(D=Ba._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=cs.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)Ba._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{Ba._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{m.dispose()});return o.showWhile(g,250),g}_onResult(e,t,n,i,r){return _l(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Jm)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return _l(this,void 0,void 0,function*(){let a;if(Eqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:j.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=Ym.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),Ui(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}Ba._allSymbolNavigationCommands=new Map;Ba._activeAlternativeCommands=new Set;class IA extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield dR(e.definitionProvider,t,n,i),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}gn((bC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bC.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:70,weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:2118,weight:100}],menu:[{id:K.EditorContext,group:"navigation",order:1.1},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ru.registerCommandAlias("editor.action.goToDeclaration",bC.id)}},bC.id="editor.action.revealDefinition",bC));gn((kC=class extends IA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:kC.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:Vi(2089,70),weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:Vi(2089,2118),weight:100}]}),ru.registerCommandAlias("editor.action.openDeclarationToTheSide",kC.id)}},kC.id="editor.action.revealDefinitionAside",kC));gn((FC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:FC.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Ee.and(W.hasDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:2}}),ru.registerCommandAlias("editor.action.previewDeclaration",FC.id)}},FC.id="editor.action.peekDefinition",FC));class bFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield xFe(e.declarationProvider,t,n,i),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}gn((T9=class extends bFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T9.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:Ee.and(W.hasDeclarationProvider,W.isInWalkThroughSnippet.toNegated()),menu:[{id:K.EditorContext,group:"navigation",order:1.3},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},T9.id="editor.action.revealDeclaration",T9));gn(class extends bFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Ee.and(W.hasDeclarationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:3}})}});class kFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield CFe(e.typeDefinitionProvider,t,n,i),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}gn((N9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:N9.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Ee.and(W.hasTypeDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:0,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.4},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},N9.ID="editor.action.goToTypeDefinition",N9));gn((P9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:P9.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Ee.and(W.hasTypeDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:4}})}},P9.ID="editor.action.peekTypeDefinition",P9));class FFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield vFe(e.implementationProvider,t,n,i),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}gn((R9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R9.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Ee.and(W.hasImplementationProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:2118,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},R9.ID="editor.action.goToImplementation",R9));gn((I9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:I9.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Ee.and(W.hasImplementationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:3142,weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:5}})}},I9.ID="editor.action.peekImplementation",I9));class yFe extends Ba{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:1094,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class cmt extends Ba{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Ee.and(Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ru.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(u,e,t,n,i,r,a)=>_l(void 0,void 0,void 0,function*(){Ru(dt.isUri(e)),Ru(ee.isIPosition(t)),Ru(Array.isArray(n)),Ru(typeof i>"u"||typeof i=="string"),Ru(typeof a>"u"||typeof a=="boolean");const o=u.get(Cu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(M1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends cmt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});ru.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(u,e,t,n,i)=>_l(void 0,void 0,void 0,function*(){u.get(ni).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});ru.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Ru(dt.isUri(e)),Ru(ee.isIPosition(t));const n=u.get(We),i=u.get(Cu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!M1(r)||!r.hasModel())return;const a=Ym.get(r);if(!a)return;const o=Ui(l=>hR(n.referenceProvider,r.getModel(),ee.lift(t),!1,l).then(c=>new ds(c,v("ref.title","References")))),s=new j(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});ru.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var dmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ble=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Bb;let W3=Bb=class{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new pe,this.toUnhookForKeyboard=new pe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new rR(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,o??void 0)})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{zt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Bb.ID)}startFindDefinitionFromCursor(e){return Ble(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return Ble(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new Z2e(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ui(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){zt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?j.lift(r[0].originSelectionRange):new j(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=j.plusRange(o,s));this.addDecoration(o,new Zr().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new Zr().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=Bb.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(n);return new IA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(pt);return Ro.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};W3.ID="editor.contrib.gotodefinitionatposition";W3.MAX_SOURCE_PREVIEW_LINES=8;W3=Bb=dmt([_H(1,Vo),_H(2,vn),_H(3,We)],W3);fu(W3.ID,W3,2);const O9=ve;class AFe extends ne{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new EA(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class ate extends ne{static render(e,t,n){return new ate(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,O9("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,O9("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,O9(`span.icon.${t.iconClass}`));const i=me(this.action,O9("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function hmt(u,e){return u&&e?v("acessibleViewHint","Inspect this in the accessible view with {0}.",e):u?v("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mmt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let gmt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class _Fe extends ne{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=gZe(e=>this._computer.computeAsync(e)),Emt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mmt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){zt(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new gmt(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class SH{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class g8{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const $p=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ote{constructor(){this._onDidWillResize=new Q,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Q,this.onDidResize=this._onDidResize.event,this._sashListener=new pe,this._size=new pu(0,0),this._minSize=new pu(0,0),this._maxSize=new pu(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new oa(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new oa(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new oa(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pw.North}),this._southSash=new oa(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ne.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ne.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ne.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ne.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new pu(t,e);pu.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const fmt=30,pmt=24;class Dmt extends ne{constructor(e,t=new pu(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new ote),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=pu.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new pu(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?ee.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:ji(t).top+n.top-fmt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=ji(t),r=c6(t.ownerDocument.body),a=i.top+n.top+n.height;return r.height-a-pmt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(60).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var ste=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f8,Bd;const wle=ve;let jw=f8=class extends ne{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(lm,this._editor)),this._participants=[];for(const i of $p.getAll())this._participants.push(this._instantiationService.createInstance(i,this._editor));this._participants.sort((i,r)=>i.hoverOrdinal-r.hoverOrdinal),this._computer=new Vw(this._editor,this._participants),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const r=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new SFe(this._computer.anchor,r,i.isComplete))})),this._register(xi(this._widget.getDomNode(),"keydown",i=>{i.equals(9)&&this.hide()})),this._register(qn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new SH(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new SH(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(60).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=f8.computeHoverRanges(this._editor,e.range,t),a=new pe,o=a.add(new Hw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(m=>m.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:f8._DECORATION_OPTIONS}]),a.add(ft(()=>{h.clear()}))}this._widget.showAt(s,new vmt(l,n,i,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ee(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=j.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ee(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ee(r,a),highlightRange:o}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};jw._DECORATION_OPTIONS=Lt.register({description:"content-hover-highlight",className:"hoverHighlight"});jw=f8=ste([Wf(1,mt),Wf(2,qu)],jw);class SFe{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new xmt(this,this.anchor,t,this.isComplete)}}class xmt extends SFe{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class vmt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const Lle=30,BH=10,Cmt=6;let lm=Bd=class extends Dmt{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,i,r){const a=e.getOption(66)+8,o=150,s=new pu(o,a);super(e,s),this._configurationService=n,this._accessibilityService=i,this._keybindingService=r,this._hover=this._register(new AFe),this._minimumSize=s,this._hoverVisibleKey=W.hoverVisible.bindTo(t),this._hoverFocusedKey=W.hoverFocused.bindTo(t),me(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const l=this._register(y1(this._resizableNode.domNode));this._register(l.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(l.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Bd.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return Bd._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return Bd._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){Bd._applyMaxDimensions(this._hover.contentsDomNode,e,t),Bd._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-BH))}_updateResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new pu(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;Bd._lastDimensions=new pu(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Cmt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=BH),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=ji(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=zle(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=zle(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Bd._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Bd._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,i,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const o=Rf(this._hover.containerDomNode),s=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(o,s))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout();const l=hmt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(a=(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||r===void 0?void 0:r.getAriaLabel())!==null&&a!==void 0?a:"");l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new pu(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ko(n),Math.min(r,e)),this._setContentsDomNodeDimensions(ko(i),Math.min(r,e-BH))}setMinimumDimensions(e){this._minimumSize=new pu(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new pu(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=Rf(t),i=ko(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=Rf(t),i=ko(t),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=Rf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-Lle})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+Lle})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};lm.ID="editor.contrib.resizableContentHoverWidget";lm._lastDimensions=new pu(0,0);lm=Bd=ste([Wf(1,pt),Wf(2,tu),Wf(3,k4),Wf(4,qu)],lm);let Hw=class extends ne{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=wle("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,wle("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(ate.render(this.actionsElement,e,n))}append(e){const t=me(this.actionsElement,e);return this._hasContent=!0,t}};Hw=ste([Wf(0,qu)],Hw);class Vw{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return _i.EMPTY;const n=Vw._getLineDecorations(this._editor,t);return _i.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):_i.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Vw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return b1(t)}}function zle(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const Mle=ve;class bx extends ne{constructor(e,t,n){super(),this._renderDisposeables=this._register(new pe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new AFe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new h4({editor:this._editor},t,n)),this._computer=new bmt(this._editor),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return bx.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=Mle("div.hover-row.markdown-hover"),a=me(r,Mle("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(66),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}bx.ID="editor.contrib.modesGlyphHoverWidget";class bmt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||Ev(r)||n.push(...SQ(r).map(e))}return n}}var kmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fmt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function ymt(u,e,t,n,i){return kmt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&_mt(r))return new Fmt(u,r,e)}catch(r){Mi(r)}})}function lte(u,e,t,n){const r=u.ordered(e).map((a,o)=>ymt(a,o,e,t,n));return _i.fromPromises(r).coalesce()}function Amt(u,e,t,n){return lte(u,e,t,n).map(i=>i.hover).toPromise()}W1("_executeHoverProvider",(u,e,t)=>{const n=u.get(We);return Amt(n.hoverProvider,e,t,Kt.None)});function _mt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Smt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Tle=ve;class Sc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let $w=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new Sc(this,e.range,[new Zr().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new Sc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new Sc(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,o++));let E=!1;for(const m of t){const g=m.range.startLineNumber===i?m.range.startColumn:1,f=m.range.endLineNumber===i?m.range.endColumn:r,p=m.options.hoverMessage;if(!p||Ev(p))continue;m.options.beforeContentClassName&&(E=!0);const D=new j(e.range.startLineNumber,g,e.range.startLineNumber,f);a.push(new Sc(this,D,SQ(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return _i.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return _i.EMPTY;const r=new ee(e.range.startLineNumber,e.range.startColumn);return lte(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!Ev(a.hover.contents)).map(a=>{const o=a.hover.range?j.lift(a.hover.range):e.range;return new Sc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};$w=Smt([j9(1,vn),j9(2,Cs),j9(3,tu),j9(4,We)],$w);function BFe(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new pe;for(const a of e)for(const o of a.contents){if(Ev(o))continue;const s=Tle("div.hover-row.markdown-hover"),l=me(s,Tle("div.hover-contents")),c=r.add(new h4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var wFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Nle{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let ZU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._dispoables=new pe,this._markers=[],this._nextIdx=-1,dt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=ok(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=j.compareRangesUsingStarts(o,s)||Yn.compare(o.severity,s.severity):l=Yn.compare(o.severity,s.severity)||j.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:dt.isUri(e)?e:void 0,severities:Yn.Error|Yn.Warning|Yn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Nle(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=X2(this._markers,{resource:e.uri},(a,o)=>ok(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XU;class wmt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new pe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(xi(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new dCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Su(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=F1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);Nr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(r.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const E=me(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(Nr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),pa(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const E of i){const m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,g.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(g,E);const f=document.createElement("span");f.innerText=E.message,m.appendChild(g),m.appendChild(f),this._lines+=1,h.appendChild(m)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Yn.Error:t=v("Error","Error");break;case Yn.Warning:t=v("Warning","Warning");break;case Yn.Info:t=v("Info","Info");break;case Yn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let kv=XU=class extends Ow{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new pe,this._onDidSelectRelatedInformation=new Q,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Yn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Tmt);let t=eq,n=Lmt;this._severity===Yn.Warning?(t=p8,n=zmt):this._severity===Yn.Info&&(t=tq,n=Mmt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(fFe),secondaryHeadingColor:e.getColor(pFe)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(XU.TitleMenu,this._contextKeyService);Wbe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,ve(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new wmt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=j.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(O0(o.uri),s)}this._icon.className=`codicon ${QU.className(Yn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};kv.TitleMenu=new K("gotoErrorTitleMenu");kv=XU=Bmt([vD(1,sr),vD(2,Cs),vD(3,$1),vD(4,mt),vD(5,pt),vD(6,cv)],kv);const Ple=yk(n1,BXe),Rle=yk(Hs,kk),Ile=yk(Mo,Fk),eq=q("editorMarkerNavigationError.background",{dark:Ple,light:Ple,hcDark:eu,hcLight:eu},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lmt=q("editorMarkerNavigationError.headerBackground",{dark:tt(eq,.1),light:tt(eq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),p8=q("editorMarkerNavigationWarning.background",{dark:Rle,light:Rle,hcDark:eu,hcLight:eu},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),zmt=q("editorMarkerNavigationWarning.headerBackground",{dark:tt(p8,.1),light:tt(p8,.1),hcDark:"#0C141F",hcLight:tt(p8,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),tq=q("editorMarkerNavigationInfo.background",{dark:Ile,light:Ile,hcDark:eu,hcLight:eu},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Mmt=q("editorMarkerNavigationInfo.headerBackground",{dark:tt(tq,.1),light:tt(tq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Tmt=q("editorMarkerNavigation.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Nmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},wb;let Qm=wb=class{static get(e){return e.getContribution(wb.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new pe,this._editor=e,this._widgetVisible=MFe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(kv,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!j.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:j.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ee(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return zFe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=wb.get(a))===null||n===void 0||n.close(),(i=wb.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Qm.ID="editor.contrib.markerController";Qm=wb=Nmt([H9(1,LFe),H9(2,pt),H9(3,Cu),H9(4,mt)],Qm);class ER extends $e{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return zFe(this,void 0,void 0,function*(){t.hasModel()&&((n=Qm.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class cm extends ER{constructor(){super(!0,!1,{id:cm.ID,label:cm.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:578,weight:100},menuOpts:{menuId:kv.TitleMenu,title:cm.LABEL,icon:hi("marker-navigation-next",we.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}cm.ID="editor.action.marker.next";cm.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class c3 extends ER{constructor(){super(!1,!1,{id:c3.ID,label:c3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1602,weight:100},menuOpts:{menuId:kv.TitleMenu,title:c3.LABEL,icon:hi("marker-navigation-previous",we.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}c3.ID="editor.action.marker.prev";c3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Pmt extends ER{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:66,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Rmt extends ER{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1090,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fu(Qm.ID,Qm,4);be(cm);be(c3);be(Pmt);be(Rmt);const MFe=new Pe("markersNavigationVisible",!1),Imt=xr.bindToContribution(Qm.get);ze(new Imt({id:"closeMarkersNavigation",precondition:MFe,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:W.focus,primary:9,secondary:[1033]}}));var Omt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tl=ve;class jmt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Ole={type:1,filter:{include:gt.QuickFix},triggerAction:fs.QuickFixHover};let uq=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new j(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new jmt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ne.None;const n=new pe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Yn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=tl("div.hover-row"),i=me(n,tl("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=me(i,tl("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=tl("span");if(r){const m=me(c,tl("span"));m.innerText=r}const d=me(c,tl("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));const h=me(d,tl("span"));h.innerText=o.value;const E=me(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=me(i,tl("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(pa(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const m=me(i,tl("div"));m.style.marginTop="8px";const g=me(m,tl("a"));g.innerText=`${O0(d)}(${h}, ${E}): `,g.style.cursor="pointer",t.add(ce(g,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(zt)}));const f=me(m,tl("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Yn.Error||t.marker.severity===Yn.Warning||t.marker.severity===Yn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:cm.ID,run:()=>{var i;e.hide(),(i=Qm.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const i=e.statusBar.append(tl("div"));this.recentMarkerCodeActionsInfo&&(gw.makeKey(this.recentMarkerCodeActionsInfo.marker)===gw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ne.None:n.add(Rm(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(ft(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(ft(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Qee,run:l=>{s=!0;const c=Um.get(this._editor),d=ji(l);e.hide(),c==null||c.showCodeActions(Ole,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},zt)}}getCodeActions(e){return Ui(t=>p2(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Ole,Yh.None,t))}};uq=Omt([wH(1,mX),wH(2,Cs),wH(3,We)],uq);const TFe="editor.action.inlineSuggest.commit",NFe="editor.action.inlineSuggest.showPrevious",PFe="editor.action.inlineSuggest.showNext";var Hmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Vmt extends ne{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $Ue),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new pe),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new cF(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new j0(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(i,r)=>{var a;if(i.id===cF.ID)return this.toggleMenuActionViewItem=new sw(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:st.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:we.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof Zx){const o=new sw(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n,i;const r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(i=r==null?void 0:r.getLabel())!==null&&i!==void 0?i:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class cF extends ro{constructor(e,t){t=t||v("moreActions","More Actions..."),super(cF.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hmt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}cF.ID="toolbar.toggle.more";var $mt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let nq=class extends Vmt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new pe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;Ef==null?void 0:f.id)),m=this._options.overflowBehavior.maxItems-E.size;let g=0;for(let f=0;f=m&&(o[f]=void 0,d[f]=p))}}Kre(o),Kre(d),super.setActions(o,Dr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var m,g,f,p,D;const x=new x0(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>F,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};nq=$mt([yC(2,$1),yC(3,pt),yC(4,Wl),yC(5,qu),yC(6,i0)],nq);var cte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Bc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},D8;let iq=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=uu(this,i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ee(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(es((i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Xm,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(ft(()=>e.removeContentWidget(o))),r.add(Xu(s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==qh.Explicit&&a.triggerExplicitly()}))}))}};iq=cte([Bc(2,mt)],iq);const Kmt=hi("inline-suggestion-hints-next",we.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Wmt=hi("inline-suggestion-hints-previous",we.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Xm=D8=class extends ne{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new ro(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${D8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=yr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[yr("div@toolBar")]),this.previousAction=this.createCommandAction(NFe,v("previous","Previous"),st.asClassName(Wmt)),this.availableSuggestionCountAction=new ro("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(PFe,v("next","Next"),st.asClassName(Kmt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(K.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(s.createInstance(rq,this.nodes.toolBar,K.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,E)=>{if(h instanceof zl)return s.createInstance(Umt,h,void 0);if(h===this.availableSuggestionCountAction){const m=new Gmt(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{D8._dropDownVisible=h})),this._register(Xu(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(Xu(h=>{const E=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);E!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${E}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),E!==void 0&&E>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Xu(h=>{const E=this._extraCommands.read(h);if(di(this.lastCommands,E))return;this.lastCommands=E;const m=E.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:f=>this._commandService.executeCommand(g.id)}));for(const[g,f]of this.inlineCompletionsActionsMenus.getActions())for(const p of f)p instanceof zl&&m.push(p);m.length>0&&m.unshift(new Dr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Xm._dropDownVisible=!1;Xm.id=0;Xm=D8=cte([Bc(6,ni),Bc(7,mt),Bc(8,qu),Bc(9,pt),Bc(10,$1)],Xm);class Gmt extends mv{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Umt=class extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=yr("div.keybinding").root;new FA(t,Os,Object.assign({disableTitle:!0},Tlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},rq=class extends nq{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];Wbe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),s.unshift(...this.prependedPrimaryActions),this.setActions(s,l)}setPrependedPrimaryActions(e){di(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){di(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};rq=cte([Bc(3,$1),Bc(4,pt),Bc(5,Wl),Bc(6,qu),Bc(7,i0)],rq);var qmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},V9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},aq;const Jmt=!1;let Io=aq=class extends ne{static get(e){return e.getContribution(aq.ID)}constructor(e,t,n,i,r){super(),this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new pe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Hu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===lm.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===bx.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_isMouseOverWidget(e){var t,n,i,r,a;const o=e.target;return!!(this._isHoverSticky&&o.type===9&&o.detail===lm.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((r=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||r===void 0)&&r.isCollapsed)||!this._isHoverSticky&&o.type===9&&o.detail===lm.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible)||this._isHoverSticky&&o.type===12&&o.detail===bx.ID)}_onEditorMouseMove(e){var t,n,i,r;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((r=this._contentWidget)===null||r===void 0)&&r.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,n,i;if(!e)return;const r=e.target,a=(t=r.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),o=this._editor.getOption(146);if(a&&(o==="click"&&!this._hoverActivatedByColorDecoratorClick||o==="hover"&&!this._isHoverEnabled&&!Jmt||o==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!a&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(n=this._glyphWidget)===null||n===void 0||n.hide();return}if(r.type===2&&r.position){(i=this._contentWidget)===null||i===void 0||i.hide(),this._glyphWidget||(this._glyphWidget=new bx(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(r.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Xm.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(jw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Io.ID="editor.contrib.hover";Io=aq=qmt([V9(1,mt),V9(2,Cs),V9(3,vn),V9(4,qu)],Io);class Zmt extends $e{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const i=Io.get(t);if(!i)return;const r=t.getPosition(),a=new j(r.lineNumber,r.column,r.lineNumber,r.column),o=t.getOption(2)===2||!!(n!=null&&n.focus);i.isHoverVisible?i.focus():i.showContentHover(a,1,1,o)}}class Ymt extends $e{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const n=Io.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new j(i.lineNumber,i.column,i.lineNumber,i.column),a=W3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qmt extends $e{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:16,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollUp()}}class Xmt extends $e{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:18,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollDown()}}class egt extends $e{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:15,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollLeft()}}class tgt extends $e{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:17,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollRight()}}class ugt extends $e{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageUp()}}class ngt extends $e{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageDown()}}class igt extends $e{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToTop()}}class rgt extends $e{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToBottom()}}fu(Io.ID,Io,2);be(Zmt);be(Ymt);be(Qmt);be(Xmt);be(egt);be(tgt);be(ugt);be(ngt);be(igt);be(rgt);$p.register($w);$p.register(uq);Kl((u,e)=>{const t=u.getColor(KXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class oq extends ne{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==aFe||!n.range)return;const i=this._editor.getContribution(Io.ID);if(i&&!i.isColorPickerVisible){const r=new j(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}oq.ID="editor.contrib.colorContribution";fu(oq.ID,oq,2);$p.register(Iw);var RFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},jle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},sq,lq;let eg=sq=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=W.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=W.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ww(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(sq.ID)}};eg.ID="editor.contrib.standaloneColorPickerController";eg=sq=RFe([Cc(1,pt),Cc(2,_n),Cc(3,qu),Cc(4,mt),Cc(5,We),Cc(6,tn)],eg);fu(eg.ID,eg,1);const Hle=8,agt=22;let Ww=lq=class extends ne{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(aF,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(y1(this._body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var m;const g=(m=E.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return lq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return jle(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new ogt(t.result,t.foundInEditor))})}_computeAsync(e){return jle(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new ute(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new Hw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:g=>r=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-agt-Hle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+Hle+"px";const E=d.originalColorNode;E.style.width=l+"px";const m=r.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ww.ID="editor.contrib.standaloneColorPickerWidget";Ww=lq=RFe([Cc(3,mt),Cc(4,_n),Cc(5,qu),Cc(6,We),Cc(7,tn)],Ww);class ogt{constructor(e,t){this.value=e,this.foundInEditor=t}}class sgt extends hd{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=eg.get(t))===null||n===void 0||n.showOrFocus()}}class lgt extends $e{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:W.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.hide()}}class cgt extends $e{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:W.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.insertColor()}}be(lgt);be(cgt);gn(sgt);class IE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),m=h.indexOf(n,c-1-n.length);if(E!==-1&&m!==-1)if(o===l)d.substring(E+t.length,m).indexOf(n)>=0&&(E=-1,m=-1);else{const f=d.substring(E+t.length),p=h.substring(0,m);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,m=-1)}let g;E!==-1&&m!==-1?(i&&E+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=IE._createRemoveBlockCommentOperations(new j(o,E+t.length+1,l,m+1),t,n)):(g=IE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(const f of g)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return j.isEmpty(e)?i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(yn.delete(new j(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return j.isEmpty(e)?r.push(yn.replace(new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(yn.insert(new ee(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(yn.insert(new ee(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ye(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ye(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class ph{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;lr?t[s].commentStrOffset=a-1:t[s].commentStrOffset=a}}}class dte extends $e{constructor(e,t){super(t),this._type=e}run(e,t){const n=e.get(tn);if(!t.hasModel())return;const i=t.getModel(),r=[],a=i.getOptions(),o=t.getOption(23),s=t.getSelections().map((c,d)=>({selection:c,index:d,ignoreFirstLine:!1}));s.sort((c,d)=>j.compareRangesUsingStarts(c.selection,d.selection));let l=s[0];for(let c=1;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ug=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},cq;let Fv=cq=class{static get(e){return e.getContribution(cq.ID)}constructor(e,t,n,i,r,a,o,s){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=a,this._configurationService=o,this._workspaceContextService=s,this._toDispose=new pe,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&w3(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(l=>{this._editor.getOption(24)&&l.keyCode===58&&(l.preventDefault(),l.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?K.SimpleEditorContext:K.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),r=i.getActions({arg:e.uri});i.dispose();for(const a of r){const[,o]=a;let s=0;for(const l of o)if(l instanceof dk){const c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new Zx(l.id,l.label,c)),s++)}else n.push(l),s++;s&&n.push(new Dr)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let i=t;if(!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=ji(this._editor.getDomNode()),s=o.left+a.left,l=o.top+a.top+a.height;i={x:s,y:l}}const r=this._editor.getOption(126)&&!Zc;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:a=>{const o=this._keybindingFor(a);if(o)return new mv(a,a,{label:!0,keybinding:o.getLabel(),isMenu:!0});const s=a;return typeof s.getActionViewItem=="function"?s.getActionViewItem():new mv(a,a,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:a=>this._keybindingFor(a),onHide:a=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Eot(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let n=0;const i=l=>({id:`menu-action-${++n}`,label:l.label,tooltip:"",class:void 0,enabled:typeof l.enabled>"u"?!0:l.enabled,checked:l.checked,run:l.run}),r=(l,c)=>new Zx(`menu-action-${++n}`,l,c,void 0),a=(l,c,d,h,E)=>{if(!c)return i({label:l,enabled:c,run:()=>{}});const m=f=>()=>{this._configurationService.updateValue(d,f)},g=[];for(const f of E)g.push(i({label:f.label,checked:h===f.value,run:m(f.value)}));return r(l,g)},o=[];o.push(i({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new Dr),o.push(i({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(a(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:v("context.minimap.size.fill","Fill"),value:"fill"},{label:v("context.minimap.size.fit","Fit"),value:"fit"}])),o.push(a(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));const s=this._editor.getOption(126)&&!Zc;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:l=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Fv.ID="editor.contrib.contextmenu";Fv=cq=ggt([Ug(1,Wl),Ug(2,F4),Ug(3,pt),Ug(4,qu),Ug(5,$1),Ug(6,tu),Ug(7,M3)],Fv);class fgt extends $e{constructor(){super({id:"editor.action.showContextMenu",label:v("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Fv.get(t))===null||n===void 0||n.showContextMenu()}}fu(Fv.ID,Fv,2);be(fgt);class LH{constructor(e){this.selections=e}equals(e){const t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const n=new LH(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new zH(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new zH(new LH(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new zH(new LH(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}G3.ID="editor.contrib.cursorUndoRedoController";class pgt extends $e{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var i;(i=G3.get(t))===null||i===void 0||i.cursorUndo()}}class Dgt extends $e{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var i;(i=G3.get(t))===null||i===void 0||i.cursorRedo()}}fu(G3.ID,G3,0);be(pgt);be(Dgt);class xgt{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){const n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new j(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Ye(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Ye(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(CD(e)&&(this._modifierPressed=!0),this._mouseDown&&CD(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(CD(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===e4.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const i=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(i.length===1)this._dragSelection=i[0];else return}CD(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new ee(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const i=this._editor.getSelection();if(i){const{selectionStartLineNumber:r,selectionStartColumn:a}=i;n=[new Ye(r,a,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(i=>i.containsPosition(t)?new Ye(t.lineNumber,t.column,t.lineNumber,t.column):i);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(CD(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(e4.ID,new xgt(this._dragSelection,t,CD(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),options:e4._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e4.ID="editor.contrib.dragAndDrop";e4.TRIGGER_KEY_VALUE=iu?6:5;e4._DECORATION_OPTIONS=Lt.register({description:"dnd-target",className:"dnd-target"});fu(e4.ID,e4,2);const mR=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let u;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?u=crypto.getRandomValues.bind(crypto):u=function(n){for(let i=0;iIFe(this,void 0,void 0,function*(){return u}),asFile:()=>{},value:typeof u=="string"?u:void 0}}function vgt(u,e,t){const n={id:mR(),name:u,uri:e,data:t};return{asString:()=>IFe(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}class OFe{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return $t.some(this,([n,i])=>i.asFile())&&t.push("files"),HFe(Gw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return Gw(e)}}function Gw(u){return u.toLowerCase()}function jFe(u,e){return HFe(Gw(u),e.map(Gw))}function HFe(u,e){if(u==="*/*")return e.length>0;if(e.includes(u))return!0;const t=u.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,i,r]=t;return r==="*"?e.some(a=>a.startsWith(i+"/")):!1}const gR=Object.freeze({create:u=>Lm(u.map(e=>e.toString())).join(`\r `),split:u=>u.split(`\r -`),parse:u=>gR.split(u).filter(e=>!e.startsWith("#"))}),Vle={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Cgt{}const bgt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};jn.add(bgt.DragAndDropContribution,new Cgt);class dF{constructor(){}static getInstance(){return dF.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}dF.INSTANCE=new dF;var kgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function VFe(u){const e=new OFe;for(const t of u.items){const n=t.type;if(t.kind==="string"){const i=new Promise(r=>t.getAsString(r));e.append(n,hte(i))}else if(t.kind==="file"){const i=t.getAsFile();i&&e.append(n,Fgt(i))}}return e}function Fgt(u){const e=u.path?dt.parse(u.path):void 0;return vgt(u.name,e,()=>kgt(this,void 0,void 0,function*(){return new Uint8Array(yield u.arrayBuffer())}))}const ygt=Object.freeze([Vle.EDITORS,Vle.FILES,$k.RESOURCES,$k.INTERNAL_URI_LIST]);function $Fe(u,e=!1){const t=VFe(u),n=t.get($k.INTERNAL_URI_LIST);if(n)t.replace(ci.uriList,n);else if(e||!t.has(ci.uriList)){const i=[];for(const r of u.items){const a=r.getAsFile();if(a){const o=a.path;try{o?i.push(dt.file(o).toString()):i.push(dt.parse(a.name,!0).toString())}catch{}}}i.length&&t.replace(ci.uriList,hte(gR.create(i)))}for(const i of ygt)t.delete(i);return t}function Agt(u,e,t){var n,i;return{edits:[...e.map(r=>new Zh(u,typeof t.insertText=="string"?{range:r,text:t.insertText,insertAsSnippet:!1}:{range:r,text:t.insertText.snippet,insertAsSnippet:!0})),...(i=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&i!==void 0?i:[]]}}function KFe(u){var e;function t(o,s){return"providerId"in o&&o.providerId===s.providerId||"mimeType"in o&&o.mimeType===s.handledMimeType}const n=new Map;for(const o of u)for(const s of(e=o.yieldTo)!==null&&e!==void 0?e:[])for(const l of u)if(l!==o&&t(s,l)){let c=n.get(o);c||(c=[],n.set(o,c)),c.push(l)}if(!n.size)return Array.from(u);const i=new Set,r=[];function a(o){if(!o.length)return[];const s=o[0];if(r.includes(s))return console.warn(`Yield to cycle detected for ${s.providerId}`),o;if(i.has(s))return a(o.slice(1));let l=[];const c=n.get(s);return c&&(r.push(s),l=a(c),r.pop()),i.add(s),[...l,s,...a(o.slice(1))]}return a(Array.from(u))}var _gt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sgt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Bgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const wgt=Lt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:jve,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class fR extends ne{constructor(e,t,n,i,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(i),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ve(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ve("span.icon");this.domNode.append(t),t.classList.add(...st.asClassNameArray(we.loading),"codicon-modifier-spin");const n=()=>{const i=this.editor.getOption(66);this.domNode.style.height=`${i}px`,this.domNode.style.width=`${Math.ceil(.8*i)}px`};n(),this._register(this.editor.onDidChangeConfiguration(i=>{(i.hasChanged(52)||i.hasChanged(66))&&n()})),this._register(ce(this.domNode,Me.CLICK,i=>{this.delegate.cancel()}))}getId(){return fR.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}fR.baseId="editor.widget.inlineProgressWidget";let Uw=class extends ne{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Ir),this._currentWidget=new Ir,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return Bgt(this,void 0,void 0,function*(){const i=this._operationIdPool++;this._currentOperation=i,this.clear(),this._showPromise.value=Rm(()=>{const r=j.fromPositions(e);this._currentDecorations.set([{range:r,options:wgt}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(fR,this.id,this._editor,r,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===i&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Uw=_gt([Sgt(2,mt)],Uw);var WFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},D2=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},dq;let qw=dq=class extends ne{constructor(e,t,n,i,r,a,o,s,l,c){super(),this.typeId=e,this.editor=t,this.showCommand=i,this.range=r,this.edits=a,this.onSelectNewEdit=o,this._contextMenuService=s,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(l),this.visibleContext.set(!0),this._register(ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{r.containsPosition(d.position)||this.dispose()})),this._register(Ne.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ve(".post-edit-widget"),this.button=this._register(new qG(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ce(this.domNode,Me.CLICK,()=>this.showSelector()))}getId(){return dq.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=ji(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>tx({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};qw.baseId="editor.widget.postEditWidget";qw=dq=WFe([D2(7,Wl),D2(8,pt),D2(9,qu)],qw);let Jw=class extends ne{constructor(e,t,n,i,r,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=i,this._instantiationService=r,this._bulkEditService=a,this._currentWidget=this._register(new Ir),this._register(Ne.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,i){var r,a;return $le(this,void 0,void 0,function*(){const o=this._editor.getModel();if(!o||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;let l=[];(typeof s.insertText=="string"?s.insertText==="":s.insertText.snippet==="")?l=[]:l=e.map(f=>new Zh(o.uri,typeof s.insertText=="string"?{range:f,text:s.insertText,insertAsSnippet:!1}:{range:f,text:s.insertText.snippet,insertAsSnippet:!0}));const d={edits:[...l,...(a=(r=s.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&a!==void 0?a:[]]},h=e[0],E=o.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let m,g;try{m=yield this._bulkEditService.apply(d,{editor:this._editor,token:i}),g=o.getDecorationRange(E[0])}finally{o.deltaDecorations(E,[])}n&&m.isApplied&&t.allEdits.length>1&&this.show(g??h,t,f=>$le(this,void 0,void 0,function*(){const p=this._editor.getModel();p&&(yield p.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:f,allEdits:t.allEdits},n,i))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(qw,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};Jw=WFe([D2(4,mt),D2(5,xA)],Jw);var Lgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},lh=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hq;const GFe="editor.changePasteType",UFe=new Pe("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),MH="application/vnd.code.copyMetadata";let U3=hq=class extends ne{static get(e){return e.getContribution(hq.ID)}constructor(e,t,n,i,r,a,o){super(),this._bulkEditService=n,this._clipboardService=i,this._languageFeaturesService=r,this._quickInputService=a,this._progressService=o,this._editor=e;const s=e.getContainerDomNode();this._register(ce(s,"copy",l=>this.handleCopy(l))),this._register(ce(s,"cut",l=>this.handleCopy(l))),this._register(ce(s,"paste",l=>this.handlePaste(l),!0)),this._pasteProgressManager=this._register(new Uw("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Jw,"pasteIntoEditor",e,UFe,{id:GFe,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},JN().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(dg&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),r=this._editor.getSelections();if(!i||!(r!=null&&r.length))return;const a=this._editor.getOption(37);let o=r;const s=r.length===1&&r[0].isEmpty();if(s){if(!a)return;o=[new j(o[0].startLineNumber,1,o[0].startLineNumber,1+i.getLineLength(o[0].startLineNumber))]}const l=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(r,a,na),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:s,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(p=>!!p.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const E=VFe(e.clipboardData),m=h.flatMap(p=>{var D;return(D=p.copyMimeTypes)!==null&&D!==void 0?D:[]}),g=mR();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:d});const f=Ui(p=>lh(this,void 0,void 0,function*(){const D=b1(yield Promise.all(h.map(x=>lh(this,void 0,void 0,function*(){try{return yield x.prepareDocumentPaste(i,o,E,p)}catch(b){console.error(b);return}}))));D.reverse();for(const x of D)for(const[b,k]of x)E.replace(b,k);return E}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:f}}handlePaste(e){var t,n;return lh(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),r=this._editor.getSelections();if(!(r!=null&&r.length)||!i||!this.isPasteAsEnabled())return;const a=this.fetchCopyMetadata(e),o=$Fe(e.clipboardData);o.delete(MH);const s=[...e.clipboardData.types,...(n=a==null?void 0:a.providerCopyMimeTypes)!==null&&n!==void 0?n:[],ci.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(c=>{var d;return(d=c.pasteMimeTypes)===null||d===void 0?void 0:d.some(h=>jFe(h,s))});l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,r,o,a):this.doPasteInline(l,r,o,a))})}doPasteInline(e,t,n,i){const r=Ui(a=>lh(this,void 0,void 0,function*(){const o=this._editor;if(!o.hasModel())return;const s=o.getModel(),l=new Gm(o,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,i,l.token),l.token.isCancellationRequested)return;const c=e.filter(h=>Kle(h,n));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}const d=yield this.getPasteEdits(c,n,s,t,l.token);if(l.token.isCancellationRequested)return;if(d.length===1&&d[0].providerId==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}if(d.length){const h=o.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:d},h,l.token)}yield this.applyDefaultPasteHandler(n,i,l.token)}finally{l.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),r),this._currentPasteOperation=r}showPasteAsPick(e,t,n,i,r){const a=Ui(o=>lh(this,void 0,void 0,function*(){const s=this._editor;if(!s.hasModel())return;const l=s.getModel(),c=new Gm(s,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,r,c.token),c.token.isCancellationRequested)return;let d=t.filter(g=>Kle(g,i));e&&(d=d.filter(g=>g.id===e));const h=yield this.getPasteEdits(d,i,l,n,c.token);if(c.token.isCancellationRequested||!h.length)return;let E;if(e)E=h.at(0);else{const g=yield this._quickInputService.pick(h.map(f=>({label:f.label,description:f.providerId,detail:f.detail,edit:f})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});E=g==null?void 0:g.edit}if(!E)return;const m=Agt(l.uri,n,E);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(MH,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const n=e.clipboardData.getData(MH);if(n)try{return JSON.parse(n)}catch{return}const[i,r]=RW.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:(t=r.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!r.isFromEmptySelection}}}mergeInDataFromCopy(e,t,n){var i;return lh(this,void 0,void 0,function*(){if(t!=null&&t.id&&((i=this._currentCopyOperation)===null||i===void 0?void 0:i.handle)===t.id){const r=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[a,o]of r)e.replace(a,o)}if(!e.has(ci.uriList)){const r=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(ci.uriList,hte(gR.create(r)))}})}getPasteEdits(e,t,n,i,r){return lh(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>lh(this,void 0,void 0,function*(){var l;try{const c=yield(l=s.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(s,n,i,t,r);if(c)return Object.assign(Object.assign({},c),{providerId:s.id})}catch(c){console.error(c)}}))),r),o=b1(a??[]);return KFe(o)})}applyDefaultPasteHandler(e,t,n){var i,r,a;return lh(this,void 0,void 0,function*(){const o=(i=e.get(ci.text))!==null&&i!==void 0?i:e.get("text");if(!o)return;const s=yield o.asString();if(n.isCancellationRequested)return;const l={text:s,pasteOnNewLine:(r=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&r!==void 0?r:!1,multicursorText:(a=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&a!==void 0?a:null,mode:null};this._editor.trigger("keyboard","paste",l)})}};U3.ID="editor.contrib.copyPasteActionController";U3=hq=Lgt([bD(1,mt),bD(2,xA),bD(3,_4),bD(4,We),bD(5,md),bD(6,xbe)],U3);function Kle(u,e){var t;return!!(!((t=u.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var Ete=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hF=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},yv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const mte=v("builtIn","Built-in");class gte{provideDocumentPasteEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,detail:r.detail,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}}class qFe extends gte{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[ci.text],this.pasteMimeTypes=[ci.text]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=e.get(ci.text);if(!n||e.has(ci.uriList))return;const i=yield n.asString();return{handledMimeType:ci.text,label:v("text.label","Insert Plain Text"),detail:mte,insertText:i}})}}class JFe extends gte{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;let i=0;const r=n.map(({uri:o,originalText:s})=>o.scheme===Ot.file?o.fsPath:(i++,s)).join(" ");let a;return i>0?a=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):a=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:ci.uriList,insertText:r,label:a,detail:mte}})}}let Zw=class extends gte{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;const i=b1(n.map(({uri:r})=>{const a=this._workspaceContextService.getWorkspaceFolder(r);return a?tit(a.uri,r):void 0}));if(i.length)return{handledMimeType:ci.uriList,insertText:i.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:mte}})}};Zw=Ete([hF(0,M3)],Zw);function ZFe(u){return yv(this,void 0,void 0,function*(){const e=u.get(ci.uriList);if(!e)return[];const t=yield e.asString(),n=[];for(const i of gR.parse(t))try{n.push({uri:dt.parse(i),originalText:i})}catch{}return n})}let Eq=class extends ne{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new qFe)),this._register(e.documentOnDropEditProvider.register("*",new JFe)),this._register(e.documentOnDropEditProvider.register("*",new Zw(t)))}};Eq=Ete([hF(0,We),hF(1,M3)],Eq);let mq=class extends ne{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new qFe)),this._register(e.documentPasteEditProvider.register("*",new JFe)),this._register(e.documentPasteEditProvider.register("*",new Zw(t)))}};mq=Ete([hF(0,We),hF(1,M3)],mq);fu(U3.ID,U3,0);KP(mq);ze(new class extends xr{constructor(){super({id:GFe,precondition:UFe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;return(n=U3.get(e))===null||n===void 0?void 0:n.changePasteType()}});be(class extends $e{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(u,e,t){var n;const i=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=U3.get(e))===null||n===void 0?void 0:n.pasteAs(i)}});class zgt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class Wle{constructor(e){this.identifier=e}}const YFe=Ut("treeViewsDndService");au(YFe,zgt,1);var Mgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},gq;const QFe="editor.experimental.dropIntoEditor.defaultProvider",XFe="editor.changeDropType",eye=new Pe("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing"));let Av=gq=class extends ne{static get(e){return e.getContribution(gq.ID)}constructor(e,t,n,i,r){super(),this._configService=n,this._languageFeaturesService=i,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=dF.getInstance(),this._dropProgressManager=this._register(t.createInstance(Uw,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Jw,"dropIntoEditor",e,eye,{id:XFe,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(a=>this.onDropIntoEditor(e,a.position,a.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var i;return AC(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(i=this._currentOperation)===null||i===void 0||i.cancel(),e.focus(),e.setPosition(t);const r=Ui(a=>AC(this,void 0,void 0,function*(){const o=new Gm(e,1,void 0,a);try{const s=yield this.extractDataTransferData(n);if(s.size===0||o.token.isCancellationRequested)return;const l=e.getModel();if(!l)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(l).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(E=>s.matches(E)):!0),d=yield this.getDropEdits(c,l,t,s,o);if(o.token.isCancellationRequested)return;if(d.length){const h=this.getInitialActiveEditIndex(l,d),E=e.getOption(36).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([j.fromPositions(t)],{activeEditIndex:h,allEdits:d},E,a)}}finally{o.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r),this._currentOperation=r})}getDropEdits(e,t,n,i,r){return AC(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>AC(this,void 0,void 0,function*(){try{const l=yield s.provideDocumentOnDropEdits(t,n,i,r.token);if(l)return Object.assign(Object.assign({},l),{providerId:s.id})}catch(l){console.error(l)}}))),r.token),o=b1(a??[]);return KFe(o)})}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(QFe,{resource:e.uri});for(const[i,r]of Object.entries(n)){const a=t.findIndex(o=>r===o.providerId&&o.handledMimeType&&jFe(i,[o.handledMimeType]));if(a>=0)return a}return 0}extractDataTransferData(e){return AC(this,void 0,void 0,function*(){if(!e.dataTransfer)return new OFe;const t=$Fe(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wle.prototype)){const n=this.treeItemsTransfer.getData(Wle.prototype);if(Array.isArray(n))for(const i of n){const r=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(r)for(const[a,o]of r)t.replace(a,o)}}return t})}};Av.ID="editor.contrib.dropIntoEditorController";Av=gq=Mgt([$9(1,mt),$9(2,tu),$9(3,We),$9(4,YFe)],Av);fu(Av.ID,Av,2);ze(new class extends xr{constructor(){super({id:XFe,precondition:eye,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;(n=Av.get(e))===null||n===void 0||n.changeDropType()}});KP(Eq);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{[QFe]:{type:"object",scope:5,description:v("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class _a{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,_a._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,i.changeDecorationOptions(this._highlightedDecorationId,_a._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const a=r.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(a);r=new j(r.startLineNumber,r.startColumn,a,o)}this._rangeHighlightDecorationId=i.addDecoration(r,_a._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=_a._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){i=_a._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/o,c=Math.max(2,Math.ceil(3/l));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let E=1,m=e.length;E=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const a=new Array(e.length);for(let o=0,s=e.length;on.removeDecoration(o)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(o=>n.addDecoration(o,_a._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(!(!i||i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return r;if(!(r.startColumn0){const n=[];for(let a=0;aj.compareRangesUsingStarts(a.range,o.range));const i=[];let r=n[0];for(let a=1;a0?e[0].toUpperCase()+e.substr(1):u[0][0].toUpperCase()!==u[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Gle(u,e,t){return u[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&u[0].split(t).length===e.split(t).length}function Ule(u,e,t){const n=e.split(t),i=u[0].split(t);let r="";return n.forEach((a,o)=>{r+=tye([i[o]],a)+t}),r.slice(0,-1)}class qle{constructor(e){this.staticValue=e,this.kind=0}}class Ngt{constructor(e){this.pieces=e,this.kind=1}}class _v{static fromStaticValue(e){return new _v([d3.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new qle(""):e.length===1&&e[0].staticValue!==null?this._state=new qle(e[0].staticValue):this._state=new Ngt(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?tye(e,this._state.staticValue):this._state.staticValue;let n="";for(let i=0,r=this._state.pieces.length;i0){const s=[],l=a.caseOps.length;let c=0;for(let d=0,h=o.length;d=l){s.push(o.slice(d));break}switch(a.caseOps[c]){case"U":s.push(o[d].toUpperCase());break;case"u":s.push(o[d].toUpperCase()),c++;break;case"L":s.push(o[d].toLowerCase());break;case"l":s.push(o[d].toLowerCase()),c++;break;default:s.push(o[d])}}o=s.join("")}n+=o}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e=i)break;const a=u.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` +`),parse:u=>gR.split(u).filter(e=>!e.startsWith("#"))}),Vle={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Cgt{}const bgt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};jn.add(bgt.DragAndDropContribution,new Cgt);class dF{constructor(){}static getInstance(){return dF.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}dF.INSTANCE=new dF;var kgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function VFe(u){const e=new OFe;for(const t of u.items){const n=t.type;if(t.kind==="string"){const i=new Promise(r=>t.getAsString(r));e.append(n,hte(i))}else if(t.kind==="file"){const i=t.getAsFile();i&&e.append(n,Fgt(i))}}return e}function Fgt(u){const e=u.path?dt.parse(u.path):void 0;return vgt(u.name,e,()=>kgt(this,void 0,void 0,function*(){return new Uint8Array(yield u.arrayBuffer())}))}const ygt=Object.freeze([Vle.EDITORS,Vle.FILES,$k.RESOURCES,$k.INTERNAL_URI_LIST]);function $Fe(u,e=!1){const t=VFe(u),n=t.get($k.INTERNAL_URI_LIST);if(n)t.replace(ci.uriList,n);else if(e||!t.has(ci.uriList)){const i=[];for(const r of u.items){const a=r.getAsFile();if(a){const o=a.path;try{o?i.push(dt.file(o).toString()):i.push(dt.parse(a.name,!0).toString())}catch{}}}i.length&&t.replace(ci.uriList,hte(gR.create(i)))}for(const i of ygt)t.delete(i);return t}function Agt(u,e,t){var n,i;return{edits:[...e.map(r=>new Zh(u,typeof t.insertText=="string"?{range:r,text:t.insertText,insertAsSnippet:!1}:{range:r,text:t.insertText.snippet,insertAsSnippet:!0})),...(i=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&i!==void 0?i:[]]}}function KFe(u){var e;function t(o,s){return"providerId"in o&&o.providerId===s.providerId||"mimeType"in o&&o.mimeType===s.handledMimeType}const n=new Map;for(const o of u)for(const s of(e=o.yieldTo)!==null&&e!==void 0?e:[])for(const l of u)if(l!==o&&t(s,l)){let c=n.get(o);c||(c=[],n.set(o,c)),c.push(l)}if(!n.size)return Array.from(u);const i=new Set,r=[];function a(o){if(!o.length)return[];const s=o[0];if(r.includes(s))return console.warn(`Yield to cycle detected for ${s.providerId}`),o;if(i.has(s))return a(o.slice(1));let l=[];const c=n.get(s);return c&&(r.push(s),l=a(c),r.pop()),i.add(s),[...l,s,...a(o.slice(1))]}return a(Array.from(u))}var _gt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sgt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Bgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const wgt=Lt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:jve,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class fR extends ne{constructor(e,t,n,i,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(i),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ve(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ve("span.icon");this.domNode.append(t),t.classList.add(...st.asClassNameArray(we.loading),"codicon-modifier-spin");const n=()=>{const i=this.editor.getOption(66);this.domNode.style.height=`${i}px`,this.domNode.style.width=`${Math.ceil(.8*i)}px`};n(),this._register(this.editor.onDidChangeConfiguration(i=>{(i.hasChanged(52)||i.hasChanged(66))&&n()})),this._register(ce(this.domNode,Me.CLICK,i=>{this.delegate.cancel()}))}getId(){return fR.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}fR.baseId="editor.widget.inlineProgressWidget";let Uw=class extends ne{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Ir),this._currentWidget=new Ir,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return Bgt(this,void 0,void 0,function*(){const i=this._operationIdPool++;this._currentOperation=i,this.clear(),this._showPromise.value=Rm(()=>{const r=j.fromPositions(e);this._currentDecorations.set([{range:r,options:wgt}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(fR,this.id,this._editor,r,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===i&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Uw=_gt([Sgt(2,mt)],Uw);var WFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},D2=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},dq;let qw=dq=class extends ne{constructor(e,t,n,i,r,a,o,s,l,c){super(),this.typeId=e,this.editor=t,this.showCommand=i,this.range=r,this.edits=a,this.onSelectNewEdit=o,this._contextMenuService=s,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(l),this.visibleContext.set(!0),this._register(ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{r.containsPosition(d.position)||this.dispose()})),this._register(Ne.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ve(".post-edit-widget"),this.button=this._register(new qG(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ce(this.domNode,Me.CLICK,()=>this.showSelector()))}getId(){return dq.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=ji(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>tx({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};qw.baseId="editor.widget.postEditWidget";qw=dq=WFe([D2(7,Wl),D2(8,pt),D2(9,qu)],qw);let Jw=class extends ne{constructor(e,t,n,i,r,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=i,this._instantiationService=r,this._bulkEditService=a,this._currentWidget=this._register(new Ir),this._register(Ne.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,i){var r,a;return $le(this,void 0,void 0,function*(){const o=this._editor.getModel();if(!o||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;let l=[];(typeof s.insertText=="string"?s.insertText==="":s.insertText.snippet==="")?l=[]:l=e.map(f=>new Zh(o.uri,typeof s.insertText=="string"?{range:f,text:s.insertText,insertAsSnippet:!1}:{range:f,text:s.insertText.snippet,insertAsSnippet:!0}));const d={edits:[...l,...(a=(r=s.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&a!==void 0?a:[]]},h=e[0],E=o.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let m,g;try{m=yield this._bulkEditService.apply(d,{editor:this._editor,token:i}),g=o.getDecorationRange(E[0])}finally{o.deltaDecorations(E,[])}n&&m.isApplied&&t.allEdits.length>1&&this.show(g??h,t,f=>$le(this,void 0,void 0,function*(){const p=this._editor.getModel();p&&(yield p.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:f,allEdits:t.allEdits},n,i))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(qw,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};Jw=WFe([D2(4,mt),D2(5,xA)],Jw);var Lgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},lh=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hq;const GFe="editor.changePasteType",UFe=new Pe("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),MH="application/vnd.code.copyMetadata";let U3=hq=class extends ne{static get(e){return e.getContribution(hq.ID)}constructor(e,t,n,i,r,a,o){super(),this._bulkEditService=n,this._clipboardService=i,this._languageFeaturesService=r,this._quickInputService=a,this._progressService=o,this._editor=e;const s=e.getContainerDomNode();this._register(ce(s,"copy",l=>this.handleCopy(l))),this._register(ce(s,"cut",l=>this.handleCopy(l))),this._register(ce(s,"paste",l=>this.handlePaste(l),!0)),this._pasteProgressManager=this._register(new Uw("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Jw,"pasteIntoEditor",e,UFe,{id:GFe,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},JN().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(dg&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),r=this._editor.getSelections();if(!i||!(r!=null&&r.length))return;const a=this._editor.getOption(37);let o=r;const s=r.length===1&&r[0].isEmpty();if(s){if(!a)return;o=[new j(o[0].startLineNumber,1,o[0].startLineNumber,1+i.getLineLength(o[0].startLineNumber))]}const l=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(r,a,na),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:s,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(p=>!!p.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const E=VFe(e.clipboardData),m=h.flatMap(p=>{var D;return(D=p.copyMimeTypes)!==null&&D!==void 0?D:[]}),g=mR();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:d});const f=Ui(p=>lh(this,void 0,void 0,function*(){const D=b1(yield Promise.all(h.map(x=>lh(this,void 0,void 0,function*(){try{return yield x.prepareDocumentPaste(i,o,E,p)}catch(b){console.error(b);return}}))));D.reverse();for(const x of D)for(const[b,k]of x)E.replace(b,k);return E}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:f}}handlePaste(e){var t,n;return lh(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),r=this._editor.getSelections();if(!(r!=null&&r.length)||!i||!this.isPasteAsEnabled())return;const a=this.fetchCopyMetadata(e),o=$Fe(e.clipboardData);o.delete(MH);const s=[...e.clipboardData.types,...(n=a==null?void 0:a.providerCopyMimeTypes)!==null&&n!==void 0?n:[],ci.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(c=>{var d;return(d=c.pasteMimeTypes)===null||d===void 0?void 0:d.some(h=>jFe(h,s))});l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,r,o,a):this.doPasteInline(l,r,o,a))})}doPasteInline(e,t,n,i){const r=Ui(a=>lh(this,void 0,void 0,function*(){const o=this._editor;if(!o.hasModel())return;const s=o.getModel(),l=new Gm(o,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,i,l.token),l.token.isCancellationRequested)return;const c=e.filter(h=>Kle(h,n));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}const d=yield this.getPasteEdits(c,n,s,t,l.token);if(l.token.isCancellationRequested)return;if(d.length===1&&d[0].providerId==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}if(d.length){const h=o.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:d},h,l.token)}yield this.applyDefaultPasteHandler(n,i,l.token)}finally{l.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),r),this._currentPasteOperation=r}showPasteAsPick(e,t,n,i,r){const a=Ui(o=>lh(this,void 0,void 0,function*(){const s=this._editor;if(!s.hasModel())return;const l=s.getModel(),c=new Gm(s,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,r,c.token),c.token.isCancellationRequested)return;let d=t.filter(g=>Kle(g,i));e&&(d=d.filter(g=>g.id===e));const h=yield this.getPasteEdits(d,i,l,n,c.token);if(c.token.isCancellationRequested||!h.length)return;let E;if(e)E=h.at(0);else{const g=yield this._quickInputService.pick(h.map(f=>({label:f.label,description:f.providerId,detail:f.detail,edit:f})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});E=g==null?void 0:g.edit}if(!E)return;const m=Agt(l.uri,n,E);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(MH,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const n=e.clipboardData.getData(MH);if(n)try{return JSON.parse(n)}catch{return}const[i,r]=RW.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:(t=r.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!r.isFromEmptySelection}}}mergeInDataFromCopy(e,t,n){var i;return lh(this,void 0,void 0,function*(){if(t!=null&&t.id&&((i=this._currentCopyOperation)===null||i===void 0?void 0:i.handle)===t.id){const r=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[a,o]of r)e.replace(a,o)}if(!e.has(ci.uriList)){const r=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(ci.uriList,hte(gR.create(r)))}})}getPasteEdits(e,t,n,i,r){return lh(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>lh(this,void 0,void 0,function*(){var l;try{const c=yield(l=s.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(s,n,i,t,r);if(c)return Object.assign(Object.assign({},c),{providerId:s.id})}catch(c){console.error(c)}}))),r),o=b1(a??[]);return KFe(o)})}applyDefaultPasteHandler(e,t,n){var i,r,a;return lh(this,void 0,void 0,function*(){const o=(i=e.get(ci.text))!==null&&i!==void 0?i:e.get("text");if(!o)return;const s=yield o.asString();if(n.isCancellationRequested)return;const l={text:s,pasteOnNewLine:(r=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&r!==void 0?r:!1,multicursorText:(a=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&a!==void 0?a:null,mode:null};this._editor.trigger("keyboard","paste",l)})}};U3.ID="editor.contrib.copyPasteActionController";U3=hq=Lgt([bD(1,mt),bD(2,xA),bD(3,_4),bD(4,We),bD(5,md),bD(6,xbe)],U3);function Kle(u,e){var t;return!!(!((t=u.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var Ete=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hF=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},yv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const mte=v("builtIn","Built-in");class gte{provideDocumentPasteEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,detail:r.detail,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}}class qFe extends gte{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[ci.text],this.pasteMimeTypes=[ci.text]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=e.get(ci.text);if(!n||e.has(ci.uriList))return;const i=yield n.asString();return{handledMimeType:ci.text,label:v("text.label","Insert Plain Text"),detail:mte,insertText:i}})}}class JFe extends gte{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;let i=0;const r=n.map(({uri:o,originalText:s})=>o.scheme===Ot.file?o.fsPath:(i++,s)).join(" ");let a;return i>0?a=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):a=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:ci.uriList,insertText:r,label:a,detail:mte}})}}let Zw=class extends gte{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;const i=b1(n.map(({uri:r})=>{const a=this._workspaceContextService.getWorkspaceFolder(r);return a?tit(a.uri,r):void 0}));if(i.length)return{handledMimeType:ci.uriList,insertText:i.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:mte}})}};Zw=Ete([hF(0,M3)],Zw);function ZFe(u){return yv(this,void 0,void 0,function*(){const e=u.get(ci.uriList);if(!e)return[];const t=yield e.asString(),n=[];for(const i of gR.parse(t))try{n.push({uri:dt.parse(i),originalText:i})}catch{}return n})}let Eq=class extends ne{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new qFe)),this._register(e.documentOnDropEditProvider.register("*",new JFe)),this._register(e.documentOnDropEditProvider.register("*",new Zw(t)))}};Eq=Ete([hF(0,We),hF(1,M3)],Eq);let mq=class extends ne{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new qFe)),this._register(e.documentPasteEditProvider.register("*",new JFe)),this._register(e.documentPasteEditProvider.register("*",new Zw(t)))}};mq=Ete([hF(0,We),hF(1,M3)],mq);fu(U3.ID,U3,0);KP(mq);ze(new class extends xr{constructor(){super({id:GFe,precondition:UFe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;return(n=U3.get(e))===null||n===void 0?void 0:n.changePasteType()}});be(class extends $e{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(u,e,t){var n;const i=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=U3.get(e))===null||n===void 0?void 0:n.pasteAs(i)}});class zgt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class Wle{constructor(e){this.identifier=e}}const YFe=Ut("treeViewsDndService");au(YFe,zgt,1);var Mgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},gq;const QFe="editor.experimental.dropIntoEditor.defaultProvider",XFe="editor.changeDropType",eye=new Pe("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing"));let Av=gq=class extends ne{static get(e){return e.getContribution(gq.ID)}constructor(e,t,n,i,r){super(),this._configService=n,this._languageFeaturesService=i,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=dF.getInstance(),this._dropProgressManager=this._register(t.createInstance(Uw,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Jw,"dropIntoEditor",e,eye,{id:XFe,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(a=>this.onDropIntoEditor(e,a.position,a.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var i;return AC(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(i=this._currentOperation)===null||i===void 0||i.cancel(),e.focus(),e.setPosition(t);const r=Ui(a=>AC(this,void 0,void 0,function*(){const o=new Gm(e,1,void 0,a);try{const s=yield this.extractDataTransferData(n);if(s.size===0||o.token.isCancellationRequested)return;const l=e.getModel();if(!l)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(l).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(E=>s.matches(E)):!0),d=yield this.getDropEdits(c,l,t,s,o);if(o.token.isCancellationRequested)return;if(d.length){const h=this.getInitialActiveEditIndex(l,d),E=e.getOption(36).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([j.fromPositions(t)],{activeEditIndex:h,allEdits:d},E,a)}}finally{o.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r),this._currentOperation=r})}getDropEdits(e,t,n,i,r){return AC(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>AC(this,void 0,void 0,function*(){try{const l=yield s.provideDocumentOnDropEdits(t,n,i,r.token);if(l)return Object.assign(Object.assign({},l),{providerId:s.id})}catch(l){console.error(l)}}))),r.token),o=b1(a??[]);return KFe(o)})}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(QFe,{resource:e.uri});for(const[i,r]of Object.entries(n)){const a=t.findIndex(o=>r===o.providerId&&o.handledMimeType&&jFe(i,[o.handledMimeType]));if(a>=0)return a}return 0}extractDataTransferData(e){return AC(this,void 0,void 0,function*(){if(!e.dataTransfer)return new OFe;const t=$Fe(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wle.prototype)){const n=this.treeItemsTransfer.getData(Wle.prototype);if(Array.isArray(n))for(const i of n){const r=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(r)for(const[a,o]of r)t.replace(a,o)}}return t})}};Av.ID="editor.contrib.dropIntoEditorController";Av=gq=Mgt([$9(1,mt),$9(2,tu),$9(3,We),$9(4,YFe)],Av);fu(Av.ID,Av,2);ze(new class extends xr{constructor(){super({id:XFe,precondition:eye,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;(n=Av.get(e))===null||n===void 0||n.changeDropType()}});KP(Eq);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{[QFe]:{type:"object",scope:5,description:v("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class _a{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,_a._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,i.changeDecorationOptions(this._highlightedDecorationId,_a._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const a=r.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(a);r=new j(r.startLineNumber,r.startColumn,a,o)}this._rangeHighlightDecorationId=i.addDecoration(r,_a._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=_a._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){i=_a._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/o,c=Math.max(2,Math.ceil(3/l));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let E=1,m=e.length;E=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const a=new Array(e.length);for(let o=0,s=e.length;on.removeDecoration(o)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(o=>n.addDecoration(o,_a._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(!(!i||i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return r;if(!(r.startColumn0){const n=[];for(let a=0;aj.compareRangesUsingStarts(a.range,o.range));const i=[];let r=n[0];for(let a=1;a0?e[0].toUpperCase()+e.substr(1):u[0][0].toUpperCase()!==u[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Gle(u,e,t){return u[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&u[0].split(t).length===e.split(t).length}function Ule(u,e,t){const n=e.split(t),i=u[0].split(t);let r="";return n.forEach((a,o)=>{r+=tye([i[o]],a)+t}),r.slice(0,-1)}class qle{constructor(e){this.staticValue=e,this.kind=0}}class Ngt{constructor(e){this.pieces=e,this.kind=1}}class _v{static fromStaticValue(e){return new _v([d3.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new qle(""):e.length===1&&e[0].staticValue!==null?this._state=new qle(e[0].staticValue):this._state=new Ngt(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?tye(e,this._state.staticValue):this._state.staticValue;let n="";for(let i=0,r=this._state.pieces.length;i0){const s=[],l=a.caseOps.length;let c=0;for(let d=0,h=o.length;d=l){s.push(o.slice(d));break}switch(a.caseOps[c]){case"U":s.push(o[d].toUpperCase());break;case"u":s.push(o[d].toUpperCase()),c++;break;case"L":s.push(o[d].toLowerCase());break;case"l":s.push(o[d].toLowerCase()),c++;break;default:s.push(o[d])}}o=s.join("")}n+=o}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e=i)break;const a=u.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` `,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(a));break}continue}if(r===36){if(n++,n>=i)break;const a=u.charCodeAt(n);if(a===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(a===48||a===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=a&&a<=57){let o=a-48;if(n+1this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Su(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},Igt)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t<"u"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(o=>{if(o.startLineNumber!==o.endLineNumber){let s=o.endLineNumber;return o.endColumn===1&&(s=s-1),new j(o.startLineNumber,1,s,this._editor.getModel().getLineMaxColumn(s))}return o}));const i=this._findMatches(n,!1,OE);this._decorations.set(i,n);const r=this._editor.getSelection();let a=this._decorations.getCurrentMatchesPosition(r);if(a===0&&i.length>0){const o=pk(i.map(s=>s.range),s=>j.compareRangesUsingStarts(s,r)>=0);a=o>0?o-1+1:a}this._state.changeMatchInfo(a,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:i}=e;const r=this._editor.getModel();return t||i===1?(n===1?n=r.getLineCount():n--,i=r.getLineMaxColumn(n)):i--,new ee(n,i)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const c=this._decorations.matchAfterPosition(e);c&&this._setCurrentFindMatch(c);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:i}=e;const r=this._editor.getModel();return t||i===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,i=1):i++,new ee(n,i)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()x2._getSearchRange(this._editor.getModel(),r));return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,t,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=OE?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new of(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let d="mu";n.ignoreCase&&(d+="i"),n.global&&(d+="g"),n=new RegExp(n.source,d)}const i=this._editor.getModel(),r=i.getValue(1),a=i.getFullModelRange(),o=this._getReplacePattern();let s;const l=this._state.preserveCase;o.hasReplacementPatterns||l?s=r.replace(n,function(){return o.buildReplaceString(arguments,l)}):s=r.replace(n,o.buildReplaceString(null,l));const c=new SX(a,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),i=[];for(let a=0,o=n.length;aa.range),i);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let n=this._findMatches(e,!1,1073741824).map(r=>new Ye(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn));const i=this._editor.getSelection();for(let r=0,a=n.length;rthis._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const i={inputActiveOptionBorder:Re(pX),inputActiveOptionForeground:Re(DX),inputActiveOptionBackground:Re(If)};this.caseSensitive=this._register(new Ybe(Object.assign({appendTitle:this._keybindingLabelFor(rn.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},i))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new Qbe(Object.assign({appendTitle:this._keybindingLabelFor(rn.ToggleWholeWordCommand),isChecked:this._state.wholeWord},i))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new Xbe(Object.assign({appendTitle:this._keybindingLabelFor(rn.ToggleRegexCommand),isChecked:this._state.isRegex},i))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(r=>{let a=!1;r.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),r.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),r.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(ce(this._domNode,Me.MOUSE_LEAVE,r=>this._onMouseLeave())),this._register(ce(this._domNode,"mouseover",r=>this._onMouseOver()))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return DR.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}DR.ID="editor.contrib.findOptionsWidget";function J9(u,e){return u===1?!0:u===2?!1:e}class Ogt extends ne{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return J9(this._isRegexOverride,this._isRegex)}get wholeWord(){return J9(this._wholeWordOverride,this._wholeWord)}get matchCase(){return J9(this._matchCaseOverride,this._matchCase)}get preserveCase(){return J9(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new Q),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){const i={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,r=!0),typeof n<"u"&&(j.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(i)}change(e,t,n=!0){var i;const r={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let a=!1;const o=this.isRegex,s=this.wholeWord,l=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,a=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,a=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,a=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.isReplaceRevealed=!0,a=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&(!((i=e.searchScope)===null||i===void 0)&&i.every(d=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(E=>!j.equalsRange(E,d))})||(this._searchScope=e.searchScope,r.searchScope=!0,a=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,r.loop=!0,a=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,r.isSearching=!0,a=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,r.filters=!0,a=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,o!==this.isRegex&&(a=!0,r.isRegex=!0),s!==this.wholeWord&&(a=!0,r.wholeWord=!0),l!==this.matchCase&&(a=!0,r.matchCase=!0),c!==this.preserveCase&&(a=!0,r.preserveCase=!0),a&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=OE}}const jgt=v("defaultLabel","input"),Hgt=v("label.preserveCaseToggle","Preserve Case");class Vgt extends x6{constructor(e){super({icon:we.preserveCase,title:Hgt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class $gt extends $l{constructor(e,t,n,i){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Q),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Q),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Q),this._onInput=this._register(new Q),this._onKeyUp=this._register(new Q),this._onPreserveCaseKeyDown=this._register(new Q),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||jgt;const r=i.appendPreserveCaseLabel||"",a=i.history||[],o=!!i.flexibleHeight,s=!!i.flexibleWidth,l=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new e2e(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:a,showHistoryHint:i.showHistoryHint,flexibleHeight:o,flexibleWidth:s,flexibleMaxHeight:l,inputBoxStyles:i.inputBoxStyles})),this.preserveCase=this._register(new Vgt(Object.assign({appendTitle:r,isChecked:!1},i.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const c=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const E=c.indexOf(document.activeElement);if(E>=0){let m=-1;h.equals(17)?m=(E+1)%c.length:h.equals(15)&&(E===0?m=c.length-1:m=E-1),h.equals(9)?(c[E].blur(),this.inputBox.focus()):m>=0&&c[m].focus(),It.stop(h,!0)}}});const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var uye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},nye=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const pte=new Pe("suggestWidgetVisible",!1,v("suggestWidgetVisible","Whether suggestion are visible")),Dte="historyNavigationWidgetFocus",iye="historyNavigationForwardsEnabled",rye="historyNavigationBackwardsEnabled";let t4;const Z9=[];function aye(u,e){if(Z9.includes(e))throw new Error("Cannot register the same widget multiple times");Z9.push(e);const t=new pe,n=new Pe(Dte,!1).bindTo(u),i=new Pe(iye,!0).bindTo(u),r=new Pe(rye,!0).bindTo(u),a=()=>{n.set(!0),t4=e},o=()=>{n.set(!1),t4===e&&(t4=void 0)};return e.element===document.activeElement&&a(),t.add(e.onDidFocus(()=>a())),t.add(e.onDidBlur(()=>o())),t.add(ft(()=>{Z9.splice(Z9.indexOf(e),1),o()})),{historyNavigationForwardsEnablement:i,historyNavigationBackwardsEnablement:r,dispose(){t.dispose()}}}let fq=class extends t2e{constructor(e,t,n,i){super(e,t,n);const r=this._register(i.createScoped(this.inputBox.element));this._register(aye(r,this.inputBox))}};fq=uye([nye(3,pt)],fq);let pq=class extends $gt{constructor(e,t,n,i,r=!1){super(e,t,r,n);const a=this._register(i.createScoped(this.inputBox.element));this._register(aye(a,this.inputBox))}};pq=uye([nye(3,pt)],pq);Po.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Ee.and(Ee.has(Dte),Ee.equals(rye,!0),Ee.not("isComposing"),pte.isEqualTo(!1)),primary:16,secondary:[528],handler:u=>{t4==null||t4.showPreviousValue()}});Po.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Ee.and(Ee.has(Dte),Ee.equals(iye,!0),Ee.not("isComposing"),pte.isEqualTo(!1)),primary:18,secondary:[530],handler:u=>{t4==null||t4.showNextValue()}});function Jle(u){var e,t;return((e=u.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=u.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var Kgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Wgt=hi("find-selection",we.selection,v("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Zle=hi("find-collapsed",we.chevronRight,v("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Yle=hi("find-expanded",we.chevronDown,v("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Ggt=hi("find-replace",we.replace,v("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Ugt=hi("find-replace-all",we.replaceAll,v("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),qgt=hi("find-previous-match",we.arrowUp,v("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Jgt=hi("find-next-match",we.arrowDown,v("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Zgt=v("label.findDialog","Find / Replace"),Ygt=v("label.find","Find"),Qgt=v("placeholder.find","Find"),Xgt=v("label.previousMatchButton","Previous Match"),eft=v("label.nextMatchButton","Next Match"),tft=v("label.toggleSelectionFind","Find in Selection"),uft=v("label.closeButton","Close"),nft=v("label.replace","Replace"),ift=v("placeholder.replace","Replace"),rft=v("label.replaceButton","Replace"),aft=v("label.replaceAllButton","Replace All"),oft=v("label.toggleReplaceButton","Toggle Replace"),sft=v("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",OE),lft=v("label.matchesLocation","{0} of {1}"),Qle=v("label.noResults","No results"),kd=419,cft=275,dft=cft-54;let _C=69;const hft=33,Xle="ctrlEnterReplaceAll.windows.donotask",ece=iu?256:2048;class TH{constructor(e){this.afterLineNumber=e,this.heightInPx=hft,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function tce(u,e,t){const n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){u.stopPropagation();return}}function uce(u,e,t){const n=!!e.match(/\n/);if(t&&n&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(c=>this._onStateChanged(c))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(c=>{if(c.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),c.hasChanged(143)&&this._tryUpdateWidgetWidth(),c.hasChanged(2)&&this.updateAccessibilitySupport(),c.hasChanged(41)){const d=this._codeEditor.getOption(41).loop;this._state.change({loop:d},!1);const h=this._codeEditor.getOption(41).addExtraSpaceOnTop;h&&!this._viewZone&&(this._viewZone=new TH(0),this._showViewZone()),!h&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Kgt(this,void 0,void 0,function*(){if(this._isVisible){const c=yield this._controller.getGlobalBufferTerm();c&&c!==this._state.searchString&&(this._state.change({searchString:c},!1),this._findInput.select())}}))),this._findInputFocused=pR.bindTo(a),this._findFocusTracker=this._register(y1(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=fte.bindTo(a),this._replaceFocusTracker=this._register(y1(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new TH(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(c=>{if(c.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return xR.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(90)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=ko(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,zt)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=_C+"px",this._state.matchesCount>=OE?this._matchesCount.title=sft:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=OE&&(t+="+");let n=String(this._state.matchesPosition);n==="0"&&(n="?"),e=y3(lft,n,t)}else e=Qle;this._matchesCount.appendChild(document.createTextNode(e)),ga(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),_C=Math.max(_C,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===Qle)return n===""?v("ariaSearchNoResultEmpty","{0} found",e):v("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){const i=v("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${i}`:i}return v("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const n=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const i=ji(n),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),a=i.left+(r?r.left:0),o=r?r.top:0;if(this._viewZone&&oe.startLineNumber&&(t=!1);const s=a6e(this._domNode).left;a>s&&(t=!1);const l=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());i.left+(l?l.left:0)>s&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(i=>{n.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new TH(0));const n=this._viewZone;this._codeEditor.changeViewZones(i=>{if(this._viewZoneId!==void 0){const r=this._getHeight();if(r===n.heightInPx)return;const a=r-n.heightInPx;n.heightInPx=r,i.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+a);return}else{let r=this._getHeight();if(r-=this._codeEditor.getOption(83).top,r<=0)return;n.heightInPx=r,this._viewZoneId=i.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!XQ(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const n=e.width,i=e.minimap.minimapWidth;let r=!1,a=!1,o=!1;if(this._resized&&ko(this._domNode)>kd){this._domNode.style.maxWidth=`${n-28-i-15}px`,this._replaceInput.width=ko(this._findInput.domNode);return}if(kd+28+i>=n&&(a=!0),kd+28+i-_C>=n&&(o=!0),kd+28+i-_C>=n+50&&(r=!0),this._domNode.classList.toggle("collapsed-find-widget",r),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",a),!o&&!r&&(this._domNode.style.maxWidth=`${n-28-i-15}px`),this._findInput.layout({collapsedFindWidget:r,narrowFindWidget:o,reducedFindWidget:a}),this._resized){const s=this._findInput.inputBox.element.clientWidth;s>0&&(this._replaceInput.width=s)}else this._isReplaceVisible&&(this._replaceInput.width=ko(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!j.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(ece|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return tce(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return uce(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(ece|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{na&&Oc&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(v("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Xle,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` `),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return tce(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return uce(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new fq(null,this._contextViewProvider,{width:dft,label:Ygt,placeholder:Qgt,appendCaseSensitiveLabel:this._keybindingLabelFor(rn.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(rn.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(rn.ToggleRegexCommand),validation:s=>{if(s.length===0||!this._findInput.getRegex())return null;try{return new RegExp(s,"gu"),null}catch(l){return{content:l.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>Jle(this._keybindingService),inputBoxStyles:dw,toggleStyles:cw},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(s=>this._onFindInputKeyDown(s))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(s=>{s.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),s.preventDefault())})),this._register(this._findInput.onRegexKeyDown(s=>{s.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),s.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(s=>{this._tryUpdateHeight()&&this._showViewZone()})),Pa&&this._register(this._findInput.onMouseDown(s=>this._onFindInputMouseDown(s))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new kD({label:Xgt+this._keybindingLabelFor(rn.PreviousMatchFindAction),icon:qgt,onTrigger:()=>{Nf(this._codeEditor.getAction(rn.PreviousMatchFindAction)).run().then(void 0,zt)}})),this._nextBtn=this._register(new kD({label:eft+this._keybindingLabelFor(rn.NextMatchFindAction),icon:Jgt,onTrigger:()=>{Nf(this._codeEditor.getAction(rn.NextMatchFindAction)).run().then(void 0,zt)}}));const n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const i=document.createElement("div");i.className="find-actions",n.appendChild(i),i.appendChild(this._matchesCount),i.appendChild(this._prevBtn.domNode),i.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new x6({icon:Wgt,title:tft+this._keybindingLabelFor(rn.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:Re(If),inputActiveOptionBorder:Re(pX),inputActiveOptionForeground:Re(DX)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const s=this._codeEditor.getSelections();s.map(l=>(l.endColumn===1&&l.endLineNumber>l.startLineNumber&&(l=l.setEndPosition(l.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(l.endLineNumber-1))),l.isEmpty()?null:l)).filter(l=>!!l),s.length&&this._state.change({searchScope:s},!0)}}else this._state.change({searchScope:null},!0)})),i.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kD({label:uft+this._keybindingLabelFor(rn.CloseFindWidgetCommand),icon:F2e,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:s=>{s.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),s.preventDefault())}})),this._replaceInput=this._register(new pq(null,void 0,{label:nft,placeholder:ift,appendPreserveCaseLabel:this._keybindingLabelFor(rn.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Jle(this._keybindingService),inputBoxStyles:dw,toggleStyles:cw},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(s=>this._onReplaceInputKeyDown(s))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(s=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(s=>{s.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),s.preventDefault())})),this._replaceBtn=this._register(new kD({label:rft+this._keybindingLabelFor(rn.ReplaceOneAction),icon:Ggt,onTrigger:()=>{this._controller.replace()},onKeyDown:s=>{s.equals(1026)&&(this._closeBtn.focus(),s.preventDefault())}})),this._replaceAllBtn=this._register(new kD({label:aft+this._keybindingLabelFor(rn.ReplaceAllAction),icon:Ugt,onTrigger:()=>{this._controller.replaceAll()}}));const r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",r.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new kD({label:oft,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=ko(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=Zgt,this._domNode.role="dialog",this._domNode.style.width=`${kd}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(r),this._resizeSash=new oa(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=kd;this._register(this._resizeSash.onDidStart(()=>{o=ko(this._domNode)})),this._register(this._resizeSash.onDidChange(s=>{this._resized=!0;const l=o+s.startX-s.currentX;if(lc||(this._domNode.style.width=`${l}px`,this._isReplaceVisible&&(this._replaceInput.width=ko(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const s=ko(this._domNode);if(s{this._opts.onTrigger(),n.preventDefault()}),this.onkeydown(this._domNode,n=>{var i,r;if(n.equals(10)||n.equals(3)){this._opts.onTrigger(),n.preventDefault();return}(r=(i=this._opts).onKeyDown)===null||r===void 0||r.call(i,n)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...st.asClassNameArray(Zle)),this._domNode.classList.add(...st.asClassNameArray(Yle))):(this._domNode.classList.remove(...st.asClassNameArray(Yle)),this._domNode.classList.add(...st.asClassNameArray(Zle)))}}Kl((u,e)=>{const t=(g,f)=>{f&&e.addRule(`.monaco-editor ${g} { background-color: ${f}; }`)};t(".findMatch",u.getColor(a1)),t(".currentFindMatch",u.getColor(jXe)),t(".findScope",u.getColor(HXe));const n=u.getColor(ti);t(".find-widget",n);const i=u.getColor(t1);i&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${i}; }`);const r=u.getColor(fX);r&&e.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${r}; border-right: 1px solid ${r}; border-bottom: 1px solid ${r}; }`);const a=u.getColor(LE);a&&e.addRule(`.monaco-editor .findMatch { border: 1px ${$c(u.type)?"dotted":"solid"} ${a}; box-sizing: border-box; }`);const o=u.getColor(VXe);o&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${o}; padding: 1px; box-sizing: border-box; }`);const s=u.getColor($Xe);s&&e.addRule(`.monaco-editor .findScope { border: 1px ${$c(u.type)?"dashed":"solid"} ${s}; }`);const l=u.getColor(eu);l&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=u.getColor(i1);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const d=u.getColor(lXe);d&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const h=u.getColor(LXe);if(h)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const g=u.getColor(r1);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}const E=u.getColor(NW);E&&e.addRule(` @@ -696,7 +696,7 @@ ${e.toString()}`}}class yw{constructor(e=new CP,t=!1,n,i=Sct){var r;this._servic .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${E} !important; } - `);const m=u.getColor(Os);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)});var oye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},q3=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Dq;const Eft=524288;function xq(u,e="single",t=!1){if(!u.hasModel())return null;const n=u.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const i=u.getConfiguredWordAtPosition(n.getStartPosition());if(i&&t===!1)return i.word}else if(u.getModel().getValueLengthInRange(n)this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!pR.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=qs(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return q3(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){const i=xq(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);i&&(this._state.isRegex?n.searchString=qs(i):n.searchString=i)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const i=xq(this._editor,e.seedSearchStringFromSelection);i&&(n.searchString=i)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){const i=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;i&&(n.searchString=i)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){const i=this._editor.getSelections();i.some(r=>!r.isEmpty())&&(n.searchScope=i)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new x2(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?!((e=this._editor.getModel())===null||e===void 0)&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(v("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return q3(this,void 0,void 0,function*(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};so.ID="editor.contrib.findController";so=Dq=oye([mc(1,pt),mc(2,Ul),mc(3,_4),mc(4,bi)],so);let vq=class extends so{constructor(e,t,n,i,r,a,o,s){super(e,n,o,s,a),this._contextViewService=t,this._keybindingService=i,this._themeService=r,this._widget=null,this._findOptionsWidget=null}_start(e,t){const n=Object.create(null,{_start:{get:()=>super._start}});return q3(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let r=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":{r=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||r,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new xR(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new DR(this._editor,this._state,this._keybindingService))}};vq=oye([mc(1,F4),mc(2,pt),mc(3,qu),mc(4,sr),mc(5,bi),mc(6,Ul),mc(7,_4)],vq);const mft=m6e(new E6e({id:rn.StartFindAction,label:v("startFindAction","Find"),alias:"Find",precondition:Ee.or(W.focus,Ee.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:K.MenubarEditMenu,group:"3_find",title:v({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));mft.addImplementation(0,(u,e,t)=>{const n=so.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const gft={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:v("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. + `);const m=u.getColor(js);m&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${m}; }`)});var oye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},q3=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Dq;const Eft=524288;function xq(u,e="single",t=!1){if(!u.hasModel())return null;const n=u.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const i=u.getConfiguredWordAtPosition(n.getStartPosition());if(i&&t===!1)return i.word}else if(u.getModel().getValueLengthInRange(n)this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!pR.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Js(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return q3(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const n=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection==="single"){const i=xq(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);i&&(this._state.isRegex?n.searchString=Js(i):n.searchString=i)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const i=xq(this._editor,e.seedSearchStringFromSelection);i&&(n.searchString=i)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){const i=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;i&&(n.searchString=i)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){const i=this._editor.getSelections();i.some(r=>!r.isEmpty())&&(n.searchScope=i)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new x2(this._editor,this._state))})}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?!((e=this._editor.getModel())===null||e===void 0)&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(v("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return q3(this,void 0,void 0,function*(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};so.ID="editor.contrib.findController";so=Dq=oye([mc(1,pt),mc(2,Ul),mc(3,_4),mc(4,bi)],so);let vq=class extends so{constructor(e,t,n,i,r,a,o,s){super(e,n,o,s,a),this._contextViewService=t,this._keybindingService=i,this._themeService=r,this._widget=null,this._findOptionsWidget=null}_start(e,t){const n=Object.create(null,{_start:{get:()=>super._start}});return q3(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let r=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":{r=!!i&&i.startLineNumber!==i.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||r,yield n._start.call(this,e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new xR(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new DR(this._editor,this._state,this._keybindingService))}};vq=oye([mc(1,F4),mc(2,pt),mc(3,qu),mc(4,sr),mc(5,bi),mc(6,Ul),mc(7,_4)],vq);const mft=m6e(new E6e({id:rn.StartFindAction,label:v("startFindAction","Find"),alias:"Find",precondition:Ee.or(W.focus,Ee.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:K.MenubarEditMenu,group:"3_find",title:v({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));mft.addImplementation(0,(u,e,t)=>{const n=so.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop}):!1});const gft={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:v("actions.find.isRegexOverride",`Overrides "Use Regular Expression" flag. The flag will not be saved for the future. 0: Do Nothing 1: True @@ -712,7 +712,7 @@ The flag will not be saved for the future. The flag will not be saved for the future. 0: Do Nothing 1: True -2: False`)},findInSelection:{type:"boolean"}}}}]};class fft extends $e{constructor(){super({id:rn.StartFindWithArgs,label:v("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:gft})}run(e,t,n){return q3(this,void 0,void 0,function*(){const i=so.get(t);if(i){const r=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(41).loop},r),i.setGlobalBufferTerm(i.getState().searchString)}})}}class pft extends $e{constructor(){super({id:rn.StartFindWithSelection,label:v("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}}class sye extends $e{run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))})}}class Dft extends sye{constructor(){super({id:rn.NextMatchFindAction,label:v("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:W.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:Ee.and(W.focus,pR),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class xft extends sye{constructor(){super({id:rn.PreviousMatchFindAction,label:v("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:W.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:Ee.and(W.focus,pR),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class vft extends $e{constructor(){super({id:rn.GoToMatchFindAction,label:v("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:S4}),this._highlightDecorations=[]}run(e,t,n){const i=so.get(t);if(!i)return;const r=i.getState().matchesCount;if(r<1){e.get(bi).notify({severity:bP.Warning,message:v("findMatchAction.noResults","No matches. Try searching for something else.")});return}const o=e.get(md).createInputBox();o.placeholder=v("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",r);const s=c=>{const d=parseInt(c);if(isNaN(d))return;const h=i.getState().matchesCount;if(d>0&&d<=h)return d-1;if(d<0&&d>=-h)return h+d},l=c=>{const d=s(c);if(typeof d=="number"){o.validationMessage=void 0,i.goToMatch(d);const h=i.getState().currentMatch;h&&this.addDecorations(t,h)}else o.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",i.getState().matchesCount),this.clearDecorations(t)};o.onDidChangeValue(c=>{l(c)}),o.onDidAccept(()=>{const c=s(o.value);typeof c=="number"?(i.goToMatch(c),o.hide()):o.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",i.getState().matchesCount)}),o.onDidHide(()=>{this.clearDecorations(t),o.dispose()}),o.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Jn(fCe),position:Js.Full}}}])})}}class lye extends $e{run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);if(!n)return;const i=xq(t,"single",!1);i&&n.setSearchString(i),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))})}}class Cft extends lye{constructor(){super({id:rn.NextSelectionMatchFindAction,label:v("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class bft extends lye{constructor(){super({id:rn.PreviousSelectionMatchFindAction,label:v("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const kft=m6e(new E6e({id:rn.StartFindReplaceAction,label:v("startReplace","Replace"),alias:"Replace",precondition:Ee.or(W.focus,Ee.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:K.MenubarEditMenu,group:"3_find",title:v({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));kft.addImplementation(0,(u,e,t)=>{if(!e.hasModel()||e.getOption(90))return!1;const n=so.get(e);if(!n)return!1;const i=e.getSelection(),r=n.isFindInputFocused(),a=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!r,o=r||a?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:a?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:o,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});fu(so.ID,vq,0);be(fft);be(pft);be(Dft);be(xft);be(vft);be(Cft);be(bft);const gd=xr.bindToContribution(so.get);ze(new gd({id:rn.CloseFindWidgetCommand,precondition:S4,handler:u=>u.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:9,secondary:[1033]}}));ze(new gd({id:rn.ToggleCaseSensitiveCommand,precondition:void 0,handler:u=>u.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:K9.primary,mac:K9.mac,win:K9.win,linux:K9.linux}}));ze(new gd({id:rn.ToggleWholeWordCommand,precondition:void 0,handler:u=>u.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:W9.primary,mac:W9.mac,win:W9.win,linux:W9.linux}}));ze(new gd({id:rn.ToggleRegexCommand,precondition:void 0,handler:u=>u.toggleRegex(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:G9.primary,mac:G9.mac,win:G9.win,linux:G9.linux}}));ze(new gd({id:rn.ToggleSearchScopeCommand,precondition:void 0,handler:u=>u.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:U9.primary,mac:U9.mac,win:U9.win,linux:U9.linux}}));ze(new gd({id:rn.TogglePreserveCaseCommand,precondition:void 0,handler:u=>u.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:q9.primary,mac:q9.mac,win:q9.win,linux:q9.linux}}));ze(new gd({id:rn.ReplaceOneAction,precondition:S4,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:3094}}));ze(new gd({id:rn.ReplaceOneAction,precondition:S4,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,fte),primary:3}}));ze(new gd({id:rn.ReplaceAllAction,precondition:S4,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:2563}}));ze(new gd({id:rn.ReplaceAllAction,precondition:S4,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,fte),primary:void 0,mac:{primary:2051}}}));ze(new gd({id:rn.SelectAllMatchesAction,precondition:S4,handler:u=>u.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:515}}));const Fft={0:" ",1:"u",2:"r"},nce=65535,gc=16777215,ice=4278190080;class NH{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,n=e%32;return(this._states[t]&1<nce)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new NH(e.length),this._userDefinedStates=new NH(e.length),this._recoveredStates=new NH(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(n,i)=>{const r=e[e.length-1];return this.getStartLineNumber(r)<=n&&this.getEndLineNumber(r)>=i};for(let n=0,i=this._startIndexes.length;ngc||a>gc)throw new Error("startLineNumber or endLineNumber must not exceed "+gc);for(;e.length>0&&!t(r,a);)e.pop();const o=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=r+((o&255)<<24),this._endIndexes[n]=a+((o&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&gc}getEndLineNumber(e){return this._endIndexes[e]&gc}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let i=0;i>>24)+((this._endIndexes[e]&ice)>>>16);return t===nce?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(g)?p=>pp=c.startLineNumber))l&&l.startLineNumber===c.startLineNumber?(c.source===1?g=c:(g=l,g.isCollapsed=c.isCollapsed&&l.endLineNumber===c.endLineNumber,g.source=0),l=r(++o)):(g=c,c.isCollapsed&&c.source===0&&(g.source=2)),c=a(++s);else{let f=s,p=c;for(;;){if(!p||p.startLineNumber>l.endLineNumber){g=l;break}if(p.source===1&&p.endLineNumber>l.endLineNumber)break;p=a(++f)}l=r(++o)}if(g){for(;h&&h.endLineNumberg.startLineNumber&&g.startLineNumber>E&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),E=g.startLineNumber,h&&d.push(h),h=g)}}return m}}class yft{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class Aft{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Q,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new ws(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,i)=>n.regionIndex-i.regionIndex);const t={};this._decorationProvider.changeDecorations(n=>{let i=0,r=-1,a=-1;const o=s=>{for(;ia&&(a=l),i++}};for(const s of e){const l=s.regionIndex,c=this._editorDecorationIds[l];if(c&&!t[c]){t[c]=!0,o(l);const d=!this._regions.isCollapsed(l);this._regions.setCollapsed(l,d),r=Math.max(r,this._regions.getEndLineNumber(l))}}o(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,n=i=>{for(const r of e)if(!(r.startLineNumber>i.endLineNumber||i.startLineNumber>r.endLineNumber))return!0;return!1};for(let i=0;in&&(n=o)}this._decorationProvider.changeDecorations(i=>this._editorDecorationIds=i.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(i,r)=>{for(const a of e)if(i=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>n)continue;const o=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);t.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,isCollapsed:a.isCollapsed,source:a.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;const i=[],r=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>r)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);(!o.checksum||s===o.checksum)&&i.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:(t=o.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=o.source)!==null&&n!==void 0?n:0})}const a=ws.sanitizeAndMerge(this._regions,i,r);this.updatePost(ws.fromFoldRanges(a))}_getLinesChecksum(e,t){return M6e(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const n=[];if(this._regions){let i=this._regions.findRange(e),r=1;for(;i>=0;){const a=this._regions.toRegion(i);(!t||t(a,r))&&n.push(a),r++,i=a.parentIndex}}return n}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const n=[],i=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const a=[];for(let o=i,s=this._regions.length;o0&&!l.containedBy(a[a.length-1]);)a.pop();a.push(l),t(l,a.length)&&n.push(l)}else break}}else for(let a=i,o=this._regions.length;a1){const o=u.getRegionsInside(r,(s,l)=>s.isCollapsed!==a&&l0)for(const r of n){const a=u.getRegionAtLine(r);if(a&&(a.isCollapsed!==e&&i.push(a),t>1)){const o=u.getRegionsInside(a,(s,l)=>s.isCollapsed!==e&&la.isCollapsed!==e&&oo.isCollapsed!==e&&s<=t);i.push(...a)}u.toggleCollapseState(i)}function _ft(u,e,t){const n=[];for(const i of t){const r=u.getAllRegionsAtLine(i,a=>a.isCollapsed!==e);r.length>0&&n.push(r[0])}u.toggleCollapseState(n)}function Sft(u,e,t,n){const i=(a,o)=>o===e&&a.isCollapsed!==t&&!n.some(s=>a.containsLine(s)),r=u.getRegionsInside(null,i);u.toggleCollapseState(r)}function hye(u,e,t){const n=[];for(const a of t){const o=u.getAllRegionsAtLine(a,void 0);o.length>0&&n.push(o[0])}const i=a=>n.every(o=>!o.containedBy(a)&&!a.containedBy(o))&&a.isCollapsed!==e,r=u.getRegionsInside(null,i);u.toggleCollapseState(r)}function xte(u,e,t){const n=u.textModel,i=u.regions,r=[];for(let a=i.length-1;a>=0;a--)if(t!==i.isCollapsed(a)){const o=i.getStartLineNumber(a);e.test(n.getLineContent(o))&&r.push(i.toRegion(a))}u.toggleCollapseState(r)}function vte(u,e,t){const n=u.regions,i=[];for(let r=n.length-1;r>=0;r--)t!==n.isCollapsed(r)&&e===n.getType(r)&&i.push(n.toRegion(r));u.toggleCollapseState(i)}function Bft(u,e){let t=null;const n=e.getRegionAtLine(u);if(n!==null&&(t=n.startLineNumber,u===t)){const i=n.parentIndex;i!==-1?t=e.regions.getStartLineNumber(i):t=null}return t}function wft(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){if(u!==t.startLineNumber)return t.startLineNumber;{const n=t.parentIndex;let i=0;for(n!==-1&&(i=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=i)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Lft(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){const n=t.parentIndex;let i=0;if(n!==-1)i=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;i=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=i)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>u)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||Vm(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let n=0,i=0,r=Number.MAX_VALUE,a=-1;const o=this._foldingModel.regions;for(;n0}isHidden(e){return rce(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const n=this._foldingModel.textModel;let i=null;const r=a=>((!i||!Mft(a,i))&&(i=rce(this._hiddenRanges,a)),i?i.startLineNumber-1:null);for(let a=0,o=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function Mft(u,e){return u>=e.startLineNumber&&u<=e.endLineNumber}function rce(u,e){const t=pk(u,n=>e=0&&u[t].endLineNumber>=e?u[t]:null}const Tft=5e3,Nft="indent";class Cte{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Nft}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,i=t&&t.markers;return Promise.resolve(Ift(this.editorModel,n,i,this.foldingRangesLimit))}}let Pft=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>gc||t>gc)return;const i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let r=this._length-1,a=0;r>=0;r--,a++)n[a]=this._startIndexes[r],i[a]=this._endIndexes[r];return new ws(n,i)}else{this._foldingRangesLimit.update(this._length,t);let n=0,i=this._indentOccurrences.length;for(let s=0;st){i=s;break}n+=l}}const r=e.getOptions().tabSize,a=new Uint32Array(t),o=new Uint32Array(t);for(let s=this._length-1,l=0;s>=0;s--){const c=this._startIndexes[s],d=e.getLineContent(c),h=pP(d,r);(h{}};function Ift(u,e,t,n=Rft){const i=u.getOptions().tabSize,r=new Pft(n);let a;t&&(a=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const o=[],s=u.getLineCount()+1;o.push({indent:-1,endAbove:s,line:s});for(let l=u.getLineCount();l>0;l--){const c=u.getLineContent(l),d=pP(c,i);let h=o[o.length-1];if(d===-1){e&&(h.endAbove=l);continue}let E;if(a&&(E=c.match(a)))if(E[1]){let m=o.length-1;for(;m>0&&o[m].indent!==-2;)m--;if(m>0){o.length=m+1,h=o[m],r.insertFirst(l,h.line,d),h.line=l,h.indent=d,h.endAbove=l;continue}}else{o.push({indent:-2,endAbove:l,line:l});continue}if(h.indent>d){do o.pop(),h=o[o.length-1];while(h.indent>d);const m=h.endAbove-1;m-l>=1&&r.insertFirst(l,m,d)}h.indent===d?h.endAbove=l:o.push({indent:d,endAbove:l,line:l})}return r.toIndentRanges(u)}const Oft=q("editor.foldBackground",{light:tt(wE,.3),dark:tt(wE,.3),hcDark:null,hcLight:null},v("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);q("editorGutter.foldingControlForeground",{dark:BE,light:BE,hcDark:BE,hcLight:BE},v("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const vR=hi("folding-expanded",we.chevronDown,v("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),CR=hi("folding-collapsed",we.chevronRight,v("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Eye=hi("folding-manual-collapsed",CR,v("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),mye=hi("folding-manual-expanded",vR,v("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),bte={color:Jn(Oft),position:ss.Inline};class Ai{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?Ai.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?Ai.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:Ai.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:Ai.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?Ai.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Ai.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?Ai.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Ai.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?Ai.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:Ai.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?Ai.MANUALLY_EXPANDED_VISUAL_DECORATION:Ai.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}Ai.COLLAPSED_VISUAL_DECORATION=Lt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:st.asClassName(CR)});Ai.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Lt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(CR)});Ai.MANUALLY_COLLAPSED_VISUAL_DECORATION=Lt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:st.asClassName(Eye)});Ai.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Lt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(Eye)});Ai.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Ai.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0});Ai.EXPANDED_VISUAL_DECORATION=Lt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+st.asClassName(vR)});Ai.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Lt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(vR)});Ai.MANUALLY_EXPANDED_VISUAL_DECORATION=Lt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+st.asClassName(mye)});Ai.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Lt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(mye)});Ai.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Ai.HIDDEN_RANGE_DECORATION=Lt.register({description:"folding-hidden-range-decoration",stickiness:1});const jft={},Hft="syntax";class kte{constructor(e,t,n,i,r){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=i,this.fallbackRangeProvider=r,this.id=Hft,this.disposables=new pe,r&&this.disposables.add(r);for(const a of t)typeof a.onDidChange=="function"&&this.disposables.add(a.onDidChange(n))}compute(e){return Vft(this.providers,this.editorModel,e).then(t=>{var n,i;return t?Kft(t,this.foldingRangesLimit):(i=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&i!==void 0?i:null})}dispose(){this.disposables.dispose()}}function Vft(u,e,t){let n=null;const i=u.map((r,a)=>Promise.resolve(r.provideFoldingRanges(e,jft,t)).then(o=>{if(!t.isCancellationRequested&&Array.isArray(o)){Array.isArray(n)||(n=[]);const s=e.getLineCount();for(const l of o)l.start>0&&l.end>l.start&&l.end<=s&&n.push({start:l.start,end:l.end,rank:a,kind:l.kind})}},Mi));return Promise.all(i).then(r=>n)}class $ft{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,i){if(e>gc||t>gc)return;const r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=i,this._types[r]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let i=0;ie){n=o;break}t+=s}}const i=new Uint32Array(e),r=new Uint32Array(e),a=[];for(let o=0,s=0;o{let s=a.start-o.start;return s===0&&(s=a.rank-o.rank),s}),n=new $ft(e);let i;const r=[];for(const a of t)if(!i)i=a,n.add(a.start,a.end,a.kind&&a.kind.value,r.length);else if(a.start>i.start)if(a.end<=i.end)r.push(i),i=a,n.add(a.start,a.end,a.kind&&a.kind.value,r.length);else{if(a.start>i.end){do i=r.pop();while(i&&a.start>i.end);i&&r.push(i),i=a}n.add(a.start,a.end,a.kind&&a.kind.value,r.length)}return n.toIndentRanges()}var Wft=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gft=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},JD;const ba=new Pe("foldingEnabled",!1);let T1=JD=class extends ne{static get(e){return e.getContribution(JD.ID)}static getFoldingRangeProviders(e,t){var n,i;const r=e.foldingRangeProvider.ordered(t);return(i=(n=JD._foldingRangeSelector)===null||n===void 0?void 0:n.call(JD,r,t))!==null&&i!==void 0?i:r}constructor(e,t,n,i,r,a){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=a,this.localToDispose=this._register(new pe),this.editor=e,this._foldingLimitReporter=new gye(e);const o=this.editor.getOptions();this._isEnabled=o.get(43),this._useFoldingProviders=o.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=o.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=o.get(46),this.updateDebounceInfo=r.for(a.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Ai(e),this.foldingDecorationProvider.showFoldingControls=o.get(109),this.foldingDecorationProvider.showFoldingHighlights=o.get(45),this.foldingEnabled=ba.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(s=>{if(s.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),s.hasChanged(47)&&this.onModelChanged(),s.hasChanged(109)||s.hasChanged(45)){const l=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=l.get(109),this.foldingDecorationProvider.showFoldingHighlights=l.get(45),this.triggerFoldingModelChanged()}s.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),s.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),s.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new Aft(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new zft(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Tl(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Hu(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new Cte(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const n=JD.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new kte(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new va,n=this.getRangeProvider(e.textModel),i=this.foldingRegionPromise=Ui(r=>n.compute(r));return i.then(r=>{if(r&&i===this.foldingRegionPromise){let a;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const c=r.setCollapsedAllOfType(Ll.Imports.value,!0);c&&(a=td.capture(this.editor),this._currentModelHasFoldedImports=c)}const o=this.editor.getSelections(),s=o?o.map(c=>c.startLineNumber):[];e.update(r,s),a==null||a.restore(this.editor);const l=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=l)}return e})}).then(void 0,e=>(zt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const n=this.editor.getSelections();if(n&&n.length>0){const i=[];for(const r of n){const a=r.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(a)&&i.push(...t.getAllRegionsAtLine(a,o=>o.isCollapsed&&a>o.startLineNumber))}i.length&&(t.toggleCollapseState(i),this.reveal(n[0].getPosition()))}}}).then(void 0,zt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let n=!1;switch(e.target.type){case 4:{const i=e.target.detail,r=e.target.element.offsetLeft;if(i.offsetX-r<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const i=this.editor.getModel();if(i&&t.startColumn===i.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,r=e.target.range;if(!r||r.startLineNumber!==n)return;if(i){if(e.target.type!==4)return}else{const o=this.editor.getModel();if(!o||r.startColumn!==o.getLineMaxColumn(n))return}const a=t.getRegionAtLine(n);if(a&&a.startLineNumber===n){const o=a.isCollapsed;if(i||o){const s=e.event.altKey;let l=[];if(s){const c=h=>!h.containedBy(a)&&!a.containedBy(h),d=t.getRegionsInside(null,c);for(const h of d)h.isCollapsed&&l.push(h);l.length===0&&(l=d)}else{const c=e.event.middleButton||e.event.shiftKey;if(c)for(const d of t.getRegionsInside(a))d.isCollapsed===o&&l.push(d);(o||!c||l.length===0)&&l.push(a)}t.toggleCollapseState(l),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};T1.ID="editor.contrib.folding";T1=JD=Wft([SC(1,pt),SC(2,tn),SC(3,bi),SC(4,U0),SC(5,We)],T1);class gye{constructor(e){this.editor=e,this._onDidChange=new Q,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class Ia extends $e{runEditorCommand(e,t,n){const i=e.get(tn),r=T1.get(t);if(!r)return;const a=r.getFoldingModel();if(a)return this.reportTelemetry(e,t),a.then(o=>{if(o){this.invoke(r,o,t,n,i);const s=t.getSelection();s&&r.reveal(s.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}}function fye(u){if(!is(u)){if(!eo(u))return!1;const e=u;if(!is(e.levels)&&!zm(e.levels)||!is(e.direction)&&!io(e.direction)||!is(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(zm)))return!1}return!0}class Uft extends Ia{constructor(){super({id:"editor.unfold",label:v("unfoldAction.label","Unfold"),alias:"Unfold",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: +2: False`)},findInSelection:{type:"boolean"}}}}]};class fft extends $e{constructor(){super({id:rn.StartFindWithArgs,label:v("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:gft})}run(e,t,n){return q3(this,void 0,void 0,function*(){const i=so.get(t);if(i){const r=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(41).loop},r),i.setGlobalBufferTerm(i.getState().searchString)}})}}class pft extends $e{constructor(){super({id:rn.StartFindWithSelection,label:v("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);n&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),n.setGlobalBufferTerm(n.getState().searchString))})}}class sye extends $e{run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);n&&!this._run(n)&&(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))})}}class Dft extends sye{constructor(){super({id:rn.NextMatchFindAction,label:v("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:W.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:Ee.and(W.focus,pR),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class xft extends sye{constructor(){super({id:rn.PreviousMatchFindAction,label:v("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:W.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:Ee.and(W.focus,pR),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class vft extends $e{constructor(){super({id:rn.GoToMatchFindAction,label:v("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:S4}),this._highlightDecorations=[]}run(e,t,n){const i=so.get(t);if(!i)return;const r=i.getState().matchesCount;if(r<1){e.get(bi).notify({severity:bP.Warning,message:v("findMatchAction.noResults","No matches. Try searching for something else.")});return}const o=e.get(md).createInputBox();o.placeholder=v("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",r);const s=c=>{const d=parseInt(c);if(isNaN(d))return;const h=i.getState().matchesCount;if(d>0&&d<=h)return d-1;if(d<0&&d>=-h)return h+d},l=c=>{const d=s(c);if(typeof d=="number"){o.validationMessage=void 0,i.goToMatch(d);const h=i.getState().currentMatch;h&&this.addDecorations(t,h)}else o.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",i.getState().matchesCount),this.clearDecorations(t)};o.onDidChangeValue(c=>{l(c)}),o.onDidAccept(()=>{const c=s(o.value);typeof c=="number"?(i.goToMatch(c),o.hide()):o.validationMessage=v("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",i.getState().matchesCount)}),o.onDidHide(()=>{this.clearDecorations(t),o.dispose()}),o.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Jn(fCe),position:Zs.Full}}}])})}}class lye extends $e{run(e,t){return q3(this,void 0,void 0,function*(){const n=so.get(t);if(!n)return;const i=xq(t,"single",!1);i&&n.setSearchString(i),this._run(n)||(yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(n))})}}class Cft extends lye{constructor(){super({id:rn.NextSelectionMatchFindAction,label:v("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class bft extends lye{constructor(){super({id:rn.PreviousSelectionMatchFindAction,label:v("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const kft=m6e(new E6e({id:rn.StartFindReplaceAction,label:v("startReplace","Replace"),alias:"Replace",precondition:Ee.or(W.focus,Ee.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:K.MenubarEditMenu,group:"3_find",title:v({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));kft.addImplementation(0,(u,e,t)=>{if(!e.hasModel()||e.getOption(90))return!1;const n=so.get(e);if(!n)return!1;const i=e.getSelection(),r=n.isFindInputFocused(),a=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&e.getOption(41).seedSearchStringFromSelection!=="never"&&!r,o=r||a?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:a?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:o,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(41).loop})});fu(so.ID,vq,0);be(fft);be(pft);be(Dft);be(xft);be(vft);be(Cft);be(bft);const gd=xr.bindToContribution(so.get);ze(new gd({id:rn.CloseFindWidgetCommand,precondition:S4,handler:u=>u.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:9,secondary:[1033]}}));ze(new gd({id:rn.ToggleCaseSensitiveCommand,precondition:void 0,handler:u=>u.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:K9.primary,mac:K9.mac,win:K9.win,linux:K9.linux}}));ze(new gd({id:rn.ToggleWholeWordCommand,precondition:void 0,handler:u=>u.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:W9.primary,mac:W9.mac,win:W9.win,linux:W9.linux}}));ze(new gd({id:rn.ToggleRegexCommand,precondition:void 0,handler:u=>u.toggleRegex(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:G9.primary,mac:G9.mac,win:G9.win,linux:G9.linux}}));ze(new gd({id:rn.ToggleSearchScopeCommand,precondition:void 0,handler:u=>u.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:U9.primary,mac:U9.mac,win:U9.win,linux:U9.linux}}));ze(new gd({id:rn.TogglePreserveCaseCommand,precondition:void 0,handler:u=>u.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:q9.primary,mac:q9.mac,win:q9.win,linux:q9.linux}}));ze(new gd({id:rn.ReplaceOneAction,precondition:S4,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:3094}}));ze(new gd({id:rn.ReplaceOneAction,precondition:S4,handler:u=>u.replace(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,fte),primary:3}}));ze(new gd({id:rn.ReplaceAllAction,precondition:S4,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:2563}}));ze(new gd({id:rn.ReplaceAllAction,precondition:S4,handler:u=>u.replaceAll(),kbOpts:{weight:100+5,kbExpr:Ee.and(W.focus,fte),primary:void 0,mac:{primary:2051}}}));ze(new gd({id:rn.SelectAllMatchesAction,precondition:S4,handler:u=>u.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:W.focus,primary:515}}));const Fft={0:" ",1:"u",2:"r"},nce=65535,gc=16777215,ice=4278190080;class NH{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,n=e%32;return(this._states[t]&1<nce)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new NH(e.length),this._userDefinedStates=new NH(e.length),this._recoveredStates=new NH(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(n,i)=>{const r=e[e.length-1];return this.getStartLineNumber(r)<=n&&this.getEndLineNumber(r)>=i};for(let n=0,i=this._startIndexes.length;ngc||a>gc)throw new Error("startLineNumber or endLineNumber must not exceed "+gc);for(;e.length>0&&!t(r,a);)e.pop();const o=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=r+((o&255)<<24),this._endIndexes[n]=a+((o&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&gc}getEndLineNumber(e){return this._endIndexes[e]&gc}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let i=0;i>>24)+((this._endIndexes[e]&ice)>>>16);return t===nce?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(g)?p=>pp=c.startLineNumber))l&&l.startLineNumber===c.startLineNumber?(c.source===1?g=c:(g=l,g.isCollapsed=c.isCollapsed&&l.endLineNumber===c.endLineNumber,g.source=0),l=r(++o)):(g=c,c.isCollapsed&&c.source===0&&(g.source=2)),c=a(++s);else{let f=s,p=c;for(;;){if(!p||p.startLineNumber>l.endLineNumber){g=l;break}if(p.source===1&&p.endLineNumber>l.endLineNumber)break;p=a(++f)}l=r(++o)}if(g){for(;h&&h.endLineNumberg.startLineNumber&&g.startLineNumber>E&&g.endLineNumber<=n&&(!h||h.endLineNumber>=g.endLineNumber)&&(m.push(g),E=g.startLineNumber,h&&d.push(h),h=g)}}return m}}class yft{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class Aft{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new Q,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new Ls(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,i)=>n.regionIndex-i.regionIndex);const t={};this._decorationProvider.changeDecorations(n=>{let i=0,r=-1,a=-1;const o=s=>{for(;ia&&(a=l),i++}};for(const s of e){const l=s.regionIndex,c=this._editorDecorationIds[l];if(c&&!t[c]){t[c]=!0,o(l);const d=!this._regions.isCollapsed(l);this._regions.setCollapsed(l,d),r=Math.max(r,this._regions.getEndLineNumber(l))}}o(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,n=i=>{for(const r of e)if(!(r.startLineNumber>i.endLineNumber||i.startLineNumber>r.endLineNumber))return!0;return!1};for(let i=0;in&&(n=o)}this._decorationProvider.changeDecorations(i=>this._editorDecorationIds=i.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(i,r)=>{for(const a of e)if(i=a.endLineNumber||a.startLineNumber<1||a.endLineNumber>n)continue;const o=this._getLinesChecksum(a.startLineNumber+1,a.endLineNumber);t.push({startLineNumber:a.startLineNumber,endLineNumber:a.endLineNumber,isCollapsed:a.isCollapsed,source:a.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){var t,n;if(!Array.isArray(e))return;const i=[],r=this._textModel.getLineCount();for(const o of e){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>r)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);(!o.checksum||s===o.checksum)&&i.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:(t=o.isCollapsed)!==null&&t!==void 0?t:!0,source:(n=o.source)!==null&&n!==void 0?n:0})}const a=Ls.sanitizeAndMerge(this._regions,i,r);this.updatePost(Ls.fromFoldRanges(a))}_getLinesChecksum(e,t){return M6e(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const n=[];if(this._regions){let i=this._regions.findRange(e),r=1;for(;i>=0;){const a=this._regions.toRegion(i);(!t||t(a,r))&&n.push(a),r++,i=a.parentIndex}}return n}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const n=[],i=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const a=[];for(let o=i,s=this._regions.length;o0&&!l.containedBy(a[a.length-1]);)a.pop();a.push(l),t(l,a.length)&&n.push(l)}else break}}else for(let a=i,o=this._regions.length;a1){const o=u.getRegionsInside(r,(s,l)=>s.isCollapsed!==a&&l0)for(const r of n){const a=u.getRegionAtLine(r);if(a&&(a.isCollapsed!==e&&i.push(a),t>1)){const o=u.getRegionsInside(a,(s,l)=>s.isCollapsed!==e&&la.isCollapsed!==e&&oo.isCollapsed!==e&&s<=t);i.push(...a)}u.toggleCollapseState(i)}function _ft(u,e,t){const n=[];for(const i of t){const r=u.getAllRegionsAtLine(i,a=>a.isCollapsed!==e);r.length>0&&n.push(r[0])}u.toggleCollapseState(n)}function Sft(u,e,t,n){const i=(a,o)=>o===e&&a.isCollapsed!==t&&!n.some(s=>a.containsLine(s)),r=u.getRegionsInside(null,i);u.toggleCollapseState(r)}function hye(u,e,t){const n=[];for(const a of t){const o=u.getAllRegionsAtLine(a,void 0);o.length>0&&n.push(o[0])}const i=a=>n.every(o=>!o.containedBy(a)&&!a.containedBy(o))&&a.isCollapsed!==e,r=u.getRegionsInside(null,i);u.toggleCollapseState(r)}function xte(u,e,t){const n=u.textModel,i=u.regions,r=[];for(let a=i.length-1;a>=0;a--)if(t!==i.isCollapsed(a)){const o=i.getStartLineNumber(a);e.test(n.getLineContent(o))&&r.push(i.toRegion(a))}u.toggleCollapseState(r)}function vte(u,e,t){const n=u.regions,i=[];for(let r=n.length-1;r>=0;r--)t!==n.isCollapsed(r)&&e===n.getType(r)&&i.push(n.toRegion(r));u.toggleCollapseState(i)}function Bft(u,e){let t=null;const n=e.getRegionAtLine(u);if(n!==null&&(t=n.startLineNumber,u===t)){const i=n.parentIndex;i!==-1?t=e.regions.getStartLineNumber(i):t=null}return t}function wft(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){if(u!==t.startLineNumber)return t.startLineNumber;{const n=t.parentIndex;let i=0;for(n!==-1&&(i=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=i)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Lft(u,e){let t=e.getRegionAtLine(u);if(t!==null&&t.startLineNumber===u){const n=t.parentIndex;let i=0;if(n!==-1)i=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;i=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=i)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>u)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||Vm(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let n=0,i=0,r=Number.MAX_VALUE,a=-1;const o=this._foldingModel.regions;for(;n0}isHidden(e){return rce(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const n=this._foldingModel.textModel;let i=null;const r=a=>((!i||!Mft(a,i))&&(i=rce(this._hiddenRanges,a)),i?i.startLineNumber-1:null);for(let a=0,o=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function Mft(u,e){return u>=e.startLineNumber&&u<=e.endLineNumber}function rce(u,e){const t=pk(u,n=>e=0&&u[t].endLineNumber>=e?u[t]:null}const Tft=5e3,Nft="indent";class Cte{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=Nft}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,i=t&&t.markers;return Promise.resolve(Ift(this.editorModel,n,i,this.foldingRangesLimit))}}let Pft=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>gc||t>gc)return;const i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let r=this._length-1,a=0;r>=0;r--,a++)n[a]=this._startIndexes[r],i[a]=this._endIndexes[r];return new Ls(n,i)}else{this._foldingRangesLimit.update(this._length,t);let n=0,i=this._indentOccurrences.length;for(let s=0;st){i=s;break}n+=l}}const r=e.getOptions().tabSize,a=new Uint32Array(t),o=new Uint32Array(t);for(let s=this._length-1,l=0;s>=0;s--){const c=this._startIndexes[s],d=e.getLineContent(c),h=pP(d,r);(h{}};function Ift(u,e,t,n=Rft){const i=u.getOptions().tabSize,r=new Pft(n);let a;t&&(a=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const o=[],s=u.getLineCount()+1;o.push({indent:-1,endAbove:s,line:s});for(let l=u.getLineCount();l>0;l--){const c=u.getLineContent(l),d=pP(c,i);let h=o[o.length-1];if(d===-1){e&&(h.endAbove=l);continue}let E;if(a&&(E=c.match(a)))if(E[1]){let m=o.length-1;for(;m>0&&o[m].indent!==-2;)m--;if(m>0){o.length=m+1,h=o[m],r.insertFirst(l,h.line,d),h.line=l,h.indent=d,h.endAbove=l;continue}}else{o.push({indent:-2,endAbove:l,line:l});continue}if(h.indent>d){do o.pop(),h=o[o.length-1];while(h.indent>d);const m=h.endAbove-1;m-l>=1&&r.insertFirst(l,m,d)}h.indent===d?h.endAbove=l:o.push({indent:d,endAbove:l,line:l})}return r.toIndentRanges(u)}const Oft=q("editor.foldBackground",{light:tt(wE,.3),dark:tt(wE,.3),hcDark:null,hcLight:null},v("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);q("editorGutter.foldingControlForeground",{dark:BE,light:BE,hcDark:BE,hcLight:BE},v("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));const vR=hi("folding-expanded",we.chevronDown,v("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),CR=hi("folding-collapsed",we.chevronRight,v("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),Eye=hi("folding-manual-collapsed",CR,v("foldingManualCollapedIcon","Icon for manually collapsed ranges in the editor glyph margin.")),mye=hi("folding-manual-expanded",vR,v("foldingManualExpandedIcon","Icon for manually expanded ranges in the editor glyph margin.")),bte={color:Jn(Oft),position:ls.Inline};class Ai{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?Ai.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?Ai.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:Ai.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:Ai.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?Ai.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Ai.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?Ai.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Ai.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?Ai.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:Ai.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?Ai.MANUALLY_EXPANDED_VISUAL_DECORATION:Ai.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}Ai.COLLAPSED_VISUAL_DECORATION=Lt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:st.asClassName(CR)});Ai.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Lt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(CR)});Ai.MANUALLY_COLLAPSED_VISUAL_DECORATION=Lt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:st.asClassName(Eye)});Ai.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Lt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(Eye)});Ai.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0});Ai.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:bte,isWholeLine:!0});Ai.EXPANDED_VISUAL_DECORATION=Lt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+st.asClassName(vR)});Ai.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Lt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(vR)});Ai.MANUALLY_EXPANDED_VISUAL_DECORATION=Lt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+st.asClassName(mye)});Ai.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Lt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:st.asClassName(mye)});Ai.NO_CONTROLS_EXPANDED_RANGE_DECORATION=Lt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0});Ai.HIDDEN_RANGE_DECORATION=Lt.register({description:"folding-hidden-range-decoration",stickiness:1});const jft={},Hft="syntax";class kte{constructor(e,t,n,i,r){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=i,this.fallbackRangeProvider=r,this.id=Hft,this.disposables=new pe,r&&this.disposables.add(r);for(const a of t)typeof a.onDidChange=="function"&&this.disposables.add(a.onDidChange(n))}compute(e){return Vft(this.providers,this.editorModel,e).then(t=>{var n,i;return t?Kft(t,this.foldingRangesLimit):(i=(n=this.fallbackRangeProvider)===null||n===void 0?void 0:n.compute(e))!==null&&i!==void 0?i:null})}dispose(){this.disposables.dispose()}}function Vft(u,e,t){let n=null;const i=u.map((r,a)=>Promise.resolve(r.provideFoldingRanges(e,jft,t)).then(o=>{if(!t.isCancellationRequested&&Array.isArray(o)){Array.isArray(n)||(n=[]);const s=e.getLineCount();for(const l of o)l.start>0&&l.end>l.start&&l.end<=s&&n.push({start:l.start,end:l.end,rank:a,kind:l.kind})}},Mi));return Promise.all(i).then(r=>n)}class $ft{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,i){if(e>gc||t>gc)return;const r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=i,this._types[r]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let i=0;ie){n=o;break}t+=s}}const i=new Uint32Array(e),r=new Uint32Array(e),a=[];for(let o=0,s=0;o{let s=a.start-o.start;return s===0&&(s=a.rank-o.rank),s}),n=new $ft(e);let i;const r=[];for(const a of t)if(!i)i=a,n.add(a.start,a.end,a.kind&&a.kind.value,r.length);else if(a.start>i.start)if(a.end<=i.end)r.push(i),i=a,n.add(a.start,a.end,a.kind&&a.kind.value,r.length);else{if(a.start>i.end){do i=r.pop();while(i&&a.start>i.end);i&&r.push(i),i=a}n.add(a.start,a.end,a.kind&&a.kind.value,r.length)}return n.toIndentRanges()}var Wft=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gft=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},JD;const ba=new Pe("foldingEnabled",!1);let T1=JD=class extends ne{static get(e){return e.getContribution(JD.ID)}static getFoldingRangeProviders(e,t){var n,i;const r=e.foldingRangeProvider.ordered(t);return(i=(n=JD._foldingRangeSelector)===null||n===void 0?void 0:n.call(JD,r,t))!==null&&i!==void 0?i:r}constructor(e,t,n,i,r,a){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=a,this.localToDispose=this._register(new pe),this.editor=e,this._foldingLimitReporter=new gye(e);const o=this.editor.getOptions();this._isEnabled=o.get(43),this._useFoldingProviders=o.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=o.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=o.get(46),this.updateDebounceInfo=r.for(a.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new Ai(e),this.foldingDecorationProvider.showFoldingControls=o.get(109),this.foldingDecorationProvider.showFoldingHighlights=o.get(45),this.foldingEnabled=ba.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(s=>{if(s.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),s.hasChanged(47)&&this.onModelChanged(),s.hasChanged(109)||s.hasChanged(45)){const l=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=l.get(109),this.foldingDecorationProvider.showFoldingHighlights=l.get(45),this.triggerFoldingModelChanged()}s.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),s.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),s.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new Aft(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new zft(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Tl(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Hu(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)===null||t===void 0||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)===null||n===void 0||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)===null||e===void 0||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new Cte(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const n=JD.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new kte(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)===null||t===void 0||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new va,n=this.getRangeProvider(e.textModel),i=this.foldingRegionPromise=Ui(r=>n.compute(r));return i.then(r=>{if(r&&i===this.foldingRegionPromise){let a;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const c=r.setCollapsedAllOfType(Ll.Imports.value,!0);c&&(a=td.capture(this.editor),this._currentModelHasFoldedImports=c)}const o=this.editor.getSelections(),s=o?o.map(c=>c.startLineNumber):[];e.update(r,s),a==null||a.restore(this.editor);const l=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=l)}return e})}).then(void 0,e=>(zt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const n=this.editor.getSelections();if(n&&n.length>0){const i=[];for(const r of n){const a=r.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(a)&&i.push(...t.getAllRegionsAtLine(a,o=>o.isCollapsed&&a>o.startLineNumber))}i.length&&(t.toggleCollapseState(i),this.reveal(n[0].getPosition()))}}}).then(void 0,zt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let n=!1;switch(e.target.type){case 4:{const i=e.target.detail,r=e.target.element.offsetLeft;if(i.offsetX-r<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const i=this.editor.getModel();if(i&&t.startColumn===i.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,r=e.target.range;if(!r||r.startLineNumber!==n)return;if(i){if(e.target.type!==4)return}else{const o=this.editor.getModel();if(!o||r.startColumn!==o.getLineMaxColumn(n))return}const a=t.getRegionAtLine(n);if(a&&a.startLineNumber===n){const o=a.isCollapsed;if(i||o){const s=e.event.altKey;let l=[];if(s){const c=h=>!h.containedBy(a)&&!a.containedBy(h),d=t.getRegionsInside(null,c);for(const h of d)h.isCollapsed&&l.push(h);l.length===0&&(l=d)}else{const c=e.event.middleButton||e.event.shiftKey;if(c)for(const d of t.getRegionsInside(a))d.isCollapsed===o&&l.push(d);(o||!c||l.length===0)&&l.push(a)}t.toggleCollapseState(l),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};T1.ID="editor.contrib.folding";T1=JD=Wft([SC(1,pt),SC(2,tn),SC(3,bi),SC(4,q0),SC(5,We)],T1);class gye{constructor(e){this.editor=e,this._onDidChange=new Q,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class Ia extends $e{runEditorCommand(e,t,n){const i=e.get(tn),r=T1.get(t);if(!r)return;const a=r.getFoldingModel();if(a)return this.reportTelemetry(e,t),a.then(o=>{if(o){this.invoke(r,o,t,n,i);const s=t.getSelection();s&&r.reveal(s.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}}function fye(u){if(!rs(u)){if(!eo(u))return!1;const e=u;if(!rs(e.levels)&&!zm(e.levels)||!rs(e.direction)&&!io(e.direction)||!rs(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(zm)))return!1}return!0}class Uft extends Ia{constructor(){super({id:"editor.unfold",label:v("unfoldAction.label","Unfold"),alias:"Unfold",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: * 'levels': Number of levels to unfold. If not set, defaults to 1. * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. @@ -721,34 +721,34 @@ The flag will not be saved for the future. * 'direction': If 'up', folds given number of levels up otherwise folds down. * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:fye,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,i){const r=this.getLineNumbers(i,n),a=i&&i.levels,o=i&&i.direction;typeof a!="number"&&typeof o!="string"?_ft(t,!0,r):o==="up"?dye(t,!0,a||1,r):k6(t,!0,a||1,r)}}class Zft extends Ia{constructor(){super({id:"editor.toggleFold",label:v("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2090),weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);cye(t,1,i)}}class Yft extends Ia{constructor(){super({id:"editor.foldRecursively",label:v("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2140),weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);k6(t,!0,Number.MAX_VALUE,i)}}class Qft extends Ia{constructor(){super({id:"editor.foldAllBlockComments",label:v("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2138),weight:100}})}invoke(e,t,n,i,r){if(t.regions.hasTypes())vte(t,Ll.Comment.value,!0);else{const a=n.getModel();if(!a)return;const o=r.getLanguageConfiguration(a.getLanguageId()).comments;if(o&&o.blockCommentStartToken){const s=new RegExp("^\\s*"+qs(o.blockCommentStartToken));xte(t,s,!0)}}}}class Xft extends Ia{constructor(){super({id:"editor.foldAllMarkerRegions",label:v("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2077),weight:100}})}invoke(e,t,n,i,r){if(t.regions.hasTypes())vte(t,Ll.Region.value,!0);else{const a=n.getModel();if(!a)return;const o=r.getLanguageConfiguration(a.getLanguageId()).foldingRules;if(o&&o.markers&&o.markers.start){const s=new RegExp(o.markers.start);xte(t,s,!0)}}}}class e3t extends Ia{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:v("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2078),weight:100}})}invoke(e,t,n,i,r){if(t.regions.hasTypes())vte(t,Ll.Region.value,!1);else{const a=n.getModel();if(!a)return;const o=r.getLanguageConfiguration(a.getLanguageId()).foldingRules;if(o&&o.markers&&o.markers.start){const s=new RegExp(o.markers.start);xte(t,s,!1)}}}}class t3t extends Ia{constructor(){super({id:"editor.foldAllExcept",label:v("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2136),weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);hye(t,!0,i)}}class u3t extends Ia{constructor(){super({id:"editor.unfoldAllExcept",label:v("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2134),weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);hye(t,!1,i)}}class n3t extends Ia{constructor(){super({id:"editor.foldAll",label:v("foldAllAction.label","Fold All"),alias:"Fold All",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2069),weight:100}})}invoke(e,t,n){k6(t,!0)}}class i3t extends Ia{constructor(){super({id:"editor.unfoldAll",label:v("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2088),weight:100}})}invoke(e,t,n){k6(t,!1)}}class J3 extends Ia{getFoldingLevel(){return parseInt(this.id.substr(J3.ID_PREFIX.length))}invoke(e,t,n){Sft(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}}J3.ID_PREFIX="editor.foldLevel";J3.ID=u=>J3.ID_PREFIX+u;class r3t extends Ia{constructor(){super({id:"editor.gotoParentFold",label:v("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=Bft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class a3t extends Ia{constructor(){super({id:"editor.gotoPreviousFold",label:v("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=wft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class o3t extends Ia{constructor(){super({id:"editor.gotoNextFold",label:v("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=Lft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class s3t extends Ia{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:v("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2135),weight:100}})}invoke(e,t,n){var i;const r=[],a=n.getSelections();if(a){for(const o of a){let s=o.endLineNumber;o.endColumn===1&&--s,s>o.startLineNumber&&(r.push({startLineNumber:o.startLineNumber,endLineNumber:s,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:o.startLineNumber,startColumn:1,endLineNumber:o.startLineNumber,endColumn:1}))}if(r.length>0){r.sort((s,l)=>s.startLineNumber-l.startLineNumber);const o=ws.sanitizeAndMerge(t.regions,r,(i=n.getModel())===null||i===void 0?void 0:i.getLineCount());t.updatePost(ws.fromFoldRanges(o))}}}}class l3t extends Ia{constructor(){super({id:"editor.removeManualFoldingRanges",label:v("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2137),weight:100}})}invoke(e,t,n){const i=n.getSelections();if(i){const r=[];for(const a of i){const{startLineNumber:o,endLineNumber:s}=a;r.push(s>=o?{startLineNumber:o,endLineNumber:s}:{endLineNumber:s,startLineNumber:o})}t.removeManualRanges(r),e.triggerFoldingModelChanged()}}}fu(T1.ID,T1,0);be(Uft);be(qft);be(Jft);be(Yft);be(n3t);be(i3t);be(Qft);be(Xft);be(e3t);be(t3t);be(u3t);be(Zft);be(r3t);be(a3t);be(o3t);be(s3t);be(l3t);for(let u=1;u<=7;u++)sZe(new J3({id:J3.ID(u),label:v("foldLevelAction.label","Fold Level {0}",u),alias:`Fold Level ${u}`,precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2048|21+u),weight:100}}));ru.registerCommand("_executeFoldingRangeProvider",function(u,...e){return Gft(this,void 0,void 0,function*(){const[t]=e;if(!(t instanceof dt))throw A0();const n=u.get(We),i=u.get(_n).getModel(t);if(!i)throw A0();const r=u.get(tu);if(!r.getValue("editor.folding",{resource:t}))return[];const a=u.get(tn),o=r.getValue("editor.foldingStrategy",{resource:t}),s={get limit(){return r.getValue("editor.foldingMaximumRegions",{resource:t})},update:(E,m)=>{}},l=new Cte(i,a,s);let c=l;if(o!=="indentation"){const E=T1.getFoldingRangeProviders(n,i);E.length&&(c=new kte(i,E,()=>{},s,l))}const d=yield c.compute(Kt.None),h=[];try{if(d)for(let E=0;E=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Fte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let EF=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new pe,this._sessionDisposables=new pe,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(i=>{i.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const n=new _B;for(const i of t.autoFormatTriggerCharacters)n.add(i.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(i=>{const r=i.charCodeAt(i.length-1);n.has(r)&&this._trigger(String.fromCharCode(r))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),n=this._editor.getPosition(),i=new vi,r=this._editor.onDidChangeModelContent(a=>{if(a.isFlush){i.cancel(),r.dispose();return}for(let o=0,s=a.changes.length;o{i.token.isCancellationRequested||pa(a)&&(Dv.execute(this._editor,a,!0),Gee(a))}).finally(()=>{r.dispose()})}};EF.ID="editor.contrib.autoFormat";EF=pye([Yw(1,We),Yw(2,ql)],EF);let mF=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new pe,this._callOnModel=new pe,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(eke,this.editor,e,2,Yh.None,Kt.None).catch(zt))}};mF.ID="editor.contrib.formatOnPaste";mF=pye([Yw(1,We),Yw(2,mt)],mF);class E3t extends $e{constructor(){super({id:"editor.action.formatDocument",label:v("formatDocument.label","Format Document"),alias:"Format Document",precondition:Ee.and(W.notInCompositeEditor,W.writable,W.hasDocumentFormattingProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return Fte(this,void 0,void 0,function*(){if(t.hasModel()){const n=e.get(mt);yield e.get(Dg).showWhile(n.invokeFunction(kht,t,1,Yh.None,Kt.None),250)}})}}class m3t extends $e{constructor(){super({id:"editor.action.formatSelection",label:v("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:Ee.and(W.writable,W.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2084),weight:100},contextMenuOpts:{when:W.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return Fte(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(mt),i=t.getModel(),r=t.getSelections().map(o=>o.isEmpty()?new j(o.startLineNumber,1,o.startLineNumber,i.getLineMaxColumn(o.startLineNumber)):o);yield e.get(Dg).showWhile(n.invokeFunction(eke,t,r,1,Yh.None,Kt.None),250)})}}fu(EF.ID,EF,2);fu(mF.ID,mF,2);be(E3t);be(m3t);ru.registerCommand("editor.action.format",u=>Fte(void 0,void 0,void 0,function*(){const e=u.get(Cu).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=u.get(ni);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));var g3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},PH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class B5{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let r=0;t.children.get(i)!==void 0;r++)i=`${n}_${r}`;return i}static empty(e){return e.children.size===0}}class Cq extends B5{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}}class Dye extends B5{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}}class kh extends B5{static create(e,t,n){const i=new vi(n),r=new kh(t.uri),a=e.ordered(t),o=a.map((l,c)=>{var d;const h=B5.findId(`provider_${c}`,r),E=new Dye(h,r,(d=l.displayName)!==null&&d!==void 0?d:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(t,i.token)).then(m=>{for(const g of m||[])kh._makeOutlineElement(g,E);return E},m=>(Mi(m),E)).then(m=>{B5.empty(m)?m.remove():r._groups.set(h,m)})}),s=e.onDidChange(()=>{const l=e.ordered(t);di(l,a)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!n.isCancellationRequested?kh.create(e,t,n):r._compact()).finally(()=>{i.dispose(),s.dispose(),i.dispose()})}static _makeOutlineElement(e,t){const n=B5.findId(e,t),i=new Cq(n,t,e);if(e.children)for(const r of e.children)kh._makeOutlineElement(r,i);t.children.set(i.id,i)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=$t.first(this._groups.values());for(const[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof Cq?e.push(t.symbol):e.push(...$t.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>j.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return kh._flattenDocumentSymbols(t,e,""),t.sort((n,i)=>ee.compare(j.getStartPosition(n.range),j.getStartPosition(i.range))||ee.compare(j.getEndPosition(i.range),j.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&kh._flattenDocumentSymbols(e,i.children,i.name)}}const bR=Ut("IOutlineModelService");let bq=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new pe,this._cache=new gg(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(i=>{this._cache.delete(i.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return f3t(this,void 0,void 0,function*(){const n=this._languageFeaturesService.documentSymbolProvider,i=n.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!di(r.provider,i)){const o=new vi;r={versionId:e.getVersionId(),provider:i,promiseCnt:0,source:o,promise:kh.create(n,e,o.token),model:void 0},this._cache.set(e.id,r);const s=Date.now();r.promise.then(l=>{r.model=l,this._debounceInformation.update(e,Date.now()-s)}).catch(l=>{this._cache.delete(e.id)})}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested(()=>{--r.promiseCnt===0&&(r.source.cancel(),this._cache.delete(e.id))});try{return yield r.promise}finally{a.dispose()}})}};bq=g3t([PH(0,We),PH(1,U0),PH(2,_n)],bq);au(bR,bq,1);var p3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};ru.registerCommand("_executeDocumentSymbolProvider",function(u,...e){return p3t(this,void 0,void 0,function*(){const[t]=e;Ru(dt.isUri(t));const n=u.get(bR),r=yield u.get(Vo).createModelReference(t);try{return(yield n.getOrCreate(r.object.textEditorModel,Kt.None)).getTopLevelSymbols()}finally{r.dispose()}})});class pr extends ne{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=pr.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=pr.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=pr.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=pr.suppressSuggestions.bindTo(this.contextKeyService),this._register(Xu(n=>{const i=this.model.read(n),r=i==null?void 0:i.state.read(n),a=!!(r!=null&&r.inlineCompletion)&&(r==null?void 0:r.ghostText)!==void 0&&!(r!=null&&r.ghostText.isEmpty());this.inlineCompletionVisible.set(a),r!=null&&r.ghostText&&(r!=null&&r.inlineCompletion)&&this.suppressSuggestions.set(r.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(Xu(n=>{const i=this.model.read(n);let r=!1,a=!0;const o=i==null?void 0:i.ghostText.read(n);if(i!=null&&i.selectedSuggestItem&&o&&o.parts.length>0){const{column:s,lines:l}=o.parts[0],c=l[0],d=i.textModel.getLineIndentColumn(o.lineNumber);if(s<=d){let E=Ta(c);E===-1&&(E=c.length-1),r=E>0;const m=i.textModel.getOptions().tabSize;a=Ki.visibleColumnFromColumn(c,E+1,m){const r=j.lift(i.range);return{startOffset:t.getOffset(r.getStartPosition()),endOffset:t.getOffset(r.getEndPosition()),text:i.text}});n.sort((i,r)=>r.startOffset-i.startOffset);for(const i of n)u=u.substring(0,i.startOffset)+i.text+u.substring(i.endOffset);return u}class x3t{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tJ3.ID_PREFIX+u;class r3t extends Ia{constructor(){super({id:"editor.gotoParentFold",label:v("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=Bft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class a3t extends Ia{constructor(){super({id:"editor.gotoPreviousFold",label:v("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=wft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class o3t extends Ia{constructor(){super({id:"editor.gotoNextFold",label:v("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,weight:100}})}invoke(e,t,n){const i=this.getSelectedLines(n);if(i.length>0){const r=Lft(i[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class s3t extends Ia{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:v("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2135),weight:100}})}invoke(e,t,n){var i;const r=[],a=n.getSelections();if(a){for(const o of a){let s=o.endLineNumber;o.endColumn===1&&--s,s>o.startLineNumber&&(r.push({startLineNumber:o.startLineNumber,endLineNumber:s,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:o.startLineNumber,startColumn:1,endLineNumber:o.startLineNumber,endColumn:1}))}if(r.length>0){r.sort((s,l)=>s.startLineNumber-l.startLineNumber);const o=Ls.sanitizeAndMerge(t.regions,r,(i=n.getModel())===null||i===void 0?void 0:i.getLineCount());t.updatePost(Ls.fromFoldRanges(o))}}}}class l3t extends Ia{constructor(){super({id:"editor.removeManualFoldingRanges",label:v("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2137),weight:100}})}invoke(e,t,n){const i=n.getSelections();if(i){const r=[];for(const a of i){const{startLineNumber:o,endLineNumber:s}=a;r.push(s>=o?{startLineNumber:o,endLineNumber:s}:{endLineNumber:s,startLineNumber:o})}t.removeManualRanges(r),e.triggerFoldingModelChanged()}}}fu(T1.ID,T1,0);be(Uft);be(qft);be(Jft);be(Yft);be(n3t);be(i3t);be(Qft);be(Xft);be(e3t);be(t3t);be(u3t);be(Zft);be(r3t);be(a3t);be(o3t);be(s3t);be(l3t);for(let u=1;u<=7;u++)sZe(new J3({id:J3.ID(u),label:v("foldLevelAction.label","Fold Level {0}",u),alias:`Fold Level ${u}`,precondition:ba,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2048|21+u),weight:100}}));ru.registerCommand("_executeFoldingRangeProvider",function(u,...e){return Gft(this,void 0,void 0,function*(){const[t]=e;if(!(t instanceof dt))throw _0();const n=u.get(We),i=u.get(_n).getModel(t);if(!i)throw _0();const r=u.get(tu);if(!r.getValue("editor.folding",{resource:t}))return[];const a=u.get(tn),o=r.getValue("editor.foldingStrategy",{resource:t}),s={get limit(){return r.getValue("editor.foldingMaximumRegions",{resource:t})},update:(E,m)=>{}},l=new Cte(i,a,s);let c=l;if(o!=="indentation"){const E=T1.getFoldingRangeProviders(n,i);E.length&&(c=new kte(i,E,()=>{},s,l))}const d=yield c.compute(Kt.None),h=[];try{if(d)for(let E=0;E=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Yw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Fte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let EF=class{constructor(e,t,n){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._disposables=new pe,this._sessionDisposables=new pe,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(i=>{i.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const n=new _B;for(const i of t.autoFormatTriggerCharacters)n.add(i.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(i=>{const r=i.charCodeAt(i.length-1);n.has(r)&&this._trigger(String.fromCharCode(r))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),n=this._editor.getPosition(),i=new vi,r=this._editor.onDidChangeModelContent(a=>{if(a.isFlush){i.cancel(),r.dispose();return}for(let o=0,s=a.changes.length;o{i.token.isCancellationRequested||pa(a)&&(Dv.execute(this._editor,a,!0),Gee(a))}).finally(()=>{r.dispose()})}};EF.ID="editor.contrib.autoFormat";EF=pye([Yw(1,We),Yw(2,ql)],EF);let mF=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new pe,this._callOnModel=new pe,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(eke,this.editor,e,2,Yh.None,Kt.None).catch(zt))}};mF.ID="editor.contrib.formatOnPaste";mF=pye([Yw(1,We),Yw(2,mt)],mF);class E3t extends $e{constructor(){super({id:"editor.action.formatDocument",label:v("formatDocument.label","Format Document"),alias:"Format Document",precondition:Ee.and(W.notInCompositeEditor,W.writable,W.hasDocumentFormattingProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return Fte(this,void 0,void 0,function*(){if(t.hasModel()){const n=e.get(mt);yield e.get(Dg).showWhile(n.invokeFunction(kht,t,1,Yh.None,Kt.None),250)}})}}class m3t extends $e{constructor(){super({id:"editor.action.formatSelection",label:v("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:Ee.and(W.writable,W.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2084),weight:100},contextMenuOpts:{when:W.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return Fte(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(mt),i=t.getModel(),r=t.getSelections().map(o=>o.isEmpty()?new j(o.startLineNumber,1,o.startLineNumber,i.getLineMaxColumn(o.startLineNumber)):o);yield e.get(Dg).showWhile(n.invokeFunction(eke,t,r,1,Yh.None,Kt.None),250)})}}fu(EF.ID,EF,2);fu(mF.ID,mF,2);be(E3t);be(m3t);ru.registerCommand("editor.action.format",u=>Fte(void 0,void 0,void 0,function*(){const e=u.get(Cu).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=u.get(ni);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));var g3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},PH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class B5{remove(){var e;(e=this.parent)===null||e===void 0||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let i=n;for(let r=0;t.children.get(i)!==void 0;r++)i=`${n}_${r}`;return i}static empty(e){return e.children.size===0}}class Cq extends B5{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}}class Dye extends B5{constructor(e,t,n,i){super(),this.id=e,this.parent=t,this.label=n,this.order=i,this.children=new Map}}class kh extends B5{static create(e,t,n){const i=new vi(n),r=new kh(t.uri),a=e.ordered(t),o=a.map((l,c)=>{var d;const h=B5.findId(`provider_${c}`,r),E=new Dye(h,r,(d=l.displayName)!==null&&d!==void 0?d:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(t,i.token)).then(m=>{for(const g of m||[])kh._makeOutlineElement(g,E);return E},m=>(Mi(m),E)).then(m=>{B5.empty(m)?m.remove():r._groups.set(h,m)})}),s=e.onDidChange(()=>{const l=e.ordered(t);di(l,a)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!n.isCancellationRequested?kh.create(e,t,n):r._compact()).finally(()=>{i.dispose(),s.dispose(),i.dispose()})}static _makeOutlineElement(e,t){const n=B5.findId(e,t),i=new Cq(n,t,e);if(e.children)for(const r of e.children)kh._makeOutlineElement(r,i);t.children.set(i.id,i)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=$t.first(this._groups.values());for(const[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof Cq?e.push(t.symbol):e.push(...$t.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>j.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return kh._flattenDocumentSymbols(t,e,""),t.sort((n,i)=>ee.compare(j.getStartPosition(n.range),j.getStartPosition(i.range))||ee.compare(j.getEndPosition(i.range),j.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(const i of t)e.push({kind:i.kind,tags:i.tags,name:i.name,detail:i.detail,containerName:i.containerName||n,range:i.range,selectionRange:i.selectionRange,children:void 0}),i.children&&kh._flattenDocumentSymbols(e,i.children,i.name)}}const bR=Ut("IOutlineModelService");let bq=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new pe,this._cache=new gg(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(i=>{this._cache.delete(i.id)}))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return f3t(this,void 0,void 0,function*(){const n=this._languageFeaturesService.documentSymbolProvider,i=n.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!di(r.provider,i)){const o=new vi;r={versionId:e.getVersionId(),provider:i,promiseCnt:0,source:o,promise:kh.create(n,e,o.token),model:void 0},this._cache.set(e.id,r);const s=Date.now();r.promise.then(l=>{r.model=l,this._debounceInformation.update(e,Date.now()-s)}).catch(l=>{this._cache.delete(e.id)})}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested(()=>{--r.promiseCnt===0&&(r.source.cancel(),this._cache.delete(e.id))});try{return yield r.promise}finally{a.dispose()}})}};bq=g3t([PH(0,We),PH(1,q0),PH(2,_n)],bq);au(bR,bq,1);var p3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};ru.registerCommand("_executeDocumentSymbolProvider",function(u,...e){return p3t(this,void 0,void 0,function*(){const[t]=e;Ru(dt.isUri(t));const n=u.get(bR),r=yield u.get(Vo).createModelReference(t);try{return(yield n.getOrCreate(r.object.textEditorModel,Kt.None)).getTopLevelSymbols()}finally{r.dispose()}})});class pr extends ne{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=pr.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=pr.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=pr.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=pr.suppressSuggestions.bindTo(this.contextKeyService),this._register(Xu(n=>{const i=this.model.read(n),r=i==null?void 0:i.state.read(n),a=!!(r!=null&&r.inlineCompletion)&&(r==null?void 0:r.ghostText)!==void 0&&!(r!=null&&r.ghostText.isEmpty());this.inlineCompletionVisible.set(a),r!=null&&r.ghostText&&(r!=null&&r.inlineCompletion)&&this.suppressSuggestions.set(r.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register(Xu(n=>{const i=this.model.read(n);let r=!1,a=!0;const o=i==null?void 0:i.ghostText.read(n);if(i!=null&&i.selectedSuggestItem&&o&&o.parts.length>0){const{column:s,lines:l}=o.parts[0],c=l[0],d=i.textModel.getLineIndentColumn(o.lineNumber);if(s<=d){let E=Ta(c);E===-1&&(E=c.length-1),r=E>0;const m=i.textModel.getOptions().tabSize;a=Ki.visibleColumnFromColumn(c,E+1,m){const r=j.lift(i.range);return{startOffset:t.getOffset(r.getStartPosition()),endOffset:t.getOffset(r.getEndPosition()),text:i.text}});n.sort((i,r)=>r.startOffset-i.startOffset);for(const i of n)u=u.substring(0,i.startOffset)+i.text+u.substring(i.endOffset);return u}class x3t{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tt)throw new Si(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new j(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function k3t(u,e){const t=new pe,n=u.createDecorationsCollection();return t.add(Pee({debugName:()=>`Apply decorations from ${e.debugName}`},i=>{const r=e.read(i);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function kq(u,e){return new ee(u.lineNumber+e.lineNumber-1,e.lineNumber===1?u.column+e.column-1:e.column)}function Fq(u){let e=1,t=1;for(const n of u)n===` `?(e++,t=1):t++;return new ee(e,t)}class Qw{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,n)=>t.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return D3t(n,this.parts.map(r=>({range:{startLineNumber:1,endLineNumber:1,startColumn:r.column,endColumn:r.column},text:r.lines.join(` `)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}}class yq{constructor(e,t,n){this.column=e,this.lines=t,this.preview=n}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,n)=>t===e.lines[n])}}class Aq{constructor(e,t,n,i=0){this.lineNumber=e,this.columnRange=t,this.newLines=n,this.additionalReservedLineCount=i,this.parts=[new yq(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(` -`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function ace(u,e){return u===e?!0:!u||!e?!1:u instanceof Qw&&e instanceof Qw||u instanceof Aq&&e instanceof Aq?u.equals(e):!1}var F3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},y3t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const oce="ghost-text";let _q=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=on(this,!1),this.currentTextModel=zr(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=uu(this,i=>{if(this.isDisposed.read(i))return;const r=this.currentTextModel.read(i);if(r!==this.model.targetTextModel.read(i))return;const a=this.model.ghostText.read(i);if(!a)return;const o=a instanceof Aq?a.columnRange:void 0,s=[],l=[];function c(g,f){if(l.length>0){const p=l[l.length-1];f&&p.decorations.push(new as(p.content.length+1,p.content.length+1+g[0].length,f,0)),p.content+=g[0],g=g.slice(1)}for(const p of g)l.push({content:p,decorations:f?[new as(1,p.length+1,f,0)]:[]})}const d=r.getLineContent(a.lineNumber);let h,E=0;for(const g of a.parts){let f=g.lines;h===void 0?(s.push({column:g.column,text:f[0],preview:g.preview}),f=f.slice(1)):c([d.substring(E,g.column-1)],void 0),f.length>0&&(c(f,oce),h===void 0&&g.column<=d.length&&(h=g.column)),E=g.column-1}h!==void 0&&c([d.substring(E)],void 0);const m=h!==void 0?new b3t(h,d.length+1):void 0;return{replacedRange:o,inlineTexts:s,additionalLines:l,hiddenRange:m,lineNumber:a.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(i),targetTextModel:r}}),this.decorations=uu(this,i=>{const r=this.uiState.read(i);if(!r)return[];const a=[];r.replacedRange&&a.push({range:r.replacedRange.toRange(r.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),r.hiddenRange&&a.push({range:r.hiddenRange.toRange(r.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const o of r.inlineTexts)a.push({range:j.fromPositions(new ee(r.lineNumber,o.column)),options:{description:oce,after:{content:o.text,inlineClassName:o.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:zc.Left},showIfCollapsed:!0}});return a}),this.additionalLinesWidget=this._register(new A3t(this.editor,this.languageService.languageIdCodec,uu(i=>{const r=this.uiState.read(i);return r?{lineNumber:r.lineNumber,additionalLines:r.additionalLines,minReservedLineCount:r.additionalReservedLineCount,targetTextModel:r.targetTextModel}:void 0}))),this._register(ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(k3t(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};_q=F3t([y3t(2,vn)],_q);class A3t extends ne{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=Ns("editorOptionChanged",Ne.filter(this.editor.onDidChangeConfiguration,i=>i.hasChanged(33)||i.hasChanged(116)||i.hasChanged(98)||i.hasChanged(93)||i.hasChanged(51)||i.hasChanged(50)||i.hasChanged(66))),this._register(Xu(i=>{const r=this.lines.read(i);this.editorOptionsChanged.read(i),r?this.updateLines(r.lineNumber,r.additionalLines,r.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){const i=this.editor.getModel();if(!i)return;const{tabSize:r}=i.getOptions();this.editor.changeViewZones(a=>{this._viewZoneId&&(a.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,n);if(o>0){const s=document.createElement("div");_3t(s,r,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=a.addZone({afterLineNumber:e,heightInLines:o,domNode:s,afterColumnAffinity:1})}})}}function _3t(u,e,t,n,i){const r=n.get(33),a=n.get(116),o="none",s=n.get(93),l=n.get(51),c=n.get(50),d=n.get(66),h=new h6(1e4);h.appendString('

');for(let g=0,f=t.length;g');const x=nA(D),b=Ux(D),k=nr.createEmpty(D,i);sA(new fg(c.isMonospace&&!r,c.canUseHalfwidthRightwardsArrow,D,!1,x,b,0,k,p.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,a,o,s,l!==Ms.OFF,null),h),h.appendString("
")}h.appendString(""),ea(u,c);const E=h.build(),m=sce?sce.createHTML(E):E;u.innerHTML=m}const sce=b4("editorGhostText",{createHTML:u=>u});function S3t(u,e){const t=new PCe,n=new ICe(t,l=>e.getLanguageConfiguration(l)),i=new RCe(new B3t([u]),n),r=$W(i,[],void 0,!0);let a="";const o=u.getLineContent();function s(l,c){if(l.kind===2)if(s(l.openingBracket,c),c=Zn(c,l.openingBracket.length),l.child&&(s(l.child,c),c=Zn(c,l.child.length)),l.closingBracket)s(l.closingBracket,c),c=Zn(c,l.closingBracket.length);else{const h=n.getSingleLanguageBracketTokens(l.openingBracket.languageId).findClosingTokenText(l.openingBracket.bracketIds);a+=h}else if(l.kind!==3){if(l.kind===0||l.kind===1)a+=o.substring(c,Zn(c,l.length));else if(l.kind===4)for(const d of l.children)s(d,c),c=Zn(c,d.length)}}return s(r,uo),a}class B3t{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class il{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,n=this.value.charCodeAt(e),i;if(i=il._table[n],typeof i=="number")return this.pos+=1,{type:i,pos:e,len:1};if(il.isDigitCharacter(n)){i=8;do t+=1,n=this.value.charCodeAt(e+t);while(il.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}if(il.isVariableCharacter(n)){i=9;do n=this.value.charCodeAt(e+ ++t);while(il.isVariableCharacter(n)||il.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}i=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof il._table[n]>"u"&&!il.isDigitCharacter(n)&&!il.isVariableCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}}il._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class F6{constructor(){this._children=[]}appendChild(e){return e instanceof ts&&this._children[this._children.length-1]instanceof ts?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,i=n.children.indexOf(e),r=n.children.slice(0);r.splice(i,1,...t),n._children=r,function a(o,s){for(const l of o)l.parent=s,a(l.children,l)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof OA)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}let ts=class xye extends F6{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new xye(this.value)}};class vye extends F6{}class m0 extends vye{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof y6?this._children[0]:void 0}clone(){const e=new m0(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class y6 extends F6{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof ts&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new y6;return this.options.forEach(e.appendChild,e),e}}class yte extends F6{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,i=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(r=>r instanceof fc&&!!r.elseValue)&&(i=this._replace([])),i}_replace(e){let t="";for(const n of this._children)if(n instanceof fc){let i=e[n.index]||"";i=n.resolve(i),t+=i}else t+=n.toString();return t}toString(){return""}clone(){const e=new yte;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class fc extends F6{constructor(e,t,n,i){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=i}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((n,i)=>i===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new fc(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class gF extends vye{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new ts(t)],!0):!1}clone(){const e=new gF(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function lce(u,e){const t=[...u];for(;t.length>0;){const n=t.shift();if(!e(n))break;t.unshift(...n.children)}}class OA extends F6{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(n){return n instanceof m0&&(e.push(n),t=!t||t.indexi===e?(n=!0,!1):(t+=i.len(),!0)),n?t:-1}fullLen(e){let t=0;return lce([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:n}=e;for(;n;)n instanceof m0&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof gF&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new OA;return this._children=this.children.map(t=>t.clone()),e}walk(e){lce(this.children,e)}}class Sv{constructor(){this._scanner=new il,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){const i=new OA;return this.parseFragment(e,i),this.ensureFinalTabstop(i,n??!1,t??!1),i}parseFragment(e,t){const n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const i=new Map,r=[];t.walk(s=>(s instanceof m0&&(s.isFinalTabstop?i.set(0,void 0):!i.has(s.index)&&s.children.length>0?i.set(s.index,s.children):r.push(s)),!0));const a=(s,l)=>{const c=i.get(s.index);if(!c)return;const d=new m0(s.index);d.transform=s.transform;for(const h of c){const E=h.clone();d.appendChild(E),E instanceof m0&&i.has(E.index)&&!l.has(E.index)&&(l.add(E.index),a(E,l),l.delete(E.index))}t.replace(s,[d])},o=new Set;for(const s of r)a(s,o);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(r=>r.index===0)||e.appendChild(new m0(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const i=this._scanner.next();if(i.type!==0&&i.type!==4&&i.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new ts(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new m0(Number(t)):new gF(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const r=new m0(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new ts("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){const a=new y6;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(a),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseChoiceElement(e){const t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let i;if((i=this._accept(5,!0))?i=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:i=this._accept(void 0,!0),!i)return this._backTo(t),!1;n.push(i)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new ts(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const r=new gF(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new ts("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseTransform(e){const t=new yte;let n="",i="";for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(6,!0)||r,n+=r;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(5,!0)||this._accept(6,!0)||r,t.appendChild(new ts(r));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,i)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const i=this._accept(8,!0);if(i)if(n){if(this._accept(4))return e.appendChild(new fc(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new fc(Number(i))),!0;else return this._backTo(t),!1;if(this._accept(6)){const r=this._accept(9,!0);return!r||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new fc(Number(i),r)),!0)}else if(this._accept(11)){const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,void 0,r)),!0}else if(this._accept(13)){const r=this._until(1);if(r){const a=this._until(4);if(a)return e.appendChild(new fc(Number(i),void 0,r,a)),!0}}else{const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,void 0,r)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new ts(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}var RH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function w3t(u,e,t,n,i=Kt.None,r){return RH(this,void 0,void 0,function*(){const a=M3t(e,t),o=u.all(t),s=new aX;for(const p of o)p.groupId&&s.add(p.groupId,p);function l(p){if(!p.yieldsToGroupIds)return[];const D=[];for(const x of p.yieldsToGroupIds||[]){const b=s.get(x);for(const k of b)D.push(k)}return D}const c=new Map,d=new Set;function h(p,D){if(D=[...D,p],d.has(p))return D;d.add(p);try{const x=l(p);for(const b of x){const k=h(b,D);if(k)return k}}finally{d.delete(p)}}function E(p){const D=c.get(p);if(D)return D;const x=h(p,[]);x&&Mi(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${x.map(k=>k.toString?k.toString():""+k).join(" -> ")}`));const b=new QN;return c.set(p,b.p),(()=>RH(this,void 0,void 0,function*(){if(!x){const k=l(p);for(const A of k){const F=yield E(A);if(F&&F.items.length>0)return}}try{return yield p.provideInlineCompletions(t,e,n,i)}catch(k){Mi(k);return}}))().then(k=>b.complete(k),k=>b.error(k)),b.p}const m=yield Promise.all(o.map(p=>RH(this,void 0,void 0,function*(){return{provider:p,completions:yield E(p)}}))),g=new Map,f=[];for(const p of m){const D=p.completions;if(!D)continue;const x=new z3t(D,p.provider);f.push(x);for(const b of D.items){const k=Xw.from(b,x,a,t,r);g.set(k.hash(),k)}}return new L3t(Array.from(g.values()),new Set(g.keys()),f)})}class L3t{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class z3t{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class Xw{static from(e,t,n,i,r){let a,o,s=e.range?j.lift(e.range):n;if(typeof e.insertText=="string"){if(a=e.insertText,r&&e.completeBracketPairs){a=cce(a,s.getStartPosition(),i,r);const l=a.length-e.insertText.length;l!==0&&(s=new j(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+l))}o=void 0}else if("snippet"in e.insertText){const l=e.insertText.snippet.length;if(r&&e.completeBracketPairs){e.insertText.snippet=cce(e.insertText.snippet,s.getStartPosition(),i,r);const d=e.insertText.snippet.length-l;d!==0&&(s=new j(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+d))}const c=new Sv().parse(e.insertText.snippet);c.children.length===1&&c.children[0]instanceof ts?(a=c.children[0].value,o=void 0):(a=c.toString(),o={snippet:e.insertText.snippet,range:s})}else UN(e.insertText);return new Xw(a,e.command,s,a,o,e.additionalTextEdits||C3t(),e,t)}constructor(e,t,n,i,r,a,o,s){this.filterText=e,this.command=t,this.range=n,this.insertText=i,this.snippetInfo=r,this.additionalTextEdits=a,this.sourceInlineCompletion=o,this.source=s,e=e.replace(/\r\n|\r/g,` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function ace(u,e){return u===e?!0:!u||!e?!1:u instanceof Qw&&e instanceof Qw||u instanceof Aq&&e instanceof Aq?u.equals(e):!1}var F3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},y3t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const oce="ghost-text";let _q=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.languageService=n,this.isDisposed=on(this,!1),this.currentTextModel=zr(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=uu(this,i=>{if(this.isDisposed.read(i))return;const r=this.currentTextModel.read(i);if(r!==this.model.targetTextModel.read(i))return;const a=this.model.ghostText.read(i);if(!a)return;const o=a instanceof Aq?a.columnRange:void 0,s=[],l=[];function c(g,f){if(l.length>0){const p=l[l.length-1];f&&p.decorations.push(new os(p.content.length+1,p.content.length+1+g[0].length,f,0)),p.content+=g[0],g=g.slice(1)}for(const p of g)l.push({content:p,decorations:f?[new os(1,p.length+1,f,0)]:[]})}const d=r.getLineContent(a.lineNumber);let h,E=0;for(const g of a.parts){let f=g.lines;h===void 0?(s.push({column:g.column,text:f[0],preview:g.preview}),f=f.slice(1)):c([d.substring(E,g.column-1)],void 0),f.length>0&&(c(f,oce),h===void 0&&g.column<=d.length&&(h=g.column)),E=g.column-1}h!==void 0&&c([d.substring(E)],void 0);const m=h!==void 0?new b3t(h,d.length+1):void 0;return{replacedRange:o,inlineTexts:s,additionalLines:l,hiddenRange:m,lineNumber:a.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(i),targetTextModel:r}}),this.decorations=uu(this,i=>{const r=this.uiState.read(i);if(!r)return[];const a=[];r.replacedRange&&a.push({range:r.replacedRange.toRange(r.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),r.hiddenRange&&a.push({range:r.hiddenRange.toRange(r.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const o of r.inlineTexts)a.push({range:j.fromPositions(new ee(r.lineNumber,o.column)),options:{description:oce,after:{content:o.text,inlineClassName:o.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:zc.Left},showIfCollapsed:!0}});return a}),this.additionalLinesWidget=this._register(new A3t(this.editor,this.languageService.languageIdCodec,uu(i=>{const r=this.uiState.read(i);return r?{lineNumber:r.lineNumber,additionalLines:r.additionalLines,minReservedLineCount:r.additionalReservedLineCount,targetTextModel:r.targetTextModel}:void 0}))),this._register(ft(()=>{this.isDisposed.set(!0,void 0)})),this._register(k3t(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};_q=F3t([y3t(2,vn)],_q);class A3t extends ne{get viewZoneId(){return this._viewZoneId}constructor(e,t,n){super(),this.editor=e,this.languageIdCodec=t,this.lines=n,this._viewZoneId=void 0,this.editorOptionsChanged=Ps("editorOptionChanged",Ne.filter(this.editor.onDidChangeConfiguration,i=>i.hasChanged(33)||i.hasChanged(116)||i.hasChanged(98)||i.hasChanged(93)||i.hasChanged(51)||i.hasChanged(50)||i.hasChanged(66))),this._register(Xu(i=>{const r=this.lines.read(i);this.editorOptionsChanged.read(i),r?this.updateLines(r.lineNumber,r.additionalLines,r.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,n){const i=this.editor.getModel();if(!i)return;const{tabSize:r}=i.getOptions();this.editor.changeViewZones(a=>{this._viewZoneId&&(a.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,n);if(o>0){const s=document.createElement("div");_3t(s,r,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=a.addZone({afterLineNumber:e,heightInLines:o,domNode:s,afterColumnAffinity:1})}})}}function _3t(u,e,t,n,i){const r=n.get(33),a=n.get(116),o="none",s=n.get(93),l=n.get(51),c=n.get(50),d=n.get(66),h=new h6(1e4);h.appendString('
');for(let g=0,f=t.length;g');const x=nA(D),b=Ux(D),k=nr.createEmpty(D,i);sA(new fg(c.isMonospace&&!r,c.canUseHalfwidthRightwardsArrow,D,!1,x,b,0,k,p.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,a,o,s,l!==Ts.OFF,null),h),h.appendString("
")}h.appendString(""),ea(u,c);const E=h.build(),m=sce?sce.createHTML(E):E;u.innerHTML=m}const sce=b4("editorGhostText",{createHTML:u=>u});function S3t(u,e){const t=new PCe,n=new ICe(t,l=>e.getLanguageConfiguration(l)),i=new RCe(new B3t([u]),n),r=$W(i,[],void 0,!0);let a="";const o=u.getLineContent();function s(l,c){if(l.kind===2)if(s(l.openingBracket,c),c=Zn(c,l.openingBracket.length),l.child&&(s(l.child,c),c=Zn(c,l.child.length)),l.closingBracket)s(l.closingBracket,c),c=Zn(c,l.closingBracket.length);else{const h=n.getSingleLanguageBracketTokens(l.openingBracket.languageId).findClosingTokenText(l.openingBracket.bracketIds);a+=h}else if(l.kind!==3){if(l.kind===0||l.kind===1)a+=o.substring(c,Zn(c,l.length));else if(l.kind===4)for(const d of l.children)s(d,c),c=Zn(c,d.length)}}return s(r,uo),a}class B3t{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class rl{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,n=this.value.charCodeAt(e),i;if(i=rl._table[n],typeof i=="number")return this.pos+=1,{type:i,pos:e,len:1};if(rl.isDigitCharacter(n)){i=8;do t+=1,n=this.value.charCodeAt(e+t);while(rl.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}if(rl.isVariableCharacter(n)){i=9;do n=this.value.charCodeAt(e+ ++t);while(rl.isVariableCharacter(n)||rl.isDigitCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}i=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof rl._table[n]>"u"&&!rl.isDigitCharacter(n)&&!rl.isVariableCharacter(n));return this.pos+=t,{type:i,pos:e,len:t}}}rl._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class F6{constructor(){this._children=[]}appendChild(e){return e instanceof us&&this._children[this._children.length-1]instanceof us?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,i=n.children.indexOf(e),r=n.children.slice(0);r.splice(i,1,...t),n._children=r,function a(o,s){for(const l of o)l.parent=s,a(l.children,l)}(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof OA)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}let us=class xye extends F6{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new xye(this.value)}};class vye extends F6{}class g0 extends vye{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof y6?this._children[0]:void 0}clone(){const e=new g0(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class y6 extends F6{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof us&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new y6;return this.options.forEach(e.appendChild,e),e}}class yte extends F6{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,i=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(r=>r instanceof fc&&!!r.elseValue)&&(i=this._replace([])),i}_replace(e){let t="";for(const n of this._children)if(n instanceof fc){let i=e[n.index]||"";i=n.resolve(i),t+=i}else t+=n.toString();return t}toString(){return""}clone(){const e=new yte;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class fc extends F6{constructor(e,t,n,i){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=i}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((n,i)=>i===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new fc(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class gF extends vye{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new us(t)],!0):!1}clone(){const e=new gF(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function lce(u,e){const t=[...u];for(;t.length>0;){const n=t.shift();if(!e(n))break;t.unshift(...n.children)}}class OA extends F6{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(n){return n instanceof g0&&(e.push(n),t=!t||t.indexi===e?(n=!0,!1):(t+=i.len(),!0)),n?t:-1}fullLen(e){let t=0;return lce([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:n}=e;for(;n;)n instanceof g0&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof gF&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new OA;return this._children=this.children.map(t=>t.clone()),e}walk(e){lce(this.children,e)}}class Sv{constructor(){this._scanner=new rl,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){const i=new OA;return this.parseFragment(e,i),this.ensureFinalTabstop(i,n??!1,t??!1),i}parseFragment(e,t){const n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const i=new Map,r=[];t.walk(s=>(s instanceof g0&&(s.isFinalTabstop?i.set(0,void 0):!i.has(s.index)&&s.children.length>0?i.set(s.index,s.children):r.push(s)),!0));const a=(s,l)=>{const c=i.get(s.index);if(!c)return;const d=new g0(s.index);d.transform=s.transform;for(const h of c){const E=h.clone();d.appendChild(E),E instanceof g0&&i.has(E.index)&&!l.has(E.index)&&(l.add(E.index),a(E,l),l.delete(E.index))}t.replace(s,[d])},o=new Set;for(const s of r)a(s,o);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(r=>r.index===0)||e.appendChild(new g0(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const i=this._scanner.next();if(i.type!==0&&i.type!==4&&i.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new us(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new g0(Number(t)):new gF(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const r=new g0(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new us("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){const a=new y6;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(a),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseChoiceElement(e){const t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let i;if((i=this._accept(5,!0))?i=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||i:i=this._accept(void 0,!0),!i)return this._backTo(t),!1;n.push(i)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new us(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const r=new gF(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new us("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseTransform(e){const t=new yte;let n="",i="";for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(6,!0)||r,n+=r;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(5,!0)||this._accept(6,!0)||r,t.appendChild(new us(r));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,i)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const i=this._accept(8,!0);if(i)if(n){if(this._accept(4))return e.appendChild(new fc(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new fc(Number(i))),!0;else return this._backTo(t),!1;if(this._accept(6)){const r=this._accept(9,!0);return!r||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new fc(Number(i),r)),!0)}else if(this._accept(11)){const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,void 0,r)),!0}else if(this._accept(13)){const r=this._until(1);if(r){const a=this._until(4);if(a)return e.appendChild(new fc(Number(i),void 0,r,a)),!0}}else{const r=this._until(4);if(r)return e.appendChild(new fc(Number(i),void 0,void 0,r)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new us(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}var RH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function w3t(u,e,t,n,i=Kt.None,r){return RH(this,void 0,void 0,function*(){const a=M3t(e,t),o=u.all(t),s=new aX;for(const p of o)p.groupId&&s.add(p.groupId,p);function l(p){if(!p.yieldsToGroupIds)return[];const D=[];for(const x of p.yieldsToGroupIds||[]){const b=s.get(x);for(const k of b)D.push(k)}return D}const c=new Map,d=new Set;function h(p,D){if(D=[...D,p],d.has(p))return D;d.add(p);try{const x=l(p);for(const b of x){const k=h(b,D);if(k)return k}}finally{d.delete(p)}}function E(p){const D=c.get(p);if(D)return D;const x=h(p,[]);x&&Mi(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${x.map(k=>k.toString?k.toString():""+k).join(" -> ")}`));const b=new QN;return c.set(p,b.p),(()=>RH(this,void 0,void 0,function*(){if(!x){const k=l(p);for(const A of k){const F=yield E(A);if(F&&F.items.length>0)return}}try{return yield p.provideInlineCompletions(t,e,n,i)}catch(k){Mi(k);return}}))().then(k=>b.complete(k),k=>b.error(k)),b.p}const m=yield Promise.all(o.map(p=>RH(this,void 0,void 0,function*(){return{provider:p,completions:yield E(p)}}))),g=new Map,f=[];for(const p of m){const D=p.completions;if(!D)continue;const x=new z3t(D,p.provider);f.push(x);for(const b of D.items){const k=Xw.from(b,x,a,t,r);g.set(k.hash(),k)}}return new L3t(Array.from(g.values()),new Set(g.keys()),f)})}class L3t{constructor(e,t,n){this.completions=e,this.hashs=t,this.providerResults=n}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class z3t{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class Xw{static from(e,t,n,i,r){let a,o,s=e.range?j.lift(e.range):n;if(typeof e.insertText=="string"){if(a=e.insertText,r&&e.completeBracketPairs){a=cce(a,s.getStartPosition(),i,r);const l=a.length-e.insertText.length;l!==0&&(s=new j(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+l))}o=void 0}else if("snippet"in e.insertText){const l=e.insertText.snippet.length;if(r&&e.completeBracketPairs){e.insertText.snippet=cce(e.insertText.snippet,s.getStartPosition(),i,r);const d=e.insertText.snippet.length-l;d!==0&&(s=new j(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+d))}const c=new Sv().parse(e.insertText.snippet);c.children.length===1&&c.children[0]instanceof us?(a=c.children[0].value,o=void 0):(a=c.toString(),o={snippet:e.insertText.snippet,range:s})}else UN(e.insertText);return new Xw(a,e.command,s,a,o,e.additionalTextEdits||C3t(),e,t)}constructor(e,t,n,i,r,a,o,s){this.filterText=e,this.command=t,this.range=n,this.insertText=i,this.snippetInfo=r,this.additionalTextEdits=a,this.sourceInlineCompletion=o,this.source=s,e=e.replace(/\r\n|\r/g,` `),i=e.replace(/\r\n|\r/g,` -`)}withRange(e){return new Xw(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function M3t(u,e){const t=e.getWordAtPosition(u),n=e.getLineMaxColumn(u.lineNumber);return t?new j(u.lineNumber,t.startColumn,u.lineNumber,n):j.fromPositions(u,u.with(void 0,n))}function cce(u,e,t,n){const r=t.getLineContent(e.lineNumber).substring(0,e.column-1)+u,a=t.tokenization.tokenizeLineWithEdit(e,r.length-(e.column-1),u),o=a==null?void 0:a.sliceAndInflate(e.column-1,r.length,0);return o?S3t(o,n):u}class Bv{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const n=t?this.range.intersectRanges(t):this.range;if(!n)return this;const i=e.getValueInRange(n,1),r=A3(i,this.text),a=kq(this.range.getStartPosition(),Fq(i.substring(0,r))),o=this.text.substring(r),s=j.fromPositions(a,this.range.getEndPosition());return new Bv(s,o)}augments(e){return this.text.startsWith(e.text)&&T3t(this.range,e.range)}computeGhostText(e,t,n,i=0){let r=this.removeCommonPrefix(e);if(r.range.endLineNumber!==r.range.startLineNumber)return;const a=e.getLineContent(r.range.startLineNumber),o=Wu(a).length;if(r.range.startColumn-1<=o){const m=Wu(r.text).length,g=a.substring(r.range.startColumn-1,o),[f,p]=[r.range.getStartPosition(),r.range.getEndPosition()],D=f.column+g.length<=p.column?f.delta(0,g.length):p,x=j.fromPositions(D,p),b=r.text.startsWith(g)?r.text.substring(g.length):r.text.substring(m);r=new Bv(x,b)}const l=e.getValueInRange(r.range),c=N3t(l,r.text);if(!c)return;const d=r.range.startLineNumber,h=new Array;if(t==="prefix"){const m=c.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==l.length)return}const E=r.text.length-i;for(const m of c){const g=r.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===r.range.startLineNumber&&g0)return;if(m.modifiedLength===0)continue;const f=m.modifiedStart+m.modifiedLength,p=Math.max(m.modifiedStart,Math.min(f,E)),D=r.text.substring(m.modifiedStart,p),x=r.text.substring(p,Math.max(m.modifiedStart,f));if(D.length>0){const b=F1(D);h.push(new yq(g,b,!1))}if(x.length>0){const b=F1(x);h.push(new yq(g,b,!0))}}return new Qw(d,h)}}function T3t(u,e){return e.getStartPosition().equals(u.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(u.getEndPosition())}let Fd;function N3t(u,e){if((Fd==null?void 0:Fd.originalValue)===u&&(Fd==null?void 0:Fd.newValue)===e)return Fd==null?void 0:Fd.changes;{let t=hce(u,e,!0);if(t){const n=dce(t);if(n>0){const i=hce(u,e,!1);i&&dce(i)5e3||e.length>5e3)return;function n(l){let c=0;for(let d=0,h=l.length;dc&&(c=E)}return c}const i=Math.max(n(u),n(e));function r(l){if(l<0)throw new Error("unexpected");return i+l+1}function a(l){let c=0,d=0;const h=new Int32Array(l.length);for(let E=0,m=l.length;Eo},{getElements:()=>s}).ComputeDiff(!1).changes}var P3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ece=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},R3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let Sq=class extends ne{constructor(e,t,n,i,r){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=i,this.languageConfigurationService=r,this._updateOperation=this._register(new Ir),this.inlineCompletions=_w("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=_w("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var i,r;const a=new O3t(e,t,this.textModel.getVersionId()),o=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((i=this._updateOperation.value)===null||i===void 0)&&i.request.satisfies(a))return this._updateOperation.value.promise;if(!((r=o.get())===null||r===void 0)&&r.request.satisfies(a))return Promise.resolve(!0);const s=!!this._updateOperation.value;this._updateOperation.clear();const l=new vi,c=(()=>R3t(this,void 0,void 0,function*(){if((s||t.triggerKind===qh.Automatic)&&(yield I3t(this._debounceValue.get(this.textModel))),l.token.isCancellationRequested||this.textModel.getVersionId()!==a.versionId)return!1;const E=new Date,m=yield w3t(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,l.token,this.languageConfigurationService);if(l.token.isCancellationRequested||this.textModel.getVersionId()!==a.versionId)return!1;const g=new Date;this._debounceValue.update(this.textModel,g.getTime()-E.getTime());const f=new V3t(m,a,this.textModel,this.versionId);if(n){const p=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(p)&&f.prepend(n.inlineCompletion,p.range,!0)}return this._updateOperation.clear(),Fn(p=>{o.set(f,p)}),!0}))(),d=new H3t(a,l,c);return this._updateOperation.value=d,c}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Sq=P3t([Ece(3,We),Ece(4,tn)],Sq);function I3t(u,e){return new Promise(t=>{let n;const i=setTimeout(()=>{n&&n.dispose(),t()},u);e&&(n=e.onCancellationRequested(()=>{clearTimeout(i),n&&n.dispose(),t()}))})}class O3t{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&j3t(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===qh.Automatic||this.context.triggerKind===qh.Explicit)&&this.versionId===e.versionId}}function j3t(u,e,t){return!u||!e?u===e:t(u,e)}class H3t{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}}class V3t{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,i){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=i,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=uu(this,a=>{this.versionId.read(a);let o=!1;for(const s of this._inlineCompletions)o=o||s._updateRange(this.textModel);return o&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const r=n.deltaDecorations([],e.completions.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((a,o)=>new mce(a,r[o],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();const i=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new mce(e,i,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class mce{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,i){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=i??e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Bv(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){const i=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==i.range.startLineNumber)return!1;const r=e.getValueInRange(i.range,1).toLowerCase(),a=i.text.toLowerCase(),o=Math.max(0,t.column-i.range.startColumn);let s=a.substring(0,o),l=a.substring(o),c=r.substring(0,o),d=r.substring(o);const h=e.getLineIndentColumn(i.range.startLineNumber);return i.range.startColumn<=h&&(c=c.trimStart(),c.length===0&&(d=d.trimStart()),s=s.trimStart(),s.length===0&&(l=l.trimStart())),s.startsWith(c)&&!!ybe(d,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Bv(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return gce(this._getUpdatedRange(e)).isBefore(gce(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function gce(u){return u.startLineNumber===u.endLineNumber?new ee(1,1+u.endColumn-u.startColumn):new ee(1+u.endLineNumber-u.startLineNumber,u.endColumn)}var v2=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Pt={Visible:pte,HasFocusedSuggestion:new Pe("suggestWidgetHasFocusedSuggestion",!1,v("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Pe("suggestWidgetDetailsVisible",!1,v("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Pe("suggestWidgetMultipleSuggestions",!1,v("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Pe("suggestionMakesTextEdit",!0,v("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Pe("acceptSuggestionOnEnter",!0,v("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Pe("suggestionHasInsertAndReplaceRange",!1,v("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Pe("suggestionInsertMode",void 0,{type:"string",description:v("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Pe("suggestionCanResolve",!1,v("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},dm=new K("suggestWidgetStatusBar");let $3t=class{constructor(e,t,n,i){var r;this.position=e,this.completion=t,this.container=n,this.provider=i,this.isInvalid=!1,this.score=Kc.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(r=t.label)===null||r===void 0?void 0:r.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,j.isIRange(t.range)?(this.editStart=new ee(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ee(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ee(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||j.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ee(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ee(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ee(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||j.spansMultipleLines(t.range.insert)||j.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof i.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(e){return v2(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new va(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._resolveDuration=n.elapsed()},i=>{dd(i)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache})}};class fF{constructor(e=2,t=new Set,n=new Set,i=new Map,r=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=i,this.showDeprecated=r}}fF.default=new fF;let K3t;function W3t(){return K3t}class G3t{constructor(e,t,n,i){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=i}}function Ate(u,e,t,n=fF.default,i={triggerKind:0},r=Kt.None){return v2(this,void 0,void 0,function*(){const a=new va;t=t.clone();const o=e.getWordAtPosition(t),s=o?new j(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):j.fromPositions(t),l={replace:s,insert:s.setEndPosition(t.lineNumber,t.column)},c=[],d=new pe,h=[];let E=!1;const m=(f,p,D)=>{var x,b,k;let A=!1;if(!p)return A;for(const F of p.suggestions)if(!n.kindFilter.has(F.kind)){if(!n.showDeprecated&&(!((x=F==null?void 0:F.tags)===null||x===void 0)&&x.includes(1)))continue;F.range||(F.range=l),F.sortText||(F.sortText=typeof F.label=="string"?F.label:F.label.label),!E&&F.insertTextRules&&F.insertTextRules&4&&(E=Sv.guessNeedsClipboard(F.insertText)),c.push(new $3t(t,F,p,f)),A=!0}return TQ(p)&&d.add(p),h.push({providerName:(b=f._debugDisplayName)!==null&&b!==void 0?b:"unknown_provider",elapsedProvider:(k=p.duration)!==null&&k!==void 0?k:-1,elapsedOverall:D.elapsed()}),A},g=(()=>v2(this,void 0,void 0,function*(){}))();for(const f of u.orderedGroups(e)){let p=!1;if(yield Promise.all(f.map(D=>v2(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(D)){const x=n.providerItemsToReuse.get(D);x.forEach(b=>c.push(b)),p=p||x.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(D)))try{const x=new va,b=yield D.provideCompletionItems(e,t,i,r);p=m(D,b,x)||p}catch(x){Mi(x)}}))),p||r.isCancellationRequested)break}return yield g,r.isCancellationRequested?(d.dispose(),Promise.reject(new hg)):new G3t(c.sort(J3t(n.snippetSortOrder)),E,{entries:h,elapsed:a.elapsed()},d)})}function _te(u,e){if(u.sortTextLow&&e.sortTextLow){if(u.sortTextLowe.sortTextLow)return 1}return u.textLabele.textLabel?1:u.completion.kind-e.completion.kind}function U3t(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return _te(u,e)}function q3t(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return _te(u,e)}const kR=new Map;kR.set(0,U3t);kR.set(2,q3t);kR.set(1,_te);function J3t(u){return kR.get(u)}ru.registerCommand("_executeCompletionItemProvider",(u,...e)=>v2(void 0,void 0,void 0,function*(){const[t,n,i,r]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string"||!i),Ru(typeof r=="number"||!r);const{completionProvider:a}=u.get(We),o=yield u.get(Vo).createModelReference(t);try{const s={incomplete:!1,suggestions:[]},l=[],c=o.object.textEditorModel.validatePosition(n),d=yield Ate(a,o.object.textEditorModel,c,void 0,{triggerCharacter:i??void 0,triggerKind:i?1:0});for(const h of d.items)l.length<(r??0)&&l.push(h.resolve(Kt.None)),s.incomplete=s.incomplete||h.container.incomplete,s.suggestions.push(h.completion);try{return yield Promise.all(l),s}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{o.dispose()}}));function Z3t(u,e){var t;(t=u.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class w5{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function fce(u,e=na){return Jnt(u,e)?u.charAt(0).toUpperCase()+u.slice(1):u}var Y3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Q3t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class pce{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const n=t.resolve(e);if(n!==void 0)return n}}}class Dce{constructor(e,t,n,i){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=i}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const r=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);r&&(n=r.value,i=r.multiline)}if(n&&i&&e.snippet){const r=this._model.getLineContent(this._selection.startLineNumber),a=Wu(r,0,this._selection.startColumn-1);let o=a;e.snippet.walk(l=>l===e?!1:(l instanceof ts&&(o=Wu(F1(l.value).pop())),!0));const s=A3(o,a);n=n.replace(/(\r\n|\r|\n)(.*)/g,(l,c,d)=>`${c}${o.substr(s)}${d}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class xce{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return QE(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const n=QE(this._model.uri.fsPath),i=n.lastIndexOf(".");return i<=0?n:n.slice(0,i)}else{if(t==="TM_DIRECTORY")return Ave(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(xP(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class vce{constructor(e,t,n,i){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=i}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const n=t.split(/\r\n|\n|\r/).filter(i=>!Mve(i));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}}let eL=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){const{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),i=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(i){if(t==="LINE_COMMENT")return i.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return i.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return i.blockCommentEndToken||void 0}}};eL=Y3t([Q3t(2,tn)],eL);class Mc{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return Mc.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return Mc.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return Mc.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return Mc.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),i=n>0?"-":"+",r=Math.trunc(Math.abs(n/60)),a=r<10?"0"+r:r,o=Math.abs(n)-r*60,s=o<10?"0"+o:o;return i+a+":"+s}}}Mc.dayNames=[v("Sunday","Sunday"),v("Monday","Monday"),v("Tuesday","Tuesday"),v("Wednesday","Wednesday"),v("Thursday","Thursday"),v("Friday","Friday"),v("Saturday","Saturday")];Mc.dayNamesShort=[v("SundayShort","Sun"),v("MondayShort","Mon"),v("TuesdayShort","Tue"),v("WednesdayShort","Wed"),v("ThursdayShort","Thu"),v("FridayShort","Fri"),v("SaturdayShort","Sat")];Mc.monthNames=[v("January","January"),v("February","February"),v("March","March"),v("April","April"),v("May","May"),v("June","June"),v("July","July"),v("August","August"),v("September","September"),v("October","October"),v("November","November"),v("December","December")];Mc.monthNamesShort=[v("JanuaryShort","Jan"),v("FebruaryShort","Feb"),v("MarchShort","Mar"),v("AprilShort","Apr"),v("MayShort","May"),v("JuneShort","Jun"),v("JulyShort","Jul"),v("AugustShort","Aug"),v("SeptemberShort","Sep"),v("OctoberShort","Oct"),v("NovemberShort","Nov"),v("DecemberShort","Dec")];class Cce{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=cot(this._workspaceService.getWorkspace());if(!oot(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(dG(e))return QE(e.uri.path);let t=QE(e.configPath.path);return t.endsWith(hG)&&(t=t.substr(0,t.length-hG.length-1)),t}_resoveWorkspacePath(e){if(dG(e))return fce(e.uri.fsPath);const t=QE(e.configPath.path);let n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?fce(n):"/"}}class bce{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return mR()}}var X3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ept=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},oc;class c0{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=$re(t.placeholders,m0.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const n of this._snippet.placeholders){const i=this._snippet.offset(n),r=this._snippet.fullLen(n),a=j.fromPositions(e.getPositionAt(this._offset+i),e.getPositionAt(this._offset+i+r)),o=n.isFinalTabstop?c0._decor.inactiveFinal:c0._decor.inactive,s=t.addDecoration(a,o);this._placeholderDecorations.set(n,s)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const i=[];for(const r of this._placeholderGroups[this._placeholderGroupsIdx])if(r.transform){const a=this._placeholderDecorations.get(r),o=this._editor.getModel().getDecorationRange(a),s=this._editor.getModel().getValueInRange(o),l=r.transform.resolve(s).split(/\r\n|\r|\n/);for(let c=1;c0&&this._editor.executeEdits("snippet.placeholderTransform",i)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const n=this._editor.getModel().changeDecorations(i=>{const r=new Set,a=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),l=this._editor.getModel().getDecorationRange(s);a.push(new Ye(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),i.changeDecorationOptions(s,o.isFinalTabstop?c0._decor.activeFinal:c0._decor.active),r.add(o);for(const c of this._snippet.enclosingPlaceholders(o)){const d=this._placeholderDecorations.get(c);i.changeDecorationOptions(d,c.isFinalTabstop?c0._decor.activeFinal:c0._decor.active),r.add(c)}}for(const[o,s]of this._placeholderDecorations)r.has(o)||i.changeDecorationOptions(s,o.isFinalTabstop?c0._decor.inactiveFinal:c0._decor.inactive);return a});return t?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof m0){const n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let n;for(const i of t){if(i.isFinalTabstop)break;n||(n=[],e.set(i.index,n));const r=this._placeholderDecorations.get(i),a=this._editor.getModel().getDecorationRange(r);if(!a){e.delete(i.index);break}n.push(a)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof y6,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const i of this._placeholderGroups[this._placeholderGroupsIdx]){const r=e.shift();console.assert(r._offset!==-1),console.assert(!r._placeholderDecorations);const a=r._snippet.placeholderInfo.last.index;for(const s of r._snippet.placeholderInfo.all)s.isFinalTabstop?s.index=i.index+(a+1)/this._nestingLevel:s.index=i.index+s.index/this._nestingLevel;this._snippet.replace(i,r._snippet.children);const o=this._placeholderDecorations.get(i);n.removeDecoration(o),this._placeholderDecorations.delete(i);for(const s of r._snippet.placeholders){const l=r._snippet.offset(s),c=r._snippet.fullLen(s),d=j.fromPositions(t.getPositionAt(r._offset+l),t.getPositionAt(r._offset+l+c)),h=n.addDecoration(d,c0._decor.inactive);this._placeholderDecorations.set(s,h)}}this._placeholderGroups=$re(this._snippet.placeholders,m0.compareByIndex)})}}c0._decor={active:Lt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Lt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Lt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Lt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const kce={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let tL=oc=class{static adjustWhitespace(e,t,n,i,r){const a=e.getLineContent(t.lineNumber),o=Wu(a,0,t.column-1);let s;return i.walk(l=>{if(!(l instanceof ts)||l.parent instanceof y6||r&&!r.has(l))return!0;const c=l.value.split(/\r\n|\r|\n/);if(n){const h=i.offset(l);if(h===0)c[0]=e.normalizeIndentation(c[0]);else{s=s??i.toString();const E=s.charCodeAt(h-1);(E===10||E===13)&&(c[0]=e.normalizeIndentation(o+c[0]))}for(let E=1;Eb.get(M3)),m=e.invokeWithinContext(b=>new xce(b.get(cv),h)),g=()=>o,f=h.getValueInRange(oc.adjustSelection(h,e.getSelection(),n,0)),p=h.getValueInRange(oc.adjustSelection(h,e.getSelection(),0,i)),D=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),x=e.getSelections().map((b,k)=>({selection:b,idx:k})).sort((b,k)=>j.compareRangesUsingStarts(b.selection,k.selection));for(const{selection:b,idx:k}of x){let A=oc.adjustSelection(h,b,n,0),F=oc.adjustSelection(h,b,0,i);f!==h.getValueInRange(A)&&(A=b),p!==h.getValueInRange(F)&&(F=b);const S=b.setStartPosition(A.startLineNumber,A.startColumn).setEndPosition(F.endLineNumber,F.endColumn),w=new Sv().parse(t,!0,r),z=S.getStartPosition(),N=oc.adjustWhitespace(h,z,a||k>0&&D!==h.getLineFirstNonWhitespaceColumn(b.positionLineNumber),w);w.resolveVariables(new pce([m,new vce(g,k,x.length,e.getOption(78)==="spread"),new Dce(h,b,k,s),new eL(h,b,l),new Mc,new Cce(E),new bce])),c[k]=yn.replace(S,w.toString()),c[k].identifier={major:k,minor:0},c[k]._isTracked=!0,d[k]=new c0(e,w,N)}return{edits:c,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,n,i,r,a,o){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const s=[],l=e.getModel(),c=new Sv,d=new OA,h=new pce([e.invokeWithinContext(m=>new xce(m.get(cv),l)),new vce(()=>r,0,e.getSelections().length,e.getOption(78)==="spread"),new Dce(l,e.getSelection(),0,a),new eL(l,e.getSelection(),o),new Mc,new Cce(e.invokeWithinContext(m=>m.get(M3))),new bce]);t=t.sort((m,g)=>j.compareRangesUsingStarts(m.range,g.range));let E=0;for(let m=0;m0){const k=t[m-1].range,A=j.fromPositions(k.getEndPosition(),g.getStartPosition()),F=new ts(l.getValueInRange(A));d.appendChild(F),E+=F.value.length}const p=c.parseFragment(f,d);oc.adjustWhitespace(l,g.getStartPosition(),!0,d,new Set(p)),d.resolveVariables(h);const D=d.toString(),x=D.slice(E);E=D.length;const b=yn.replace(g,x);b.identifier={major:m,minor:0},b._isTracked=!0,s.push(b)}return c.ensureFinalTabstop(d,n,!0),{edits:s,snippets:[new c0(e,d,"")]}}constructor(e,t,n=kce,i){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=i,this._templateMerges=[],this._snippets=[]}dispose(){Su(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?oc.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):oc.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{const i=n.filter(r=>!!r.identifier);for(let r=0;rYe.fromPositions(r.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=kce){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:i}=oc.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,r=>{const a=r.filter(s=>!!s.identifier);for(let s=0;sYe.fromPositions(s.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const n of this._snippets){const i=n.move(e);t.push(...i)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{r.push(...i.get(a))})}e.sort(j.compareRangesUsingStarts);for(const[n,i]of t){if(i.length!==e.length){t.delete(n);continue}i.sort(j.compareRangesUsingStarts);for(let r=0;r0}};tL=oc=X3t([ept(3,tn)],tL);var tpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Y9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ZD;const Fce={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Or=ZD=class{static get(e){return e.getContribution(ZD.ID)}constructor(e,t,n,i,r){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=r,this._snippetListener=new pe,this._modelVersionId=-1,this._inSnippet=ZD.InSnippetMode.bindTo(i),this._hasNextTabstop=ZD.HasNextTabstop.bindTo(i),this._hasPrevTabstop=ZD.HasPrevTabstop.bindTo(i)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?Fce:Object.assign(Object.assign({},Fce),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Ru(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tL(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){const i={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,d)=>{if(!this._session||c!==this._editor.getModel()||!ee.equals(this._editor.getPosition(),d))return;const{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;const E=c.getValueInRange(h.range),m=!!h.choice.options.find(f=>f.value===E),g=[];for(let f=0;f{a==null||a.dispose(),o=!1},l=()=>{o||(a=this._languageFeaturesService.completionProvider.register({language:r.getLanguageId(),pattern:r.uri.fsPath,scheme:r.uri.scheme,exclusive:!0},i),this._snippetListener.add(a),o=!0)};this._choiceCompletions={provider:i,enable:l,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{Z3t(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Or.ID="snippetController2";Or.InSnippetMode=new Pe("inSnippetMode",!1,v("inSnippetMode","Whether the editor in current in snippet mode"));Or.HasNextTabstop=new Pe("hasNextTabstop",!1,v("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Or.HasPrevTabstop=new Pe("hasPrevTabstop",!1,v("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Or=ZD=tpt([Y9(1,i0),Y9(2,We),Y9(3,pt),Y9(4,tn)],Or);fu(Or.ID,Or,4);const FR=xr.bindToContribution(Or.get);ze(new FR({id:"jumpToNextSnippetPlaceholder",precondition:Ee.and(Or.InSnippetMode,Or.HasNextTabstop),handler:u=>u.next(),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:2}}));ze(new FR({id:"jumpToPrevSnippetPlaceholder",precondition:Ee.and(Or.InSnippetMode,Or.HasPrevTabstop),handler:u=>u.prev(),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:1026}}));ze(new FR({id:"leaveSnippet",precondition:Or.InSnippetMode,handler:u=>u.cancel(!0),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:9,secondary:[1033]}}));ze(new FR({id:"acceptSnippet",precondition:Or.InSnippetMode,handler:u=>u.finish()}));var upt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},IH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ch=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Ss;(function(u){u[u.Undo=0]="Undo",u[u.Redo=1]="Redo",u[u.AcceptWord=2]="AcceptWord",u[u.Other=3]="Other"})(Ss||(Ss={}));let Bq=class extends ne{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,i,r,a,o,s,l,c,d,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=i,this._debounceValue=r,this._suggestPreviewEnabled=a,this._suggestPreviewMode=o,this._inlineSuggestMode=s,this._enabled=l,this._instantiationService=c,this._commandService=d,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(Sq,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=on(this,!1),this._forceUpdate=N2e("forceUpdate"),this._selectedInlineCompletionId=on(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Ss.Redo,Ss.Undo,Ss.AcceptWord]),this._fetchInlineCompletions=Jct({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:qh.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);const p=this.selectedInlineCompletion.get(),D=g.preserveCurrentCompletion||p!=null&&p.forwardStable?p:void 0,x=this._source.suggestWidgetInlineCompletions.get(),b=this.selectedSuggestItem.read(m);if(x&&!b){const F=this._source.inlineCompletions.get();Fn(S=>{F&&x.request.versionId>F.request.versionId&&this._source.inlineCompletions.set(x.clone(),S),this._source.clearSuggestWidgetInlineCompletions(S)})}const k=this.cursorPosition.read(m),A={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:b==null?void 0:b.toSelectedSuggestionInfo()};return this._source.fetch(k,A,D)}),this._filteredInlineCompletionItems=uu(this,m=>{const g=this._source.inlineCompletions.read(m);if(!g)return[];const f=this.cursorPosition.read(m);return g.inlineCompletions.filter(D=>D.isVisible(this.textModel,f,m))}),this.selectedInlineCompletionIndex=uu(this,m=>{const g=this._selectedInlineCompletionId.read(m),f=this._filteredInlineCompletionItems.read(m),p=this._selectedInlineCompletionId===void 0?-1:f.findIndex(D=>D.semanticId===g);return p===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):p}),this.selectedInlineCompletion=uu(this,m=>{const g=this._filteredInlineCompletionItems.read(m),f=this.selectedInlineCompletionIndex.read(m);return g[f]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=uu(this,m=>{if(this.lastTriggerKind.read(m)===qh.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=N0e({owner:this,equalityComparer:(m,g)=>!m||!g?m===g:ace(m.ghostText,g.ghostText)&&m.inlineCompletion===g.inlineCompletion&&m.suggestItem===g.suggestItem},m=>{var g;const f=this.textModel,p=this.selectedSuggestItem.read(m);if(p){const D=p.toSingleTextEdit().removeCommonPrefix(f),x=this._computeAugmentedCompletion(D,m);if(!this._suggestPreviewEnabled.read(m)&&!x)return;const k=(g=x==null?void 0:x.edit)!==null&&g!==void 0?g:D,A=x?x.edit.text.length-D.text.length:0,F=this._suggestPreviewMode.read(m),S=this.cursorPosition.read(m),w=k.computeGhostText(f,F,S,A);return{ghostText:w??new Qw(k.range.endLineNumber,[]),inlineCompletion:x==null?void 0:x.completion,suggestItem:p}}else{if(!this._isActive.read(m))return;const D=this.selectedInlineCompletion.read(m);if(!D)return;const x=D.toSingleTextEdit(m),b=this._inlineSuggestMode.read(m),k=this.cursorPosition.read(m),A=x.computeGhostText(f,b,k);return A?{ghostText:A,inlineCompletion:D,suggestItem:void 0}:void 0}}),this.ghostText=N0e({owner:this,equalityComparer:ace},m=>{const g=this.state.read(m);if(g)return g.ghostText}),this._register(iF(this._fetchInlineCompletions));let E;this._register(Xu(m=>{var g,f;const p=this.state.read(m),D=p==null?void 0:p.inlineCompletion;if((D==null?void 0:D.semanticId)!==(E==null?void 0:E.semanticId)&&(E=D,D)){const x=D.inlineCompletion,b=x.source;(f=(g=b.provider).handleItemDidShow)===null||f===void 0||f.call(g,b.inlineCompletions,x.sourceInlineCompletion,x.insertText)}}))}trigger(e){return ch(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return ch(this,void 0,void 0,function*(){gU(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,qh.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){gU(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){const n=this.textModel,i=this._source.suggestWidgetInlineCompletions.read(t),r=i?i.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(tk);return IYe(r,o=>{let s=o.toSingleTextEdit(t);return s=s.removeCommonPrefix(n,j.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),s.augments(e)?{edit:s,completion:o}:void 0})}_deltaSelectedInlineCompletionIndex(e){return ch(this,void 0,void 0,function*(){yield this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return ch(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return ch(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t;return ch(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Si;const n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;const i=n.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),i.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[yn.replaceMove(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition()),(t=Or.get(e))===null||t===void 0||t.insert(i.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[yn.replaceMove(i.range,i.insertText),...i.additionalTextEdits]),i.command&&i.source.addRef(),Fn(r=>{this._source.clear(r),this._isActive.set(!1,r)}),i.command&&(yield this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,Mi),i.source.removeRef())})}acceptNextWord(e){return ch(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,n)=>{const i=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),r=this._languageConfigurationService.getLanguageConfiguration(i),a=new RegExp(r.wordDefinition.source,r.wordDefinition.flags.replace("g","")),o=n.match(a);let s=0;o&&o.index!==void 0?o.index===0?s=o[0].length:s=o.index:s=n.length;const c=/\s+/g.exec(n);return c&&c.index!==void 0&&c.index+c[0].length{const i=n.match(/\n/);return i&&i.index!==void 0?i.index+1:n.length})})}_acceptNext(e,t){return ch(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Si;const n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;const i=n.ghostText,r=n.inlineCompletion.toInlineCompletion(void 0);if(r.snippetInfo||r.filterText!==r.insertText){yield this.accept(e);return}const a=i.parts[0],o=new ee(i.lineNumber,a.column),s=a.lines.join(` -`),l=t(o,s);if(l===s.length&&i.parts.length===1){this.accept(e);return}const c=s.substring(0,l);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[yn.replace(j.fromPositions(o),c)]);const d=Fq(c);e.setPosition(kq(o,d))}finally{this._isAcceptingPartially=!1}if(r.source.provider.handlePartialAccept){const d=j.fromPositions(r.range.getStartPosition(),kq(o,Fq(c))),h=e.getModel().getValueInRange(d,1);r.source.provider.handlePartialAccept(r.source.inlineCompletions,r.sourceInlineCompletion,h.length)}})}handleSuggestAccepted(e){var t,n;const i=e.toSingleTextEdit().removeCommonPrefix(this.textModel),r=this._computeAugmentedCompletion(i,void 0);if(!r)return;const a=r.completion.inlineCompletion;(n=(t=a.source.provider).handlePartialAccept)===null||n===void 0||n.call(t,a.source.inlineCompletions,a.sourceInlineCompletion,i.text.length)}};Bq=upt([IH(9,mt),IH(10,ni),IH(11,tn)],Bq);var npt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Lb;class Ste{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;const i=n[0].score[0];for(let r=0;rs&&d.type===n[l].completion.kind&&d.insertText===n[l].completion.insertText&&(s=d.touch,o=l),n[l].completion.preselect&&a===-1)return a=l}return o!==-1?o:a!==-1?a:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[n,i]of e)i.touch=t,i.type=typeof i.type=="number"?i.type:rk.fromString(i.type),this._cache.set(n,i);this._seq=this._cache.size}}class rpt extends Ste{constructor(){super("recentlyUsedByPrefix"),this._trie=px.forStrings(),this._seq=0}memorize(e,t,n){const{word:i}=e.getWordUntilPosition(t),r=`${e.getLanguageId()}/${i}`;this._trie.set(r,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){const{word:i}=e.getWordUntilPosition(t);if(!i)return super.select(e,t,n);const r=`${e.getLanguageId()}/${i}`;let a=this._trie.get(r);if(a||(a=this._trie.findSubstr(r)),a)for(let o=0;oe.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,n]of e)n.type=typeof n.type=="number"?n.type:rk.fromString(n.type),this._trie.set(t,n)}}}let pF=Lb=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new pe,this._persistSoon=new Hu(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===lw.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==i){this._saveState();const r=Lb._strategyCtors.get(i)||Cye;this._strategy=new r;try{const o=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,s=this._storageService.get(`${Lb._storagePrefix}/${i}`,o);s&&this._strategy.fromJSON(JSON.parse(s))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${Lb._storagePrefix}/${this._strategy.name}`,n,t,1)}}};pF._strategyCtors=new Map([["recentlyUsedByPrefix",rpt],["recentlyUsed",ipt],["first",Cye]]);pF._storagePrefix="suggest/memories";pF=Lb=npt([yce(0,Ul),yce(1,tu)],pF);const yR=Ut("ISuggestMemories");au(yR,pF,1);var apt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},opt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},wq;let DF=wq=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=wq.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(122)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(122)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const n=this._editor.getModel(),i=this._editor.getSelection(),r=n.getWordAtPosition(i.getStartPosition());if(!r){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(r.endColumn===i.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};DF.AtEnd=new Pe("atEndOfWord",!1);DF=wq=apt([opt(1,pt)],DF);var spt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zb;let Z3=zb=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=zb.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(zb._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let i=n;for(let r=t.items.length;r>0&&(i=(i+t.items.length+(e?1:-1))%t.items.length,!(i===n||!t.items[i].completion.additionalTextEdits));r--);return i}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=zb._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Z3.OtherSuggestions=new Pe("hasOtherSuggestions",!1);Z3=zb=spt([lpt(1,pt)],Z3);class cpt{constructor(e,t,n,i){this._disposables=new pe,this._disposables.add(n.onDidSuggest(r=>{r.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(r=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(r=>{if(this._active&&!t.isFrozen()&&n.state!==0){const a=r.charCodeAt(r.length-1);this._active.acceptCharacters.has(a)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!pa(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new _B;for(const n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var dpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Bs{provideSelectionRanges(e,t){return dpt(this,void 0,void 0,function*(){const n=[];for(const i of t){const r=[];n.push(r);const a=new Map;yield new Promise(o=>Bs._bracketsRightYield(o,0,e,i,a)),yield new Promise(o=>Bs._bracketsLeftYield(o,0,e,i,a,r))}return n})}static _bracketsRightYield(e,t,n,i,r){const a=new Map,o=Date.now();for(;;){if(t>=Bs._maxRounds){e();break}if(!i){e();break}const s=n.bracketPairs.findNextBracket(i);if(!s){e();break}if(Date.now()-o>Bs._maxDuration){setTimeout(()=>Bs._bracketsRightYield(e,t+1,n,i,r));break}if(s.bracketInfo.isOpeningBracket){const c=s.bracketInfo.bracketText,d=a.has(c)?a.get(c):0;a.set(c,d+1)}else{const c=s.bracketInfo.getOpeningBrackets()[0].bracketText;let d=a.has(c)?a.get(c):0;if(d-=1,a.set(c,Math.max(0,d)),d<0){let h=r.get(c);h||(h=new to,r.set(c,h)),h.push(s.range)}}i=s.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,i,r,a){const o=new Map,s=Date.now();for(;;){if(t>=Bs._maxRounds&&r.size===0){e();break}if(!i){e();break}const l=n.bracketPairs.findPrevBracket(i);if(!l){e();break}if(Date.now()-s>Bs._maxDuration){setTimeout(()=>Bs._bracketsLeftYield(e,t+1,n,i,r,a));break}if(l.bracketInfo.isOpeningBracket){const d=l.bracketInfo.bracketText;let h=o.has(d)?o.get(d):0;if(h-=1,o.set(d,Math.max(0,h)),h<0){const E=r.get(d);if(E){const m=E.shift();E.size===0&&r.delete(d);const g=j.fromPositions(l.range.getEndPosition(),m.getStartPosition()),f=j.fromPositions(l.range.getStartPosition(),m.getEndPosition());a.push({range:g}),a.push({range:f}),Bs._addBracketLeading(n,f,a)}}}else{const d=l.bracketInfo.getOpeningBrackets()[0].bracketText,h=o.has(d)?o.get(d):0;o.set(d,h+1)}i=l.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;const i=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(i);r!==0&&r!==t.startColumn&&(n.push({range:j.fromPositions(new ee(i,r),t.getEndPosition())}),n.push({range:j.fromPositions(new ee(i,1),t.getEndPosition())}));const a=i-1;if(a>0){const o=e.getLineFirstNonWhitespaceColumn(a);o===t.startColumn&&o!==e.getLineLastNonWhitespaceColumn(a)&&(n.push({range:j.fromPositions(new ee(a,o),t.getEndPosition())}),n.push({range:j.fromPositions(new ee(a,1),t.getEndPosition())}))}}}Bs._maxDuration=30;Bs._maxRounds=2;var hpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class bc{static create(e,t){return hpt(this,void 0,void 0,function*(){if(!t.getOption(117).localityBonus||!t.hasModel())return bc.None;const n=t.getModel(),i=t.getPosition();if(!e.canComputeWordRanges(n.uri))return bc.None;const[r]=yield new Bs().provideSelectionRanges(n,[i]);if(r.length===0)return bc.None;const a=yield e.computeWordRanges(n.uri,r[0].range);if(!a)return bc.None;const o=n.getWordUntilPosition(i);return delete a[o.word],new class extends bc{distance(s,l){if(!i.equals(t.getPosition()))return 0;if(l.kind===17)return 2<<20;const c=typeof l.label=="string"?l.label:l.label.label,d=a[c];if(eve(d))return 2<<20;const h=X2(d,j.fromPositions(s),j.compareRangesUsingStarts),E=h>=0?d[h]:d[Math.max(0,~h-1)];let m=r.length;for(const g of r){if(!j.containsRange(g.range,E))break;m-=1}return m}}})}}bc.None=new class extends bc{distance(){return 0}};let Ace=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class kE{constructor(e,t,n,i,r,a,o=SP.default,s=void 0){this.clipboardText=s,this._snippetCompareFn=kE._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=i,this._options=r,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=o,a==="top"?this._snippetCompareFn=kE._compareCompletionItemsSnippetsUp:a==="bottom"&&(this._snippetCompareFn=kE._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext;let i="",r="";const a=this._refilterKind===1?this._items:this._filteredItems,o=[],s=!this._options.filterGraceful||a.length>2e3?T3:Iot;for(let l=0;l=E)c.score=Kc.Default;else if(typeof c.completion.filterText=="string"){const g=s(i,r,m,c.completion.filterText,c.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;nW(c.completion.filterText,c.textLabel)===0?c.score=g:(c.score=Tot(i,r,m,c.textLabel,c.labelLow,0),c.score[0]=g[0])}else{const g=s(i,r,m,c.textLabel,c.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;c.score=g}}c.idx=l,c.distance=this._wordDistance.distance(c.position,c.completion),o.push(c),e.push(c.textLabel.length)}this._filteredItems=o.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?oK(e.length-.85,e,(l,c)=>l-c):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return kE._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return kE._compareCompletionItems(e,t)}}var Ept=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$4=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},mpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Lq;class qg{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);const i=t.getWordAtPosition(n);return!(!i||i.endColumn!==n.column&&i.startColumn+1!==n.column||!isNaN(Number(i.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}}function gpt(u,e,t){if(!e.getContextKeyValue(pr.inlineSuggestionVisible.key))return!0;const n=e.getContextKeyValue(pr.suppressSuggestions.key);return n!==void 0?!n:!u.getOption(62).suppressSuggestions}function fpt(u,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const n=e.getContextKeyValue(pr.suppressSuggestions.key);return n!==void 0?!n:!u.getOption(62).suppressSuggestions}let zq=Lq=class{constructor(e,t,n,i,r,a,o,s,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=i,this._logService=r,this._contextKeyService=a,this._configurationService=o,this._languageFeaturesService=s,this._envService=l,this._toDispose=new pe,this._triggerCharacterListener=new pe,this._triggerQuickSuggest=new Vl,this._triggerState=void 0,this._completionDisposables=new pe,this._onDidCancel=new Q,this._onDidTrigger=new Q,this._onDidSuggest=new Q,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Ye(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Su(this._triggerCharacterListener),Su([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of n.triggerCharacters||[]){let r=e.get(i);r||(r=new Set,r.add(W3t()),e.set(i,r)),r.add(n)}const t=n=>{var i;if(!fpt(this._editor,this._contextKeyService,this._configurationService)||qg.shouldAutoTrigger(this._editor))return;if(!n){const o=this._editor.getPosition();n=this._editor.getModel().getLineContent(o.lineNumber).substr(0,o.column-1)}let r="";_3(n.charCodeAt(n.length-1))?ur(n.charCodeAt(n.length-2))&&(r=n.substr(n.length-2)):r=n.charAt(n.length-1);const a=e.get(r);if(a){const o=new Map;if(this._completionModel)for(const[s,l]of this._completionModel.getItemsByProvider())a.has(s)||o.set(s,l);this.trigger({auto:!0,triggerKind:1,triggerCharacter:r,retrigger:!!this._completionModel,clipboardText:(i=this._completionModel)===null||i===void 0?void 0:i.clipboardText,completionOptions:{providerFilter:a,providerItemsToReuse:o}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;w5.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((e=Or.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!qg.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),n=this._editor.getPosition(),i=this._editor.getOption(88);if(!w5.isAllOff(i)){if(!w5.isAllOn(i)){t.tokenization.tokenizeIfCheap(n.lineNumber);const r=t.tokenization.getLineTokens(n.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(w5.valueFor(i,a)!=="on")return}gpt(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){Ru(this._editor.hasModel()),Ru(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),n=new qg(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,i,r,a,o;if(!this._editor.hasModel())return;const s=this._editor.getModel(),l=new qg(s,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=l;let c={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new vi;const d=this._editor.getOption(111);let h=1;switch(d){case"top":h=0;break;case"bottom":h=2;break}const{itemKind:E,showDeprecated:m}=Lq._createSuggestFilter(this._editor),g=new fF(h,(r=(i=e.completionOptions)===null||i===void 0?void 0:i.kindFilter)!==null&&r!==void 0?r:E,(a=e.completionOptions)===null||a===void 0?void 0:a.providerFilter,(o=e.completionOptions)===null||o===void 0?void 0:o.providerItemsToReuse,m),f=bc.create(this._editorWorkerService,this._editor),p=Ate(this._languageFeaturesService.completionProvider,s,this._editor.getPosition(),g,c,this._requestToken.token);Promise.all([p,f]).then(([D,x])=>mpt(this,void 0,void 0,function*(){var b;if((b=this._requestToken)===null||b===void 0||b.dispose(),!this._editor.hasModel())return;let k=e==null?void 0:e.clipboardText;if(!k&&D.needsClipboard&&(k=yield this._clipboardService.readText()),this._triggerState===void 0)return;const A=this._editor.getModel(),F=new qg(A,this._editor.getPosition(),e),S=Object.assign(Object.assign({},SP.default),{firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly});if(this._completionModel=new kE(D.items,this._context.column,{leadingLineContent:F.leadingLineContent,characterCountDelta:F.column-this._context.column},x,this._editor.getOption(117),this._editor.getOption(111),S,k),this._completionDisposables.add(D.disposable),this._onNewContext(F),this._reportDurationsTelemetry(D.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const w of D.items)w.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${w.provider._debugDisplayName}`,w.completion)})).catch(zt)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){const t=new Set;e.getOption(111)==="none"&&t.add(27);const i=e.getOption(117);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Wu(e.leadingLineContent)!==Wu(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(qg.shouldAutoTrigger(this._editor)&&this._context){const n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,n=new Set;for(const[i,r]of this._completionModel.getItemsByProvider())r.length>0&&r[0].container.incomplete?n.add(i):t.set(i,r);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const i=qg.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(i&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};zq=Lq=Ept([$4(1,ql),$4(2,_4),$4(3,n0),$4(4,i0),$4(5,pt),$4(6,tu),$4(7,We),$4(8,JX)],zq);class AR{constructor(e,t){this._disposables=new pe,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const n=e.getSelections(),i=n.length;let r=!1;for(let o=0;oAR._maxSelectionLength)return;this._lastOvertyped[o]={value:a.getValueInRange(s),multiline:s.startLineNumber!==s.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},OH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Bte extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,Bte.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"⏎")}}let Mq=class{constructor(e,t,n,i,r){this._menuId=t,this._menuService=i,this._contextKeyService=r,this._menuDisposables=new pe,this.element=me(e,ve(".suggest-status-bar"));const a=o=>o instanceof zl?n.createInstance(Bte,o,void 0):void 0;this._leftActions=new O0(this.element,{actionViewItemProvider:a}),this._rightActions=new O0(this.element,{actionViewItemProvider:a}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const n=[],i=[];for(const[r,a]of e.getActions())r==="left"?n.push(...a):i.push(...a);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Mq=ppt([OH(2,mt),OH(3,$1),OH(4,pt)],Mq);var Dpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};function wte(u){return!!u&&!!(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}let Tq=class{constructor(e,t){this._editor=e,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Q,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new pe,this._renderDisposeable=new pe,this._borderWidth=1,this._size=new pu(330,0),this.domNode=ve(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(h4,{editor:e}),this._body=ve(".body"),this._scrollbar=new EA(this._body,{alwaysConsumeMouseWheel:!0}),me(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=me(this._body,ve(".header")),this._close=me(this._header,ve("span"+st.asCSSSelector(we.close))),this._close.title=v("details.close","Close"),this._type=me(this._header,ve("p.type")),this._docs=me(this._body,ve("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),n=t.getMassagedFontFamily(),i=e.get(118)||t.fontSize,r=e.get(119)||t.lineHeight,a=t.fontWeight,o=`${i}px`,s=`${r}px`;this.domNode.style.fontSize=o,this.domNode.style.lineHeight=`${r/i}`,this.domNode.style.fontWeight=a,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=s,this._close.style.width=s}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=v("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,i;this._renderDisposeable.clear();let{detail:r,documentation:a}=e.completion;if(t){let o="";o+=`score: ${e.score[0]} +`)}withRange(e){return new Xw(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function M3t(u,e){const t=e.getWordAtPosition(u),n=e.getLineMaxColumn(u.lineNumber);return t?new j(u.lineNumber,t.startColumn,u.lineNumber,n):j.fromPositions(u,u.with(void 0,n))}function cce(u,e,t,n){const r=t.getLineContent(e.lineNumber).substring(0,e.column-1)+u,a=t.tokenization.tokenizeLineWithEdit(e,r.length-(e.column-1),u),o=a==null?void 0:a.sliceAndInflate(e.column-1,r.length,0);return o?S3t(o,n):u}class Bv{constructor(e,t){this.range=e,this.text=t}removeCommonPrefix(e,t){const n=t?this.range.intersectRanges(t):this.range;if(!n)return this;const i=e.getValueInRange(n,1),r=A3(i,this.text),a=kq(this.range.getStartPosition(),Fq(i.substring(0,r))),o=this.text.substring(r),s=j.fromPositions(a,this.range.getEndPosition());return new Bv(s,o)}augments(e){return this.text.startsWith(e.text)&&T3t(this.range,e.range)}computeGhostText(e,t,n,i=0){let r=this.removeCommonPrefix(e);if(r.range.endLineNumber!==r.range.startLineNumber)return;const a=e.getLineContent(r.range.startLineNumber),o=Wu(a).length;if(r.range.startColumn-1<=o){const m=Wu(r.text).length,g=a.substring(r.range.startColumn-1,o),[f,p]=[r.range.getStartPosition(),r.range.getEndPosition()],D=f.column+g.length<=p.column?f.delta(0,g.length):p,x=j.fromPositions(D,p),b=r.text.startsWith(g)?r.text.substring(g.length):r.text.substring(m);r=new Bv(x,b)}const l=e.getValueInRange(r.range),c=N3t(l,r.text);if(!c)return;const d=r.range.startLineNumber,h=new Array;if(t==="prefix"){const m=c.filter(g=>g.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==l.length)return}const E=r.text.length-i;for(const m of c){const g=r.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===r.range.startLineNumber&&g0)return;if(m.modifiedLength===0)continue;const f=m.modifiedStart+m.modifiedLength,p=Math.max(m.modifiedStart,Math.min(f,E)),D=r.text.substring(m.modifiedStart,p),x=r.text.substring(p,Math.max(m.modifiedStart,f));if(D.length>0){const b=F1(D);h.push(new yq(g,b,!1))}if(x.length>0){const b=F1(x);h.push(new yq(g,b,!0))}}return new Qw(d,h)}}function T3t(u,e){return e.getStartPosition().equals(u.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(u.getEndPosition())}let Fd;function N3t(u,e){if((Fd==null?void 0:Fd.originalValue)===u&&(Fd==null?void 0:Fd.newValue)===e)return Fd==null?void 0:Fd.changes;{let t=hce(u,e,!0);if(t){const n=dce(t);if(n>0){const i=hce(u,e,!1);i&&dce(i)5e3||e.length>5e3)return;function n(l){let c=0;for(let d=0,h=l.length;dc&&(c=E)}return c}const i=Math.max(n(u),n(e));function r(l){if(l<0)throw new Error("unexpected");return i+l+1}function a(l){let c=0,d=0;const h=new Int32Array(l.length);for(let E=0,m=l.length;Eo},{getElements:()=>s}).ComputeDiff(!1).changes}var P3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ece=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},R3t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let Sq=class extends ne{constructor(e,t,n,i,r){super(),this.textModel=e,this.versionId=t,this._debounceValue=n,this.languageFeaturesService=i,this.languageConfigurationService=r,this._updateOperation=this._register(new Ir),this.inlineCompletions=_w("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=_w("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(e,t,n){var i,r;const a=new O3t(e,t,this.textModel.getVersionId()),o=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((i=this._updateOperation.value)===null||i===void 0)&&i.request.satisfies(a))return this._updateOperation.value.promise;if(!((r=o.get())===null||r===void 0)&&r.request.satisfies(a))return Promise.resolve(!0);const s=!!this._updateOperation.value;this._updateOperation.clear();const l=new vi,c=(()=>R3t(this,void 0,void 0,function*(){if((s||t.triggerKind===qh.Automatic)&&(yield I3t(this._debounceValue.get(this.textModel))),l.token.isCancellationRequested||this.textModel.getVersionId()!==a.versionId)return!1;const E=new Date,m=yield w3t(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,l.token,this.languageConfigurationService);if(l.token.isCancellationRequested||this.textModel.getVersionId()!==a.versionId)return!1;const g=new Date;this._debounceValue.update(this.textModel,g.getTime()-E.getTime());const f=new V3t(m,a,this.textModel,this.versionId);if(n){const p=n.toInlineCompletion(void 0);n.canBeReused(this.textModel,e)&&!m.has(p)&&f.prepend(n.inlineCompletion,p.range,!0)}return this._updateOperation.clear(),Fn(p=>{o.set(f,p)}),!0}))(),d=new H3t(a,l,c);return this._updateOperation.value=d,c}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;!((t=this._updateOperation.value)===null||t===void 0)&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};Sq=P3t([Ece(3,We),Ece(4,tn)],Sq);function I3t(u,e){return new Promise(t=>{let n;const i=setTimeout(()=>{n&&n.dispose(),t()},u);e&&(n=e.onCancellationRequested(()=>{clearTimeout(i),n&&n.dispose(),t()}))})}class O3t{constructor(e,t,n){this.position=e,this.context=t,this.versionId=n}satisfies(e){return this.position.equals(e.position)&&j3t(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(t,n)=>t.equals(n))&&(e.context.triggerKind===qh.Automatic||this.context.triggerKind===qh.Explicit)&&this.versionId===e.versionId}}function j3t(u,e,t){return!u||!e?u===e:t(u,e)}class H3t{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}}class V3t{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,n,i){this.inlineCompletionProviderResult=e,this.request=t,this.textModel=n,this.versionId=i,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=uu(this,a=>{this.versionId.read(a);let o=!1;for(const s of this._inlineCompletions)o=o||s._updateRange(this.textModel);return o&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const r=n.deltaDecorations([],e.completions.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=e.completions.map((a,o)=>new mce(a,r[o],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(e=>e.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,n){n&&e.source.addRef();const i=this.textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new mce(e,i,this._rangeVersionId,t)),this._prependedInlineCompletionItems.push(e)}}class mce{get forwardStable(){var e;return(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&e!==void 0?e:!1}constructor(e,t,n,i){this.inlineCompletion=e,this.decorationId=t,this.rangeVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=i??e.range}toInlineCompletion(e){return this.inlineCompletion.withRange(this._getUpdatedRange(e))}toSingleTextEdit(e){return new Bv(this._getUpdatedRange(e),this.inlineCompletion.insertText)}isVisible(e,t,n){const i=this._toFilterTextReplacement(n).removeCommonPrefix(e);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(n).getStartPosition())||t.lineNumber!==i.range.startLineNumber)return!1;const r=e.getValueInRange(i.range,1).toLowerCase(),a=i.text.toLowerCase(),o=Math.max(0,t.column-i.range.startColumn);let s=a.substring(0,o),l=a.substring(o),c=r.substring(0,o),d=r.substring(o);const h=e.getLineIndentColumn(i.range.startLineNumber);return i.range.startColumn<=h&&(c=c.trimStart(),c.length===0&&(d=d.trimStart()),s=s.trimStart(),s.length===0&&(l=l.trimStart())),s.startsWith(c)&&!!ybe(d,l)}canBeReused(e,t){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(t)&&this.isVisible(e,t,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(e){return new Bv(this._getUpdatedRange(e),this.inlineCompletion.filterText)}_isSmallerThanOriginal(e){return gce(this._getUpdatedRange(e)).isBefore(gce(this.inlineCompletion.range))}_getUpdatedRange(e){return this.rangeVersion.read(e),this._updatedRange}_updateRange(e){const t=e.getDecorationRange(this.decorationId);return t?this._updatedRange.equalsRange(t)?!1:(this._updatedRange=t,!0):(this._isValid=!1,!0)}}function gce(u){return u.startLineNumber===u.endLineNumber?new ee(1,1+u.endColumn-u.startColumn):new ee(1+u.endLineNumber-u.startLineNumber,u.endColumn)}var v2=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Pt={Visible:pte,HasFocusedSuggestion:new Pe("suggestWidgetHasFocusedSuggestion",!1,v("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Pe("suggestWidgetDetailsVisible",!1,v("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Pe("suggestWidgetMultipleSuggestions",!1,v("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Pe("suggestionMakesTextEdit",!0,v("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Pe("acceptSuggestionOnEnter",!0,v("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Pe("suggestionHasInsertAndReplaceRange",!1,v("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Pe("suggestionInsertMode",void 0,{type:"string",description:v("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Pe("suggestionCanResolve",!1,v("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},dm=new K("suggestWidgetStatusBar");let $3t=class{constructor(e,t,n,i){var r;this.position=e,this.completion=t,this.container=n,this.provider=i,this.isInvalid=!1,this.score=Kc.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(r=t.label)===null||r===void 0?void 0:r.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,j.isIRange(t.range)?(this.editStart=new ee(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new ee(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new ee(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||j.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new ee(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new ee(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new ee(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||j.spansMultipleLines(t.range.insert)||j.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof i.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(e){return v2(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new va(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._resolveDuration=n.elapsed()},i=>{dd(i)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache})}};class fF{constructor(e=2,t=new Set,n=new Set,i=new Map,r=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=i,this.showDeprecated=r}}fF.default=new fF;let K3t;function W3t(){return K3t}class G3t{constructor(e,t,n,i){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=i}}function Ate(u,e,t,n=fF.default,i={triggerKind:0},r=Kt.None){return v2(this,void 0,void 0,function*(){const a=new va;t=t.clone();const o=e.getWordAtPosition(t),s=o?new j(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):j.fromPositions(t),l={replace:s,insert:s.setEndPosition(t.lineNumber,t.column)},c=[],d=new pe,h=[];let E=!1;const m=(f,p,D)=>{var x,b,k;let A=!1;if(!p)return A;for(const F of p.suggestions)if(!n.kindFilter.has(F.kind)){if(!n.showDeprecated&&(!((x=F==null?void 0:F.tags)===null||x===void 0)&&x.includes(1)))continue;F.range||(F.range=l),F.sortText||(F.sortText=typeof F.label=="string"?F.label:F.label.label),!E&&F.insertTextRules&&F.insertTextRules&4&&(E=Sv.guessNeedsClipboard(F.insertText)),c.push(new $3t(t,F,p,f)),A=!0}return TQ(p)&&d.add(p),h.push({providerName:(b=f._debugDisplayName)!==null&&b!==void 0?b:"unknown_provider",elapsedProvider:(k=p.duration)!==null&&k!==void 0?k:-1,elapsedOverall:D.elapsed()}),A},g=(()=>v2(this,void 0,void 0,function*(){}))();for(const f of u.orderedGroups(e)){let p=!1;if(yield Promise.all(f.map(D=>v2(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(D)){const x=n.providerItemsToReuse.get(D);x.forEach(b=>c.push(b)),p=p||x.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(D)))try{const x=new va,b=yield D.provideCompletionItems(e,t,i,r);p=m(D,b,x)||p}catch(x){Mi(x)}}))),p||r.isCancellationRequested)break}return yield g,r.isCancellationRequested?(d.dispose(),Promise.reject(new hg)):new G3t(c.sort(J3t(n.snippetSortOrder)),E,{entries:h,elapsed:a.elapsed()},d)})}function _te(u,e){if(u.sortTextLow&&e.sortTextLow){if(u.sortTextLowe.sortTextLow)return 1}return u.textLabele.textLabel?1:u.completion.kind-e.completion.kind}function U3t(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return _te(u,e)}function q3t(u,e){if(u.completion.kind!==e.completion.kind){if(u.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return _te(u,e)}const kR=new Map;kR.set(0,U3t);kR.set(2,q3t);kR.set(1,_te);function J3t(u){return kR.get(u)}ru.registerCommand("_executeCompletionItemProvider",(u,...e)=>v2(void 0,void 0,void 0,function*(){const[t,n,i,r]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string"||!i),Ru(typeof r=="number"||!r);const{completionProvider:a}=u.get(We),o=yield u.get(Vo).createModelReference(t);try{const s={incomplete:!1,suggestions:[]},l=[],c=o.object.textEditorModel.validatePosition(n),d=yield Ate(a,o.object.textEditorModel,c,void 0,{triggerCharacter:i??void 0,triggerKind:i?1:0});for(const h of d.items)l.length<(r??0)&&l.push(h.resolve(Kt.None)),s.incomplete=s.incomplete||h.container.incomplete,s.suggestions.push(h.completion);try{return yield Promise.all(l),s}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{o.dispose()}}));function Z3t(u,e){var t;(t=u.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class w5{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}function fce(u,e=na){return Jnt(u,e)?u.charAt(0).toUpperCase()+u.slice(1):u}var Y3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Q3t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class pce{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const n=t.resolve(e);if(n!==void 0)return n}}}class Dce{constructor(e,t,n,i){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=i}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const r=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);r&&(n=r.value,i=r.multiline)}if(n&&i&&e.snippet){const r=this._model.getLineContent(this._selection.startLineNumber),a=Wu(r,0,this._selection.startColumn-1);let o=a;e.snippet.walk(l=>l===e?!1:(l instanceof us&&(o=Wu(F1(l.value).pop())),!0));const s=A3(o,a);n=n.replace(/(\r\n|\r|\n)(.*)/g,(l,c,d)=>`${c}${o.substr(s)}${d}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class xce{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return QE(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const n=QE(this._model.uri.fsPath),i=n.lastIndexOf(".");return i<=0?n:n.slice(0,i)}else{if(t==="TM_DIRECTORY")return Ave(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(xP(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class vce{constructor(e,t,n,i){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=i}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const n=t.split(/\r\n|\n|\r/).filter(i=>!Mve(i));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}}let eL=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){const{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),i=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(i){if(t==="LINE_COMMENT")return i.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return i.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return i.blockCommentEndToken||void 0}}};eL=Y3t([Q3t(2,tn)],eL);class Mc{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return Mc.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return Mc.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return Mc.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return Mc.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),i=n>0?"-":"+",r=Math.trunc(Math.abs(n/60)),a=r<10?"0"+r:r,o=Math.abs(n)-r*60,s=o<10?"0"+o:o;return i+a+":"+s}}}Mc.dayNames=[v("Sunday","Sunday"),v("Monday","Monday"),v("Tuesday","Tuesday"),v("Wednesday","Wednesday"),v("Thursday","Thursday"),v("Friday","Friday"),v("Saturday","Saturday")];Mc.dayNamesShort=[v("SundayShort","Sun"),v("MondayShort","Mon"),v("TuesdayShort","Tue"),v("WednesdayShort","Wed"),v("ThursdayShort","Thu"),v("FridayShort","Fri"),v("SaturdayShort","Sat")];Mc.monthNames=[v("January","January"),v("February","February"),v("March","March"),v("April","April"),v("May","May"),v("June","June"),v("July","July"),v("August","August"),v("September","September"),v("October","October"),v("November","November"),v("December","December")];Mc.monthNamesShort=[v("JanuaryShort","Jan"),v("FebruaryShort","Feb"),v("MarchShort","Mar"),v("AprilShort","Apr"),v("MayShort","May"),v("JuneShort","Jun"),v("JulyShort","Jul"),v("AugustShort","Aug"),v("SeptemberShort","Sep"),v("OctoberShort","Oct"),v("NovemberShort","Nov"),v("DecemberShort","Dec")];class Cce{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=cot(this._workspaceService.getWorkspace());if(!oot(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(dG(e))return QE(e.uri.path);let t=QE(e.configPath.path);return t.endsWith(hG)&&(t=t.substr(0,t.length-hG.length-1)),t}_resoveWorkspacePath(e){if(dG(e))return fce(e.uri.fsPath);const t=QE(e.configPath.path);let n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?fce(n):"/"}}class bce{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return mR()}}var X3t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ept=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},oc;class d0{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=$re(t.placeholders,g0.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const n of this._snippet.placeholders){const i=this._snippet.offset(n),r=this._snippet.fullLen(n),a=j.fromPositions(e.getPositionAt(this._offset+i),e.getPositionAt(this._offset+i+r)),o=n.isFinalTabstop?d0._decor.inactiveFinal:d0._decor.inactive,s=t.addDecoration(a,o);this._placeholderDecorations.set(n,s)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const i=[];for(const r of this._placeholderGroups[this._placeholderGroupsIdx])if(r.transform){const a=this._placeholderDecorations.get(r),o=this._editor.getModel().getDecorationRange(a),s=this._editor.getModel().getValueInRange(o),l=r.transform.resolve(s).split(/\r\n|\r|\n/);for(let c=1;c0&&this._editor.executeEdits("snippet.placeholderTransform",i)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const n=this._editor.getModel().changeDecorations(i=>{const r=new Set,a=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),l=this._editor.getModel().getDecorationRange(s);a.push(new Ye(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),i.changeDecorationOptions(s,o.isFinalTabstop?d0._decor.activeFinal:d0._decor.active),r.add(o);for(const c of this._snippet.enclosingPlaceholders(o)){const d=this._placeholderDecorations.get(c);i.changeDecorationOptions(d,c.isFinalTabstop?d0._decor.activeFinal:d0._decor.active),r.add(c)}}for(const[o,s]of this._placeholderDecorations)r.has(o)||i.changeDecorationOptions(s,o.isFinalTabstop?d0._decor.inactiveFinal:d0._decor.inactive);return a});return t?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof g0){const n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let n;for(const i of t){if(i.isFinalTabstop)break;n||(n=[],e.set(i.index,n));const r=this._placeholderDecorations.get(i),a=this._editor.getModel().getDecorationRange(r);if(!a){e.delete(i.index);break}n.push(a)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof y6,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const i of this._placeholderGroups[this._placeholderGroupsIdx]){const r=e.shift();console.assert(r._offset!==-1),console.assert(!r._placeholderDecorations);const a=r._snippet.placeholderInfo.last.index;for(const s of r._snippet.placeholderInfo.all)s.isFinalTabstop?s.index=i.index+(a+1)/this._nestingLevel:s.index=i.index+s.index/this._nestingLevel;this._snippet.replace(i,r._snippet.children);const o=this._placeholderDecorations.get(i);n.removeDecoration(o),this._placeholderDecorations.delete(i);for(const s of r._snippet.placeholders){const l=r._snippet.offset(s),c=r._snippet.fullLen(s),d=j.fromPositions(t.getPositionAt(r._offset+l),t.getPositionAt(r._offset+l+c)),h=n.addDecoration(d,d0._decor.inactive);this._placeholderDecorations.set(s,h)}}this._placeholderGroups=$re(this._snippet.placeholders,g0.compareByIndex)})}}d0._decor={active:Lt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Lt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Lt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Lt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const kce={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let tL=oc=class{static adjustWhitespace(e,t,n,i,r){const a=e.getLineContent(t.lineNumber),o=Wu(a,0,t.column-1);let s;return i.walk(l=>{if(!(l instanceof us)||l.parent instanceof y6||r&&!r.has(l))return!0;const c=l.value.split(/\r\n|\r|\n/);if(n){const h=i.offset(l);if(h===0)c[0]=e.normalizeIndentation(c[0]);else{s=s??i.toString();const E=s.charCodeAt(h-1);(E===10||E===13)&&(c[0]=e.normalizeIndentation(o+c[0]))}for(let E=1;Eb.get(M3)),m=e.invokeWithinContext(b=>new xce(b.get(cv),h)),g=()=>o,f=h.getValueInRange(oc.adjustSelection(h,e.getSelection(),n,0)),p=h.getValueInRange(oc.adjustSelection(h,e.getSelection(),0,i)),D=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),x=e.getSelections().map((b,k)=>({selection:b,idx:k})).sort((b,k)=>j.compareRangesUsingStarts(b.selection,k.selection));for(const{selection:b,idx:k}of x){let A=oc.adjustSelection(h,b,n,0),F=oc.adjustSelection(h,b,0,i);f!==h.getValueInRange(A)&&(A=b),p!==h.getValueInRange(F)&&(F=b);const S=b.setStartPosition(A.startLineNumber,A.startColumn).setEndPosition(F.endLineNumber,F.endColumn),w=new Sv().parse(t,!0,r),z=S.getStartPosition(),N=oc.adjustWhitespace(h,z,a||k>0&&D!==h.getLineFirstNonWhitespaceColumn(b.positionLineNumber),w);w.resolveVariables(new pce([m,new vce(g,k,x.length,e.getOption(78)==="spread"),new Dce(h,b,k,s),new eL(h,b,l),new Mc,new Cce(E),new bce])),c[k]=yn.replace(S,w.toString()),c[k].identifier={major:k,minor:0},c[k]._isTracked=!0,d[k]=new d0(e,w,N)}return{edits:c,snippets:d}}static createEditsAndSnippetsFromEdits(e,t,n,i,r,a,o){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const s=[],l=e.getModel(),c=new Sv,d=new OA,h=new pce([e.invokeWithinContext(m=>new xce(m.get(cv),l)),new vce(()=>r,0,e.getSelections().length,e.getOption(78)==="spread"),new Dce(l,e.getSelection(),0,a),new eL(l,e.getSelection(),o),new Mc,new Cce(e.invokeWithinContext(m=>m.get(M3))),new bce]);t=t.sort((m,g)=>j.compareRangesUsingStarts(m.range,g.range));let E=0;for(let m=0;m0){const k=t[m-1].range,A=j.fromPositions(k.getEndPosition(),g.getStartPosition()),F=new us(l.getValueInRange(A));d.appendChild(F),E+=F.value.length}const p=c.parseFragment(f,d);oc.adjustWhitespace(l,g.getStartPosition(),!0,d,new Set(p)),d.resolveVariables(h);const D=d.toString(),x=D.slice(E);E=D.length;const b=yn.replace(g,x);b.identifier={major:m,minor:0},b._isTracked=!0,s.push(b)}return c.ensureFinalTabstop(d,n,!0),{edits:s,snippets:[new d0(e,d,"")]}}constructor(e,t,n=kce,i){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=i,this._templateMerges=[],this._snippets=[]}dispose(){Su(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=typeof this._template=="string"?oc.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):oc.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,n=>{const i=n.filter(r=>!!r.identifier);for(let r=0;rYe.fromPositions(r.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=kce){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:i}=oc.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,r=>{const a=r.filter(s=>!!s.identifier);for(let s=0;sYe.fromPositions(s.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const n of this._snippets){const i=n.move(e);t.push(...i)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{r.push(...i.get(a))})}e.sort(j.compareRangesUsingStarts);for(const[n,i]of t){if(i.length!==e.length){t.delete(n);continue}i.sort(j.compareRangesUsingStarts);for(let r=0;r0}};tL=oc=X3t([ept(3,tn)],tL);var tpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Y9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ZD;const Fce={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Or=ZD=class{static get(e){return e.getContribution(ZD.ID)}constructor(e,t,n,i,r){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=r,this._snippetListener=new pe,this._modelVersionId=-1,this._inSnippet=ZD.InSnippetMode.bindTo(i),this._hasNextTabstop=ZD.HasNextTabstop.bindTo(i),this._hasPrevTabstop=ZD.HasPrevTabstop.bindTo(i)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?Fce:Object.assign(Object.assign({},Fce),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Ru(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new tL(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),!((n=this._session)===null||n===void 0)&&n.hasChoice){const i={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(c,d)=>{if(!this._session||c!==this._editor.getModel()||!ee.equals(this._editor.getPosition(),d))return;const{activeChoice:h}=this._session;if(!h||h.choice.options.length===0)return;const E=c.getValueInRange(h.range),m=!!h.choice.options.find(f=>f.value===E),g=[];for(let f=0;f{a==null||a.dispose(),o=!1},l=()=>{o||(a=this._languageFeaturesService.completionProvider.register({language:r.getLanguageId(),pattern:r.uri.fsPath,scheme:r.uri.scheme,exclusive:!0},i),this._snippetListener.add(a),o=!0)};this._choiceCompletions={provider:i,enable:l,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions){(e=this._choiceCompletions)===null||e===void 0||e.disable(),this._currentChoice=void 0;return}this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{Z3t(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)===null||e===void 0||e.prev(),this._updateState()}next(){var e;(e=this._session)===null||e===void 0||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};Or.ID="snippetController2";Or.InSnippetMode=new Pe("inSnippetMode",!1,v("inSnippetMode","Whether the editor in current in snippet mode"));Or.HasNextTabstop=new Pe("hasNextTabstop",!1,v("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));Or.HasPrevTabstop=new Pe("hasPrevTabstop",!1,v("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));Or=ZD=tpt([Y9(1,r0),Y9(2,We),Y9(3,pt),Y9(4,tn)],Or);fu(Or.ID,Or,4);const FR=xr.bindToContribution(Or.get);ze(new FR({id:"jumpToNextSnippetPlaceholder",precondition:Ee.and(Or.InSnippetMode,Or.HasNextTabstop),handler:u=>u.next(),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:2}}));ze(new FR({id:"jumpToPrevSnippetPlaceholder",precondition:Ee.and(Or.InSnippetMode,Or.HasPrevTabstop),handler:u=>u.prev(),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:1026}}));ze(new FR({id:"leaveSnippet",precondition:Or.InSnippetMode,handler:u=>u.cancel(!0),kbOpts:{weight:100+30,kbExpr:W.editorTextFocus,primary:9,secondary:[1033]}}));ze(new FR({id:"acceptSnippet",precondition:Or.InSnippetMode,handler:u=>u.finish()}));var upt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},IH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ch=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Bs;(function(u){u[u.Undo=0]="Undo",u[u.Redo=1]="Redo",u[u.AcceptWord=2]="AcceptWord",u[u.Other=3]="Other"})(Bs||(Bs={}));let Bq=class extends ne{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,i,r,a,o,s,l,c,d,h){super(),this.textModel=e,this.selectedSuggestItem=t,this.cursorPosition=n,this.textModelVersionId=i,this._debounceValue=r,this._suggestPreviewEnabled=a,this._suggestPreviewMode=o,this._inlineSuggestMode=s,this._enabled=l,this._instantiationService=c,this._commandService=d,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(Sq,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=on(this,!1),this._forceUpdate=N2e("forceUpdate"),this._selectedInlineCompletionId=on(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Bs.Redo,Bs.Undo,Bs.AcceptWord]),this._fetchInlineCompletions=Jct({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:qh.Automatic}),handleChange:(m,g)=>(m.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(m.change)?g.preserveCurrentCompletion=!0:m.didChange(this._forceUpdate)&&(g.inlineCompletionTriggerKind=m.change),!0)},(m,g)=>{if(this._forceUpdate.read(m),!(this._enabled.read(m)&&this.selectedSuggestItem.read(m)||this._isActive.read(m))){this._source.cancelUpdate();return}this.textModelVersionId.read(m);const p=this.selectedInlineCompletion.get(),D=g.preserveCurrentCompletion||p!=null&&p.forwardStable?p:void 0,x=this._source.suggestWidgetInlineCompletions.get(),b=this.selectedSuggestItem.read(m);if(x&&!b){const F=this._source.inlineCompletions.get();Fn(S=>{F&&x.request.versionId>F.request.versionId&&this._source.inlineCompletions.set(x.clone(),S),this._source.clearSuggestWidgetInlineCompletions(S)})}const k=this.cursorPosition.read(m),A={triggerKind:g.inlineCompletionTriggerKind,selectedSuggestionInfo:b==null?void 0:b.toSelectedSuggestionInfo()};return this._source.fetch(k,A,D)}),this._filteredInlineCompletionItems=uu(this,m=>{const g=this._source.inlineCompletions.read(m);if(!g)return[];const f=this.cursorPosition.read(m);return g.inlineCompletions.filter(D=>D.isVisible(this.textModel,f,m))}),this.selectedInlineCompletionIndex=uu(this,m=>{const g=this._selectedInlineCompletionId.read(m),f=this._filteredInlineCompletionItems.read(m),p=this._selectedInlineCompletionId===void 0?-1:f.findIndex(D=>D.semanticId===g);return p===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):p}),this.selectedInlineCompletion=uu(this,m=>{const g=this._filteredInlineCompletionItems.read(m),f=this.selectedInlineCompletionIndex.read(m);return g[f]}),this.lastTriggerKind=this._source.inlineCompletions.map(m=>m==null?void 0:m.request.context.triggerKind),this.inlineCompletionsCount=uu(this,m=>{if(this.lastTriggerKind.read(m)===qh.Explicit)return this._filteredInlineCompletionItems.read(m).length}),this.state=N0e({owner:this,equalityComparer:(m,g)=>!m||!g?m===g:ace(m.ghostText,g.ghostText)&&m.inlineCompletion===g.inlineCompletion&&m.suggestItem===g.suggestItem},m=>{var g;const f=this.textModel,p=this.selectedSuggestItem.read(m);if(p){const D=p.toSingleTextEdit().removeCommonPrefix(f),x=this._computeAugmentedCompletion(D,m);if(!this._suggestPreviewEnabled.read(m)&&!x)return;const k=(g=x==null?void 0:x.edit)!==null&&g!==void 0?g:D,A=x?x.edit.text.length-D.text.length:0,F=this._suggestPreviewMode.read(m),S=this.cursorPosition.read(m),w=k.computeGhostText(f,F,S,A);return{ghostText:w??new Qw(k.range.endLineNumber,[]),inlineCompletion:x==null?void 0:x.completion,suggestItem:p}}else{if(!this._isActive.read(m))return;const D=this.selectedInlineCompletion.read(m);if(!D)return;const x=D.toSingleTextEdit(m),b=this._inlineSuggestMode.read(m),k=this.cursorPosition.read(m),A=x.computeGhostText(f,b,k);return A?{ghostText:A,inlineCompletion:D,suggestItem:void 0}:void 0}}),this.ghostText=N0e({owner:this,equalityComparer:ace},m=>{const g=this.state.read(m);if(g)return g.ghostText}),this._register(iF(this._fetchInlineCompletions));let E;this._register(Xu(m=>{var g,f;const p=this.state.read(m),D=p==null?void 0:p.inlineCompletion;if((D==null?void 0:D.semanticId)!==(E==null?void 0:E.semanticId)&&(E=D,D)){const x=D.inlineCompletion,b=x.source;(f=(g=b.provider).handleItemDidShow)===null||f===void 0||f.call(g,b.inlineCompletions,x.sourceInlineCompletion,x.insertText)}}))}trigger(e){return ch(this,void 0,void 0,function*(){this._isActive.set(!0,e),yield this._fetchInlineCompletions.get()})}triggerExplicitly(e){return ch(this,void 0,void 0,function*(){gU(e,t=>{this._isActive.set(!0,t),this._forceUpdate.trigger(t,qh.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(e){gU(e,t=>{this._isActive.set(!1,t),this._source.clear(t)})}_computeAugmentedCompletion(e,t){const n=this.textModel,i=this._source.suggestWidgetInlineCompletions.read(t),r=i?i.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(tk);return IYe(r,o=>{let s=o.toSingleTextEdit(t);return s=s.removeCommonPrefix(n,j.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),s.augments(e)?{edit:s,completion:o}:void 0})}_deltaSelectedInlineCompletionIndex(e){return ch(this,void 0,void 0,function*(){yield this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return ch(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return ch(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(e){var t;return ch(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Si;const n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;const i=n.inlineCompletion.toInlineCompletion(void 0);e.pushUndoStop(),i.snippetInfo?(e.executeEdits("inlineSuggestion.accept",[yn.replaceMove(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition()),(t=Or.get(e))===null||t===void 0||t.insert(i.snippetInfo.snippet,{undoStopBefore:!1})):e.executeEdits("inlineSuggestion.accept",[yn.replaceMove(i.range,i.insertText),...i.additionalTextEdits]),i.command&&i.source.addRef(),Fn(r=>{this._source.clear(r),this._isActive.set(!1,r)}),i.command&&(yield this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,Mi),i.source.removeRef())})}acceptNextWord(e){return ch(this,void 0,void 0,function*(){yield this._acceptNext(e,(t,n)=>{const i=this.textModel.getLanguageIdAtPosition(t.lineNumber,t.column),r=this._languageConfigurationService.getLanguageConfiguration(i),a=new RegExp(r.wordDefinition.source,r.wordDefinition.flags.replace("g","")),o=n.match(a);let s=0;o&&o.index!==void 0?o.index===0?s=o[0].length:s=o.index:s=n.length;const c=/\s+/g.exec(n);return c&&c.index!==void 0&&c.index+c[0].length{const i=n.match(/\n/);return i&&i.index!==void 0?i.index+1:n.length})})}_acceptNext(e,t){return ch(this,void 0,void 0,function*(){if(e.getModel()!==this.textModel)throw new Si;const n=this.state.get();if(!n||n.ghostText.isEmpty()||!n.inlineCompletion)return;const i=n.ghostText,r=n.inlineCompletion.toInlineCompletion(void 0);if(r.snippetInfo||r.filterText!==r.insertText){yield this.accept(e);return}const a=i.parts[0],o=new ee(i.lineNumber,a.column),s=a.lines.join(` +`),l=t(o,s);if(l===s.length&&i.parts.length===1){this.accept(e);return}const c=s.substring(0,l);this._isAcceptingPartially=!0;try{e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[yn.replace(j.fromPositions(o),c)]);const d=Fq(c);e.setPosition(kq(o,d))}finally{this._isAcceptingPartially=!1}if(r.source.provider.handlePartialAccept){const d=j.fromPositions(r.range.getStartPosition(),kq(o,Fq(c))),h=e.getModel().getValueInRange(d,1);r.source.provider.handlePartialAccept(r.source.inlineCompletions,r.sourceInlineCompletion,h.length)}})}handleSuggestAccepted(e){var t,n;const i=e.toSingleTextEdit().removeCommonPrefix(this.textModel),r=this._computeAugmentedCompletion(i,void 0);if(!r)return;const a=r.completion.inlineCompletion;(n=(t=a.source.provider).handlePartialAccept)===null||n===void 0||n.call(t,a.source.inlineCompletions,a.sourceInlineCompletion,i.text.length)}};Bq=upt([IH(9,mt),IH(10,ni),IH(11,tn)],Bq);var npt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Lb;class Ste{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;const i=n[0].score[0];for(let r=0;rs&&d.type===n[l].completion.kind&&d.insertText===n[l].completion.insertText&&(s=d.touch,o=l),n[l].completion.preselect&&a===-1)return a=l}return o!==-1?o:a!==-1?a:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[n,i]of e)i.touch=t,i.type=typeof i.type=="number"?i.type:rk.fromString(i.type),this._cache.set(n,i);this._seq=this._cache.size}}class rpt extends Ste{constructor(){super("recentlyUsedByPrefix"),this._trie=px.forStrings(),this._seq=0}memorize(e,t,n){const{word:i}=e.getWordUntilPosition(t),r=`${e.getLanguageId()}/${i}`;this._trie.set(r,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){const{word:i}=e.getWordUntilPosition(t);if(!i)return super.select(e,t,n);const r=`${e.getLanguageId()}/${i}`;let a=this._trie.get(r);if(a||(a=this._trie.findSubstr(r)),a)for(let o=0;oe.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,n]of e)n.type=typeof n.type=="number"?n.type:rk.fromString(n.type),this._trie.set(t,n)}}}let pF=Lb=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new pe,this._persistSoon=new Hu(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===lw.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var n;const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==i){this._saveState();const r=Lb._strategyCtors.get(i)||Cye;this._strategy=new r;try{const o=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,s=this._storageService.get(`${Lb._storagePrefix}/${i}`,o);s&&this._strategy.fromJSON(JSON.parse(s))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${Lb._storagePrefix}/${this._strategy.name}`,n,t,1)}}};pF._strategyCtors=new Map([["recentlyUsedByPrefix",rpt],["recentlyUsed",ipt],["first",Cye]]);pF._storagePrefix="suggest/memories";pF=Lb=npt([yce(0,Ul),yce(1,tu)],pF);const yR=Ut("ISuggestMemories");au(yR,pF,1);var apt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},opt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},wq;let DF=wq=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=wq.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(122)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(122)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const n=this._editor.getModel(),i=this._editor.getSelection(),r=n.getWordAtPosition(i.getStartPosition());if(!r){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(r.endColumn===i.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};DF.AtEnd=new Pe("atEndOfWord",!1);DF=wq=apt([opt(1,pt)],DF);var spt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zb;let Z3=zb=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=zb.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(zb._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let i=n;for(let r=t.items.length;r>0&&(i=(i+t.items.length+(e?1:-1))%t.items.length,!(i===n||!t.items[i].completion.additionalTextEdits));r--);return i}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=zb._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Z3.OtherSuggestions=new Pe("hasOtherSuggestions",!1);Z3=zb=spt([lpt(1,pt)],Z3);class cpt{constructor(e,t,n,i){this._disposables=new pe,this._disposables.add(n.onDidSuggest(r=>{r.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(r=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(r=>{if(this._active&&!t.isFrozen()&&n.state!==0){const a=r.charCodeAt(r.length-1);this._active.acceptCharacters.has(a)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!pa(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new _B;for(const n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var dpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class ws{provideSelectionRanges(e,t){return dpt(this,void 0,void 0,function*(){const n=[];for(const i of t){const r=[];n.push(r);const a=new Map;yield new Promise(o=>ws._bracketsRightYield(o,0,e,i,a)),yield new Promise(o=>ws._bracketsLeftYield(o,0,e,i,a,r))}return n})}static _bracketsRightYield(e,t,n,i,r){const a=new Map,o=Date.now();for(;;){if(t>=ws._maxRounds){e();break}if(!i){e();break}const s=n.bracketPairs.findNextBracket(i);if(!s){e();break}if(Date.now()-o>ws._maxDuration){setTimeout(()=>ws._bracketsRightYield(e,t+1,n,i,r));break}if(s.bracketInfo.isOpeningBracket){const c=s.bracketInfo.bracketText,d=a.has(c)?a.get(c):0;a.set(c,d+1)}else{const c=s.bracketInfo.getOpeningBrackets()[0].bracketText;let d=a.has(c)?a.get(c):0;if(d-=1,a.set(c,Math.max(0,d)),d<0){let h=r.get(c);h||(h=new to,r.set(c,h)),h.push(s.range)}}i=s.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,i,r,a){const o=new Map,s=Date.now();for(;;){if(t>=ws._maxRounds&&r.size===0){e();break}if(!i){e();break}const l=n.bracketPairs.findPrevBracket(i);if(!l){e();break}if(Date.now()-s>ws._maxDuration){setTimeout(()=>ws._bracketsLeftYield(e,t+1,n,i,r,a));break}if(l.bracketInfo.isOpeningBracket){const d=l.bracketInfo.bracketText;let h=o.has(d)?o.get(d):0;if(h-=1,o.set(d,Math.max(0,h)),h<0){const E=r.get(d);if(E){const m=E.shift();E.size===0&&r.delete(d);const g=j.fromPositions(l.range.getEndPosition(),m.getStartPosition()),f=j.fromPositions(l.range.getStartPosition(),m.getEndPosition());a.push({range:g}),a.push({range:f}),ws._addBracketLeading(n,f,a)}}}else{const d=l.bracketInfo.getOpeningBrackets()[0].bracketText,h=o.has(d)?o.get(d):0;o.set(d,h+1)}i=l.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;const i=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(i);r!==0&&r!==t.startColumn&&(n.push({range:j.fromPositions(new ee(i,r),t.getEndPosition())}),n.push({range:j.fromPositions(new ee(i,1),t.getEndPosition())}));const a=i-1;if(a>0){const o=e.getLineFirstNonWhitespaceColumn(a);o===t.startColumn&&o!==e.getLineLastNonWhitespaceColumn(a)&&(n.push({range:j.fromPositions(new ee(a,o),t.getEndPosition())}),n.push({range:j.fromPositions(new ee(a,1),t.getEndPosition())}))}}}ws._maxDuration=30;ws._maxRounds=2;var hpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class bc{static create(e,t){return hpt(this,void 0,void 0,function*(){if(!t.getOption(117).localityBonus||!t.hasModel())return bc.None;const n=t.getModel(),i=t.getPosition();if(!e.canComputeWordRanges(n.uri))return bc.None;const[r]=yield new ws().provideSelectionRanges(n,[i]);if(r.length===0)return bc.None;const a=yield e.computeWordRanges(n.uri,r[0].range);if(!a)return bc.None;const o=n.getWordUntilPosition(i);return delete a[o.word],new class extends bc{distance(s,l){if(!i.equals(t.getPosition()))return 0;if(l.kind===17)return 2<<20;const c=typeof l.label=="string"?l.label:l.label.label,d=a[c];if(eve(d))return 2<<20;const h=X2(d,j.fromPositions(s),j.compareRangesUsingStarts),E=h>=0?d[h]:d[Math.max(0,~h-1)];let m=r.length;for(const g of r){if(!j.containsRange(g.range,E))break;m-=1}return m}}})}}bc.None=new class extends bc{distance(){return 0}};let Ace=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class kE{constructor(e,t,n,i,r,a,o=SP.default,s=void 0){this.clipboardText=s,this._snippetCompareFn=kE._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=i,this._options=r,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=o,a==="top"?this._snippetCompareFn=kE._compareCompletionItemsSnippetsUp:a==="bottom"&&(this._snippetCompareFn=kE._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext;let i="",r="";const a=this._refilterKind===1?this._items:this._filteredItems,o=[],s=!this._options.filterGraceful||a.length>2e3?T3:Iot;for(let l=0;l=E)c.score=Kc.Default;else if(typeof c.completion.filterText=="string"){const g=s(i,r,m,c.completion.filterText,c.filterTextLow,0,this._fuzzyScoreOptions);if(!g)continue;nW(c.completion.filterText,c.textLabel)===0?c.score=g:(c.score=Tot(i,r,m,c.textLabel,c.labelLow,0),c.score[0]=g[0])}else{const g=s(i,r,m,c.textLabel,c.labelLow,0,this._fuzzyScoreOptions);if(!g)continue;c.score=g}}c.idx=l,c.distance=this._wordDistance.distance(c.position,c.completion),o.push(c),e.push(c.textLabel.length)}this._filteredItems=o.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?oK(e.length-.85,e,(l,c)=>l-c):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return kE._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return kE._compareCompletionItems(e,t)}}var Ept=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$4=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},mpt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Lq;class qg{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);const i=t.getWordAtPosition(n);return!(!i||i.endColumn!==n.column&&i.startColumn+1!==n.column||!isNaN(Number(i.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}}function gpt(u,e,t){if(!e.getContextKeyValue(pr.inlineSuggestionVisible.key))return!0;const n=e.getContextKeyValue(pr.suppressSuggestions.key);return n!==void 0?!n:!u.getOption(62).suppressSuggestions}function fpt(u,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const n=e.getContextKeyValue(pr.suppressSuggestions.key);return n!==void 0?!n:!u.getOption(62).suppressSuggestions}let zq=Lq=class{constructor(e,t,n,i,r,a,o,s,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=i,this._logService=r,this._contextKeyService=a,this._configurationService=o,this._languageFeaturesService=s,this._envService=l,this._toDispose=new pe,this._triggerCharacterListener=new pe,this._triggerQuickSuggest=new Vl,this._triggerState=void 0,this._completionDisposables=new pe,this._onDidCancel=new Q,this._onDidTrigger=new Q,this._onDidSuggest=new Q,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Ye(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let c=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{c=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{c=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(d=>{c||this._onCursorChange(d)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!c&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){Su(this._triggerCharacterListener),Su([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const e=new Map;for(const n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of n.triggerCharacters||[]){let r=e.get(i);r||(r=new Set,r.add(W3t()),e.set(i,r)),r.add(n)}const t=n=>{var i;if(!fpt(this._editor,this._contextKeyService,this._configurationService)||qg.shouldAutoTrigger(this._editor))return;if(!n){const o=this._editor.getPosition();n=this._editor.getModel().getLineContent(o.lineNumber).substr(0,o.column-1)}let r="";_3(n.charCodeAt(n.length-1))?ur(n.charCodeAt(n.length-2))&&(r=n.substr(n.length-2)):r=n.charAt(n.length-1);const a=e.get(r);if(a){const o=new Map;if(this._completionModel)for(const[s,l]of this._completionModel.getItemsByProvider())a.has(s)||o.set(s,l);this.trigger({auto:!0,triggerKind:1,triggerCharacter:r,retrigger:!!this._completionModel,clipboardText:(i=this._completionModel)===null||i===void 0?void 0:i.clipboardText,completionOptions:{providerFilter:a,providerItemsToReuse:o}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;w5.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((e=Or.get(this._editor))===null||e===void 0)&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!qg.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),n=this._editor.getPosition(),i=this._editor.getOption(88);if(!w5.isAllOff(i)){if(!w5.isAllOn(i)){t.tokenization.tokenizeIfCheap(n.lineNumber);const r=t.tokenization.getLineTokens(n.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(w5.valueFor(i,a)!=="on")return}gpt(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){Ru(this._editor.hasModel()),Ru(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),n=new qg(e,t,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(n)}trigger(e){var t,n,i,r,a,o;if(!this._editor.hasModel())return;const s=this._editor.getModel(),l=new qg(s,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:(t=e.shy)!==null&&t!==void 0?t:!1,position:this._editor.getPosition()}),this._context=l;let c={triggerKind:(n=e.triggerKind)!==null&&n!==void 0?n:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new vi;const d=this._editor.getOption(111);let h=1;switch(d){case"top":h=0;break;case"bottom":h=2;break}const{itemKind:E,showDeprecated:m}=Lq._createSuggestFilter(this._editor),g=new fF(h,(r=(i=e.completionOptions)===null||i===void 0?void 0:i.kindFilter)!==null&&r!==void 0?r:E,(a=e.completionOptions)===null||a===void 0?void 0:a.providerFilter,(o=e.completionOptions)===null||o===void 0?void 0:o.providerItemsToReuse,m),f=bc.create(this._editorWorkerService,this._editor),p=Ate(this._languageFeaturesService.completionProvider,s,this._editor.getPosition(),g,c,this._requestToken.token);Promise.all([p,f]).then(([D,x])=>mpt(this,void 0,void 0,function*(){var b;if((b=this._requestToken)===null||b===void 0||b.dispose(),!this._editor.hasModel())return;let k=e==null?void 0:e.clipboardText;if(!k&&D.needsClipboard&&(k=yield this._clipboardService.readText()),this._triggerState===void 0)return;const A=this._editor.getModel(),F=new qg(A,this._editor.getPosition(),e),S=Object.assign(Object.assign({},SP.default),{firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly});if(this._completionModel=new kE(D.items,this._context.column,{leadingLineContent:F.leadingLineContent,characterCountDelta:F.column-this._context.column},x,this._editor.getOption(117),this._editor.getOption(111),S,k),this._completionDisposables.add(D.disposable),this._onNewContext(F),this._reportDurationsTelemetry(D.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const w of D.items)w.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${w.provider._debugDisplayName}`,w.completion)})).catch(zt)}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createSuggestFilter(e){const t=new Set;e.getOption(111)==="none"&&t.add(27);const i=e.getOption(117);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Wu(e.leadingLineContent)!==Wu(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(qg.shouldAutoTrigger(this._editor)&&this._context){const n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,n=new Set;for(const[i,r]of this._completionModel.getItemsByProvider())r.length>0&&r[0].container.incomplete?n.add(i):t.set(i,r);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const i=qg.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(i&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};zq=Lq=Ept([$4(1,ql),$4(2,_4),$4(3,i0),$4(4,r0),$4(5,pt),$4(6,tu),$4(7,We),$4(8,JX)],zq);class AR{constructor(e,t){this._disposables=new pe,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const n=e.getSelections(),i=n.length;let r=!1;for(let o=0;oAR._maxSelectionLength)return;this._lastOvertyped[o]={value:a.getValueInRange(s),multiline:s.startLineNumber!==s.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},OH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Bte extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,Bte.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"⏎")}}let Mq=class{constructor(e,t,n,i,r){this._menuId=t,this._menuService=i,this._contextKeyService=r,this._menuDisposables=new pe,this.element=me(e,ve(".suggest-status-bar"));const a=o=>o instanceof zl?n.createInstance(Bte,o,void 0):void 0;this._leftActions=new j0(this.element,{actionViewItemProvider:a}),this._rightActions=new j0(this.element,{actionViewItemProvider:a}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const n=[],i=[];for(const[r,a]of e.getActions())r==="left"?n.push(...a):i.push(...a);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};Mq=ppt([OH(2,mt),OH(3,$1),OH(4,pt)],Mq);var Dpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};function wte(u){return!!u&&!!(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}let Tq=class{constructor(e,t){this._editor=e,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new Q,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new pe,this._renderDisposeable=new pe,this._borderWidth=1,this._size=new pu(330,0),this.domNode=ve(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(h4,{editor:e}),this._body=ve(".body"),this._scrollbar=new EA(this._body,{alwaysConsumeMouseWheel:!0}),me(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=me(this._body,ve(".header")),this._close=me(this._header,ve("span"+st.asCSSSelector(we.close))),this._close.title=v("details.close","Close"),this._type=me(this._header,ve("p.type")),this._docs=me(this._body,ve("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),n=t.getMassagedFontFamily(),i=e.get(118)||t.fontSize,r=e.get(119)||t.lineHeight,a=t.fontWeight,o=`${i}px`,s=`${r}px`;this.domNode.style.fontSize=o,this.domNode.style.lineHeight=`${r/i}`,this.domNode.style.fontWeight=a,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=s,this._close.style.width=s}getLayoutInfo(){const e=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,t=this._borderWidth,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=v("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var n,i;this._renderDisposeable.clear();let{detail:r,documentation:a}=e.completion;if(t){let o="";o+=`score: ${e.score[0]} `,o+=`prefix: ${(n=e.word)!==null&&n!==void 0?n:"(no prefix)"} `,o+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} `,o+=`distance: ${e.distance} (localityBonus-setting) `,o+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} `,o+=`commit_chars: ${(i=e.completion.commitCharacters)===null||i===void 0?void 0:i.join("")} -`,a=new Zr().appendCodeblock("empty",o),r=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!wte(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),r){const o=r.length>1e5?`${r.substr(0,1e5)}…`:r;this._type.textContent=o,this._type.title=o,us(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(o))}else Nr(this._type),this._type.title="",Ya(this._type),this.domNode.classList.add("no-type");if(Nr(this._docs),typeof a=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=a;else if(a){this._docs.classList.add("markdown-docs"),Nr(this._docs);const o=this._markdownRenderer.render(a);this._docs.appendChild(o.element),this._renderDisposeable.add(o),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=o=>{o.preventDefault(),o.stopPropagation()},this._close.onclick=o=>{o.preventDefault(),o.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const n=new pu(e,t);pu.equals(n,this._size)||(this._size=n,UJe(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Tq=Dpt([xpt(1,mt)],Tq);class vpt{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new pe,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new ote,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,i,r=0,a=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,i=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(o=>{if(n&&i){this.widget.layout(o.dimension.width,o.dimension.height);let s=!1;o.west&&(a=i.width-o.dimension.width,s=!0),o.north&&(r=i.height-o.dimension.height,s=!0),s&&this._applyTopLeft({top:n.top+r,left:n.left+a})}o.done&&(n=void 0,i=void 0,r=0,a=0,this._userSize=o.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var o;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(o=this._userSize)!==null&&o!==void 0?o:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var i;const r=c6(this.getDomNode().ownerDocument.body),a=this.widget.getLayoutInfo(),o=new pu(220,2*a.lineHeight),s=e.top,l=function(){const x=r.width-(e.left+e.width+a.borderWidth+a.horizontalPadding),b=-a.borderWidth+e.left+e.width,k=new pu(x,r.height-e.top-a.borderHeight-a.verticalPadding),A=k.with(void 0,e.top+e.height-a.borderHeight-a.verticalPadding);return{top:s,left:b,fit:x-t.width,maxSizeTop:k,maxSizeBottom:A,minSize:o.with(Math.min(x,o.width))}}(),c=function(){const x=e.left-a.borderWidth-a.horizontalPadding,b=Math.max(a.horizontalPadding,e.left-t.width-a.borderWidth),k=new pu(x,r.height-e.top-a.borderHeight-a.verticalPadding),A=k.with(void 0,e.top+e.height-a.borderHeight-a.verticalPadding);return{top:s,left:b,fit:x-t.width,maxSizeTop:k,maxSizeBottom:A,minSize:o.with(Math.min(x,o.width))}}(),d=function(){const x=e.left,b=-a.borderWidth+e.top+e.height,k=new pu(e.width-a.borderHeight,r.height-e.top-e.height-a.verticalPadding);return{top:b,left:x,fit:k.height-t.height,maxSizeBottom:k,maxSizeTop:k,minSize:o.with(k.width)}}(),h=[l,c,d],E=(i=h.find(x=>x.fit>=0))!==null&&i!==void 0?i:h.sort((x,b)=>b.fit-x.fit)[0],m=e.top+e.height-a.borderHeight;let g,f=t.height;const p=Math.max(E.maxSizeTop.height,E.maxSizeBottom.height);f>p&&(f=p);let D;n?f<=E.maxSizeTop.height?(g=!0,D=E.maxSizeTop):(g=!1,D=E.maxSizeBottom):f<=E.maxSizeBottom.height?(g=!1,D=E.maxSizeBottom):(g=!0,D=E.maxSizeTop),this._applyTopLeft({left:E.left,top:g?E.top:m-f}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,E===l,g,E!==l),this._resizable.minSize=E.minSize,this._resizable.maxSize=D,this._resizable.layout(f,Math.min(D.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Kh;(function(u){u[u.FILE=0]="FILE",u[u.FOLDER=1]="FOLDER",u[u.ROOT_FOLDER=2]="ROOT_FOLDER"})(Kh||(Kh={}));const Cpt=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function Q9(u,e,t,n){const i=n===Kh.ROOT_FOLDER?["rootfolder-icon"]:n===Kh.FOLDER?["folder-icon"]:["file-icon"];if(t){let r;if(t.scheme===Ot.data)r=$m.parseMetaData(t).get($m.META_DATA_LABEL);else{const a=t.path.match(Cpt);a?(r=X9(a[2].toLowerCase()),a[1]&&i.push(`${X9(a[1].toLowerCase())}-name-dir-icon`)):r=X9(t.authority.toLowerCase())}if(n===Kh.FOLDER)i.push(`${r}-name-folder-icon`);else{if(r){if(i.push(`${r}-name-file-icon`),i.push("name-file-icon"),r.length<=255){const o=r.split(".");for(let s=1;s=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},jH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},K4;function bye(u){return`suggest-aria-id:${u}`}const Fpt=hi("suggest-more-info",we.chevronRight,v("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ypt=new(K4=class{extract(e,t){if(e.textLabel.match(K4._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(K4._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const n=K4._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},K4._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,K4._regexStrict=new RegExp(`^${K4._regexRelaxed.source}$`,"i"),K4);let Nq=class{constructor(e,t,n,i){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=i,this._onDidToggleDetails=new Q,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new pe,n=e;n.classList.add("show-file-icons");const i=me(e,ve(".icon")),r=me(i,ve("span.colorspan")),a=me(e,ve(".contents")),o=me(a,ve(".main")),s=me(o,ve(".icon-label.codicon")),l=me(o,ve("span.left")),c=me(o,ve("span.right")),d=new kw(l,{supportHighlights:!0,supportIcons:!0});t.add(d);const h=me(l,ve("span.signature-label")),E=me(l,ve("span.qualifier-label")),m=me(c,ve("span.details-label")),g=me(c,ve("span.readMore"+st.asCSSSelector(Fpt)));g.title=v("readMore","Read More");const f=()=>{const p=this._editor.getOptions(),D=p.get(50),x=D.getMassagedFontFamily(),b=D.fontFeatureSettings,k=p.get(118)||D.fontSize,A=p.get(119)||D.lineHeight,F=D.fontWeight,S=D.letterSpacing,w=`${k}px`,z=`${A}px`,N=`${S}px`;n.style.fontSize=w,n.style.fontWeight=F,n.style.letterSpacing=N,o.style.fontFamily=x,o.style.fontFeatureSettings=b,o.style.lineHeight=z,i.style.height=z,i.style.width=z,g.style.height=z,g.style.width=z};return f(),t.add(this._editor.onDidChangeConfiguration(p=>{(p.hasChanged(50)||p.hasChanged(118)||p.hasChanged(119))&&f()})),{root:n,left:l,right:c,icon:i,colorspan:r,iconLabel:d,iconContainer:s,parametersLabel:h,qualifierLabel:E,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){const{completion:i}=e;n.root.id=bye(t),n.colorspan.style.backgroundColor="";const r={labelEscapeNewLines:!0,matches:vA(e.score)},a=[];if(i.kind===19&&ypt.extract(e,a))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=a[0];else if(i.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const o=Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:e.textLabel}),Kh.FILE),s=Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:i.detail}),Kh.FILE);r.extraClasses=o.length>s.length?o:s}else i.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",r.extraClasses=[Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:e.textLabel}),Kh.FOLDER),Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:i.detail}),Kh.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...st.asClassNameArray(rk.toIcon(i.kind))));i.tags&&i.tags.indexOf(1)>=0&&(r.extraClasses=(r.extraClasses||[]).concat(["deprecated"]),r.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,r),typeof i.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=HH(i.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=HH(i.label.detail||""),n.detailsLabel.textContent=HH(i.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?us(n.detailsLabel):Ya(n.detailsLabel),wte(e)?(n.right.classList.add("can-expand-details"),us(n.readMore),n.readMore.onmousedown=o=>{o.stopPropagation(),o.preventDefault()},n.readMore.onclick=o=>{o.stopPropagation(),o.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Ya(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};Nq=kpt([jH(1,_n),jH(2,vn),jH(3,sr)],Nq);function HH(u){return u.replace(/\r\n|\r|\n/g,"")}var Apt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},e_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_pt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},YD;q("editorSuggestWidget.background",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("editorSuggestWidgetBackground","Background color of the suggest widget."));q("editorSuggestWidget.border",{dark:r1,light:r1,hcDark:r1,hcLight:r1},v("editorSuggestWidgetBorder","Border color of the suggest widget."));const t_=q("editorSuggestWidget.foreground",{dark:ml,light:ml,hcDark:ml,hcLight:ml},v("editorSuggestWidgetForeground","Foreground color of the suggest widget."));q("editorSuggestWidget.selectedForeground",{dark:Of,light:Of,hcDark:Of,hcLight:Of},v("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));q("editorSuggestWidget.selectedIconForeground",{dark:E5,light:E5,hcDark:E5,hcLight:E5},v("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Spt=q("editorSuggestWidget.selectedBackground",{dark:jf,light:jf,hcDark:jf,hcLight:jf},v("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));q("editorSuggestWidget.highlightForeground",{dark:gl,light:gl,hcDark:gl,hcLight:gl},v("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));q("editorSuggestWidget.focusHighlightForeground",{dark:Q7,light:Q7,hcDark:Q7,hcLight:Q7},v("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));q("editorSuggestWidgetStatus.foreground",{dark:tt(t_,.5),light:tt(t_,.5),hcDark:tt(t_,.5),hcLight:tt(t_,.5)},v("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Bpt{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Jm}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const n=JSON.parse(t);if(pu.is(n))return pu.lift(n)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let xF=YD=class{constructor(e,t,n,i,r){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Ir,this._pendingShowDetails=new Ir,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Vl,this._disposables=new pe,this._onDidSelect=new F3,this._onDidFocus=new F3,this._onDidHide=new Q,this._onDidShow=new Q,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Q,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ote,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new wpt(this,e),this._persistedSize=new Bpt(t,e);class a{constructor(E,m,g=!1,f=!1){this.persistedSize=E,this.currentSize=m,this.persistHeight=g,this.persistWidth=f}}let o;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),o=new a(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var E,m,g,f;if(this._resize(h.dimension.width,h.dimension.height),o&&(o.persistHeight=o.persistHeight||!!h.north||!!h.south,o.persistWidth=o.persistWidth||!!h.east||!!h.west),!!h.done){if(o){const{itemHeight:p,defaultSize:D}=this.getLayoutInfo(),x=Math.round(p/2);let{width:b,height:k}=this.element.size;(!o.persistHeight||Math.abs(o.currentSize.height-k)<=x)&&(k=(m=(E=o.persistedSize)===null||E===void 0?void 0:E.height)!==null&&m!==void 0?m:D.height),(!o.persistWidth||Math.abs(o.currentSize.width-b)<=x)&&(b=(f=(g=o.persistedSize)===null||g===void 0?void 0:g.width)!==null&&f!==void 0?f:D.width),this._persistedSize.store(new pu(b,k))}this._contentWidget.unlockPreference(),o=void 0}})),this._messageElement=me(this.element.domNode,ve(".message")),this._listElement=me(this.element.domNode,ve(".tree"));const s=this._disposables.add(r.createInstance(Tq,this.editor));s.onDidClose(this.toggleDetails,this,this._disposables),this._details=new vpt(s,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);l();const c=r.createInstance(Nq,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Gl("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let E=h.textLabel;if(typeof h.completion.label!="string"){const{detail:p,description:D}=h.completion.label;p&&D?E=v("label.full","{0} {1}, {2}",E,p,D):p?E=v("label.detail","{0} {1}",E,p):D&&(E=v("label.desc","{0}, {1}",E,D))}if(!h.isResolved||!this._isDetailsVisible())return E;const{documentation:m,detail:g}=h.completion,f=y3("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return v("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",E,f)}}}),this._list.style(p6({listInactiveFocusBackground:Spt,listInactiveFocusOutline:En})),this._status=r.createInstance(Mq,this.element.domNode,dm);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);d(),this._disposables.add(i.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(i.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(117)&&(d(),l())})),this._ctxSuggestWidgetVisible=Pt.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=Pt.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=Pt.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=Pt.HasFocusedSuggestion.bindTo(n),this._disposables.add(xi(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=$c(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const n=e.elements[0],i=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(i),this._currentSuggestionDetails=Ui(r=>_pt(this,void 0,void 0,function*(){const a=Rm(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),o=r.onCancellationRequested(()=>a.dispose());try{return yield n.resolve(r)}finally{a.dispose(),o.dispose()}})),this._currentSuggestionDetails.then(()=>{i>=this._list.length||n!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[n]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:bye(i)}))}).catch(zt)),this._onDidFocus.fire({item:n,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Ya(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=YD.LOADING_MESSAGE,Ya(this._listElement,this._status.element),us(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,jm(YD.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=YD.NO_SUGGESTIONS_MESSAGE,Ya(this._listElement,this._status.element),us(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,jm(YD.NO_SUGGESTIONS_MESSAGE);break;case 3:Ya(this._messageElement),us(this._listElement,this._status.element),this._show();break;case 4:Ya(this._messageElement),us(this._listElement,this._status.element),this._show();break;case 5:Ya(this._messageElement),us(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Rm(()=>this._setState(1),t)))}showSuggestions(e,t,n,i,r){var a,o;if(this._contentWidget.setPosition(this.editor.getPosition()),(a=this._loadingTimeout)===null||a===void 0||a.dispose(),(o=this._currentSuggestionDetails)===null||o===void 0||o.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}const s=this._completionModel.items.length,l=s===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),l){this._setState(i?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(r?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=CB(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(wte(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=CB(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightl&&(s=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*a.typicalHalfwidthCharacterWidth:s,d=a.statusBarHeight+this._list.contentHeight+a.borderHeight,h=a.itemHeight+a.statusBarHeight,E=ji(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=E.top+m.top+m.height,f=Math.min(r.height-g-a.verticalPadding,d),p=E.top+m.top-a.verticalPadding,D=Math.min(p,d);let x=Math.min(Math.max(D,f)+a.borderHeight,d);o===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(o=this._cappedHeight.wanted),ox&&(o=x);const b=150;o>f||this._forceRenderingAbove&&p>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),x=D):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),x=f),this.element.preferredSize=new pu(c,a.defaultSize.height),this.element.maxSize=new pu(l,x),this.element.minSize=new pu(220,h),this._cappedHeight=o===d?{wanted:(i=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&i!==void 0?i:e.height,capped:o}:void 0}this._resize(s,o)}_resize(e,t){const{width:n,height:i}=this.element.maxSize;e=Math.min(n,e),t=Math.min(i,t);const{statusBarHeight:r}=this.getLayoutInfo();this._list.layout(t-r,e),this._listElement.style.height=`${t-r}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),t=Yo(this.editor.getOption(119)||e.lineHeight,8,1e3),n=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:t,i=this._details.widget.borderWidth,r=2*i;return{itemHeight:t,statusBarHeight:n,borderWidth:i,borderHeight:r,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new pu(430,n+12*t+r)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};xF.LOADING_MESSAGE=v("suggestWidget.loading","Loading...");xF.NO_SUGGESTIONS_MESSAGE=v("suggestWidget.noSuggestions","No suggestions.");xF=YD=Apt([e_(1,Ul),e_(2,pt),e_(3,sr),e_(4,mt)],xF);class wpt{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:i}=this._widget.getLayoutInfo();return new pu(t+2*n+i,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Lpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Pq;class zpt{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),r=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:j.fromPositions(t,r),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let pl=Pq=class{static get(e){return e.getContribution(Pq.ID)}constructor(e,t,n,i,r,a,o){this._memoryService=t,this._commandService=n,this._contextKeyService=i,this._instantiationService=r,this._logService=a,this._telemetryService=o,this._lineSuffix=new Ir,this._toDispose=new pe,this._selectors=new Mpt(d=>d.priority),this._onWillInsertSuggestItem=new Q,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=r.createInstance(zq,this.editor),this._selectors.register({priority:0,select:(d,h,E)=>this._memoryService.select(d,h,E)});const s=Pt.InsertMode.bindTo(i);s.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>s.set(e.getOption(117).insertMode))),this.widget=this._toDispose.add(new VS(()=>{const d=this._instantiationService.createInstance(xF,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(f=>this._insertSuggestion(f,0),this));const h=new cpt(this.editor,d,this.model,f=>this._insertSuggestion(f,2));this._toDispose.add(h);const E=Pt.MakesTextEdit.bindTo(this._contextKeyService),m=Pt.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=Pt.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ft(()=>{E.reset(),m.reset(),g.reset()})),this._toDispose.add(d.onDidFocus(({item:f})=>{const p=this.editor.getPosition(),D=f.editStart.column,x=p.column;let b=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!f.completion.additionalTextEdits&&!(f.completion.insertTextRules&4)&&x-D===f.completion.insertText.length&&(b=this.editor.getModel().getValueInRange({startLineNumber:p.lineNumber,startColumn:D,endLineNumber:p.lineNumber,endColumn:x})!==f.completion.insertText),E.set(b),m.set(!ee.equals(f.editInsertEnd,f.editReplaceEnd)),g.set(!!f.provider.resolveCompletionItem||!!f.completion.documentation||f.completion.detail!==f.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(f=>{if(f.toKeyCodeChord().equals(new c4(!0,!1,!1,!1,33))||iu&&f.toKeyCodeChord().equals(new c4(!1,!1,!1,!0,33))){f.stopPropagation();return}f.toKeyCodeChord().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new VS(()=>this._toDispose.add(new AR(this.editor,this.model)))),this._alternatives=this._toDispose.add(new VS(()=>this._toDispose.add(new Z3(this.editor,this._contextKeyService)))),this._toDispose.add(r.createInstance(DF,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new zpt(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(d.triggerOptions.shy)return;let h=-1;for(const m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),h!==-1)break;h===-1&&(h=0);let E=!1;if(d.triggerOptions.auto){const m=this.editor.getOption(117);m.selectionMode==="never"||m.selectionMode==="always"?E=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?E=d.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(E=d.triggerOptions.triggerKind===1&&!d.triggerOptions.refilter)}this.widget.value.showSuggestions(d.completionModel,h,d.isFrozen,d.triggerOptions.auto,E)})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const l=Pt.AcceptSuggestionsOnEnter.bindTo(i),c=()=>{const d=this.editor.getOption(1);l.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const n=Or.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});const i=this.editor.getModel(),r=i.getAlternativeVersionId(),{item:a}=e,o=[],s=new vi;t&1||this.editor.pushUndoStop();const l=this.getOverwriteInfo(a,!!(t&8));this._memoryService.memorize(i,this.editor.getPosition(),a);const c=a.isResolved;let d=-1,h=-1;if(Array.isArray(a.completion.additionalTextEdits)){this.model.cancel();const m=td.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",a.completion.additionalTextEdits.map(g=>yn.replaceMove(j.lift(g.range),g.text))),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const m=new va;let g;const f=i.onDidChangeContent(b=>{if(b.isFlush){s.cancel(),f.dispose();return}for(const k of b.changes){const A=j.getEndPosition(k.range);(!g||ee.isBefore(A,g))&&(g=A)}}),p=t;t|=2;let D=!1;const x=this.editor.onWillType(()=>{x.dispose(),D=!0,p&2||this.editor.pushUndoStop()});o.push(a.resolve(s.token).then(()=>{if(!a.completion.additionalTextEdits||s.token.isCancellationRequested)return;if(g&&a.completion.additionalTextEdits.some(k=>ee.isBefore(g,j.getStartPosition(k.range))))return!1;D&&this.editor.pushUndoStop();const b=td.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",a.completion.additionalTextEdits.map(k=>yn.replaceMove(j.lift(k.range),k.text))),b.restoreRelativeVerticalPositionOfCursor(this.editor),(D||!(p&2))&&this.editor.pushUndoStop(),!0}).then(b=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),b),h=b===!0?1:b===!1?0:-2}).finally(()=>{f.dispose(),x.dispose()}))}let{insertText:E}=a.completion;if(a.completion.insertTextRules&4||(E=Sv.escape(E)),this.model.cancel(),n.insert(E,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(a.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),a.completion.command)if(a.completion.command.id===jA.id)this.model.trigger({auto:!0,retrigger:!0});else{const m=new va;o.push(this._commandService.executeCommand(a.completion.command.id,...a.completion.command.arguments?[...a.completion.command.arguments]:[]).catch(g=>{a.completion.extensionId?Mi(g):zt(g)}).finally(()=>{d=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(s.cancel();i.canUndo();){r!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(a),Promise.all(o).finally(()=>{this._reportSuggestionAcceptedTelemetry(a,i,c,d,h),this.model.clear(),s.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,i,r){var a,o,s;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(o=(a=e.extensionId)===null||a===void 0?void 0:a.value)!==null&&o!==void 0?o:"unknown",providerId:(s=e.provider._debugDisplayName)!==null&&s!==void 0?s:"unknown",kind:e.completion.kind,basenameHash:M6e(I0(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Qnt(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:i,additionalEditsAsync:r})}getOverwriteInfo(e,t){Ru(this.editor.hasModel());let n=this.editor.getOption(117).insertMode==="replace";t&&(n=!n);const i=e.position.column-e.editStart.column,r=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,a=this.editor.getPosition().column-e.position.column,o=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:i+a,overwriteAfter:r+o}}_alertCompletionItem(e){if(pa(e.completion.additionalTextEdits)){const t=v("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);ga(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},i=r=>{if(r.completion.insertTextRules&4||r.completion.additionalTextEdits)return!0;const a=this.editor.getPosition(),o=r.editStart.column,s=a.column;return s-o!==r.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:a.lineNumber,startColumn:o,endLineNumber:a.lineNumber,endColumn:s})!==r.completion.insertText};Ne.once(this.model.onDidTrigger)(r=>{const a=[];Ne.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Su(a),n()},void 0,a),this.model.onDidSuggest(({completionModel:o})=>{if(Su(a),o.items.length===0){n();return}const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),o.items),l=o.items[s];if(!i(l)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:l,model:o},7)},void 0,a)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const n=this.widget.value.getFocusedItem();let i=0;e&&(i|=4),t&&(i|=8),this._insertSuggestion(n,i)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};pl.ID="editor.contrib.suggestController";pl=Pq=Lpt([FD(1,yR),FD(2,ni),FD(3,pt),FD(4,mt),FD(5,i0),FD(6,n0)],pl);class Mpt{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class jA extends $e{constructor(){super({id:jA.id,label:v("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:Ee.and(W.writable,W.hasCompletionItemProvider,Pt.Visible.toNegated()),kbOpts:{kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){const i=pl.get(t);if(!i)return;let r;n&&typeof n=="object"&&n.auto===!0&&(r=!0),i.triggerSuggest(void 0,r,void 0)}}jA.id="editor.action.triggerSuggest";fu(pl.ID,pl,2);be(jA);const Ys=100+90,mo=xr.bindToContribution(pl.get);ze(new mo({id:"acceptSelectedSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion),handler(u){u.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:Ee.and(Pt.Visible,W.textInputFocus),weight:Ys},{primary:3,kbExpr:Ee.and(Pt.Visible,W.textInputFocus,Pt.AcceptSuggestionsOnEnter,Pt.MakesTextEdit),weight:Ys}],menuOpts:[{menuId:dm,title:v("accept.insert","Insert"),group:"left",order:1,when:Pt.HasInsertAndReplaceRange.toNegated()},{menuId:dm,title:v("accept.insert","Insert"),group:"left",order:1,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("insert"))},{menuId:dm,title:v("accept.replace","Replace"),group:"left",order:1,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("replace"))}]}));ze(new mo({id:"acceptAlternativeSelectedSuggestion",precondition:Ee.and(Pt.Visible,W.textInputFocus,Pt.HasFocusedSuggestion),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:1027,secondary:[1026]},handler(u){u.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:dm,group:"left",order:2,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("insert")),title:v("accept.replace","Replace")},{menuId:dm,group:"left",order:2,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("replace")),title:v("accept.insert","Insert")}]}));ru.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");ze(new mo({id:"hideSuggestWidget",precondition:Pt.Visible,handler:u=>u.cancelSuggestWidget(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:9,secondary:[1033]}}));ze(new mo({id:"selectNextSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectNextSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));ze(new mo({id:"selectNextPageSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectNextPageSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:12,secondary:[2060]}}));ze(new mo({id:"selectLastSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectLastSuggestion()}));ze(new mo({id:"selectPrevSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectPrevSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));ze(new mo({id:"selectPrevPageSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectPrevPageSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:11,secondary:[2059]}}));ze(new mo({id:"selectFirstSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectFirstSuggestion()}));ze(new mo({id:"focusSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion.negate()),handler:u=>u.focusSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));ze(new mo({id:"focusAndAcceptSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion.negate()),handler:u=>{u.focusSuggestion(),u.acceptSelectedSuggestion(!0,!1)}}));ze(new mo({id:"toggleSuggestionDetails",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion),handler:u=>u.toggleSuggestionDetails(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:dm,group:"right",order:1,when:Ee.and(Pt.DetailsVisible,Pt.CanResolve),title:v("detail.more","show less")},{menuId:dm,group:"right",order:1,when:Ee.and(Pt.DetailsVisible.toNegated(),Pt.CanResolve),title:v("detail.less","show more")}]}));ze(new mo({id:"toggleExplainMode",precondition:Pt.Visible,handler:u=>u.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));ze(new mo({id:"toggleSuggestionFocus",precondition:Pt.Visible,handler:u=>u.toggleSuggestionFocus(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:2570,mac:{primary:778}}}));ze(new mo({id:"insertBestCompletion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),DF.AtEnd,Pt.Visible.toNegated(),Z3.OtherSuggestions.toNegated(),Or.InSnippetMode.toNegated()),handler:(u,e)=>{u.triggerSuggestAndAcceptBest(eo(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:Ys,primary:2}}));ze(new mo({id:"insertNextSuggestion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),Z3.OtherSuggestions,Pt.Visible.toNegated(),Or.InSnippetMode.toNegated()),handler:u=>u.acceptNextSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:2}}));ze(new mo({id:"insertPrevSuggestion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),Z3.OtherSuggestions,Pt.Visible.toNegated(),Or.InSnippetMode.toNegated()),handler:u=>u.acceptPrevSuggestion(),kbOpts:{weight:Ys,kbExpr:W.textInputFocus,primary:1026}}));be(class extends $e{constructor(){super({id:"editor.action.resetSuggestSize",label:v("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(u,e){var t;(t=pl.get(e))===null||t===void 0||t.resetWidgetSize()}});class Tpt extends ne{get selectedItem(){return this._selectedItem}constructor(e,t,n,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=on(this,void 0),this._register(e.onKeyDown(a=>{a.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(a=>{a.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const r=pl.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(s,l,c)=>{var d;Fn(p=>this.checkModelVersion(p));const h=this.editor.getModel();if(!h)return-1;const E=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(h);if(!E)return-1;const m=ee.lift(l),g=c.map((p,D)=>{const b=C2.fromSuggestion(r,h,m,p,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),k=E.augments(b);return{index:D,valid:k,prefixLength:b.text.length,suggestItem:p}}).filter(p=>p&&p.valid&&p.prefixLength>0),f=P6e(g,y0(p=>p.prefixLength,Uh));return f?f.index:-1}}));let a=!1;const o=()=>{a||(a=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Ne.once(r.model.onDidTrigger)(s=>{o()})),this._register(r.onWillInsertSuggestItem(s=>{const l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;const d=C2.fromSuggestion(r,c,l,s.item,this.isShiftKeyPressed);this.onWillAccept(d)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!Npt(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,Fn(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){const e=pl.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),i=this.editor.getModel();if(!(!t||!n||!i))return C2.fromSuggestion(e,i,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=pl.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=pl.get(this.editor);e==null||e.forceRenderingAbove()}}class C2{static fromSuggestion(e,t,n,i,r){let{insertText:a}=i.completion,o=!1;if(i.completion.insertTextRules&4){const l=new Sv().parse(a);l.children.length<100&&tL.adjustWhitespace(t,n,!0,l),a=l.toString(),o=!0}const s=e.getOverwriteInfo(i,r);return new C2(j.fromPositions(n.delta(0,-s.overwriteBefore),n.delta(0,Math.max(s.overwriteAfter,0))),a,i.completion.kind,o)}constructor(e,t,n,i){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=i}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new Lve(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Bv(this.range,this.insertText)}}function Npt(u,e){return u===e?!0:!u||!e?!1:u.equals(e)}var Ppt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},W4=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Rq;let Qs=Rq=class extends ne{static get(e){return e.getContribution(Rq.ID)}constructor(e,t,n,i,r,a,o,s,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=i,this.commandService=r,this.debounceService=a,this.languageFeaturesService=o,this.audioCueService=s,this._keybindingService=l,this.model=_w("inlineCompletionModel",void 0),this.textModelVersionId=on(this,-1),this.cursorPosition=on(this,new ee(1,1)),this.suggestWidgetAdaptor=this._register(new Tpt(this.editor,()=>{var h,E;return(E=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||E===void 0?void 0:E.toSingleTextEdit(void 0)},h=>this.updateObservables(h,Ss.Other),h=>{Fn(E=>{var m;this.updateObservables(E,Ss.Other),(m=this.model.get())===null||m===void 0||m.handleSuggestAccepted(h)})})),this._enabled=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(_q,this.editor,{ghostText:this.model.map((h,E)=>h==null?void 0:h.ghostText.read(E)),minReservedLineCount:Sw(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new pr(this.contextKeyService,this.model)),this._register(Ne.runAndSubscribe(e.onDidChangeModel,()=>Fn(h=>{this.model.set(void 0,h),this.updateObservables(h,Ss.Other);const E=e.getModel();if(E){const m=t.createInstance(Bq,E,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,zr(e.onDidChangeConfiguration,()=>e.getOption(117).preview),zr(e.onDidChangeConfiguration,()=>e.getOption(117).previewMode),zr(e.onDidChangeConfiguration,()=>e.getOption(62).mode),this._enabled);this.model.set(m,h)}})));const c=h=>{var E;return h.isUndoing?Ss.Undo:h.isRedoing?Ss.Redo:!((E=this.model.get())===null||E===void 0)&&E.isAcceptingPartially?Ss.AcceptWord:Ss.Other};this._register(e.onDidChangeModelContent(h=>Fn(E=>this.updateObservables(E,c(h))))),this._register(e.onDidChangeCursorPosition(h=>Fn(E=>{var m;this.updateObservables(E,Ss.Other),(h.reason===3||h.source==="api")&&((m=this.model.get())===null||m===void 0||m.stop(E))}))),this._register(e.onDidType(()=>Fn(h=>{var E;this.updateObservables(h,Ss.Other),this._enabled.get()&&((E=this.model.get())===null||E===void 0||E.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([dx.Tab.id,dx.DeleteLeft.id,dx.DeleteRight.id,TFe,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&Fn(m=>{var g;(g=this.model.get())===null||g===void 0||g.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||Xm.dropDownVisible||Fn(h=>{var E;(E=this.model.get())===null||E===void 0||E.stop(h)})})),this._register(Xu(h=>{var E;const m=(E=this.model.read(h))===null||E===void 0?void 0:E.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(Xu(h=>{const E=this.model.read(h),m=E==null?void 0:E.state.read(h);if(!E||!m||!m.inlineCompletion){d=void 0;return}if(m.inlineCompletion.semanticId!==d){d=m.inlineCompletion.semanticId;const g=E.textModel.getLineContent(m.ghostText.lineNumber);this.audioCueService.playAudioCue(hu.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(m.ghostText.renderForScreenReader(g))})}})),this._register(new iq(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){const t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let i;!t&&n&&this.editor.getOption(147)&&(i=v("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),ga(i?e+", "+i:e)}updateObservables(e,t){var n,i;const r=this.editor.getModel();this.textModelVersionId.set((n=r==null?void 0:r.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((i=this.editor.getPosition())!==null&&i!==void 0?i:new ee(1,1),e)}shouldShowHoverAt(e){var t;const n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(i=>e.containsPosition(new ee(n.lineNumber,i.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};Qs.ID="editor.contrib.inlineCompletionsController";Qs=Rq=Ppt([W4(1,mt),W4(2,pt),W4(3,tu),W4(4,ni),W4(5,U0),W4(6,We),W4(7,_A),W4(8,qu)],Qs);var vg=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class _R extends $e{constructor(){super({id:_R.ID,label:v("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.next()})}}_R.ID=PFe;class SR extends $e{constructor(){super({id:SR.ID,label:v("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.previous()})}}SR.ID=NFe;class Rpt extends $e{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:W.writable})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.triggerExplicitly()})}}class Ipt extends $e{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:Ee.and(W.writable,pr.inlineSuggestionVisible)},menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);yield(n=i==null?void 0:i.model.get())===null||n===void 0?void 0:n.acceptNextWord(i.editor)})}}class Opt extends $e{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);yield(n=i==null?void 0:i.model.get())===null||n===void 0?void 0:n.acceptNextLine(i.editor)})}}class jpt extends $e{constructor(){super({id:TFe,label:v("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:pr.inlineSuggestionVisible,menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Ee.and(pr.inlineSuggestionVisible,W.tabMovesFocus.toNegated(),pr.inlineSuggestionHasIndentationLessThanTabSize,Pt.Visible.toNegated(),W.hoverFocused.toNegated())}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Qs.get(t);i&&((n=i.model.get())===null||n===void 0||n.accept(i.editor),i.editor.focus())})}}class BR extends $e{constructor(){super({id:BR.ID,label:v("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:pr.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return vg(this,void 0,void 0,function*(){const n=Qs.get(t);Fn(i=>{var r;(r=n==null?void 0:n.model.get())===null||r===void 0||r.stop(i)})})}}BR.ID="editor.action.inlineSuggest.hide";class wR extends u0{constructor(){super({id:wR.ID,title:v("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:K.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Ee.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return vg(this,void 0,void 0,function*(){const n=e.get(tu),r=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",r)})}}wR.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var Hpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},BC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Vpt{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iq=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=i,this._instantiationService=r,this._telemetryService=a,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Qs.get(this._editor);if(!t)return null;const n=e.target;if(n.type===8){const i=n.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new g8(1e3,this,j.fromPositions(this._editor.getModel().validatePosition(i.positionBefore||i.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new g8(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new g8(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar==="always")return[];const n=Qs.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new Vpt(this,e.range,n)]:[]}renderHoverParts(e,t){const n=new pe,i=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,i,n);const r=i.controller.model.get(),a=this._instantiationService.createInstance(Xm,this._editor,!1,Sw(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(o=>{var s;return(s=o==null?void 0:o.inlineCompletion.source.inlineCompletions.commands)!==null&&s!==void 0?s:[]}));return e.fragment.appendChild(a.getDomNode()),r.triggerExplicitly(),n.add(a),n}renderScreenReaderText(e,t,n){const i=ve,r=i("div.hover-row.markdown-hover"),a=me(r,i("div.hover-contents",{"aria-live":"assertive"})),o=n.add(new h4({editor:this._editor},this._languageService,this._openerService)),s=l=>{n.add(o.onDidRenderAsync(()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()}));const c=v("inlineSuggestionFollows","Suggestion:"),d=n.add(o.render(new Zr().appendText(c).appendCodeblock("text",l)));a.replaceChildren(d.element)};n.add(Xu(l=>{var c;const d=(c=t.controller.model.read(l))===null||c===void 0?void 0:c.ghostText.read(l);if(d){const h=this._editor.getModel().getLineContent(d.lineNumber);s(d.renderForScreenReader(h))}else Pr(a)})),e.fragment.appendChild(r)}};Iq=Hpt([BC(1,vn),BC(2,vs),BC(3,k4),BC(4,mt),BC(5,n0)],Iq);fu(Qs.ID,Qs,3);be(Rpt);be(_R);be(SR);be(Ipt);be(Opt);be(jpt);be(BR);gn(wR);$p.register(Iq);function qo(u,e){let t=0;for(let n=0;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};function kye(u,e,t,n,i){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return[];const r=e.getLanguageConfiguration(u.getLanguageId()).indentationRules;if(!r)return[];for(n=Math.min(n,u.getLineCount());t<=n&&r.unIndentedLinePattern;){const f=u.getLineContent(t);if(!r.unIndentedLinePattern.test(f))break;t++}if(t>n-1)return[];const{tabSize:a,indentSize:o,insertSpaces:s}=u.getOptions(),l=(f,p)=>(p=p||1,p0.shiftIndent(f,f.length+p,a,o,s)),c=(f,p)=>(p=p||1,p0.unshiftIndent(f,f.length+p,a,o,s)),d=[];let h;const E=u.getLineContent(t);let m=E;if(i!=null){h=i;const f=Wu(E);m=h+E.substring(f.length),r.decreaseIndentPattern&&r.decreaseIndentPattern.test(m)&&(h=c(h),m=h+E.substring(f.length)),E!==m&&d.push(yn.replaceMove(new Ye(t,1,t,f.length+1),IB(h,o,s)))}else h=Wu(E);let g=h;r.increaseIndentPattern&&r.increaseIndentPattern.test(m)?(g=l(g),h=l(h)):r.indentNextLinePattern&&r.indentNextLinePattern.test(m)&&(g=l(g)),t++;for(let f=t;f<=n;f++){const p=u.getLineContent(f),D=Wu(p),x=g+p.substring(D.length);r.decreaseIndentPattern&&r.decreaseIndentPattern.test(x)&&(g=c(g),h=c(h)),D!==g&&d.push(yn.replaceMove(new Ye(f,1,f,D.length+1),IB(g,o,s))),!(r.unIndentedLinePattern&&r.unIndentedLinePattern.test(p))&&(r.increaseIndentPattern&&r.increaseIndentPattern.test(x)?(h=l(h),g=h):r.indentNextLinePattern&&r.indentNextLinePattern.test(x)?g=l(g):g=h)}return d}class LR extends $e{constructor(){super({id:LR.ID,label:v("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:W.writable})}run(e,t){const n=t.getModel();if(!n)return;const i=n.getOptions(),r=t.getSelection();if(!r)return;const a=new qpt(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}LR.ID="editor.action.indentationToSpaces";class zR extends $e{constructor(){super({id:zR.ID,label:v("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:W.writable})}run(e,t){const n=t.getModel();if(!n)return;const i=n.getOptions(),r=t.getSelection();if(!r)return;const a=new Jpt(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}zR.ID="editor.action.indentationToTabs";class Lte extends $e{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const n=e.get(md),i=e.get(_n),r=t.getModel();if(!r)return;const a=i.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget),o=r.getOptions(),s=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===a.tabSize&&c===o.tabSize?v("configuredTabSize","Configured Tab Size"):c===a.tabSize?v("defaultTabSize","Default Tab Size"):c===o.tabSize?v("currentTabSize","Current Tab Size"):void 0})),l=Math.min(r.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(s,{placeHolder:v({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[l]}).then(c=>{if(c&&r&&!r.isDisposed()){const d=parseInt(c.label,10);this.displaySizeOnly?r.updateOptions({tabSize:d}):r.updateOptions({tabSize:d,indentSize:d,insertSpaces:this.insertSpaces})}})},50)}}class MR extends Lte{constructor(){super(!1,!1,{id:MR.ID,label:v("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}MR.ID="editor.action.indentUsingTabs";class TR extends Lte{constructor(){super(!0,!1,{id:TR.ID,label:v("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}TR.ID="editor.action.indentUsingSpaces";class NR extends Lte{constructor(){super(!0,!0,{id:NR.ID,label:v("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}NR.ID="editor.action.changeTabDisplaySize";class PR extends $e{constructor(){super({id:PR.ID,label:v("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const n=e.get(_n),i=t.getModel();if(!i)return;const r=n.getCreationOptions(i.getLanguageId(),i.uri,i.isForSimpleWidget);i.detectIndentation(r.insertSpaces,r.tabSize)}}PR.ID="editor.action.detectIndentation";class Wpt extends $e{constructor(){super({id:"editor.action.reindentlines",label:v("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:W.writable})}run(e,t){const n=e.get(tn),i=t.getModel();if(!i)return;const r=kye(i,n,1,i.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Gpt extends $e{constructor(){super({id:"editor.action.reindentselectedlines",label:v("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:W.writable})}run(e,t){const n=e.get(tn),i=t.getModel();if(!i)return;const r=t.getSelections();if(r===null)return;const a=[];for(const o of r){let s=o.startLineNumber,l=o.endLineNumber;if(s!==l&&o.endColumn===1&&l--,s===1){if(s===l)continue}else s--;const c=kye(i,n,s,l);a.push(...c)}a.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,a),t.pushUndoStop())}}class Upt{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(const i of this._edits)t.addEditOperation(j.lift(i.range),i.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let vF=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new pe,this.callOnModel=new pe,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const i=this.editor.getOption(12),{tabSize:r,indentSize:a,insertSpaces:o}=n.getOptions(),s=[],l={shiftIndent:E=>p0.shiftIndent(E,E.length+1,r,a,o),unshiftIndent:E=>p0.unshiftIndent(E,E.length+1,r,a,o)};let c=e.startLineNumber;for(;c<=e.endLineNumber;){if(this.shouldIgnoreLine(n,c)){c++;continue}break}if(c>e.endLineNumber)return;let d=n.getLineContent(c);if(!/\S/.test(d.substring(0,e.startColumn-1))){const E=e2(i,n,n.getLanguageId(),c,l,this._languageConfigurationService);if(E!==null){const m=Wu(d),g=qo(E,r),f=qo(m,r);if(g!==f){const p=b2(g,r,o);s.push({range:new j(c,1,c,m.length+1),text:p}),d=p+d.substr(m.length)}else{const p=FCe(n,c,this._languageConfigurationService);if(p===0||p===8)return}}}const h=c;for(;cn.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,f)=>n.getLanguageIdAtPosition(g,f)},getLineContent:g=>g===h?d:n.getLineContent(g)},n.getLanguageId(),c+1,l,this._languageConfigurationService);if(m!==null){const g=qo(m,r),f=qo(Wu(n.getLineContent(c+1)),r);if(g!==f){const p=g-f;for(let D=c+1;D<=e.endLineNumber;D++){const x=n.getLineContent(D),b=Wu(x),A=qo(b,r)+p,F=b2(A,r,o);F!==b&&s.push({range:new j(D,1,D,b.length+1),text:F})}}}}if(s.length>0){this.editor.pushUndoStop();const E=new Upt(s,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",E),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;const i=e.tokenization.getLineTokens(t);if(i.getCount()>0){const r=i.findTokenIndexAtOffset(n);if(r>=0&&i.getStandardTokenType(r)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};vF.ID="editor.contrib.autoIndentOnPaste";vF=$pt([Kpt(1,tn)],vF);function Fye(u,e,t,n){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return;let i="";for(let a=0;athis._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return uL(this,void 0,void 0,function*(){try{const i=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=i==null?void 0:i.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=i==null?void 0:i.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(i){Mi(i),this._isResolved=!1}})}}class CF{static create(e,t,n,i){return uL(this,void 0,void 0,function*(){const r=[],a=e.ordered(t).reverse().map(o=>n.map(s=>uL(this,void 0,void 0,function*(){try{const l=yield o.provideInlayHints(t,s,i);l!=null&&l.hints.length&&r.push([l,o])}catch(l){Mi(l)}})));if(yield Promise.all(a.flat()),i.isCancellationRequested||t.isDisposed())throw new hg;return new CF(n,r,t)})}constructor(e,t,n){this._disposables=new pe,this.ranges=e,this.provider=new Set;const i=[];for(const[r,a]of t){this._disposables.add(r),this.provider.add(a);for(const o of r.hints){const s=n.validatePosition(o.position);let l="before";const c=CF._getRangeAtPosition(n,s);let d;c.getStartPosition().isBefore(s)?(d=j.fromPositions(c.getStartPosition(),s),l="after"):(d=j.fromPositions(s,c.getEndPosition()),l="before"),i.push(new zte(o,new yye(d,l),a))}}this.items=i.sort((r,a)=>ee.compare(r.hint.position,a.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const n=t.lineNumber,i=e.getWordAtPosition(t);if(i)return new j(n,i.startColumn,n,i.endColumn);e.tokenization.tokenizeIfCheap(n);const r=e.tokenization.getLineTokens(n),a=t.column-1,o=r.findTokenIndexAtOffset(a);let s=r.getStartOffset(o),l=r.getEndOffset(o);return l-s===1&&(s===a&&o>1?(s=r.getStartOffset(o-1),l=r.getEndOffset(o-1)):l===a&&os5(m)?m.command.id:mR()));for(const m of Ba.all())h.has(m.desc.id)&&d.push(new ro(m.desc.id,zl.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>k2(this,void 0,void 0,function*(){const g=yield r.createModelReference(c.uri);try{const f=new bv(g.object.textEditorModel,j.getStartPosition(c.range)),p=n.item.anchor.range;yield s.invokeFunction(m.runEditorCommand.bind(m),e,f,p)}finally{g.dispose()}})));if(n.part.command){const{command:m}=n.part;d.push(new Dr),d.push(new ro(m.id,m.title,void 0,!0,()=>k2(this,void 0,void 0,function*(){var g;try{yield o.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(f){l.notify({severity:bP.Error,source:n.item.provider.displayName,message:f})}})))}const E=e.getOption(126);a.showContextMenu({domForShadowRoot:E&&(i=e.getDomNode())!==null&&i!==void 0?i:void 0,getAnchor:()=>{const m=ji(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>d,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function Aye(u,e,t,n){return k2(this,void 0,void 0,function*(){const r=yield u.get(Vo).createModelReference(n.uri);yield t.invokeWithinContext(a=>k2(this,void 0,void 0,function*(){const o=e.hasSideBySideModifier,s=a.get(pt),l=Ro.inPeekEditor.getValue(s),c=!o&&t.getOption(87)&&!l;return new IA({openToSide:o,openInPeek:c,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(a,new bv(r.object.textEditorModel,j.getStartPosition(n.range)),j.lift(n.range))})),r.dispose()})}var Qpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},QD=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},x8;class nL{constructor(){this._entries=new gg(50)}get(e){const t=nL._key(e);return this._entries.get(t)}set(e,t){const n=nL._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const _ye=Ut("IInlayHintsCache");au(_ye,nL,1);class Oq{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class Xpt{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let Y3=x8=class{static get(e){var t;return(t=e.getContribution(x8.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,i,r,a,o){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=i,this._commandService=r,this._notificationService=a,this._instaService=o,this._disposables=new pe,this._sessionDisposables=new pe,this._decorationsMetadata=new Map,this._ruleFactory=new cA(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(ft(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let i;const r=new Set,a=new Hu(()=>QD(this,void 0,void 0,function*(){const o=Date.now();i==null||i.dispose(!0),i=new vi;const s=t.onWillDispose(()=>i==null?void 0:i.cancel());try{const l=i.token,c=yield CF.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),l);if(a.delay=this._debounceInfo.update(t,Date.now()-o),l.isCancellationRequested){c.dispose();return}for(const d of c.provider)typeof d.onDidChangeInlayHints=="function"&&!r.has(d)&&(r.add(d),this._sessionDisposables.add(d.onDidChangeInlayHints(()=>{a.isScheduled()||a.schedule()})));this._sessionDisposables.add(c),this._updateHintsDecorators(c.ranges,c.items),this._cacheHintsForFastRestore(t)}catch(l){zt(l)}finally{i.dispose(),s.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(a),this._sessionDisposables.add(ft(()=>i==null?void 0:i.dispose(!0))),a.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(o=>{(o.scrollTopChanged||!a.isScheduled())&&a.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(o=>{const s=Math.max(a.delay,1250);a.schedule(s)})),e.enabled==="on")this._activeRenderMode=0;else{let o,s;e.enabled==="onUnlessPressed"?(o=0,s=1):(o=1,s=0),this._activeRenderMode=o,this._sessionDisposables.add(Nh.getInstance().event(l=>{if(!this._editor.hasModel())return;const c=l.altKey&&l.ctrlKey&&!(l.shiftKey||l.metaKey)?s:o;if(c!==this._activeRenderMode){this._activeRenderMode=c;const d=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(d);this._updateHintsDecorators([d.getFullModelRange()],h),a.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>a.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new pe,t=e.add(new rR(this._editor)),n=new pe;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(i=>{const[r]=i,a=this._getInlayHintLabelPart(r),o=this._editor.getModel();if(!a||!o){n.clear();return}const s=new vi;n.add(ft(()=>s.dispose(!0))),a.item.resolve(s.token),this._activeInlayHintPart=a.part.command||a.part.location?new Xpt(a,r.hasTriggerModifier):void 0;const l=o.validatePosition(a.item.hint.position).lineNumber,c=new j(l,1,l,o.getLineMaxColumn(l)),d=this._getInlineHintsForRange(c);this._updateHintsDecorators([c],d),n.add(ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([c],d)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(i=>QD(this,void 0,void 0,function*(){const r=this._getInlayHintLabelPart(i);if(r){const a=r.part;a.location?this._instaService.invokeFunction(Aye,i,this._editor,a.location):pK.is(a.command)&&(yield this._invokeCommand(a.command,r.item))}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>QD(this,void 0,void 0,function*(){if(t.event.detail!==2)return;const n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(Kt.None),pa(n.item.hint.textEdits))){const i=n.item.hint.textEdits.map(r=>yn.replace(j.lift(r.range),r.text));this._editor.executeEdits("inlayHint.default",i),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>QD(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(Ypt,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof Wm&&(n==null?void 0:n.attachedData)instanceof Oq)return n.attachedData}_invokeCommand(e,t){var n;return QD(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(i){this._notificationService.notify({severity:bP.Error,source:t.provider.displayName,message:i})}})}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[n,i]of this._decorationsMetadata){if(t.has(i.item))continue;const r=e.getDecorationRange(n);if(r){const a=new yye(r,i.item.anchor.direction),o=i.item.with({anchor:a});t.set(i.item,o)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const r of n.sort(j.compareRangesUsingStarts)){const a=t.validateRange(new j(r.startLineNumber-30,r.startColumn,r.endLineNumber+30,r.endColumn));i.length===0||!j.areIntersectingOrTouching(i[i.length-1],a)?i.push(a):i[i.length-1]=j.plusRange(i[i.length-1],a)}return i}_updateHintsDecorators(e,t){var n,i;const r=[],a=(g,f,p,D,x)=>{const b={content:p,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:f.className,cursorStops:D,attachedData:x};r.push({item:g,classNameRef:f,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?b:void 0}}})},o=(g,f)=>{const p=this._ruleFactory.createClassNameRef({width:`${s/3|0}px`,display:"inline-block"});a(g,p," ",f?zc.Right:zc.None)},{fontSize:s,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,l);for(const g of t){g.hint.paddingLeft&&o(g,!1);const f=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let p=0;px8._MAX_DECORATORS)break}const E=[];for(const g of e)for(const{id:f}of(i=this._editor.getDecorationsInRange(g))!==null&&i!==void 0?i:[]){const p=this._decorationsMetadata.get(f);p&&(E.push(f),p.classNameRef.dispose(),this._decorationsMetadata.delete(f))}const m=td.capture(this._editor);this._editor.changeDecorations(g=>{const f=g.deltaDecorations(E,r.map(p=>p.decoration));for(let p=0;pn)&&(r=n);const a=e.fontFamily||i;return{fontSize:r,fontFamily:a,padding:t,isUniform:!t&&a===i&&r===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Y3.ID="editor.contrib.InlayHints";Y3._MAX_DECORATORS=1500;Y3=x8=Qpt([yD(1,We),yD(2,U0),yD(3,_ye),yD(4,ni),yD(5,bi),yD(6,mt)],Y3);function eDt(u){const e=" ";return u.replace(/[ \t]/g,e)}ru.registerCommand("_executeInlayHintProvider",(u,...e)=>QD(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(dt.isUri(t)),Ru(j.isIRange(n));const{inlayHintsProvider:i}=u.get(We),r=yield u.get(Vo).createModelReference(t);try{const a=yield CF.create(i,r.object.textEditorModel,[j.lift(n)],Kt.None),o=a.items.map(s=>s.hint);return setTimeout(()=>a.dispose(),0),o}finally{r.dispose()}}));var tDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_ce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},uDt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};class Sce extends g8{constructor(e,t,n,i){super(10,t,e.item.anchor.range,n,i,!0),this.part=e}}let jq=class extends $w{constructor(e,t,n,i,r,a){super(e,t,n,i,a),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Y3.get(this._editor)||e.target.type!==6)return null;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return i instanceof Wm&&i.attachedData instanceof Oq?new Sce(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof Sce?new _i(i=>_ce(this,void 0,void 0,function*(){var r,a,o,s;const{part:l}=e;if(yield l.item.resolve(n),n.isCancellationRequested)return;let c;typeof l.item.hint.tooltip=="string"?c=new Zr().appendText(l.item.hint.tooltip):l.item.hint.tooltip&&(c=l.item.hint.tooltip),c&&i.emitOne(new Sc(this,e.range,[c],!1,0)),pa(l.item.hint.textEdits)&&i.emitOne(new Sc(this,e.range,[new Zr().appendText(v("hint.dbl","Double-click to insert"))],!1,10001));let d;if(typeof l.part.tooltip=="string"?d=new Zr().appendText(l.part.tooltip):l.part.tooltip&&(d=l.part.tooltip),d&&i.emitOne(new Sc(this,e.range,[d],!1,1)),l.part.location||l.part.command){let f;const D=this._editor.getOption(77)==="altKey"?iu?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):iu?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");l.part.location&&l.part.command?f=new Zr().appendText(v("hint.defAndCommand","Go to Definition ({0}), right click for more",D)):l.part.location?f=new Zr().appendText(v("hint.def","Go to Definition ({0})",D)):l.part.command&&(f=new Zr(`[${v("hint.cmd","Execute Command")}](${Zpt(l.part.command)} "${l.part.command.title}") (${D})`,{isTrusted:!0})),f&&i.emitOne(new Sc(this,e.range,[f],!1,1e4))}const h=yield this._resolveInlayHintLabelPartHover(l,n);try{for(var E=!0,m=uDt(h),g;g=yield m.next(),r=g.done,!r;E=!0){s=g.value,E=!1;const f=s;i.emitOne(f)}}catch(f){a={error:f}}finally{try{!E&&!r&&(o=m.return)&&(yield o.call(m))}finally{if(a)throw a.error}}})):_i.EMPTY}_resolveInlayHintLabelPartHover(e,t){return _ce(this,void 0,void 0,function*(){if(!e.part.location)return _i.EMPTY;const{uri:n,range:i}=e.part.location,r=yield this._resolverService.createModelReference(n);try{const a=r.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(a)?lte(this._languageFeaturesService.hoverProvider,a,new ee(i.startLineNumber,i.startColumn),t).filter(o=>!Ev(o.hover.contents)).map(o=>new Sc(this,e.item.anchor.range,o.hover.contents,!1,2+o.ordinal)):_i.EMPTY}finally{r.dispose()}})}};jq=tDt([wC(1,vn),wC(2,vs),wC(3,tu),wC(4,Vo),wC(5,We)],jq);fu(Y3.ID,Y3,1);$p.register(jq);class nDt{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Ye(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new Ye(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var iDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},rDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},v8;let tg=v8=class{static get(e){return e.getContribution(v8.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let a=i;if(a.startLineNumber!==a.endLineNumber)return;const o=new Z2e(this.editor,5),s=r.uri;return this.editorWorkerService.canNavigateValueSet(s)?(this.currentRequest=Ui(l=>this.editorWorkerService.navigateValueSet(s,a,t)),this.currentRequest.then(l=>{var c;if(!l||!l.range||!l.value||!o.validate(this.editor))return;const d=j.lift(l.range);let h=l.range;const E=l.value.length-(a.endColumn-a.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+l.value.length},E>1&&(a=new Ye(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+E-1));const m=new nDt(d,a,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:v8.DECORATION}]),(c=this.decorationRemover)===null||c===void 0||c.cancel(),this.decorationRemover=Pm(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(zt)}).catch(zt)):Promise.resolve(void 0)}};tg.ID="editor.contrib.inPlaceReplaceController";tg.DECORATION=Lt.register({description:"in-place-replace",className:"valueSetReplacement"});tg=v8=iDt([rDt(1,ql)],tg);class aDt extends $e{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3159,weight:100}})}run(e,t){const n=tg.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}class oDt extends $e{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3161,weight:100}})}run(e,t){const n=tg.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}fu(tg.ID,tg,4);be(aDt);be(oDt);class sDt extends $e{constructor(){super({id:"expandLineSelection",label:v("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:W.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;const i=t._getViewModel();i.model.pushStackElement(),i.setCursorStates(n.source,3,br.expandLineSelection(i,i.getCursorStates())),i.revealPrimaryCursor(n.source,!0)}}be(sDt);class lDt{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const n=cDt(e,this._cursors);for(let i=0,r=n.length;ia.lineNumber===o.lineNumber?a.column-o.column:a.lineNumber-o.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);const t=[];let n=0,i=0;const r=e.length;for(let a=1,o=u.getLineCount();a<=o;a++){const s=u.getLineContent(a),l=s.length+1;let c=0;if(i1e5?`${r.substr(0,1e5)}…`:r;this._type.textContent=o,this._type.title=o,ns(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(o))}else Nr(this._type),this._type.title="",Ya(this._type),this.domNode.classList.add("no-type");if(Nr(this._docs),typeof a=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=a;else if(a){this._docs.classList.add("markdown-docs"),Nr(this._docs);const o=this._markdownRenderer.render(a);this._docs.appendChild(o.element),this._renderDisposeable.add(o),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=o=>{o.preventDefault(),o.stopPropagation()},this._close.onclick=o=>{o.preventDefault(),o.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const n=new pu(e,t);pu.equals(n,this._size)||(this._size=n,UJe(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Tq=Dpt([xpt(1,mt)],Tq);class vpt{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new pe,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new ote,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,i,r=0,a=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,i=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(o=>{if(n&&i){this.widget.layout(o.dimension.width,o.dimension.height);let s=!1;o.west&&(a=i.width-o.dimension.width,s=!0),o.north&&(r=i.height-o.dimension.height,s=!0),s&&this._applyTopLeft({top:n.top+r,left:n.left+a})}o.done&&(n=void 0,i=void 0,r=0,a=0,this._userSize=o.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var o;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(o=this._userSize)!==null&&o!==void 0?o:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var n;const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(n=this._userSize)!==null&&n!==void 0?n:this.widget.size,t)}_placeAtAnchor(e,t,n){var i;const r=c6(this.getDomNode().ownerDocument.body),a=this.widget.getLayoutInfo(),o=new pu(220,2*a.lineHeight),s=e.top,l=function(){const x=r.width-(e.left+e.width+a.borderWidth+a.horizontalPadding),b=-a.borderWidth+e.left+e.width,k=new pu(x,r.height-e.top-a.borderHeight-a.verticalPadding),A=k.with(void 0,e.top+e.height-a.borderHeight-a.verticalPadding);return{top:s,left:b,fit:x-t.width,maxSizeTop:k,maxSizeBottom:A,minSize:o.with(Math.min(x,o.width))}}(),c=function(){const x=e.left-a.borderWidth-a.horizontalPadding,b=Math.max(a.horizontalPadding,e.left-t.width-a.borderWidth),k=new pu(x,r.height-e.top-a.borderHeight-a.verticalPadding),A=k.with(void 0,e.top+e.height-a.borderHeight-a.verticalPadding);return{top:s,left:b,fit:x-t.width,maxSizeTop:k,maxSizeBottom:A,minSize:o.with(Math.min(x,o.width))}}(),d=function(){const x=e.left,b=-a.borderWidth+e.top+e.height,k=new pu(e.width-a.borderHeight,r.height-e.top-e.height-a.verticalPadding);return{top:b,left:x,fit:k.height-t.height,maxSizeBottom:k,maxSizeTop:k,minSize:o.with(k.width)}}(),h=[l,c,d],E=(i=h.find(x=>x.fit>=0))!==null&&i!==void 0?i:h.sort((x,b)=>b.fit-x.fit)[0],m=e.top+e.height-a.borderHeight;let g,f=t.height;const p=Math.max(E.maxSizeTop.height,E.maxSizeBottom.height);f>p&&(f=p);let D;n?f<=E.maxSizeTop.height?(g=!0,D=E.maxSizeTop):(g=!1,D=E.maxSizeBottom):f<=E.maxSizeBottom.height?(g=!1,D=E.maxSizeBottom):(g=!0,D=E.maxSizeTop),this._applyTopLeft({left:E.left,top:g?E.top:m-f}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!g,E===l,g,E!==l),this._resizable.minSize=E.minSize,this._resizable.maxSize=D,this._resizable.layout(f,Math.min(D.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var Kh;(function(u){u[u.FILE=0]="FILE",u[u.FOLDER=1]="FOLDER",u[u.ROOT_FOLDER=2]="ROOT_FOLDER"})(Kh||(Kh={}));const Cpt=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function Q9(u,e,t,n){const i=n===Kh.ROOT_FOLDER?["rootfolder-icon"]:n===Kh.FOLDER?["folder-icon"]:["file-icon"];if(t){let r;if(t.scheme===Ot.data)r=$m.parseMetaData(t).get($m.META_DATA_LABEL);else{const a=t.path.match(Cpt);a?(r=X9(a[2].toLowerCase()),a[1]&&i.push(`${X9(a[1].toLowerCase())}-name-dir-icon`)):r=X9(t.authority.toLowerCase())}if(n===Kh.FOLDER)i.push(`${r}-name-folder-icon`);else{if(r){if(i.push(`${r}-name-file-icon`),i.push("name-file-icon"),r.length<=255){const o=r.split(".");for(let s=1;s=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},jH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},K4;function bye(u){return`suggest-aria-id:${u}`}const Fpt=hi("suggest-more-info",we.chevronRight,v("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ypt=new(K4=class{extract(e,t){if(e.textLabel.match(K4._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(K4._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const n=K4._regexRelaxed.exec(e.completion.documentation);if(n&&(n.index===0||n.index+n[0].length===e.completion.documentation.length))return t[0]=n[0],!0}return!1}},K4._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,K4._regexStrict=new RegExp(`^${K4._regexRelaxed.source}$`,"i"),K4);let Nq=class{constructor(e,t,n,i){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=i,this._onDidToggleDetails=new Q,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new pe,n=e;n.classList.add("show-file-icons");const i=me(e,ve(".icon")),r=me(i,ve("span.colorspan")),a=me(e,ve(".contents")),o=me(a,ve(".main")),s=me(o,ve(".icon-label.codicon")),l=me(o,ve("span.left")),c=me(o,ve("span.right")),d=new kw(l,{supportHighlights:!0,supportIcons:!0});t.add(d);const h=me(l,ve("span.signature-label")),E=me(l,ve("span.qualifier-label")),m=me(c,ve("span.details-label")),g=me(c,ve("span.readMore"+st.asCSSSelector(Fpt)));g.title=v("readMore","Read More");const f=()=>{const p=this._editor.getOptions(),D=p.get(50),x=D.getMassagedFontFamily(),b=D.fontFeatureSettings,k=p.get(118)||D.fontSize,A=p.get(119)||D.lineHeight,F=D.fontWeight,S=D.letterSpacing,w=`${k}px`,z=`${A}px`,N=`${S}px`;n.style.fontSize=w,n.style.fontWeight=F,n.style.letterSpacing=N,o.style.fontFamily=x,o.style.fontFeatureSettings=b,o.style.lineHeight=z,i.style.height=z,i.style.width=z,g.style.height=z,g.style.width=z};return f(),t.add(this._editor.onDidChangeConfiguration(p=>{(p.hasChanged(50)||p.hasChanged(118)||p.hasChanged(119))&&f()})),{root:n,left:l,right:c,icon:i,colorspan:r,iconLabel:d,iconContainer:s,parametersLabel:h,qualifierLabel:E,detailsLabel:m,readMore:g,disposables:t}}renderElement(e,t,n){const{completion:i}=e;n.root.id=bye(t),n.colorspan.style.backgroundColor="";const r={labelEscapeNewLines:!0,matches:vA(e.score)},a=[];if(i.kind===19&&ypt.extract(e,a))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=a[0];else if(i.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const o=Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:e.textLabel}),Kh.FILE),s=Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:i.detail}),Kh.FILE);r.extraClasses=o.length>s.length?o:s}else i.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",r.extraClasses=[Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:e.textLabel}),Kh.FOLDER),Q9(this._modelService,this._languageService,dt.from({scheme:"fake",path:i.detail}),Kh.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...st.asClassNameArray(rk.toIcon(i.kind))));i.tags&&i.tags.indexOf(1)>=0&&(r.extraClasses=(r.extraClasses||[]).concat(["deprecated"]),r.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,r),typeof i.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=HH(i.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=HH(i.label.detail||""),n.detailsLabel.textContent=HH(i.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?ns(n.detailsLabel):Ya(n.detailsLabel),wte(e)?(n.right.classList.add("can-expand-details"),ns(n.readMore),n.readMore.onmousedown=o=>{o.stopPropagation(),o.preventDefault()},n.readMore.onclick=o=>{o.stopPropagation(),o.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Ya(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};Nq=kpt([jH(1,_n),jH(2,vn),jH(3,sr)],Nq);function HH(u){return u.replace(/\r\n|\r|\n/g,"")}var Apt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},e_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_pt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},YD;q("editorSuggestWidget.background",{dark:ti,light:ti,hcDark:ti,hcLight:ti},v("editorSuggestWidgetBackground","Background color of the suggest widget."));q("editorSuggestWidget.border",{dark:r1,light:r1,hcDark:r1,hcLight:r1},v("editorSuggestWidgetBorder","Border color of the suggest widget."));const t_=q("editorSuggestWidget.foreground",{dark:ml,light:ml,hcDark:ml,hcLight:ml},v("editorSuggestWidgetForeground","Foreground color of the suggest widget."));q("editorSuggestWidget.selectedForeground",{dark:Of,light:Of,hcDark:Of,hcLight:Of},v("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget."));q("editorSuggestWidget.selectedIconForeground",{dark:E5,light:E5,hcDark:E5,hcLight:E5},v("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Spt=q("editorSuggestWidget.selectedBackground",{dark:jf,light:jf,hcDark:jf,hcLight:jf},v("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));q("editorSuggestWidget.highlightForeground",{dark:gl,light:gl,hcDark:gl,hcLight:gl},v("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));q("editorSuggestWidget.focusHighlightForeground",{dark:Q7,light:Q7,hcDark:Q7,hcLight:Q7},v("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));q("editorSuggestWidgetStatus.foreground",{dark:tt(t_,.5),light:tt(t_,.5),hcDark:tt(t_,.5),hcLight:tt(t_,.5)},v("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class Bpt{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Jm}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const n=JSON.parse(t);if(pu.is(n))return pu.lift(n)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let xF=YD=class{constructor(e,t,n,i,r){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Ir,this._pendingShowDetails=new Ir,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Vl,this._disposables=new pe,this._onDidSelect=new F3,this._onDidFocus=new F3,this._onDidHide=new Q,this._onDidShow=new Q,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new Q,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ote,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new wpt(this,e),this._persistedSize=new Bpt(t,e);class a{constructor(E,m,g=!1,f=!1){this.persistedSize=E,this.currentSize=m,this.persistHeight=g,this.persistWidth=f}}let o;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),o=new a(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var E,m,g,f;if(this._resize(h.dimension.width,h.dimension.height),o&&(o.persistHeight=o.persistHeight||!!h.north||!!h.south,o.persistWidth=o.persistWidth||!!h.east||!!h.west),!!h.done){if(o){const{itemHeight:p,defaultSize:D}=this.getLayoutInfo(),x=Math.round(p/2);let{width:b,height:k}=this.element.size;(!o.persistHeight||Math.abs(o.currentSize.height-k)<=x)&&(k=(m=(E=o.persistedSize)===null||E===void 0?void 0:E.height)!==null&&m!==void 0?m:D.height),(!o.persistWidth||Math.abs(o.currentSize.width-b)<=x)&&(b=(f=(g=o.persistedSize)===null||g===void 0?void 0:g.width)!==null&&f!==void 0?f:D.width),this._persistedSize.store(new pu(b,k))}this._contentWidget.unlockPreference(),o=void 0}})),this._messageElement=me(this.element.domNode,ve(".message")),this._listElement=me(this.element.domNode,ve(".tree"));const s=this._disposables.add(r.createInstance(Tq,this.editor));s.onDidClose(this.toggleDetails,this,this._disposables),this._details=new vpt(s,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);l();const c=r.createInstance(Nq,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Gl("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:h=>{let E=h.textLabel;if(typeof h.completion.label!="string"){const{detail:p,description:D}=h.completion.label;p&&D?E=v("label.full","{0} {1}, {2}",E,p,D):p?E=v("label.detail","{0} {1}",E,p):D&&(E=v("label.desc","{0}, {1}",E,D))}if(!h.isResolved||!this._isDetailsVisible())return E;const{documentation:m,detail:g}=h.completion,f=y3("{0}{1}",g||"",m?typeof m=="string"?m:m.value:"");return v("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",E,f)}}}),this._list.style(p6({listInactiveFocusBackground:Spt,listInactiveFocusOutline:En})),this._status=r.createInstance(Mq,this.element.domNode,dm);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);d(),this._disposables.add(i.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(i.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(117)&&(d(),l())})),this._ctxSuggestWidgetVisible=Pt.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=Pt.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=Pt.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=Pt.HasFocusedSuggestion.bindTo(n),this._disposables.add(xi(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=$c(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const n=e.elements[0],i=e.indexes[0];n!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=n,this._list.reveal(i),this._currentSuggestionDetails=Ui(r=>_pt(this,void 0,void 0,function*(){const a=Rm(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),o=r.onCancellationRequested(()=>a.dispose());try{return yield n.resolve(r)}finally{a.dispose(),o.dispose()}})),this._currentSuggestionDetails.then(()=>{i>=this._list.length||n!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[n]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:bye(i)}))}).catch(zt)),this._onDidFocus.fire({item:n,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Ya(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=YD.LOADING_MESSAGE,Ya(this._listElement,this._status.element),ns(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,jm(YD.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=YD.NO_SUGGESTIONS_MESSAGE,Ya(this._listElement,this._status.element),ns(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,jm(YD.NO_SUGGESTIONS_MESSAGE);break;case 3:Ya(this._messageElement),ns(this._listElement,this._status.element),this._show();break;case 4:Ya(this._messageElement),ns(this._listElement,this._status.element),this._show();break;case 5:Ya(this._messageElement),ns(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Rm(()=>this._setState(1),t)))}showSuggestions(e,t,n,i,r){var a,o;if(this._contentWidget.setPosition(this.editor.getPosition()),(a=this._loadingTimeout)===null||a===void 0||a.dispose(),(o=this._currentSuggestionDetails)===null||o===void 0||o.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}const s=this._completionModel.items.length,l=s===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),l){this._setState(i?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus(r?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=CB(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(wte(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=CB(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),n=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.heightl&&(s=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*a.typicalHalfwidthCharacterWidth:s,d=a.statusBarHeight+this._list.contentHeight+a.borderHeight,h=a.itemHeight+a.statusBarHeight,E=ji(this.editor.getDomNode()),m=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),g=E.top+m.top+m.height,f=Math.min(r.height-g-a.verticalPadding,d),p=E.top+m.top-a.verticalPadding,D=Math.min(p,d);let x=Math.min(Math.max(D,f)+a.borderHeight,d);o===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(o=this._cappedHeight.wanted),ox&&(o=x);const b=150;o>f||this._forceRenderingAbove&&p>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),x=D):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),x=f),this.element.preferredSize=new pu(c,a.defaultSize.height),this.element.maxSize=new pu(l,x),this.element.minSize=new pu(220,h),this._cappedHeight=o===d?{wanted:(i=(n=this._cappedHeight)===null||n===void 0?void 0:n.wanted)!==null&&i!==void 0?i:e.height,capped:o}:void 0}this._resize(s,o)}_resize(e,t){const{width:n,height:i}=this.element.maxSize;e=Math.min(n,e),t=Math.min(i,t);const{statusBarHeight:r}=this.getLayoutInfo();this._list.layout(t-r,e),this._listElement.style.height=`${t-r}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())===null||e===void 0?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(50),t=Qo(this.editor.getOption(119)||e.lineHeight,8,1e3),n=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:t,i=this._details.widget.borderWidth,r=2*i;return{itemHeight:t,statusBarHeight:n,borderWidth:i,borderHeight:r,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new pu(430,n+12*t+r)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};xF.LOADING_MESSAGE=v("suggestWidget.loading","Loading...");xF.NO_SUGGESTIONS_MESSAGE=v("suggestWidget.noSuggestions","No suggestions.");xF=YD=Apt([e_(1,Ul),e_(2,pt),e_(3,sr),e_(4,mt)],xF);class wpt{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:i}=this._widget.getLayoutInfo();return new pu(t+2*n+i,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Lpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Pq;class zpt{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),r=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:j.fromPositions(t,r),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let pl=Pq=class{static get(e){return e.getContribution(Pq.ID)}constructor(e,t,n,i,r,a,o){this._memoryService=t,this._commandService=n,this._contextKeyService=i,this._instantiationService=r,this._logService=a,this._telemetryService=o,this._lineSuffix=new Ir,this._toDispose=new pe,this._selectors=new Mpt(d=>d.priority),this._onWillInsertSuggestItem=new Q,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=r.createInstance(zq,this.editor),this._selectors.register({priority:0,select:(d,h,E)=>this._memoryService.select(d,h,E)});const s=Pt.InsertMode.bindTo(i);s.set(e.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>s.set(e.getOption(117).insertMode))),this.widget=this._toDispose.add(new VS(()=>{const d=this._instantiationService.createInstance(xF,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(f=>this._insertSuggestion(f,0),this));const h=new cpt(this.editor,d,this.model,f=>this._insertSuggestion(f,2));this._toDispose.add(h);const E=Pt.MakesTextEdit.bindTo(this._contextKeyService),m=Pt.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=Pt.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(ft(()=>{E.reset(),m.reset(),g.reset()})),this._toDispose.add(d.onDidFocus(({item:f})=>{const p=this.editor.getPosition(),D=f.editStart.column,x=p.column;let b=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!f.completion.additionalTextEdits&&!(f.completion.insertTextRules&4)&&x-D===f.completion.insertText.length&&(b=this.editor.getModel().getValueInRange({startLineNumber:p.lineNumber,startColumn:D,endLineNumber:p.lineNumber,endColumn:x})!==f.completion.insertText),E.set(b),m.set(!ee.equals(f.editInsertEnd,f.editReplaceEnd)),g.set(!!f.provider.resolveCompletionItem||!!f.completion.documentation||f.completion.detail!==f.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(f=>{if(f.toKeyCodeChord().equals(new c4(!0,!1,!1,!1,33))||iu&&f.toKeyCodeChord().equals(new c4(!1,!1,!1,!0,33))){f.stopPropagation();return}f.toKeyCodeChord().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new VS(()=>this._toDispose.add(new AR(this.editor,this.model)))),this._alternatives=this._toDispose.add(new VS(()=>this._toDispose.add(new Z3(this.editor,this._contextKeyService)))),this._toDispose.add(r.createInstance(DF,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new zpt(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(d.triggerOptions.shy)return;let h=-1;for(const m of this._selectors.itemsOrderedByPriorityDesc)if(h=m.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),h!==-1)break;h===-1&&(h=0);let E=!1;if(d.triggerOptions.auto){const m=this.editor.getOption(117);m.selectionMode==="never"||m.selectionMode==="always"?E=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?E=d.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(E=d.triggerOptions.triggerKind===1&&!d.triggerOptions.refilter)}this.widget.value.showSuggestions(d.completionModel,h,d.isFrozen,d.triggerOptions.auto,E)})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const l=Pt.AcceptSuggestionsOnEnter.bindTo(i),c=()=>{const d=this.editor.getOption(1);l.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const n=Or.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});const i=this.editor.getModel(),r=i.getAlternativeVersionId(),{item:a}=e,o=[],s=new vi;t&1||this.editor.pushUndoStop();const l=this.getOverwriteInfo(a,!!(t&8));this._memoryService.memorize(i,this.editor.getPosition(),a);const c=a.isResolved;let d=-1,h=-1;if(Array.isArray(a.completion.additionalTextEdits)){this.model.cancel();const m=td.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",a.completion.additionalTextEdits.map(g=>yn.replaceMove(j.lift(g.range),g.text))),m.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!c){const m=new va;let g;const f=i.onDidChangeContent(b=>{if(b.isFlush){s.cancel(),f.dispose();return}for(const k of b.changes){const A=j.getEndPosition(k.range);(!g||ee.isBefore(A,g))&&(g=A)}}),p=t;t|=2;let D=!1;const x=this.editor.onWillType(()=>{x.dispose(),D=!0,p&2||this.editor.pushUndoStop()});o.push(a.resolve(s.token).then(()=>{if(!a.completion.additionalTextEdits||s.token.isCancellationRequested)return;if(g&&a.completion.additionalTextEdits.some(k=>ee.isBefore(g,j.getStartPosition(k.range))))return!1;D&&this.editor.pushUndoStop();const b=td.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",a.completion.additionalTextEdits.map(k=>yn.replaceMove(j.lift(k.range),k.text))),b.restoreRelativeVerticalPositionOfCursor(this.editor),(D||!(p&2))&&this.editor.pushUndoStop(),!0}).then(b=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",m.elapsed(),b),h=b===!0?1:b===!1?0:-2}).finally(()=>{f.dispose(),x.dispose()}))}let{insertText:E}=a.completion;if(a.completion.insertTextRules&4||(E=Sv.escape(E)),this.model.cancel(),n.insert(E,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(a.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),a.completion.command)if(a.completion.command.id===jA.id)this.model.trigger({auto:!0,retrigger:!0});else{const m=new va;o.push(this._commandService.executeCommand(a.completion.command.id,...a.completion.command.arguments?[...a.completion.command.arguments]:[]).catch(g=>{a.completion.extensionId?Mi(g):zt(g)}).finally(()=>{d=m.elapsed()}))}t&4&&this._alternatives.value.set(e,m=>{for(s.cancel();i.canUndo();){r!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(m,3|(t&8?8:0));break}}),this._alertCompletionItem(a),Promise.all(o).finally(()=>{this._reportSuggestionAcceptedTelemetry(a,i,c,d,h),this.model.clear(),s.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,i,r){var a,o,s;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(o=(a=e.extensionId)===null||a===void 0?void 0:a.value)!==null&&o!==void 0?o:"unknown",providerId:(s=e.provider._debugDisplayName)!==null&&s!==void 0?s:"unknown",kind:e.completion.kind,basenameHash:M6e(O0(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:Qnt(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:i,additionalEditsAsync:r})}getOverwriteInfo(e,t){Ru(this.editor.hasModel());let n=this.editor.getOption(117).insertMode==="replace";t&&(n=!n);const i=e.position.column-e.editStart.column,r=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,a=this.editor.getPosition().column-e.position.column,o=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:i+a,overwriteAfter:r+o}}_alertCompletionItem(e){if(pa(e.completion.additionalTextEdits)){const t=v("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);ga(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},i=r=>{if(r.completion.insertTextRules&4||r.completion.additionalTextEdits)return!0;const a=this.editor.getPosition(),o=r.editStart.column,s=a.column;return s-o!==r.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:a.lineNumber,startColumn:o,endLineNumber:a.lineNumber,endColumn:s})!==r.completion.insertText};Ne.once(this.model.onDidTrigger)(r=>{const a=[];Ne.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Su(a),n()},void 0,a),this.model.onDidSuggest(({completionModel:o})=>{if(Su(a),o.items.length===0){n();return}const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),o.items),l=o.items[s];if(!i(l)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:l,model:o},7)},void 0,a)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const n=this.widget.value.getFocusedItem();let i=0;e&&(i|=4),t&&(i|=8),this._insertSuggestion(n,i)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};pl.ID="editor.contrib.suggestController";pl=Pq=Lpt([FD(1,yR),FD(2,ni),FD(3,pt),FD(4,mt),FD(5,r0),FD(6,i0)],pl);class Mpt{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class jA extends $e{constructor(){super({id:jA.id,label:v("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:Ee.and(W.writable,W.hasCompletionItemProvider,Pt.Visible.toNegated()),kbOpts:{kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){const i=pl.get(t);if(!i)return;let r;n&&typeof n=="object"&&n.auto===!0&&(r=!0),i.triggerSuggest(void 0,r,void 0)}}jA.id="editor.action.triggerSuggest";fu(pl.ID,pl,2);be(jA);const Qs=100+90,mo=xr.bindToContribution(pl.get);ze(new mo({id:"acceptSelectedSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion),handler(u){u.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:Ee.and(Pt.Visible,W.textInputFocus),weight:Qs},{primary:3,kbExpr:Ee.and(Pt.Visible,W.textInputFocus,Pt.AcceptSuggestionsOnEnter,Pt.MakesTextEdit),weight:Qs}],menuOpts:[{menuId:dm,title:v("accept.insert","Insert"),group:"left",order:1,when:Pt.HasInsertAndReplaceRange.toNegated()},{menuId:dm,title:v("accept.insert","Insert"),group:"left",order:1,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("insert"))},{menuId:dm,title:v("accept.replace","Replace"),group:"left",order:1,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("replace"))}]}));ze(new mo({id:"acceptAlternativeSelectedSuggestion",precondition:Ee.and(Pt.Visible,W.textInputFocus,Pt.HasFocusedSuggestion),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:1027,secondary:[1026]},handler(u){u.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:dm,group:"left",order:2,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("insert")),title:v("accept.replace","Replace")},{menuId:dm,group:"left",order:2,when:Ee.and(Pt.HasInsertAndReplaceRange,Pt.InsertMode.isEqualTo("replace")),title:v("accept.insert","Insert")}]}));ru.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");ze(new mo({id:"hideSuggestWidget",precondition:Pt.Visible,handler:u=>u.cancelSuggestWidget(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:9,secondary:[1033]}}));ze(new mo({id:"selectNextSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectNextSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));ze(new mo({id:"selectNextPageSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectNextPageSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:12,secondary:[2060]}}));ze(new mo({id:"selectLastSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectLastSuggestion()}));ze(new mo({id:"selectPrevSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectPrevSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));ze(new mo({id:"selectPrevPageSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectPrevPageSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:11,secondary:[2059]}}));ze(new mo({id:"selectFirstSuggestion",precondition:Ee.and(Pt.Visible,Ee.or(Pt.MultipleSuggestions,Pt.HasFocusedSuggestion.negate())),handler:u=>u.selectFirstSuggestion()}));ze(new mo({id:"focusSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion.negate()),handler:u=>u.focusSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));ze(new mo({id:"focusAndAcceptSuggestion",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion.negate()),handler:u=>{u.focusSuggestion(),u.acceptSelectedSuggestion(!0,!1)}}));ze(new mo({id:"toggleSuggestionDetails",precondition:Ee.and(Pt.Visible,Pt.HasFocusedSuggestion),handler:u=>u.toggleSuggestionDetails(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:dm,group:"right",order:1,when:Ee.and(Pt.DetailsVisible,Pt.CanResolve),title:v("detail.more","show less")},{menuId:dm,group:"right",order:1,when:Ee.and(Pt.DetailsVisible.toNegated(),Pt.CanResolve),title:v("detail.less","show more")}]}));ze(new mo({id:"toggleExplainMode",precondition:Pt.Visible,handler:u=>u.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));ze(new mo({id:"toggleSuggestionFocus",precondition:Pt.Visible,handler:u=>u.toggleSuggestionFocus(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:2570,mac:{primary:778}}}));ze(new mo({id:"insertBestCompletion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),DF.AtEnd,Pt.Visible.toNegated(),Z3.OtherSuggestions.toNegated(),Or.InSnippetMode.toNegated()),handler:(u,e)=>{u.triggerSuggestAndAcceptBest(eo(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:Qs,primary:2}}));ze(new mo({id:"insertNextSuggestion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),Z3.OtherSuggestions,Pt.Visible.toNegated(),Or.InSnippetMode.toNegated()),handler:u=>u.acceptNextSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:2}}));ze(new mo({id:"insertPrevSuggestion",precondition:Ee.and(W.textInputFocus,Ee.equals("config.editor.tabCompletion","on"),Z3.OtherSuggestions,Pt.Visible.toNegated(),Or.InSnippetMode.toNegated()),handler:u=>u.acceptPrevSuggestion(),kbOpts:{weight:Qs,kbExpr:W.textInputFocus,primary:1026}}));be(class extends $e{constructor(){super({id:"editor.action.resetSuggestSize",label:v("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(u,e){var t;(t=pl.get(e))===null||t===void 0||t.resetWidgetSize()}});class Tpt extends ne{get selectedItem(){return this._selectedItem}constructor(e,t,n,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=n,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=on(this,void 0),this._register(e.onKeyDown(a=>{a.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(a=>{a.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const r=pl.get(this.editor);if(r){this._register(r.registerSelector({priority:100,select:(s,l,c)=>{var d;Fn(p=>this.checkModelVersion(p));const h=this.editor.getModel();if(!h)return-1;const E=(d=this.suggestControllerPreselector())===null||d===void 0?void 0:d.removeCommonPrefix(h);if(!E)return-1;const m=ee.lift(l),g=c.map((p,D)=>{const b=C2.fromSuggestion(r,h,m,p,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(h),k=E.augments(b);return{index:D,valid:k,prefixLength:b.text.length,suggestItem:p}}).filter(p=>p&&p.valid&&p.prefixLength>0),f=P6e(g,A0(p=>p.prefixLength,Uh));return f?f.index:-1}}));let a=!1;const o=()=>{a||(a=!0,this._register(r.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(r.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(r.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(Ne.once(r.model.onDidTrigger)(s=>{o()})),this._register(r.onWillInsertSuggestItem(s=>{const l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;const d=C2.fromSuggestion(r,c,l,s.item,this.isShiftKeyPressed);this.onWillAccept(d)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!Npt(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,Fn(n=>{this.checkModelVersion(n),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,n)}))}getSuggestItemInfo(){const e=pl.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),i=this.editor.getModel();if(!(!t||!n||!i))return C2.fromSuggestion(e,i,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=pl.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=pl.get(this.editor);e==null||e.forceRenderingAbove()}}class C2{static fromSuggestion(e,t,n,i,r){let{insertText:a}=i.completion,o=!1;if(i.completion.insertTextRules&4){const l=new Sv().parse(a);l.children.length<100&&tL.adjustWhitespace(t,n,!0,l),a=l.toString(),o=!0}const s=e.getOverwriteInfo(i,r);return new C2(j.fromPositions(n.delta(0,-s.overwriteBefore),n.delta(0,Math.max(s.overwriteAfter,0))),a,i.completion.kind,o)}constructor(e,t,n,i){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=i}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new Lve(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Bv(this.range,this.insertText)}}function Npt(u,e){return u===e?!0:!u||!e?!1:u.equals(e)}var Ppt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},W4=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Rq;let Xs=Rq=class extends ne{static get(e){return e.getContribution(Rq.ID)}constructor(e,t,n,i,r,a,o,s,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=n,this.configurationService=i,this.commandService=r,this.debounceService=a,this.languageFeaturesService=o,this.audioCueService=s,this._keybindingService=l,this.model=_w("inlineCompletionModel",void 0),this.textModelVersionId=on(this,-1),this.cursorPosition=on(this,new ee(1,1)),this.suggestWidgetAdaptor=this._register(new Tpt(this.editor,()=>{var h,E;return(E=(h=this.model.get())===null||h===void 0?void 0:h.selectedInlineCompletion.get())===null||E===void 0?void 0:E.toSingleTextEdit(void 0)},h=>this.updateObservables(h,Bs.Other),h=>{Fn(E=>{var m;this.updateObservables(E,Bs.Other),(m=this.model.get())===null||m===void 0||m.handleSuggestAccepted(h)})})),this._enabled=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(_q,this.editor,{ghostText:this.model.map((h,E)=>h==null?void 0:h.ghostText.read(E)),minReservedLineCount:Sw(0),targetTextModel:this.model.map(h=>h==null?void 0:h.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new pr(this.contextKeyService,this.model)),this._register(Ne.runAndSubscribe(e.onDidChangeModel,()=>Fn(h=>{this.model.set(void 0,h),this.updateObservables(h,Bs.Other);const E=e.getModel();if(E){const m=t.createInstance(Bq,E,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,zr(e.onDidChangeConfiguration,()=>e.getOption(117).preview),zr(e.onDidChangeConfiguration,()=>e.getOption(117).previewMode),zr(e.onDidChangeConfiguration,()=>e.getOption(62).mode),this._enabled);this.model.set(m,h)}})));const c=h=>{var E;return h.isUndoing?Bs.Undo:h.isRedoing?Bs.Redo:!((E=this.model.get())===null||E===void 0)&&E.isAcceptingPartially?Bs.AcceptWord:Bs.Other};this._register(e.onDidChangeModelContent(h=>Fn(E=>this.updateObservables(E,c(h))))),this._register(e.onDidChangeCursorPosition(h=>Fn(E=>{var m;this.updateObservables(E,Bs.Other),(h.reason===3||h.source==="api")&&((m=this.model.get())===null||m===void 0||m.stop(E))}))),this._register(e.onDidType(()=>Fn(h=>{var E;this.updateObservables(h,Bs.Other),this._enabled.get()&&((E=this.model.get())===null||E===void 0||E.trigger(h))}))),this._register(this.commandService.onDidExecuteCommand(h=>{new Set([dx.Tab.id,dx.DeleteLeft.id,dx.DeleteRight.id,TFe,"acceptSelectedSuggestion"]).has(h.commandId)&&e.hasTextFocus()&&this._enabled.get()&&Fn(m=>{var g;(g=this.model.get())===null||g===void 0||g.trigger(m)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||Xm.dropDownVisible||Fn(h=>{var E;(E=this.model.get())===null||E===void 0||E.stop(h)})})),this._register(Xu(h=>{var E;const m=(E=this.model.read(h))===null||E===void 0?void 0:E.state.read(h);m!=null&&m.suggestItem?m.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register(ft(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let d;this._register(Xu(h=>{const E=this.model.read(h),m=E==null?void 0:E.state.read(h);if(!E||!m||!m.inlineCompletion){d=void 0;return}if(m.inlineCompletion.semanticId!==d){d=m.inlineCompletion.semanticId;const g=E.textModel.getLineContent(m.ghostText.lineNumber);this.audioCueService.playAudioCue(hu.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(m.ghostText.renderForScreenReader(g))})}})),this._register(new iq(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(h=>{h.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(e){const t=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let i;!t&&n&&this.editor.getOption(147)&&(i=v("showAccessibleViewHint","Inspect this in the accessible view ({0})",n.getAriaLabel())),ga(i?e+", "+i:e)}updateObservables(e,t){var n,i;const r=this.editor.getModel();this.textModelVersionId.set((n=r==null?void 0:r.getVersionId())!==null&&n!==void 0?n:-1,e,t),this.cursorPosition.set((i=this.editor.getPosition())!==null&&i!==void 0?i:new ee(1,1),e)}shouldShowHoverAt(e){var t;const n=(t=this.model.get())===null||t===void 0?void 0:t.ghostText.get();return n?n.parts.some(i=>e.containsPosition(new ee(n.lineNumber,i.column))):!1}shouldShowHoverAtViewZone(e){return this.ghostTextWidget.ownsViewZone(e)}};Xs.ID="editor.contrib.inlineCompletionsController";Xs=Rq=Ppt([W4(1,mt),W4(2,pt),W4(3,tu),W4(4,ni),W4(5,q0),W4(6,We),W4(7,_A),W4(8,qu)],Xs);var vg=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class _R extends $e{constructor(){super({id:_R.ID,label:v("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.next()})}}_R.ID=PFe;class SR extends $e{constructor(){super({id:SR.ID,label:v("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.previous()})}}SR.ID=NFe;class Rpt extends $e{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:W.writable})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);(n=i==null?void 0:i.model.get())===null||n===void 0||n.triggerExplicitly()})}}class Ipt extends $e{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:Ee.and(W.writable,pr.inlineSuggestionVisible)},menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("acceptWord","Accept Word"),group:"primary",order:2}]})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);yield(n=i==null?void 0:i.model.get())===null||n===void 0?void 0:n.acceptNextWord(i.editor)})}}class Opt extends $e{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Ee.and(W.writable,pr.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("acceptLine","Accept Line"),group:"secondary",order:2}]})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);yield(n=i==null?void 0:i.model.get())===null||n===void 0?void 0:n.acceptNextLine(i.editor)})}}class jpt extends $e{constructor(){super({id:TFe,label:v("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:pr.inlineSuggestionVisible,menuOpts:[{menuId:K.InlineSuggestionToolbar,title:v("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Ee.and(pr.inlineSuggestionVisible,W.tabMovesFocus.toNegated(),pr.inlineSuggestionHasIndentationLessThanTabSize,Pt.Visible.toNegated(),W.hoverFocused.toNegated())}})}run(e,t){var n;return vg(this,void 0,void 0,function*(){const i=Xs.get(t);i&&((n=i.model.get())===null||n===void 0||n.accept(i.editor),i.editor.focus())})}}class BR extends $e{constructor(){super({id:BR.ID,label:v("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:pr.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(e,t){return vg(this,void 0,void 0,function*(){const n=Xs.get(t);Fn(i=>{var r;(r=n==null?void 0:n.model.get())===null||r===void 0||r.stop(i)})})}}BR.ID="editor.action.inlineSuggest.hide";class wR extends n0{constructor(){super({id:wR.ID,title:v("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:K.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Ee.equals("config.editor.inlineSuggest.showToolbar","always")})}run(e,t){return vg(this,void 0,void 0,function*(){const n=e.get(tu),r=n.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";n.updateValue("editor.inlineSuggest.showToolbar",r)})}}wR.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var Hpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},BC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Vpt{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iq=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageService=t,this._openerService=n,this.accessibilityService=i,this._instantiationService=r,this._telemetryService=a,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Xs.get(this._editor);if(!t)return null;const n=e.target;if(n.type===8){const i=n.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new g8(1e3,this,j.fromPositions(this._editor.getModel().validatePosition(i.positionBefore||i.position)),e.event.posx,e.event.posy,!1)}return n.type===7&&t.shouldShowHoverAt(n.range)?new g8(1e3,this,n.range,e.event.posx,e.event.posy,!1):n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range)?new g8(1e3,this,n.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if(this._editor.getOption(62).showToolbar==="always")return[];const n=Xs.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new Vpt(this,e.range,n)]:[]}renderHoverParts(e,t){const n=new pe,i=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,i,n);const r=i.controller.model.get(),a=this._instantiationService.createInstance(Xm,this._editor,!1,Sw(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(o=>{var s;return(s=o==null?void 0:o.inlineCompletion.source.inlineCompletions.commands)!==null&&s!==void 0?s:[]}));return e.fragment.appendChild(a.getDomNode()),r.triggerExplicitly(),n.add(a),n}renderScreenReaderText(e,t,n){const i=ve,r=i("div.hover-row.markdown-hover"),a=me(r,i("div.hover-contents",{"aria-live":"assertive"})),o=n.add(new h4({editor:this._editor},this._languageService,this._openerService)),s=l=>{n.add(o.onDidRenderAsync(()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()}));const c=v("inlineSuggestionFollows","Suggestion:"),d=n.add(o.render(new Zr().appendText(c).appendCodeblock("text",l)));a.replaceChildren(d.element)};n.add(Xu(l=>{var c;const d=(c=t.controller.model.read(l))===null||c===void 0?void 0:c.ghostText.read(l);if(d){const h=this._editor.getModel().getLineContent(d.lineNumber);s(d.renderForScreenReader(h))}else Pr(a)})),e.fragment.appendChild(r)}};Iq=Hpt([BC(1,vn),BC(2,Cs),BC(3,k4),BC(4,mt),BC(5,i0)],Iq);fu(Xs.ID,Xs,3);be(Rpt);be(_R);be(SR);be(Ipt);be(Opt);be(jpt);be(BR);gn(wR);$p.register(Iq);function Jo(u,e){let t=0;for(let n=0;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kpt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};function kye(u,e,t,n,i){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return[];const r=e.getLanguageConfiguration(u.getLanguageId()).indentationRules;if(!r)return[];for(n=Math.min(n,u.getLineCount());t<=n&&r.unIndentedLinePattern;){const f=u.getLineContent(t);if(!r.unIndentedLinePattern.test(f))break;t++}if(t>n-1)return[];const{tabSize:a,indentSize:o,insertSpaces:s}=u.getOptions(),l=(f,p)=>(p=p||1,D0.shiftIndent(f,f.length+p,a,o,s)),c=(f,p)=>(p=p||1,D0.unshiftIndent(f,f.length+p,a,o,s)),d=[];let h;const E=u.getLineContent(t);let m=E;if(i!=null){h=i;const f=Wu(E);m=h+E.substring(f.length),r.decreaseIndentPattern&&r.decreaseIndentPattern.test(m)&&(h=c(h),m=h+E.substring(f.length)),E!==m&&d.push(yn.replaceMove(new Ye(t,1,t,f.length+1),IB(h,o,s)))}else h=Wu(E);let g=h;r.increaseIndentPattern&&r.increaseIndentPattern.test(m)?(g=l(g),h=l(h)):r.indentNextLinePattern&&r.indentNextLinePattern.test(m)&&(g=l(g)),t++;for(let f=t;f<=n;f++){const p=u.getLineContent(f),D=Wu(p),x=g+p.substring(D.length);r.decreaseIndentPattern&&r.decreaseIndentPattern.test(x)&&(g=c(g),h=c(h)),D!==g&&d.push(yn.replaceMove(new Ye(f,1,f,D.length+1),IB(g,o,s))),!(r.unIndentedLinePattern&&r.unIndentedLinePattern.test(p))&&(r.increaseIndentPattern&&r.increaseIndentPattern.test(x)?(h=l(h),g=h):r.indentNextLinePattern&&r.indentNextLinePattern.test(x)?g=l(g):g=h)}return d}class LR extends $e{constructor(){super({id:LR.ID,label:v("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:W.writable})}run(e,t){const n=t.getModel();if(!n)return;const i=n.getOptions(),r=t.getSelection();if(!r)return;const a=new qpt(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}LR.ID="editor.action.indentationToSpaces";class zR extends $e{constructor(){super({id:zR.ID,label:v("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:W.writable})}run(e,t){const n=t.getModel();if(!n)return;const i=n.getOptions(),r=t.getSelection();if(!r)return;const a=new Jpt(r,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}zR.ID="editor.action.indentationToTabs";class Lte extends $e{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const n=e.get(md),i=e.get(_n),r=t.getModel();if(!r)return;const a=i.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget),o=r.getOptions(),s=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===a.tabSize&&c===o.tabSize?v("configuredTabSize","Configured Tab Size"):c===a.tabSize?v("defaultTabSize","Default Tab Size"):c===o.tabSize?v("currentTabSize","Current Tab Size"):void 0})),l=Math.min(r.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(s,{placeHolder:v({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[l]}).then(c=>{if(c&&r&&!r.isDisposed()){const d=parseInt(c.label,10);this.displaySizeOnly?r.updateOptions({tabSize:d}):r.updateOptions({tabSize:d,indentSize:d,insertSpaces:this.insertSpaces})}})},50)}}class MR extends Lte{constructor(){super(!1,!1,{id:MR.ID,label:v("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}MR.ID="editor.action.indentUsingTabs";class TR extends Lte{constructor(){super(!0,!1,{id:TR.ID,label:v("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}TR.ID="editor.action.indentUsingSpaces";class NR extends Lte{constructor(){super(!0,!0,{id:NR.ID,label:v("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0})}}NR.ID="editor.action.changeTabDisplaySize";class PR extends $e{constructor(){super({id:PR.ID,label:v("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const n=e.get(_n),i=t.getModel();if(!i)return;const r=n.getCreationOptions(i.getLanguageId(),i.uri,i.isForSimpleWidget);i.detectIndentation(r.insertSpaces,r.tabSize)}}PR.ID="editor.action.detectIndentation";class Wpt extends $e{constructor(){super({id:"editor.action.reindentlines",label:v("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:W.writable})}run(e,t){const n=e.get(tn),i=t.getModel();if(!i)return;const r=kye(i,n,1,i.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class Gpt extends $e{constructor(){super({id:"editor.action.reindentselectedlines",label:v("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:W.writable})}run(e,t){const n=e.get(tn),i=t.getModel();if(!i)return;const r=t.getSelections();if(r===null)return;const a=[];for(const o of r){let s=o.startLineNumber,l=o.endLineNumber;if(s!==l&&o.endColumn===1&&l--,s===1){if(s===l)continue}else s--;const c=kye(i,n,s,l);a.push(...c)}a.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,a),t.pushUndoStop())}}class Upt{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(const i of this._edits)t.addEditOperation(j.lift(i.range),i.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let vF=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new pe,this.callOnModel=new pe,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const n=this.editor.getModel();if(!n||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const i=this.editor.getOption(12),{tabSize:r,indentSize:a,insertSpaces:o}=n.getOptions(),s=[],l={shiftIndent:E=>D0.shiftIndent(E,E.length+1,r,a,o),unshiftIndent:E=>D0.unshiftIndent(E,E.length+1,r,a,o)};let c=e.startLineNumber;for(;c<=e.endLineNumber;){if(this.shouldIgnoreLine(n,c)){c++;continue}break}if(c>e.endLineNumber)return;let d=n.getLineContent(c);if(!/\S/.test(d.substring(0,e.startColumn-1))){const E=e2(i,n,n.getLanguageId(),c,l,this._languageConfigurationService);if(E!==null){const m=Wu(d),g=Jo(E,r),f=Jo(m,r);if(g!==f){const p=b2(g,r,o);s.push({range:new j(c,1,c,m.length+1),text:p}),d=p+d.substr(m.length)}else{const p=FCe(n,c,this._languageConfigurationService);if(p===0||p===8)return}}}const h=c;for(;cn.tokenization.getLineTokens(g),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(g,f)=>n.getLanguageIdAtPosition(g,f)},getLineContent:g=>g===h?d:n.getLineContent(g)},n.getLanguageId(),c+1,l,this._languageConfigurationService);if(m!==null){const g=Jo(m,r),f=Jo(Wu(n.getLineContent(c+1)),r);if(g!==f){const p=g-f;for(let D=c+1;D<=e.endLineNumber;D++){const x=n.getLineContent(D),b=Wu(x),A=Jo(b,r)+p,F=b2(A,r,o);F!==b&&s.push({range:new j(D,1,D,b.length+1),text:F})}}}}if(s.length>0){this.editor.pushUndoStop();const E=new Upt(s,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",E),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const n=e.getLineFirstNonWhitespaceColumn(t);if(n===0)return!0;const i=e.tokenization.getLineTokens(t);if(i.getCount()>0){const r=i.findTokenIndexAtOffset(n);if(r>=0&&i.getStandardTokenType(r)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};vF.ID="editor.contrib.autoIndentOnPaste";vF=$pt([Kpt(1,tn)],vF);function Fye(u,e,t,n){if(u.getLineCount()===1&&u.getLineMaxColumn(1)===1)return;let i="";for(let a=0;athis._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(e){var t,n;return uL(this,void 0,void 0,function*(){try{const i=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t=i==null?void 0:i.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(n=i==null?void 0:i.label)!==null&&n!==void 0?n:this.hint.label,this._isResolved=!0}catch(i){Mi(i),this._isResolved=!1}})}}class CF{static create(e,t,n,i){return uL(this,void 0,void 0,function*(){const r=[],a=e.ordered(t).reverse().map(o=>n.map(s=>uL(this,void 0,void 0,function*(){try{const l=yield o.provideInlayHints(t,s,i);l!=null&&l.hints.length&&r.push([l,o])}catch(l){Mi(l)}})));if(yield Promise.all(a.flat()),i.isCancellationRequested||t.isDisposed())throw new hg;return new CF(n,r,t)})}constructor(e,t,n){this._disposables=new pe,this.ranges=e,this.provider=new Set;const i=[];for(const[r,a]of t){this._disposables.add(r),this.provider.add(a);for(const o of r.hints){const s=n.validatePosition(o.position);let l="before";const c=CF._getRangeAtPosition(n,s);let d;c.getStartPosition().isBefore(s)?(d=j.fromPositions(c.getStartPosition(),s),l="after"):(d=j.fromPositions(s,c.getEndPosition()),l="before"),i.push(new zte(o,new yye(d,l),a))}}this.items=i.sort((r,a)=>ee.compare(r.hint.position,a.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const n=t.lineNumber,i=e.getWordAtPosition(t);if(i)return new j(n,i.startColumn,n,i.endColumn);e.tokenization.tokenizeIfCheap(n);const r=e.tokenization.getLineTokens(n),a=t.column-1,o=r.findTokenIndexAtOffset(a);let s=r.getStartOffset(o),l=r.getEndOffset(o);return l-s===1&&(s===a&&o>1?(s=r.getStartOffset(o-1),l=r.getEndOffset(o-1)):l===a&&os5(m)?m.command.id:mR()));for(const m of Ba.all())h.has(m.desc.id)&&d.push(new ro(m.desc.id,zl.label(m.desc,{renderShortTitle:!0}),void 0,!0,()=>k2(this,void 0,void 0,function*(){const g=yield r.createModelReference(c.uri);try{const f=new bv(g.object.textEditorModel,j.getStartPosition(c.range)),p=n.item.anchor.range;yield s.invokeFunction(m.runEditorCommand.bind(m),e,f,p)}finally{g.dispose()}})));if(n.part.command){const{command:m}=n.part;d.push(new Dr),d.push(new ro(m.id,m.title,void 0,!0,()=>k2(this,void 0,void 0,function*(){var g;try{yield o.executeCommand(m.id,...(g=m.arguments)!==null&&g!==void 0?g:[])}catch(f){l.notify({severity:bP.Error,source:n.item.provider.displayName,message:f})}})))}const E=e.getOption(126);a.showContextMenu({domForShadowRoot:E&&(i=e.getDomNode())!==null&&i!==void 0?i:void 0,getAnchor:()=>{const m=ji(t);return{x:m.left,y:m.top+m.height+8}},getActions:()=>d,onHide:()=>{e.focus()},autoSelectFirstItem:!0})})}function Aye(u,e,t,n){return k2(this,void 0,void 0,function*(){const r=yield u.get(Vo).createModelReference(n.uri);yield t.invokeWithinContext(a=>k2(this,void 0,void 0,function*(){const o=e.hasSideBySideModifier,s=a.get(pt),l=Ro.inPeekEditor.getValue(s),c=!o&&t.getOption(87)&&!l;return new IA({openToSide:o,openInPeek:c,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(a,new bv(r.object.textEditorModel,j.getStartPosition(n.range)),j.lift(n.range))})),r.dispose()})}var Qpt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},QD=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},x8;class nL{constructor(){this._entries=new gg(50)}get(e){const t=nL._key(e);return this._entries.get(t)}set(e,t){const n=nL._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const _ye=Ut("IInlayHintsCache");au(_ye,nL,1);class Oq{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class Xpt{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let Y3=x8=class{static get(e){var t;return(t=e.getContribution(x8.ID))!==null&&t!==void 0?t:void 0}constructor(e,t,n,i,r,a,o){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=i,this._commandService=r,this._notificationService=a,this._instaService=o,this._disposables=new pe,this._sessionDisposables=new pe,this._decorationsMetadata=new Map,this._ruleFactory=new cA(this._editor),this._activeRenderMode=0,this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(s=>{s.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(139);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;const n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(ft(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let i;const r=new Set,a=new Hu(()=>QD(this,void 0,void 0,function*(){const o=Date.now();i==null||i.dispose(!0),i=new vi;const s=t.onWillDispose(()=>i==null?void 0:i.cancel());try{const l=i.token,c=yield CF.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),l);if(a.delay=this._debounceInfo.update(t,Date.now()-o),l.isCancellationRequested){c.dispose();return}for(const d of c.provider)typeof d.onDidChangeInlayHints=="function"&&!r.has(d)&&(r.add(d),this._sessionDisposables.add(d.onDidChangeInlayHints(()=>{a.isScheduled()||a.schedule()})));this._sessionDisposables.add(c),this._updateHintsDecorators(c.ranges,c.items),this._cacheHintsForFastRestore(t)}catch(l){zt(l)}finally{i.dispose(),s.dispose()}}),this._debounceInfo.get(t));if(this._sessionDisposables.add(a),this._sessionDisposables.add(ft(()=>i==null?void 0:i.dispose(!0))),a.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(o=>{(o.scrollTopChanged||!a.isScheduled())&&a.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(o=>{const s=Math.max(a.delay,1250);a.schedule(s)})),e.enabled==="on")this._activeRenderMode=0;else{let o,s;e.enabled==="onUnlessPressed"?(o=0,s=1):(o=1,s=0),this._activeRenderMode=o,this._sessionDisposables.add(Nh.getInstance().event(l=>{if(!this._editor.hasModel())return;const c=l.altKey&&l.ctrlKey&&!(l.shiftKey||l.metaKey)?s:o;if(c!==this._activeRenderMode){this._activeRenderMode=c;const d=this._editor.getModel(),h=this._copyInlayHintsWithCurrentAnchor(d);this._updateHintsDecorators([d.getFullModelRange()],h),a.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>a.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new pe,t=e.add(new rR(this._editor)),n=new pe;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(i=>{const[r]=i,a=this._getInlayHintLabelPart(r),o=this._editor.getModel();if(!a||!o){n.clear();return}const s=new vi;n.add(ft(()=>s.dispose(!0))),a.item.resolve(s.token),this._activeInlayHintPart=a.part.command||a.part.location?new Xpt(a,r.hasTriggerModifier):void 0;const l=o.validatePosition(a.item.hint.position).lineNumber,c=new j(l,1,l,o.getLineMaxColumn(l)),d=this._getInlineHintsForRange(c);this._updateHintsDecorators([c],d),n.add(ft(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([c],d)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(i=>QD(this,void 0,void 0,function*(){const r=this._getInlayHintLabelPart(i);if(r){const a=r.part;a.location?this._instaService.invokeFunction(Aye,i,this._editor,a.location):pK.is(a.command)&&(yield this._invokeCommand(a.command,r.item))}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(t=>QD(this,void 0,void 0,function*(){if(t.event.detail!==2)return;const n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),yield n.item.resolve(Kt.None),pa(n.item.hint.textEdits))){const i=n.item.hint.textEdits.map(r=>yn.replace(j.lift(r.range),r.text));this._editor.executeEdits("inlayHint.default",i),e()}}))}_installContextMenu(){return this._editor.onContextMenu(e=>QD(this,void 0,void 0,function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(Ypt,this._editor,e.event.target,t))}))}_getInlayHintLabelPart(e){var t;if(e.target.type!==6)return;const n=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;if(n instanceof Wm&&(n==null?void 0:n.attachedData)instanceof Oq)return n.attachedData}_invokeCommand(e,t){var n;return QD(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(e.id,...(n=e.arguments)!==null&&n!==void 0?n:[])}catch(i){this._notificationService.notify({severity:bP.Error,source:t.provider.displayName,message:i})}})}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[n,i]of this._decorationsMetadata){if(t.has(i.item))continue;const r=e.getDecorationRange(n);if(r){const a=new yye(r,i.item.anchor.direction),o=i.item.with({anchor:a});t.set(i.item,o)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const r of n.sort(j.compareRangesUsingStarts)){const a=t.validateRange(new j(r.startLineNumber-30,r.startColumn,r.endLineNumber+30,r.endColumn));i.length===0||!j.areIntersectingOrTouching(i[i.length-1],a)?i.push(a):i[i.length-1]=j.plusRange(i[i.length-1],a)}return i}_updateHintsDecorators(e,t){var n,i;const r=[],a=(g,f,p,D,x)=>{const b={content:p,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:f.className,cursorStops:D,attachedData:x};r.push({item:g,classNameRef:f,decoration:{range:g.anchor.range,options:{description:"InlayHint",showIfCollapsed:g.anchor.range.isEmpty(),collapseOnReplaceEdit:!g.anchor.range.isEmpty(),stickiness:0,[g.anchor.direction]:this._activeRenderMode===0?b:void 0}}})},o=(g,f)=>{const p=this._ruleFactory.createClassNameRef({width:`${s/3|0}px`,display:"inline-block"});a(g,p," ",f?zc.Right:zc.None)},{fontSize:s,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,l);for(const g of t){g.hint.paddingLeft&&o(g,!1);const f=typeof g.hint.label=="string"?[{label:g.hint.label}]:g.hint.label;for(let p=0;px8._MAX_DECORATORS)break}const E=[];for(const g of e)for(const{id:f}of(i=this._editor.getDecorationsInRange(g))!==null&&i!==void 0?i:[]){const p=this._decorationsMetadata.get(f);p&&(E.push(f),p.classNameRef.dispose(),this._decorationsMetadata.delete(f))}const m=td.capture(this._editor);this._editor.changeDecorations(g=>{const f=g.deltaDecorations(E,r.map(p=>p.decoration));for(let p=0;pn)&&(r=n);const a=e.fontFamily||i;return{fontSize:r,fontFamily:a,padding:t,isUniform:!t&&a===i&&r===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Y3.ID="editor.contrib.InlayHints";Y3._MAX_DECORATORS=1500;Y3=x8=Qpt([yD(1,We),yD(2,q0),yD(3,_ye),yD(4,ni),yD(5,bi),yD(6,mt)],Y3);function eDt(u){const e=" ";return u.replace(/[ \t]/g,e)}ru.registerCommand("_executeInlayHintProvider",(u,...e)=>QD(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(dt.isUri(t)),Ru(j.isIRange(n));const{inlayHintsProvider:i}=u.get(We),r=yield u.get(Vo).createModelReference(t);try{const a=yield CF.create(i,r.object.textEditorModel,[j.lift(n)],Kt.None),o=a.items.map(s=>s.hint);return setTimeout(()=>a.dispose(),0),o}finally{r.dispose()}}));var tDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_ce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},uDt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};class Sce extends g8{constructor(e,t,n,i){super(10,t,e.item.anchor.range,n,i,!0),this.part=e}}let jq=class extends $w{constructor(e,t,n,i,r,a){super(e,t,n,i,a),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Y3.get(this._editor)||e.target.type!==6)return null;const i=(t=e.target.detail.injectedText)===null||t===void 0?void 0:t.options;return i instanceof Wm&&i.attachedData instanceof Oq?new Sce(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n){return e instanceof Sce?new _i(i=>_ce(this,void 0,void 0,function*(){var r,a,o,s;const{part:l}=e;if(yield l.item.resolve(n),n.isCancellationRequested)return;let c;typeof l.item.hint.tooltip=="string"?c=new Zr().appendText(l.item.hint.tooltip):l.item.hint.tooltip&&(c=l.item.hint.tooltip),c&&i.emitOne(new Sc(this,e.range,[c],!1,0)),pa(l.item.hint.textEdits)&&i.emitOne(new Sc(this,e.range,[new Zr().appendText(v("hint.dbl","Double-click to insert"))],!1,10001));let d;if(typeof l.part.tooltip=="string"?d=new Zr().appendText(l.part.tooltip):l.part.tooltip&&(d=l.part.tooltip),d&&i.emitOne(new Sc(this,e.range,[d],!1,1)),l.part.location||l.part.command){let f;const D=this._editor.getOption(77)==="altKey"?iu?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):iu?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");l.part.location&&l.part.command?f=new Zr().appendText(v("hint.defAndCommand","Go to Definition ({0}), right click for more",D)):l.part.location?f=new Zr().appendText(v("hint.def","Go to Definition ({0})",D)):l.part.command&&(f=new Zr(`[${v("hint.cmd","Execute Command")}](${Zpt(l.part.command)} "${l.part.command.title}") (${D})`,{isTrusted:!0})),f&&i.emitOne(new Sc(this,e.range,[f],!1,1e4))}const h=yield this._resolveInlayHintLabelPartHover(l,n);try{for(var E=!0,m=uDt(h),g;g=yield m.next(),r=g.done,!r;E=!0){s=g.value,E=!1;const f=s;i.emitOne(f)}}catch(f){a={error:f}}finally{try{!E&&!r&&(o=m.return)&&(yield o.call(m))}finally{if(a)throw a.error}}})):_i.EMPTY}_resolveInlayHintLabelPartHover(e,t){return _ce(this,void 0,void 0,function*(){if(!e.part.location)return _i.EMPTY;const{uri:n,range:i}=e.part.location,r=yield this._resolverService.createModelReference(n);try{const a=r.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(a)?lte(this._languageFeaturesService.hoverProvider,a,new ee(i.startLineNumber,i.startColumn),t).filter(o=>!Ev(o.hover.contents)).map(o=>new Sc(this,e.item.anchor.range,o.hover.contents,!1,2+o.ordinal)):_i.EMPTY}finally{r.dispose()}})}};jq=tDt([wC(1,vn),wC(2,Cs),wC(3,tu),wC(4,Vo),wC(5,We)],jq);fu(Y3.ID,Y3,1);$p.register(jq);class nDt{constructor(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new Ye(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new Ye(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var iDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},rDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},v8;let tg=v8=class{static get(e){return e.getContribution(v8.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var n;(n=this.currentRequest)===null||n===void 0||n.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let a=i;if(a.startLineNumber!==a.endLineNumber)return;const o=new Z2e(this.editor,5),s=r.uri;return this.editorWorkerService.canNavigateValueSet(s)?(this.currentRequest=Ui(l=>this.editorWorkerService.navigateValueSet(s,a,t)),this.currentRequest.then(l=>{var c;if(!l||!l.range||!l.value||!o.validate(this.editor))return;const d=j.lift(l.range);let h=l.range;const E=l.value.length-(a.endColumn-a.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+l.value.length},E>1&&(a=new Ye(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+E-1));const m=new nDt(d,a,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,m),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:v8.DECORATION}]),(c=this.decorationRemover)===null||c===void 0||c.cancel(),this.decorationRemover=Pm(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(zt)}).catch(zt)):Promise.resolve(void 0)}};tg.ID="editor.contrib.inPlaceReplaceController";tg.DECORATION=Lt.register({description:"in-place-replace",className:"valueSetReplacement"});tg=v8=iDt([rDt(1,ql)],tg);class aDt extends $e{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3159,weight:100}})}run(e,t){const n=tg.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}class oDt extends $e{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3161,weight:100}})}run(e,t){const n=tg.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}fu(tg.ID,tg,4);be(aDt);be(oDt);class sDt extends $e{constructor(){super({id:"expandLineSelection",label:v("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:W.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;const i=t._getViewModel();i.model.pushStackElement(),i.setCursorStates(n.source,3,br.expandLineSelection(i,i.getCursorStates())),i.revealPrimaryCursor(n.source,!0)}}be(sDt);class lDt{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const n=cDt(e,this._cursors);for(let i=0,r=n.length;ia.lineNumber===o.lineNumber?a.column-o.column:a.lineNumber-o.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);const t=[];let n=0,i=0;const r=e.length;for(let a=1,o=u.getLineCount();a<=o;a++){const s=u.getLineContent(a),l=s.length+1;let c=0;if(i=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Hq=class{constructor(e,t,n,i){this._languageConfigurationService=i,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let i=this._selection;i.startLineNumbere.tokenization.getLineTokens(c),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(c,d)=>e.getLanguageIdAtPosition(c,d)},getLineContent:null};if(i.startLineNumber===i.endLineNumber&&e.getLineMaxColumn(i.startLineNumber)===1){const c=i.startLineNumber,d=this._isMovingDown?c+1:c-1;e.getLineMaxColumn(d)===1?t.addEditOperation(new j(1,1,1,1),null):(t.addEditOperation(new j(c,1,c,1),e.getLineContent(d)),t.addEditOperation(new j(d,1,d,e.getLineMaxColumn(d)),null)),i=new Ye(d,1,d,1)}else{let c,d;if(this._isMovingDown){c=i.endLineNumber+1,d=e.getLineContent(c),t.addEditOperation(new j(c-1,e.getLineMaxColumn(c-1),c,e.getLineMaxColumn(c)),null);let h=d;if(this.shouldAutoIndent(e,i)){const E=this.matchEnterRule(e,s,r,c,i.startLineNumber-1);if(E!==null){const g=Wu(e.getLineContent(c)),f=E+qo(g,r);h=b2(f,r,o)+this.trimStart(d)}else{l.getLineContent=f=>f===i.startLineNumber?e.getLineContent(c):e.getLineContent(f);const g=e2(this._autoIndent,l,e.getLanguageIdAtPosition(c,1),i.startLineNumber,s,this._languageConfigurationService);if(g!==null){const f=Wu(e.getLineContent(c)),p=qo(g,r),D=qo(f,r);p!==D&&(h=b2(p,r,o)+this.trimStart(d))}}t.addEditOperation(new j(i.startLineNumber,1,i.startLineNumber,1),h+` -`);const m=this.matchEnterRuleMovingDown(e,s,r,i.startLineNumber,c,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,i,r,o,m);else{l.getLineContent=f=>f===i.startLineNumber?h:f>=i.startLineNumber+1&&f<=i.endLineNumber+1?e.getLineContent(f-1):e.getLineContent(f);const g=e2(this._autoIndent,l,e.getLanguageIdAtPosition(c,1),i.startLineNumber+1,s,this._languageConfigurationService);if(g!==null){const f=Wu(e.getLineContent(i.startLineNumber)),p=qo(g,r),D=qo(f,r);if(p!==D){const x=p-D;this.getIndentEditsOfMovingBlock(e,t,i,r,o,x)}}}}else t.addEditOperation(new j(i.startLineNumber,1,i.startLineNumber,1),h+` +`+r),this._selectionId=t.trackSelection(n),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let i=n.startLineNumber,r=n.startColumn,a=n.endLineNumber,o=n.endColumn;this._startLineNumberDelta!==0&&(i=i+this._startLineNumberDelta,r=1),this._endLineNumberDelta!==0&&(a=a+this._endLineNumberDelta,o=1),n=Ye.createWithDirection(i,r,a,o,this._selectionDirection)}return n}}var dDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Hq=class{constructor(e,t,n,i){this._languageConfigurationService=i,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const n=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===n){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let i=this._selection;i.startLineNumbere.tokenization.getLineTokens(c),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(c,d)=>e.getLanguageIdAtPosition(c,d)},getLineContent:null};if(i.startLineNumber===i.endLineNumber&&e.getLineMaxColumn(i.startLineNumber)===1){const c=i.startLineNumber,d=this._isMovingDown?c+1:c-1;e.getLineMaxColumn(d)===1?t.addEditOperation(new j(1,1,1,1),null):(t.addEditOperation(new j(c,1,c,1),e.getLineContent(d)),t.addEditOperation(new j(d,1,d,e.getLineMaxColumn(d)),null)),i=new Ye(d,1,d,1)}else{let c,d;if(this._isMovingDown){c=i.endLineNumber+1,d=e.getLineContent(c),t.addEditOperation(new j(c-1,e.getLineMaxColumn(c-1),c,e.getLineMaxColumn(c)),null);let h=d;if(this.shouldAutoIndent(e,i)){const E=this.matchEnterRule(e,s,r,c,i.startLineNumber-1);if(E!==null){const g=Wu(e.getLineContent(c)),f=E+Jo(g,r);h=b2(f,r,o)+this.trimStart(d)}else{l.getLineContent=f=>f===i.startLineNumber?e.getLineContent(c):e.getLineContent(f);const g=e2(this._autoIndent,l,e.getLanguageIdAtPosition(c,1),i.startLineNumber,s,this._languageConfigurationService);if(g!==null){const f=Wu(e.getLineContent(c)),p=Jo(g,r),D=Jo(f,r);p!==D&&(h=b2(p,r,o)+this.trimStart(d))}}t.addEditOperation(new j(i.startLineNumber,1,i.startLineNumber,1),h+` +`);const m=this.matchEnterRuleMovingDown(e,s,r,i.startLineNumber,c,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,i,r,o,m);else{l.getLineContent=f=>f===i.startLineNumber?h:f>=i.startLineNumber+1&&f<=i.endLineNumber+1?e.getLineContent(f-1):e.getLineContent(f);const g=e2(this._autoIndent,l,e.getLanguageIdAtPosition(c,1),i.startLineNumber+1,s,this._languageConfigurationService);if(g!==null){const f=Wu(e.getLineContent(i.startLineNumber)),p=Jo(g,r),D=Jo(f,r);if(p!==D){const x=p-D;this.getIndentEditsOfMovingBlock(e,t,i,r,o,x)}}}}else t.addEditOperation(new j(i.startLineNumber,1,i.startLineNumber,1),h+` `)}else if(c=i.startLineNumber-1,d=e.getLineContent(c),t.addEditOperation(new j(c,1,c+1,1),null),t.addEditOperation(new j(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),` -`+d),this.shouldAutoIndent(e,i)){l.getLineContent=E=>E===c?e.getLineContent(i.startLineNumber):e.getLineContent(E);const h=this.matchEnterRule(e,s,r,i.startLineNumber,i.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,i,r,o,h);else{const E=e2(this._autoIndent,l,e.getLanguageIdAtPosition(i.startLineNumber,1),c,s,this._languageConfigurationService);if(E!==null){const m=Wu(e.getLineContent(i.startLineNumber)),g=qo(E,r),f=qo(m,r);if(g!==f){const p=g-f;this.getIndentEditsOfMovingBlock(e,t,i,r,o,p)}}}}}this._selectionId=t.trackSelection(i)}buildIndentConverter(e,t,n){return{shiftIndent:i=>p0.shiftIndent(i,i.length+1,e,t,n),unshiftIndent:i=>p0.unshiftIndent(i,i.length+1,e,t,n)}}parseEnterResult(e,t,n,i,r){if(r){let a=r.indentation;r.indentAction===wi.None||r.indentAction===wi.Indent?a=r.indentation+r.appendText:r.indentAction===wi.IndentOutdent?a=r.indentation:r.indentAction===wi.Outdent&&(a=t.unshiftIndent(r.indentation)+r.appendText);const o=e.getLineContent(i);if(this.trimStart(o).indexOf(this.trimStart(a))>=0){const s=Wu(e.getLineContent(i));let l=Wu(a);const c=FCe(e,i,this._languageConfigurationService);c!==null&&c&2&&(l=t.unshiftIndent(l));const d=qo(l,n),h=qo(s,n);return d-h}}return null}matchEnterRuleMovingDown(e,t,n,i,r,a){if(Hc(a)>=0){const o=e.getLineMaxColumn(r),s=cx(this._autoIndent,e,new j(r,o,r,o),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,s)}else{let o=i-1;for(;o>=1;){const c=e.getLineContent(o);if(Hc(c)>=0)break;o--}if(o<1||i>e.getLineCount())return null;const s=e.getLineMaxColumn(o),l=cx(this._autoIndent,e,new j(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,l)}}matchEnterRule(e,t,n,i,r,a){let o=r;for(;o>=1;){let c;if(o===r&&a!==void 0?c=a:c=e.getLineContent(o),Hc(c)>=0)break;o--}if(o<1||i>e.getLineCount())return null;const s=e.getLineMaxColumn(o),l=cx(this._autoIndent,e,new j(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const n=e.getLanguageIdAtPosition(t.startLineNumber,1),i=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==i||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,i,r,a){for(let o=n.startLineNumber;o<=n.endLineNumber;o++){const s=e.getLineContent(o),l=Wu(s),d=qo(l,i)+a,h=b2(d,i,r);h!==l&&(t.addEditOperation(new j(o,1,o,l.length+1),h),o===n.endLineNumber&&n.endColumn<=l.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=i)return null;const r=[];for(let o=n;o<=i;o++)r.push(u.getLineContent(o));let a=r.slice(0);return a.sort(hm.getCollator().compare),t===!0&&(a=a.reverse()),{startLineNumber:n,endLineNumber:i,before:r,after:a}}function EDt(u,e,t){const n=Bye(u,e,t);return n?yn.replace(new j(n.startLineNumber,1,n.endLineNumber,u.getLineMaxColumn(n.endLineNumber)),n.after.join(` +`+d),this.shouldAutoIndent(e,i)){l.getLineContent=E=>E===c?e.getLineContent(i.startLineNumber):e.getLineContent(E);const h=this.matchEnterRule(e,s,r,i.startLineNumber,i.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,i,r,o,h);else{const E=e2(this._autoIndent,l,e.getLanguageIdAtPosition(i.startLineNumber,1),c,s,this._languageConfigurationService);if(E!==null){const m=Wu(e.getLineContent(i.startLineNumber)),g=Jo(E,r),f=Jo(m,r);if(g!==f){const p=g-f;this.getIndentEditsOfMovingBlock(e,t,i,r,o,p)}}}}}this._selectionId=t.trackSelection(i)}buildIndentConverter(e,t,n){return{shiftIndent:i=>D0.shiftIndent(i,i.length+1,e,t,n),unshiftIndent:i=>D0.unshiftIndent(i,i.length+1,e,t,n)}}parseEnterResult(e,t,n,i,r){if(r){let a=r.indentation;r.indentAction===wi.None||r.indentAction===wi.Indent?a=r.indentation+r.appendText:r.indentAction===wi.IndentOutdent?a=r.indentation:r.indentAction===wi.Outdent&&(a=t.unshiftIndent(r.indentation)+r.appendText);const o=e.getLineContent(i);if(this.trimStart(o).indexOf(this.trimStart(a))>=0){const s=Wu(e.getLineContent(i));let l=Wu(a);const c=FCe(e,i,this._languageConfigurationService);c!==null&&c&2&&(l=t.unshiftIndent(l));const d=Jo(l,n),h=Jo(s,n);return d-h}}return null}matchEnterRuleMovingDown(e,t,n,i,r,a){if(Hc(a)>=0){const o=e.getLineMaxColumn(r),s=cx(this._autoIndent,e,new j(r,o,r,o),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,s)}else{let o=i-1;for(;o>=1;){const c=e.getLineContent(o);if(Hc(c)>=0)break;o--}if(o<1||i>e.getLineCount())return null;const s=e.getLineMaxColumn(o),l=cx(this._autoIndent,e,new j(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,l)}}matchEnterRule(e,t,n,i,r,a){let o=r;for(;o>=1;){let c;if(o===r&&a!==void 0?c=a:c=e.getLineContent(o),Hc(c)>=0)break;o--}if(o<1||i>e.getLineCount())return null;const s=e.getLineMaxColumn(o),l=cx(this._autoIndent,e,new j(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,n,i,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const n=e.getLanguageIdAtPosition(t.startLineNumber,1),i=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==i||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,i,r,a){for(let o=n.startLineNumber;o<=n.endLineNumber;o++){const s=e.getLineContent(o),l=Wu(s),d=Jo(l,i)+a,h=b2(d,i,r);h!==l&&(t.addEditOperation(new j(o,1,o,l.length+1),h),o===n.endLineNumber&&n.endColumn<=l.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=i)return null;const r=[];for(let o=n;o<=i;o++)r.push(u.getLineContent(o));let a=r.slice(0);return a.sort(hm.getCollator().compare),t===!0&&(a=a.reverse()),{startLineNumber:n,endLineNumber:i,before:r,after:a}}function EDt(u,e,t){const n=Bye(u,e,t);return n?yn.replace(new j(n.startLineNumber,1,n.endLineNumber,u.getLineMaxColumn(n.endLineNumber)),n.after.join(` `)):null}class wye extends $e{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const n=t.getSelections().map((a,o)=>({selection:a,index:o,ignore:!1}));n.sort((a,o)=>j.compareRangesUsingStarts(a.selection,o.selection));let i=n[0];for(let a=1;anew ee(o.positionLineNumber,o.positionColumn)));const r=t.getSelection();if(r===null)return;const a=new lDt(r,i);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop()}}RR.ID="editor.action.trimTrailingWhitespace";class bDt extends $e{constructor(){super({id:"editor.action.deleteLines",label:v("lines.delete","Delete Line"),alias:"Delete Line",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const n=this._getLinesToRemove(t),i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r=0;const a=[],o=[];for(let s=0,l=n.length;s1&&(d-=1,E=i.getLineMaxColumn(d)),a.push(yn.replace(new Ye(d,E,h,m),"")),o.push(new Ye(d-r,c.positionColumn,d-r,c.positionColumn)),r+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(r=>{let a=r.endLineNumber;return r.startLineNumberr.startLineNumber===a.startLineNumber?r.endLineNumber-a.endLineNumber:r.startLineNumber-a.startLineNumber);const n=[];let i=t[0];for(let r=1;r=t[r].startLineNumber?i.endLineNumber=t[r].endLineNumber:(n.push(i),i=t[r]);return n.push(i),n}}class kDt extends $e{constructor(){super({id:"editor.action.indentLines",label:v("lines.indent","Indent Line"),alias:"Indent Line",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2142,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class FDt extends $e{constructor(){super({id:"editor.action.outdentLines",label:v("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2140,weight:100}})}run(e,t){dx.Outdent.runEditorCommand(e,t,null)}}class yDt extends $e{constructor(){super({id:"editor.action.insertLineBefore",label:v("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3075,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}class ADt extends $e{constructor(){super({id:"editor.action.insertLineAfter",label:v("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2051,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}class Mye extends $e{run(e,t){if(!t.hasModel())return;const n=t.getSelection(),i=this._getRangesToDelete(t),r=[];for(let s=0,l=i.length-1;syn.replace(s,""));t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}}class _Dt extends Mye{constructor(){super({id:"deleteAllLeft",label:v("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null;const i=[];let r=0;return t.forEach(a=>{let o;if(a.endColumn===1&&r>0){const s=a.startLineNumber-r;o=new Ye(s,a.startColumn,s,a.startColumn)}else o=new Ye(a.startLineNumber,a.startColumn,a.startLineNumber,a.startColumn);r+=a.endLineNumber-a.startLineNumber,a.intersectRanges(e)?n=o:i.push(o)}),n&&i.unshift(n),i}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let n=t;const i=e.getModel();return i===null?[]:(n.sort(j.compareRangesUsingStarts),n=n.map(r=>{if(r.isEmpty())if(r.startColumn===1){const a=Math.max(1,r.startLineNumber-1),o=r.startLineNumber===1?1:i.getLineLength(a)+1;return new j(a,o,r.startLineNumber,1)}else return new j(r.startLineNumber,1,r.startLineNumber,r.startColumn);else return new j(r.startLineNumber,1,r.endLineNumber,r.endColumn)}),n)}}class SDt extends Mye{constructor(){super({id:"deleteAllRight",label:v("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null;const i=[];for(let r=0,a=t.length,o=0;r{if(r.isEmpty()){const a=t.getLineMaxColumn(r.startLineNumber);return r.startColumn===a?new j(r.startLineNumber,r.startColumn,r.startLineNumber+1,1):new j(r.startLineNumber,r.startColumn,r.startLineNumber,a)}return r});return i.sort(j.compareRangesUsingStarts),i}}class BDt extends $e{constructor(){super({id:"editor.action.joinLines",label:v("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const n=t.getSelections();if(n===null)return;let i=t.getSelection();if(i===null)return;n.sort(j.compareRangesUsingStarts);const r=[],a=n.reduce((h,E)=>h.isEmpty()?h.endLineNumber===E.startLineNumber?(i.equalsSelection(h)&&(i=E),E):E.startLineNumber>h.endLineNumber+1?(r.push(h),E):new Ye(h.startLineNumber,h.startColumn,E.endLineNumber,E.endColumn):E.startLineNumber>h.endLineNumber?(r.push(h),E):new Ye(h.startLineNumber,h.startColumn,E.endLineNumber,E.endColumn));r.push(a);const o=t.getModel();if(o===null)return;const s=[],l=[];let c=i,d=0;for(let h=0,E=r.length;h=1){let z=!0;k===""&&(z=!1),z&&(k.charAt(k.length-1)===" "||k.charAt(k.length-1)===" ")&&(z=!1,k=k.replace(/[\s\uFEFF\xA0]+$/g," "));const N=S.substr(w-1);k+=(z?" ":"")+N,z?p=N.length+1:p=N.length}else p=0}const A=new j(g,f,D,x);if(!A.isEmpty()){let F;m.isEmpty()?(s.push(yn.replace(A,k)),F=new Ye(A.startLineNumber-d,k.length-p+1,g-d,k.length-p+1)):m.startLineNumber===m.endLineNumber?(s.push(yn.replace(A,k)),F=new Ye(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(s.push(yn.replace(A,k)),F=new Ye(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,k.length-b)),j.intersectRanges(A,i)!==null?c=F:l.push(F)}d+=A.endLineNumber-A.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,s,l),t.pushUndoStop()}}class wDt extends $e{constructor(){super({id:"editor.action.transpose",label:v("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:W.writable})}run(e,t){const n=t.getSelections();if(n===null)return;const i=t.getModel();if(i===null)return;const r=[];for(let a=0,o=n.length;a=c){if(l.lineNumber===i.getLineCount())continue;const d=new j(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),h=i.getValueInRange(d).split("").reverse().join("");r.push(new Gr(new Ye(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),h))}else{const d=new j(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),h=i.getValueInRange(d).split("").reverse().join("");r.push(new SX(d,h,new Ye(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class A6 extends $e{run(e,t){const n=t.getSelections();if(n===null)return;const i=t.getModel();if(i===null)return;const r=t.getOption(129),a=[];for(const o of n)if(o.isEmpty()){const s=o.getStartPosition(),l=t.getConfiguredWordAtPosition(s);if(!l)continue;const c=new j(s.lineNumber,l.startColumn,s.lineNumber,l.endColumn),d=i.getValueInRange(c);a.push(yn.replace(c,this._modifyText(d,r)))}else{const s=i.getValueInRange(o);a.push(yn.replace(o,this._modifyText(s,r)))}t.pushUndoStop(),t.executeEdits(this.id,a),t.pushUndoStop()}}class LDt extends A6{constructor(){super({id:"editor.action.transformToUppercase",label:v("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:W.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class zDt extends A6{constructor(){super({id:"editor.action.transformToLowercase",label:v("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:W.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Kp{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class bF extends A6{constructor(){super({id:"editor.action.transformToTitlecase",label:v("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:W.writable})}_modifyText(e,t){const n=bF.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,i=>i.toLocaleUpperCase()):e}}bF.titleBoundary=new Kp("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class Em extends A6{constructor(){super({id:"editor.action.transformToSnakecase",label:v("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:W.writable})}_modifyText(e,t){const n=Em.caseBoundary.get(),i=Em.singleLetters.get();return!n||!i?e:e.replace(n,"$1_$2").replace(i,"$1_$2$3").toLocaleLowerCase()}}Em.caseBoundary=new Kp("(\\p{Ll})(\\p{Lu})","gmu");Em.singleLetters=new Kp("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class kF extends A6{constructor(){super({id:"editor.action.transformToCamelcase",label:v("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:W.writable})}_modifyText(e,t){const n=kF.wordBoundary.get();if(!n)return e;const i=e.split(n);return i.shift()+i.map(a=>a.substring(0,1).toLocaleUpperCase()+a.substring(1)).join("")}}kF.wordBoundary=new Kp("[_\\s-]","gm");class u4 extends A6{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:v("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:W.writable})}_modifyText(e,t){const n=u4.caseBoundary.get(),i=u4.singleLetters.get(),r=u4.underscoreBoundary.get();return!n||!i||!r?e:e.replace(r,"$1-$3").replace(n,"$1-$2").replace(i,"$1-$2").toLocaleLowerCase()}}u4.caseBoundary=new Kp("(\\p{Ll})(\\p{Lu})","gmu");u4.singleLetters=new Kp("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");u4.underscoreBoundary=new Kp("(\\S)(_)(\\S)","gm");be(mDt);be(gDt);be(fDt);be(pDt);be(DDt);be(xDt);be(vDt);be(CDt);be(RR);be(bDt);be(kDt);be(FDt);be(yDt);be(ADt);be(_Dt);be(SDt);be(BDt);be(wDt);be(LDt);be(zDt);Em.caseBoundary.isSupported()&&Em.singleLetters.isSupported()&&be(Em);kF.wordBoundary.isSupported()&&be(kF);bF.titleBoundary.isSupported()&&be(bF);u4.isSupported()&&be(u4);var MDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},u_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Vq=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},C8;const Tye=new Pe("LinkedEditingInputVisible",!1),TDt="linked-editing-decoration";let ug=C8=class extends ne{static get(e){return e.getContribution(C8.ID)}constructor(e,t,n,i,r){super(),this.languageConfigurationService=i,this._syncRangesToken=0,this._localToDispose=this._register(new pe),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=Tye.bindTo(t),this._debounceInformation=r.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new pe),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(69)||a.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(Ne.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const i=new Tl(this._debounceInformation.get(t)),r=()=>{var s;this._rangeUpdateTriggerPromise=i.trigger(()=>this.updateRanges(),(s=this._debounceDuration)!==null&&s!==void 0?s:this._debounceInformation.get(t))},a=new Tl(0),o=s=>{this._rangeSyncTriggerPromise=a.trigger(()=>this._syncRanges(s))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{r()})),this._localToDispose.add(this._editor.onDidChangeModelContent(s=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const l=this._currentDecorations.getRange(0);if(l&&s.changes.every(c=>l.intersectRanges(c.range))){o(this._syncRangesToken);return}}r()})),this._localToDispose.add({dispose:()=>{i.dispose(),a.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const i=t.getValueInRange(n);if(this._currentWordPattern){const a=i.match(this._currentWordPattern);if((a?a[0].length:0)!==i.length)return this.clearRanges()}const r=[];for(let a=1,o=this._currentDecorations.length;a1){this.clearRanges();return}const n=this._editor.getModel(),i=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===i){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const a=this._currentDecorations.getRange(0);if(a&&a.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=i;const r=Ui(a=>Vq(this,void 0,void 0,function*(){try{const o=new va(!1),s=yield Nye(this._providers,n,t,a);if(this._debounceInformation.update(n,o.elapsed()),r!==this._currentRequest||(this._currentRequest=null,i!==n.getVersionId()))return;let l=[];s!=null&&s.ranges&&(l=s.ranges),this._currentWordPattern=(s==null?void 0:s.wordPattern)||this._languageWordPattern;let c=!1;for(let h=0,E=l.length;h({range:h,options:C8.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(d),this._syncRangesToken++}catch(o){dd(o)||zt(o),(this._currentRequest===r||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=r,r})}};ug.ID="editor.contrib.linkedEditing";ug.DECORATION=Lt.register({description:"linked-editing",stickiness:0,className:TDt});ug=C8=MDt([u_(1,pt),u_(2,We),u_(3,tn),u_(4,U0)],ug);class NDt extends $e{constructor(){super({id:"editor.action.linkedEditing",label:v("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:Ee.and(W.writable,W.hasRenameProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(Cu),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return dt.isUri(i)&&ee.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(a=>{a&&(a.setPosition(r),a.invokeWithinContext(o=>(this.reportTelemetry(o,a),this.run(o,a))))},zt):super.runCommand(e,t)}run(e,t){const n=ug.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const PDt=xr.bindToContribution(ug.get);ze(new PDt({id:"cancelLinkedEditingInput",precondition:Tye,handler:u=>u.clearRanges(),kbOpts:{kbExpr:W.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function Nye(u,e,t,n){const i=u.ordered(e);return x6e(i.map(r=>()=>Vq(this,void 0,void 0,function*(){try{return yield r.provideLinkedEditingRanges(e,t,n)}catch(a){Mi(a);return}})),r=>!!r&&pa(r==null?void 0:r.ranges))}q("editor.linkedEditingBackground",{dark:ae.fromHex("#f00").transparent(.3),light:ae.fromHex("#f00").transparent(.3),hcDark:ae.fromHex("#f00").transparent(.3),hcLight:ae.white},v("editorLinkedEditingBackground","Background color when the editor auto renames on type."));W1("_executeLinkedEditingProvider",(u,e,t)=>{const{linkedEditingRangeProvider:n}=u.get(We);return Nye(n,e,t,Kt.None)});fu(ug.ID,ug,1);be(NDt);var Pye=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let RDt=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return Pye(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}};class iL{constructor(e){this._disposables=new pe;let t=[];for(const[n,i]of e){const r=n.links.map(a=>new RDt(a,i));t=iL._union(t,r),TQ(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const n=[];let i,r,a,o;for(i=0,a=0,r=e.length,o=t.length;iPromise.resolve(r.provideLinks(e,t)).then(o=>{o&&(n[a]=[o,r])},Mi));return Promise.all(i).then(()=>{const r=new iL(b1(n));return t.isCancellationRequested?(r.dispose(),new iL([])):r})}ru.registerCommand("_executeLinkProvider",(u,...e)=>Pye(void 0,void 0,void 0,function*(){let[t,n]=e;Ru(t instanceof dt),typeof n!="number"&&(n=0);const{linkProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)return[];const a=yield Rye(i,r,Kt.None);if(!a)return[];for(let s=0;s=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},n_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ODt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},$q;let wv=$q=class extends ne{static get(e){return e.getContribution($q.ID)}constructor(e,t,n,i,r){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=i,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=r.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Hu(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const a=this._register(new rR(e));this._register(a.onMouseMoveOrRelevantKeyDown(([o,s])=>{this._onEditorMouseMove(o,s)})),this._register(a.onExecute(o=>{this.onEditorMouseUp(o)})),this._register(a.onCancel(o=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(o=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(o=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(o=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(o=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return ODt(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Ui(t=>Rye(this.providers,e,t));try{const t=new va(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){zt(t)}finally{this.computePromise=null}}})}updateDecorations(e){const t=this.editor.getOption(77)==="altKey",n=[],i=Object.keys(this.currentOccurrences);for(const a of i){const o=this.currentOccurrences[a];n.push(o.decorationId)}const r=[];if(e)for(const a of e)r.push(kx.decoration(a,t));this.editor.changeDecorations(a=>{const o=a.deltaDecorations(n,r);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let s=0,l=o.length;s{i.activate(r,n),this.activeLinkDecorationId=i.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:i}=e;i.resolve(Kt.None).then(r=>{if(typeof r=="string"&&this.editor.hasModel()){const a=this.editor.getModel().uri;if(a.scheme===Ot.file&&r.startsWith(`${Ot.file}:`)){const o=dt.parse(r);if(o.scheme===Ot.file){const s=Sd(o);let l=null;s.startsWith("/./")?l=`.${s.substr(1)}`:s.startsWith("//./")&&(l=`.${s.substr(2)}`),l&&(r=Xnt(a,l))}}}return this.openerService.open(r,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},r=>{const a=r instanceof Error?r.message:r;a==="invalid"?this.notificationService.warn(v("invalid.url","Failed to open this link because it is not well-formed: {0}",i.url.toString())):a==="missing"?this.notificationService.warn(v("missing.url","Failed to open this link because its target is missing.")):zt(r)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const n of t){const i=this.currentOccurrences[n.id];if(i)return i}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};wv.ID="editor.linkDetector";wv=$q=IDt([n_(1,vs),n_(2,bi),n_(3,We),n_(4,U0)],wv);const Bce={general:Lt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Lt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class kx{static decoration(e,t){return{range:e.range,options:kx._getOptions(e,t,!1)}}static _getOptions(e,t,n){const i=Object.assign({},n?Bce.active:Bce.general);return i.hoverMessage=jDt(e,t),i}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,kx._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,kx._getOptions(this.link,t,!1))}}function jDt(u,e){const t=u.url&&/^command:/i.test(u.url.toString()),n=u.tooltip?u.tooltip:t?v("links.navigate.executeCmd","Execute command"):v("links.navigate.follow","Follow link"),i=e?iu?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):iu?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");if(u.url){let r="";if(/^command:/i.test(u.url.toString())){const o=u.url.toString().match(/^command:([^?#]+)/);if(o){const s=o[1];r=v("tooltip.explanation","Execute command {0}",s)}}return new Zr("",!0).appendLink(u.url.toString(!0).replace(/ /g,"%20"),n,r).appendMarkdown(` (${i})`)}else return new Zr().appendText(`${n} (${i})`)}class HDt extends $e{constructor(){super({id:"editor.action.openLink",label:v("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const n=wv.get(t);if(!n||!t.hasModel())return;const i=t.getSelections();for(const r of i){const a=n.getLinkOccurrence(r.getEndPosition());a&&n.openLinkOccurrence(a,!1)}}}fu(wv.ID,wv,1);be(HDt);class Kq extends ne{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const n=this._editor.getOption(116);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}Kq.ID="editor.contrib.longLinesHelper";fu(Kq.ID,Kq,2);const i_=q("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.wordHighlightTextBackground",{light:i_,dark:i_,hcDark:i_,hcLight:i_},v("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const r_=q("editor.wordHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));q("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));q("editor.wordHighlightTextBorder",{light:r_,dark:r_,hcDark:r_,hcLight:r_},v("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const VDt=q("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),$Dt=q("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),KDt=q("editorOverviewRuler.wordHighlightTextForeground",{dark:vb,light:vb,hcDark:vb,hcLight:vb},v("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),WDt=Lt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Jn($Dt),position:Js.Center},minimap:{color:Jn(cP),position:ss.Inline}}),GDt=Lt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Jn(KDt),position:Js.Center},minimap:{color:Jn(cP),position:ss.Inline}}),UDt=Lt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Jn(vb),position:Js.Center},minimap:{color:Jn(cP),position:ss.Inline}}),qDt=Lt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),JDt=Lt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Jn(VDt),position:Js.Center},minimap:{color:Jn(cP),position:ss.Inline}});function ZDt(u){return u===ak.Write?WDt:u===ak.Text?GDt:JDt}function YDt(u){return u?qDt:UDt}Kl((u,e)=>{const t=u.getColor(xX);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var QDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},XDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Wq;function Cg(u,e){const t=e.filter(n=>!u.find(i=>i.equals(n)));if(t.length>=1){const n=t.map(r=>`line ${r.viewState.position.lineNumber} column ${r.viewState.position.column}`).join(", "),i=t.length===1?v("cursorAdded","Cursor added: {0}",n):v("cursorsAdded","Cursors added: {0}",n);jm(i)}}class e5t extends $e{constructor(){super({id:"editor.action.insertCursorAbove",label:v("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let i=!0;n&&n.logicalLine===!1&&(i=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const a=r.getCursorStates();r.setCursorStates(n.source,3,br.addCursorUp(r,a,i)),r.revealTopMostCursor(n.source),Cg(a,r.getCursorStates())}}class t5t extends $e{constructor(){super({id:"editor.action.insertCursorBelow",label:v("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let i=!0;n&&n.logicalLine===!1&&(i=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const a=r.getCursorStates();r.setCursorStates(n.source,3,br.addCursorDown(r,a,i)),r.revealBottomMostCursor(n.source),Cg(a,r.getCursorStates())}}class u5t extends $e{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let i=e.startLineNumber;i1&&n.push(new Ye(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=t.getSelections(),r=t._getViewModel(),a=r.getCursorStates(),o=[];i.forEach(s=>this.getCursorsForSelection(s,n,o)),o.length>0&&t.setSelections(o),Cg(a,r.getCursorStates())}}class n5t extends $e{constructor(){super({id:"editor.action.addCursorsToBottom",label:v("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=t.getModel().getLineCount(),r=[];for(let s=n[0].startLineNumber;s<=i;s++)r.push(new Ye(s,n[0].startColumn,s,n[0].endColumn));const a=t._getViewModel(),o=a.getCursorStates();r.length>0&&t.setSelections(r),Cg(o,a.getCursorStates())}}class i5t extends $e{constructor(){super({id:"editor.action.addCursorsToTop",label:v("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=[];for(let o=n[0].startLineNumber;o>=1;o--)i.push(new Ye(o,n[0].startColumn,o,n[0].endColumn));const r=t._getViewModel(),a=r.getCursorStates();i.length>0&&t.setSelections(i),Cg(a,r.getCursorStates())}}class a_{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}class FF{static create(e,t){if(!e.hasModel())return null;const n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new FF(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let i=!1,r,a;const o=e.getSelections();o.length===1&&o[0].isEmpty()?(i=!0,r=!0,a=!0):(r=n.wholeWord,a=n.matchCase);const s=e.getSelection();let l,c=null;if(s.isEmpty()){const d=e.getConfiguredWordAtPosition(s.getStartPosition());if(!d)return null;l=d.word,c=new Ye(s.startLineNumber,d.startColumn,s.startLineNumber,d.endColumn)}else l=e.getModel().getValueInRange(s).replace(/\r\n/g,` -`);return new FF(e,t,i,l,r,a,c)}constructor(e,t,n,i,r,a,o){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=r,this.matchCase=a,this.currentMatch=o}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const i=this.currentMatch;return this.currentMatch=null,i}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return n?new Ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const i=this.currentMatch;return this.currentMatch=null,i}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return n?new Ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class Q3 extends ne{static get(e){return e.getContribution(Q3.ID)}constructor(e){super(),this._sessionDispose=this._register(new pe),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=FF.create(this._editor,e);if(!t)return;this._session=t;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(i=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(i=>{(i.matchCase||i.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new Ye(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!Iye(this._editor.getModel(),t,i)){const a=this._editor.getModel(),o=[];for(let s=0,l=t.length;s0&&n.isRegex){const i=this._editor.getModel();n.searchScope?t=i.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(129):null,!1,1073741824):t=i.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){const i=this._editor.getSelection();for(let r=0,a=t.length;rnew Ye(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn)))}}}Q3.ID="editor.contrib.multiCursorController";class _6 extends $e{run(e,t){const n=Q3.get(t);if(!n)return;const i=t._getViewModel();if(i){const r=i.getCursorStates(),a=so.get(t);if(a)this._run(n,a);else{const o=e.get(mt).createInstance(so,t);this._run(n,o),o.dispose()}Cg(r,i.getCursorStates())}}}class r5t extends _6{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2082,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class a5t extends _6{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class o5t extends _6{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:Vi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class s5t extends _6{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class l5t extends _6{constructor(){super({id:"editor.action.selectHighlights",label:v("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:3114,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class c5t extends _6{constructor(){super({id:"editor.action.changeAll",label:v("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:Ee.and(W.writable,W.editorTextFocus),kbOpts:{kbExpr:W.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class d5t{constructor(e,t,n,i,r){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=i,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,r&&this._model===r._model&&this._searchText===r._searchText&&this._matchCase===r._matchCase&&this._wordSeparators===r._wordSeparators&&this._modelVersionId===r._modelVersionId&&(this._cachedFindMatches=r._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(j.compareRangesUsingStarts)),this._cachedFindMatches}}let yF=Wq=class extends ne{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Hu(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(i=>{this._isEnabled=e.getOption(107)})),this._register(e.onDidChangeCursorSelection(i=>{this._isEnabled&&(i.selection.isEmpty()?i.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(i=>{this._setState(null)})),this._register(e.onDidChangeModelContent(i=>{this._isEnabled&&this.updateSoon.schedule()}));const n=so.get(e);n&&this._register(n.getState().onFindReplaceStateChange(i=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(Wq._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;const i=n.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const r=Q3.get(n);if(!r)return null;const a=so.get(n);if(!a)return null;let o=r.getSession(a);if(!o){const c=n.getSelections();if(c.length>1){const h=a.getState().matchCase;if(!Iye(n.getModel(),c,h))return null}o=FF.create(n,a)}if(!o||o.currentMatch||/^[ \t]+$/.test(o.searchText)||o.searchText.length>200)return null;const s=a.getState(),l=s.matchCase;if(s.isRevealed){let c=s.searchString;l||(c=c.toLowerCase());let d=o.searchText;if(l||(d=d.toLowerCase()),c===d&&o.matchCase===s.matchCase&&o.wholeWord===s.wholeWord&&!s.isRegex)return null}return new d5t(n.getModel(),o.searchText,o.matchCase,o.wholeWord?n.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const n=this.state.findMatches(),i=this.editor.getSelections();i.sort(j.compareRangesUsingStarts);const r=[];for(let s=0,l=0,c=n.length,d=i.length;s=d)r.push(h),s++;else{const E=j.compareRangesUsingStarts(h,i[l]);E<0?((i[l].isEmpty()||!j.areIntersecting(h,i[l]))&&r.push(h),s++):(E>0||s++,l++)}}const a=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(80),o=r.map(s=>({range:s,options:YDt(a)}));this._decorations.set(o)}dispose(){this._setState(null),super.dispose()}};yF.ID="editor.contrib.selectionHighlighter";yF=Wq=QDt([XDt(1,We)],yF);function Iye(u,e,t){const n=wce(u,e[0],!t);for(let i=1,r=e.length;iOye(void 0,void 0,void 0,function*(){const[t,n,i]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string"||!i);const r=u.get(We),a=yield u.get(Vo).createModelReference(t);try{const o=yield jye(r.signatureHelpProvider,a.object.textEditorModel,ee.lift(n),{triggerKind:E1.Invoke,isRetrigger:!1,triggerCharacter:i},Kt.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{a.dispose()}}));var m5t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},dE;(function(u){u.Default={type:0};class e{constructor(i,r){this.request=i,this.previouslyActiveHints=r,this.type=2}}u.Pending=e;class t{constructor(i){this.hints=i,this.type=1}}u.Active=t})(dE||(dE={}));class IR extends ne{constructor(e,t,n=IR.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Q),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=dE.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Ir),this.triggerChars=new _B,this.retriggerChars=new _B,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Tl(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(i=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(i=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(i=>this.onCursorChange(i))),this._register(this.editor.onDidChangeModelContent(i=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(i=>this.onDidType(i))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=dE.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!this.providers.has(n))return;const i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(i),t).catch(zt)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,i=this.editor.getOption(85).cycle;if((e<2||n)&&!i){this.cancel();return}this.updateActiveSignature(n&&i?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,i=this.editor.getOption(85).cycle;if((e<2||n)&&!i){this.cancel();return}this.updateActiveSignature(n&&i?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new dE.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return m5t(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const i=this._pendingTriggers.reduce(g5t);this._pendingTriggers=[];const r={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const a=this.editor.getModel(),o=this.editor.getPosition();this.state=new dE.Pending(Ui(s=>jye(this.providers,a,o,r,s)),n);try{const s=yield this.state.request;return e!==this.triggerId?(s==null||s.dispose(),!1):!s||!s.value.signatures||s.value.signatures.length===0?(s==null||s.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new dE.Active(s.value),this._lastSignatureHelpResult.value=s,this._onChangedHints.fire(this.state.hints),!0)}catch(s){return e===this.triggerId&&(this.state=dE.Default),zt(s),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const n of t.signatureHelpTriggerCharacters||[])if(n.length){const i=n.charCodeAt(0);this.triggerChars.add(i),this.retriggerChars.add(i)}for(const n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:E1.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:E1.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:E1.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}IR.DEFAULT_DELAY=120;function g5t(u,e){switch(e.triggerKind){case E1.Invoke:return e;case E1.ContentChange:return u;case E1.TriggerCharacter:default:return e}}var f5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},VH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gq;const ys=ve,p5t=hi("parameter-hints-next",we.chevronDown,v("parameterHintsNextIcon","Icon for show next parameter hint.")),D5t=hi("parameter-hints-previous",we.chevronUp,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let rL=Gq=class extends ne{constructor(e,t,n,i,r){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new pe),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new h4({editor:e},r,i)),this.keyVisible=X3.Visible.bindTo(n),this.keyMultipleSignatures=X3.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=ys(".editor-widget.parameter-hints-widget"),t=me(e,ys(".phwrapper"));t.tabIndex=-1;const n=me(t,ys(".controls")),i=me(n,ys(".button"+st.asCSSSelector(D5t))),r=me(n,ys(".overloads")),a=me(n,ys(".button"+st.asCSSSelector(p5t)));this._register(ce(i,"click",h=>{It.stop(h),this.previous()})),this._register(ce(a,"click",h=>{It.stop(h),this.next()}));const o=ys(".body"),s=new EA(o,{alwaysConsumeMouseWheel:!0});this._register(s),t.appendChild(s.getDomNode());const l=me(o,ys(".signature")),c=me(o,ys(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:r,docs:c,scrollbar:s},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const d=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};d(),this._register(Ne.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(E=>E.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const r=me(this.domNodes.signature,ys(".code")),a=this.editor.getOption(50);r.style.fontSize=`${a.fontSize}px`,r.style.fontFamily=a.fontFamily;const o=i.parameters.length>0,s=(t=i.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(o)this.renderParameters(r,i,s);else{const d=me(r,ys("span"));d.textContent=i.label}const l=i.parameters[s];if(l!=null&&l.documentation){const d=ys("span.documentation");if(typeof l.documentation=="string")d.textContent=l.documentation;else{const h=this.renderMarkdownDocs(l.documentation);d.appendChild(h.element)}me(this.domNodes.docs,ys("p",{},d))}if(i.documentation!==void 0)if(typeof i.documentation=="string")me(this.domNodes.docs,ys("p",{},i.documentation));else{const d=this.renderMarkdownDocs(i.documentation);me(this.domNodes.docs,d.element)}const c=this.hasDocs(i,l);if(this.domNodes.signature.classList.toggle("has-docs",c),this.domNodes.docs.classList.toggle("empty",!c),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let d="";const h=i.parameters[s];Array.isArray(h.label)?d=i.label.substring(h.label[0],h.label[1]):d=h.label,h.documentation&&(d+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),i.documentation&&(d+=typeof i.documentation=="string"?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==d&&(ga(v("hint","{0}, hint",d)),this.announcedLabel=d)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Nf(t.documentation).length>0||t&&typeof t.documentation=="object"&&Nf(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Nf(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Nf(e.documentation.value).length>0)}renderParameters(e,t,n){const[i,r]=this.getParameterLabelOffsets(t,n),a=document.createElement("span");a.textContent=t.label.substring(0,i);const o=document.createElement("span");o.textContent=t.label.substring(i,r),o.className="parameter active";const s=document.createElement("span");s.textContent=t.label.substring(r),me(e,a,o,s)}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const i=new RegExp(`(\\W|^)${qs(n.label)}(?=\\W|$)`,"g");i.test(e.label);const r=i.lastIndex-n.label.length;return r>=0?[r,i.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Gq.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};rL.ID="editor.widget.parameterHintsWidget";rL=Gq=f5t([VH(2,pt),VH(3,vs),VH(4,vn)],rL);q("editorHoverWidget.highlightForeground",{dark:gl,light:gl,hcDark:gl,hcLight:gl},v("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var x5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Lce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Uq;let ep=Uq=class extends ne{static get(e){return e.getContribution(Uq.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new IR(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(i=>{var r;i?(this.widget.value.show(),this.widget.value.render(i)):(r=this.widget.rawValue)===null||r===void 0||r.hide()})),this.widget=new mg(()=>this._register(t.createInstance(rL,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};ep.ID="editor.controller.parameterHints";ep=Uq=x5t([Lce(1,mt),Lce(2,We)],ep);class v5t extends $e{constructor(){super({id:"editor.action.triggerParameterHints",label:v("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:W.hasSignatureHelpProvider,kbOpts:{kbExpr:W.editorTextFocus,primary:3082,weight:100}})}run(e,t){const n=ep.get(t);n==null||n.trigger({triggerKind:E1.Invoke})}}fu(ep.ID,ep,2);be(v5t);const Mte=100+75,Tte=xr.bindToContribution(ep.get);ze(new Tte({id:"closeParameterHints",precondition:X3.Visible,handler:u=>u.cancel(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:9,secondary:[1033]}}));ze(new Tte({id:"showPrevParameterHint",precondition:Ee.and(X3.Visible,X3.MultipleSignatures),handler:u=>u.previous(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));ze(new Tte({id:"showNextParameterHint",precondition:Ee.and(X3.Visible,X3.MultipleSignatures),handler:u=>u.next(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var C5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const OR=new Pe("renameInputVisible",!1,v("renameInputVisible","Whether the rename input widget is visible"));let qq=class{constructor(e,t,n,i,r){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=i,this._disposables=new pe,this.allowEditorOverflow=!0,this._visibleContextKey=OR.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",v("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,i,r;if(!this._input||!this._domNode)return;const a=e.getColor(t1),o=e.getColor(fX);this._domNode.style.backgroundColor=String((t=e.getColor(ti))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=a?` 0 0 8px 2px ${a}`:"",this._domNode.style.border=o?`1px solid ${o}`:"",this._domNode.style.color=String((n=e.getColor(Y6e))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((i=e.getColor(Z6e))!==null&&i!==void 0?i:"");const s=e.getColor(Q6e);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=(r=s==null?void 0:s.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[n,i]=this._acceptKeybindings;return this._label.innerText=v({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(i))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,i,r,a){this._domNode.classList.toggle("preview",r),this._position=new ee(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const o=new pe;return new Promise(s=>{this._currentCancelInput=l=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s(l),!0),this._currentAcceptInput=l=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s({newName:this._input.value,wantsPreview:r&&l})},o.add(a.onCancellationRequested(()=>this.cancelInput(!0))),o.add(this._editor.onDidBlurEditorWidget(()=>{var l;return this.cancelInput(!(!((l=this._domNode)===null||l===void 0)&&l.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{o.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};qq=C5t([$H(2,sr),$H(3,qu),$H(4,pt)],qq);var b5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Jg=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},h3=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Jq;class Nte{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return h3(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`))),r.push(h),a+=o.endLineNumber-o.startLineNumber+1-l.length}t.pushUndoStop(),t.executeEdits(this.id,i,r),t.pushUndoStop()}}class RR extends $e{constructor(){super({id:RR.ID,label:v("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2102),weight:100}})}run(e,t,n){let i=[];n.reason==="auto-save"&&(i=(t.getSelections()||[]).map(o=>new ee(o.positionLineNumber,o.positionColumn)));const r=t.getSelection();if(r===null)return;const a=new lDt(r,i);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop()}}RR.ID="editor.action.trimTrailingWhitespace";class bDt extends $e{constructor(){super({id:"editor.action.deleteLines",label:v("lines.delete","Delete Line"),alias:"Delete Line",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const n=this._getLinesToRemove(t),i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let r=0;const a=[],o=[];for(let s=0,l=n.length;s1&&(d-=1,E=i.getLineMaxColumn(d)),a.push(yn.replace(new Ye(d,E,h,m),"")),o.push(new Ye(d-r,c.positionColumn,d-r,c.positionColumn)),r+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(r=>{let a=r.endLineNumber;return r.startLineNumberr.startLineNumber===a.startLineNumber?r.endLineNumber-a.endLineNumber:r.startLineNumber-a.startLineNumber);const n=[];let i=t[0];for(let r=1;r=t[r].startLineNumber?i.endLineNumber=t[r].endLineNumber:(n.push(i),i=t[r]);return n.push(i),n}}class kDt extends $e{constructor(){super({id:"editor.action.indentLines",label:v("lines.indent","Indent Line"),alias:"Indent Line",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2142,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class FDt extends $e{constructor(){super({id:"editor.action.outdentLines",label:v("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2140,weight:100}})}run(e,t){dx.Outdent.runEditorCommand(e,t,null)}}class yDt extends $e{constructor(){super({id:"editor.action.insertLineBefore",label:v("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:3075,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}class ADt extends $e{constructor(){super({id:"editor.action.insertLineAfter",label:v("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:2051,weight:100}})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Pn.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}class Mye extends $e{run(e,t){if(!t.hasModel())return;const n=t.getSelection(),i=this._getRangesToDelete(t),r=[];for(let s=0,l=i.length-1;syn.replace(s,""));t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}}class _Dt extends Mye{constructor(){super({id:"deleteAllLeft",label:v("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let n=null;const i=[];let r=0;return t.forEach(a=>{let o;if(a.endColumn===1&&r>0){const s=a.startLineNumber-r;o=new Ye(s,a.startColumn,s,a.startColumn)}else o=new Ye(a.startLineNumber,a.startColumn,a.startLineNumber,a.startColumn);r+=a.endLineNumber-a.startLineNumber,a.intersectRanges(e)?n=o:i.push(o)}),n&&i.unshift(n),i}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let n=t;const i=e.getModel();return i===null?[]:(n.sort(j.compareRangesUsingStarts),n=n.map(r=>{if(r.isEmpty())if(r.startColumn===1){const a=Math.max(1,r.startLineNumber-1),o=r.startLineNumber===1?1:i.getLineLength(a)+1;return new j(a,o,r.startLineNumber,1)}else return new j(r.startLineNumber,1,r.startLineNumber,r.startColumn);else return new j(r.startLineNumber,1,r.endLineNumber,r.endColumn)}),n)}}class SDt extends Mye{constructor(){super({id:"deleteAllRight",label:v("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let n=null;const i=[];for(let r=0,a=t.length,o=0;r{if(r.isEmpty()){const a=t.getLineMaxColumn(r.startLineNumber);return r.startColumn===a?new j(r.startLineNumber,r.startColumn,r.startLineNumber+1,1):new j(r.startLineNumber,r.startColumn,r.startLineNumber,a)}return r});return i.sort(j.compareRangesUsingStarts),i}}class BDt extends $e{constructor(){super({id:"editor.action.joinLines",label:v("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:W.writable,kbOpts:{kbExpr:W.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const n=t.getSelections();if(n===null)return;let i=t.getSelection();if(i===null)return;n.sort(j.compareRangesUsingStarts);const r=[],a=n.reduce((h,E)=>h.isEmpty()?h.endLineNumber===E.startLineNumber?(i.equalsSelection(h)&&(i=E),E):E.startLineNumber>h.endLineNumber+1?(r.push(h),E):new Ye(h.startLineNumber,h.startColumn,E.endLineNumber,E.endColumn):E.startLineNumber>h.endLineNumber?(r.push(h),E):new Ye(h.startLineNumber,h.startColumn,E.endLineNumber,E.endColumn));r.push(a);const o=t.getModel();if(o===null)return;const s=[],l=[];let c=i,d=0;for(let h=0,E=r.length;h=1){let z=!0;k===""&&(z=!1),z&&(k.charAt(k.length-1)===" "||k.charAt(k.length-1)===" ")&&(z=!1,k=k.replace(/[\s\uFEFF\xA0]+$/g," "));const N=S.substr(w-1);k+=(z?" ":"")+N,z?p=N.length+1:p=N.length}else p=0}const A=new j(g,f,D,x);if(!A.isEmpty()){let F;m.isEmpty()?(s.push(yn.replace(A,k)),F=new Ye(A.startLineNumber-d,k.length-p+1,g-d,k.length-p+1)):m.startLineNumber===m.endLineNumber?(s.push(yn.replace(A,k)),F=new Ye(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(s.push(yn.replace(A,k)),F=new Ye(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,k.length-b)),j.intersectRanges(A,i)!==null?c=F:l.push(F)}d+=A.endLineNumber-A.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,s,l),t.pushUndoStop()}}class wDt extends $e{constructor(){super({id:"editor.action.transpose",label:v("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:W.writable})}run(e,t){const n=t.getSelections();if(n===null)return;const i=t.getModel();if(i===null)return;const r=[];for(let a=0,o=n.length;a=c){if(l.lineNumber===i.getLineCount())continue;const d=new j(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),h=i.getValueInRange(d).split("").reverse().join("");r.push(new Gr(new Ye(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),h))}else{const d=new j(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),h=i.getValueInRange(d).split("").reverse().join("");r.push(new SX(d,h,new Ye(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class A6 extends $e{run(e,t){const n=t.getSelections();if(n===null)return;const i=t.getModel();if(i===null)return;const r=t.getOption(129),a=[];for(const o of n)if(o.isEmpty()){const s=o.getStartPosition(),l=t.getConfiguredWordAtPosition(s);if(!l)continue;const c=new j(s.lineNumber,l.startColumn,s.lineNumber,l.endColumn),d=i.getValueInRange(c);a.push(yn.replace(c,this._modifyText(d,r)))}else{const s=i.getValueInRange(o);a.push(yn.replace(o,this._modifyText(s,r)))}t.pushUndoStop(),t.executeEdits(this.id,a),t.pushUndoStop()}}class LDt extends A6{constructor(){super({id:"editor.action.transformToUppercase",label:v("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:W.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class zDt extends A6{constructor(){super({id:"editor.action.transformToLowercase",label:v("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:W.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Kp{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class bF extends A6{constructor(){super({id:"editor.action.transformToTitlecase",label:v("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:W.writable})}_modifyText(e,t){const n=bF.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,i=>i.toLocaleUpperCase()):e}}bF.titleBoundary=new Kp("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class Em extends A6{constructor(){super({id:"editor.action.transformToSnakecase",label:v("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:W.writable})}_modifyText(e,t){const n=Em.caseBoundary.get(),i=Em.singleLetters.get();return!n||!i?e:e.replace(n,"$1_$2").replace(i,"$1_$2$3").toLocaleLowerCase()}}Em.caseBoundary=new Kp("(\\p{Ll})(\\p{Lu})","gmu");Em.singleLetters=new Kp("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class kF extends A6{constructor(){super({id:"editor.action.transformToCamelcase",label:v("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:W.writable})}_modifyText(e,t){const n=kF.wordBoundary.get();if(!n)return e;const i=e.split(n);return i.shift()+i.map(a=>a.substring(0,1).toLocaleUpperCase()+a.substring(1)).join("")}}kF.wordBoundary=new Kp("[_\\s-]","gm");class u4 extends A6{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:v("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:W.writable})}_modifyText(e,t){const n=u4.caseBoundary.get(),i=u4.singleLetters.get(),r=u4.underscoreBoundary.get();return!n||!i||!r?e:e.replace(r,"$1-$3").replace(n,"$1-$2").replace(i,"$1-$2").toLocaleLowerCase()}}u4.caseBoundary=new Kp("(\\p{Ll})(\\p{Lu})","gmu");u4.singleLetters=new Kp("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu");u4.underscoreBoundary=new Kp("(\\S)(_)(\\S)","gm");be(mDt);be(gDt);be(fDt);be(pDt);be(DDt);be(xDt);be(vDt);be(CDt);be(RR);be(bDt);be(kDt);be(FDt);be(yDt);be(ADt);be(_Dt);be(SDt);be(BDt);be(wDt);be(LDt);be(zDt);Em.caseBoundary.isSupported()&&Em.singleLetters.isSupported()&&be(Em);kF.wordBoundary.isSupported()&&be(kF);bF.titleBoundary.isSupported()&&be(bF);u4.isSupported()&&be(u4);var MDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},u_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Vq=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},C8;const Tye=new Pe("LinkedEditingInputVisible",!1),TDt="linked-editing-decoration";let ug=C8=class extends ne{static get(e){return e.getContribution(C8.ID)}constructor(e,t,n,i,r){super(),this.languageConfigurationService=i,this._syncRangesToken=0,this._localToDispose=this._register(new pe),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=Tye.bindTo(t),this._debounceInformation=r.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new pe),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(69)||a.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(Ne.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const i=new Tl(this._debounceInformation.get(t)),r=()=>{var s;this._rangeUpdateTriggerPromise=i.trigger(()=>this.updateRanges(),(s=this._debounceDuration)!==null&&s!==void 0?s:this._debounceInformation.get(t))},a=new Tl(0),o=s=>{this._rangeSyncTriggerPromise=a.trigger(()=>this._syncRanges(s))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{r()})),this._localToDispose.add(this._editor.onDidChangeModelContent(s=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const l=this._currentDecorations.getRange(0);if(l&&s.changes.every(c=>l.intersectRanges(c.range))){o(this._syncRangesToken);return}}r()})),this._localToDispose.add({dispose:()=>{i.dispose(),a.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const i=t.getValueInRange(n);if(this._currentWordPattern){const a=i.match(this._currentWordPattern);if((a?a[0].length:0)!==i.length)return this.clearRanges()}const r=[];for(let a=1,o=this._currentDecorations.length;a1){this.clearRanges();return}const n=this._editor.getModel(),i=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===i){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const a=this._currentDecorations.getRange(0);if(a&&a.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=i;const r=Ui(a=>Vq(this,void 0,void 0,function*(){try{const o=new va(!1),s=yield Nye(this._providers,n,t,a);if(this._debounceInformation.update(n,o.elapsed()),r!==this._currentRequest||(this._currentRequest=null,i!==n.getVersionId()))return;let l=[];s!=null&&s.ranges&&(l=s.ranges),this._currentWordPattern=(s==null?void 0:s.wordPattern)||this._languageWordPattern;let c=!1;for(let h=0,E=l.length;h({range:h,options:C8.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(d),this._syncRangesToken++}catch(o){dd(o)||zt(o),(this._currentRequest===r||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=r,r})}};ug.ID="editor.contrib.linkedEditing";ug.DECORATION=Lt.register({description:"linked-editing",stickiness:0,className:TDt});ug=C8=MDt([u_(1,pt),u_(2,We),u_(3,tn),u_(4,q0)],ug);class NDt extends $e{constructor(){super({id:"editor.action.linkedEditing",label:v("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:Ee.and(W.writable,W.hasRenameProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(Cu),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return dt.isUri(i)&&ee.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(a=>{a&&(a.setPosition(r),a.invokeWithinContext(o=>(this.reportTelemetry(o,a),this.run(o,a))))},zt):super.runCommand(e,t)}run(e,t){const n=ug.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const PDt=xr.bindToContribution(ug.get);ze(new PDt({id:"cancelLinkedEditingInput",precondition:Tye,handler:u=>u.clearRanges(),kbOpts:{kbExpr:W.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function Nye(u,e,t,n){const i=u.ordered(e);return x6e(i.map(r=>()=>Vq(this,void 0,void 0,function*(){try{return yield r.provideLinkedEditingRanges(e,t,n)}catch(a){Mi(a);return}})),r=>!!r&&pa(r==null?void 0:r.ranges))}q("editor.linkedEditingBackground",{dark:ae.fromHex("#f00").transparent(.3),light:ae.fromHex("#f00").transparent(.3),hcDark:ae.fromHex("#f00").transparent(.3),hcLight:ae.white},v("editorLinkedEditingBackground","Background color when the editor auto renames on type."));W1("_executeLinkedEditingProvider",(u,e,t)=>{const{linkedEditingRangeProvider:n}=u.get(We);return Nye(n,e,t,Kt.None)});fu(ug.ID,ug,1);be(NDt);var Pye=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let RDt=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return Pye(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}};class iL{constructor(e){this._disposables=new pe;let t=[];for(const[n,i]of e){const r=n.links.map(a=>new RDt(a,i));t=iL._union(t,r),TQ(n)&&this._disposables.add(n)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const n=[];let i,r,a,o;for(i=0,a=0,r=e.length,o=t.length;iPromise.resolve(r.provideLinks(e,t)).then(o=>{o&&(n[a]=[o,r])},Mi));return Promise.all(i).then(()=>{const r=new iL(b1(n));return t.isCancellationRequested?(r.dispose(),new iL([])):r})}ru.registerCommand("_executeLinkProvider",(u,...e)=>Pye(void 0,void 0,void 0,function*(){let[t,n]=e;Ru(t instanceof dt),typeof n!="number"&&(n=0);const{linkProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)return[];const a=yield Rye(i,r,Kt.None);if(!a)return[];for(let s=0;s=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},n_=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},ODt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},$q;let wv=$q=class extends ne{static get(e){return e.getContribution($q.ID)}constructor(e,t,n,i,r){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=i,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=r.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new Hu(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const a=this._register(new rR(e));this._register(a.onMouseMoveOrRelevantKeyDown(([o,s])=>{this._onEditorMouseMove(o,s)})),this._register(a.onExecute(o=>{this.onEditorMouseUp(o)})),this._register(a.onCancel(o=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(o=>{o.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(o=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(o=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(o=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(o=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return ODt(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Ui(t=>Rye(this.providers,e,t));try{const t=new va(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){zt(t)}finally{this.computePromise=null}}})}updateDecorations(e){const t=this.editor.getOption(77)==="altKey",n=[],i=Object.keys(this.currentOccurrences);for(const a of i){const o=this.currentOccurrences[a];n.push(o.decorationId)}const r=[];if(e)for(const a of e)r.push(kx.decoration(a,t));this.editor.changeDecorations(a=>{const o=a.deltaDecorations(n,r);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let s=0,l=o.length;s{i.activate(r,n),this.activeLinkDecorationId=i.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:i}=e;i.resolve(Kt.None).then(r=>{if(typeof r=="string"&&this.editor.hasModel()){const a=this.editor.getModel().uri;if(a.scheme===Ot.file&&r.startsWith(`${Ot.file}:`)){const o=dt.parse(r);if(o.scheme===Ot.file){const s=Sd(o);let l=null;s.startsWith("/./")?l=`.${s.substr(1)}`:s.startsWith("//./")&&(l=`.${s.substr(2)}`),l&&(r=Xnt(a,l))}}}return this.openerService.open(r,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},r=>{const a=r instanceof Error?r.message:r;a==="invalid"?this.notificationService.warn(v("invalid.url","Failed to open this link because it is not well-formed: {0}",i.url.toString())):a==="missing"?this.notificationService.warn(v("missing.url","Failed to open this link because its target is missing.")):zt(r)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const n of t){const i=this.currentOccurrences[n.id];if(i)return i}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};wv.ID="editor.linkDetector";wv=$q=IDt([n_(1,Cs),n_(2,bi),n_(3,We),n_(4,q0)],wv);const Bce={general:Lt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Lt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class kx{static decoration(e,t){return{range:e.range,options:kx._getOptions(e,t,!1)}}static _getOptions(e,t,n){const i=Object.assign({},n?Bce.active:Bce.general);return i.hoverMessage=jDt(e,t),i}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,kx._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,kx._getOptions(this.link,t,!1))}}function jDt(u,e){const t=u.url&&/^command:/i.test(u.url.toString()),n=u.tooltip?u.tooltip:t?v("links.navigate.executeCmd","Execute command"):v("links.navigate.follow","Follow link"),i=e?iu?v("links.navigate.kb.meta.mac","cmd + click"):v("links.navigate.kb.meta","ctrl + click"):iu?v("links.navigate.kb.alt.mac","option + click"):v("links.navigate.kb.alt","alt + click");if(u.url){let r="";if(/^command:/i.test(u.url.toString())){const o=u.url.toString().match(/^command:([^?#]+)/);if(o){const s=o[1];r=v("tooltip.explanation","Execute command {0}",s)}}return new Zr("",!0).appendLink(u.url.toString(!0).replace(/ /g,"%20"),n,r).appendMarkdown(` (${i})`)}else return new Zr().appendText(`${n} (${i})`)}class HDt extends $e{constructor(){super({id:"editor.action.openLink",label:v("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const n=wv.get(t);if(!n||!t.hasModel())return;const i=t.getSelections();for(const r of i){const a=n.getLinkOccurrence(r.getEndPosition());a&&n.openLinkOccurrence(a,!1)}}}fu(wv.ID,wv,1);be(HDt);class Kq extends ne{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const n=this._editor.getOption(116);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}Kq.ID="editor.contrib.longLinesHelper";fu(Kq.ID,Kq,2);const i_=q("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);q("editor.wordHighlightTextBackground",{light:i_,dark:i_,hcDark:i_,hcLight:i_},v("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const r_=q("editor.wordHighlightBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));q("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:En,hcLight:En},v("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable."));q("editor.wordHighlightTextBorder",{light:r_,dark:r_,hcDark:r_,hcLight:r_},v("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const VDt=q("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),$Dt=q("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),KDt=q("editorOverviewRuler.wordHighlightTextForeground",{dark:vb,light:vb,hcDark:vb,hcLight:vb},v("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),WDt=Lt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Jn($Dt),position:Zs.Center},minimap:{color:Jn(cP),position:ls.Inline}}),GDt=Lt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Jn(KDt),position:Zs.Center},minimap:{color:Jn(cP),position:ls.Inline}}),UDt=Lt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Jn(vb),position:Zs.Center},minimap:{color:Jn(cP),position:ls.Inline}}),qDt=Lt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),JDt=Lt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Jn(VDt),position:Zs.Center},minimap:{color:Jn(cP),position:ls.Inline}});function ZDt(u){return u===ak.Write?WDt:u===ak.Text?GDt:JDt}function YDt(u){return u?qDt:UDt}Kl((u,e)=>{const t=u.getColor(xX);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var QDt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},XDt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Wq;function Cg(u,e){const t=e.filter(n=>!u.find(i=>i.equals(n)));if(t.length>=1){const n=t.map(r=>`line ${r.viewState.position.lineNumber} column ${r.viewState.position.column}`).join(", "),i=t.length===1?v("cursorAdded","Cursor added: {0}",n):v("cursorsAdded","Cursors added: {0}",n);jm(i)}}class e5t extends $e{constructor(){super({id:"editor.action.insertCursorAbove",label:v("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let i=!0;n&&n.logicalLine===!1&&(i=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const a=r.getCursorStates();r.setCursorStates(n.source,3,br.addCursorUp(r,a,i)),r.revealTopMostCursor(n.source),Cg(a,r.getCursorStates())}}class t5t extends $e{constructor(){super({id:"editor.action.insertCursorBelow",label:v("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let i=!0;n&&n.logicalLine===!1&&(i=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const a=r.getCursorStates();r.setCursorStates(n.source,3,br.addCursorDown(r,a,i)),r.revealBottomMostCursor(n.source),Cg(a,r.getCursorStates())}}class u5t extends $e{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let i=e.startLineNumber;i1&&n.push(new Ye(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const n=t.getModel(),i=t.getSelections(),r=t._getViewModel(),a=r.getCursorStates(),o=[];i.forEach(s=>this.getCursorsForSelection(s,n,o)),o.length>0&&t.setSelections(o),Cg(a,r.getCursorStates())}}class n5t extends $e{constructor(){super({id:"editor.action.addCursorsToBottom",label:v("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=t.getModel().getLineCount(),r=[];for(let s=n[0].startLineNumber;s<=i;s++)r.push(new Ye(s,n[0].startColumn,s,n[0].endColumn));const a=t._getViewModel(),o=a.getCursorStates();r.length>0&&t.setSelections(r),Cg(o,a.getCursorStates())}}class i5t extends $e{constructor(){super({id:"editor.action.addCursorsToTop",label:v("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),i=[];for(let o=n[0].startLineNumber;o>=1;o--)i.push(new Ye(o,n[0].startColumn,o,n[0].endColumn));const r=t._getViewModel(),a=r.getCursorStates();i.length>0&&t.setSelections(i),Cg(a,r.getCursorStates())}}class a_{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}class FF{static create(e,t){if(!e.hasModel())return null;const n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new FF(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let i=!1,r,a;const o=e.getSelections();o.length===1&&o[0].isEmpty()?(i=!0,r=!0,a=!0):(r=n.wholeWord,a=n.matchCase);const s=e.getSelection();let l,c=null;if(s.isEmpty()){const d=e.getConfiguredWordAtPosition(s.getStartPosition());if(!d)return null;l=d.word,c=new Ye(s.startLineNumber,d.startColumn,s.startLineNumber,d.endColumn)}else l=e.getModel().getValueInRange(s).replace(/\r\n/g,` +`);return new FF(e,t,i,l,r,a,c)}constructor(e,t,n,i,r,a,o){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=r,this.matchCase=a,this.currentMatch=o}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const i=this.currentMatch;return this.currentMatch=null,i}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return n?new Ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new a_(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const i=this.currentMatch;return this.currentMatch=null,i}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return n?new Ye(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}class Q3 extends ne{static get(e){return e.getContribution(Q3.ID)}constructor(e){super(),this._sessionDispose=this._register(new pe),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=FF.create(this._editor,e);if(!t)return;this._session=t;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(i=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(i=>{(i.matchCase||i.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new Ye(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!Iye(this._editor.getModel(),t,i)){const a=this._editor.getModel(),o=[];for(let s=0,l=t.length;s0&&n.isRegex){const i=this._editor.getModel();n.searchScope?t=i.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(129):null,!1,1073741824):t=i.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){const i=this._editor.getSelection();for(let r=0,a=t.length;rnew Ye(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn)))}}}Q3.ID="editor.contrib.multiCursorController";class _6 extends $e{run(e,t){const n=Q3.get(t);if(!n)return;const i=t._getViewModel();if(i){const r=i.getCursorStates(),a=so.get(t);if(a)this._run(n,a);else{const o=e.get(mt).createInstance(so,t);this._run(n,o),o.dispose()}Cg(r,i.getCursorStates())}}}class r5t extends _6{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2082,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class a5t extends _6{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class o5t extends _6{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:Vi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class s5t extends _6{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class l5t extends _6{constructor(){super({id:"editor.action.selectHighlights",label:v("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:3114,weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"3_multi",title:v({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class c5t extends _6{constructor(){super({id:"editor.action.changeAll",label:v("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:Ee.and(W.writable,W.editorTextFocus),kbOpts:{kbExpr:W.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class d5t{constructor(e,t,n,i,r){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=i,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,r&&this._model===r._model&&this._searchText===r._searchText&&this._matchCase===r._matchCase&&this._wordSeparators===r._wordSeparators&&this._modelVersionId===r._modelVersionId&&(this._cachedFindMatches=r._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(j.compareRangesUsingStarts)),this._cachedFindMatches}}let yF=Wq=class extends ne{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(107),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Hu(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(i=>{this._isEnabled=e.getOption(107)})),this._register(e.onDidChangeCursorSelection(i=>{this._isEnabled&&(i.selection.isEmpty()?i.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(i=>{this._setState(null)})),this._register(e.onDidChangeModelContent(i=>{this._isEnabled&&this.updateSoon.schedule()}));const n=so.get(e);n&&this._register(n.getState().onFindReplaceStateChange(i=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(Wq._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,n){if(!t||!n.hasModel())return null;const i=n.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const r=Q3.get(n);if(!r)return null;const a=so.get(n);if(!a)return null;let o=r.getSession(a);if(!o){const c=n.getSelections();if(c.length>1){const h=a.getState().matchCase;if(!Iye(n.getModel(),c,h))return null}o=FF.create(n,a)}if(!o||o.currentMatch||/^[ \t]+$/.test(o.searchText)||o.searchText.length>200)return null;const s=a.getState(),l=s.matchCase;if(s.isRevealed){let c=s.searchString;l||(c=c.toLowerCase());let d=o.searchText;if(l||(d=d.toLowerCase()),c===d&&o.matchCase===s.matchCase&&o.wholeWord===s.wholeWord&&!s.isRegex)return null}return new d5t(n.getModel(),o.searchText,o.matchCase,o.wholeWord?n.getOption(129):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const n=this.state.findMatches(),i=this.editor.getSelections();i.sort(j.compareRangesUsingStarts);const r=[];for(let s=0,l=0,c=n.length,d=i.length;s=d)r.push(h),s++;else{const E=j.compareRangesUsingStarts(h,i[l]);E<0?((i[l].isEmpty()||!j.areIntersecting(h,i[l]))&&r.push(h),s++):(E>0||s++,l++)}}const a=this._languageFeaturesService.documentHighlightProvider.has(t)&&this.editor.getOption(80),o=r.map(s=>({range:s,options:YDt(a)}));this._decorations.set(o)}dispose(){this._setState(null),super.dispose()}};yF.ID="editor.contrib.selectionHighlighter";yF=Wq=QDt([XDt(1,We)],yF);function Iye(u,e,t){const n=wce(u,e[0],!t);for(let i=1,r=e.length;iOye(void 0,void 0,void 0,function*(){const[t,n,i]=e;Ru(dt.isUri(t)),Ru(ee.isIPosition(n)),Ru(typeof i=="string"||!i);const r=u.get(We),a=yield u.get(Vo).createModelReference(t);try{const o=yield jye(r.signatureHelpProvider,a.object.textEditorModel,ee.lift(n),{triggerKind:E1.Invoke,isRetrigger:!1,triggerCharacter:i},Kt.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{a.dispose()}}));var m5t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},dE;(function(u){u.Default={type:0};class e{constructor(i,r){this.request=i,this.previouslyActiveHints=r,this.type=2}}u.Pending=e;class t{constructor(i){this.hints=i,this.type=1}}u.Active=t})(dE||(dE={}));class IR extends ne{constructor(e,t,n=IR.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new Q),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=dE.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Ir),this.triggerChars=new _B,this.retriggerChars=new _B,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Tl(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(i=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(i=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(i=>this.onCursorChange(i))),this._register(this.editor.onDidChangeModelContent(i=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(i=>this.onDidType(i))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=dE.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!this.providers.has(n))return;const i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(i),t).catch(zt)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,i=this.editor.getOption(85).cycle;if((e<2||n)&&!i){this.cancel();return}this.updateActiveSignature(n&&i?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,i=this.editor.getOption(85).cycle;if((e<2||n)&&!i){this.cancel();return}this.updateActiveSignature(n&&i?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new dE.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return m5t(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const i=this._pendingTriggers.reduce(g5t);this._pendingTriggers=[];const r={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const a=this.editor.getModel(),o=this.editor.getPosition();this.state=new dE.Pending(Ui(s=>jye(this.providers,a,o,r,s)),n);try{const s=yield this.state.request;return e!==this.triggerId?(s==null||s.dispose(),!1):!s||!s.value.signatures||s.value.signatures.length===0?(s==null||s.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new dE.Active(s.value),this._lastSignatureHelpResult.value=s,this._onChangedHints.fire(this.state.hints),!0)}catch(s){return e===this.triggerId&&(this.state=dE.Default),zt(s),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const n of t.signatureHelpTriggerCharacters||[])if(n.length){const i=n.charCodeAt(0);this.triggerChars.add(i),this.retriggerChars.add(i)}for(const n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:E1.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:E1.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:E1.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}IR.DEFAULT_DELAY=120;function g5t(u,e){switch(e.triggerKind){case E1.Invoke:return e;case E1.ContentChange:return u;case E1.TriggerCharacter:default:return e}}var f5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},VH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gq;const As=ve,p5t=hi("parameter-hints-next",we.chevronDown,v("parameterHintsNextIcon","Icon for show next parameter hint.")),D5t=hi("parameter-hints-previous",we.chevronUp,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let rL=Gq=class extends ne{constructor(e,t,n,i,r){super(),this.editor=e,this.model=t,this.renderDisposeables=this._register(new pe),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new h4({editor:e},r,i)),this.keyVisible=X3.Visible.bindTo(n),this.keyMultipleSignatures=X3.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=As(".editor-widget.parameter-hints-widget"),t=me(e,As(".phwrapper"));t.tabIndex=-1;const n=me(t,As(".controls")),i=me(n,As(".button"+st.asCSSSelector(D5t))),r=me(n,As(".overloads")),a=me(n,As(".button"+st.asCSSSelector(p5t)));this._register(ce(i,"click",h=>{It.stop(h),this.previous()})),this._register(ce(a,"click",h=>{It.stop(h),this.next()}));const o=As(".body"),s=new EA(o,{alwaysConsumeMouseWheel:!0});this._register(s),t.appendChild(s.getDomNode());const l=me(o,As(".signature")),c=me(o,As(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:r,docs:c,scrollbar:s},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const d=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${h.fontSize}px`,this.domNodes.element.style.lineHeight=`${h.lineHeight/h.fontSize}`};d(),this._register(Ne.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(E=>E.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)===null||e===void 0||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)===null||e===void 0||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const r=me(this.domNodes.signature,As(".code")),a=this.editor.getOption(50);r.style.fontSize=`${a.fontSize}px`,r.style.fontFamily=a.fontFamily;const o=i.parameters.length>0,s=(t=i.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(o)this.renderParameters(r,i,s);else{const d=me(r,As("span"));d.textContent=i.label}const l=i.parameters[s];if(l!=null&&l.documentation){const d=As("span.documentation");if(typeof l.documentation=="string")d.textContent=l.documentation;else{const h=this.renderMarkdownDocs(l.documentation);d.appendChild(h.element)}me(this.domNodes.docs,As("p",{},d))}if(i.documentation!==void 0)if(typeof i.documentation=="string")me(this.domNodes.docs,As("p",{},i.documentation));else{const d=this.renderMarkdownDocs(i.documentation);me(this.domNodes.docs,d.element)}const c=this.hasDocs(i,l);if(this.domNodes.signature.classList.toggle("has-docs",c),this.domNodes.docs.classList.toggle("empty",!c),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let d="";const h=i.parameters[s];Array.isArray(h.label)?d=i.label.substring(h.label[0],h.label[1]):d=h.label,h.documentation&&(d+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),i.documentation&&(d+=typeof i.documentation=="string"?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==d&&(ga(v("hint","{0}, hint",d)),this.announcedLabel=d)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var n;(n=this.domNodes)===null||n===void 0||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Nf(t.documentation).length>0||t&&typeof t.documentation=="object"&&Nf(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Nf(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Nf(e.documentation.value).length>0)}renderParameters(e,t,n){const[i,r]=this.getParameterLabelOffsets(t,n),a=document.createElement("span");a.textContent=t.label.substring(0,i);const o=document.createElement("span");o.textContent=t.label.substring(i,r),o.className="parameter active";const s=document.createElement("span");s.textContent=t.label.substring(r),me(e,a,o,s)}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const i=new RegExp(`(\\W|^)${Js(n.label)}(?=\\W|$)`,"g");i.test(e.label);const r=i.lastIndex-n.label.length;return r>=0?[r,i.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Gq.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}};rL.ID="editor.widget.parameterHintsWidget";rL=Gq=f5t([VH(2,pt),VH(3,Cs),VH(4,vn)],rL);q("editorHoverWidget.highlightForeground",{dark:gl,light:gl,hcDark:gl,hcLight:gl},v("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var x5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Lce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Uq;let ep=Uq=class extends ne{static get(e){return e.getContribution(Uq.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new IR(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(i=>{var r;i?(this.widget.value.show(),this.widget.value.render(i)):(r=this.widget.rawValue)===null||r===void 0||r.hide()})),this.widget=new mg(()=>this._register(t.createInstance(rL,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)===null||e===void 0||e.previous()}next(){var e;(e=this.widget.rawValue)===null||e===void 0||e.next()}trigger(e){this.model.trigger(e,0)}};ep.ID="editor.controller.parameterHints";ep=Uq=x5t([Lce(1,mt),Lce(2,We)],ep);class v5t extends $e{constructor(){super({id:"editor.action.triggerParameterHints",label:v("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:W.hasSignatureHelpProvider,kbOpts:{kbExpr:W.editorTextFocus,primary:3082,weight:100}})}run(e,t){const n=ep.get(t);n==null||n.trigger({triggerKind:E1.Invoke})}}fu(ep.ID,ep,2);be(v5t);const Mte=100+75,Tte=xr.bindToContribution(ep.get);ze(new Tte({id:"closeParameterHints",precondition:X3.Visible,handler:u=>u.cancel(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:9,secondary:[1033]}}));ze(new Tte({id:"showPrevParameterHint",precondition:Ee.and(X3.Visible,X3.MultipleSignatures),handler:u=>u.previous(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));ze(new Tte({id:"showNextParameterHint",precondition:Ee.and(X3.Visible,X3.MultipleSignatures),handler:u=>u.next(),kbOpts:{weight:Mte,kbExpr:W.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var C5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const OR=new Pe("renameInputVisible",!1,v("renameInputVisible","Whether the rename input widget is visible"));let qq=class{constructor(e,t,n,i,r){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=i,this._disposables=new pe,this.allowEditorOverflow=!0,this._visibleContextKey=OR.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",v("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,n,i,r;if(!this._input||!this._domNode)return;const a=e.getColor(t1),o=e.getColor(fX);this._domNode.style.backgroundColor=String((t=e.getColor(ti))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=a?` 0 0 8px 2px ${a}`:"",this._domNode.style.border=o?`1px solid ${o}`:"",this._domNode.style.color=String((n=e.getColor(Y6e))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((i=e.getColor(Z6e))!==null&&i!==void 0?i:"");const s=e.getColor(Q6e);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=(r=s==null?void 0:s.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(50);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var e,t;const[n,i]=this._acceptKeybindings;return this._label.innerText=v({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(e=this._keybindingService.lookupKeybinding(n))===null||e===void 0?void 0:e.getLabel(),(t=this._keybindingService.lookupKeybinding(i))===null||t===void 0?void 0:t.getLabel()),null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){var t;(t=this._currentAcceptInput)===null||t===void 0||t.call(this,e)}cancelInput(e){var t;(t=this._currentCancelInput)===null||t===void 0||t.call(this,e)}getInput(e,t,n,i,r,a){this._domNode.classList.toggle("preview",r),this._position=new ee(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",i.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const o=new pe;return new Promise(s=>{this._currentCancelInput=l=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s(l),!0),this._currentAcceptInput=l=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s({newName:this._input.value,wantsPreview:r&&l})},o.add(a.onCancellationRequested(()=>this.cancelInput(!0))),o.add(this._editor.onDidBlurEditorWidget(()=>{var l;return this.cancelInput(!(!((l=this._domNode)===null||l===void 0)&&l.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{o.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};qq=C5t([$H(2,sr),$H(3,qu),$H(4,pt)],qq);var b5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Jg=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},h3=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Jq;class Nte{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return h3(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` `):void 0}:{range:j.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` `):void 0}})}provideRenameEdits(e,t){return h3(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,n,i){return h3(this,void 0,void 0,function*(){const r=this._providers[t];if(!r)return{edits:[],rejectReason:n.join(` -`)};const a=yield r.provideRenameEdits(this.model,this.position,e,i);if(a){if(a.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(a.rejectReason),i)}else return this._provideRenameEdits(e,t+1,n.concat(v("no result","No result.")),i);return a})}}function k5t(u,e,t,n){return h3(this,void 0,void 0,function*(){const i=new Nte(e,t,u),r=yield i.resolveRenameLocation(Kt.None);return r!=null&&r.rejectReason?{edits:[],rejectReason:r.rejectReason}:i.provideRenameEdits(n,Kt.None)})}let tp=Jq=class{static get(e){return e.getContribution(Jq.ID)}constructor(e,t,n,i,r,a,o,s){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=i,this._progressService=r,this._logService=a,this._configService=o,this._languageFeaturesService=s,this._disposableStore=new pe,this._cts=new vi,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(qq,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return h3(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new vi,!this.editor.hasModel())return;const n=this.editor.getPosition(),i=new Nte(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return;const r=new Gm(this.editor,5,void 0,this._cts.token);let a;try{const m=i.resolveRenameLocation(r.token);this._progressService.showWhile(m,250),a=yield m}catch(m){(e=ls.get(this.editor))===null||e===void 0||e.showMessage(m||v("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{r.dispose()}if(!a)return;if(a.rejectReason){(t=ls.get(this.editor))===null||t===void 0||t.showMessage(a.rejectReason,n);return}if(r.token.isCancellationRequested)return;const o=new Gm(this.editor,5,a.range,this._cts.token),s=this.editor.getSelection();let l=0,c=a.text.length;!j.isEmpty(s)&&!j.spansMultipleLines(s)&&j.containsRange(a.range,s)&&(l=Math.max(0,s.startColumn-a.range.startColumn),c=Math.min(a.range.endColumn,s.endColumn)-a.range.startColumn);const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(a.range,a.text,l,c,d,o.token);if(typeof h=="boolean"){h&&this.editor.focus(),o.dispose();return}this.editor.focus();const E=YN(i.provideRenameEdits(h.newName,o.token),o.token).then(m=>h3(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(j.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:v("label","Renaming '{0}' to '{1}'",a==null?void 0:a.text,h.newName),code:"undoredo.rename",quotableLabel:v("quotableLabel","Renaming {0} to {1}",a==null?void 0:a.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&ga(v("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",a.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(v("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(v("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{o.dispose()});return this._progressService.showWhile(E,250),E})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};tp.ID="editor.contrib.renameController";tp=Jq=b5t([Jg(1,mt),Jg(2,bi),Jg(3,xA),Jg(4,Dg),Jg(5,i0),Jg(6,sX),Jg(7,We)],tp);class F5t extends $e{constructor(){super({id:"editor.action.rename",label:v("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Ee.and(W.writable,W.hasRenameProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(Cu),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return dt.isUri(i)&&ee.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(a=>{a&&(a.setPosition(r),a.invokeWithinContext(o=>(this.reportTelemetry(o,a),this.run(o,a))))},zt):super.runCommand(e,t)}run(e,t){const n=tp.get(t);return n?n.run():Promise.resolve()}}fu(tp.ID,tp,4);be(F5t);const Pte=xr.bindToContribution(tp.get);ze(new Pte({id:"acceptRenameInput",precondition:OR,handler:u=>u.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:3}}));ze(new Pte({id:"acceptRenameInputWithPreview",precondition:Ee.and(OR,Ee.has("config.editor.rename.enablePreview")),handler:u=>u.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:1024+3}}));ze(new Pte({id:"cancelRenameInput",precondition:OR,handler:u=>u.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:W.focus,primary:9,secondary:[1033]}}));W1("_executeDocumentRenameProvider",function(u,e,t,...n){const[i]=n;Ru(typeof i=="string");const{renameProvider:r}=u.get(We);return k5t(r,e,t,i)});W1("_executePrepareRename",function(u,e,t){return h3(this,void 0,void 0,function*(){const{renameProvider:n}=u.get(We),r=yield new Nte(e,t,n).resolveRenameLocation(Kt.None);if(r!=null&&r.rejectReason)throw new Error(r.rejectReason);return r})});jn.as(Ed.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function y5t(u){for(let e=0,t=u.length;e0?t[0]:[]}function Kye(u,e,t,n,i){return ng(this,void 0,void 0,function*(){const r=B5t(u,e),a=yield Promise.all(r.map(o=>ng(this,void 0,void 0,function*(){let s,l=null;try{s=yield o.provideDocumentSemanticTokens(e,o===t?n:null,i)}catch(c){l=c,s=null}return(!s||!jR(s)&&!Vye(s))&&(s=null),new S5t(o,s,l)})));for(const o of a){if(o.error)throw o.error;if(o.tokens)return o}return a.length>0?a[0]:null})}function w5t(u,e){const t=u.orderedGroups(e);return t.length>0?t[0]:null}class L5t{constructor(e,t){this.provider=e,this.tokens=t}}function z5t(u,e){return u.has(e)}function Wye(u,e){const t=u.orderedGroups(e);return t.length>0?t[0]:[]}function Rte(u,e,t,n){return ng(this,void 0,void 0,function*(){const i=Wye(u,e),r=yield Promise.all(i.map(a=>ng(this,void 0,void 0,function*(){let o;try{o=yield a.provideDocumentRangeSemanticTokens(e,t,n)}catch(s){Mi(s),o=null}return(!o||!jR(o))&&(o=null),new L5t(a,o)})));for(const a of r)if(a.tokens)return a;return r.length>0?r[0]:null})}ru.registerCommand("_provideDocumentSemanticTokensLegend",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t]=e;Ru(t instanceof dt);const n=u.get(_n).getModel(t);if(!n)return;const{documentSemanticTokensProvider:i}=u.get(We),r=w5t(i,n);return r?r[0].getLegend():u.get(ni).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));ru.registerCommand("_provideDocumentSemanticTokens",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t]=e;Ru(t instanceof dt);const n=u.get(_n).getModel(t);if(!n)return;const{documentSemanticTokensProvider:i}=u.get(We);if(!$ye(i,n))return u.get(ni).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const r=yield Kye(i,n,null,null,Kt.None);if(!r)return;const{provider:a,tokens:o}=r;if(!o||!jR(o))return;const s=Hye({id:0,type:"full",data:o.data});return o.resultId&&a.releaseDocumentSemanticTokens(o.resultId),s}));ru.registerCommand("_provideDocumentRangeSemanticTokensLegend",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(t instanceof dt);const i=u.get(_n).getModel(t);if(!i)return;const{documentRangeSemanticTokensProvider:r}=u.get(We),a=Wye(r,i);if(a.length===0)return;if(a.length===1)return a[0].getLegend();if(!n||!j.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),a[0].getLegend();const o=yield Rte(r,i,j.lift(n),Kt.None);if(o)return o.provider.getLegend()}));ru.registerCommand("_provideDocumentRangeSemanticTokens",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(t instanceof dt),Ru(j.isIRange(n));const i=u.get(_n).getModel(t);if(!i)return;const{documentRangeSemanticTokensProvider:r}=u.get(We),a=yield Rte(r,i,j.lift(n),Kt.None);if(!(!a||!a.tokens))return Hye({id:0,type:"full",data:a.tokens.data})}));const Ite="editor.semanticHighlighting";function Zq(u,e,t){var n;const i=(n=t.getValue(Ite,{overrideIdentifier:u.getLanguageId(),resource:u.uri}))===null||n===void 0?void 0:n.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var Gye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Od=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iE;let Yq=class extends ne{constructor(e,t,n,i,r,a){super(),this._watchers=Object.create(null);const o=c=>{this._watchers[c.uri.toString()]=new AF(c,e,n,r,a)},s=(c,d)=>{d.dispose(),delete this._watchers[c.uri.toString()]},l=()=>{for(const c of t.getModels()){const d=this._watchers[c.uri.toString()];Zq(c,n,i)?d||o(c):d&&s(c,d)}};this._register(t.onModelAdded(c=>{Zq(c,n,i)&&o(c)})),this._register(t.onModelRemoved(c=>{const d=this._watchers[c.uri.toString()];d&&s(c,d)})),this._register(i.onDidChangeConfiguration(c=>{c.affectsConfiguration(Ite)&&l()})),this._register(n.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};Yq=Gye([Od(0,kP),Od(1,_n),Od(2,sr),Od(3,tu),Od(4,U0),Od(5,We)],Yq);let AF=iE=class extends ne{constructor(e,t,n,i,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=i.for(this._provider,"DocumentSemanticTokens",{min:iE.REQUEST_MIN_DELAY,max:iE.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Hu(()=>this._fetchDocumentSemanticTokensNow(),iE.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const a=()=>{Su(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const o of this._provider.all(e))typeof o.onDidChange=="function"&&this._documentProvidersChangeListeners.push(o.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};a(),this._register(this._provider.onDidChange(()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(o=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Su(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!$ye(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new vi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=Kye(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const r=[],a=this._model.onDidChangeContent(s=>{r.push(s)}),o=new va(!1);i.then(s=>{if(this._debounceInformation.update(this._model,o.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),!s)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:l,tokens:c}=s,d=this._semanticTokensStylingService.getStyling(l);this._setDocumentSemanticTokens(l,c||null,d,r)}},s=>{s&&(dd(s)||typeof s.message=="string"&&s.message.indexOf("busy")!==-1)||zt(s),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,i,r){r=Math.min(r,n.length-i,e.length-t);for(let a=0;a{(i.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),a();return}if(Vye(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let o=0;for(const h of t.edits)o+=(h.data?h.data.length:0)-h.deleteCount;const s=r.data,l=new Uint32Array(s.length+o);let c=s.length,d=l.length;for(let h=t.edits.length-1;h>=0;h--){const E=t.edits[h];if(E.start>s.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,E.start,s.length),this._model.tokenization.setSemanticTokens(null,!0);return}const m=c-(E.start+E.deleteCount);m>0&&(iE._copy(s,c-m,l,d-m,m),d-=m),E.data&&(iE._copy(E.data,0,l,d-E.data.length,E.data.length),d-=E.data.length),c=E.start}c>0&&iE._copy(s,0,l,0,c),t={resultId:t.resultId,data:l}}}if(jR(t)){this._currentDocumentResponse=new M5t(e,t.resultId,t.data);const o=hbe(t,n,this._model.getLanguageId());if(i.length>0)for(const s of i)for(const l of o)for(const c of s.changes)l.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(o,!0)}else this._model.tokenization.setSemanticTokens(null,!0);a()}};AF.REQUEST_MIN_DELAY=300;AF.REQUEST_MAX_DELAY=2e3;AF=iE=Gye([Od(1,kP),Od(2,sr),Od(3,U0),Od(4,We)],AF);class M5t{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}KP(Yq);var T5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},LC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let _F=class extends ne{constructor(e,t,n,i,r,a){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=i,this._editor=e,this._provider=a.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Hu(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const o=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{o()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),o()})),this._register(this._editor.onDidChangeModelContent(s=>{this._cancelAll(),o()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),o()})),this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(Ite)&&(this._cancelAll(),o())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),o()})),o()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){const n=e.getVersionId(),i=Ui(a=>Promise.resolve(Rte(this._provider,e,t,a))),r=new va(!1);return i.then(a=>{if(this._debounceInformation.update(e,r.elapsed()),!a||!a.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:o,tokens:s}=a,l=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,hbe(s,l,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(i),()=>this._removeOutstandingRequest(i)),i}};_F.ID="editor.contrib.viewportSemanticTokens";_F=T5t([LC(1,kP),LC(2,sr),LC(3,tu),LC(4,U0),LC(5,We)],_F);fu(_F.ID,_F,1);class N5t{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const n=[];for(const i of t){const r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,i),this._addWordRanges(r,e,i),this._addWhitespaceLine(r,e,i),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){const i=t.getWordAtPosition(n);if(!i)return;const{word:r,startColumn:a}=i,o=n.column-a;let s=o,l=o,c=0;for(;s>=0;s--){const d=r.charCodeAt(s);if(s!==o&&(d===95||d===45))break;if(_E(d)&&Pd(c))break;c=d}for(s+=1;l0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new j(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}var P5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},R5t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},HR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Qq;class Ote{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new Ote(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}let Lv=Qq=class{static get(e){return e.getContribution(Qq.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return HR(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield qye(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(112),Kt.None).then(r=>{var a;if(!(!pa(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!di(this._editor.getSelections(),t,(o,s)=>o.equalsSelection(s)))){for(let o=0;os.containsPosition(t[o].getStartPosition())&&s.containsPosition(t[o].getEndPosition())),r[o].unshift(t[o]);this._state=r.map(o=>new Ote(0,o)),(a=this._selectionListener)===null||a===void 0||a.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var o;this._ignoreSelection||((o=this._selectionListener)===null||o===void 0||o.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(r=>r.mov(e));const i=this._state.map(r=>Ye.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(i)}finally{this._ignoreSelection=!1}})}};Lv.ID="editor.contrib.smartSelectController";Lv=Qq=P5t([R5t(1,We)],Lv);class Uye extends $e{constructor(e,t){super(t),this._forward=e}run(e,t){return HR(this,void 0,void 0,function*(){const n=Lv.get(t);n&&(yield n.run(this._forward))})}}class I5t extends Uye{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:v("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}ru.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class O5t extends Uye{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:v("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}fu(Lv.ID,Lv,4);be(I5t);be(O5t);function qye(u,e,t,n,i){return HR(this,void 0,void 0,function*(){const r=u.all(e).concat(new N5t(n.selectSubwords));r.length===1&&r.unshift(new Bs);const a=[],o=[];for(const s of r)a.push(Promise.resolve(s.provideSelectionRanges(e,t,i)).then(l=>{if(pa(l)&&l.length===t.length)for(let c=0;c{if(s.length===0)return[];s.sort((h,E)=>ee.isBefore(h.getStartPosition(),E.getStartPosition())?1:ee.isBefore(E.getStartPosition(),h.getStartPosition())||ee.isBefore(h.getEndPosition(),E.getEndPosition())?-1:ee.isBefore(E.getEndPosition(),h.getEndPosition())?1:0);const l=[];let c;for(const h of s)(!c||j.containsRange(h,c)&&!j.equalsRange(h,c))&&(l.push(h),c=h);if(!n.selectLeadingAndTrailingWhitespace)return l;const d=[l[0]];for(let h=1;hu}),KH="data-sticky-line-index",Tce="data-sticky-is-line",V5t="data-sticky-is-line-number",Nce="data-sticky-is-folding-icon";class $5t extends ne{constructor(e){super(),this._editor=e,this._foldingIconStore=new pe,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Jm),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&t(),n.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&n===1/0)return;this._previousState=e;const i=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const a=[...e.startLineNumbers];e.showEndForLine!==null&&(a[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=a}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(i,t,n)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Nr(this._lineNumbersDomNode),Nr(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}_renderRootNode(e,t,n=1/0){return H5t(this,void 0,void 0,function*(){const i=this._editor.getLayoutInfo();for(const[a,o]of this._lineNumbers.entries()){const s=e[a],l=o>=n||(s==null?void 0:s.lineNumber)!==o?this._renderChildNode(a,o,t,i):this._updateTopAndZIndexOfStickyLine(s);l&&(this._linesDomNode.appendChild(l.lineDomNode),this._lineNumbersDomNode.appendChild(l.lineNumberDomNode),this._stickyLines.push(l))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const r=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(r===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${r}px`,this._linesDomNodeScrollable.style.height=`${r}px`,this._rootDomNode.style.height=`${r}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(ce(this._lineNumbersDomNode,Me.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(ce(this._lineNumbersDomNode,Me.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,i){const r=this._editor._getViewModel();if(!r)return;const a=r.coordinatesConverter.convertModelPositionToViewPosition(new ee(t,1)).lineNumber,o=r.getViewLineRenderingData(a),s=this._editor.getOption(67);let l;try{l=as.filter(o.inlineDecorations,a,o.minColumn,o.maxColumn)}catch{l=[]}const c=new fg(!0,!0,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,0,o.tokens,l,o.tabSize,o.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new h6(2e3),h=sA(c,d);let E;Mce?E=Mce.createHTML(d.build()):E=d.build();const m=document.createElement("span");m.setAttribute(KH,String(e)),m.setAttribute(Tce,""),m.setAttribute("role","listitem"),m.tabIndex=0,m.className="sticky-line-content",m.classList.add(`stickyLine${t}`),m.style.lineHeight=`${this._lineHeight}px`,m.innerHTML=E;const g=document.createElement("span");g.setAttribute(KH,String(e)),g.setAttribute(V5t,""),g.className="sticky-line-number",g.style.lineHeight=`${this._lineHeight}px`;const f=i.contentLeft;g.style.width=`${f}px`;const p=document.createElement("span");s.renderType===1||s.renderType===3&&t%10===0?p.innerText=t.toString():s.renderType===2&&(p.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),p.className="sticky-line-number-inner",p.style.lineHeight=`${this._lineHeight}px`,p.style.width=`${i.lineNumbersWidth}px`,p.style.paddingLeft=`${i.lineNumbersLeft}px`,g.appendChild(p);const D=this._renderFoldingIconForLine(n,t);D&&g.appendChild(D.domNode),this._editor.applyFontInfo(m),this._editor.applyFontInfo(p),g.style.lineHeight=`${this._lineHeight}px`,m.style.lineHeight=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`;const x=new K5t(e,t,m,g,D,h.characterMapping);return this._updateTopAndZIndexOfStickyLine(x)}_updateTopAndZIndexOfStickyLine(e){var t;const n=e.index,i=e.lineDomNode,r=e.lineNumberDomNode,a=n===this._lineNumbers.length-1,o="0",s="1";i.style.zIndex=a?o:s,r.style.zIndex=a?o:s;const l=`${n*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,c=`${n*this._lineHeight}px`;return i.style.top=a?l:c,r.style.top=a?l:c,e}_renderFoldingIconForLine(e,t){const n=this._editor.getOption(109);if(!e||n==="never")return;const i=e.regions,r=i.findRange(t),a=i.getStartLineNumber(r);if(!(t===a))return;const s=i.isCollapsed(r),l=new W5t(s,a,i.getEndLineNumber(r),this._lineHeight);return l.setVisible(this._isOnGlyphMargin?!0:s||n==="always"),l.domNode.setAttribute(Nce,""),l}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const n=kX(t.characterMapping,e,0);return new ee(t.lineNumber,n)}getLineNumberFromChildDomNode(e){var t,n;return(n=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&n!==void 0?n:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,KH);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,Tce)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Nce)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}}class K5t{constructor(e,t,n,i,r,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=i,this.foldingIcon=r,this.characterMapping=a}}class W5t{constructor(e,t,n,i){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=i,this.domNode=document.createElement("div"),this.domNode.style.width=`${i}px`,this.domNode.style.height=`${i}px`,this.domNode.className=st.asClassName(e?CR:vR)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class F2{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class aL{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}}class Jye{constructor(e,t,n,i){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=i}}var VR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SF=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Pce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},y2;(function(u){u.OUTLINE_MODEL="outlineModel",u.FOLDING_PROVIDER_MODEL="foldingProviderModel",u.INDENTATION_MODEL="indentationModel"})(y2||(y2={}));var jE;(function(u){u[u.VALID=0]="VALID",u[u.INVALID=1]="INVALID",u[u.CANCELED=2]="CANCELED"})(jE||(jE={}));let Xq=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Tl(300)),this._updateOperation=this._register(new pe);const r=new eJ(n),a=new uJ(this._editor,n),o=new tJ(this._editor,t);switch(i){case y2.OUTLINE_MODEL:this._modelProviders.push(r),this._modelProviders.push(a),this._modelProviders.push(o);break;case y2.FOLDING_PROVIDER_MODEL:this._modelProviders.push(a),this._modelProviders.push(o);break;case y2.INDENTATION_MODEL:this._modelProviders.push(o);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return Pce(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>Pce(this,void 0,void 0,function*(){for(const i of this._modelProviders){const{statusPromise:r,modelPromise:a}=i.computeStickyModel(e,t,n);this._modelPromise=a;const o=yield r;if(this._modelPromise!==a)return null;switch(o){case jE.CANCELED:return this._updateOperation.clear(),null;case jE.VALID:return i.stickyModel}}return null})).catch(i=>(zt(i),null))})}};Xq=VR([SF(1,tn),SF(2,We)],Xq);class Zye{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,jE.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const i=Ui(r=>this.createModelFromProvider(e,t,r));return{statusPromise:i.then(r=>this.isModelValid(r)?n.isCancellationRequested?jE.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,r),jE.VALID):this._invalid()).then(void 0,r=>(zt(r),jE.CANCELED)),modelPromise:i}}isModelValid(e){return!0}isProviderValid(e){return!0}}let eJ=class extends Zye{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return kh.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,i){var r;const{stickyOutlineElement:a,providerID:o}=this._stickyModelFromOutlineModel(i,(r=this._stickyModel)===null||r===void 0?void 0:r.outlineProviderId);return new Jye(e.uri,t,a,o)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if($t.first(e.children.values())instanceof Dye){const o=$t.find(e.children.values(),s=>s.id===t);if(o)n=o.children;else{let s="",l=-1,c;for(const[d,h]of e.children.entries()){const E=this._findSumOfRangesOfGroup(h);E>l&&(c=h,l=E,s=h.id)}t=s,n=c.children}}else n=e.children;const i=[],r=Array.from(n.values()).sort((o,s)=>{const l=new F2(o.symbol.range.startLineNumber,o.symbol.range.endLineNumber),c=new F2(s.symbol.range.startLineNumber,s.symbol.range.endLineNumber);return this._comparator(l,c)});for(const o of r)i.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new aL(void 0,i,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const n=[];for(const r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(const a of r.children.values())n.push(this._stickyModelFromOutlineElement(a,r.symbol.selectionRange.startLineNumber));n.sort((r,a)=>this._comparator(r.range,a.range));const i=new F2(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new aL(i,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Cq?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};eJ=VR([SF(0,We)],eJ);class Yye extends Zye{constructor(e){super(),this._foldingLimitReporter=new gye(e)}createStickyModel(e,t,n,i){const r=this._fromFoldingRegions(i);return new Jye(e.uri,t,r,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,n=[],i=new aL(void 0,[],void 0);for(let r=0;r0}createModelFromProvider(e,t,n){const i=T1.getFoldingRangeProviders(this._languageFeaturesService,e);return new kte(e,i,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};uJ=VR([SF(1,We)],uJ);var G5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Rce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ice=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class U5t{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}}let nJ=class extends ne{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new Q),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new pe),this._updateSoon=this._register(new Hu(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new Xq(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return Ice(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new vi,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return Ice(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),n=t.getVersionId(),i=yield this._stickyModelProvider.update(t,n,e);e.isCancellationRequested||(this._model=i)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,i,r){if(t.children.length===0)return;let a=r;const o=[];for(let c=0;cc-d)),l=this.updateIndex(X2(o,e.startLineNumber+i,(c,d)=>c-d));for(let c=s;c<=l;c++){const d=t.children[c];if(!d)return;if(d.range){const h=d.range.startLineNumber,E=d.range.endLineNumber;e.startLineNumber<=E+1&&h-1<=e.endLineNumber&&h!==a&&(a=h,n.push(new U5t(h,E-1,i+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,i+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,i,r)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let i=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,i,0,-1);const r=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(r)for(const a of r)i=i.filter(o=>!(o.startLineNumber>=a.startLineNumber&&o.endLineNumber<=a.endLineNumber+1));return i}};nJ=G5t([Rce(1,We),Rce(2,tn)],nJ);var q5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},AD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},WH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},iJ;let N1=iJ=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=i,this._contextKeyService=o,this._sessionStore=new pe,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new $5t(this._editor),this._stickyLineCandidateProvider=new nJ(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new zce([],[],0),this._readConfiguration();const s=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(114)||c.hasChanged(72)||c.hasChanged(66)||c.hasChanged(109))&&this._readConfiguration()})),this._register(ce(s,Me.CONTEXT_MENU,c=>WH(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=W.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=W.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(y1(s));this._register(l.onDidBlur(c=>{this._positionRevealed===!1&&s.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(l.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(ce(s,Me.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(iJ.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new pe,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(j.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new pe),t=this._register(new rR(this._editor,{extractLineNumberFromMouseEvent:r=>{const a=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return a?a.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;const a=r.target.element;if(!a||a.innerText!==a.innerHTML)return null;const o=this._stickyScrollWidget.getEditorPositionFromNode(a);return o?{range:new j(o.lineNumber,o.column,o.lineNumber,o.column+a.innerText.length),textElement:a}:null},i=this._stickyScrollWidget.getDomNode();this._register(xi(i,Me.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){const l=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(l===null)return;const c=new ee(this._endLineNumbers[l],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){const l=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(l);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!s){const l=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(l===null)return;s=new ee(l,1)}this._revealPosition(s)})),this._register(xi(i,Me.MOUSE_MOVE,r=>{if(r.shiftKey){const a=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(a===null||this._showEndForLine!==null&&this._showEndForLine===a)return;this._showEndForLine=a,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(ce(i,Me.MOUSE_LEAVE,r=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,a])=>{const o=n(r);if(!o||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:s,textElement:l}=o;if(!s.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=s,e.clear();else if(l.style.textDecoration==="underline")return;const c=new vi;e.add(ft(()=>c.dispose(!0)));let d;dR(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new ee(s.startLineNumber,s.startColumn+1),c.token).then(h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const E=l;d!==E?(e.clear(),d=E,d.style.textDecoration="underline",e.add(ft(()=>{d.style.textDecoration="none"}))):d||(d=E,d.style.textDecoration="underline",e.add(ft(()=>{d.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(r=>WH(this,void 0,void 0,function*(){if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;const a=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);a&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:a.lineNumber,column:1})),this._instaService.invokeFunction(Aye,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){const t=new D0(e);this._contextMenuService.showContextMenu({menuId:K.StickyScrollContext,getAnchor:()=>t})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),n=t==null?void 0:t.foldingIcon;if(!n)return;cye(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;const i=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(i),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const n of t)for(const i of e.ranges)if(n>=i.fromLineNumber&&n<=i.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(e=1/0){var t,n;return WH(this,void 0,void 0,function*(){const i=this._editor.getModel();if(!i||i.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,e);return}const r=this._stickyLineCandidateProvider.getVersionId();if(r===void 0||r===i.getVersionId())if(this._foldingModel=(n=yield(t=T1.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel())!==null&&n!==void 0?n:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const a=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(a)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}})}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),n=this._editor.getScrollTop();let i=0;const r=[],a=[],o=this._editor.getVisibleRanges();if(o.length!==0){const s=new F2(o[0].startLineNumber,o[o.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(s);for(const c of l){const d=c.startLineNumber,h=c.endLineNumber,E=c.nestingDepth;if(h-d>0){const m=(E-1)*e,g=E*e,f=this._editor.getBottomForLineNumber(d)-n,p=this._editor.getTopForLineNumber(h)-n,D=this._editor.getBottomForLineNumber(h)-n;if(m>p&&m<=D){r.push(d),a.push(h+1),i=D-g;break}else g>f&&g<=D&&(r.push(d),a.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=a,new zce(r,a,i,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};N1.ID="store.contrib.stickyScrollController";N1=iJ=q5t([AD(1,Wl),AD(2,We),AD(3,mt),AD(4,tn),AD(5,U0),AD(6,pt)],N1);var J5t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Z5t extends u0{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:v("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:v({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:j5t.View,toggled:{condition:Ee.equals("config.editor.stickyScroll.enabled",!0),title:v("stickyScroll","Sticky Scroll"),mnemonicTitle:v({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:K.CommandPalette},{id:K.MenubarAppearanceMenu,group:"4_editor",order:3},{id:K.StickyScrollContext}]})}run(e){return J5t(this,void 0,void 0,function*(){const t=e.get(tu),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}}const $R=100;class Y5t extends hd{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:v("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:v({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:Ee.and(Ee.has("config.editor.stickyScroll.enabled"),W.stickyScrollVisible),menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focus()}}class Q5t extends hd{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:v("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:18}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focusNext()}}class X5t extends hd{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:v("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:16}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focusPrevious()}}class ext extends hd{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:v("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:3}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.goToFocused()}}class txt extends hd{constructor(){super({id:"editor.action.selectEditor",title:{value:v("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:9}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.selectEditor()}}fu(N1.ID,N1,1);gn(Z5t);gn(Y5t);gn(X5t);gn(Q5t);gn(ext);gn(txt);var jte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},E3=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uxt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hf;class nxt{constructor(e,t,n,i,r,a){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=i,this.command=r,this.completion=a}}let rJ=class extends NUe{constructor(e,t,n,i,r,a){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=i,this._suggestMemoryService=a}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&s.resolve(Kt.None)}return t}};rJ=jte([E3(5,yR)],rJ);let aJ=class{constructor(e,t,n,i){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=i}provideInlineCompletions(e,t,n,i){var r;return uxt(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;const a=this._getEditorOption(88,e);if(w5.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const o=e.tokenization.getLineTokens(t.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(w5.valueFor(a,s)!=="inline")return;let l=e.getWordAtPosition(t),c;if(l!=null&&l.word||(c=this._getTriggerCharacterInfo(e,t)),!(l!=null&&l.word)&&!c||(l||(l=e.getWordUntilPosition(t)),l.endColumn!==t.column))return;let d;const h=e.getValueInRange(new j(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(!((r=this._lastResult)===null||r===void 0)&&r.canBeReused(e,t.lineNumber,l))){const E=new Ace(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=E,this._lastResult.acquire(),d=this._lastResult}else{const E=yield Ate(this._languageFeatureService.completionProvider,e,t,new fF(void 0,void 0,c==null?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},i);let m;E.needsClipboard&&(m=yield this._clipboardService.readText());const g=new kE(E.items,t.column,new Ace(h,0),bc.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);d=new rJ(e,t.lineNumber,l,g,E,this._suggestMemoryService)}return this._lastResult=d,d})}handleItemDidShow(e,t){t.completion.resolve(Kt.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;const i=e.getValueInRange(j.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),r=new Set;for(const a of this._languageFeatureService.completionProvider.all(e))!((n=a.triggerCharacters)===null||n===void 0)&&n.includes(i)&&r.add(a);if(r.size!==0)return{providers:r,ch:i}}};aJ=jte([E3(1,We),E3(2,_4),E3(3,yR)],aJ);let oL=hf=class{constructor(e,t,n,i){if(++hf._counter===1){const r=i.createInstance(aJ,(a,o)=>{var s;return((s=n.listCodeEditors().find(c=>c.getModel()===o))!==null&&s!==void 0?s:e).getOption(a)});hf._disposable=t.inlineCompletionsProvider.register("*",r)}}dispose(){var e;--hf._counter===0&&((e=hf._disposable)===null||e===void 0||e.dispose(),hf._disposable=void 0)}};oL._counter=0;oL=hf=jte([E3(1,We),E3(2,Cu),E3(3,mt)],oL);fu("suggest.inlineCompletionsProvider",oL,0);class ixt extends $e{constructor(){super({id:"editor.action.forceRetokenize",label:v("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.tokenization.resetTokenization();const i=new va;n.tokenization.forceTokenization(n.getLineCount()),i.stop(),console.log(`tokenization took ${i.elapsed()}`)}}be(ixt);class KR extends u0{constructor(){super({id:KR.ID,title:{value:v({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const t=!tv.getTabFocusMode();tv.setTabFocusMode(t),ga(t?v("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):v("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}KR.ID="editor.action.toggleTabFocusMode";gn(KR);var rxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},axt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let oJ=class extends ne{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},i){var r;super(),this._link=t,this._enabled=!0,this.el=me(e,ve("a.monaco-link",{tabIndex:(r=t.tabIndex)!==null&&r!==void 0?r:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const a=this._register(new Zt(this.el,"click")),o=this._register(new Zt(this.el,"keypress")),s=Ne.chain(o.event,d=>d.map(h=>new ln(h)).filter(h=>h.keyCode===3)),l=this._register(new Zt(this.el,Yu.Tap)).event;this._register(Zu.addTarget(this.el));const c=Ne.any(a.event,s,l);this._register(c(d=>{this.enabled&&(It.stop(d,!0),n!=null&&n.opener?n.opener(this._link.href):i.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};oJ=rxt([axt(3,vs)],oJ);var Qye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Xye=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const oxt=26;let sJ=class extends ne{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(lJ))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,oxt)}};sJ=Qye([Xye(1,mt)],sJ);let lJ=class extends ne{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(h4,{}),this.element=ve("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=ve("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Nr(this.element)}show(e){Nr(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const n=me(this.element,ve("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(ve(`div${st.asCSSSelector(e.icon)}`));const i=me(this.element,ve("div.message-container"));if(i.setAttribute("aria-hidden","true"),i.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=me(this.element,ve("div.message-actions-container")),e.actions)for(const a of e.actions)this._register(this.instantiationService.createInstance(oJ,this.messageActionsContainer,Object.assign(Object.assign({},a),{tabIndex:-1}),{}));const r=me(this.element,ve("div.action-container"));this.actionBar=this._register(new O0(r)),this.actionBar.push(this._register(new ro("banner.close","Close Banner",st.asClassName(F2e),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};lJ=Qye([Xye(0,mt)],lJ);var Hte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Fx=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},da=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const sxt=hi("extensions-warning-message",we.warning,v("warningIcon","Icon shown with a warning message in the extensions editor."));let zv=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;const a=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount);let o;if(r.nonBasicAsciiCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new B6};else if(r.ambiguousCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new bg};else if(r.invisibleCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new S6};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:o.message,icon:sxt,actions:[{label:o.command.shortLabel,href:`command:${o.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(i.createInstance(sJ,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=lxt(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?RGe:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new cJ(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new cxt(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};zv.ID="editor.contrib.unicodeHighlighter";zv=Hte([Fx(1,ql),Fx(2,Cbe),Fx(3,mt)],zv);function lxt(u,e){return{nonBasicASCII:e.nonBasicASCII===_s?!u:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===_s?!u:e.includeComments,includeStrings:e.includeStrings===_s?!u:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let cJ=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Hu(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const n=[];if(!t.hasMore)for(const i of t.ranges)n.push({range:i,options:sL.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!$X(t,e))return null;const n=t.getValueInRange(e.range);return{reason:eAe(n,this._options),inComment:KX(t,e),inString:WX(t,e)}}};cJ=Hte([Fx(3,ql)],cJ);class cxt extends ne{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Hu(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const i of e){const r=iX.computeUnicodeHighlights(this._model,this._options,i);for(const a of r.ranges)n.ranges.push(a);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(const i of n.ranges)t.push({range:i,options:sL.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),n=t.getValueInRange(e.range);return $X(t,e)?{reason:eAe(n,this._options),inComment:KX(t,e),inString:WX(t,e)}:null}}let dJ=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=this._editor.getContribution(zv.ID);if(!i)return[];const r=[],a=new Set;let o=300;for(const s of t){const l=i.getDecorationInfo(s);if(!l)continue;const d=n.getValueInRange(s.range).codePointAt(0),h=GH(d);let E;switch(l.reason.kind){case 0:{nA(l.reason.confusableWith)?E=v("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,GH(l.reason.confusableWith.codePointAt(0))):E=v("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,GH(l.reason.confusableWith.codePointAt(0)));break}case 1:E=v("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:E=v("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(a.has(E))continue;a.add(E);const m={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},g=v("unicodeHighlight.adjustSettings","Adjust settings"),f=`command:${HA.ID}?${encodeURIComponent(JSON.stringify(m))}`,p=new Zr("",!0).appendMarkdown(E).appendText(" ").appendLink(f,g);r.push(new Sc(this,s.range,[p],!1,o++))}return r}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};dJ=Hte([Fx(1,vn),Fx(2,vs)],dJ);function hJ(u){return`U+${u.toString(16).padStart(4,"0")}`}function GH(u){let e=`\`${hJ(u)}\``;return m1.isInvisibleCharacter(u)||(e+=` "${`${dxt(u)}`}"`),e}function dxt(u){return u===96?"`` ` ``":"`"+String.fromCodePoint(u)+"`"}function eAe(u,e){return iX.computeUnicodeHighlightReason(u,e)}class sL{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const n=`${e}${t}`;let i=this.map.get(n);return i||(i=Lt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,i)),i}}sL.instance=new sL;class hxt extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.includeComments,!1,2)})}}class Ext extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.includeStrings,!1,2)})}}class bg extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.ambiguousCharacters,!1,2)})}}bg.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class S6 extends $e{constructor(){super({id:S6.ID,label:v("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.invisibleCharacters,!1,2)})}}S6.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class B6 extends $e{constructor(){super({id:B6.ID,label:v("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.nonBasicASCII,!1,2)})}}B6.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class HA extends $e{constructor(){super({id:HA.ID,label:v("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return da(this,void 0,void 0,function*(){const{codePoint:i,reason:r,inString:a,inComment:o}=n,s=String.fromCodePoint(i),l=e.get(md),c=e.get(tu);function d(m){return m1.isInvisibleCharacter(m)?v("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",hJ(m)):v("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${hJ(m)} "${s}"`)}const h=[];if(r.kind===0)for(const m of r.notAmbiguousInLocales)h.push({label:v("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>da(this,void 0,void 0,function*(){gxt(c,[m])})});if(h.push({label:d(i),run:()=>mxt(c,[i])}),o){const m=new hxt;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(a){const m=new Ext;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}if(r.kind===0){const m=new bg;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(r.kind===1){const m=new S6;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(r.kind===2){const m=new B6;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else fxt(r);const E=yield l.pick(h,{title:v("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});E&&(yield E.run())})}}HA.ID="editor.action.unicodeHighlight.showExcludeOptions";function mxt(u,e){return da(this,void 0,void 0,function*(){const t=u.getValue(yo.allowedCharacters);let n;typeof t=="object"&&t?n=t:n={};for(const i of e)n[String.fromCodePoint(i)]=!0;yield u.updateValue(yo.allowedCharacters,n,2)})}function gxt(u,e){var t;return da(this,void 0,void 0,function*(){const n=(t=u.inspect(yo.allowedLocales).user)===null||t===void 0?void 0:t.value;let i;typeof n=="object"&&n?i=Object.assign({},n):i={};for(const r of e)i[r]=!0;yield u.updateValue(yo.allowedLocales,i,2)})}function fxt(u){throw new Error(`Unexpected value: ${u}`)}be(bg);be(S6);be(B6);be(HA);fu(zv.ID,zv,1);$p.register(dJ);var pxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Oce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Dxt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const tAe="ignoreUnusualLineTerminators";function xxt(u,e,t){u.setModelProperty(e.uri,tAe,t)}function vxt(u,e){return u.getModelProperty(e.uri,tAe)}let BF=class extends ne{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(i=>{i.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return Dxt(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||vxt(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:v("unusualLineTerminators.title","Unusual Line Terminators"),message:v("unusualLineTerminators.message","Detected unusual line terminators"),detail:v("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",I0(e.uri)),primaryButton:v({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:v("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){xxt(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};BF.ID="editor.contrib.unusualLineTerminatorsDetector";BF=pxt([Oce(1,DA),Oce(2,Cu)],BF);fu(BF.ID,BF,1);var Cxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},jce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},EJ;const WR=new Pe("hasWordHighlights",!1);function uAe(u,e,t,n){const i=u.ordered(e);return x6e(i.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,Mi)),pa)}class nAe{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ui(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new j(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const i=t.startLineNumber,r=t.startColumn,a=t.endColumn,o=this._getCurrentWordRange(e,t);let s=!!(this._wordRange&&this._wordRange.equalsRange(o));for(let l=0,c=n.length;!s&&l=a&&(s=!0)}return s}cancel(){this.result.cancel()}}class bxt extends nAe{constructor(e,t,n,i){super(e,t,n),this._providers=i}_compute(e,t,n,i){return uAe(this._providers,e,t.getPosition(),i).then(r=>r||[])}}class kxt extends nAe{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,i){return Pm(250,i).then(()=>{if(!t.isEmpty())return[];const r=e.getWordAtPosition(t.getPosition());return!r||r.word.length>1e3?[]:e.findMatches(r.word,!0,!1,!0,n,!1).map(o=>({range:o.range,kind:ak.Text}))})}isValid(e,t,n){const i=t.isEmpty();return this._selectionIsEmpty!==i?!1:super.isValid(e,t,n)}}function Fxt(u,e,t,n){return u.has(e)?new bxt(e,t,n,u):new kxt(e,t,n)}W1("_executeDocumentHighlights",(u,e,t)=>{const n=u.get(We);return uAe(n.documentHighlightProvider,e,t,Kt.None)});class yxt{constructor(e,t,n,i){this.toUnhook=new pe,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=n,this._hasWordHighlights=WR.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{const a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(j.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const r=this._getWord();if(r){const a=this.editor.getModel().getLineContent(i.startLineNumber);ga(`${a}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const r=this._getWord();if(r){const a=this.editor.getModel().getLineContent(i.startLineNumber);ga(`${a}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,n=e.endColumn,i=this._getWord();if(!i||i.startColumn>t||i.endColumn{a===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations())},zt)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:ZDt(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let up=EJ=class extends ne{static get(e){return e.getContribution(EJ.ID)}constructor(e,t,n){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const i=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new yxt(e,n.documentHighlightProvider,()=>$t.map(this.linkedContributions,r=>r.wordHighlighter),t))};this._register(e.onDidChangeModel(r=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};up.ID="editor.contrib.wordHighlighter";up=EJ=Cxt([jce(1,pt),jce(2,We)],up);class iAe extends $e{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=up.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class Axt extends iAe{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:WR,kbOpts:{kbExpr:W.editorTextFocus,primary:65,weight:100}})}}class _xt extends iAe{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:WR,kbOpts:{kbExpr:W.editorTextFocus,primary:1089,weight:100}})}}class Sxt extends $e{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:WR.toNegated(),kbOpts:{kbExpr:W.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const i=up.get(t);i&&i.restoreViewState(!0)}}fu(up.ID,up,0);be(Axt);be(_xt);be(Sxt);class GR extends xr{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=P0(t.getOption(129)),r=t.getModel(),o=t.getSelections().map(s=>{const l=new ee(s.positionLineNumber,s.positionColumn),c=this._move(i,r,l,this._wordNavigationType);return this._moveTo(s,c,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,o.map(s=>du.fromModelSelection(s))),o.length===1){const s=new ee(o[0].positionLineNumber,o[0].positionColumn);t.revealPosition(s,0)}}_moveTo(e,t,n){return n?new Ye(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Ye(t.lineNumber,t.column,t.lineNumber,t.column)}}class kg extends GR{_move(e,t,n,i){return vu.moveWordLeft(e,t,n,i)}}class Fg extends GR{_move(e,t,n,i){return vu.moveWordRight(e,t,n,i)}}class Bxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class wxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class Lxt extends kg{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class zxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class Mxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Txt extends kg{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class Nxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,i){return super._move(P0(cd.wordSeparators.defaultValue),t,n,i)}}class Pxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,i){return super._move(P0(cd.wordSeparators.defaultValue),t,n,i)}}class Rxt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class Ixt extends Fg{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Oxt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class jxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Hxt extends Fg{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Vxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class $xt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,i){return super._move(P0(cd.wordSeparators.defaultValue),t,n,i)}}class Kxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,i){return super._move(P0(cd.wordSeparators.defaultValue),t,n,i)}}class UR extends xr{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){const i=e.get(tn);if(!t.hasModel())return;const r=P0(t.getOption(129)),a=t.getModel(),o=t.getSelections(),s=t.getOption(6),l=t.getOption(11),c=i.getLanguageConfiguration(a.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=o.map(E=>{const m=this._delete({wordSeparators:r,model:a,selection:E,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:s,autoClosingQuotes:l,autoClosingPairs:c,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Gr(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class Vte extends UR{_delete(e,t){const n=vu.deleteWordLeft(e,t);return n||new j(1,1,1,1)}}class $te extends UR{_delete(e,t){const n=vu.deleteWordRight(e,t);if(n)return n;const i=e.model.getLineCount(),r=e.model.getLineMaxColumn(i);return new j(i,r,i,r)}}class Wxt extends Vte{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:W.writable})}}class Gxt extends Vte{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:W.writable})}}class Uxt extends Vte{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class qxt extends $te{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:W.writable})}}class Jxt extends $te{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:W.writable})}}class Zxt extends $te{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Yxt extends $e{constructor(){super({id:"deleteInsideWord",precondition:W.writable,label:v("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;const i=P0(t.getOption(129)),r=t.getModel(),o=t.getSelections().map(s=>{const l=vu.deleteInsideWord(i,r,s);return new Gr(l,"")});t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}ze(new Bxt);ze(new wxt);ze(new Lxt);ze(new zxt);ze(new Mxt);ze(new Txt);ze(new Rxt);ze(new Ixt);ze(new Oxt);ze(new jxt);ze(new Hxt);ze(new Vxt);ze(new Nxt);ze(new Pxt);ze(new $xt);ze(new Kxt);ze(new Wxt);ze(new Gxt);ze(new Uxt);ze(new qxt);ze(new Jxt);ze(new Zxt);be(Yxt);class Qxt extends UR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const n=mP.deleteWordPartLeft(e);return n||new j(1,1,1,1)}}class Xxt extends UR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const n=mP.deleteWordPartRight(e);if(n)return n;const i=e.model.getLineCount(),r=e.model.getLineMaxColumn(i);return new j(i,r,i,r)}}class rAe extends GR{_move(e,t,n,i){return mP.moveWordPartLeft(e,t,n)}}class evt extends rAe{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}ru.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class tvt extends rAe{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}ru.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class aAe extends GR{_move(e,t,n,i){return mP.moveWordPartRight(e,t,n)}}class uvt extends aAe{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class nvt extends aAe{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ze(new Qxt);ze(new Xxt);ze(new evt);ze(new tvt);ze(new uvt);ze(new nvt);class mJ extends ne{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=ls.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new Zr(v("editor.simple.readonly","Cannot edit in read-only input")):t=new Zr(v("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}mJ.ID="editor.contrib.readOnlyMessageController";fu(mJ.ID,mJ,2);class gJ extends ne{constructor(e){super(),this.editor=e,this.widget=null,Zc&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new qR(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}gJ.ID="editor.contrib.iPadShowKeyboard";class qR extends ne{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(ce(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(ce(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return qR.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}qR.ID="editor.contrib.ShowKeyboardWidget";fu(gJ.ID,gJ,3);var ivt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},fJ;let Mv=fJ=class extends ne{static get(e){return e.getContribution(fJ.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(i=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(i=>this.stop())),this._register(qn.onDidChange(i=>this.stop())),this._register(this._editor.onKeyUp(i=>i.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new JR(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mv.ID="editor.contrib.inspectTokens";Mv=fJ=ivt([Hce(1,r0),Hce(2,vn)],Mv);class rvt extends $e{constructor(){super({id:"editor.action.inspectTokens",label:EG.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const n=Mv.get(t);n==null||n.launch()}}function avt(u){let e="";for(let t=0,n=u.length;tev,tokenize:(i,r,a)=>cX(e,a),tokenizeEncoded:(i,r,a)=>oP(n,a)}}class JR extends ne{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=ovt(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return JR._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let n=0;for(let s=t.tokens1.length-1;s>=0;s--){const l=t.tokens1[s];if(e.column-1>=l.offset){n=s;break}}let i=0;for(let s=t.tokens2.length>>>1;s>=0;s--)if(e.column-1>=t.tokens2[s<<1]){i=s;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Vce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Mb;let lL=Mb=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=jn.as(Pp.Quickaccess)}provide(e){const t=new pe;return t.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{const i=this.registry.getQuickAccessProvider(n.substr(Mb.PREFIX.length));i&&i.prefix&&i.prefix!==Mb.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==Mb.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const n=t.prefix||e.prefix,i=n||"…";return{prefix:n,label:i,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:v("helpPickAriaLabel","{0}, {1}",i,t.description),description:t.description}})}};lL.PREFIX="?";lL=Mb=svt([Vce(0,md),Vce(1,qu)],lL);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:lL,prefix:"",helpEntries:[{description:mG.helpQuickAccessActionLabel}]});class oAe{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;const i=new pe;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=i.add(new Ir);return r.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),i}doProvide(e,t){var n;const i=new pe,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const a={editor:r},o=Q2e(r);if(o){let s=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;i.add(o.onDidChangeCursorPosition(()=>{var l;s=(l=r.saveViewState())!==null&&l!==void 0?l:void 0})),a.restoreViewState=()=>{s&&r===this.activeTextEditorControl&&r.restoreViewState(s)},i.add(Mm(t.onCancellationRequested)(()=>{var l;return(l=a.restoreViewState)===null||l===void 0?void 0:l.call(a)}))}i.add(ft(()=>this.clearDecorations(r))),i.add(this.provideWithTextEditor(a,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&jm(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return Y2e(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Jn(fCe),position:Js.Full}}}],[a,o]=n.deltaDecorations(i,r);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:o}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class ZR extends oAe{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=v("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ne.None}provideWithTextEditor(e,t,n){const i=e.editor,r=new pe;r.add(t.onDidAccept(s=>{const[l]=t.selectedItems;if(l){if(!this.isValidLineNumber(i,l.lineNumber))return;this.gotoLocation(e,{range:this.toRange(l.lineNumber,l.column),keyMods:t.keyMods,preserveFocus:s.inBackground}),s.inBackground||t.hide()}}));const a=()=>{const s=this.parsePosition(i,t.value.trim().substr(ZR.PREFIX.length)),l=this.getPickLabel(i,s.lineNumber,s.column);if(t.items=[{lineNumber:s.lineNumber,column:s.column,label:l}],t.ariaLabel=l,!this.isValidLineNumber(i,s.lineNumber)){this.clearDecorations(i);return}const c=this.toRange(s.lineNumber,s.column);i.revealRangeInCenter(c,0),this.addDecorations(i,c)};a(),r.add(t.onDidChangeValue(()=>a()));const o=Q2e(i);return o&&o.getOptions().get(67).renderType===2&&(o.updateOptions({lineNumbers:"on"}),r.add(ft(()=>o.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),i=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:i+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?v("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):v("gotoLineLabel","Go to line {0}.",t);const i=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?v("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",i.lineNumber,i.column,r):v("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",i.lineNumber,i.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;const i=this.getModel(e);if(!i)return!1;const r={lineNumber:t,column:n};return i.validatePosition(r).equals(r)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}}ZR.PREFIX=":";var lvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cvt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let wF=class extends ZR{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Ne.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};wF=lvt([cvt(0,Cu)],wF);let Kte=class sAe extends $e{constructor(){super({id:sAe.ID,label:nw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(md).quickAccess.show(wF.PREFIX)}};Kte.ID="editor.action.gotoLine";be(Kte);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:wF,prefix:wF.PREFIX,helpEntries:[{description:nw.gotoLineActionLabel,commandId:Kte.ID}]});const lAe=[void 0,[]];function UH(u,e,t=0,n=0){const i=e;return i.values&&i.values.length>1?dvt(u,i.values,t,n):cAe(u,e,t,n)}function dvt(u,e,t,n){let i=0;const r=[];for(const a of e){const[o,s]=cAe(u,a,t,n);if(typeof o!="number")return lAe;i+=o,r.push(...s)}return[i,hvt(r)]}function cAe(u,e,t,n){const i=T3(e.original,e.originalLowercase,t,u,u.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?[i[0],vA(i)]:lAe}function hvt(u){const e=u.sort((i,r)=>i.start-r.start),t=[];let n;for(const i of e)!n||!Evt(n,i)?(n=i,t.push(i)):(n.start=Math.min(n.start,i.start),n.end=Math.max(n.end,i.end));return t}function Evt(u,e){return!(u.end=0,a=$ce(u);let o;const s=u.split(dAe);if(s.length>1)for(const l of s){const c=$ce(l),{pathNormalized:d,normalized:h,normalizedLowercase:E}=Kce(l);h&&(o||(o=[]),o.push({original:l,originalLowercase:l.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:E,expectContiguousMatch:c}))}return{original:u,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:i,values:o,containsPathSeparator:r,expectContiguousMatch:a}}function Kce(u){let e;na?e=u.replace(/\//g,jc):e=u.replace(/\\/g,jc);const t=Cqe(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function Wce(u){return Array.isArray(u)?pJ(u.map(e=>e.original).join(dAe)):pJ(u.original)}var mvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Gce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},yx;let f1=yx=class extends oAe{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,v("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ne.None}provideWithTextEditor(e,t,n){const i=e.editor,r=this.getModel(i);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,n):this.doProvideWithoutEditorSymbols(e,r,t,n):ne.None}doProvideWithoutEditorSymbols(e,t,n,i){const r=new pe;return this.provideLabelPick(n,v("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),zC(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,r))||i.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,i))}),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return zC(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new QN,i=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(i.dispose(),n.complete(!0))}));return t.add(ft(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,i){var r;const a=e.editor,o=new pe;o.add(n.onDidAccept(d=>{const[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),d.inBackground||n.hide())})),o.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const s=this.getDocumentSymbols(t,i);let l;const c=d=>zC(this,void 0,void 0,function*(){l==null||l.dispose(!0),n.busy=!1,l=new vi(i),n.busy=!0;try{const h=pJ(n.value.substr(yx.PREFIX.length).trim()),E=yield this.doGetSymbolPicks(s,h,void 0,l.token);if(i.isCancellationRequested)return;if(E.length>0){if(n.items=E,d&&h.original.length===0){const m=BB(E,g=>!!(g.type!=="separator"&&g.range&&j.containsPosition(g.range.decoration,d)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,v("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,v("noSymbolResults","No editor symbols"))}finally{i.isCancellationRequested||(n.busy=!1)}});return o.add(n.onDidChangeValue(()=>c(void 0))),c((r=a.getSelection())===null||r===void 0?void 0:r.getPosition()),o.add(n.onDidChangeActive(()=>{const[d]=n.activeItems;d&&d.range&&(a.revealRangeInCenter(d.range.selection,0),this.addDecorations(a,d.range.decoration))})),o}doGetSymbolPicks(e,t,n,i){var r,a;return zC(this,void 0,void 0,function*(){const o=yield e;if(i.isCancellationRequested)return[];const s=t.original.indexOf(yx.SCOPE_PREFIX)===0,l=s?1:0;let c,d;t.values&&t.values.length>1?(c=Wce(t.values[0]),d=Wce(t.values.slice(1))):c=t;let h;const E=(a=(r=this.options)===null||r===void 0?void 0:r.openSideBySideDirection)===null||a===void 0?void 0:a.call(r);E&&(h=[{iconClass:E==="right"?st.asClassName(we.splitHorizontal):st.asClassName(we.splitVertical),tooltip:E==="right"?v("openToSide","Open to the Side"):v("openToBottom","Open to the Bottom")}]);const m=[];for(let p=0;pl){let O=!1;if(c!==t&&([F,S]=UH(b,Object.assign(Object.assign({},t),{values:void 0}),l,k),typeof F=="number"&&(O=!0)),typeof F!="number"&&([F,S]=UH(b,c,l,k),typeof F!="number"))continue;if(!O&&d){if(A&&d.original.length>0&&([w,z]=UH(A,d)),typeof w!="number")continue;typeof F=="number"&&(F+=w)}}const N=D.tags&&D.tags.indexOf(1)>=0;m.push({index:p,kind:D.kind,score:F,label:b,ariaLabel:gqe(D.name,D.kind),description:A,highlights:N?void 0:{label:S,description:z},range:{selection:j.collapseToStart(D.selectionRange),decoration:D.range},strikethrough:N,buttons:h})}const g=m.sort((p,D)=>s?this.compareByKindAndScore(p,D):this.compareByScore(p,D));let f=[];if(s){let b=function(){D&&typeof p=="number"&&x>0&&(D.label=y3(JH[p]||qH,x))},p,D,x=0;for(const k of g)p!==k.kind?(b(),p=k.kind,x=1,D={type:"separator"},f.push(D)):x++,f.push(k);b()}else g.length>0&&(f=[{label:v("symbols","symbols ({0})",m.length),type:"separator"},...g]);return f})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const n=JH[e.kind]||qH,i=JH[t.kind]||qH,r=n.localeCompare(i);return r===0?this.compareByScore(e,t):r}getDocumentSymbols(e,t){return zC(this,void 0,void 0,function*(){const n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};f1.PREFIX="@";f1.SCOPE_PREFIX=":";f1.PREFIX_BY_CATEGORY=`${yx.PREFIX}${yx.SCOPE_PREFIX}`;f1=yx=mvt([Gce(0,We),Gce(1,bR)],f1);const qH=v("property","properties ({0})"),JH={5:v("method","methods ({0})"),11:v("function","functions ({0})"),8:v("_constructor","constructors ({0})"),12:v("variable","variables ({0})"),4:v("class","classes ({0})"),22:v("struct","structs ({0})"),23:v("event","events ({0})"),24:v("operator","operators ({0})"),10:v("interface","interfaces ({0})"),2:v("namespace","namespaces ({0})"),3:v("package","packages ({0})"),25:v("typeParameter","type parameters ({0})"),1:v("modules","modules ({0})"),6:v("property","properties ({0})"),9:v("enum","enumerations ({0})"),21:v("enumMember","enumeration members ({0})"),14:v("string","strings ({0})"),0:v("file","files ({0})"),17:v("array","arrays ({0})"),15:v("number","numbers ({0})"),16:v("boolean","booleans ({0})"),18:v("object","objects ({0})"),19:v("key","keys ({0})"),7:v("field","fields ({0})"),13:v("constant","constants ({0})")};var gvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ZH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let DJ=class extends f1{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Ne.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};DJ=gvt([ZH(0,Cu),ZH(1,We),ZH(2,bR)],DJ);class VA extends $e{constructor(){super({id:VA.ID,label:jk.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:W.hasDocumentSymbolProvider,kbOpts:{kbExpr:W.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(md).quickAccess.show(f1.PREFIX,{itemActivation:Ec.NONE})}}VA.ID="editor.action.quickOutline";be(VA);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:DJ,prefix:f1.PREFIX,helpEntries:[{description:jk.quickOutlineActionLabel,prefix:f1.PREFIX,commandId:VA.ID},{description:jk.quickOutlineByCategoryActionLabel,prefix:f1.PREFIX_BY_CATEGORY}]});function YH(u,e){return e&&(u.stack||u.stacktrace)?v("stackTrace.format","{0}: {1}",qce(u),Uce(u.stack)||Uce(u.stacktrace)):qce(u)}function Uce(u){return Array.isArray(u)?u.join(` -`):u}function qce(u){return u.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${u.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof u.code=="string"&&typeof u.errno=="number"&&typeof u.syscall=="string"?v("nodeExceptionMessage","A system error occurred ({0})",u.message):u.message||v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function hAe(u=null,e=!1){if(!u)return v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(u)){const t=b1(u),n=hAe(t[0],e);return t.length>1?v("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(io(u))return u;if(u.detail){const t=u.detail;if(t.error)return YH(t.error,e);if(t.exception)return YH(t.exception,e)}return u.stack?YH(u,e):u.message?u.message:v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function fvt(u){var e;const t=new Map;for(const n of u)t.set(n,((e=t.get(n))!==null&&e!==void 0?e:0)+1);return t}class A2{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const n=this.computeEmbedding(e),i=new Map,r=[];for(const[a,o]of this.documents){if(t.isCancellationRequested)return[];for(const s of o.chunks){const l=this.computeSimilarityScore(s,n,i);l>0&&r.push({key:a,score:l})}}return r}static termFrequencies(e){return fvt(A2.splitTerms(e))}static*splitTerms(e){const t=n=>n.toLowerCase();for(const[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);const i=n.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(i.length>1)for(const r of i)r.length>2&&/\p{Letter}{3,}/gu.test(r)&&(yield t(r))}}updateDocuments(e){var t;for(const{key:n}of e)this.deleteDocument(n);for(const n of e){const i=[];for(const r of n.textChunks){const a=A2.termFrequencies(r);for(const o of a.keys())this.chunkOccurrences.set(o,((t=this.chunkOccurrences.get(o))!==null&&t!==void 0?t:0)+1);i.push({text:r,tf:a})}this.chunkCount+=i.length,this.documents.set(n.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const n of t.chunks)for(const i of n.tf.keys()){const r=this.chunkOccurrences.get(i);if(typeof r=="number"){const a=r-1;a<=0?this.chunkOccurrences.delete(i):this.chunkOccurrences.set(i,a)}}}}computeSimilarityScore(e,t,n){let i=0;for(const[r,a]of Object.entries(t)){const o=e.tf.get(r);if(!o)continue;let s=n.get(r);typeof s!="number"&&(s=this.computeIdf(r),n.set(r,s));const l=o*s;i+=l*a}return i}computeEmbedding(e){const t=A2.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const n=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){const t=Object.create(null);for(const[n,i]of e){const r=this.computeIdf(n);r>0&&(t[n]=i*r)}return t}}function pvt(u){var e,t;const n=u.slice(0);n.sort((r,a)=>a.score-r.score);const i=(t=(e=n[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(i>0)for(const r of n)r.score/=i;return n}var MC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},L5;(function(u){u[u.NO_ACTION=0]="NO_ACTION",u[u.CLOSE_PICKER=1]="CLOSE_PICKER",u[u.REFRESH_PICKER=2]="REFRESH_PICKER",u[u.REMOVE_ITEM=3]="REMOVE_ITEM"})(L5||(L5={}));function QH(u){const e=u;return Array.isArray(e.items)}function Jce(u){const e=u;return!!e.picks&&e.additionalPicks instanceof Promise}class Dvt extends ne{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var i;const r=new pe;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let a;const o=r.add(new Ir),s=()=>MC(this,void 0,void 0,function*(){const l=o.value=new pe;a==null||a.dispose(!0),e.busy=!1,a=new vi(t);const c=a.token,d=e.value.substr(this.prefix.length).trim(),h=this._getPicks(d,l,c,n),E=(g,f)=>{var p;let D,x;if(QH(g)?(D=g.items,x=g.active):D=g,D.length===0){if(f)return!1;(d.length>0||e.hideInput)&&(!((p=this.options)===null||p===void 0)&&p.noResultsPick)&&(uk(this.options.noResultsPick)?D=[this.options.noResultsPick(d)]:D=[this.options.noResultsPick])}return e.items=D,x&&(e.activeItems=[x]),!0},m=g=>MC(this,void 0,void 0,function*(){let f=!1,p=!1;yield Promise.all([(()=>MC(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield Pm(g.mergeDelay),c.isCancellationRequested)||p||(f=E(g.picks,!0))}))(),(()=>MC(this,void 0,void 0,function*(){e.busy=!0;try{const D=yield g.additionalPicks;if(c.isCancellationRequested)return;let x,b;QH(g.picks)?(x=g.picks.items,b=g.picks.active):x=g.picks;let k,A;if(QH(D)?(k=D.items,A=D.active):k=D,k.length>0||!f){let F;if(!b&&!A){const S=e.activeItems[0];S&&x.indexOf(S)!==-1&&(F=S)}E({items:[...x,...k],active:b||A||F})}}finally{c.isCancellationRequested||(e.busy=!1),p=!0}}))()])});if(h!==null)if(Jce(h))yield m(h);else if(!(h instanceof Promise))E(h);else{e.busy=!0;try{const g=yield h;if(c.isCancellationRequested)return;Jce(g)?yield m(g):E(g)}finally{c.isCancellationRequested||(e.busy=!1)}}});return r.add(e.onDidChangeValue(()=>s())),s(),r.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),r.add(e.onDidTriggerItemButton(({button:l,item:c})=>MC(this,void 0,void 0,function*(){var d,h;if(typeof c.trigger=="function"){const E=(h=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&h!==void 0?h:-1;if(E>=0){const m=c.trigger(E,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case L5.NO_ACTION:break;case L5.CLOSE_PICKER:e.hide();break;case L5.REFRESH_PICKER:s();break;case L5.REMOVE_ITEM:{const f=e.items.indexOf(c);if(f!==-1){const p=e.items.slice(),D=p.splice(f,1),x=e.activeItems.filter(k=>k!==D[0]),b=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=p,x&&(e.activeItems=x),e.keepScrollPosition=b}break}}}}}))),r}}var EAe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Ef,Yi;let np=Ef=class extends Dvt{constructor(e,t,n,i,r,a){super(Ef.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=i,this.telemetryService=r,this.dialogService=a,this.commandsHistory=this._register(this.instantiationService.createInstance(ip)),this.options=e}_getPicks(e,t,n,i){var r,a,o,s;return XH(this,void 0,void 0,function*(){const l=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];const c=Mm(()=>{const p=new A2;p.updateDocuments(l.map(x=>({key:x.commandId,textChunks:[x.label+(x.commandAlias?` ${x.commandAlias}`:"")]})));const D=p.calculateScores(e,n);return pvt(D).filter(x=>x.score>Ef.TFIDF_THRESHOLD).slice(0,Ef.TFIDF_MAX_RESULTS)}),d=[];for(const p of l){const D=(r=Ef.WORD_FILTER(e,p.label))!==null&&r!==void 0?r:void 0,x=p.commandAlias&&(a=Ef.WORD_FILTER(e,p.commandAlias))!==null&&a!==void 0?a:void 0;if(D||x)p.highlights={label:D,detail:this.options.showAlias?x:void 0},d.push(p);else if(e===p.commandId)d.push(p);else if(e.length>=3){const b=c();if(n.isCancellationRequested)return[];const k=b.find(A=>A.key===p.commandId);k&&(p.tfIdfScore=k.score,d.push(p))}}const h=new Map;for(const p of d){const D=h.get(p.label);D?(p.description=p.commandId,D.description=D.commandId):h.set(p.label,p)}d.sort((p,D)=>{if(p.tfIdfScore&&D.tfIdfScore)return p.tfIdfScore===D.tfIdfScore?p.label.localeCompare(D.label):D.tfIdfScore-p.tfIdfScore;if(p.tfIdfScore)return 1;if(D.tfIdfScore)return-1;const x=this.commandsHistory.peek(p.commandId),b=this.commandsHistory.peek(D.commandId);if(x&&b)return x>b?-1:1;if(x)return-1;if(b)return 1;if(this.options.suggestedCommandIds){const k=this.options.suggestedCommandIds.has(p.commandId),A=this.options.suggestedCommandIds.has(D.commandId);if(k&&A)return 0;if(k)return-1;if(A)return 1}return p.label.localeCompare(D.label)});const E=[];let m=!1,g=!0,f=!!this.options.suggestedCommandIds;for(let p=0;pXH(this,void 0,void 0,function*(){var p;const D=yield this.getAdditionalCommandPicks(l,d,e,n);if(n.isCancellationRequested)return[];const x=D.map(b=>this.toCommandPick(b,i));return g&&((p=x[0])===null||p===void 0?void 0:p.type)!=="separator"&&x.unshift({type:"separator",label:v("suggested","similar commands")}),x}))()}:E})}toCommandPick(e,t){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),i=n?v("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:i,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>XH(this,void 0,void 0,function*(){var r,a;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(r=t==null?void 0:t.from)!==null&&r!==void 0?r:"quick open"});try{!((a=e.args)===null||a===void 0)&&a.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(o){dd(o)||this.dialogService.error(v("canNotRun","Command '{0}' resulted in an error",e.label),hAe(o))}})})}};np.PREFIX=">";np.TFIDF_THRESHOLD=.5;np.TFIDF_MAX_RESULTS=5;np.WORD_FILTER=tee(Kk,wot,Fbe);np=Ef=EAe([wf(1,mt),wf(2,qu),wf(3,ni),wf(4,n0),wf(5,DA)],np);let ip=Yi=class extends ne{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Yi.getConfiguredCommandHistoryLength(this.configurationService),Yi.cache&&Yi.cache.limit!==this.configuredCommandsHistoryLength&&(Yi.cache.limit=this.configuredCommandsHistoryLength,Yi.saveState(this.storageService)))}load(){const e=this.storageService.get(Yi.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const n=Yi.cache=new gg(this.configuredCommandsHistoryLength,1);if(t){let i;t.usesLRU?i=t.entries:i=t.entries.sort((r,a)=>r.value-a.value),i.forEach(r=>n.set(r.key,r.value))}Yi.counter=this.storageService.getNumber(Yi.PREF_KEY_COUNTER,0,Yi.counter)}push(e){Yi.cache&&(Yi.cache.set(e,Yi.counter++),Yi.saveState(this.storageService))}peek(e){var t;return(t=Yi.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Yi.cache)return;const t={usesLRU:!0,entries:[]};Yi.cache.forEach((n,i)=>t.entries.push({key:i,value:n})),e.store(Yi.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Yi.PREF_KEY_COUNTER,Yi.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;const r=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof r=="number"?r:Yi.DEFAULT_COMMANDS_HISTORY_LENGTH}};ip.DEFAULT_COMMANDS_HISTORY_LENGTH=50;ip.PREF_KEY_CACHE="commandPalette.mru.cache";ip.PREF_KEY_COUNTER="commandPalette.mru.counter";ip.counter=1;ip=Yi=EAe([wf(0,Ul),wf(1,tu)],ip);class xvt extends np{constructor(e,t,n,i,r,a){super(e,t,n,i,r,a)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:oee(n.label)||n.id});return t}}var vvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_D=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Zce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let LF=class extends xvt{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,n,i,r,a){super({showAlias:!1},e,n,i,r,a),this.codeEditorService=t}getCommandPicks(){return Zce(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return Zce(this,void 0,void 0,function*(){return[]})}};LF=vvt([_D(0,mt),_D(1,Cu),_D(2,qu),_D(3,ni),_D(4,n0),_D(5,DA)],LF);class $A extends $e{constructor(){super({id:$A.ID,label:iw.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(md).quickAccess.show(LF.PREFIX)}}$A.ID="editor.action.quickCommand";be($A);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:LF,prefix:LF.PREFIX,helpEntries:[{description:iw.quickCommandHelp,commandId:$A.ID}]});var Cvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let xJ=class extends Ym{constructor(e,t,n,i,r,a,o){super(!0,e,t,n,i,r,a,o)}};xJ=Cvt([SD(1,pt),SD(2,Cu),SD(3,bi),SD(4,mt),SD(5,Ul),SD(6,tu)],xJ);fu(Ym.ID,xJ,4);class bvt extends $e{constructor(){super({id:"editor.action.toggleHighContrast",label:gG.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(r0),i=n.getColorTheme();$c(i.type)?(n.setTheme(this._originalThemeName||(iv(i.type)?vx:Mh)),this._originalThemeName=null):(n.setTheme(iv(i.type)?s3:l3),this._originalThemeName=i.themeName)}}be(bvt);const kvt=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:uke,Emitter:nke,KeyCode:ike,KeyMod:rke,MarkerSeverity:cke,MarkerTag:dke,Position:ake,Range:oke,Selection:ske,SelectionDirection:lke,Token:Eke,Uri:hke,editor:mke,languages:gke},Symbol.toStringTag,{value:"Module"}));function Fvt(){return new Worker(""+new URL("editor.worker-94ffd778.js",import.meta.url).href)}function yvt(){return new Worker(""+new URL("css.worker-c3850ceb.js",import.meta.url).href)}function Avt(){return new Worker(""+new URL("html.worker-88b237e1.js",import.meta.url).href)}function _vt(){return new Worker(""+new URL("json.worker-8dd963f3.js",import.meta.url).href)}function Svt(){return new Worker(""+new URL("ts.worker-72c9fe54.js",import.meta.url).href)}var vJ={},mAe={exports:{}},Z0={},gAe={exports:{}},fAe={};/** +`)};const a=yield r.provideRenameEdits(this.model,this.position,e,i);if(a){if(a.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(a.rejectReason),i)}else return this._provideRenameEdits(e,t+1,n.concat(v("no result","No result.")),i);return a})}}function k5t(u,e,t,n){return h3(this,void 0,void 0,function*(){const i=new Nte(e,t,u),r=yield i.resolveRenameLocation(Kt.None);return r!=null&&r.rejectReason?{edits:[],rejectReason:r.rejectReason}:i.provideRenameEdits(n,Kt.None)})}let tp=Jq=class{static get(e){return e.getContribution(Jq.ID)}constructor(e,t,n,i,r,a,o,s){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=i,this._progressService=r,this._logService=a,this._configService=o,this._languageFeaturesService=s,this._disposableStore=new pe,this._cts=new vi,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(qq,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return h3(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new vi,!this.editor.hasModel())return;const n=this.editor.getPosition(),i=new Nte(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return;const r=new Gm(this.editor,5,void 0,this._cts.token);let a;try{const m=i.resolveRenameLocation(r.token);this._progressService.showWhile(m,250),a=yield m}catch(m){(e=cs.get(this.editor))===null||e===void 0||e.showMessage(m||v("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),n);return}finally{r.dispose()}if(!a)return;if(a.rejectReason){(t=cs.get(this.editor))===null||t===void 0||t.showMessage(a.rejectReason,n);return}if(r.token.isCancellationRequested)return;const o=new Gm(this.editor,5,a.range,this._cts.token),s=this.editor.getSelection();let l=0,c=a.text.length;!j.isEmpty(s)&&!j.spansMultipleLines(s)&&j.containsRange(a.range,s)&&(l=Math.max(0,s.startColumn-a.range.startColumn),c=Math.min(a.range.endColumn,s.endColumn)-a.range.startColumn);const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=yield this._renameInputField.getInput(a.range,a.text,l,c,d,o.token);if(typeof h=="boolean"){h&&this.editor.focus(),o.dispose();return}this.editor.focus();const E=YN(i.provideRenameEdits(h.newName,o.token),o.token).then(m=>h3(this,void 0,void 0,function*(){if(!(!m||!this.editor.hasModel())){if(m.rejectReason){this._notificationService.info(m.rejectReason);return}this.editor.setSelection(j.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m,{editor:this.editor,showPreview:h.wantsPreview,label:v("label","Renaming '{0}' to '{1}'",a==null?void 0:a.text,h.newName),code:"undoredo.rename",quotableLabel:v("quotableLabel","Renaming {0} to {1}",a==null?void 0:a.text,h.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&ga(v("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",a.text,h.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(v("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),m=>{this._notificationService.error(v("rename.failed","Rename failed to compute edits")),this._logService.error(m)}).finally(()=>{o.dispose()});return this._progressService.showWhile(E,250),E})}acceptRenameInput(e){this._renameInputField.acceptInput(e)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};tp.ID="editor.contrib.renameController";tp=Jq=b5t([Jg(1,mt),Jg(2,bi),Jg(3,xA),Jg(4,Dg),Jg(5,r0),Jg(6,sX),Jg(7,We)],tp);class F5t extends $e{constructor(){super({id:"editor.action.rename",label:v("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Ee.and(W.writable,W.hasRenameProvider),kbOpts:{kbExpr:W.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(Cu),[i,r]=Array.isArray(t)&&t||[void 0,void 0];return dt.isUri(i)&&ee.isIPosition(r)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then(a=>{a&&(a.setPosition(r),a.invokeWithinContext(o=>(this.reportTelemetry(o,a),this.run(o,a))))},zt):super.runCommand(e,t)}run(e,t){const n=tp.get(t);return n?n.run():Promise.resolve()}}fu(tp.ID,tp,4);be(F5t);const Pte=xr.bindToContribution(tp.get);ze(new Pte({id:"acceptRenameInput",precondition:OR,handler:u=>u.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:3}}));ze(new Pte({id:"acceptRenameInputWithPreview",precondition:Ee.and(OR,Ee.has("config.editor.rename.enablePreview")),handler:u=>u.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:Ee.and(W.focus,Ee.not("isComposing")),primary:1024+3}}));ze(new Pte({id:"cancelRenameInput",precondition:OR,handler:u=>u.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:W.focus,primary:9,secondary:[1033]}}));W1("_executeDocumentRenameProvider",function(u,e,t,...n){const[i]=n;Ru(typeof i=="string");const{renameProvider:r}=u.get(We);return k5t(r,e,t,i)});W1("_executePrepareRename",function(u,e,t){return h3(this,void 0,void 0,function*(){const{renameProvider:n}=u.get(We),r=yield new Nte(e,t,n).resolveRenameLocation(Kt.None);if(r!=null&&r.rejectReason)throw new Error(r.rejectReason);return r})});jn.as(Ed.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});function y5t(u){for(let e=0,t=u.length;e0?t[0]:[]}function Kye(u,e,t,n,i){return ng(this,void 0,void 0,function*(){const r=B5t(u,e),a=yield Promise.all(r.map(o=>ng(this,void 0,void 0,function*(){let s,l=null;try{s=yield o.provideDocumentSemanticTokens(e,o===t?n:null,i)}catch(c){l=c,s=null}return(!s||!jR(s)&&!Vye(s))&&(s=null),new S5t(o,s,l)})));for(const o of a){if(o.error)throw o.error;if(o.tokens)return o}return a.length>0?a[0]:null})}function w5t(u,e){const t=u.orderedGroups(e);return t.length>0?t[0]:null}class L5t{constructor(e,t){this.provider=e,this.tokens=t}}function z5t(u,e){return u.has(e)}function Wye(u,e){const t=u.orderedGroups(e);return t.length>0?t[0]:[]}function Rte(u,e,t,n){return ng(this,void 0,void 0,function*(){const i=Wye(u,e),r=yield Promise.all(i.map(a=>ng(this,void 0,void 0,function*(){let o;try{o=yield a.provideDocumentRangeSemanticTokens(e,t,n)}catch(s){Mi(s),o=null}return(!o||!jR(o))&&(o=null),new L5t(a,o)})));for(const a of r)if(a.tokens)return a;return r.length>0?r[0]:null})}ru.registerCommand("_provideDocumentSemanticTokensLegend",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t]=e;Ru(t instanceof dt);const n=u.get(_n).getModel(t);if(!n)return;const{documentSemanticTokensProvider:i}=u.get(We),r=w5t(i,n);return r?r[0].getLegend():u.get(ni).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));ru.registerCommand("_provideDocumentSemanticTokens",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t]=e;Ru(t instanceof dt);const n=u.get(_n).getModel(t);if(!n)return;const{documentSemanticTokensProvider:i}=u.get(We);if(!$ye(i,n))return u.get(ni).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const r=yield Kye(i,n,null,null,Kt.None);if(!r)return;const{provider:a,tokens:o}=r;if(!o||!jR(o))return;const s=Hye({id:0,type:"full",data:o.data});return o.resultId&&a.releaseDocumentSemanticTokens(o.resultId),s}));ru.registerCommand("_provideDocumentRangeSemanticTokensLegend",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(t instanceof dt);const i=u.get(_n).getModel(t);if(!i)return;const{documentRangeSemanticTokensProvider:r}=u.get(We),a=Wye(r,i);if(a.length===0)return;if(a.length===1)return a[0].getLegend();if(!n||!j.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),a[0].getLegend();const o=yield Rte(r,i,j.lift(n),Kt.None);if(o)return o.provider.getLegend()}));ru.registerCommand("_provideDocumentRangeSemanticTokens",(u,...e)=>ng(void 0,void 0,void 0,function*(){const[t,n]=e;Ru(t instanceof dt),Ru(j.isIRange(n));const i=u.get(_n).getModel(t);if(!i)return;const{documentRangeSemanticTokensProvider:r}=u.get(We),a=yield Rte(r,i,j.lift(n),Kt.None);if(!(!a||!a.tokens))return Hye({id:0,type:"full",data:a.tokens.data})}));const Ite="editor.semanticHighlighting";function Zq(u,e,t){var n;const i=(n=t.getValue(Ite,{overrideIdentifier:u.getLanguageId(),resource:u.uri}))===null||n===void 0?void 0:n.enabled;return typeof i=="boolean"?i:e.getColorTheme().semanticHighlighting}var Gye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Od=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iE;let Yq=class extends ne{constructor(e,t,n,i,r,a){super(),this._watchers=Object.create(null);const o=c=>{this._watchers[c.uri.toString()]=new AF(c,e,n,r,a)},s=(c,d)=>{d.dispose(),delete this._watchers[c.uri.toString()]},l=()=>{for(const c of t.getModels()){const d=this._watchers[c.uri.toString()];Zq(c,n,i)?d||o(c):d&&s(c,d)}};this._register(t.onModelAdded(c=>{Zq(c,n,i)&&o(c)})),this._register(t.onModelRemoved(c=>{const d=this._watchers[c.uri.toString()];d&&s(c,d)})),this._register(i.onDidChangeConfiguration(c=>{c.affectsConfiguration(Ite)&&l()})),this._register(n.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};Yq=Gye([Od(0,kP),Od(1,_n),Od(2,sr),Od(3,tu),Od(4,q0),Od(5,We)],Yq);let AF=iE=class extends ne{constructor(e,t,n,i,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=i.for(this._provider,"DocumentSemanticTokens",{min:iE.REQUEST_MIN_DELAY,max:iE.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Hu(()=>this._fetchDocumentSemanticTokensNow(),iE.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const a=()=>{Su(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const o of this._provider.all(e))typeof o.onDidChange=="function"&&this._documentProvidersChangeListeners.push(o.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};a(),this._register(this._provider.onDidChange(()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(o=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),Su(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!$ye(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new vi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=Kye(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const r=[],a=this._model.onDidChangeContent(s=>{r.push(s)}),o=new va(!1);i.then(s=>{if(this._debounceInformation.update(this._model,o.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),!s)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:l,tokens:c}=s,d=this._semanticTokensStylingService.getStyling(l);this._setDocumentSemanticTokens(l,c||null,d,r)}},s=>{s&&(dd(s)||typeof s.message=="string"&&s.message.indexOf("busy")!==-1)||zt(s),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,i,r){r=Math.min(r,n.length-i,e.length-t);for(let a=0;a{(i.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),a();return}if(Vye(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let o=0;for(const h of t.edits)o+=(h.data?h.data.length:0)-h.deleteCount;const s=r.data,l=new Uint32Array(s.length+o);let c=s.length,d=l.length;for(let h=t.edits.length-1;h>=0;h--){const E=t.edits[h];if(E.start>s.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,E.start,s.length),this._model.tokenization.setSemanticTokens(null,!0);return}const m=c-(E.start+E.deleteCount);m>0&&(iE._copy(s,c-m,l,d-m,m),d-=m),E.data&&(iE._copy(E.data,0,l,d-E.data.length,E.data.length),d-=E.data.length),c=E.start}c>0&&iE._copy(s,0,l,0,c),t={resultId:t.resultId,data:l}}}if(jR(t)){this._currentDocumentResponse=new M5t(e,t.resultId,t.data);const o=hbe(t,n,this._model.getLanguageId());if(i.length>0)for(const s of i)for(const l of o)for(const c of s.changes)l.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(o,!0)}else this._model.tokenization.setSemanticTokens(null,!0);a()}};AF.REQUEST_MIN_DELAY=300;AF.REQUEST_MAX_DELAY=2e3;AF=iE=Gye([Od(1,kP),Od(2,sr),Od(3,q0),Od(4,We)],AF);class M5t{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}KP(Yq);var T5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},LC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let _F=class extends ne{constructor(e,t,n,i,r,a){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=i,this._editor=e,this._provider=a.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Hu(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const o=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{o()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),o()})),this._register(this._editor.onDidChangeModelContent(s=>{this._cancelAll(),o()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),o()})),this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(Ite)&&(this._cancelAll(),o())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),o()})),o()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){const n=e.getVersionId(),i=Ui(a=>Promise.resolve(Rte(this._provider,e,t,a))),r=new va(!1);return i.then(a=>{if(this._debounceInformation.update(e,r.elapsed()),!a||!a.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:o,tokens:s}=a,l=this._semanticTokensStylingService.getStyling(o);e.tokenization.setPartialSemanticTokens(t,hbe(s,l,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(i),()=>this._removeOutstandingRequest(i)),i}};_F.ID="editor.contrib.viewportSemanticTokens";_F=T5t([LC(1,kP),LC(2,sr),LC(3,tu),LC(4,q0),LC(5,We)],_F);fu(_F.ID,_F,1);class N5t{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const n=[];for(const i of t){const r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,i),this._addWordRanges(r,e,i),this._addWhitespaceLine(r,e,i),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){const i=t.getWordAtPosition(n);if(!i)return;const{word:r,startColumn:a}=i,o=n.column-a;let s=o,l=o,c=0;for(;s>=0;s--){const d=r.charCodeAt(s);if(s!==o&&(d===95||d===45))break;if(_E(d)&&Pd(c))break;c=d}for(s+=1;l0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new j(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}var P5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},R5t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},HR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Qq;class Ote{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new Ote(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}let Lv=Qq=class{static get(e){return e.getContribution(Qq.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return HR(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||(yield qye(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(112),Kt.None).then(r=>{var a;if(!(!pa(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!di(this._editor.getSelections(),t,(o,s)=>o.equalsSelection(s)))){for(let o=0;os.containsPosition(t[o].getStartPosition())&&s.containsPosition(t[o].getEndPosition())),r[o].unshift(t[o]);this._state=r.map(o=>new Ote(0,o)),(a=this._selectionListener)===null||a===void 0||a.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var o;this._ignoreSelection||((o=this._selectionListener)===null||o===void 0||o.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(r=>r.mov(e));const i=this._state.map(r=>Ye.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(i)}finally{this._ignoreSelection=!1}})}};Lv.ID="editor.contrib.smartSelectController";Lv=Qq=P5t([R5t(1,We)],Lv);class Uye extends $e{constructor(e,t){super(t),this._forward=e}run(e,t){return HR(this,void 0,void 0,function*(){const n=Lv.get(t);n&&(yield n.run(this._forward))})}}class I5t extends Uye{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:v("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}ru.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class O5t extends Uye{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:v("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:K.MenubarSelectionMenu,group:"1_basic",title:v({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}fu(Lv.ID,Lv,4);be(I5t);be(O5t);function qye(u,e,t,n,i){return HR(this,void 0,void 0,function*(){const r=u.all(e).concat(new N5t(n.selectSubwords));r.length===1&&r.unshift(new ws);const a=[],o=[];for(const s of r)a.push(Promise.resolve(s.provideSelectionRanges(e,t,i)).then(l=>{if(pa(l)&&l.length===t.length)for(let c=0;c{if(s.length===0)return[];s.sort((h,E)=>ee.isBefore(h.getStartPosition(),E.getStartPosition())?1:ee.isBefore(E.getStartPosition(),h.getStartPosition())||ee.isBefore(h.getEndPosition(),E.getEndPosition())?-1:ee.isBefore(E.getEndPosition(),h.getEndPosition())?1:0);const l=[];let c;for(const h of s)(!c||j.containsRange(h,c)&&!j.equalsRange(h,c))&&(l.push(h),c=h);if(!n.selectLeadingAndTrailingWhitespace)return l;const d=[l[0]];for(let h=1;hu}),KH="data-sticky-line-index",Tce="data-sticky-is-line",V5t="data-sticky-is-line-number",Nce="data-sticky-is-folding-icon";class $5t extends ne{constructor(e){super(),this._editor=e,this._foldingIconStore=new pe,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Jm),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(114)&&t(),n.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(e){return this._stickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n=1/0){if((!this._previousState&&!e||this._previousState&&this._previousState.equals(e))&&n===1/0)return;this._previousState=e;const i=this._stickyLines;if(this._clearStickyWidget(),!e||!this._editor._getViewModel())return;if(e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const a=[...e.startLineNumbers];e.showEndForLine!==null&&(a[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=a}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(i,t,n)}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),Nr(this._lineNumbersDomNode),Nr(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._stickyLines){const n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}_renderRootNode(e,t,n=1/0){return H5t(this,void 0,void 0,function*(){const i=this._editor.getLayoutInfo();for(const[a,o]of this._lineNumbers.entries()){const s=e[a],l=o>=n||(s==null?void 0:s.lineNumber)!==o?this._renderChildNode(a,o,t,i):this._updateTopAndZIndexOfStickyLine(s);l&&(this._linesDomNode.appendChild(l.lineDomNode),this._lineNumbersDomNode.appendChild(l.lineNumberDomNode),this._stickyLines.push(l))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const r=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(r===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${r}px`,this._linesDomNodeScrollable.style.height=`${r}px`,this._rootDomNode.style.height=`${r}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(ce(this._lineNumbersDomNode,Me.MOUSE_ENTER,t=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(ce(this._lineNumbersDomNode,Me.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,i){const r=this._editor._getViewModel();if(!r)return;const a=r.coordinatesConverter.convertModelPositionToViewPosition(new ee(t,1)).lineNumber,o=r.getViewLineRenderingData(a),s=this._editor.getOption(67);let l;try{l=os.filter(o.inlineDecorations,a,o.minColumn,o.maxColumn)}catch{l=[]}const c=new fg(!0,!0,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,0,o.tokens,l,o.tabSize,o.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new h6(2e3),h=sA(c,d);let E;Mce?E=Mce.createHTML(d.build()):E=d.build();const m=document.createElement("span");m.setAttribute(KH,String(e)),m.setAttribute(Tce,""),m.setAttribute("role","listitem"),m.tabIndex=0,m.className="sticky-line-content",m.classList.add(`stickyLine${t}`),m.style.lineHeight=`${this._lineHeight}px`,m.innerHTML=E;const g=document.createElement("span");g.setAttribute(KH,String(e)),g.setAttribute(V5t,""),g.className="sticky-line-number",g.style.lineHeight=`${this._lineHeight}px`;const f=i.contentLeft;g.style.width=`${f}px`;const p=document.createElement("span");s.renderType===1||s.renderType===3&&t%10===0?p.innerText=t.toString():s.renderType===2&&(p.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),p.className="sticky-line-number-inner",p.style.lineHeight=`${this._lineHeight}px`,p.style.width=`${i.lineNumbersWidth}px`,p.style.paddingLeft=`${i.lineNumbersLeft}px`,g.appendChild(p);const D=this._renderFoldingIconForLine(n,t);D&&g.appendChild(D.domNode),this._editor.applyFontInfo(m),this._editor.applyFontInfo(p),g.style.lineHeight=`${this._lineHeight}px`,m.style.lineHeight=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`,m.style.height=`${this._lineHeight}px`;const x=new K5t(e,t,m,g,D,h.characterMapping);return this._updateTopAndZIndexOfStickyLine(x)}_updateTopAndZIndexOfStickyLine(e){var t;const n=e.index,i=e.lineDomNode,r=e.lineNumberDomNode,a=n===this._lineNumbers.length-1,o="0",s="1";i.style.zIndex=a?o:s,r.style.zIndex=a?o:s;const l=`${n*this._lineHeight+this._lastLineRelativePosition+(!((t=e.foldingIcon)===null||t===void 0)&&t.isCollapsed?1:0)}px`,c=`${n*this._lineHeight}px`;return i.style.top=a?l:c,r.style.top=a?l:c,e}_renderFoldingIconForLine(e,t){const n=this._editor.getOption(109);if(!e||n==="never")return;const i=e.regions,r=i.findRange(t),a=i.getStartLineNumber(r);if(!(t===a))return;const s=i.isCollapsed(r),l=new W5t(s,a,i.getEndLineNumber(r),this._lineHeight);return l.setVisible(this._isOnGlyphMargin?!0:s||n==="always"),l.domNode.setAttribute(Nce,""),l}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const e of this._stickyLines)e.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=e.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const n=kX(t.characterMapping,e,0);return new ee(t.lineNumber,n)}getLineNumberFromChildDomNode(e){var t,n;return(n=(t=this._getRenderedStickyLineFromChildDomNode(e))===null||t===void 0?void 0:t.lineNumber)!==null&&n!==void 0?n:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._stickyLines.length?null:this._stickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,KH);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,Tce)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,Nce)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}}class K5t{constructor(e,t,n,i,r,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=i,this.foldingIcon=r,this.characterMapping=a}}class W5t{constructor(e,t,n,i){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=i,this.domNode=document.createElement("div"),this.domNode.style.width=`${i}px`,this.domNode.style.height=`${i}px`,this.domNode.className=st.asClassName(e?CR:vR)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class F2{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class aL{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}}class Jye{constructor(e,t,n,i){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=i}}var VR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SF=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Pce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},y2;(function(u){u.OUTLINE_MODEL="outlineModel",u.FOLDING_PROVIDER_MODEL="foldingProviderModel",u.INDENTATION_MODEL="indentationModel"})(y2||(y2={}));var jE;(function(u){u[u.VALID=0]="VALID",u[u.INVALID=1]="INVALID",u[u.CANCELED=2]="CANCELED"})(jE||(jE={}));let Xq=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._languageConfigurationService=t,this._languageFeaturesService=n,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Tl(300)),this._updateOperation=this._register(new pe);const r=new eJ(n),a=new uJ(this._editor,n),o=new tJ(this._editor,t);switch(i){case y2.OUTLINE_MODEL:this._modelProviders.push(r),this._modelProviders.push(a),this._modelProviders.push(o);break;case y2.FOLDING_PROVIDER_MODEL:this._modelProviders.push(a),this._modelProviders.push(o);break;case y2.INDENTATION_MODEL:this._modelProviders.push(o);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(e,t,n){return Pce(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>Pce(this,void 0,void 0,function*(){for(const i of this._modelProviders){const{statusPromise:r,modelPromise:a}=i.computeStickyModel(e,t,n);this._modelPromise=a;const o=yield r;if(this._modelPromise!==a)return null;switch(o){case jE.CANCELED:return this._updateOperation.clear(),null;case jE.VALID:return i.stickyModel}}return null})).catch(i=>(zt(i),null))})}};Xq=VR([SF(1,tn),SF(2,We)],Xq);class Zye{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,jE.INVALID}computeStickyModel(e,t,n){if(n.isCancellationRequested||!this.isProviderValid(e))return{statusPromise:this._invalid(),modelPromise:null};const i=Ui(r=>this.createModelFromProvider(e,t,r));return{statusPromise:i.then(r=>this.isModelValid(r)?n.isCancellationRequested?jE.CANCELED:(this._stickyModel=this.createStickyModel(e,t,n,r),jE.VALID):this._invalid()).then(void 0,r=>(zt(r),jE.CANCELED)),modelPromise:i}}isModelValid(e){return!0}isProviderValid(e){return!0}}let eJ=class extends Zye{constructor(e){super(),this._languageFeaturesService=e}createModelFromProvider(e,t,n){return kh.create(this._languageFeaturesService.documentSymbolProvider,e,n)}createStickyModel(e,t,n,i){var r;const{stickyOutlineElement:a,providerID:o}=this._stickyModelFromOutlineModel(i,(r=this._stickyModel)===null||r===void 0?void 0:r.outlineProviderId);return new Jye(e.uri,t,a,o)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if($t.first(e.children.values())instanceof Dye){const o=$t.find(e.children.values(),s=>s.id===t);if(o)n=o.children;else{let s="",l=-1,c;for(const[d,h]of e.children.entries()){const E=this._findSumOfRangesOfGroup(h);E>l&&(c=h,l=E,s=h.id)}t=s,n=c.children}}else n=e.children;const i=[],r=Array.from(n.values()).sort((o,s)=>{const l=new F2(o.symbol.range.startLineNumber,o.symbol.range.endLineNumber),c=new F2(s.symbol.range.startLineNumber,s.symbol.range.endLineNumber);return this._comparator(l,c)});for(const o of r)i.push(this._stickyModelFromOutlineElement(o,o.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new aL(void 0,i,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const n=[];for(const r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(const a of r.children.values())n.push(this._stickyModelFromOutlineElement(a,r.symbol.selectionRange.startLineNumber));n.sort((r,a)=>this._comparator(r.range,a.range));const i=new F2(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new aL(i,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Cq?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};eJ=VR([SF(0,We)],eJ);class Yye extends Zye{constructor(e){super(),this._foldingLimitReporter=new gye(e)}createStickyModel(e,t,n,i){const r=this._fromFoldingRegions(i);return new Jye(e.uri,t,r,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,n=[],i=new aL(void 0,[],void 0);for(let r=0;r0}createModelFromProvider(e,t,n){const i=T1.getFoldingRangeProviders(this._languageFeaturesService,e);return new kte(e,i,()=>this.createModelFromProvider(e,t,n),this._foldingLimitReporter,void 0).compute(n)}};uJ=VR([SF(1,We)],uJ);var G5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Rce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ice=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class U5t{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}}let nJ=class extends ne{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new Q),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new pe),this._updateSoon=this._register(new Hu(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new Xq(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var e;return(e=this._model)===null||e===void 0?void 0:e.version}update(){var e;return Ice(this,void 0,void 0,function*(){(e=this._cts)===null||e===void 0||e.dispose(!0),this._cts=new vi,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(e){return Ice(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),n=t.getVersionId(),i=yield this._stickyModelProvider.update(t,n,e);e.isCancellationRequested||(this._model=i)})}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,i,r){if(t.children.length===0)return;let a=r;const o=[];for(let c=0;cc-d)),l=this.updateIndex(X2(o,e.startLineNumber+i,(c,d)=>c-d));for(let c=s;c<=l;c++){const d=t.children[c];if(!d)return;if(d.range){const h=d.range.startLineNumber,E=d.range.endLineNumber;e.startLineNumber<=E+1&&h-1<=e.endLineNumber&&h!==a&&(a=h,n.push(new U5t(h,E-1,i+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,i+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,i,r)}}getCandidateStickyLinesIntersecting(e){var t,n;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let i=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,i,0,-1);const r=(n=this._editor._getViewModel())===null||n===void 0?void 0:n.getHiddenAreas();if(r)for(const a of r)i=i.filter(o=>!(o.startLineNumber>=a.startLineNumber&&o.endLineNumber<=a.endLineNumber+1));return i}};nJ=G5t([Rce(1,We),Rce(2,tn)],nJ);var q5t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},AD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},WH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},iJ;let N1=iJ=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=i,this._contextKeyService=o,this._sessionStore=new pe,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new $5t(this._editor),this._stickyLineCandidateProvider=new nJ(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new zce([],[],0),this._readConfiguration();const s=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{(c.hasChanged(114)||c.hasChanged(72)||c.hasChanged(66)||c.hasChanged(109))&&this._readConfiguration()})),this._register(ce(s,Me.CONTEXT_MENU,c=>WH(this,void 0,void 0,function*(){this._onContextMenu(c)}))),this._stickyScrollFocusedContextKey=W.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=W.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(y1(s));this._register(l.onDidBlur(c=>{this._positionRevealed===!1&&s.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(l.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(ce(s,Me.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(iJ.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)===null||e===void 0||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new pe,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(j.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new pe),t=this._register(new rR(this._editor,{extractLineNumberFromMouseEvent:r=>{const a=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return a?a.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;const a=r.target.element;if(!a||a.innerText!==a.innerHTML)return null;const o=this._stickyScrollWidget.getEditorPositionFromNode(a);return o?{range:new j(o.lineNumber,o.column,o.lineNumber,o.column+a.innerText.length),textElement:a}:null},i=this._stickyScrollWidget.getDomNode();this._register(xi(i,Me.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){const l=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(l===null)return;const c=new ee(this._endLineNumbers[l],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){const l=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(l);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let s=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!s){const l=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(l===null)return;s=new ee(l,1)}this._revealPosition(s)})),this._register(xi(i,Me.MOUSE_MOVE,r=>{if(r.shiftKey){const a=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(a===null||this._showEndForLine!==null&&this._showEndForLine===a)return;this._showEndForLine=a,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(ce(i,Me.MOUSE_LEAVE,r=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,a])=>{const o=n(r);if(!o||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:s,textElement:l}=o;if(!s.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=s,e.clear();else if(l.style.textDecoration==="underline")return;const c=new vi;e.add(ft(()=>c.dispose(!0)));let d;dR(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new ee(s.startLineNumber,s.startColumn+1),c.token).then(h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const E=l;d!==E?(e.clear(),d=E,d.style.textDecoration="underline",e.add(ft(()=>{d.style.textDecoration="none"}))):d||(d=E,d.style.textDecoration="underline",e.add(ft(()=>{d.style.textDecoration="none"})))}else e.clear()})})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(r=>WH(this,void 0,void 0,function*(){if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;const a=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);a&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:a.lineNumber,column:1})),this._instaService.invokeFunction(Aye,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e){const t=new x0(e);this._contextMenuService.showContextMenu({menuId:K.StickyScrollContext,getAnchor:()=>t})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getStickyLineForLine(e),n=t==null?void 0:t.foldingIcon;if(!n)return;cye(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;const i=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(66)*t.index+1;this._editor.setScrollTop(i),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(114);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const n of t)for(const i of e.ranges)if(n>=i.fromLineNumber&&n<=i.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(-1)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(t*.25)}_renderStickyScroll(e=1/0){var t,n;return WH(this,void 0,void 0,function*(){const i=this._editor.getModel();if(!i||i.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,e);return}const r=this._stickyLineCandidateProvider.getVersionId();if(r===void 0||r===i.getVersionId())if(this._foldingModel=(n=yield(t=T1.get(this._editor))===null||t===void 0?void 0:t.getFoldingModel())!==null&&n!==void 0?n:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const a=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(a)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}})}findScrollWidgetState(){const e=this._editor.getOption(66),t=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),n=this._editor.getScrollTop();let i=0;const r=[],a=[],o=this._editor.getVisibleRanges();if(o.length!==0){const s=new F2(o[0].startLineNumber,o[o.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(s);for(const c of l){const d=c.startLineNumber,h=c.endLineNumber,E=c.nestingDepth;if(h-d>0){const m=(E-1)*e,g=E*e,f=this._editor.getBottomForLineNumber(d)-n,p=this._editor.getTopForLineNumber(h)-n,D=this._editor.getBottomForLineNumber(h)-n;if(m>p&&m<=D){r.push(d),a.push(h+1),i=D-g;break}else g>f&&g<=D&&(r.push(d),a.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=a,new zce(r,a,i,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};N1.ID="store.contrib.stickyScrollController";N1=iJ=q5t([AD(1,Wl),AD(2,We),AD(3,mt),AD(4,tn),AD(5,q0),AD(6,pt)],N1);var J5t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Z5t extends n0{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:v("toggleStickyScroll","Toggle Sticky Scroll"),mnemonicTitle:v({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Sticky Scroll"),original:"Toggle Sticky Scroll"},category:j5t.View,toggled:{condition:Ee.equals("config.editor.stickyScroll.enabled",!0),title:v("stickyScroll","Sticky Scroll"),mnemonicTitle:v({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:K.CommandPalette},{id:K.MenubarAppearanceMenu,group:"4_editor",order:3},{id:K.StickyScrollContext}]})}run(e){return J5t(this,void 0,void 0,function*(){const t=e.get(tu),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)})}}const $R=100;class Y5t extends hd{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:v("focusStickyScroll","Focus Sticky Scroll"),mnemonicTitle:v({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll"),original:"Focus Sticky Scroll"},precondition:Ee.and(Ee.has("config.editor.stickyScroll.enabled"),W.stickyScrollVisible),menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focus()}}class Q5t extends hd{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:v("selectNextStickyScrollLine.title","Select next sticky scroll line"),original:"Select next sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:18}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focusNext()}}class X5t extends hd{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:v("selectPreviousStickyScrollLine.title","Select previous sticky scroll line"),original:"Select previous sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:16}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.focusPrevious()}}class ext extends hd{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:v("goToFocusedStickyScrollLine.title","Go to focused sticky scroll line"),original:"Go to focused sticky scroll line"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:3}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.goToFocused()}}class txt extends hd{constructor(){super({id:"editor.action.selectEditor",title:{value:v("selectEditor.title","Select Editor"),original:"Select Editor"},precondition:W.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:$R,primary:9}})}runEditorCommand(e,t){var n;(n=N1.get(t))===null||n===void 0||n.selectEditor()}}fu(N1.ID,N1,1);gn(Z5t);gn(Y5t);gn(X5t);gn(Q5t);gn(ext);gn(txt);var jte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},E3=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uxt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hf;class nxt{constructor(e,t,n,i,r,a){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=i,this.command=r,this.completion=a}}let rJ=class extends NUe{constructor(e,t,n,i,r,a){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=i,this._suggestMemoryService=a}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&s.resolve(Kt.None)}return t}};rJ=jte([E3(5,yR)],rJ);let aJ=class{constructor(e,t,n,i){this._getEditorOption=e,this._languageFeatureService=t,this._clipboardService=n,this._suggestMemoryService=i}provideInlineCompletions(e,t,n,i){var r;return uxt(this,void 0,void 0,function*(){if(n.selectedSuggestionInfo)return;const a=this._getEditorOption(88,e);if(w5.isAllOff(a))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const o=e.tokenization.getLineTokens(t.lineNumber),s=o.getStandardTokenType(o.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(w5.valueFor(a,s)!=="inline")return;let l=e.getWordAtPosition(t),c;if(l!=null&&l.word||(c=this._getTriggerCharacterInfo(e,t)),!(l!=null&&l.word)&&!c||(l||(l=e.getWordUntilPosition(t)),l.endColumn!==t.column))return;let d;const h=e.getValueInRange(new j(t.lineNumber,1,t.lineNumber,t.column));if(!c&&(!((r=this._lastResult)===null||r===void 0)&&r.canBeReused(e,t.lineNumber,l))){const E=new Ace(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=E,this._lastResult.acquire(),d=this._lastResult}else{const E=yield Ate(this._languageFeatureService.completionProvider,e,t,new fF(void 0,void 0,c==null?void 0:c.providers),c&&{triggerKind:1,triggerCharacter:c.ch},i);let m;E.needsClipboard&&(m=yield this._clipboardService.readText());const g=new kE(E.items,t.column,new Ace(h,0),bc.None,this._getEditorOption(117,e),this._getEditorOption(111,e),{boostFullMatch:!1,firstMatchCanBeWeak:!1},m);d=new rJ(e,t.lineNumber,l,g,E,this._suggestMemoryService)}return this._lastResult=d,d})}handleItemDidShow(e,t){t.completion.resolve(Kt.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var n;const i=e.getValueInRange(j.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),r=new Set;for(const a of this._languageFeatureService.completionProvider.all(e))!((n=a.triggerCharacters)===null||n===void 0)&&n.includes(i)&&r.add(a);if(r.size!==0)return{providers:r,ch:i}}};aJ=jte([E3(1,We),E3(2,_4),E3(3,yR)],aJ);let oL=hf=class{constructor(e,t,n,i){if(++hf._counter===1){const r=i.createInstance(aJ,(a,o)=>{var s;return((s=n.listCodeEditors().find(c=>c.getModel()===o))!==null&&s!==void 0?s:e).getOption(a)});hf._disposable=t.inlineCompletionsProvider.register("*",r)}}dispose(){var e;--hf._counter===0&&((e=hf._disposable)===null||e===void 0||e.dispose(),hf._disposable=void 0)}};oL._counter=0;oL=hf=jte([E3(1,We),E3(2,Cu),E3(3,mt)],oL);fu("suggest.inlineCompletionsProvider",oL,0);class ixt extends $e{constructor(){super({id:"editor.action.forceRetokenize",label:v("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.tokenization.resetTokenization();const i=new va;n.tokenization.forceTokenization(n.getLineCount()),i.stop(),console.log(`tokenization took ${i.elapsed()}`)}}be(ixt);class KR extends n0{constructor(){super({id:KR.ID,title:{value:v({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const t=!tv.getTabFocusMode();tv.setTabFocusMode(t),ga(t?v("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):v("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}KR.ID="editor.action.toggleTabFocusMode";gn(KR);var rxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},axt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let oJ=class extends ne{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},i){var r;super(),this._link=t,this._enabled=!0,this.el=me(e,ve("a.monaco-link",{tabIndex:(r=t.tabIndex)!==null&&r!==void 0?r:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const a=this._register(new Zt(this.el,"click")),o=this._register(new Zt(this.el,"keypress")),s=Ne.chain(o.event,d=>d.map(h=>new ln(h)).filter(h=>h.keyCode===3)),l=this._register(new Zt(this.el,Yu.Tap)).event;this._register(Zu.addTarget(this.el));const c=Ne.any(a.event,s,l);this._register(c(d=>{this.enabled&&(It.stop(d,!0),n!=null&&n.opener?n.opener(this._link.href):i.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};oJ=rxt([axt(3,Cs)],oJ);var Qye=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Xye=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const oxt=26;let sJ=class extends ne{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(lJ))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,oxt)}};sJ=Qye([Xye(1,mt)],sJ);let lJ=class extends ne{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(h4,{}),this.element=ve("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=ve("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Nr(this.element)}show(e){Nr(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const n=me(this.element,ve("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(ve(`div${st.asCSSSelector(e.icon)}`));const i=me(this.element,ve("div.message-container"));if(i.setAttribute("aria-hidden","true"),i.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=me(this.element,ve("div.message-actions-container")),e.actions)for(const a of e.actions)this._register(this.instantiationService.createInstance(oJ,this.messageActionsContainer,Object.assign(Object.assign({},a),{tabIndex:-1}),{}));const r=me(this.element,ve("div.action-container"));this.actionBar=this._register(new j0(r)),this.actionBar.push(this._register(new ro("banner.close","Close Banner",st.asClassName(F2e),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};lJ=Qye([Xye(0,mt)],lJ);var Hte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Fx=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},da=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const sxt=hi("extensions-warning-message",we.warning,v("warningIcon","Icon shown with a warning message in the extensions editor."));let zv=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;const a=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount);let o;if(r.nonBasicAsciiCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new B6};else if(r.ambiguousCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new bg};else if(r.invisibleCharacterCount>=a)o={message:v("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new S6};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:o.message,icon:sxt,actions:[{label:o.command.shortLabel,href:`command:${o.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(i.createInstance(sJ,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(124),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(124)&&(this._options=e.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=lxt(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?RGe:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new cJ(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new cxt(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};zv.ID="editor.contrib.unicodeHighlighter";zv=Hte([Fx(1,ql),Fx(2,Cbe),Fx(3,mt)],zv);function lxt(u,e){return{nonBasicASCII:e.nonBasicASCII===Ss?!u:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Ss?!u:e.includeComments,includeStrings:e.includeStrings===Ss?!u:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let cJ=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Hu(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const n=[];if(!t.hasMore)for(const i of t.ranges)n.push({range:i,options:sL.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!$X(t,e))return null;const n=t.getValueInRange(e.range);return{reason:eAe(n,this._options),inComment:KX(t,e),inString:WX(t,e)}}};cJ=Hte([Fx(3,ql)],cJ);class cxt extends ne{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Hu(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const i of e){const r=iX.computeUnicodeHighlights(this._model,this._options,i);for(const a of r.ranges)n.ranges.push(a);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(const i of n.ranges)t.push({range:i,options:sL.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),n=t.getValueInRange(e.range);return $X(t,e)?{reason:eAe(n,this._options),inComment:KX(t,e),inString:WX(t,e)}:null}}let dJ=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=this._editor.getContribution(zv.ID);if(!i)return[];const r=[],a=new Set;let o=300;for(const s of t){const l=i.getDecorationInfo(s);if(!l)continue;const d=n.getValueInRange(s.range).codePointAt(0),h=GH(d);let E;switch(l.reason.kind){case 0:{nA(l.reason.confusableWith)?E=v("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,GH(l.reason.confusableWith.codePointAt(0))):E=v("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,GH(l.reason.confusableWith.codePointAt(0)));break}case 1:E=v("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:E=v("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(a.has(E))continue;a.add(E);const m={codePoint:d,reason:l.reason,inComment:l.inComment,inString:l.inString},g=v("unicodeHighlight.adjustSettings","Adjust settings"),f=`command:${HA.ID}?${encodeURIComponent(JSON.stringify(m))}`,p=new Zr("",!0).appendMarkdown(E).appendText(" ").appendLink(f,g);r.push(new Sc(this,s.range,[p],!1,o++))}return r}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};dJ=Hte([Fx(1,vn),Fx(2,Cs)],dJ);function hJ(u){return`U+${u.toString(16).padStart(4,"0")}`}function GH(u){let e=`\`${hJ(u)}\``;return m1.isInvisibleCharacter(u)||(e+=` "${`${dxt(u)}`}"`),e}function dxt(u){return u===96?"`` ` ``":"`"+String.fromCodePoint(u)+"`"}function eAe(u,e){return iX.computeUnicodeHighlightReason(u,e)}class sL{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const n=`${e}${t}`;let i=this.map.get(n);return i||(i=Lt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,i)),i}}sL.instance=new sL;class hxt extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.includeComments,!1,2)})}}class Ext extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.includeStrings,!1,2)})}}class bg extends $e{constructor(){super({id:bg.ID,label:v("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.ambiguousCharacters,!1,2)})}}bg.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class S6 extends $e{constructor(){super({id:S6.ID,label:v("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.invisibleCharacters,!1,2)})}}S6.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class B6 extends $e{constructor(){super({id:B6.ID,label:v("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}run(e,t,n){return da(this,void 0,void 0,function*(){const i=e==null?void 0:e.get(tu);i&&this.runAction(i)})}runAction(e){return da(this,void 0,void 0,function*(){yield e.updateValue(yo.nonBasicASCII,!1,2)})}}B6.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class HA extends $e{constructor(){super({id:HA.ID,label:v("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}run(e,t,n){return da(this,void 0,void 0,function*(){const{codePoint:i,reason:r,inString:a,inComment:o}=n,s=String.fromCodePoint(i),l=e.get(md),c=e.get(tu);function d(m){return m1.isInvisibleCharacter(m)?v("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",hJ(m)):v("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${hJ(m)} "${s}"`)}const h=[];if(r.kind===0)for(const m of r.notAmbiguousInLocales)h.push({label:v("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',m),run:()=>da(this,void 0,void 0,function*(){gxt(c,[m])})});if(h.push({label:d(i),run:()=>mxt(c,[i])}),o){const m=new hxt;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(a){const m=new Ext;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}if(r.kind===0){const m=new bg;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(r.kind===1){const m=new S6;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else if(r.kind===2){const m=new B6;h.push({label:m.label,run:()=>da(this,void 0,void 0,function*(){return m.runAction(c)})})}else fxt(r);const E=yield l.pick(h,{title:v("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options")});E&&(yield E.run())})}}HA.ID="editor.action.unicodeHighlight.showExcludeOptions";function mxt(u,e){return da(this,void 0,void 0,function*(){const t=u.getValue(yo.allowedCharacters);let n;typeof t=="object"&&t?n=t:n={};for(const i of e)n[String.fromCodePoint(i)]=!0;yield u.updateValue(yo.allowedCharacters,n,2)})}function gxt(u,e){var t;return da(this,void 0,void 0,function*(){const n=(t=u.inspect(yo.allowedLocales).user)===null||t===void 0?void 0:t.value;let i;typeof n=="object"&&n?i=Object.assign({},n):i={};for(const r of e)i[r]=!0;yield u.updateValue(yo.allowedLocales,i,2)})}function fxt(u){throw new Error(`Unexpected value: ${u}`)}be(bg);be(S6);be(B6);be(HA);fu(zv.ID,zv,1);$p.register(dJ);var pxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Oce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Dxt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const tAe="ignoreUnusualLineTerminators";function xxt(u,e,t){u.setModelProperty(e.uri,tAe,t)}function vxt(u,e){return u.getModelProperty(e.uri,tAe)}let BF=class extends ne{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(i=>{i.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return Dxt(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||vxt(this._codeEditorService,e)===!0||this._editor.getOption(90))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=yield this._dialogService.confirm({title:v("unusualLineTerminators.title","Unusual Line Terminators"),message:v("unusualLineTerminators.message","Detected unusual line terminators"),detail:v("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",O0(e.uri)),primaryButton:v({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:v("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){xxt(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};BF.ID="editor.contrib.unusualLineTerminatorsDetector";BF=pxt([Oce(1,DA),Oce(2,Cu)],BF);fu(BF.ID,BF,1);var Cxt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},jce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},EJ;const WR=new Pe("hasWordHighlights",!1);function uAe(u,e,t,n){const i=u.ordered(e);return x6e(i.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,Mi)),pa)}class nAe{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Ui(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new j(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const i=t.startLineNumber,r=t.startColumn,a=t.endColumn,o=this._getCurrentWordRange(e,t);let s=!!(this._wordRange&&this._wordRange.equalsRange(o));for(let l=0,c=n.length;!s&&l=a&&(s=!0)}return s}cancel(){this.result.cancel()}}class bxt extends nAe{constructor(e,t,n,i){super(e,t,n),this._providers=i}_compute(e,t,n,i){return uAe(this._providers,e,t.getPosition(),i).then(r=>r||[])}}class kxt extends nAe{constructor(e,t,n){super(e,t,n),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,n,i){return Pm(250,i).then(()=>{if(!t.isEmpty())return[];const r=e.getWordAtPosition(t.getPosition());return!r||r.word.length>1e3?[]:e.findMatches(r.word,!0,!1,!0,n,!1).map(o=>({range:o.range,kind:ak.Text}))})}isValid(e,t,n){const i=t.isEmpty();return this._selectionIsEmpty!==i?!1:super.isValid(e,t,n)}}function Fxt(u,e,t,n){return u.has(e)?new bxt(e,t,n,u):new kxt(e,t,n)}W1("_executeDocumentHighlights",(u,e,t)=>{const n=u.get(We);return uAe(n.documentHighlightProvider,e,t,Kt.None)});class yxt{constructor(e,t,n,i){this.toUnhook=new pe,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.linkedHighlighters=n,this._hasWordHighlights=WR.bindTo(i),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(r=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(r)})),this.toUnhook.add(e.onDidChangeModelContent(r=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(r=>{const a=this.editor.getOption(80);this.occurrencesHighlight!==a&&(this.occurrencesHighlight=a,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(j.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,i=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const r=this._getWord();if(r){const a=this.editor.getModel().getLineContent(i.startLineNumber);ga(`${a}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,i=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const r=this._getWord();if(r){const a=this.editor.getModel().getLineContent(i.startLineNumber);ga(`${a}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}_run(){const e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}const t=e.startColumn,n=e.endColumn,i=this._getWord();if(!i||i.startColumn>t||i.endColumn{a===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations())},zt)}}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:ZDt(t.kind)});this.decorations.set(e),this._hasWordHighlights.set(this.hasDecorations());for(const t of this.linkedHighlighters())(t==null?void 0:t.editor.getModel())===this.editor.getModel()&&(t._stopAll(),t.decorations.set(e),t._hasWordHighlights.set(t.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let up=EJ=class extends ne{static get(e){return e.getContribution(EJ.ID)}constructor(e,t,n){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const i=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new yxt(e,n.documentHighlightProvider,()=>$t.map(this.linkedContributions,r=>r.wordHighlighter),t))};this._register(e.onDidChangeModel(r=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveNext()}moveBack(){var e;(e=this.wordHighlighter)===null||e===void 0||e.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};up.ID="editor.contrib.wordHighlighter";up=EJ=Cxt([jce(1,pt),jce(2,We)],up);class iAe extends $e{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=up.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class Axt extends iAe{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:WR,kbOpts:{kbExpr:W.editorTextFocus,primary:65,weight:100}})}}class _xt extends iAe{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:WR,kbOpts:{kbExpr:W.editorTextFocus,primary:1089,weight:100}})}}class Sxt extends $e{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:WR.toNegated(),kbOpts:{kbExpr:W.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const i=up.get(t);i&&i.restoreViewState(!0)}}fu(up.ID,up,0);be(Axt);be(_xt);be(Sxt);class GR extends xr{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const i=R0(t.getOption(129)),r=t.getModel(),o=t.getSelections().map(s=>{const l=new ee(s.positionLineNumber,s.positionColumn),c=this._move(i,r,l,this._wordNavigationType);return this._moveTo(s,c,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,o.map(s=>du.fromModelSelection(s))),o.length===1){const s=new ee(o[0].positionLineNumber,o[0].positionColumn);t.revealPosition(s,0)}}_moveTo(e,t,n){return n?new Ye(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Ye(t.lineNumber,t.column,t.lineNumber,t.column)}}class kg extends GR{_move(e,t,n,i){return vu.moveWordLeft(e,t,n,i)}}class Fg extends GR{_move(e,t,n,i){return vu.moveWordRight(e,t,n,i)}}class Bxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class wxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class Lxt extends kg{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class zxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class Mxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Txt extends kg{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class Nxt extends kg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,i){return super._move(R0(cd.wordSeparators.defaultValue),t,n,i)}}class Pxt extends kg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,i){return super._move(R0(cd.wordSeparators.defaultValue),t,n,i)}}class Rxt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class Ixt extends Fg{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Oxt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class jxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Hxt extends Fg{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Ee.and(W.textInputFocus,(e=Ee.and(lA,TP))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Vxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class $xt extends Fg{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,i){return super._move(R0(cd.wordSeparators.defaultValue),t,n,i)}}class Kxt extends Fg{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,i){return super._move(R0(cd.wordSeparators.defaultValue),t,n,i)}}class UR extends xr{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){const i=e.get(tn);if(!t.hasModel())return;const r=R0(t.getOption(129)),a=t.getModel(),o=t.getSelections(),s=t.getOption(6),l=t.getOption(11),c=i.getLanguageConfiguration(a.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=o.map(E=>{const m=this._delete({wordSeparators:r,model:a,selection:E,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:s,autoClosingQuotes:l,autoClosingPairs:c,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new Gr(m,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class Vte extends UR{_delete(e,t){const n=vu.deleteWordLeft(e,t);return n||new j(1,1,1,1)}}class $te extends UR{_delete(e,t){const n=vu.deleteWordRight(e,t);if(n)return n;const i=e.model.getLineCount(),r=e.model.getLineMaxColumn(i);return new j(i,r,i,r)}}class Wxt extends Vte{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:W.writable})}}class Gxt extends Vte{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:W.writable})}}class Uxt extends Vte{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class qxt extends $te{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:W.writable})}}class Jxt extends $te{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:W.writable})}}class Zxt extends $te{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Yxt extends $e{constructor(){super({id:"deleteInsideWord",precondition:W.writable,label:v("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;const i=R0(t.getOption(129)),r=t.getModel(),o=t.getSelections().map(s=>{const l=vu.deleteInsideWord(i,r,s);return new Gr(l,"")});t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}ze(new Bxt);ze(new wxt);ze(new Lxt);ze(new zxt);ze(new Mxt);ze(new Txt);ze(new Rxt);ze(new Ixt);ze(new Oxt);ze(new jxt);ze(new Hxt);ze(new Vxt);ze(new Nxt);ze(new Pxt);ze(new $xt);ze(new Kxt);ze(new Wxt);ze(new Gxt);ze(new Uxt);ze(new qxt);ze(new Jxt);ze(new Zxt);be(Yxt);class Qxt extends UR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const n=mP.deleteWordPartLeft(e);return n||new j(1,1,1,1)}}class Xxt extends UR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:W.writable,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const n=mP.deleteWordPartRight(e);if(n)return n;const i=e.model.getLineCount(),r=e.model.getLineMaxColumn(i);return new j(i,r,i,r)}}class rAe extends GR{_move(e,t,n,i){return mP.moveWordPartLeft(e,t,n)}}class evt extends rAe{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}ru.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class tvt extends rAe{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}ru.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class aAe extends GR{_move(e,t,n,i){return mP.moveWordPartRight(e,t,n)}}class uvt extends aAe{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class nvt extends aAe{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ze(new Qxt);ze(new Xxt);ze(new evt);ze(new tvt);ze(new uvt);ze(new nvt);class mJ extends ne{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=cs.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(91);t||(this.editor.isSimpleWidget?t=new Zr(v("editor.simple.readonly","Cannot edit in read-only input")):t=new Zr(v("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}mJ.ID="editor.contrib.readOnlyMessageController";fu(mJ.ID,mJ,2);class gJ extends ne{constructor(e){super(),this.editor=e,this.widget=null,Zc&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(90);!this.widget&&e?this.widget=new qR(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}gJ.ID="editor.contrib.iPadShowKeyboard";class qR extends ne{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(ce(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(ce(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return qR.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}qR.ID="editor.contrib.ShowKeyboardWidget";fu(gJ.ID,gJ,3);var ivt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Hce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},fJ;let Mv=fJ=class extends ne{static get(e){return e.getContribution(fJ.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(i=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(i=>this.stop())),this._register(qn.onDidChange(i=>this.stop())),this._register(this._editor.onKeyUp(i=>i.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new JR(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};Mv.ID="editor.contrib.inspectTokens";Mv=fJ=ivt([Hce(1,a0),Hce(2,vn)],Mv);class rvt extends $e{constructor(){super({id:"editor.action.inspectTokens",label:EG.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const n=Mv.get(t);n==null||n.launch()}}function avt(u){let e="";for(let t=0,n=u.length;tev,tokenize:(i,r,a)=>cX(e,a),tokenizeEncoded:(i,r,a)=>oP(n,a)}}class JR extends ne{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=ovt(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return JR._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let n=0;for(let s=t.tokens1.length-1;s>=0;s--){const l=t.tokens1[s];if(e.column-1>=l.offset){n=s;break}}let i=0;for(let s=t.tokens2.length>>>1;s>=0;s--)if(e.column-1>=t.tokens2[s<<1]){i=s;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Vce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Mb;let lL=Mb=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=jn.as(Pp.Quickaccess)}provide(e){const t=new pe;return t.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{const i=this.registry.getQuickAccessProvider(n.substr(Mb.PREFIX.length));i&&i.prefix&&i.prefix!==Mb.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==Mb.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const n=t.prefix||e.prefix,i=n||"…";return{prefix:n,label:i,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:v("helpPickAriaLabel","{0}, {1}",i,t.description),description:t.description}})}};lL.PREFIX="?";lL=Mb=svt([Vce(0,md),Vce(1,qu)],lL);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:lL,prefix:"",helpEntries:[{description:mG.helpQuickAccessActionLabel}]});class oAe{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var n;const i=new pe;e.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=i.add(new Ir);return r.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),i}doProvide(e,t){var n;const i=new pe,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const a={editor:r},o=Q2e(r);if(o){let s=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;i.add(o.onDidChangeCursorPosition(()=>{var l;s=(l=r.saveViewState())!==null&&l!==void 0?l:void 0})),a.restoreViewState=()=>{s&&r===this.activeTextEditorControl&&r.restoreViewState(s)},i.add(Mm(t.onCancellationRequested)(()=>{var l;return(l=a.restoreViewState)===null||l===void 0?void 0:l.call(a)}))}i.add(ft(()=>this.clearDecorations(r))),i.add(this.provideWithTextEditor(a,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&jm(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return Y2e(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Jn(fCe),position:Zs.Full}}}],[a,o]=n.deltaDecorations(i,r);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:o}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class ZR extends oAe{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=v("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ne.None}provideWithTextEditor(e,t,n){const i=e.editor,r=new pe;r.add(t.onDidAccept(s=>{const[l]=t.selectedItems;if(l){if(!this.isValidLineNumber(i,l.lineNumber))return;this.gotoLocation(e,{range:this.toRange(l.lineNumber,l.column),keyMods:t.keyMods,preserveFocus:s.inBackground}),s.inBackground||t.hide()}}));const a=()=>{const s=this.parsePosition(i,t.value.trim().substr(ZR.PREFIX.length)),l=this.getPickLabel(i,s.lineNumber,s.column);if(t.items=[{lineNumber:s.lineNumber,column:s.column,label:l}],t.ariaLabel=l,!this.isValidLineNumber(i,s.lineNumber)){this.clearDecorations(i);return}const c=this.toRange(s.lineNumber,s.column);i.revealRangeInCenter(c,0),this.addDecorations(i,c)};a(),r.add(t.onDidChangeValue(()=>a()));const o=Q2e(i);return o&&o.getOptions().get(67).renderType===2&&(o.updateOptions({lineNumbers:"on"}),r.add(ft(()=>o.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),i=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:i+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?v("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):v("gotoLineLabel","Go to line {0}.",t);const i=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?v("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",i.lineNumber,i.column,r):v("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",i.lineNumber,i.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;const i=this.getModel(e);if(!i)return!1;const r={lineNumber:t,column:n};return i.validatePosition(r).equals(r)}lineCount(e){var t,n;return(n=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&n!==void 0?n:0}}ZR.PREFIX=":";var lvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},cvt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let wF=class extends ZR{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=Ne.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};wF=lvt([cvt(0,Cu)],wF);let Kte=class sAe extends $e{constructor(){super({id:sAe.ID,label:nw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(md).quickAccess.show(wF.PREFIX)}};Kte.ID="editor.action.gotoLine";be(Kte);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:wF,prefix:wF.PREFIX,helpEntries:[{description:nw.gotoLineActionLabel,commandId:Kte.ID}]});const lAe=[void 0,[]];function UH(u,e,t=0,n=0){const i=e;return i.values&&i.values.length>1?dvt(u,i.values,t,n):cAe(u,e,t,n)}function dvt(u,e,t,n){let i=0;const r=[];for(const a of e){const[o,s]=cAe(u,a,t,n);if(typeof o!="number")return lAe;i+=o,r.push(...s)}return[i,hvt(r)]}function cAe(u,e,t,n){const i=T3(e.original,e.originalLowercase,t,u,u.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?[i[0],vA(i)]:lAe}function hvt(u){const e=u.sort((i,r)=>i.start-r.start),t=[];let n;for(const i of e)!n||!Evt(n,i)?(n=i,t.push(i)):(n.start=Math.min(n.start,i.start),n.end=Math.max(n.end,i.end));return t}function Evt(u,e){return!(u.end=0,a=$ce(u);let o;const s=u.split(dAe);if(s.length>1)for(const l of s){const c=$ce(l),{pathNormalized:d,normalized:h,normalizedLowercase:E}=Kce(l);h&&(o||(o=[]),o.push({original:l,originalLowercase:l.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:E,expectContiguousMatch:c}))}return{original:u,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:i,values:o,containsPathSeparator:r,expectContiguousMatch:a}}function Kce(u){let e;na?e=u.replace(/\//g,jc):e=u.replace(/\\/g,jc);const t=Cqe(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function Wce(u){return Array.isArray(u)?pJ(u.map(e=>e.original).join(dAe)):pJ(u.original)}var mvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Gce=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},yx;let f1=yx=class extends oAe{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,v("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ne.None}provideWithTextEditor(e,t,n){const i=e.editor,r=this.getModel(i);return r?this._languageFeaturesService.documentSymbolProvider.has(r)?this.doProvideWithEditorSymbols(e,r,t,n):this.doProvideWithoutEditorSymbols(e,r,t,n):ne.None}doProvideWithoutEditorSymbols(e,t,n,i){const r=new pe;return this.provideLabelPick(n,v("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),zC(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,r))||i.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,i))}),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return zC(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new QN,i=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(i.dispose(),n.complete(!0))}));return t.add(ft(()=>n.complete(!1))),n.p})}doProvideWithEditorSymbols(e,t,n,i){var r;const a=e.editor,o=new pe;o.add(n.onDidAccept(d=>{const[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),d.inBackground||n.hide())})),o.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const s=this.getDocumentSymbols(t,i);let l;const c=d=>zC(this,void 0,void 0,function*(){l==null||l.dispose(!0),n.busy=!1,l=new vi(i),n.busy=!0;try{const h=pJ(n.value.substr(yx.PREFIX.length).trim()),E=yield this.doGetSymbolPicks(s,h,void 0,l.token);if(i.isCancellationRequested)return;if(E.length>0){if(n.items=E,d&&h.original.length===0){const m=BB(E,g=>!!(g.type!=="separator"&&g.range&&j.containsPosition(g.range.decoration,d)));m&&(n.activeItems=[m])}}else h.original.length>0?this.provideLabelPick(n,v("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,v("noSymbolResults","No editor symbols"))}finally{i.isCancellationRequested||(n.busy=!1)}});return o.add(n.onDidChangeValue(()=>c(void 0))),c((r=a.getSelection())===null||r===void 0?void 0:r.getPosition()),o.add(n.onDidChangeActive(()=>{const[d]=n.activeItems;d&&d.range&&(a.revealRangeInCenter(d.range.selection,0),this.addDecorations(a,d.range.decoration))})),o}doGetSymbolPicks(e,t,n,i){var r,a;return zC(this,void 0,void 0,function*(){const o=yield e;if(i.isCancellationRequested)return[];const s=t.original.indexOf(yx.SCOPE_PREFIX)===0,l=s?1:0;let c,d;t.values&&t.values.length>1?(c=Wce(t.values[0]),d=Wce(t.values.slice(1))):c=t;let h;const E=(a=(r=this.options)===null||r===void 0?void 0:r.openSideBySideDirection)===null||a===void 0?void 0:a.call(r);E&&(h=[{iconClass:E==="right"?st.asClassName(we.splitHorizontal):st.asClassName(we.splitVertical),tooltip:E==="right"?v("openToSide","Open to the Side"):v("openToBottom","Open to the Bottom")}]);const m=[];for(let p=0;pl){let O=!1;if(c!==t&&([F,S]=UH(b,Object.assign(Object.assign({},t),{values:void 0}),l,k),typeof F=="number"&&(O=!0)),typeof F!="number"&&([F,S]=UH(b,c,l,k),typeof F!="number"))continue;if(!O&&d){if(A&&d.original.length>0&&([w,z]=UH(A,d)),typeof w!="number")continue;typeof F=="number"&&(F+=w)}}const N=D.tags&&D.tags.indexOf(1)>=0;m.push({index:p,kind:D.kind,score:F,label:b,ariaLabel:gqe(D.name,D.kind),description:A,highlights:N?void 0:{label:S,description:z},range:{selection:j.collapseToStart(D.selectionRange),decoration:D.range},strikethrough:N,buttons:h})}const g=m.sort((p,D)=>s?this.compareByKindAndScore(p,D):this.compareByScore(p,D));let f=[];if(s){let b=function(){D&&typeof p=="number"&&x>0&&(D.label=y3(JH[p]||qH,x))},p,D,x=0;for(const k of g)p!==k.kind?(b(),p=k.kind,x=1,D={type:"separator"},f.push(D)):x++,f.push(k);b()}else g.length>0&&(f=[{label:v("symbols","symbols ({0})",m.length),type:"separator"},...g]);return f})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const n=JH[e.kind]||qH,i=JH[t.kind]||qH,r=n.localeCompare(i);return r===0?this.compareByScore(e,t):r}getDocumentSymbols(e,t){return zC(this,void 0,void 0,function*(){const n=yield this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()})}};f1.PREFIX="@";f1.SCOPE_PREFIX=":";f1.PREFIX_BY_CATEGORY=`${yx.PREFIX}${yx.SCOPE_PREFIX}`;f1=yx=mvt([Gce(0,We),Gce(1,bR)],f1);const qH=v("property","properties ({0})"),JH={5:v("method","methods ({0})"),11:v("function","functions ({0})"),8:v("_constructor","constructors ({0})"),12:v("variable","variables ({0})"),4:v("class","classes ({0})"),22:v("struct","structs ({0})"),23:v("event","events ({0})"),24:v("operator","operators ({0})"),10:v("interface","interfaces ({0})"),2:v("namespace","namespaces ({0})"),3:v("package","packages ({0})"),25:v("typeParameter","type parameters ({0})"),1:v("modules","modules ({0})"),6:v("property","properties ({0})"),9:v("enum","enumerations ({0})"),21:v("enumMember","enumeration members ({0})"),14:v("string","strings ({0})"),0:v("file","files ({0})"),17:v("array","arrays ({0})"),15:v("number","numbers ({0})"),16:v("boolean","booleans ({0})"),18:v("object","objects ({0})"),19:v("key","keys ({0})"),7:v("field","fields ({0})"),13:v("constant","constants ({0})")};var gvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ZH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let DJ=class extends f1{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=Ne.None}get activeTextEditorControl(){var e;return(e=this.editorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}};DJ=gvt([ZH(0,Cu),ZH(1,We),ZH(2,bR)],DJ);class VA extends $e{constructor(){super({id:VA.ID,label:jk.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:W.hasDocumentSymbolProvider,kbOpts:{kbExpr:W.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(md).quickAccess.show(f1.PREFIX,{itemActivation:Ec.NONE})}}VA.ID="editor.action.quickOutline";be(VA);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:DJ,prefix:f1.PREFIX,helpEntries:[{description:jk.quickOutlineActionLabel,prefix:f1.PREFIX,commandId:VA.ID},{description:jk.quickOutlineByCategoryActionLabel,prefix:f1.PREFIX_BY_CATEGORY}]});function YH(u,e){return e&&(u.stack||u.stacktrace)?v("stackTrace.format","{0}: {1}",qce(u),Uce(u.stack)||Uce(u.stacktrace)):qce(u)}function Uce(u){return Array.isArray(u)?u.join(` +`):u}function qce(u){return u.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${u.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof u.code=="string"&&typeof u.errno=="number"&&typeof u.syscall=="string"?v("nodeExceptionMessage","A system error occurred ({0})",u.message):u.message||v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function hAe(u=null,e=!1){if(!u)return v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(u)){const t=b1(u),n=hAe(t[0],e);return t.length>1?v("error.moreErrors","{0} ({1} errors in total)",n,t.length):n}if(io(u))return u;if(u.detail){const t=u.detail;if(t.error)return YH(t.error,e);if(t.exception)return YH(t.exception,e)}return u.stack?YH(u,e):u.message?u.message:v("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function fvt(u){var e;const t=new Map;for(const n of u)t.set(n,((e=t.get(n))!==null&&e!==void 0?e:0)+1);return t}class A2{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const n=this.computeEmbedding(e),i=new Map,r=[];for(const[a,o]of this.documents){if(t.isCancellationRequested)return[];for(const s of o.chunks){const l=this.computeSimilarityScore(s,n,i);l>0&&r.push({key:a,score:l})}}return r}static termFrequencies(e){return fvt(A2.splitTerms(e))}static*splitTerms(e){const t=n=>n.toLowerCase();for(const[n]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(n);const i=n.split(new RegExp("(?<=[a-z])(?=[A-Z])","g"));if(i.length>1)for(const r of i)r.length>2&&/\p{Letter}{3,}/gu.test(r)&&(yield t(r))}}updateDocuments(e){var t;for(const{key:n}of e)this.deleteDocument(n);for(const n of e){const i=[];for(const r of n.textChunks){const a=A2.termFrequencies(r);for(const o of a.keys())this.chunkOccurrences.set(o,((t=this.chunkOccurrences.get(o))!==null&&t!==void 0?t:0)+1);i.push({text:r,tf:a})}this.chunkCount+=i.length,this.documents.set(n.key,{chunks:i})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const n of t.chunks)for(const i of n.tf.keys()){const r=this.chunkOccurrences.get(i);if(typeof r=="number"){const a=r-1;a<=0?this.chunkOccurrences.delete(i):this.chunkOccurrences.set(i,a)}}}}computeSimilarityScore(e,t,n){let i=0;for(const[r,a]of Object.entries(t)){const o=e.tf.get(r);if(!o)continue;let s=n.get(r);typeof s!="number"&&(s=this.computeIdf(r),n.set(r,s));const l=o*s;i+=l*a}return i}computeEmbedding(e){const t=A2.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const n=(t=this.chunkOccurrences.get(e))!==null&&t!==void 0?t:0;return n>0?Math.log((this.chunkCount+1)/n):0}computeTfidf(e){const t=Object.create(null);for(const[n,i]of e){const r=this.computeIdf(n);r>0&&(t[n]=i*r)}return t}}function pvt(u){var e,t;const n=u.slice(0);n.sort((r,a)=>a.score-r.score);const i=(t=(e=n[0])===null||e===void 0?void 0:e.score)!==null&&t!==void 0?t:0;if(i>0)for(const r of n)r.score/=i;return n}var MC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},L5;(function(u){u[u.NO_ACTION=0]="NO_ACTION",u[u.CLOSE_PICKER=1]="CLOSE_PICKER",u[u.REFRESH_PICKER=2]="REFRESH_PICKER",u[u.REMOVE_ITEM=3]="REMOVE_ITEM"})(L5||(L5={}));function QH(u){const e=u;return Array.isArray(e.items)}function Jce(u){const e=u;return!!e.picks&&e.additionalPicks instanceof Promise}class Dvt extends ne{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var i;const r=new pe;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let a;const o=r.add(new Ir),s=()=>MC(this,void 0,void 0,function*(){const l=o.value=new pe;a==null||a.dispose(!0),e.busy=!1,a=new vi(t);const c=a.token,d=e.value.substr(this.prefix.length).trim(),h=this._getPicks(d,l,c,n),E=(g,f)=>{var p;let D,x;if(QH(g)?(D=g.items,x=g.active):D=g,D.length===0){if(f)return!1;(d.length>0||e.hideInput)&&(!((p=this.options)===null||p===void 0)&&p.noResultsPick)&&(uk(this.options.noResultsPick)?D=[this.options.noResultsPick(d)]:D=[this.options.noResultsPick])}return e.items=D,x&&(e.activeItems=[x]),!0},m=g=>MC(this,void 0,void 0,function*(){let f=!1,p=!1;yield Promise.all([(()=>MC(this,void 0,void 0,function*(){typeof g.mergeDelay=="number"&&(yield Pm(g.mergeDelay),c.isCancellationRequested)||p||(f=E(g.picks,!0))}))(),(()=>MC(this,void 0,void 0,function*(){e.busy=!0;try{const D=yield g.additionalPicks;if(c.isCancellationRequested)return;let x,b;QH(g.picks)?(x=g.picks.items,b=g.picks.active):x=g.picks;let k,A;if(QH(D)?(k=D.items,A=D.active):k=D,k.length>0||!f){let F;if(!b&&!A){const S=e.activeItems[0];S&&x.indexOf(S)!==-1&&(F=S)}E({items:[...x,...k],active:b||A||F})}}finally{c.isCancellationRequested||(e.busy=!1),p=!0}}))()])});if(h!==null)if(Jce(h))yield m(h);else if(!(h instanceof Promise))E(h);else{e.busy=!0;try{const g=yield h;if(c.isCancellationRequested)return;Jce(g)?yield m(g):E(g)}finally{c.isCancellationRequested||(e.busy=!1)}}});return r.add(e.onDidChangeValue(()=>s())),s(),r.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),r.add(e.onDidTriggerItemButton(({button:l,item:c})=>MC(this,void 0,void 0,function*(){var d,h;if(typeof c.trigger=="function"){const E=(h=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&h!==void 0?h:-1;if(E>=0){const m=c.trigger(E,e.keyMods),g=typeof m=="number"?m:yield m;if(t.isCancellationRequested)return;switch(g){case L5.NO_ACTION:break;case L5.CLOSE_PICKER:e.hide();break;case L5.REFRESH_PICKER:s();break;case L5.REMOVE_ITEM:{const f=e.items.indexOf(c);if(f!==-1){const p=e.items.slice(),D=p.splice(f,1),x=e.activeItems.filter(k=>k!==D[0]),b=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=p,x&&(e.activeItems=x),e.keepScrollPosition=b}break}}}}}))),r}}var EAe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XH=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Ef,Yi;let np=Ef=class extends Dvt{constructor(e,t,n,i,r,a){super(Ef.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=i,this.telemetryService=r,this.dialogService=a,this.commandsHistory=this._register(this.instantiationService.createInstance(ip)),this.options=e}_getPicks(e,t,n,i){var r,a,o,s;return XH(this,void 0,void 0,function*(){const l=yield this.getCommandPicks(n);if(n.isCancellationRequested)return[];const c=Mm(()=>{const p=new A2;p.updateDocuments(l.map(x=>({key:x.commandId,textChunks:[x.label+(x.commandAlias?` ${x.commandAlias}`:"")]})));const D=p.calculateScores(e,n);return pvt(D).filter(x=>x.score>Ef.TFIDF_THRESHOLD).slice(0,Ef.TFIDF_MAX_RESULTS)}),d=[];for(const p of l){const D=(r=Ef.WORD_FILTER(e,p.label))!==null&&r!==void 0?r:void 0,x=p.commandAlias&&(a=Ef.WORD_FILTER(e,p.commandAlias))!==null&&a!==void 0?a:void 0;if(D||x)p.highlights={label:D,detail:this.options.showAlias?x:void 0},d.push(p);else if(e===p.commandId)d.push(p);else if(e.length>=3){const b=c();if(n.isCancellationRequested)return[];const k=b.find(A=>A.key===p.commandId);k&&(p.tfIdfScore=k.score,d.push(p))}}const h=new Map;for(const p of d){const D=h.get(p.label);D?(p.description=p.commandId,D.description=D.commandId):h.set(p.label,p)}d.sort((p,D)=>{if(p.tfIdfScore&&D.tfIdfScore)return p.tfIdfScore===D.tfIdfScore?p.label.localeCompare(D.label):D.tfIdfScore-p.tfIdfScore;if(p.tfIdfScore)return 1;if(D.tfIdfScore)return-1;const x=this.commandsHistory.peek(p.commandId),b=this.commandsHistory.peek(D.commandId);if(x&&b)return x>b?-1:1;if(x)return-1;if(b)return 1;if(this.options.suggestedCommandIds){const k=this.options.suggestedCommandIds.has(p.commandId),A=this.options.suggestedCommandIds.has(D.commandId);if(k&&A)return 0;if(k)return-1;if(A)return 1}return p.label.localeCompare(D.label)});const E=[];let m=!1,g=!0,f=!!this.options.suggestedCommandIds;for(let p=0;pXH(this,void 0,void 0,function*(){var p;const D=yield this.getAdditionalCommandPicks(l,d,e,n);if(n.isCancellationRequested)return[];const x=D.map(b=>this.toCommandPick(b,i));return g&&((p=x[0])===null||p===void 0?void 0:p.type)!=="separator"&&x.unshift({type:"separator",label:v("suggested","similar commands")}),x}))()}:E})}toCommandPick(e,t){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),i=n?v("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return Object.assign(Object.assign({},e),{ariaLabel:i,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:()=>XH(this,void 0,void 0,function*(){var r,a;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(r=t==null?void 0:t.from)!==null&&r!==void 0?r:"quick open"});try{!((a=e.args)===null||a===void 0)&&a.length?yield this.commandService.executeCommand(e.commandId,...e.args):yield this.commandService.executeCommand(e.commandId)}catch(o){dd(o)||this.dialogService.error(v("canNotRun","Command '{0}' resulted in an error",e.label),hAe(o))}})})}};np.PREFIX=">";np.TFIDF_THRESHOLD=.5;np.TFIDF_MAX_RESULTS=5;np.WORD_FILTER=tee(Kk,wot,Fbe);np=Ef=EAe([wf(1,mt),wf(2,qu),wf(3,ni),wf(4,i0),wf(5,DA)],np);let ip=Yi=class extends ne{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e)))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Yi.getConfiguredCommandHistoryLength(this.configurationService),Yi.cache&&Yi.cache.limit!==this.configuredCommandsHistoryLength&&(Yi.cache.limit=this.configuredCommandsHistoryLength,Yi.saveState(this.storageService)))}load(){const e=this.storageService.get(Yi.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const n=Yi.cache=new gg(this.configuredCommandsHistoryLength,1);if(t){let i;t.usesLRU?i=t.entries:i=t.entries.sort((r,a)=>r.value-a.value),i.forEach(r=>n.set(r.key,r.value))}Yi.counter=this.storageService.getNumber(Yi.PREF_KEY_COUNTER,0,Yi.counter)}push(e){Yi.cache&&(Yi.cache.set(e,Yi.counter++),Yi.saveState(this.storageService))}peek(e){var t;return(t=Yi.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Yi.cache)return;const t={usesLRU:!0,entries:[]};Yi.cache.forEach((n,i)=>t.entries.push({key:i,value:n})),e.store(Yi.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Yi.PREF_KEY_COUNTER,Yi.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,n;const r=(n=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||n===void 0?void 0:n.history;return typeof r=="number"?r:Yi.DEFAULT_COMMANDS_HISTORY_LENGTH}};ip.DEFAULT_COMMANDS_HISTORY_LENGTH=50;ip.PREF_KEY_CACHE="commandPalette.mru.cache";ip.PREF_KEY_COUNTER="commandPalette.mru.counter";ip.counter=1;ip=Yi=EAe([wf(0,Ul),wf(1,tu)],ip);class xvt extends np{constructor(e,t,n,i,r,a){super(e,t,n,i,r,a)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions())t.push({commandId:n.id,commandAlias:n.alias,label:oee(n.label)||n.id});return t}}var vvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_D=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Zce=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let LF=class extends xvt{get activeTextEditorControl(){var e;return(e=this.codeEditorService.getFocusedCodeEditor())!==null&&e!==void 0?e:void 0}constructor(e,t,n,i,r,a){super({showAlias:!1},e,n,i,r,a),this.codeEditorService=t}getCommandPicks(){return Zce(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return Zce(this,void 0,void 0,function*(){return[]})}};LF=vvt([_D(0,mt),_D(1,Cu),_D(2,qu),_D(3,ni),_D(4,i0),_D(5,DA)],LF);class $A extends $e{constructor(){super({id:$A.ID,label:iw.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(md).quickAccess.show(LF.PREFIX)}}$A.ID="editor.action.quickCommand";be($A);jn.as(Pp.Quickaccess).registerQuickAccessProvider({ctor:LF,prefix:LF.PREFIX,helpEntries:[{description:iw.quickCommandHelp,commandId:$A.ID}]});var Cvt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},SD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let xJ=class extends Ym{constructor(e,t,n,i,r,a,o){super(!0,e,t,n,i,r,a,o)}};xJ=Cvt([SD(1,pt),SD(2,Cu),SD(3,bi),SD(4,mt),SD(5,Ul),SD(6,tu)],xJ);fu(Ym.ID,xJ,4);class bvt extends $e{constructor(){super({id:"editor.action.toggleHighContrast",label:gG.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(a0),i=n.getColorTheme();$c(i.type)?(n.setTheme(this._originalThemeName||(iv(i.type)?vx:Mh)),this._originalThemeName=null):(n.setTheme(iv(i.type)?s3:l3),this._originalThemeName=i.themeName)}}be(bvt);const kvt=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:uke,Emitter:nke,KeyCode:ike,KeyMod:rke,MarkerSeverity:cke,MarkerTag:dke,Position:ake,Range:oke,Selection:ske,SelectionDirection:lke,Token:Eke,Uri:hke,editor:mke,languages:gke},Symbol.toStringTag,{value:"Module"}));function Fvt(){return new Worker(""+new URL("editor.worker-94ffd778.js",import.meta.url).href)}function yvt(){return new Worker(""+new URL("css.worker-c3850ceb.js",import.meta.url).href)}function Avt(){return new Worker(""+new URL("html.worker-88b237e1.js",import.meta.url).href)}function _vt(){return new Worker(""+new URL("json.worker-8dd963f3.js",import.meta.url).href)}function Svt(){return new Worker(""+new URL("ts.worker-72c9fe54.js",import.meta.url).href)}var vJ={},mAe={exports:{}},Y0={},gAe={exports:{}},fAe={};/** * @license React * scheduler.production.min.js * @@ -764,14 +764,14 @@ The flag will not be saved for the future. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var pAe=C,j0=Bvt;function et(u){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+u,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),CJ=Object.prototype.hasOwnProperty,wvt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Yce={},Qce={};function Lvt(u){return CJ.call(Qce,u)?!0:CJ.call(Yce,u)?!1:wvt.test(u)?Qce[u]=!0:(Yce[u]=!0,!1)}function zvt(u,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function Mvt(u,e,t,n){if(e===null||typeof e>"u"||zvt(u,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Cs(u,e,t,n,i,r,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=u,this.type=e,this.sanitizeURL=r,this.removeEmptyString=a}var lo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){lo[u]=new Cs(u,0,!1,u,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var e=u[0];lo[e]=new Cs(e,1,!1,u[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(u){lo[u]=new Cs(u,2,!1,u.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){lo[u]=new Cs(u,2,!1,u,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(u){lo[u]=new Cs(u,3,!1,u.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(u){lo[u]=new Cs(u,3,!0,u,null,!1,!1)});["capture","download"].forEach(function(u){lo[u]=new Cs(u,4,!1,u,null,!1,!1)});["cols","rows","size","span"].forEach(function(u){lo[u]=new Cs(u,6,!1,u,null,!1,!1)});["rowSpan","start"].forEach(function(u){lo[u]=new Cs(u,5,!1,u.toLowerCase(),null,!1,!1)});var Wte=/[\-:]([a-z])/g;function Gte(u){return u[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new Cs(e,1,!1,u,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new Cs(e,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new Cs(e,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(u){lo[u]=new Cs(u,1,!1,u.toLowerCase(),null,!1,!1)});lo.xlinkHref=new Cs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(u){lo[u]=new Cs(u,1,!1,u.toLowerCase(),null,!0,!0)});function Ute(u,e,t,n){var i=lo.hasOwnProperty(e)?lo[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),CJ=Object.prototype.hasOwnProperty,wvt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Yce={},Qce={};function Lvt(u){return CJ.call(Qce,u)?!0:CJ.call(Yce,u)?!1:wvt.test(u)?Qce[u]=!0:(Yce[u]=!0,!1)}function zvt(u,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function Mvt(u,e,t,n){if(e===null||typeof e>"u"||zvt(u,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function bs(u,e,t,n,i,r,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=u,this.type=e,this.sanitizeURL=r,this.removeEmptyString=a}var lo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){lo[u]=new bs(u,0,!1,u,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var e=u[0];lo[e]=new bs(e,1,!1,u[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(u){lo[u]=new bs(u,2,!1,u.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){lo[u]=new bs(u,2,!1,u,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(u){lo[u]=new bs(u,3,!1,u.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(u){lo[u]=new bs(u,3,!0,u,null,!1,!1)});["capture","download"].forEach(function(u){lo[u]=new bs(u,4,!1,u,null,!1,!1)});["cols","rows","size","span"].forEach(function(u){lo[u]=new bs(u,6,!1,u,null,!1,!1)});["rowSpan","start"].forEach(function(u){lo[u]=new bs(u,5,!1,u.toLowerCase(),null,!1,!1)});var Wte=/[\-:]([a-z])/g;function Gte(u){return u[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new bs(e,1,!1,u,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new bs(e,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(u){var e=u.replace(Wte,Gte);lo[e]=new bs(e,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(u){lo[u]=new bs(u,1,!1,u.toLowerCase(),null,!1,!1)});lo.xlinkHref=new bs("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(u){lo[u]=new bs(u,1,!1,u.toLowerCase(),null,!0,!0)});function Ute(u,e,t,n){var i=lo.hasOwnProperty(e)?lo[e]:null;(i!==null?i.type!==0:n||!(2o||i[a]!==r[o]){var s=` -`+i[a].replace(" at new "," at ");return u.displayName&&s.includes("")&&(s=s.replace("",u.displayName)),s}while(1<=a&&0<=o);break}}}finally{tV=!1,Error.prepareStackTrace=t}return(u=u?u.displayName||u.name:"")?Tb(u):""}function Tvt(u){switch(u.tag){case 5:return Tb(u.type);case 16:return Tb("Lazy");case 13:return Tb("Suspense");case 19:return Tb("SuspenseList");case 0:case 2:case 15:return u=uV(u.type,!1),u;case 11:return u=uV(u.type.render,!1),u;case 1:return u=uV(u.type,!0),u;default:return""}}function yJ(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case M5:return"Fragment";case z5:return"Portal";case bJ:return"Profiler";case qte:return"StrictMode";case kJ:return"Suspense";case FJ:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case vAe:return(u.displayName||"Context")+".Consumer";case xAe:return(u._context.displayName||"Context")+".Provider";case Jte:var e=u.render;return u=u.displayName,u||(u=e.displayName||e.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case Zte:return e=u.displayName||null,e!==null?e:yJ(u.type)||"Memo";case hE:e=u._payload,u=u._init;try{return yJ(u(e))}catch{}}return null}function Nvt(u){var e=u.type;switch(u.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=e.render,u=u.displayName||u.name||"",e.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yJ(e);case 8:return e===qte?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ig(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function bAe(u){var e=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Pvt(u){var e=bAe(u)?"checked":"value",t=Object.getOwnPropertyDescriptor(u.constructor.prototype,e),n=""+u[e];if(!u.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,r=t.set;return Object.defineProperty(u,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,r.call(this,a)}}),Object.defineProperty(u,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){u._valueTracker=null,delete u[e]}}}}function s_(u){u._valueTracker||(u._valueTracker=Pvt(u))}function kAe(u){if(!u)return!1;var e=u._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return u&&(n=bAe(u)?u.checked?"true":"false":u.value),u=n,u!==t?(e.setValue(u),!0):!1}function cL(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function AJ(u,e){var t=e.checked;return or({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??u._wrapperState.initialChecked})}function ede(u,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=ig(e.value!=null?e.value:t),u._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function FAe(u,e){e=e.checked,e!=null&&Ute(u,"checked",e,!1)}function _J(u,e){FAe(u,e);var t=ig(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&u.value===""||u.value!=t)&&(u.value=""+t):u.value!==""+t&&(u.value=""+t);else if(n==="submit"||n==="reset"){u.removeAttribute("value");return}e.hasOwnProperty("value")?SJ(u,e.type,t):e.hasOwnProperty("defaultValue")&&SJ(u,e.type,ig(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(u.defaultChecked=!!e.defaultChecked)}function tde(u,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+u._wrapperState.initialValue,t||e===u.value||(u.value=e),u.defaultValue=e}t=u.name,t!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,t!==""&&(u.name=t)}function SJ(u,e,t){(e!=="number"||cL(u.ownerDocument)!==u)&&(t==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+t&&(u.defaultValue=""+t))}var Nb=Array.isArray;function Ax(u,e,t,n){if(u=u.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=l_.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;e.firstChild;)u.appendChild(e.firstChild)}});function MF(u,e){if(e){var t=u.firstChild;if(t&&t===u.lastChild&&t.nodeType===3){t.nodeValue=e;return}}u.textContent=e}var _2={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rvt=["Webkit","ms","Moz","O"];Object.keys(_2).forEach(function(u){Rvt.forEach(function(e){e=e+u.charAt(0).toUpperCase()+u.substring(1),_2[e]=_2[u]})});function SAe(u,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||_2.hasOwnProperty(u)&&_2[u]?(""+e).trim():e+"px"}function BAe(u,e){u=u.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,i=SAe(t,e[t],n);t==="float"&&(t="cssFloat"),n?u.setProperty(t,i):u[t]=i}}var Ivt=or({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function LJ(u,e){if(e){if(Ivt[u]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(et(137,u));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(et(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(et(61))}if(e.style!=null&&typeof e.style!="object")throw Error(et(62))}}function zJ(u,e){if(u.indexOf("-")===-1)return typeof e.is=="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var MJ=null;function Yte(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var TJ=null,_x=null,Sx=null;function ide(u){if(u=GA(u)){if(typeof TJ!="function")throw Error(et(280));var e=u.stateNode;e&&(e=tI(e),TJ(u.stateNode,u.type,e))}}function wAe(u){_x?Sx?Sx.push(u):Sx=[u]:_x=u}function LAe(){if(_x){var u=_x,e=Sx;if(Sx=_x=null,ide(u),e)for(u=0;u>>=0,u===0?32:31-(Jvt(u)/Zvt|0)|0}var c_=64,d_=4194304;function Pb(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function mL(u,e){var t=u.pendingLanes;if(t===0)return 0;var n=0,i=u.suspendedLanes,r=u.pingedLanes,a=t&268435455;if(a!==0){var o=a&~i;o!==0?n=Pb(o):(r&=a,r!==0&&(n=Pb(r)))}else a=t&~i,a!==0?n=Pb(a):r!==0&&(n=Pb(r));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,r=e&-e,i>=r||i===16&&(r&4194240)!==0))return e;if(n&4&&(n|=t&16),e=u.entangledLanes,e!==0)for(u=u.entanglements,e&=n;0t;t++)e.push(u);return e}function KA(u,e,t){u.pendingLanes|=e,e!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,e=31-Wc(e),u[e]=t}function e6t(u,e){var t=u.pendingLanes&~e;u.pendingLanes=e,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=e,u.mutableReadLanes&=e,u.entangledLanes&=e,e=u.entanglements;var n=u.eventTimes;for(u=u.expirationTimes;0=B2),Ede=String.fromCharCode(32),mde=!1;function YAe(u,e){switch(u){case"keyup":return S6t.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QAe(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var T5=!1;function w6t(u,e){switch(u){case"compositionend":return QAe(e);case"keypress":return e.which!==32?null:(mde=!0,Ede);case"textInput":return u=e.data,u===Ede&&mde?null:u;default:return null}}function L6t(u,e){if(T5)return u==="compositionend"||!rue&&YAe(u,e)?(u=JAe(),k8=uue=HE=null,T5=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-u};u=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Dde(t)}}function u7e(u,e){return u&&e?u===e?!0:u&&u.nodeType===3?!1:e&&e.nodeType===3?u7e(u,e.parentNode):"contains"in u?u.contains(e):u.compareDocumentPosition?!!(u.compareDocumentPosition(e)&16):!1:!1}function n7e(){for(var u=window,e=cL();e instanceof u.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)u=e.contentWindow;else break;e=cL(u.document)}return e}function aue(u){var e=u&&u.nodeName&&u.nodeName.toLowerCase();return e&&(e==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||e==="textarea"||u.contentEditable==="true")}function j6t(u){var e=n7e(),t=u.focusedElem,n=u.selectionRange;if(e!==t&&t&&t.ownerDocument&&u7e(t.ownerDocument.documentElement,t)){if(n!==null&&aue(t)){if(e=n.start,u=n.end,u===void 0&&(u=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(u,t.value.length);else if(u=(e=t.ownerDocument||document)&&e.defaultView||window,u.getSelection){u=u.getSelection();var i=t.textContent.length,r=Math.min(n.start,i);n=n.end===void 0?r:Math.min(n.end,i),!u.extend&&r>n&&(i=n,n=r,r=i),i=xde(t,r);var a=xde(t,n);i&&a&&(u.rangeCount!==1||u.anchorNode!==i.node||u.anchorOffset!==i.offset||u.focusNode!==a.node||u.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),u.removeAllRanges(),r>n?(u.addRange(e),u.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),u.addRange(e)))}}for(e=[],u=t;u=u.parentNode;)u.nodeType===1&&e.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,N5=null,jJ=null,L2=null,HJ=!1;function vde(u,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;HJ||N5==null||N5!==cL(n)||(n=N5,"selectionStart"in n&&aue(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),L2&&OF(L2,n)||(L2=n,n=pL(jJ,"onSelect"),0I5||(u.current=UJ[I5],UJ[I5]=null,I5--)}function Li(u,e){I5++,UJ[I5]=u.current,u.current=e}var rg={},Oo=Ag(rg),Ws=Ag(!1),rp=rg;function Nv(u,e){var t=u.type.contextTypes;if(!t)return rg;var n=u.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in t)i[r]=e[r];return n&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=e,u.__reactInternalMemoizedMaskedChildContext=i),i}function Gs(u){return u=u.childContextTypes,u!=null}function xL(){Hi(Ws),Hi(Oo)}function _de(u,e,t){if(Oo.current!==rg)throw Error(et(168));Li(Oo,e),Li(Ws,t)}function h7e(u,e,t){var n=u.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(et(108,Nvt(u)||"Unknown",i));return or({},t,n)}function vL(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||rg,rp=Oo.current,Li(Oo,u),Li(Ws,Ws.current),!0}function Sde(u,e,t){var n=u.stateNode;if(!n)throw Error(et(169));t?(u=h7e(u,e,rp),n.__reactInternalMemoizedMergedChildContext=u,Hi(Ws),Hi(Oo),Li(Oo,u)):Hi(Ws),Li(Ws,t)}var Fh=null,uI=!1,fV=!1;function E7e(u){Fh===null?Fh=[u]:Fh.push(u)}function Q6t(u){uI=!0,E7e(u)}function _g(){if(!fV&&Fh!==null){fV=!0;var u=0,e=ui;try{var t=Fh;for(ui=1;u>=a,i-=a,Wh=1<<32-Wc(e)+i|t<S?(w=F,F=null):w=F.sibling;var z=h(p,F,x[S],b);if(z===null){F===null&&(F=w);break}u&&F&&z.alternate===null&&e(p,F),D=r(z,D,S),A===null?k=z:A.sibling=z,A=z,F=w}if(S===x.length)return t(p,F),Gi&&mf(p,S),k;if(F===null){for(;SS?(w=F,F=null):w=F.sibling;var N=h(p,F,z.value,b);if(N===null){F===null&&(F=w);break}u&&F&&N.alternate===null&&e(p,F),D=r(N,D,S),A===null?k=N:A.sibling=N,A=N,F=w}if(z.done)return t(p,F),Gi&&mf(p,S),k;if(F===null){for(;!z.done;S++,z=x.next())z=d(p,z.value,b),z!==null&&(D=r(z,D,S),A===null?k=z:A.sibling=z,A=z);return Gi&&mf(p,S),k}for(F=n(p,F);!z.done;S++,z=x.next())z=E(F,p,S,z.value,b),z!==null&&(u&&z.alternate!==null&&F.delete(z.key===null?S:z.key),D=r(z,D,S),A===null?k=z:A.sibling=z,A=z);return u&&F.forEach(function(O){return e(p,O)}),Gi&&mf(p,S),k}function f(p,D,x,b){if(typeof x=="object"&&x!==null&&x.type===M5&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case o_:e:{for(var k=x.key,A=D;A!==null;){if(A.key===k){if(k=x.type,k===M5){if(A.tag===7){t(p,A.sibling),D=i(A,x.props.children),D.return=p,p=D;break e}}else if(A.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===hE&&Nde(k)===A.type){t(p,A.sibling),D=i(A,x.props),D.ref=OC(p,A,x),D.return=p,p=D;break e}t(p,A);break}else e(p,A);A=A.sibling}x.type===M5?(D=g3(x.props.children,p.mode,b,x.key),D.return=p,p=D):(b=L8(x.type,x.key,x.props,null,p.mode,b),b.ref=OC(p,D,x),b.return=p,p=b)}return a(p);case z5:e:{for(A=x.key;D!==null;){if(D.key===A)if(D.tag===4&&D.stateNode.containerInfo===x.containerInfo&&D.stateNode.implementation===x.implementation){t(p,D.sibling),D=i(D,x.children||[]),D.return=p,p=D;break e}else{t(p,D);break}else e(p,D);D=D.sibling}D=FV(x,p.mode,b),D.return=p,p=D}return a(p);case hE:return A=x._init,f(p,D,A(x._payload),b)}if(Nb(x))return m(p,D,x,b);if(TC(x))return g(p,D,x,b);D_(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,D!==null&&D.tag===6?(t(p,D.sibling),D=i(D,x),D.return=p,p=D):(t(p,D),D=kV(x,p.mode,b),D.return=p,p=D),a(p)):t(p,D)}return f}var Rv=C7e(!0),b7e=C7e(!1),UA={},D1=Ag(UA),$F=Ag(UA),KF=Ag(UA);function qf(u){if(u===UA)throw Error(et(174));return u}function gue(u,e){switch(Li(KF,e),Li($F,u),Li(D1,UA),u=e.nodeType,u){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:wJ(null,"");break;default:u=u===8?e.parentNode:e,e=u.namespaceURI||null,u=u.tagName,e=wJ(e,u)}Hi(D1),Li(D1,e)}function Iv(){Hi(D1),Hi($F),Hi(KF)}function k7e(u){qf(KF.current);var e=qf(D1.current),t=wJ(e,u.type);e!==t&&(Li($F,u),Li(D1,t))}function fue(u){$F.current===u&&(Hi(D1),Hi($F))}var tr=Ag(0);function AL(u){for(var e=u;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===u)break;for(;e.sibling===null;){if(e.return===null||e.return===u)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var pV=[];function pue(){for(var u=0;ut?t:4,u(!0);var n=DV.transition;DV.transition={};try{u(!1),e()}finally{ui=t,DV.transition=n}}function O7e(){return Pl().memoizedState}function uCt(u,e,t){var n=vm(u);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},j7e(u))H7e(e,t);else if(t=p7e(u,e,t,n),t!==null){var i=ds();Gc(t,u,n,i),V7e(t,e,n)}}function nCt(u,e,t){var n=vm(u),i={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(j7e(u))H7e(e,i);else{var r=u.alternate;if(u.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var a=e.lastRenderedState,o=r(a,t);if(i.hasEagerState=!0,i.eagerState=o,nd(o,a)){var s=e.interleaved;s===null?(i.next=i,Eue(e)):(i.next=s.next,s.next=i),e.interleaved=i;return}}catch{}finally{}t=p7e(u,e,i,n),t!==null&&(i=ds(),Gc(t,u,n,i),V7e(t,e,n))}}function j7e(u){var e=u.alternate;return u===ar||e!==null&&e===ar}function H7e(u,e){z2=_L=!0;var t=u.pending;t===null?e.next=e:(e.next=t.next,t.next=e),u.pending=e}function V7e(u,e,t){if(t&4194240){var n=e.lanes;n&=u.pendingLanes,t|=n,e.lanes=t,Xte(u,t)}}var SL={readContext:Nl,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},iCt={readContext:Nl,useCallback:function(u,e){return zd().memoizedState=[u,e===void 0?null:e],u},useContext:Nl,useEffect:Rde,useImperativeHandle:function(u,e,t){return t=t!=null?t.concat([u]):null,_8(4194308,4,T7e.bind(null,e,u),t)},useLayoutEffect:function(u,e){return _8(4194308,4,u,e)},useInsertionEffect:function(u,e){return _8(4,2,u,e)},useMemo:function(u,e){var t=zd();return e=e===void 0?null:e,u=u(),t.memoizedState=[u,e],u},useReducer:function(u,e,t){var n=zd();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:e},n.queue=u,u=u.dispatch=uCt.bind(null,ar,u),[n.memoizedState,u]},useRef:function(u){var e=zd();return u={current:u},e.memoizedState=u},useState:Pde,useDebugValue:bue,useDeferredValue:function(u){return zd().memoizedState=u},useTransition:function(){var u=Pde(!1),e=u[0];return u=tCt.bind(null,u[1]),zd().memoizedState=u,[e,u]},useMutableSource:function(){},useSyncExternalStore:function(u,e,t){var n=ar,i=zd();if(Gi){if(t===void 0)throw Error(et(407));t=t()}else{if(t=e(),Na===null)throw Error(et(349));op&30||A7e(n,e,t)}i.memoizedState=t;var r={value:t,getSnapshot:e};return i.queue=r,Rde(S7e.bind(null,n,r,u),[u]),n.flags|=2048,UF(9,_7e.bind(null,n,r,t,e),void 0,null),t},useId:function(){var u=zd(),e=Na.identifierPrefix;if(Gi){var t=Gh,n=Wh;t=(n&~(1<<32-Wc(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=WF++,0")&&(s=s.replace("",u.displayName)),s}while(1<=a&&0<=o);break}}}finally{tV=!1,Error.prepareStackTrace=t}return(u=u?u.displayName||u.name:"")?Tb(u):""}function Tvt(u){switch(u.tag){case 5:return Tb(u.type);case 16:return Tb("Lazy");case 13:return Tb("Suspense");case 19:return Tb("SuspenseList");case 0:case 2:case 15:return u=uV(u.type,!1),u;case 11:return u=uV(u.type.render,!1),u;case 1:return u=uV(u.type,!0),u;default:return""}}function yJ(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case M5:return"Fragment";case z5:return"Portal";case bJ:return"Profiler";case qte:return"StrictMode";case kJ:return"Suspense";case FJ:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case vAe:return(u.displayName||"Context")+".Consumer";case xAe:return(u._context.displayName||"Context")+".Provider";case Jte:var e=u.render;return u=u.displayName,u||(u=e.displayName||e.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case Zte:return e=u.displayName||null,e!==null?e:yJ(u.type)||"Memo";case hE:e=u._payload,u=u._init;try{return yJ(u(e))}catch{}}return null}function Nvt(u){var e=u.type;switch(u.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=e.render,u=u.displayName||u.name||"",e.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yJ(e);case 8:return e===qte?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ig(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function bAe(u){var e=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Pvt(u){var e=bAe(u)?"checked":"value",t=Object.getOwnPropertyDescriptor(u.constructor.prototype,e),n=""+u[e];if(!u.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,r=t.set;return Object.defineProperty(u,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,r.call(this,a)}}),Object.defineProperty(u,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){u._valueTracker=null,delete u[e]}}}}function s_(u){u._valueTracker||(u._valueTracker=Pvt(u))}function kAe(u){if(!u)return!1;var e=u._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return u&&(n=bAe(u)?u.checked?"true":"false":u.value),u=n,u!==t?(e.setValue(u),!0):!1}function cL(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function AJ(u,e){var t=e.checked;return or({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??u._wrapperState.initialChecked})}function ede(u,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=ig(e.value!=null?e.value:t),u._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function FAe(u,e){e=e.checked,e!=null&&Ute(u,"checked",e,!1)}function _J(u,e){FAe(u,e);var t=ig(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&u.value===""||u.value!=t)&&(u.value=""+t):u.value!==""+t&&(u.value=""+t);else if(n==="submit"||n==="reset"){u.removeAttribute("value");return}e.hasOwnProperty("value")?SJ(u,e.type,t):e.hasOwnProperty("defaultValue")&&SJ(u,e.type,ig(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(u.defaultChecked=!!e.defaultChecked)}function tde(u,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+u._wrapperState.initialValue,t||e===u.value||(u.value=e),u.defaultValue=e}t=u.name,t!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,t!==""&&(u.name=t)}function SJ(u,e,t){(e!=="number"||cL(u.ownerDocument)!==u)&&(t==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+t&&(u.defaultValue=""+t))}var Nb=Array.isArray;function Ax(u,e,t,n){if(u=u.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=l_.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;e.firstChild;)u.appendChild(e.firstChild)}});function MF(u,e){if(e){var t=u.firstChild;if(t&&t===u.lastChild&&t.nodeType===3){t.nodeValue=e;return}}u.textContent=e}var _2={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rvt=["Webkit","ms","Moz","O"];Object.keys(_2).forEach(function(u){Rvt.forEach(function(e){e=e+u.charAt(0).toUpperCase()+u.substring(1),_2[e]=_2[u]})});function SAe(u,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||_2.hasOwnProperty(u)&&_2[u]?(""+e).trim():e+"px"}function BAe(u,e){u=u.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,i=SAe(t,e[t],n);t==="float"&&(t="cssFloat"),n?u.setProperty(t,i):u[t]=i}}var Ivt=or({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function LJ(u,e){if(e){if(Ivt[u]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(et(137,u));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(et(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(et(61))}if(e.style!=null&&typeof e.style!="object")throw Error(et(62))}}function zJ(u,e){if(u.indexOf("-")===-1)return typeof e.is=="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var MJ=null;function Yte(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var TJ=null,_x=null,Sx=null;function ide(u){if(u=GA(u)){if(typeof TJ!="function")throw Error(et(280));var e=u.stateNode;e&&(e=tI(e),TJ(u.stateNode,u.type,e))}}function wAe(u){_x?Sx?Sx.push(u):Sx=[u]:_x=u}function LAe(){if(_x){var u=_x,e=Sx;if(Sx=_x=null,ide(u),e)for(u=0;u>>=0,u===0?32:31-(Jvt(u)/Zvt|0)|0}var c_=64,d_=4194304;function Pb(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function mL(u,e){var t=u.pendingLanes;if(t===0)return 0;var n=0,i=u.suspendedLanes,r=u.pingedLanes,a=t&268435455;if(a!==0){var o=a&~i;o!==0?n=Pb(o):(r&=a,r!==0&&(n=Pb(r)))}else a=t&~i,a!==0?n=Pb(a):r!==0&&(n=Pb(r));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,r=e&-e,i>=r||i===16&&(r&4194240)!==0))return e;if(n&4&&(n|=t&16),e=u.entangledLanes,e!==0)for(u=u.entanglements,e&=n;0t;t++)e.push(u);return e}function KA(u,e,t){u.pendingLanes|=e,e!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,e=31-Wc(e),u[e]=t}function e6t(u,e){var t=u.pendingLanes&~e;u.pendingLanes=e,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=e,u.mutableReadLanes&=e,u.entangledLanes&=e,e=u.entanglements;var n=u.eventTimes;for(u=u.expirationTimes;0=B2),Ede=String.fromCharCode(32),mde=!1;function YAe(u,e){switch(u){case"keyup":return S6t.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QAe(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var T5=!1;function w6t(u,e){switch(u){case"compositionend":return QAe(e);case"keypress":return e.which!==32?null:(mde=!0,Ede);case"textInput":return u=e.data,u===Ede&&mde?null:u;default:return null}}function L6t(u,e){if(T5)return u==="compositionend"||!rue&&YAe(u,e)?(u=JAe(),k8=uue=HE=null,T5=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-u};u=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Dde(t)}}function u7e(u,e){return u&&e?u===e?!0:u&&u.nodeType===3?!1:e&&e.nodeType===3?u7e(u,e.parentNode):"contains"in u?u.contains(e):u.compareDocumentPosition?!!(u.compareDocumentPosition(e)&16):!1:!1}function n7e(){for(var u=window,e=cL();e instanceof u.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)u=e.contentWindow;else break;e=cL(u.document)}return e}function aue(u){var e=u&&u.nodeName&&u.nodeName.toLowerCase();return e&&(e==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||e==="textarea"||u.contentEditable==="true")}function j6t(u){var e=n7e(),t=u.focusedElem,n=u.selectionRange;if(e!==t&&t&&t.ownerDocument&&u7e(t.ownerDocument.documentElement,t)){if(n!==null&&aue(t)){if(e=n.start,u=n.end,u===void 0&&(u=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(u,t.value.length);else if(u=(e=t.ownerDocument||document)&&e.defaultView||window,u.getSelection){u=u.getSelection();var i=t.textContent.length,r=Math.min(n.start,i);n=n.end===void 0?r:Math.min(n.end,i),!u.extend&&r>n&&(i=n,n=r,r=i),i=xde(t,r);var a=xde(t,n);i&&a&&(u.rangeCount!==1||u.anchorNode!==i.node||u.anchorOffset!==i.offset||u.focusNode!==a.node||u.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),u.removeAllRanges(),r>n?(u.addRange(e),u.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),u.addRange(e)))}}for(e=[],u=t;u=u.parentNode;)u.nodeType===1&&e.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,N5=null,jJ=null,L2=null,HJ=!1;function vde(u,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;HJ||N5==null||N5!==cL(n)||(n=N5,"selectionStart"in n&&aue(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),L2&&OF(L2,n)||(L2=n,n=pL(jJ,"onSelect"),0I5||(u.current=UJ[I5],UJ[I5]=null,I5--)}function Li(u,e){I5++,UJ[I5]=u.current,u.current=e}var rg={},Oo=Ag(rg),Gs=Ag(!1),rp=rg;function Nv(u,e){var t=u.type.contextTypes;if(!t)return rg;var n=u.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in t)i[r]=e[r];return n&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=e,u.__reactInternalMemoizedMaskedChildContext=i),i}function Us(u){return u=u.childContextTypes,u!=null}function xL(){Hi(Gs),Hi(Oo)}function _de(u,e,t){if(Oo.current!==rg)throw Error(et(168));Li(Oo,e),Li(Gs,t)}function h7e(u,e,t){var n=u.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(et(108,Nvt(u)||"Unknown",i));return or({},t,n)}function vL(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||rg,rp=Oo.current,Li(Oo,u),Li(Gs,Gs.current),!0}function Sde(u,e,t){var n=u.stateNode;if(!n)throw Error(et(169));t?(u=h7e(u,e,rp),n.__reactInternalMemoizedMergedChildContext=u,Hi(Gs),Hi(Oo),Li(Oo,u)):Hi(Gs),Li(Gs,t)}var Fh=null,uI=!1,fV=!1;function E7e(u){Fh===null?Fh=[u]:Fh.push(u)}function Q6t(u){uI=!0,E7e(u)}function _g(){if(!fV&&Fh!==null){fV=!0;var u=0,e=ui;try{var t=Fh;for(ui=1;u>=a,i-=a,Wh=1<<32-Wc(e)+i|t<S?(w=F,F=null):w=F.sibling;var z=h(p,F,x[S],b);if(z===null){F===null&&(F=w);break}u&&F&&z.alternate===null&&e(p,F),D=r(z,D,S),A===null?k=z:A.sibling=z,A=z,F=w}if(S===x.length)return t(p,F),Gi&&mf(p,S),k;if(F===null){for(;SS?(w=F,F=null):w=F.sibling;var N=h(p,F,z.value,b);if(N===null){F===null&&(F=w);break}u&&F&&N.alternate===null&&e(p,F),D=r(N,D,S),A===null?k=N:A.sibling=N,A=N,F=w}if(z.done)return t(p,F),Gi&&mf(p,S),k;if(F===null){for(;!z.done;S++,z=x.next())z=d(p,z.value,b),z!==null&&(D=r(z,D,S),A===null?k=z:A.sibling=z,A=z);return Gi&&mf(p,S),k}for(F=n(p,F);!z.done;S++,z=x.next())z=E(F,p,S,z.value,b),z!==null&&(u&&z.alternate!==null&&F.delete(z.key===null?S:z.key),D=r(z,D,S),A===null?k=z:A.sibling=z,A=z);return u&&F.forEach(function(O){return e(p,O)}),Gi&&mf(p,S),k}function f(p,D,x,b){if(typeof x=="object"&&x!==null&&x.type===M5&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case o_:e:{for(var k=x.key,A=D;A!==null;){if(A.key===k){if(k=x.type,k===M5){if(A.tag===7){t(p,A.sibling),D=i(A,x.props.children),D.return=p,p=D;break e}}else if(A.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===hE&&Nde(k)===A.type){t(p,A.sibling),D=i(A,x.props),D.ref=OC(p,A,x),D.return=p,p=D;break e}t(p,A);break}else e(p,A);A=A.sibling}x.type===M5?(D=g3(x.props.children,p.mode,b,x.key),D.return=p,p=D):(b=L8(x.type,x.key,x.props,null,p.mode,b),b.ref=OC(p,D,x),b.return=p,p=b)}return a(p);case z5:e:{for(A=x.key;D!==null;){if(D.key===A)if(D.tag===4&&D.stateNode.containerInfo===x.containerInfo&&D.stateNode.implementation===x.implementation){t(p,D.sibling),D=i(D,x.children||[]),D.return=p,p=D;break e}else{t(p,D);break}else e(p,D);D=D.sibling}D=FV(x,p.mode,b),D.return=p,p=D}return a(p);case hE:return A=x._init,f(p,D,A(x._payload),b)}if(Nb(x))return m(p,D,x,b);if(TC(x))return g(p,D,x,b);D_(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,D!==null&&D.tag===6?(t(p,D.sibling),D=i(D,x),D.return=p,p=D):(t(p,D),D=kV(x,p.mode,b),D.return=p,p=D),a(p)):t(p,D)}return f}var Rv=C7e(!0),b7e=C7e(!1),UA={},D1=Ag(UA),$F=Ag(UA),KF=Ag(UA);function qf(u){if(u===UA)throw Error(et(174));return u}function gue(u,e){switch(Li(KF,e),Li($F,u),Li(D1,UA),u=e.nodeType,u){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:wJ(null,"");break;default:u=u===8?e.parentNode:e,e=u.namespaceURI||null,u=u.tagName,e=wJ(e,u)}Hi(D1),Li(D1,e)}function Iv(){Hi(D1),Hi($F),Hi(KF)}function k7e(u){qf(KF.current);var e=qf(D1.current),t=wJ(e,u.type);e!==t&&(Li($F,u),Li(D1,t))}function fue(u){$F.current===u&&(Hi(D1),Hi($F))}var tr=Ag(0);function AL(u){for(var e=u;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===u)break;for(;e.sibling===null;){if(e.return===null||e.return===u)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var pV=[];function pue(){for(var u=0;ut?t:4,u(!0);var n=DV.transition;DV.transition={};try{u(!1),e()}finally{ui=t,DV.transition=n}}function O7e(){return Pl().memoizedState}function uCt(u,e,t){var n=vm(u);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},j7e(u))H7e(e,t);else if(t=p7e(u,e,t,n),t!==null){var i=hs();Gc(t,u,n,i),V7e(t,e,n)}}function nCt(u,e,t){var n=vm(u),i={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(j7e(u))H7e(e,i);else{var r=u.alternate;if(u.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var a=e.lastRenderedState,o=r(a,t);if(i.hasEagerState=!0,i.eagerState=o,nd(o,a)){var s=e.interleaved;s===null?(i.next=i,Eue(e)):(i.next=s.next,s.next=i),e.interleaved=i;return}}catch{}finally{}t=p7e(u,e,i,n),t!==null&&(i=hs(),Gc(t,u,n,i),V7e(t,e,n))}}function j7e(u){var e=u.alternate;return u===ar||e!==null&&e===ar}function H7e(u,e){z2=_L=!0;var t=u.pending;t===null?e.next=e:(e.next=t.next,t.next=e),u.pending=e}function V7e(u,e,t){if(t&4194240){var n=e.lanes;n&=u.pendingLanes,t|=n,e.lanes=t,Xte(u,t)}}var SL={readContext:Nl,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},iCt={readContext:Nl,useCallback:function(u,e){return zd().memoizedState=[u,e===void 0?null:e],u},useContext:Nl,useEffect:Rde,useImperativeHandle:function(u,e,t){return t=t!=null?t.concat([u]):null,_8(4194308,4,T7e.bind(null,e,u),t)},useLayoutEffect:function(u,e){return _8(4194308,4,u,e)},useInsertionEffect:function(u,e){return _8(4,2,u,e)},useMemo:function(u,e){var t=zd();return e=e===void 0?null:e,u=u(),t.memoizedState=[u,e],u},useReducer:function(u,e,t){var n=zd();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:e},n.queue=u,u=u.dispatch=uCt.bind(null,ar,u),[n.memoizedState,u]},useRef:function(u){var e=zd();return u={current:u},e.memoizedState=u},useState:Pde,useDebugValue:bue,useDeferredValue:function(u){return zd().memoizedState=u},useTransition:function(){var u=Pde(!1),e=u[0];return u=tCt.bind(null,u[1]),zd().memoizedState=u,[e,u]},useMutableSource:function(){},useSyncExternalStore:function(u,e,t){var n=ar,i=zd();if(Gi){if(t===void 0)throw Error(et(407));t=t()}else{if(t=e(),Na===null)throw Error(et(349));op&30||A7e(n,e,t)}i.memoizedState=t;var r={value:t,getSnapshot:e};return i.queue=r,Rde(S7e.bind(null,n,r,u),[u]),n.flags|=2048,UF(9,_7e.bind(null,n,r,t,e),void 0,null),t},useId:function(){var u=zd(),e=Na.identifierPrefix;if(Gi){var t=Gh,n=Wh;t=(n&~(1<<32-Wc(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=WF++,0<\/script>",u=u.removeChild(u.firstChild)):typeof n.is=="string"?u=a.createElement(t,{is:n.is}):(u=a.createElement(t),t==="select"&&(a=u,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):u=a.createElementNS(u,t),u[Yd]=e,u[VF]=n,Y7e(u,e,!1,!1),e.stateNode=u;e:{switch(a=zJ(t,n),t){case"dialog":Pi("cancel",u),Pi("close",u),i=n;break;case"iframe":case"object":case"embed":Pi("load",u),i=n;break;case"video":case"audio":for(i=0;ijv&&(e.flags|=128,n=!0,jC(r,!1),e.lanes=4194304)}else{if(!n)if(u=AL(a),u!==null){if(e.flags|=128,n=!0,t=u.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),jC(r,!0),r.tail===null&&r.tailMode==="hidden"&&!a.alternate&&!Gi)return Do(e),null}else 2*wr()-r.renderingStartTime>jv&&t!==1073741824&&(e.flags|=128,n=!0,jC(r,!1),e.lanes=4194304);r.isBackwards?(a.sibling=e.child,e.child=a):(t=r.last,t!==null?t.sibling=a:e.child=a,r.last=a)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=wr(),e.sibling=null,t=tr.current,Li(tr,n?t&1|2:t&1),e):(Do(e),null);case 22:case 23:return Sue(),n=e.memoizedState!==null,u!==null&&u.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?h0&1073741824&&(Do(e),e.subtreeFlags&6&&(e.flags|=8192)):Do(e),null;case 24:return null;case 25:return null}throw Error(et(156,e.tag))}function hCt(u,e){switch(sue(e),e.tag){case 1:return Gs(e.type)&&xL(),u=e.flags,u&65536?(e.flags=u&-65537|128,e):null;case 3:return Iv(),Hi(Ws),Hi(Oo),pue(),u=e.flags,u&65536&&!(u&128)?(e.flags=u&-65537|128,e):null;case 5:return fue(e),null;case 13:if(Hi(tr),u=e.memoizedState,u!==null&&u.dehydrated!==null){if(e.alternate===null)throw Error(et(340));Pv()}return u=e.flags,u&65536?(e.flags=u&-65537|128,e):null;case 19:return Hi(tr),null;case 4:return Iv(),null;case 10:return hue(e.type._context),null;case 22:case 23:return Sue(),null;case 24:return null;default:return null}}var v_=!1,So=!1,ECt=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function V5(u,e){var t=u.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Er(u,e,n)}else t.current=null}function rZ(u,e,t){try{t()}catch(n){Er(u,e,n)}}var Gde=!1;function mCt(u,e){if(VJ=gL,u=n7e(),aue(u)){if("selectionStart"in u)var t={start:u.selectionStart,end:u.selectionEnd};else e:{t=(t=u.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var i=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var a=0,o=-1,s=-1,l=0,c=0,d=u,h=null;t:for(;;){for(var E;d!==t||i!==0&&d.nodeType!==3||(o=a+i),d!==r||n!==0&&d.nodeType!==3||(s=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(E=d.firstChild)!==null;)h=d,d=E;for(;;){if(d===u)break t;if(h===t&&++l===i&&(o=a),h===r&&++c===n&&(s=a),(E=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=E}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for($J={focusedElem:u,selectionRange:t},gL=!1,Bt=e;Bt!==null;)if(e=Bt,u=e.child,(e.subtreeFlags&1028)!==0&&u!==null)u.return=e,Bt=u;else for(;Bt!==null;){e=Bt;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,f=m.memoizedState,p=e.stateNode,D=p.getSnapshotBeforeUpdate(e.elementType===e.type?g:dc(e.type,g),f);p.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(et(163))}}catch(b){Er(e,e.return,b)}if(u=e.sibling,u!==null){u.return=e.return,Bt=u;break}Bt=e.return}return m=Gde,Gde=!1,m}function M2(u,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&u)===u){var r=i.destroy;i.destroy=void 0,r!==void 0&&rZ(e,t,r)}i=i.next}while(i!==n)}}function rI(u,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&u)===u){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function aZ(u){var e=u.ref;if(e!==null){var t=u.stateNode;switch(u.tag){case 5:u=t;break;default:u=t}typeof e=="function"?e(u):e.current=u}}function e9e(u){var e=u.alternate;e!==null&&(u.alternate=null,e9e(e)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(e=u.stateNode,e!==null&&(delete e[Yd],delete e[VF],delete e[GJ],delete e[Z6t],delete e[Y6t])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function t9e(u){return u.tag===5||u.tag===3||u.tag===4}function Ude(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||t9e(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function oZ(u,e,t){var n=u.tag;if(n===5||n===6)u=u.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(u,e):t.insertBefore(u,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(u,t)):(e=t,e.appendChild(u)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=DL));else if(n!==4&&(u=u.child,u!==null))for(oZ(u,e,t),u=u.sibling;u!==null;)oZ(u,e,t),u=u.sibling}function sZ(u,e,t){var n=u.tag;if(n===5||n===6)u=u.stateNode,e?t.insertBefore(u,e):t.appendChild(u);else if(n!==4&&(u=u.child,u!==null))for(sZ(u,e,t),u=u.sibling;u!==null;)sZ(u,e,t),u=u.sibling}var Ga=null,pc=!1;function G4(u,e,t){for(t=t.child;t!==null;)u9e(u,e,t),t=t.sibling}function u9e(u,e,t){if(p1&&typeof p1.onCommitFiberUnmount=="function")try{p1.onCommitFiberUnmount(YR,t)}catch{}switch(t.tag){case 5:So||V5(t,e);case 6:var n=Ga,i=pc;Ga=null,G4(u,e,t),Ga=n,pc=i,Ga!==null&&(pc?(u=Ga,t=t.stateNode,u.nodeType===8?u.parentNode.removeChild(t):u.removeChild(t)):Ga.removeChild(t.stateNode));break;case 18:Ga!==null&&(pc?(u=Ga,t=t.stateNode,u.nodeType===8?gV(u.parentNode,t):u.nodeType===1&&gV(u,t),RF(u)):gV(Ga,t.stateNode));break;case 4:n=Ga,i=pc,Ga=t.stateNode.containerInfo,pc=!0,G4(u,e,t),Ga=n,pc=i;break;case 0:case 11:case 14:case 15:if(!So&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var r=i,a=r.destroy;r=r.tag,a!==void 0&&(r&2||r&4)&&rZ(t,e,a),i=i.next}while(i!==n)}G4(u,e,t);break;case 1:if(!So&&(V5(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(o){Er(t,e,o)}G4(u,e,t);break;case 21:G4(u,e,t);break;case 22:t.mode&1?(So=(n=So)||t.memoizedState!==null,G4(u,e,t),So=n):G4(u,e,t);break;default:G4(u,e,t)}}function qde(u){var e=u.updateQueue;if(e!==null){u.updateQueue=null;var t=u.stateNode;t===null&&(t=u.stateNode=new ECt),e.forEach(function(n){var i=kCt.bind(null,u,n);t.has(n)||(t.add(n),n.then(i,i))})}}function tc(u,e){var t=e.deletions;if(t!==null)for(var n=0;ni&&(i=a),n&=~r}if(n=i,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fCt(n/1960))-n,10u?16:u,VE===null)var n=!1;else{if(u=VE,VE=null,LL=0,xn&6)throw Error(et(331));var i=xn;for(xn|=4,Bt=u.current;Bt!==null;){var r=Bt,a=r.child;if(Bt.flags&16){var o=r.deletions;if(o!==null){for(var s=0;swr()-Aue?m3(u,0):yue|=t),Us(u,e)}function c9e(u,e){e===0&&(u.mode&1?(e=d_,d_<<=1,!(d_&130023424)&&(d_=4194304)):e=1);var t=ds();u=g4(u,e),u!==null&&(KA(u,e,t),Us(u,t))}function bCt(u){var e=u.memoizedState,t=0;e!==null&&(t=e.retryLane),c9e(u,t)}function kCt(u,e){var t=0;switch(u.tag){case 13:var n=u.stateNode,i=u.memoizedState;i!==null&&(t=i.retryLane);break;case 19:n=u.stateNode;break;default:throw Error(et(314))}n!==null&&n.delete(e),c9e(u,t)}var d9e;d9e=function(u,e,t){if(u!==null)if(u.memoizedProps!==e.pendingProps||Ws.current)Vs=!0;else{if(!(u.lanes&t)&&!(e.flags&128))return Vs=!1,cCt(u,e,t);Vs=!!(u.flags&131072)}else Vs=!1,Gi&&e.flags&1048576&&m7e(e,bL,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;S8(u,e),u=e.pendingProps;var i=Nv(e,Oo.current);wx(e,t),i=xue(null,e,n,u,i,t);var r=vue();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Gs(n)?(r=!0,vL(e)):r=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mue(e),i.updater=nI,e.stateNode=i,i._reactInternals=e,QJ(e,n,u,t),e=tZ(null,e,n,!0,r,t)):(e.tag=0,Gi&&r&&oue(e),Zo(null,e,i,t),e=e.child),e;case 16:n=e.elementType;e:{switch(S8(u,e),u=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=yCt(n),u=dc(n,u),i){case 0:e=eZ(null,e,n,u,t);break e;case 1:e=$de(null,e,n,u,t);break e;case 11:e=Hde(null,e,n,u,t);break e;case 14:e=Vde(null,e,n,dc(n.type,u),t);break e}throw Error(et(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),eZ(u,e,n,i,t);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),$de(u,e,n,i,t);case 3:e:{if(q7e(e),u===null)throw Error(et(387));n=e.pendingProps,r=e.memoizedState,i=r.element,D7e(u,e),yL(e,n,null,t);var a=e.memoizedState;if(n=a.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){i=Ov(Error(et(423)),e),e=Kde(u,e,n,t,i);break e}else if(n!==i){i=Ov(Error(et(424)),e),e=Kde(u,e,n,t,i);break e}else for(C0=pm(e.stateNode.containerInfo.firstChild),B0=e,Gi=!0,kc=null,t=b7e(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Pv(),n===i){e=f4(u,e,t);break e}Zo(u,e,n,t)}e=e.child}return e;case 5:return k7e(e),u===null&&JJ(e),n=e.type,i=e.pendingProps,r=u!==null?u.memoizedProps:null,a=i.children,KJ(n,i)?a=null:r!==null&&KJ(n,r)&&(e.flags|=32),U7e(u,e),Zo(u,e,a,t),e.child;case 6:return u===null&&JJ(e),null;case 13:return J7e(u,e,t);case 4:return gue(e,e.stateNode.containerInfo),n=e.pendingProps,u===null?e.child=Rv(e,null,n,t):Zo(u,e,n,t),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),Hde(u,e,n,i,t);case 7:return Zo(u,e,e.pendingProps,t),e.child;case 8:return Zo(u,e,e.pendingProps.children,t),e.child;case 12:return Zo(u,e,e.pendingProps.children,t),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,r=e.memoizedProps,a=i.value,Li(kL,n._currentValue),n._currentValue=a,r!==null)if(nd(r.value,a)){if(r.children===i.children&&!Ws.current){e=f4(u,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){a=r.child;for(var s=o.firstContext;s!==null;){if(s.context===n){if(r.tag===1){s=n4(-1,t&-t),s.tag=2;var l=r.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}r.lanes|=t,s=r.alternate,s!==null&&(s.lanes|=t),ZJ(r.return,t,e),o.lanes|=t;break}s=s.next}}else if(r.tag===10)a=r.type===e.type?null:r.child;else if(r.tag===18){if(a=r.return,a===null)throw Error(et(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),ZJ(a,t,e),a=r.sibling}else a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}Zo(u,e,i.children,t),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,wx(e,t),i=Nl(i),n=n(i),e.flags|=1,Zo(u,e,n,t),e.child;case 14:return n=e.type,i=dc(n,e.pendingProps),i=dc(n.type,i),Vde(u,e,n,i,t);case 15:return W7e(u,e,e.type,e.pendingProps,t);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),S8(u,e),e.tag=1,Gs(n)?(u=!0,vL(e)):u=!1,wx(e,t),v7e(e,n,i),QJ(e,n,i,t),tZ(null,e,n,!0,u,t);case 19:return Z7e(u,e,t);case 22:return G7e(u,e,t)}throw Error(et(156,e.tag))};function h9e(u,e){return IAe(u,e)}function FCt(u,e,t,n){this.tag=u,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dl(u,e,t,n){return new FCt(u,e,t,n)}function wue(u){return u=u.prototype,!(!u||!u.isReactComponent)}function yCt(u){if(typeof u=="function")return wue(u)?1:0;if(u!=null){if(u=u.$$typeof,u===Jte)return 11;if(u===Zte)return 14}return 2}function Cm(u,e){var t=u.alternate;return t===null?(t=Dl(u.tag,e,u.key,u.mode),t.elementType=u.elementType,t.type=u.type,t.stateNode=u.stateNode,t.alternate=u,u.alternate=t):(t.pendingProps=e,t.type=u.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=u.flags&14680064,t.childLanes=u.childLanes,t.lanes=u.lanes,t.child=u.child,t.memoizedProps=u.memoizedProps,t.memoizedState=u.memoizedState,t.updateQueue=u.updateQueue,e=u.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=u.sibling,t.index=u.index,t.ref=u.ref,t}function L8(u,e,t,n,i,r){var a=2;if(n=u,typeof u=="function")wue(u)&&(a=1);else if(typeof u=="string")a=5;else e:switch(u){case M5:return g3(t.children,i,r,e);case qte:a=8,i|=8;break;case bJ:return u=Dl(12,t,e,i|2),u.elementType=bJ,u.lanes=r,u;case kJ:return u=Dl(13,t,e,i),u.elementType=kJ,u.lanes=r,u;case FJ:return u=Dl(19,t,e,i),u.elementType=FJ,u.lanes=r,u;case CAe:return oI(t,i,r,e);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case xAe:a=10;break e;case vAe:a=9;break e;case Jte:a=11;break e;case Zte:a=14;break e;case hE:a=16,n=null;break e}throw Error(et(130,u==null?u:typeof u,""))}return e=Dl(a,t,e,i),e.elementType=u,e.type=n,e.lanes=r,e}function g3(u,e,t,n){return u=Dl(7,u,n,e),u.lanes=t,u}function oI(u,e,t,n){return u=Dl(22,u,n,e),u.elementType=CAe,u.lanes=t,u.stateNode={isHidden:!1},u}function kV(u,e,t){return u=Dl(6,u,null,e),u.lanes=t,u}function FV(u,e,t){return e=Dl(4,u.children!==null?u.children:[],u.key,e),e.lanes=t,e.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},e}function ACt(u,e,t,n,i){this.tag=e,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=iV(0),this.expirationTimes=iV(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iV(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Lue(u,e,t,n,i,r,a,o,s){return u=new ACt(u,e,t,o,s),e===1?(e=1,r===!0&&(e|=8)):e=0,r=Dl(3,null,null,e),u.current=r,r.stateNode=u,r.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},mue(r),u}function _Ct(u,e,t){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f9e)}catch(u){console.error(u)}}f9e(),mAe.exports=Z0;var ns=mAe.exports;const zx=Hl(ns);var u1e=ns;vJ.createRoot=u1e.createRoot,vJ.hydrateRoot=u1e.hydrateRoot;var EZ=function(u,e){return EZ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},EZ(u,e)};function p9e(u,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");EZ(u,e);function t(){this.constructor=u}u.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ke=function(){return Ke=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r}function Bl(u,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,r;n"u")return KCt;var e=WCt(u),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}},UCt=Nue(),qCt=function(u,e,t,n){var i=u.left,r=u.top,a=u.right,o=u.gap;return t===void 0&&(t="margin"),` +`+r.stack}return{value:u,source:e,stack:i,digest:null}}function CV(u,e,t){return{value:u,source:null,stack:t??null,digest:e??null}}function XJ(u,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var oCt=typeof WeakMap=="function"?WeakMap:Map;function $7e(u,e,t){t=n4(-1,t),t.tag=3,t.payload={element:null};var n=e.value;return t.callback=function(){wL||(wL=!0,lZ=n),XJ(u,e)},t}function K7e(u,e,t){t=n4(-1,t),t.tag=3;var n=u.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;t.payload=function(){return n(i)},t.callback=function(){XJ(u,e)}}var r=u.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(t.callback=function(){XJ(u,e),typeof n!="function"&&(xm===null?xm=new Set([this]):xm.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),t}function Ide(u,e,t){var n=u.pingCache;if(n===null){n=u.pingCache=new oCt;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(t)||(i.add(t),u=CCt.bind(null,u,e,t),e.then(u,u))}function Ode(u){do{var e;if((e=u.tag===13)&&(e=u.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return u;u=u.return}while(u!==null);return null}function jde(u,e,t,n,i){return u.mode&1?(u.flags|=65536,u.lanes=i,u):(u===e?u.flags|=65536:(u.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=n4(-1,1),e.tag=2,Dm(t,e,1))),t.lanes|=1),u)}var sCt=B4.ReactCurrentOwner,$s=!1;function Yo(u,e,t,n){e.child=u===null?b7e(e,null,t,n):Rv(e,u.child,t,n)}function Hde(u,e,t,n,i){t=t.render;var r=e.ref;return wx(e,i),n=xue(u,e,t,n,r,i),t=vue(),u!==null&&!$s?(e.updateQueue=u.updateQueue,e.flags&=-2053,u.lanes&=~i,f4(u,e,i)):(Gi&&t&&oue(e),e.flags|=1,Yo(u,e,n,i),e.child)}function Vde(u,e,t,n,i){if(u===null){var r=t.type;return typeof r=="function"&&!wue(r)&&r.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=r,W7e(u,e,r,n,i)):(u=L8(t.type,null,n,e,e.mode,i),u.ref=e.ref,u.return=e,e.child=u)}if(r=u.child,!(u.lanes&i)){var a=r.memoizedProps;if(t=t.compare,t=t!==null?t:OF,t(a,n)&&u.ref===e.ref)return f4(u,e,i)}return e.flags|=1,u=Cm(r,n),u.ref=e.ref,u.return=e,e.child=u}function W7e(u,e,t,n,i){if(u!==null){var r=u.memoizedProps;if(OF(r,n)&&u.ref===e.ref)if($s=!1,e.pendingProps=n=r,(u.lanes&i)!==0)u.flags&131072&&($s=!0);else return e.lanes=u.lanes,f4(u,e,i)}return eZ(u,e,t,n,i)}function G7e(u,e,t){var n=e.pendingProps,i=n.children,r=u!==null?u.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Li($5,E0),E0|=t;else{if(!(t&1073741824))return u=r!==null?r.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:u,cachePool:null,transitions:null},e.updateQueue=null,Li($5,E0),E0|=u,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=r!==null?r.baseLanes:t,Li($5,E0),E0|=n}else r!==null?(n=r.baseLanes|t,e.memoizedState=null):n=t,Li($5,E0),E0|=n;return Yo(u,e,i,t),e.child}function U7e(u,e){var t=e.ref;(u===null&&t!==null||u!==null&&u.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function eZ(u,e,t,n,i){var r=Us(t)?rp:Oo.current;return r=Nv(e,r),wx(e,i),t=xue(u,e,t,n,r,i),n=vue(),u!==null&&!$s?(e.updateQueue=u.updateQueue,e.flags&=-2053,u.lanes&=~i,f4(u,e,i)):(Gi&&n&&oue(e),e.flags|=1,Yo(u,e,t,i),e.child)}function $de(u,e,t,n,i){if(Us(t)){var r=!0;vL(e)}else r=!1;if(wx(e,i),e.stateNode===null)S8(u,e),v7e(e,t,n),QJ(e,t,n,i),n=!0;else if(u===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var s=a.context,l=t.contextType;typeof l=="object"&&l!==null?l=Nl(l):(l=Us(t)?rp:Oo.current,l=Nv(e,l));var c=t.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||s!==l)&&Tde(e,a,n,l),EE=!1;var h=e.memoizedState;a.state=h,yL(e,n,a,i),s=e.memoizedState,o!==n||h!==s||Gs.current||EE?(typeof c=="function"&&(YJ(e,t,c,n),s=e.memoizedState),(o=EE||Mde(e,t,o,n,h,s,l))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=s),a.props=n,a.state=s,a.context=l,n=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,D7e(u,e),o=e.memoizedProps,l=e.type===e.elementType?o:dc(e.type,o),a.props=l,d=e.pendingProps,h=a.context,s=t.contextType,typeof s=="object"&&s!==null?s=Nl(s):(s=Us(t)?rp:Oo.current,s=Nv(e,s));var E=t.getDerivedStateFromProps;(c=typeof E=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||h!==s)&&Tde(e,a,n,s),EE=!1,h=e.memoizedState,a.state=h,yL(e,n,a,i);var m=e.memoizedState;o!==d||h!==m||Gs.current||EE?(typeof E=="function"&&(YJ(e,t,E,n),m=e.memoizedState),(l=EE||Mde(e,t,l,n,h,m,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,s)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===u.memoizedProps&&h===u.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===u.memoizedProps&&h===u.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=m),a.props=n,a.state=m,a.context=s,n=l):(typeof a.componentDidUpdate!="function"||o===u.memoizedProps&&h===u.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===u.memoizedProps&&h===u.memoizedState||(e.flags|=1024),n=!1)}return tZ(u,e,t,n,r,i)}function tZ(u,e,t,n,i,r){U7e(u,e);var a=(e.flags&128)!==0;if(!n&&!a)return i&&Sde(e,t,!1),f4(u,e,r);n=e.stateNode,sCt.current=e;var o=a&&typeof t.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,u!==null&&a?(e.child=Rv(e,u.child,null,r),e.child=Rv(e,null,o,r)):Yo(u,e,o,r),e.memoizedState=n.state,i&&Sde(e,t,!0),e.child}function q7e(u){var e=u.stateNode;e.pendingContext?_de(u,e.pendingContext,e.pendingContext!==e.context):e.context&&_de(u,e.context,!1),gue(u,e.containerInfo)}function Kde(u,e,t,n,i){return Pv(),lue(i),e.flags|=256,Yo(u,e,t,n),e.child}var uZ={dehydrated:null,treeContext:null,retryLane:0};function nZ(u){return{baseLanes:u,cachePool:null,transitions:null}}function J7e(u,e,t){var n=e.pendingProps,i=tr.current,r=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=u!==null&&u.memoizedState===null?!1:(i&2)!==0),o?(r=!0,e.flags&=-129):(u===null||u.memoizedState!==null)&&(i|=1),Li(tr,i&1),u===null)return JJ(e),u=e.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(e.mode&1?u.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,u=n.fallback,r?(n=e.mode,r=e.child,a={mode:"hidden",children:a},!(n&1)&&r!==null?(r.childLanes=0,r.pendingProps=a):r=oI(a,n,0,null),u=g3(u,n,t,null),r.return=e,u.return=e,r.sibling=u,e.child=r,e.child.memoizedState=nZ(t),e.memoizedState=uZ,u):kue(e,a));if(i=u.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return lCt(u,e,a,n,o,i,t);if(r){r=n.fallback,a=e.mode,i=u.child,o=i.sibling;var s={mode:"hidden",children:n.children};return!(a&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=s,e.deletions=null):(n=Cm(i,s),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?r=Cm(o,r):(r=g3(r,a,t,null),r.flags|=2),r.return=e,n.return=e,n.sibling=r,e.child=n,n=r,r=e.child,a=u.child.memoizedState,a=a===null?nZ(t):{baseLanes:a.baseLanes|t,cachePool:null,transitions:a.transitions},r.memoizedState=a,r.childLanes=u.childLanes&~t,e.memoizedState=uZ,n}return r=u.child,u=r.sibling,n=Cm(r,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=t),n.return=e,n.sibling=null,u!==null&&(t=e.deletions,t===null?(e.deletions=[u],e.flags|=16):t.push(u)),e.child=n,e.memoizedState=null,n}function kue(u,e){return e=oI({mode:"visible",children:e},u.mode,0,null),e.return=u,u.child=e}function x_(u,e,t,n){return n!==null&&lue(n),Rv(e,u.child,null,t),u=kue(e,e.pendingProps.children),u.flags|=2,e.memoizedState=null,u}function lCt(u,e,t,n,i,r,a){if(t)return e.flags&256?(e.flags&=-257,n=CV(Error(et(422))),x_(u,e,a,n)):e.memoizedState!==null?(e.child=u.child,e.flags|=128,null):(r=n.fallback,i=e.mode,n=oI({mode:"visible",children:n.children},i,0,null),r=g3(r,i,a,null),r.flags|=2,n.return=e,r.return=e,n.sibling=r,e.child=n,e.mode&1&&Rv(e,u.child,null,a),e.child.memoizedState=nZ(a),e.memoizedState=uZ,r);if(!(e.mode&1))return x_(u,e,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,r=Error(et(419)),n=CV(r,n,void 0),x_(u,e,a,n)}if(o=(a&u.childLanes)!==0,$s||o){if(n=Na,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==r.retryLane&&(r.retryLane=i,g4(u,i),Gc(n,u,i,-1))}return Bue(),n=CV(Error(et(421))),x_(u,e,a,n)}return i.data==="$?"?(e.flags|=128,e.child=u.child,e=bCt.bind(null,u),i._reactRetry=e,null):(u=r.treeContext,b0=pm(i.nextSibling),w0=e,Gi=!0,kc=null,u!==null&&(ll[cl++]=Wh,ll[cl++]=Gh,ll[cl++]=ap,Wh=u.id,Gh=u.overflow,ap=e),e=kue(e,n.children),e.flags|=4096,e)}function Wde(u,e,t){u.lanes|=e;var n=u.alternate;n!==null&&(n.lanes|=e),ZJ(u.return,e,t)}function bV(u,e,t,n,i){var r=u.memoizedState;r===null?u.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:i}:(r.isBackwards=e,r.rendering=null,r.renderingStartTime=0,r.last=n,r.tail=t,r.tailMode=i)}function Z7e(u,e,t){var n=e.pendingProps,i=n.revealOrder,r=n.tail;if(Yo(u,e,n.children,t),n=tr.current,n&2)n=n&1|2,e.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=e.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Wde(u,t,e);else if(u.tag===19)Wde(u,t,e);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}n&=1}if(Li(tr,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(t=e.child,i=null;t!==null;)u=t.alternate,u!==null&&AL(u)===null&&(i=t),t=t.sibling;t=i,t===null?(i=e.child,e.child=null):(i=t.sibling,t.sibling=null),bV(e,!1,i,t,r);break;case"backwards":for(t=null,i=e.child,e.child=null;i!==null;){if(u=i.alternate,u!==null&&AL(u)===null){e.child=i;break}u=i.sibling,i.sibling=t,t=i,i=u}bV(e,!0,t,null,r);break;case"together":bV(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function S8(u,e){!(e.mode&1)&&u!==null&&(u.alternate=null,e.alternate=null,e.flags|=2)}function f4(u,e,t){if(u!==null&&(e.dependencies=u.dependencies),sp|=e.lanes,!(t&e.childLanes))return null;if(u!==null&&e.child!==u.child)throw Error(et(153));if(e.child!==null){for(u=e.child,t=Cm(u,u.pendingProps),e.child=t,t.return=e;u.sibling!==null;)u=u.sibling,t=t.sibling=Cm(u,u.pendingProps),t.return=e;t.sibling=null}return e.child}function cCt(u,e,t){switch(e.tag){case 3:q7e(e),Pv();break;case 5:k7e(e);break;case 1:Us(e.type)&&vL(e);break;case 4:gue(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Li(kL,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Li(tr,tr.current&1),e.flags|=128,null):t&e.child.childLanes?J7e(u,e,t):(Li(tr,tr.current&1),u=f4(u,e,t),u!==null?u.sibling:null);Li(tr,tr.current&1);break;case 19:if(n=(t&e.childLanes)!==0,u.flags&128){if(n)return Z7e(u,e,t);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Li(tr,tr.current),n)break;return null;case 22:case 23:return e.lanes=0,G7e(u,e,t)}return f4(u,e,t)}var Y7e,iZ,Q7e,X7e;Y7e=function(u,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)u.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};iZ=function(){};Q7e=function(u,e,t,n){var i=u.memoizedProps;if(i!==n){u=e.stateNode,qf(D1.current);var r=null;switch(t){case"input":i=AJ(u,i),n=AJ(u,n),r=[];break;case"select":i=or({},i,{value:void 0}),n=or({},n,{value:void 0}),r=[];break;case"textarea":i=BJ(u,i),n=BJ(u,n),r=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(u.onclick=DL)}LJ(t,n);var a;t=null;for(l in i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var o=i[l];for(a in o)o.hasOwnProperty(a)&&(t||(t={}),t[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(zF.hasOwnProperty(l)?r||(r=[]):(r=r||[]).push(l,null));for(l in n){var s=n[l];if(o=i!=null?i[l]:void 0,n.hasOwnProperty(l)&&s!==o&&(s!=null||o!=null))if(l==="style")if(o){for(a in o)!o.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(t||(t={}),t[a]="");for(a in s)s.hasOwnProperty(a)&&o[a]!==s[a]&&(t||(t={}),t[a]=s[a])}else t||(r||(r=[]),r.push(l,t)),t=s;else l==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,o=o?o.__html:void 0,s!=null&&o!==s&&(r=r||[]).push(l,s)):l==="children"?typeof s!="string"&&typeof s!="number"||(r=r||[]).push(l,""+s):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(zF.hasOwnProperty(l)?(s!=null&&l==="onScroll"&&Pi("scroll",u),r||o===s||(r=[])):(r=r||[]).push(l,s))}t&&(r=r||[]).push("style",t);var l=r;(e.updateQueue=l)&&(e.flags|=4)}};X7e=function(u,e,t,n){t!==n&&(e.flags|=4)};function jC(u,e){if(!Gi)switch(u.tailMode){case"hidden":e=u.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?u.tail=null:t.sibling=null;break;case"collapsed":t=u.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e||u.tail===null?u.tail=null:u.tail.sibling=null:n.sibling=null}}function Do(u){var e=u.alternate!==null&&u.alternate.child===u.child,t=0,n=0;if(e)for(var i=u.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=u,i=i.sibling;else for(i=u.child;i!==null;)t|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=u,i=i.sibling;return u.subtreeFlags|=n,u.childLanes=t,e}function dCt(u,e,t){var n=e.pendingProps;switch(sue(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Do(e),null;case 1:return Us(e.type)&&xL(),Do(e),null;case 3:return n=e.stateNode,Iv(),Hi(Gs),Hi(Oo),pue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(u===null||u.child===null)&&(p_(e)?e.flags|=4:u===null||u.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,kc!==null&&(hZ(kc),kc=null))),iZ(u,e),Do(e),null;case 5:fue(e);var i=qf(KF.current);if(t=e.type,u!==null&&e.stateNode!=null)Q7e(u,e,t,n,i),u.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(et(166));return Do(e),null}if(u=qf(D1.current),p_(e)){n=e.stateNode,t=e.type;var r=e.memoizedProps;switch(n[Yd]=e,n[VF]=r,u=(e.mode&1)!==0,t){case"dialog":Pi("cancel",n),Pi("close",n);break;case"iframe":case"object":case"embed":Pi("load",n);break;case"video":case"audio":for(i=0;i<\/script>",u=u.removeChild(u.firstChild)):typeof n.is=="string"?u=a.createElement(t,{is:n.is}):(u=a.createElement(t),t==="select"&&(a=u,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):u=a.createElementNS(u,t),u[Yd]=e,u[VF]=n,Y7e(u,e,!1,!1),e.stateNode=u;e:{switch(a=zJ(t,n),t){case"dialog":Pi("cancel",u),Pi("close",u),i=n;break;case"iframe":case"object":case"embed":Pi("load",u),i=n;break;case"video":case"audio":for(i=0;ijv&&(e.flags|=128,n=!0,jC(r,!1),e.lanes=4194304)}else{if(!n)if(u=AL(a),u!==null){if(e.flags|=128,n=!0,t=u.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),jC(r,!0),r.tail===null&&r.tailMode==="hidden"&&!a.alternate&&!Gi)return Do(e),null}else 2*wr()-r.renderingStartTime>jv&&t!==1073741824&&(e.flags|=128,n=!0,jC(r,!1),e.lanes=4194304);r.isBackwards?(a.sibling=e.child,e.child=a):(t=r.last,t!==null?t.sibling=a:e.child=a,r.last=a)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=wr(),e.sibling=null,t=tr.current,Li(tr,n?t&1|2:t&1),e):(Do(e),null);case 22:case 23:return Sue(),n=e.memoizedState!==null,u!==null&&u.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?E0&1073741824&&(Do(e),e.subtreeFlags&6&&(e.flags|=8192)):Do(e),null;case 24:return null;case 25:return null}throw Error(et(156,e.tag))}function hCt(u,e){switch(sue(e),e.tag){case 1:return Us(e.type)&&xL(),u=e.flags,u&65536?(e.flags=u&-65537|128,e):null;case 3:return Iv(),Hi(Gs),Hi(Oo),pue(),u=e.flags,u&65536&&!(u&128)?(e.flags=u&-65537|128,e):null;case 5:return fue(e),null;case 13:if(Hi(tr),u=e.memoizedState,u!==null&&u.dehydrated!==null){if(e.alternate===null)throw Error(et(340));Pv()}return u=e.flags,u&65536?(e.flags=u&-65537|128,e):null;case 19:return Hi(tr),null;case 4:return Iv(),null;case 10:return hue(e.type._context),null;case 22:case 23:return Sue(),null;case 24:return null;default:return null}}var v_=!1,So=!1,ECt=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function V5(u,e){var t=u.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Er(u,e,n)}else t.current=null}function rZ(u,e,t){try{t()}catch(n){Er(u,e,n)}}var Gde=!1;function mCt(u,e){if(VJ=gL,u=n7e(),aue(u)){if("selectionStart"in u)var t={start:u.selectionStart,end:u.selectionEnd};else e:{t=(t=u.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var i=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{t.nodeType,r.nodeType}catch{t=null;break e}var a=0,o=-1,s=-1,l=0,c=0,d=u,h=null;t:for(;;){for(var E;d!==t||i!==0&&d.nodeType!==3||(o=a+i),d!==r||n!==0&&d.nodeType!==3||(s=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(E=d.firstChild)!==null;)h=d,d=E;for(;;){if(d===u)break t;if(h===t&&++l===i&&(o=a),h===r&&++c===n&&(s=a),(E=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=E}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for($J={focusedElem:u,selectionRange:t},gL=!1,Bt=e;Bt!==null;)if(e=Bt,u=e.child,(e.subtreeFlags&1028)!==0&&u!==null)u.return=e,Bt=u;else for(;Bt!==null;){e=Bt;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,f=m.memoizedState,p=e.stateNode,D=p.getSnapshotBeforeUpdate(e.elementType===e.type?g:dc(e.type,g),f);p.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(et(163))}}catch(b){Er(e,e.return,b)}if(u=e.sibling,u!==null){u.return=e.return,Bt=u;break}Bt=e.return}return m=Gde,Gde=!1,m}function M2(u,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&u)===u){var r=i.destroy;i.destroy=void 0,r!==void 0&&rZ(e,t,r)}i=i.next}while(i!==n)}}function rI(u,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&u)===u){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function aZ(u){var e=u.ref;if(e!==null){var t=u.stateNode;switch(u.tag){case 5:u=t;break;default:u=t}typeof e=="function"?e(u):e.current=u}}function e9e(u){var e=u.alternate;e!==null&&(u.alternate=null,e9e(e)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(e=u.stateNode,e!==null&&(delete e[Yd],delete e[VF],delete e[GJ],delete e[Z6t],delete e[Y6t])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function t9e(u){return u.tag===5||u.tag===3||u.tag===4}function Ude(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||t9e(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function oZ(u,e,t){var n=u.tag;if(n===5||n===6)u=u.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(u,e):t.insertBefore(u,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(u,t)):(e=t,e.appendChild(u)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=DL));else if(n!==4&&(u=u.child,u!==null))for(oZ(u,e,t),u=u.sibling;u!==null;)oZ(u,e,t),u=u.sibling}function sZ(u,e,t){var n=u.tag;if(n===5||n===6)u=u.stateNode,e?t.insertBefore(u,e):t.appendChild(u);else if(n!==4&&(u=u.child,u!==null))for(sZ(u,e,t),u=u.sibling;u!==null;)sZ(u,e,t),u=u.sibling}var Ga=null,pc=!1;function G4(u,e,t){for(t=t.child;t!==null;)u9e(u,e,t),t=t.sibling}function u9e(u,e,t){if(p1&&typeof p1.onCommitFiberUnmount=="function")try{p1.onCommitFiberUnmount(YR,t)}catch{}switch(t.tag){case 5:So||V5(t,e);case 6:var n=Ga,i=pc;Ga=null,G4(u,e,t),Ga=n,pc=i,Ga!==null&&(pc?(u=Ga,t=t.stateNode,u.nodeType===8?u.parentNode.removeChild(t):u.removeChild(t)):Ga.removeChild(t.stateNode));break;case 18:Ga!==null&&(pc?(u=Ga,t=t.stateNode,u.nodeType===8?gV(u.parentNode,t):u.nodeType===1&&gV(u,t),RF(u)):gV(Ga,t.stateNode));break;case 4:n=Ga,i=pc,Ga=t.stateNode.containerInfo,pc=!0,G4(u,e,t),Ga=n,pc=i;break;case 0:case 11:case 14:case 15:if(!So&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var r=i,a=r.destroy;r=r.tag,a!==void 0&&(r&2||r&4)&&rZ(t,e,a),i=i.next}while(i!==n)}G4(u,e,t);break;case 1:if(!So&&(V5(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(o){Er(t,e,o)}G4(u,e,t);break;case 21:G4(u,e,t);break;case 22:t.mode&1?(So=(n=So)||t.memoizedState!==null,G4(u,e,t),So=n):G4(u,e,t);break;default:G4(u,e,t)}}function qde(u){var e=u.updateQueue;if(e!==null){u.updateQueue=null;var t=u.stateNode;t===null&&(t=u.stateNode=new ECt),e.forEach(function(n){var i=kCt.bind(null,u,n);t.has(n)||(t.add(n),n.then(i,i))})}}function tc(u,e){var t=e.deletions;if(t!==null)for(var n=0;ni&&(i=a),n&=~r}if(n=i,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fCt(n/1960))-n,10u?16:u,VE===null)var n=!1;else{if(u=VE,VE=null,LL=0,xn&6)throw Error(et(331));var i=xn;for(xn|=4,Bt=u.current;Bt!==null;){var r=Bt,a=r.child;if(Bt.flags&16){var o=r.deletions;if(o!==null){for(var s=0;swr()-Aue?m3(u,0):yue|=t),qs(u,e)}function c9e(u,e){e===0&&(u.mode&1?(e=d_,d_<<=1,!(d_&130023424)&&(d_=4194304)):e=1);var t=hs();u=g4(u,e),u!==null&&(KA(u,e,t),qs(u,t))}function bCt(u){var e=u.memoizedState,t=0;e!==null&&(t=e.retryLane),c9e(u,t)}function kCt(u,e){var t=0;switch(u.tag){case 13:var n=u.stateNode,i=u.memoizedState;i!==null&&(t=i.retryLane);break;case 19:n=u.stateNode;break;default:throw Error(et(314))}n!==null&&n.delete(e),c9e(u,t)}var d9e;d9e=function(u,e,t){if(u!==null)if(u.memoizedProps!==e.pendingProps||Gs.current)$s=!0;else{if(!(u.lanes&t)&&!(e.flags&128))return $s=!1,cCt(u,e,t);$s=!!(u.flags&131072)}else $s=!1,Gi&&e.flags&1048576&&m7e(e,bL,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;S8(u,e),u=e.pendingProps;var i=Nv(e,Oo.current);wx(e,t),i=xue(null,e,n,u,i,t);var r=vue();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Us(n)?(r=!0,vL(e)):r=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mue(e),i.updater=nI,e.stateNode=i,i._reactInternals=e,QJ(e,n,u,t),e=tZ(null,e,n,!0,r,t)):(e.tag=0,Gi&&r&&oue(e),Yo(null,e,i,t),e=e.child),e;case 16:n=e.elementType;e:{switch(S8(u,e),u=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=yCt(n),u=dc(n,u),i){case 0:e=eZ(null,e,n,u,t);break e;case 1:e=$de(null,e,n,u,t);break e;case 11:e=Hde(null,e,n,u,t);break e;case 14:e=Vde(null,e,n,dc(n.type,u),t);break e}throw Error(et(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),eZ(u,e,n,i,t);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),$de(u,e,n,i,t);case 3:e:{if(q7e(e),u===null)throw Error(et(387));n=e.pendingProps,r=e.memoizedState,i=r.element,D7e(u,e),yL(e,n,null,t);var a=e.memoizedState;if(n=a.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){i=Ov(Error(et(423)),e),e=Kde(u,e,n,t,i);break e}else if(n!==i){i=Ov(Error(et(424)),e),e=Kde(u,e,n,t,i);break e}else for(b0=pm(e.stateNode.containerInfo.firstChild),w0=e,Gi=!0,kc=null,t=b7e(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Pv(),n===i){e=f4(u,e,t);break e}Yo(u,e,n,t)}e=e.child}return e;case 5:return k7e(e),u===null&&JJ(e),n=e.type,i=e.pendingProps,r=u!==null?u.memoizedProps:null,a=i.children,KJ(n,i)?a=null:r!==null&&KJ(n,r)&&(e.flags|=32),U7e(u,e),Yo(u,e,a,t),e.child;case 6:return u===null&&JJ(e),null;case 13:return J7e(u,e,t);case 4:return gue(e,e.stateNode.containerInfo),n=e.pendingProps,u===null?e.child=Rv(e,null,n,t):Yo(u,e,n,t),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),Hde(u,e,n,i,t);case 7:return Yo(u,e,e.pendingProps,t),e.child;case 8:return Yo(u,e,e.pendingProps.children,t),e.child;case 12:return Yo(u,e,e.pendingProps.children,t),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,r=e.memoizedProps,a=i.value,Li(kL,n._currentValue),n._currentValue=a,r!==null)if(nd(r.value,a)){if(r.children===i.children&&!Gs.current){e=f4(u,e,t);break e}}else for(r=e.child,r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){a=r.child;for(var s=o.firstContext;s!==null;){if(s.context===n){if(r.tag===1){s=n4(-1,t&-t),s.tag=2;var l=r.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}r.lanes|=t,s=r.alternate,s!==null&&(s.lanes|=t),ZJ(r.return,t,e),o.lanes|=t;break}s=s.next}}else if(r.tag===10)a=r.type===e.type?null:r.child;else if(r.tag===18){if(a=r.return,a===null)throw Error(et(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),ZJ(a,t,e),a=r.sibling}else a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}Yo(u,e,i.children,t),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,wx(e,t),i=Nl(i),n=n(i),e.flags|=1,Yo(u,e,n,t),e.child;case 14:return n=e.type,i=dc(n,e.pendingProps),i=dc(n.type,i),Vde(u,e,n,i,t);case 15:return W7e(u,e,e.type,e.pendingProps,t);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),S8(u,e),e.tag=1,Us(n)?(u=!0,vL(e)):u=!1,wx(e,t),v7e(e,n,i),QJ(e,n,i,t),tZ(null,e,n,!0,u,t);case 19:return Z7e(u,e,t);case 22:return G7e(u,e,t)}throw Error(et(156,e.tag))};function h9e(u,e){return IAe(u,e)}function FCt(u,e,t,n){this.tag=u,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dl(u,e,t,n){return new FCt(u,e,t,n)}function wue(u){return u=u.prototype,!(!u||!u.isReactComponent)}function yCt(u){if(typeof u=="function")return wue(u)?1:0;if(u!=null){if(u=u.$$typeof,u===Jte)return 11;if(u===Zte)return 14}return 2}function Cm(u,e){var t=u.alternate;return t===null?(t=Dl(u.tag,e,u.key,u.mode),t.elementType=u.elementType,t.type=u.type,t.stateNode=u.stateNode,t.alternate=u,u.alternate=t):(t.pendingProps=e,t.type=u.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=u.flags&14680064,t.childLanes=u.childLanes,t.lanes=u.lanes,t.child=u.child,t.memoizedProps=u.memoizedProps,t.memoizedState=u.memoizedState,t.updateQueue=u.updateQueue,e=u.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=u.sibling,t.index=u.index,t.ref=u.ref,t}function L8(u,e,t,n,i,r){var a=2;if(n=u,typeof u=="function")wue(u)&&(a=1);else if(typeof u=="string")a=5;else e:switch(u){case M5:return g3(t.children,i,r,e);case qte:a=8,i|=8;break;case bJ:return u=Dl(12,t,e,i|2),u.elementType=bJ,u.lanes=r,u;case kJ:return u=Dl(13,t,e,i),u.elementType=kJ,u.lanes=r,u;case FJ:return u=Dl(19,t,e,i),u.elementType=FJ,u.lanes=r,u;case CAe:return oI(t,i,r,e);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case xAe:a=10;break e;case vAe:a=9;break e;case Jte:a=11;break e;case Zte:a=14;break e;case hE:a=16,n=null;break e}throw Error(et(130,u==null?u:typeof u,""))}return e=Dl(a,t,e,i),e.elementType=u,e.type=n,e.lanes=r,e}function g3(u,e,t,n){return u=Dl(7,u,n,e),u.lanes=t,u}function oI(u,e,t,n){return u=Dl(22,u,n,e),u.elementType=CAe,u.lanes=t,u.stateNode={isHidden:!1},u}function kV(u,e,t){return u=Dl(6,u,null,e),u.lanes=t,u}function FV(u,e,t){return e=Dl(4,u.children!==null?u.children:[],u.key,e),e.lanes=t,e.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},e}function ACt(u,e,t,n,i){this.tag=e,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=iV(0),this.expirationTimes=iV(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iV(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Lue(u,e,t,n,i,r,a,o,s){return u=new ACt(u,e,t,o,s),e===1?(e=1,r===!0&&(e|=8)):e=0,r=Dl(3,null,null,e),u.current=r,r.stateNode=u,r.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},mue(r),u}function _Ct(u,e,t){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f9e)}catch(u){console.error(u)}}f9e(),mAe.exports=Y0;var is=mAe.exports;const zx=Hl(is);var u1e=is;vJ.createRoot=u1e.createRoot,vJ.hydrateRoot=u1e.hydrateRoot;var EZ=function(u,e){return EZ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},EZ(u,e)};function p9e(u,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");EZ(u,e);function t(){this.constructor=u}u.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ke=function(){return Ke=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r}function Bl(u,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,r;n"u")return KCt;var e=WCt(u),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}},UCt=Nue(),qCt=function(u,e,t,n){var i=u.left,r=u.top,a=u.right,o=u.gap;return t===void 0&&(t="margin"),` .`.concat(zCt,` { overflow: hidden `).concat(n,`; padding-right: `).concat(o,"px ").concat(n,`; @@ -811,14 +811,14 @@ Error generating stack: `+r.message+` `)},k9e=function(u){var e=u.noRelative,t=u.noImportant,n=u.gapMode,i=n===void 0?"margin":n,r=C.useMemo(function(){return GCt(i)},[i]);return C.createElement(UCt,{styles:qCt(r,!e,i,t?"":"!important")})},mZ=!1;if(typeof window<"u")try{var k_=Object.defineProperty({},"passive",{get:function(){return mZ=!0,!0}});window.addEventListener("test",k_,k_),window.removeEventListener("test",k_,k_)}catch{mZ=!1}var wD=mZ?{passive:!1}:!1,JCt=function(u){return u.tagName==="TEXTAREA"},F9e=function(u,e){var t=window.getComputedStyle(u);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!JCt(u)&&t[e]==="visible")},ZCt=function(u){return F9e(u,"overflowY")},YCt=function(u){return F9e(u,"overflowX")},i1e=function(u,e){var t=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=y9e(u,n);if(i){var r=A9e(u,n),a=r[1],o=r[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},QCt=function(u){var e=u.scrollTop,t=u.scrollHeight,n=u.clientHeight;return[e,t,n]},XCt=function(u){var e=u.scrollLeft,t=u.scrollWidth,n=u.clientWidth;return[e,t,n]},y9e=function(u,e){return u==="v"?ZCt(e):YCt(e)},A9e=function(u,e){return u==="v"?QCt(e):XCt(e)},ebt=function(u,e){return u==="h"&&e==="rtl"?-1:1},tbt=function(u,e,t,n,i){var r=ebt(u,window.getComputedStyle(e).direction),a=r*n,o=t.target,s=e.contains(o),l=!1,c=a>0,d=0,h=0;do{var E=A9e(u,o),m=E[0],g=E[1],f=E[2],p=g-f-r*m;(m||p)&&y9e(u,o)&&(d+=p,h+=m),o=o.parentNode}while(!s&&o!==document.body||s&&(e.contains(o)||e===o));return(c&&(i&&d===0||!i&&a>d)||!c&&(i&&h===0||!i&&-a>h))&&(l=!0),l},F_=function(u){return"changedTouches"in u?[u.changedTouches[0].clientX,u.changedTouches[0].clientY]:[0,0]},r1e=function(u){return[u.deltaX,u.deltaY]},a1e=function(u){return u&&"current"in u?u.current:u},ubt=function(u,e){return u[0]===e[0]&&u[1]===e[1]},nbt=function(u){return` .block-interactivity-`.concat(u,` {pointer-events: none;} .allow-interactivity-`).concat(u,` {pointer-events: all;} -`)},ibt=0,LD=[];function rbt(u){var e=C.useRef([]),t=C.useRef([0,0]),n=C.useRef(),i=C.useState(ibt++)[0],r=C.useState(Nue)[0],a=C.useRef(u);C.useEffect(function(){a.current=u},[u]),C.useEffect(function(){if(u.inert){document.body.classList.add("block-interactivity-".concat(i));var g=Bl([u.lockRef.current],(u.shards||[]).map(a1e),!0).filter(Boolean);return g.forEach(function(f){return f.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(i))})}}},[u.inert,u.lockRef.current,u.shards]);var o=C.useCallback(function(g,f){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var p=F_(g),D=t.current,x="deltaX"in g?g.deltaX:D[0]-p[0],b="deltaY"in g?g.deltaY:D[1]-p[1],k,A=g.target,F=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in g&&F==="h"&&A.type==="range")return!1;var S=i1e(F,A);if(!S)return!0;if(S?k=F:(k=F==="v"?"h":"v",S=i1e(F,A)),!S)return!1;if(!n.current&&"changedTouches"in g&&(x||b)&&(n.current=k),!k)return!0;var w=n.current||k;return tbt(w,f,g,w==="h"?x:b,!0)},[]),s=C.useCallback(function(g){var f=g;if(!(!LD.length||LD[LD.length-1]!==r)){var p="deltaY"in f?r1e(f):F_(f),D=e.current.filter(function(k){return k.name===f.type&&k.target===f.target&&ubt(k.delta,p)})[0];if(D&&D.should){f.cancelable&&f.preventDefault();return}if(!D){var x=(a.current.shards||[]).map(a1e).filter(Boolean).filter(function(k){return k.contains(f.target)}),b=x.length>0?o(f,x[0]):!a.current.noIsolation;b&&f.cancelable&&f.preventDefault()}}},[]),l=C.useCallback(function(g,f,p,D){var x={name:g,delta:f,target:p,should:D};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=C.useCallback(function(g){t.current=F_(g),n.current=void 0},[]),d=C.useCallback(function(g){l(g.type,r1e(g),g.target,o(g,u.lockRef.current))},[]),h=C.useCallback(function(g){l(g.type,F_(g),g.target,o(g,u.lockRef.current))},[]);C.useEffect(function(){return LD.push(r),u.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,wD),document.addEventListener("touchmove",s,wD),document.addEventListener("touchstart",c,wD),function(){LD=LD.filter(function(g){return g!==r}),document.removeEventListener("wheel",s,wD),document.removeEventListener("touchmove",s,wD),document.removeEventListener("touchstart",c,wD)}},[]);var E=u.removeScrollBar,m=u.inert;return C.createElement(C.Fragment,null,m?C.createElement(r,{styles:nbt(i)}):null,E?C.createElement(k9e,{gapMode:u.gapMode}):null)}const abt=C9e(b9e,rbt);var _9e=C.forwardRef(function(u,e){return C.createElement(hI,Ke({},u,{ref:e,sideCar:abt}))});_9e.classNames=hI.classNames;const obt=_9e;function TL(u,e){let t=u;for(;(t=t.parentElement)&&!t.matches(e););return t}function sbt(u,e,t){for(let n=u-1;n>=0;n-=1)if(!e[n].disabled)return n;if(t){for(let n=e.length-1;n>-1;n-=1)if(!e[n].disabled)return n}return u}function lbt(u,e,t){for(let n=u+1;n{var s;t==null||t(o);const l=Array.from(((s=TL(o.currentTarget,u))==null?void 0:s.querySelectorAll(e))||[]).filter(g=>cbt(o.currentTarget,g,u)),c=l.findIndex(g=>o.currentTarget===g),d=lbt(c,l,n),h=sbt(c,l,n),E=r==="rtl"?h:d,m=r==="rtl"?d:h;switch(o.key){case"ArrowRight":{a==="horizontal"&&(o.stopPropagation(),o.preventDefault(),l[E].focus(),i&&l[E].click());break}case"ArrowLeft":{a==="horizontal"&&(o.stopPropagation(),o.preventDefault(),l[m].focus(),i&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(o.stopPropagation(),o.preventDefault(),l[h].focus(),i&&l[h].click());break}case"ArrowDown":{a==="vertical"&&(o.stopPropagation(),o.preventDefault(),l[d].focus(),i&&l[d].click());break}case"Home":{o.stopPropagation(),o.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{o.stopPropagation(),o.preventDefault();const g=l.length-1;!l[g].disabled&&l[g].focus();break}}}}function dbt(u,e,t){var n;return t?Array.from(((n=TL(t,e))==null?void 0:n.querySelectorAll(u))||[]).findIndex(i=>i===t):null}function U1(u){const e=C.createContext(null);return[({children:i,value:r})=>M.createElement(e.Provider,{value:r},i),()=>{const i=C.useContext(e);if(i===null)throw new Error(u);return i}]}function EI(u){return Array.isArray(u)?u:[u]}function NL(u,e){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(e);return`${u}-${t}`}}const hbt=()=>{};function Ebt(u,e={active:!0}){return typeof u!="function"||!e.active?e.onKeyDown||hbt:t=>{var n;t.key==="Escape"&&(u(t),(n=e.onTrigger)==null||n.call(e))}}function no(u,e){return t=>{u==null||u(t),e==null||e(t)}}function mbt(){const[u,e]=C.useState(-1);return[u,{setHovered:e,resetHovered:()=>e(-1)}]}function S9e({data:u}){const e=[],t=[],n=u.reduce((i,r,a)=>(r.group?i[r.group]?i[r.group].push(a):i[r.group]=[a]:t.push(a),i),{});return Object.keys(n).forEach(i=>{e.push(...n[i].map(r=>u[r]))}),e.push(...t.map(i=>u[i])),e}function gbt(u,e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}const fbt=typeof window<"u"?C.useLayoutEffect:C.useEffect;function B9e(u){function e(n){const i=Object.keys(n).reduce((r,a)=>(r[`${u}:${a}`]=o=>n[a](o.detail),r),{});fbt(()=>(Object.keys(i).forEach(r=>{window.removeEventListener(r,i[r]),window.addEventListener(r,i[r])}),()=>Object.keys(i).forEach(r=>{window.removeEventListener(r,i[r])})),[i])}function t(n){return(...i)=>gbt(`${u}:${String(n)}`,i[0])}return[e,t]}function z6(u){return Array.isArray(u)||u===null?!1:typeof u=="object"?u.type!==M.Fragment:!1}function w9e(u){var e,t,n="";if(typeof u=="string"||typeof u=="number")n+=u;else if(typeof u=="object")if(Array.isArray(u))for(e=0;e({fontFamily:u.fontFamily||"sans-serif"})}var xbt=Object.defineProperty,o1e=Object.getOwnPropertySymbols,vbt=Object.prototype.hasOwnProperty,Cbt=Object.prototype.propertyIsEnumerable,s1e=(u,e,t)=>e in u?xbt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,l1e=(u,e)=>{for(var t in e||(e={}))vbt.call(e,t)&&s1e(u,t,e[t]);if(o1e)for(var t of o1e(e))Cbt.call(e,t)&&s1e(u,t,e[t]);return u};function bbt(u){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:l1e({},u.focusRing==="always"||u.focusRing==="auto"?u.focusRingStyles.styles(u):u.focusRingStyles.resetStyles(u)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:l1e({},u.focusRing==="auto"||u.focusRing==="never"?u.focusRingStyles.resetStyles(u):null)})}function qA(u){return e=>typeof u.primaryShade=="number"?u.primaryShade:u.primaryShade[e||u.colorScheme]}function Rue(u){const e=qA(u);return(t,n,i=!0,r=!0)=>{if(typeof t=="string"&&t.includes(".")){const[o,s]=t.split("."),l=parseInt(s,10);if(o in u.colors&&l>=0&&l<10)return u.colors[o][typeof n=="number"&&!r?n:l]}const a=typeof n=="number"?n:e();return t in u.colors?u.colors[t][a]:i?u.colors[u.primaryColor][a]:t}}function z9e(u){let e="";for(let t=1;t{const i={from:(n==null?void 0:n.from)||u.defaultGradient.from,to:(n==null?void 0:n.to)||u.defaultGradient.to,deg:(n==null?void 0:n.deg)||u.defaultGradient.deg};return`linear-gradient(${i.deg}deg, ${e(i.from,t(),!1)} 0%, ${e(i.to,t(),!1)} 100%)`}}function T9e(u){return e=>{if(typeof e=="number")return`${e/16}${u}`;if(typeof e=="string"){const t=e.replace("px","");if(!Number.isNaN(Number(t)))return`${Number(t)/16}${u}`}return e}}const G=T9e("rem"),wl=T9e("em");function ye({size:u,sizes:e,units:t}){return u in e?e[u]:typeof u=="number"?t==="em"?wl(u):G(u):u||e.md}function Xs(u){return typeof u=="number"?u:typeof u=="string"&&u.includes("rem")?Number(u.replace("rem",""))*16:typeof u=="string"&&u.includes("em")?Number(u.replace("em",""))*16:Number(u)}function ybt(u){return e=>`@media (min-width: ${wl(Xs(ye({size:e,sizes:u.breakpoints})))})`}function Abt(u){return e=>`@media (max-width: ${wl(Xs(ye({size:e,sizes:u.breakpoints}))-1)})`}function _bt(u){return/^#?([0-9A-F]{3}){1,2}$/i.test(u)}function Sbt(u){let e=u.replace("#","");if(e.length===3){const a=e.split("");e=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const t=parseInt(e,16),n=t>>16&255,i=t>>8&255,r=t&255;return{r:n,g:i,b:r,a:1}}function Bbt(u){const[e,t,n,i]=u.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:t,b:n,a:i||1}}function Iue(u){return _bt(u)?Sbt(u):u.startsWith("rgb")?Bbt(u):{r:0,g:0,b:0,a:1}}function XD(u,e){if(typeof u!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(u.startsWith("var(--"))return u;const{r:t,g:n,b:i}=Iue(u);return`rgba(${t}, ${n}, ${i}, ${e})`}function wbt(u=0){return{position:"absolute",top:G(u),right:G(u),left:G(u),bottom:G(u)}}function Lbt(u,e){if(typeof u=="string"&&u.startsWith("var(--"))return u;const{r:t,g:n,b:i,a:r}=Iue(u),a=1-e,o=s=>Math.round(s*a);return`rgba(${o(t)}, ${o(n)}, ${o(i)}, ${r})`}function zbt(u,e){if(typeof u=="string"&&u.startsWith("var(--"))return u;const{r:t,g:n,b:i,a:r}=Iue(u),a=o=>Math.round(o+(255-o)*e);return`rgba(${a(t)}, ${a(n)}, ${a(i)}, ${r})`}function Mbt(u){return e=>{if(typeof e=="number")return G(e);const t=typeof u.defaultRadius=="number"?u.defaultRadius:u.radius[u.defaultRadius]||u.defaultRadius;return u.radius[e]||e||t}}function Tbt(u,e){if(typeof u=="string"&&u.includes(".")){const[t,n]=u.split("."),i=parseInt(n,10);if(t in e.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:t,shade:i}}return{isSplittedColor:!1}}function Nbt(u){const e=Rue(u),t=qA(u),n=M9e(u);return({variant:i,color:r,gradient:a,primaryFallback:o})=>{const s=Tbt(r,u);switch(i){case"light":return{border:"transparent",background:XD(e(r,u.colorScheme==="dark"?8:0,o,!1),u.colorScheme==="dark"?.2:1),color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),hover:XD(e(r,u.colorScheme==="dark"?7:1,o,!1),u.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),hover:XD(e(r,u.colorScheme==="dark"?8:0,o,!1),u.colorScheme==="dark"?.2:1)};case"outline":return{border:e(r,u.colorScheme==="dark"?5:t("light")),background:"transparent",color:e(r,u.colorScheme==="dark"?5:t("light")),hover:u.colorScheme==="dark"?XD(e(r,5,o,!1),.05):XD(e(r,0,o,!1),.35)};case"default":return{border:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4],background:u.colorScheme==="dark"?u.colors.dark[6]:u.white,color:u.colorScheme==="dark"?u.white:u.black,hover:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]};case"white":return{border:"transparent",background:u.white,color:e(r,t()),hover:null};case"transparent":return{border:"transparent",color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:u.white,border:"transparent",hover:null};default:{const l=t(),c=s.isSplittedColor?s.shade:l,d=s.isSplittedColor?s.key:r;return{border:"transparent",background:e(d,c,o),color:u.white,hover:e(d,c===9?8:c+1)}}}}}function Pbt(u){return e=>{const t=qA(u)(e);return u.colors[u.primaryColor][t]}}function Rbt(u){return{"@media (hover: hover)":{"&:hover":u},"@media (hover: none)":{"&:active":u}}}function Ibt(u){return()=>({userSelect:"none",color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]})}function Obt(u){return()=>u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]}const ra={fontStyles:Dbt,themeColor:Rue,focusStyles:bbt,linearGradient:kbt,radialGradient:Fbt,smallerThan:Abt,largerThan:ybt,rgba:XD,cover:wbt,darken:Lbt,lighten:zbt,radius:Mbt,variant:Nbt,primaryShade:qA,hover:Rbt,gradient:M9e,primaryColor:Pbt,placeholderStyles:Ibt,dimmed:Obt};var jbt=Object.defineProperty,Hbt=Object.defineProperties,Vbt=Object.getOwnPropertyDescriptors,c1e=Object.getOwnPropertySymbols,$bt=Object.prototype.hasOwnProperty,Kbt=Object.prototype.propertyIsEnumerable,d1e=(u,e,t)=>e in u?jbt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Wbt=(u,e)=>{for(var t in e||(e={}))$bt.call(e,t)&&d1e(u,t,e[t]);if(c1e)for(var t of c1e(e))Kbt.call(e,t)&&d1e(u,t,e[t]);return u},Gbt=(u,e)=>Hbt(u,Vbt(e));function N9e(u){return Gbt(Wbt({},u),{fn:{fontStyles:ra.fontStyles(u),themeColor:ra.themeColor(u),focusStyles:ra.focusStyles(u),largerThan:ra.largerThan(u),smallerThan:ra.smallerThan(u),radialGradient:ra.radialGradient,linearGradient:ra.linearGradient,gradient:ra.gradient(u),rgba:ra.rgba,cover:ra.cover,lighten:ra.lighten,darken:ra.darken,primaryShade:ra.primaryShade(u),radius:ra.radius(u),variant:ra.variant(u),hover:ra.hover,primaryColor:ra.primaryColor(u),placeholderStyles:ra.placeholderStyles(u),dimmed:ra.dimmed(u)}})}const Ubt={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:pbt,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:u=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${u.colors[u.primaryColor][u.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:u=>({outline:"none",borderColor:u.colors[u.primaryColor][typeof u.primaryShade=="object"?u.primaryShade[u.colorScheme]:u.primaryShade]})}},Oue=N9e(Ubt);function qbt(u){if(u.sheet)return u.sheet;for(var e=0;e0?Za(M6,--e0):0,Hv--,Yr===10&&(Hv=1,gI--),Yr}function w0(){return Yr=e02||ZF(Yr)>3?"":" "}function o2t(u,e){for(;--e&&w0()&&!(Yr<48||Yr>102||Yr>57&&Yr<65||Yr>70&&Yr<97););return JA(u,z8()+(e<6&&x1()==32&&w0()==32))}function fZ(u){for(;w0();)switch(Yr){case u:return e0;case 34:case 39:u!==34&&u!==39&&fZ(Yr);break;case 40:u===41&&fZ(u);break;case 92:w0();break}return e0}function s2t(u,e){for(;w0()&&u+Yr!==47+10;)if(u+Yr===42+42&&x1()===47)break;return"/*"+JA(e,e0-1)+"*"+mI(u===47?u:w0())}function l2t(u){for(;!ZF(x1());)w0();return JA(u,e0)}function c2t(u){return H9e(T8("",null,null,null,[""],u=j9e(u),0,[0],u))}function T8(u,e,t,n,i,r,a,o,s){for(var l=0,c=0,d=a,h=0,E=0,m=0,g=1,f=1,p=1,D=0,x="",b=i,k=r,A=n,F=x;f;)switch(m=D,D=w0()){case 40:if(m!=108&&Za(F,d-1)==58){gZ(F+=Nn(M8(D),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:F+=M8(D);break;case 9:case 10:case 13:case 32:F+=a2t(m);break;case 92:F+=o2t(z8()-1,7);continue;case 47:switch(x1()){case 42:case 47:y_(d2t(s2t(w0(),z8()),e,t),s);break;default:F+="/"}break;case 123*g:o[l++]=jd(F)*p;case 125*g:case 59:case 0:switch(D){case 0:case 125:f=0;case 59+c:p==-1&&(F=Nn(F,/\f/g,"")),E>0&&jd(F)-d&&y_(E>32?E1e(F+";",n,t,d-1):E1e(Nn(F," ","")+";",n,t,d-2),s);break;case 59:F+=";";default:if(y_(A=h1e(F,e,t,l,c,i,o,x,b=[],k=[],d),r),D===123)if(c===0)T8(F,e,A,A,b,r,d,o,k);else switch(h===99&&Za(F,3)===110?100:h){case 100:case 108:case 109:case 115:T8(u,A,A,n&&y_(h1e(u,A,A,0,0,i,o,x,i,b=[],d),k),i,k,d,o,n?b:k);break;default:T8(F,A,A,A,[""],k,0,o,k)}}l=c=E=0,g=p=1,x=F="",d=a;break;case 58:d=1+jd(F),E=m;default:if(g<1){if(D==123)--g;else if(D==125&&g++==0&&r2t()==125)continue}switch(F+=mI(D),D*g){case 38:p=c>0?1:(F+="\f",-1);break;case 44:o[l++]=(jd(F)-1)*p,p=1;break;case 64:x1()===45&&(F+=M8(w0())),h=x1(),c=d=jd(x=F+=l2t(z8())),D++;break;case 45:m===45&&jd(F)==2&&(g=0)}}return r}function h1e(u,e,t,n,i,r,a,o,s,l,c){for(var d=i-1,h=i===0?r:[""],E=Vue(h),m=0,g=0,f=0;m0?h[p]+" "+D:Nn(D,/&\f/g,h[p])))&&(s[f++]=x);return fI(u,e,t,i===0?jue:o,s,l,c)}function d2t(u,e,t){return fI(u,e,t,P9e,mI(i2t()),JF(u,2,-2),0)}function E1e(u,e,t,n){return fI(u,e,t,Hue,JF(u,0,n),JF(u,n+1,-1),n)}function Mx(u,e){for(var t="",n=Vue(u),i=0;i6)switch(Za(u,e+1)){case 109:if(Za(u,e+4)!==45)break;case 102:return Nn(u,/(.+:)(.+)-([^]+)/,"$1"+Tn+"$2-$3$1"+PL+(Za(u,e+3)==108?"$3":"$2-$3"))+u;case 115:return~gZ(u,"stretch")?V9e(Nn(u,"stretch","fill-available"),e)+u:u}break;case 4949:if(Za(u,e+1)!==115)break;case 6444:switch(Za(u,jd(u)-3-(~gZ(u,"!important")&&10))){case 107:return Nn(u,":",":"+Tn)+u;case 101:return Nn(u,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Tn+(Za(u,14)===45?"inline-":"")+"box$3$1"+Tn+"$2$3$1"+xo+"$2box$3")+u}break;case 5936:switch(Za(u,e+11)){case 114:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"tb")+u;case 108:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"tb-rl")+u;case 45:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"lr")+u}return Tn+u+xo+u+u}return u}var C2t=function(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case Hue:e.return=V9e(e.value,e.length);break;case R9e:return Mx([VC(e,{value:Nn(e.value,"@","@"+Tn)})],i);case jue:if(e.length)return n2t(e.props,function(r){switch(u2t(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mx([VC(e,{props:[Nn(r,/:(read-\w+)/,":"+PL+"$1")]})],i);case"::placeholder":return Mx([VC(e,{props:[Nn(r,/:(plac\w+)/,":"+Tn+"input-$1")]}),VC(e,{props:[Nn(r,/:(plac\w+)/,":"+PL+"$1")]}),VC(e,{props:[Nn(r,/:(plac\w+)/,xo+"input-$1")]})],i)}return""})}},b2t=[C2t],$ue=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var f=g.getAttribute("data-emotion");f.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||b2t,r={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var f=g.getAttribute("data-emotion").split(" "),p=1;pMath.abs(b)?"h":"v";if("touches"in g&&F==="h"&&A.type==="range")return!1;var S=i1e(F,A);if(!S)return!0;if(S?k=F:(k=F==="v"?"h":"v",S=i1e(F,A)),!S)return!1;if(!n.current&&"changedTouches"in g&&(x||b)&&(n.current=k),!k)return!0;var w=n.current||k;return tbt(w,f,g,w==="h"?x:b,!0)},[]),s=C.useCallback(function(g){var f=g;if(!(!LD.length||LD[LD.length-1]!==r)){var p="deltaY"in f?r1e(f):F_(f),D=e.current.filter(function(k){return k.name===f.type&&k.target===f.target&&ubt(k.delta,p)})[0];if(D&&D.should){f.cancelable&&f.preventDefault();return}if(!D){var x=(a.current.shards||[]).map(a1e).filter(Boolean).filter(function(k){return k.contains(f.target)}),b=x.length>0?o(f,x[0]):!a.current.noIsolation;b&&f.cancelable&&f.preventDefault()}}},[]),l=C.useCallback(function(g,f,p,D){var x={name:g,delta:f,target:p,should:D};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=C.useCallback(function(g){t.current=F_(g),n.current=void 0},[]),d=C.useCallback(function(g){l(g.type,r1e(g),g.target,o(g,u.lockRef.current))},[]),h=C.useCallback(function(g){l(g.type,F_(g),g.target,o(g,u.lockRef.current))},[]);C.useEffect(function(){return LD.push(r),u.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,wD),document.addEventListener("touchmove",s,wD),document.addEventListener("touchstart",c,wD),function(){LD=LD.filter(function(g){return g!==r}),document.removeEventListener("wheel",s,wD),document.removeEventListener("touchmove",s,wD),document.removeEventListener("touchstart",c,wD)}},[]);var E=u.removeScrollBar,m=u.inert;return C.createElement(C.Fragment,null,m?C.createElement(r,{styles:nbt(i)}):null,E?C.createElement(k9e,{gapMode:u.gapMode}):null)}const abt=C9e(b9e,rbt);var _9e=C.forwardRef(function(u,e){return C.createElement(hI,Ke({},u,{ref:e,sideCar:abt}))});_9e.classNames=hI.classNames;const obt=_9e;function TL(u,e){let t=u;for(;(t=t.parentElement)&&!t.matches(e););return t}function sbt(u,e,t){for(let n=u-1;n>=0;n-=1)if(!e[n].disabled)return n;if(t){for(let n=e.length-1;n>-1;n-=1)if(!e[n].disabled)return n}return u}function lbt(u,e,t){for(let n=u+1;n{var s;t==null||t(o);const l=Array.from(((s=TL(o.currentTarget,u))==null?void 0:s.querySelectorAll(e))||[]).filter(g=>cbt(o.currentTarget,g,u)),c=l.findIndex(g=>o.currentTarget===g),d=lbt(c,l,n),h=sbt(c,l,n),E=r==="rtl"?h:d,m=r==="rtl"?d:h;switch(o.key){case"ArrowRight":{a==="horizontal"&&(o.stopPropagation(),o.preventDefault(),l[E].focus(),i&&l[E].click());break}case"ArrowLeft":{a==="horizontal"&&(o.stopPropagation(),o.preventDefault(),l[m].focus(),i&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(o.stopPropagation(),o.preventDefault(),l[h].focus(),i&&l[h].click());break}case"ArrowDown":{a==="vertical"&&(o.stopPropagation(),o.preventDefault(),l[d].focus(),i&&l[d].click());break}case"Home":{o.stopPropagation(),o.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{o.stopPropagation(),o.preventDefault();const g=l.length-1;!l[g].disabled&&l[g].focus();break}}}}function dbt(u,e,t){var n;return t?Array.from(((n=TL(t,e))==null?void 0:n.querySelectorAll(u))||[]).findIndex(i=>i===t):null}function U1(u){const e=C.createContext(null);return[({children:i,value:r})=>M.createElement(e.Provider,{value:r},i),()=>{const i=C.useContext(e);if(i===null)throw new Error(u);return i}]}function EI(u){return Array.isArray(u)?u:[u]}function NL(u,e){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(e);return`${u}-${t}`}}const hbt=()=>{};function Ebt(u,e={active:!0}){return typeof u!="function"||!e.active?e.onKeyDown||hbt:t=>{var n;t.key==="Escape"&&(u(t),(n=e.onTrigger)==null||n.call(e))}}function no(u,e){return t=>{u==null||u(t),e==null||e(t)}}function mbt(){const[u,e]=C.useState(-1);return[u,{setHovered:e,resetHovered:()=>e(-1)}]}function S9e({data:u}){const e=[],t=[],n=u.reduce((i,r,a)=>(r.group?i[r.group]?i[r.group].push(a):i[r.group]=[a]:t.push(a),i),{});return Object.keys(n).forEach(i=>{e.push(...n[i].map(r=>u[r]))}),e.push(...t.map(i=>u[i])),e}function gbt(u,e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}const fbt=typeof window<"u"?C.useLayoutEffect:C.useEffect;function B9e(u){function e(n){const i=Object.keys(n).reduce((r,a)=>(r[`${u}:${a}`]=o=>n[a](o.detail),r),{});fbt(()=>(Object.keys(i).forEach(r=>{window.removeEventListener(r,i[r]),window.addEventListener(r,i[r])}),()=>Object.keys(i).forEach(r=>{window.removeEventListener(r,i[r])})),[i])}function t(n){return(...i)=>gbt(`${u}:${String(n)}`,i[0])}return[e,t]}function z6(u){return Array.isArray(u)||u===null?!1:typeof u=="object"?u.type!==M.Fragment:!1}function w9e(u){var e,t,n="";if(typeof u=="string"||typeof u=="number")n+=u;else if(typeof u=="object")if(Array.isArray(u))for(e=0;e({fontFamily:u.fontFamily||"sans-serif"})}var xbt=Object.defineProperty,o1e=Object.getOwnPropertySymbols,vbt=Object.prototype.hasOwnProperty,Cbt=Object.prototype.propertyIsEnumerable,s1e=(u,e,t)=>e in u?xbt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,l1e=(u,e)=>{for(var t in e||(e={}))vbt.call(e,t)&&s1e(u,t,e[t]);if(o1e)for(var t of o1e(e))Cbt.call(e,t)&&s1e(u,t,e[t]);return u};function bbt(u){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:l1e({},u.focusRing==="always"||u.focusRing==="auto"?u.focusRingStyles.styles(u):u.focusRingStyles.resetStyles(u)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:l1e({},u.focusRing==="auto"||u.focusRing==="never"?u.focusRingStyles.resetStyles(u):null)})}function qA(u){return e=>typeof u.primaryShade=="number"?u.primaryShade:u.primaryShade[e||u.colorScheme]}function Rue(u){const e=qA(u);return(t,n,i=!0,r=!0)=>{if(typeof t=="string"&&t.includes(".")){const[o,s]=t.split("."),l=parseInt(s,10);if(o in u.colors&&l>=0&&l<10)return u.colors[o][typeof n=="number"&&!r?n:l]}const a=typeof n=="number"?n:e();return t in u.colors?u.colors[t][a]:i?u.colors[u.primaryColor][a]:t}}function z9e(u){let e="";for(let t=1;t{const i={from:(n==null?void 0:n.from)||u.defaultGradient.from,to:(n==null?void 0:n.to)||u.defaultGradient.to,deg:(n==null?void 0:n.deg)||u.defaultGradient.deg};return`linear-gradient(${i.deg}deg, ${e(i.from,t(),!1)} 0%, ${e(i.to,t(),!1)} 100%)`}}function T9e(u){return e=>{if(typeof e=="number")return`${e/16}${u}`;if(typeof e=="string"){const t=e.replace("px","");if(!Number.isNaN(Number(t)))return`${Number(t)/16}${u}`}return e}}const G=T9e("rem"),wl=T9e("em");function ye({size:u,sizes:e,units:t}){return u in e?e[u]:typeof u=="number"?t==="em"?wl(u):G(u):u||e.md}function e0(u){return typeof u=="number"?u:typeof u=="string"&&u.includes("rem")?Number(u.replace("rem",""))*16:typeof u=="string"&&u.includes("em")?Number(u.replace("em",""))*16:Number(u)}function ybt(u){return e=>`@media (min-width: ${wl(e0(ye({size:e,sizes:u.breakpoints})))})`}function Abt(u){return e=>`@media (max-width: ${wl(e0(ye({size:e,sizes:u.breakpoints}))-1)})`}function _bt(u){return/^#?([0-9A-F]{3}){1,2}$/i.test(u)}function Sbt(u){let e=u.replace("#","");if(e.length===3){const a=e.split("");e=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const t=parseInt(e,16),n=t>>16&255,i=t>>8&255,r=t&255;return{r:n,g:i,b:r,a:1}}function Bbt(u){const[e,t,n,i]=u.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:t,b:n,a:i||1}}function Iue(u){return _bt(u)?Sbt(u):u.startsWith("rgb")?Bbt(u):{r:0,g:0,b:0,a:1}}function XD(u,e){if(typeof u!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(u.startsWith("var(--"))return u;const{r:t,g:n,b:i}=Iue(u);return`rgba(${t}, ${n}, ${i}, ${e})`}function wbt(u=0){return{position:"absolute",top:G(u),right:G(u),left:G(u),bottom:G(u)}}function Lbt(u,e){if(typeof u=="string"&&u.startsWith("var(--"))return u;const{r:t,g:n,b:i,a:r}=Iue(u),a=1-e,o=s=>Math.round(s*a);return`rgba(${o(t)}, ${o(n)}, ${o(i)}, ${r})`}function zbt(u,e){if(typeof u=="string"&&u.startsWith("var(--"))return u;const{r:t,g:n,b:i,a:r}=Iue(u),a=o=>Math.round(o+(255-o)*e);return`rgba(${a(t)}, ${a(n)}, ${a(i)}, ${r})`}function Mbt(u){return e=>{if(typeof e=="number")return G(e);const t=typeof u.defaultRadius=="number"?u.defaultRadius:u.radius[u.defaultRadius]||u.defaultRadius;return u.radius[e]||e||t}}function Tbt(u,e){if(typeof u=="string"&&u.includes(".")){const[t,n]=u.split("."),i=parseInt(n,10);if(t in e.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:t,shade:i}}return{isSplittedColor:!1}}function Nbt(u){const e=Rue(u),t=qA(u),n=M9e(u);return({variant:i,color:r,gradient:a,primaryFallback:o})=>{const s=Tbt(r,u);switch(i){case"light":return{border:"transparent",background:XD(e(r,u.colorScheme==="dark"?8:0,o,!1),u.colorScheme==="dark"?.2:1),color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),hover:XD(e(r,u.colorScheme==="dark"?7:1,o,!1),u.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),hover:XD(e(r,u.colorScheme==="dark"?8:0,o,!1),u.colorScheme==="dark"?.2:1)};case"outline":return{border:e(r,u.colorScheme==="dark"?5:t("light")),background:"transparent",color:e(r,u.colorScheme==="dark"?5:t("light")),hover:u.colorScheme==="dark"?XD(e(r,5,o,!1),.05):XD(e(r,0,o,!1),.35)};case"default":return{border:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4],background:u.colorScheme==="dark"?u.colors.dark[6]:u.white,color:u.colorScheme==="dark"?u.white:u.black,hover:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]};case"white":return{border:"transparent",background:u.white,color:e(r,t()),hover:null};case"transparent":return{border:"transparent",color:r==="dark"?u.colorScheme==="dark"?u.colors.dark[0]:u.colors.dark[9]:e(r,u.colorScheme==="dark"?2:t("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:u.white,border:"transparent",hover:null};default:{const l=t(),c=s.isSplittedColor?s.shade:l,d=s.isSplittedColor?s.key:r;return{border:"transparent",background:e(d,c,o),color:u.white,hover:e(d,c===9?8:c+1)}}}}}function Pbt(u){return e=>{const t=qA(u)(e);return u.colors[u.primaryColor][t]}}function Rbt(u){return{"@media (hover: hover)":{"&:hover":u},"@media (hover: none)":{"&:active":u}}}function Ibt(u){return()=>({userSelect:"none",color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]})}function Obt(u){return()=>u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]}const ra={fontStyles:Dbt,themeColor:Rue,focusStyles:bbt,linearGradient:kbt,radialGradient:Fbt,smallerThan:Abt,largerThan:ybt,rgba:XD,cover:wbt,darken:Lbt,lighten:zbt,radius:Mbt,variant:Nbt,primaryShade:qA,hover:Rbt,gradient:M9e,primaryColor:Pbt,placeholderStyles:Ibt,dimmed:Obt};var jbt=Object.defineProperty,Hbt=Object.defineProperties,Vbt=Object.getOwnPropertyDescriptors,c1e=Object.getOwnPropertySymbols,$bt=Object.prototype.hasOwnProperty,Kbt=Object.prototype.propertyIsEnumerable,d1e=(u,e,t)=>e in u?jbt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Wbt=(u,e)=>{for(var t in e||(e={}))$bt.call(e,t)&&d1e(u,t,e[t]);if(c1e)for(var t of c1e(e))Kbt.call(e,t)&&d1e(u,t,e[t]);return u},Gbt=(u,e)=>Hbt(u,Vbt(e));function N9e(u){return Gbt(Wbt({},u),{fn:{fontStyles:ra.fontStyles(u),themeColor:ra.themeColor(u),focusStyles:ra.focusStyles(u),largerThan:ra.largerThan(u),smallerThan:ra.smallerThan(u),radialGradient:ra.radialGradient,linearGradient:ra.linearGradient,gradient:ra.gradient(u),rgba:ra.rgba,cover:ra.cover,lighten:ra.lighten,darken:ra.darken,primaryShade:ra.primaryShade(u),radius:ra.radius(u),variant:ra.variant(u),hover:ra.hover,primaryColor:ra.primaryColor(u),placeholderStyles:ra.placeholderStyles(u),dimmed:ra.dimmed(u)}})}const Ubt={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:pbt,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:u=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${u.colors[u.primaryColor][u.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:u=>({outline:"none",borderColor:u.colors[u.primaryColor][typeof u.primaryShade=="object"?u.primaryShade[u.colorScheme]:u.primaryShade]})}},Oue=N9e(Ubt);function qbt(u){if(u.sheet)return u.sheet;for(var e=0;e0?Za(M6,--t0):0,Hv--,Yr===10&&(Hv=1,gI--),Yr}function L0(){return Yr=t02||ZF(Yr)>3?"":" "}function o2t(u,e){for(;--e&&L0()&&!(Yr<48||Yr>102||Yr>57&&Yr<65||Yr>70&&Yr<97););return JA(u,z8()+(e<6&&x1()==32&&L0()==32))}function fZ(u){for(;L0();)switch(Yr){case u:return t0;case 34:case 39:u!==34&&u!==39&&fZ(Yr);break;case 40:u===41&&fZ(u);break;case 92:L0();break}return t0}function s2t(u,e){for(;L0()&&u+Yr!==47+10;)if(u+Yr===42+42&&x1()===47)break;return"/*"+JA(e,t0-1)+"*"+mI(u===47?u:L0())}function l2t(u){for(;!ZF(x1());)L0();return JA(u,t0)}function c2t(u){return H9e(T8("",null,null,null,[""],u=j9e(u),0,[0],u))}function T8(u,e,t,n,i,r,a,o,s){for(var l=0,c=0,d=a,h=0,E=0,m=0,g=1,f=1,p=1,D=0,x="",b=i,k=r,A=n,F=x;f;)switch(m=D,D=L0()){case 40:if(m!=108&&Za(F,d-1)==58){gZ(F+=Nn(M8(D),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:F+=M8(D);break;case 9:case 10:case 13:case 32:F+=a2t(m);break;case 92:F+=o2t(z8()-1,7);continue;case 47:switch(x1()){case 42:case 47:y_(d2t(s2t(L0(),z8()),e,t),s);break;default:F+="/"}break;case 123*g:o[l++]=jd(F)*p;case 125*g:case 59:case 0:switch(D){case 0:case 125:f=0;case 59+c:p==-1&&(F=Nn(F,/\f/g,"")),E>0&&jd(F)-d&&y_(E>32?E1e(F+";",n,t,d-1):E1e(Nn(F," ","")+";",n,t,d-2),s);break;case 59:F+=";";default:if(y_(A=h1e(F,e,t,l,c,i,o,x,b=[],k=[],d),r),D===123)if(c===0)T8(F,e,A,A,b,r,d,o,k);else switch(h===99&&Za(F,3)===110?100:h){case 100:case 108:case 109:case 115:T8(u,A,A,n&&y_(h1e(u,A,A,0,0,i,o,x,i,b=[],d),k),i,k,d,o,n?b:k);break;default:T8(F,A,A,A,[""],k,0,o,k)}}l=c=E=0,g=p=1,x=F="",d=a;break;case 58:d=1+jd(F),E=m;default:if(g<1){if(D==123)--g;else if(D==125&&g++==0&&r2t()==125)continue}switch(F+=mI(D),D*g){case 38:p=c>0?1:(F+="\f",-1);break;case 44:o[l++]=(jd(F)-1)*p,p=1;break;case 64:x1()===45&&(F+=M8(L0())),h=x1(),c=d=jd(x=F+=l2t(z8())),D++;break;case 45:m===45&&jd(F)==2&&(g=0)}}return r}function h1e(u,e,t,n,i,r,a,o,s,l,c){for(var d=i-1,h=i===0?r:[""],E=Vue(h),m=0,g=0,f=0;m0?h[p]+" "+D:Nn(D,/&\f/g,h[p])))&&(s[f++]=x);return fI(u,e,t,i===0?jue:o,s,l,c)}function d2t(u,e,t){return fI(u,e,t,P9e,mI(i2t()),JF(u,2,-2),0)}function E1e(u,e,t,n){return fI(u,e,t,Hue,JF(u,0,n),JF(u,n+1,-1),n)}function Mx(u,e){for(var t="",n=Vue(u),i=0;i6)switch(Za(u,e+1)){case 109:if(Za(u,e+4)!==45)break;case 102:return Nn(u,/(.+:)(.+)-([^]+)/,"$1"+Tn+"$2-$3$1"+PL+(Za(u,e+3)==108?"$3":"$2-$3"))+u;case 115:return~gZ(u,"stretch")?V9e(Nn(u,"stretch","fill-available"),e)+u:u}break;case 4949:if(Za(u,e+1)!==115)break;case 6444:switch(Za(u,jd(u)-3-(~gZ(u,"!important")&&10))){case 107:return Nn(u,":",":"+Tn)+u;case 101:return Nn(u,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Tn+(Za(u,14)===45?"inline-":"")+"box$3$1"+Tn+"$2$3$1"+xo+"$2box$3")+u}break;case 5936:switch(Za(u,e+11)){case 114:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"tb")+u;case 108:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"tb-rl")+u;case 45:return Tn+u+xo+Nn(u,/[svh]\w+-[tblr]{2}/,"lr")+u}return Tn+u+xo+u+u}return u}var C2t=function(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case Hue:e.return=V9e(e.value,e.length);break;case R9e:return Mx([VC(e,{value:Nn(e.value,"@","@"+Tn)})],i);case jue:if(e.length)return n2t(e.props,function(r){switch(u2t(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mx([VC(e,{props:[Nn(r,/:(read-\w+)/,":"+PL+"$1")]})],i);case"::placeholder":return Mx([VC(e,{props:[Nn(r,/:(plac\w+)/,":"+Tn+"input-$1")]}),VC(e,{props:[Nn(r,/:(plac\w+)/,":"+PL+"$1")]}),VC(e,{props:[Nn(r,/:(plac\w+)/,xo+"input-$1")]})],i)}return""})}},b2t=[C2t],$ue=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var f=g.getAttribute("data-emotion");f.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||b2t,r={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var f=g.getAttribute("data-emotion").split(" "),p=1;p=4;++n,i-=4)t=u.charCodeAt(n)&255|(u.charCodeAt(++n)&255)<<8|(u.charCodeAt(++n)&255)<<16|(u.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(u.charCodeAt(n+2)&255)<<16;case 2:e^=(u.charCodeAt(n+1)&255)<<8;case 1:e^=u.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var N2t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},P2t=/[A-Z]|^ms/g,R2t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q9e=function(e){return e.charCodeAt(1)===45},f1e=function(e){return e!=null&&typeof e!="boolean"},_V=g2t(function(u){return q9e(u)?u:u.replace(P2t,"-$&").toLowerCase()}),p1e=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(R2t,function(n,i,r){return Hd={name:i,styles:r,next:Hd},i})}return N2t[e]!==1&&!q9e(e)&&typeof t=="number"&&t!==0?t+"px":t};function YF(u,e,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Hd={name:t.name,styles:t.styles,next:Hd},t.name;if(t.styles!==void 0){var n=t.next;if(n!==void 0)for(;n!==void 0;)Hd={name:n.name,styles:n.styles,next:Hd},n=n.next;var i=t.styles+";";return i}return I2t(u,e,t)}case"function":{if(u!==void 0){var r=Hd,a=t(u);return Hd=r,YF(u,e,a)}break}}if(e==null)return t;var o=e[t];return o!==void 0?o:t}function I2t(u,e,t){var n="";if(Array.isArray(t))for(var i=0;ie in u?W2t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Z2t=(u,e)=>{for(var t in e||(e={}))q2t.call(e,t)&&C1e(u,t,e[t]);if(v1e)for(var t of v1e(e))J2t.call(e,t)&&C1e(u,t,e[t]);return u},Y2t=(u,e)=>G2t(u,U2t(e));function Q2t({theme:u}){return M.createElement(ZA,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:u.colorScheme==="dark"?"dark":"light"},body:Y2t(Z2t({},u.fn.fontStyles()),{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,lineHeight:u.lineHeight,fontSize:u.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function $C(u,e,t,n=G){Object.keys(e).forEach(i=>{u[`--mantine-${t}-${i}`]=n(e[i])})}function X2t({theme:u}){const e={"--mantine-color-white":u.white,"--mantine-color-black":u.black,"--mantine-transition-timing-function":u.transitionTimingFunction,"--mantine-line-height":`${u.lineHeight}`,"--mantine-font-family":u.fontFamily,"--mantine-font-family-monospace":u.fontFamilyMonospace,"--mantine-font-family-headings":u.headings.fontFamily,"--mantine-heading-font-weight":`${u.headings.fontWeight}`};$C(e,u.shadows,"shadow"),$C(e,u.fontSizes,"font-size"),$C(e,u.radius,"radius"),$C(e,u.spacing,"spacing"),$C(e,u.breakpoints,"breakpoints",wl),Object.keys(u.colors).forEach(n=>{u.colors[n].forEach((i,r)=>{e[`--mantine-color-${n}-${r}`]=i})});const t=u.headings.sizes;return Object.keys(t).forEach(n=>{e[`--mantine-${n}-font-size`]=t[n].fontSize,e[`--mantine-${n}-line-height`]=`${t[n].lineHeight}`}),M.createElement(ZA,{styles:{":root":e}})}var ekt=Object.defineProperty,tkt=Object.defineProperties,ukt=Object.getOwnPropertyDescriptors,b1e=Object.getOwnPropertySymbols,nkt=Object.prototype.hasOwnProperty,ikt=Object.prototype.propertyIsEnumerable,k1e=(u,e,t)=>e in u?ekt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ad=(u,e)=>{for(var t in e||(e={}))nkt.call(e,t)&&k1e(u,t,e[t]);if(b1e)for(var t of b1e(e))ikt.call(e,t)&&k1e(u,t,e[t]);return u},SV=(u,e)=>tkt(u,ukt(e));function rkt(u,e){var t;if(!e)return u;const n=Object.keys(u).reduce((i,r)=>{if(r==="headings"&&e.headings){const a=e.headings.sizes?Object.keys(u.headings.sizes).reduce((o,s)=>(o[s]=Ad(Ad({},u.headings.sizes[s]),e.headings.sizes[s]),o),{}):u.headings.sizes;return SV(Ad({},i),{headings:SV(Ad(Ad({},u.headings),e.headings),{sizes:a})})}if(r==="breakpoints"&&e.breakpoints){const a=Ad(Ad({},u.breakpoints),e.breakpoints);return SV(Ad({},i),{breakpoints:Object.fromEntries(Object.entries(a).sort((o,s)=>Xs(o[1])-Xs(s[1])))})}return i[r]=typeof e[r]=="object"?Ad(Ad({},u[r]),e[r]):typeof e[r]=="number"||typeof e[r]=="boolean"||typeof e[r]=="function"?e[r]:e[r]||u[r],i},{});if(e!=null&&e.fontFamily&&!((t=e==null?void 0:e.headings)!=null&&t.fontFamily)&&(n.headings.fontFamily=e.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function akt(u,e){return N9e(rkt(u,e))}function Y9e(u){return Object.keys(u).reduce((e,t)=>(u[t]!==void 0&&(e[t]=u[t]),e),{})}const okt={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${G(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function skt(){return M.createElement(ZA,{styles:okt})}var lkt=Object.defineProperty,F1e=Object.getOwnPropertySymbols,ckt=Object.prototype.hasOwnProperty,dkt=Object.prototype.propertyIsEnumerable,y1e=(u,e,t)=>e in u?lkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,I2=(u,e)=>{for(var t in e||(e={}))ckt.call(e,t)&&y1e(u,t,e[t]);if(F1e)for(var t of F1e(e))dkt.call(e,t)&&y1e(u,t,e[t]);return u};const RL=C.createContext({theme:Oue});function jr(){var u;return((u=C.useContext(RL))==null?void 0:u.theme)||Oue}function hkt(u){const e=jr(),t=n=>{var i,r,a,o;return{styles:((i=e.components[n])==null?void 0:i.styles)||{},classNames:((r=e.components[n])==null?void 0:r.classNames)||{},variants:(a=e.components[n])==null?void 0:a.variants,sizes:(o=e.components[n])==null?void 0:o.sizes}};return Array.isArray(u)?u.map(t):[t(u)]}function Q9e(){var u;return(u=C.useContext(RL))==null?void 0:u.emotionCache}function Qe(u,e,t){var n;const i=jr(),r=(n=i.components[u])==null?void 0:n.defaultProps,a=typeof r=="function"?r(i):r;return I2(I2(I2({},e),a),Y9e(t))}function que({theme:u,emotionCache:e,withNormalizeCSS:t=!1,withGlobalStyles:n=!1,withCSSVariables:i=!1,inherit:r=!1,children:a}){const o=C.useContext(RL),s=akt(Oue,r?I2(I2({},o.theme),u):u);return M.createElement($2t,{theme:s},M.createElement(RL.Provider,{value:{theme:s,emotionCache:e}},t&&M.createElement(skt,null),n&&M.createElement(Q2t,{theme:s}),i&&M.createElement(X2t,{theme:s}),typeof s.globalStyles=="function"&&M.createElement(ZA,{styles:s.globalStyles(s)}),a))}que.displayName="@mantine/core/MantineProvider";const X9e=C.createContext(null);function Ekt(){const u=C.useContext(X9e);if(!u)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return u}function e_e({colorScheme:u,toggleColorScheme:e,children:t}){return M.createElement(X9e.Provider,{value:{colorScheme:u,toggleColorScheme:e}},t)}e_e.displayName="@mantine/core/ColorSchemeProvider";const mkt={app:100,modal:200,popover:300,overlay:400,max:9999};function fd(u){return mkt[u]}function t_e(u){return typeof u=="number"?u:typeof u=="string"?u.includes("px")?Number(u.replace("px","")):u.includes("rem")?Number(u.replace("rem",""))*16:Number(u):NaN}function gkt(u,e){const t=C.useRef();return(!t.current||e.length!==t.current.prevDeps.length||t.current.prevDeps.map((n,i)=>n===e[i]).indexOf(!1)>=0)&&(t.current={v:u(),prevDeps:[...e]}),t.current.v}const fkt=$ue({key:"mantine",prepend:!0});function pkt(){return Q9e()||fkt}var Dkt=Object.defineProperty,A1e=Object.getOwnPropertySymbols,xkt=Object.prototype.hasOwnProperty,vkt=Object.prototype.propertyIsEnumerable,_1e=(u,e,t)=>e in u?Dkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ckt=(u,e)=>{for(var t in e||(e={}))xkt.call(e,t)&&_1e(u,t,e[t]);if(A1e)for(var t of A1e(e))vkt.call(e,t)&&_1e(u,t,e[t]);return u};const BV="ref";function bkt(u){let e;if(u.length!==1)return{args:u,ref:e};const[t]=u;if(!(t instanceof Object))return{args:u,ref:e};if(!(BV in t))return{args:u,ref:e};e=t[BV];const n=Ckt({},t);return delete n[BV],{args:[n],ref:e}}const{cssFactory:kkt}=(()=>{function u(t,n,i){const r=[],a=z2t(t,r,i);return r.length<2?i:a+n(r)}function e(t){const{cache:n}=t,i=(...a)=>{const{ref:o,args:s}=bkt(a),l=Uue(s,n.registered);return U9e(n,l,!1),`${n.key}-${l.name}${o===void 0?"":` ${o}`}`};return{css:i,cx:(...a)=>u(n.registered,i,L9e(a))}}return{cssFactory:e}})();function u_e(){const u=pkt();return gkt(()=>kkt({cache:u}),[u])}function Fkt({cx:u,classes:e,context:t,classNames:n,name:i,cache:r}){const a=t.reduce((o,s)=>(Object.keys(s.classNames).forEach(l=>{typeof o[l]!="string"?o[l]=`${s.classNames[l]}`:o[l]=`${o[l]} ${s.classNames[l]}`}),o),{});return Object.keys(e).reduce((o,s)=>(o[s]=u(e[s],a[s],n!=null&&n[s],Array.isArray(i)?i.filter(Boolean).map(l=>`${(r==null?void 0:r.key)||"mantine"}-${l}-${s}`).join(" "):i?`${(r==null?void 0:r.key)||"mantine"}-${i}-${s}`:null),o),{})}var ykt=Object.defineProperty,S1e=Object.getOwnPropertySymbols,Akt=Object.prototype.hasOwnProperty,_kt=Object.prototype.propertyIsEnumerable,B1e=(u,e,t)=>e in u?ykt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,wV=(u,e)=>{for(var t in e||(e={}))Akt.call(e,t)&&B1e(u,t,e[t]);if(S1e)for(var t of S1e(e))_kt.call(e,t)&&B1e(u,t,e[t]);return u};function DZ(u,e){return e&&Object.keys(e).forEach(t=>{u[t]?u[t]=wV(wV({},u[t]),e[t]):u[t]=wV({},e[t])}),u}function w1e(u,e,t,n){const i=r=>typeof r=="function"?r(e,t||{},n):r||{};return Array.isArray(u)?u.map(r=>i(r.styles)).reduce((r,a)=>DZ(r,a),{}):i(u)}function Skt({ctx:u,theme:e,params:t,variant:n,size:i}){return u.reduce((r,a)=>(a.variants&&n in a.variants&&DZ(r,a.variants[n](e,t,{variant:n,size:i})),a.sizes&&i in a.sizes&&DZ(r,a.sizes[i](e,t,{variant:n,size:i})),r),{})}function at(u){const e=typeof u=="function"?u:()=>u;function t(n,i){const r=jr(),a=hkt(i==null?void 0:i.name),o=Q9e(),s={variant:i==null?void 0:i.variant,size:i==null?void 0:i.size},{css:l,cx:c}=u_e(),d=e(r,n,s),h=w1e(i==null?void 0:i.styles,r,n,s),E=w1e(a,r,n,s),m=Skt({ctx:a,theme:r,params:n,variant:i==null?void 0:i.variant,size:i==null?void 0:i.size}),g=Object.fromEntries(Object.keys(d).map(f=>{const p=c({[l(d[f])]:!(i!=null&&i.unstyled)},l(m[f]),l(E[f]),l(h[f]));return[f,p]}));return{classes:Fkt({cx:c,classes:g,context:a,classNames:i==null?void 0:i.classNames,name:i==null?void 0:i.name,cache:o}),cx:c,theme:r}}return t}function v1(u){return`___ref-${u||""}`}function Bkt({styles:u}){const e=jr();return M.createElement(ZA,{styles:Z9e(typeof u=="function"?u(e):u)})}var wkt=Object.defineProperty,Lkt=Object.defineProperties,zkt=Object.getOwnPropertyDescriptors,L1e=Object.getOwnPropertySymbols,Mkt=Object.prototype.hasOwnProperty,Tkt=Object.prototype.propertyIsEnumerable,z1e=(u,e,t)=>e in u?wkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KC=(u,e)=>{for(var t in e||(e={}))Mkt.call(e,t)&&z1e(u,t,e[t]);if(L1e)for(var t of L1e(e))Tkt.call(e,t)&&z1e(u,t,e[t]);return u},WC=(u,e)=>Lkt(u,zkt(e));const GC={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${G(10)})`},transitionProperty:"transform, opacity"},A_={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${G(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:WC(KC({},GC),{common:{transformOrigin:"center center"}}),"pop-bottom-left":WC(KC({},GC),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":WC(KC({},GC),{common:{transformOrigin:"bottom right"}}),"pop-top-left":WC(KC({},GC),{common:{transformOrigin:"top left"}}),"pop-top-right":WC(KC({},GC),{common:{transformOrigin:"top right"}})},M1e=["mousedown","touchstart"];function Nkt(u,e,t){const n=C.useRef();return C.useEffect(()=>{const i=r=>{const{target:a}=r??{};if(Array.isArray(t)){const o=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";t.every(l=>!!l&&!r.composedPath().includes(l))&&!o&&u()}else n.current&&!n.current.contains(a)&&u()};return(e||M1e).forEach(r=>document.addEventListener(r,i)),()=>{(e||M1e).forEach(r=>document.removeEventListener(r,i))}},[n,u,t]),n}function Pkt({timeout:u=2e3}={}){const[e,t]=C.useState(null),[n,i]=C.useState(!1),[r,a]=C.useState(null),o=c=>{clearTimeout(r),a(setTimeout(()=>i(!1),u)),i(c)};return{copy:c=>{"clipboard"in navigator?navigator.clipboard.writeText(c).then(()=>o(!0)).catch(d=>t(d)):t(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),t(null),clearTimeout(r)},error:e,copied:n}}function Rkt(u,e){try{return u.addEventListener("change",e),()=>u.removeEventListener("change",e)}catch{return u.addListener(e),()=>u.removeListener(e)}}function Ikt(u,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(u).matches:!1}function YA(u,e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[n,i]=C.useState(t?e:Ikt(u,e)),r=C.useRef();return C.useEffect(()=>{if("matchMedia"in window)return r.current=window.matchMedia(u),i(r.current.matches),Rkt(r.current,a=>i(a.matches))},[u]),n}function Okt(u,e){return YA("(prefers-color-scheme: dark)",u==="dark",e)?"dark":"light"}function bm(u,e,t){return Math.min(Math.max(u,e),t)}const _I=typeof document<"u"?C.useLayoutEffect:C.useEffect;function To(u,e){const t=C.useRef(!1);C.useEffect(()=>()=>{t.current=!1},[]),C.useEffect(()=>{if(t.current)return u();t.current=!0},e)}function n_e({opened:u,shouldReturnFocus:e=!0}){const t=C.useRef(),n=()=>{var i;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((i=t.current)==null||i.focus({preventScroll:!0}))};return To(()=>{let i=-1;const r=a=>{a.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",r),u?t.current=document.activeElement:e&&(i=window.setTimeout(n,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",r)}},[u,e]),n}const jkt=/input|select|textarea|button|object/,i_e="a, input, select, textarea, button, object, [tabindex]";function Hkt(u){return u.style.display==="none"}function Vkt(u){if(u.getAttribute("aria-hidden")||u.getAttribute("hidden")||u.getAttribute("type")==="hidden")return!1;let t=u;for(;t&&!(t===document.body||t.nodeType===11);){if(Hkt(t))return!1;t=t.parentNode}return!0}function r_e(u){let e=u.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function xZ(u){const e=u.nodeName.toLowerCase(),t=!Number.isNaN(r_e(u));return(jkt.test(e)&&!u.disabled||u instanceof HTMLAnchorElement&&u.href||t)&&Vkt(u)}function a_e(u){const e=r_e(u);return(Number.isNaN(e)||e>=0)&&xZ(u)}function $kt(u){return Array.from(u.querySelectorAll(i_e)).filter(a_e)}function Kkt(u,e){const t=$kt(u);if(!t.length){e.preventDefault();return}const n=t[e.shiftKey?0:t.length-1],i=u.getRootNode();if(!(n===i.activeElement||u===i.activeElement))return;e.preventDefault();const a=t[e.shiftKey?t.length-1:0];a&&a.focus()}function i4(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function Wkt(u,e="body > :not(script)"){const t=i4(),n=Array.from(document.querySelectorAll(e)).map(i=>{var r;if((r=i==null?void 0:i.shadowRoot)!=null&&r.contains(u)||i.contains(u))return;const a=i.getAttribute("aria-hidden"),o=i.getAttribute("data-hidden"),s=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",t),a===null||a==="false"?i.setAttribute("aria-hidden","true"):!o&&!s&&i.setAttribute("data-hidden",a),{node:i,ariaHidden:o||null}});return()=>{n.forEach(i=>{!i||t!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function Gkt(u=!0){const e=C.useRef(),t=C.useRef(null),n=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(i_e));a=o.find(a_e)||o.find(xZ)||null,!a&&xZ(r)&&(a=r)}a&&a.focus({preventScroll:!0})},i=C.useCallback(r=>{if(u){if(r===null){t.current&&(t.current(),t.current=null);return}t.current=Wkt(r),e.current!==r&&(r?(setTimeout(()=>{r.getRootNode()&&n(r)}),e.current=r):e.current=null)}},[u]);return C.useEffect(()=>{if(!u)return;e.current&&setTimeout(()=>n(e.current));const r=a=>{a.key==="Tab"&&e.current&&Kkt(e.current,a)};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r),t.current&&t.current()}},[u]),i}const Ukt=u=>(u+1)%1e6;function qkt(){const[,u]=C.useReducer(Ukt,0);return u}const Jkt=M["useId".toString()]||(()=>{});function Zkt(){const u=Jkt();return u?`mantine-${u.replace(/:/g,"")}`:""}function Jl(u){const e=Zkt(),[t,n]=C.useState(e);return _I(()=>{n(i4())},[]),typeof u=="string"?u:typeof window>"u"?e:t}function vZ(u,e,t){C.useEffect(()=>(window.addEventListener(u,e,t),()=>window.removeEventListener(u,e,t)),[u,e])}function Jue(u,e){typeof u=="function"?u(e):typeof u=="object"&&u!==null&&"current"in u&&(u.current=e)}function o_e(...u){return e=>{u.forEach(t=>Jue(t,e))}}function q1(...u){return C.useCallback(o_e(...u),u)}function Ykt(u,e,t="ltr"){const n=C.useRef(),i=C.useRef(!1),r=C.useRef(!1),a=C.useRef(0),[o,s]=C.useState(!1);return C.useEffect(()=>{i.current=!0},[]),C.useEffect(()=>{const l=({x:D,y:x})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&n.current){n.current.style.userSelect="none";const b=n.current.getBoundingClientRect();if(b.width&&b.height){const k=bm((D-b.left)/b.width,0,1);u({x:t==="ltr"?k:1-k,y:bm((x-b.top)/b.height,0,1)})}}})},c=()=>{document.addEventListener("mousemove",g),document.addEventListener("mouseup",E),document.addEventListener("touchmove",p),document.addEventListener("touchend",E)},d=()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",p),document.removeEventListener("touchend",E)},h=()=>{!r.current&&i.current&&(r.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),s(!0),c())},E=()=>{r.current&&i.current&&(r.current=!1,s(!1),d(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},m=D=>{h(),D.preventDefault(),g(D)},g=D=>l({x:D.clientX,y:D.clientY}),f=D=>{D.cancelable&&D.preventDefault(),h(),p(D)},p=D=>{D.cancelable&&D.preventDefault(),l({x:D.changedTouches[0].clientX,y:D.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",m),n.current.addEventListener("touchstart",f,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",m),n.current.removeEventListener("touchstart",f))}},[t,u]),{ref:n,active:o}}function fs({value:u,defaultValue:e,finalValue:t,onChange:n=()=>{}}){const[i,r]=C.useState(e!==void 0?e:t),a=o=>{r(o),n==null||n(o)};return u!==void 0?[u,n,!0]:[i,a,!1]}function U4(u,e){const t=e-u+1;return Array.from({length:t},(n,i)=>i+u)}const __="dots";function Qkt({total:u,siblings:e=1,boundaries:t=1,page:n,initialPage:i=1,onChange:r}){const a=Math.max(Math.trunc(u),0),[o,s]=fs({value:n,onChange:r,defaultValue:i,finalValue:i}),l=g=>{g<=0?s(1):g>a?s(a):s(g)},c=()=>l(o+1),d=()=>l(o-1),h=()=>l(1),E=()=>l(a);return{range:C.useMemo(()=>{if(e*2+3+t*2>=a)return U4(1,a);const f=Math.max(o-e,t),p=Math.min(o+e,a-t),D=f>t+2,x=pi(l=>{const c=[...l.state,...l.queue,...s];return{state:c.slice(0,e),queue:c.slice(e)}}),update:s=>i(l=>{const c=s([...l.state,...l.queue]);return{state:c.slice(0,e),queue:c.slice(e)}}),cleanQueue:()=>i(s=>({state:s.state,queue:[]}))}}function QA(u,e){return YA("(prefers-reduced-motion: reduce)",u,e)}const eFt=u=>u<.5?2*u*u:-1+(4-2*u)*u,tFt=({axis:u,target:e,parent:t,alignment:n,offset:i,isList:r})=>{if(!e||!t&&typeof document>"u")return 0;const a=!!t,s=(t||document.body).getBoundingClientRect(),l=e.getBoundingClientRect(),c=d=>l[d]-s[d];if(u==="y"){const d=c("top");if(d===0)return 0;if(n==="start"){const E=d-i;return E<=l.height*(r?0:1)||!r?E:0}const h=a?s.height:window.innerHeight;if(n==="end"){const E=d+i-h+l.height;return E>=-l.height*(r?0:1)||!r?E:0}return n==="center"?d-h/2+l.height/2:0}if(u==="x"){const d=c("left");if(d===0)return 0;if(n==="start"){const E=d-i;return E<=l.width||!r?E:0}const h=a?s.width:window.innerWidth;if(n==="end"){const E=d+i-h+l.width;return E>=-l.width||!r?E:0}return n==="center"?d-h/2+l.width/2:0}return 0},uFt=({axis:u,parent:e})=>{if(!e&&typeof document>"u")return 0;const t=u==="y"?"scrollTop":"scrollLeft";if(e)return e[t];const{body:n,documentElement:i}=document;return n[t]+i[t]},nFt=({axis:u,parent:e,distance:t})=>{if(!e&&typeof document>"u")return;const n=u==="y"?"scrollTop":"scrollLeft";if(e)e[n]=t;else{const{body:i,documentElement:r}=document;i[n]=t,r[n]=t}};function s_e({duration:u=1250,axis:e="y",onScrollFinish:t,easing:n=eFt,offset:i=0,cancelable:r=!0,isList:a=!1}={}){const o=C.useRef(0),s=C.useRef(0),l=C.useRef(!1),c=C.useRef(null),d=C.useRef(null),h=QA(),E=()=>{o.current&&cancelAnimationFrame(o.current)},m=C.useCallback(({alignment:f="start"}={})=>{var p;l.current=!1,o.current&&E();const D=(p=uFt({parent:c.current,axis:e}))!=null?p:0,x=tFt({parent:c.current,target:d.current,axis:e,alignment:f,offset:i,isList:a})-(c.current?0:D);function b(){s.current===0&&(s.current=performance.now());const A=performance.now()-s.current,F=h||u===0?1:A/u,S=D+x*n(F);nFt({parent:c.current,axis:e,distance:S}),!l.current&&F<1?o.current=requestAnimationFrame(b):(typeof t=="function"&&t(),s.current=0,o.current=0,E())}b()},[e,u,n,a,i,t,h]),g=()=>{r&&(l.current=!0)};return vZ("wheel",g,{passive:!0}),vZ("touchmove",g,{passive:!0}),C.useEffect(()=>E,[]),{scrollableRef:c,targetRef:d,scrollIntoView:m,cancel:E}}const iFt={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function rFt(){const u=C.useRef(0),e=C.useRef(null),[t,n]=C.useState(iFt),i=C.useMemo(()=>typeof window<"u"?new ResizeObserver(r=>{const a=r[0];a&&(cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{e.current&&n(a.contentRect)}))}):null,[]);return _I(()=>(e.current&&(i.observe(e.current),n(e.current.getBoundingClientRect())),()=>{i.disconnect(),u.current&&cancelAnimationFrame(u.current)}),[e.current]),[e,t]}function aFt(){const[u,{width:e,height:t}]=rFt();return{ref:u,width:e,height:t}}function T1e(){if(typeof window>"u")return"undetermined";const{userAgent:u}=window.navigator,e=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,t=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return e.test(u)?"macos":n.test(u)?"ios":t.test(u)?"windows":/Android/i.test(u)?"android":/Linux/i.test(u)?"linux":"undetermined"}function oFt(u={getValueInEffect:!0}){const[e,t]=C.useState(u.getValueInEffect?"undetermined":T1e());return _I(()=>{u.getValueInEffect&&t(T1e)},[]),e}function Un(u=!1,e){const{onOpen:t,onClose:n}=e||{},[i,r]=C.useState(u),a=C.useCallback(()=>{r(l=>l||(t==null||t(),!0))},[t]),o=C.useCallback(()=>{r(l=>l&&(n==null||n(),!1))},[n]),s=C.useCallback(()=>{i?o():a()},[o,a,i]);return[i,{open:a,close:o,toggle:s}]}const IL={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[sFt,OL]=U1(IL.context);function lFt({children:u,multiple:e,value:t,defaultValue:n,onChange:i,id:r,loop:a,transitionDuration:o,disableChevronRotation:s,chevronPosition:l,chevronSize:c,order:d,chevron:h,variant:E,radius:m,classNames:g,styles:f,unstyled:p}){const D=Jl(r),[x,b]=fs({value:t,defaultValue:n,finalValue:e?[]:null,onChange:i}),k=F=>Array.isArray(x)?x.includes(F):F===x,A=F=>{const S=Array.isArray(x)?x.includes(F)?x.filter(w=>w!==F):[...x,F]:F===x?null:F;b(S)};return M.createElement(sFt,{value:{isItemActive:k,onChange:A,getControlId:NL(`${D}-control`,IL.value),getRegionId:NL(`${D}-panel`,IL.value),transitionDuration:o,disableChevronRotation:s,chevronPosition:l,chevronSize:c,order:d,chevron:h,loop:a,variant:E,radius:m,classNames:g,styles:f,unstyled:p}},u)}const[cFt,l_e]=U1(IL.itemContext);function dFt(u,e,{radius:t}){const n=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3],i=u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],r=u.fn.radius(t);return e==="default"?{color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,borderBottom:`${G(1)} solid ${n}`}:e==="contained"?{border:`${G(1)} solid ${n}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:i},"&:first-of-type":{borderTopRightRadius:r,borderTopLeftRadius:r,"& > [data-accordion-control]":{borderTopRightRadius:r,borderTopLeftRadius:r}},"&:last-of-type":{borderBottomRightRadius:r,borderBottomLeftRadius:r,"& > [data-accordion-control]":{borderBottomRightRadius:r,borderBottomLeftRadius:r}},"& + &":{borderTop:0}}:e==="filled"?{borderRadius:r,"&[data-active]":{backgroundColor:i}}:e==="separated"?{borderRadius:r,backgroundColor:i,border:`${G(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:u.spacing.md},"&[data-active]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderColor:n}}:{}}var hFt=at((u,e,{variant:t})=>({item:dFt(u,t,e)}));const EFt=hFt;var N1e=Object.getOwnPropertySymbols,mFt=Object.prototype.hasOwnProperty,gFt=Object.prototype.propertyIsEnumerable,fFt=(u,e)=>{var t={};for(var n in u)mFt.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&N1e)for(var n of N1e(u))e.indexOf(n)<0&&gFt.call(u,n)&&(t[n]=u[n]);return t};function w4(u){const e=u,{m:t,mx:n,my:i,mt:r,mb:a,ml:o,mr:s,p:l,px:c,py:d,pt:h,pb:E,pl:m,pr:g,bg:f,c:p,opacity:D,ff:x,fz:b,fw:k,lts:A,ta:F,lh:S,fs:w,tt:z,td:N,w:O,miw:y,maw:_,h:L,mih:T,mah:R,bgsz:I,bgp:H,bgr:V,bga:U,pos:J,top:Y,left:X,bottom:re,right:ge,inset:_e,display:Ve}=e,Ue=fFt(e,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Y9e({m:t,mx:n,my:i,mt:r,mb:a,ml:o,mr:s,p:l,px:c,py:d,pt:h,pb:E,pl:m,pr:g,bg:f,c:p,opacity:D,ff:x,fz:b,fw:k,lts:A,ta:F,lh:S,fs:w,tt:z,td:N,w:O,miw:y,maw:_,h:L,mih:T,mah:R,bgsz:I,bgp:H,bgr:V,bga:U,pos:J,top:Y,left:X,bottom:re,right:ge,inset:_e,display:Ve}),rest:Ue}}function pFt(u,e){const t=Object.keys(u).filter(n=>n!=="base").sort((n,i)=>Xs(ye({size:n,sizes:e.breakpoints}))-Xs(ye({size:i,sizes:e.breakpoints})));return"base"in u?["base",...t]:t}function DFt({value:u,theme:e,getValue:t,property:n}){if(u==null)return;if(typeof u=="object")return pFt(u,e).reduce((a,o)=>{if(o==="base"&&u.base!==void 0){const l=t(u.base,e);return Array.isArray(n)?(n.forEach(c=>{a[c]=l}),a):(a[n]=l,a)}const s=t(u[o],e);return Array.isArray(n)?(a[e.fn.largerThan(o)]={},n.forEach(l=>{a[e.fn.largerThan(o)][l]=s}),a):(a[e.fn.largerThan(o)]={[n]:s},a)},{});const i=t(u,e);return Array.isArray(n)?n.reduce((r,a)=>(r[a]=i,r),{}):{[n]:i}}function xFt(u,e){return u==="dimmed"?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.fn.variant({variant:"filled",color:u,primaryFallback:!1}).background}function vFt(u){return G(u)}function CFt(u){return u}function bFt(u,e){return ye({size:u,sizes:e.fontSizes})}const kFt=["-xs","-sm","-md","-lg","-xl"];function FFt(u,e){return kFt.includes(u)?`calc(${ye({size:u.replace("-",""),sizes:e.spacing})} * -1)`:ye({size:u,sizes:e.spacing})}const yFt={identity:CFt,color:xFt,size:vFt,fontSize:bFt,spacing:FFt},AFt={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var _Ft=Object.defineProperty,P1e=Object.getOwnPropertySymbols,SFt=Object.prototype.hasOwnProperty,BFt=Object.prototype.propertyIsEnumerable,R1e=(u,e,t)=>e in u?_Ft(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,I1e=(u,e)=>{for(var t in e||(e={}))SFt.call(e,t)&&R1e(u,t,e[t]);if(P1e)for(var t of P1e(e))BFt.call(e,t)&&R1e(u,t,e[t]);return u};function CZ(u,e,t=AFt){return Object.keys(t).reduce((i,r)=>(r in u&&u[r]!==void 0&&i.push(DFt({value:u[r],getValue:yFt[t[r].type],property:t[r].property,theme:e})),i),[]).reduce((i,r)=>(Object.keys(r).forEach(a=>{typeof r[a]=="object"&&r[a]!==null&&a in i?i[a]=I1e(I1e({},i[a]),r[a]):i[a]=r[a]}),i),{})}function O1e(u,e){return typeof u=="function"?u(e):u}function wFt(u,e,t){const n=jr(),{css:i,cx:r}=u_e();return Array.isArray(u)?r(t,i(CZ(e,n)),u.map(a=>i(O1e(a,n)))):r(t,i(O1e(u,n)),i(CZ(e,n)))}var LFt=Object.defineProperty,jL=Object.getOwnPropertySymbols,c_e=Object.prototype.hasOwnProperty,d_e=Object.prototype.propertyIsEnumerable,j1e=(u,e,t)=>e in u?LFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,zFt=(u,e)=>{for(var t in e||(e={}))c_e.call(e,t)&&j1e(u,t,e[t]);if(jL)for(var t of jL(e))d_e.call(e,t)&&j1e(u,t,e[t]);return u},MFt=(u,e)=>{var t={};for(var n in u)c_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&jL)for(var n of jL(u))e.indexOf(n)<0&&d_e.call(u,n)&&(t[n]=u[n]);return t};const h_e=C.forwardRef((u,e)=>{var t=u,{className:n,component:i,style:r,sx:a}=t,o=MFt(t,["className","component","style","sx"]);const{systemStyles:s,rest:l}=w4(o),c=i||"div";return M.createElement(c,zFt({ref:e,className:wFt(a,s,n),style:r},l))});h_e.displayName="@mantine/core/Box";const Ct=h_e;var TFt=Object.defineProperty,HL=Object.getOwnPropertySymbols,E_e=Object.prototype.hasOwnProperty,m_e=Object.prototype.propertyIsEnumerable,H1e=(u,e,t)=>e in u?TFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,NFt=(u,e)=>{for(var t in e||(e={}))E_e.call(e,t)&&H1e(u,t,e[t]);if(HL)for(var t of HL(e))m_e.call(e,t)&&H1e(u,t,e[t]);return u},PFt=(u,e)=>{var t={};for(var n in u)E_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&HL)for(var n of HL(u))e.indexOf(n)<0&&m_e.call(u,n)&&(t[n]=u[n]);return t};const RFt={},g_e=C.forwardRef((u,e)=>{const t=Qe("AccordionItem",RFt,u),{children:n,className:i,value:r}=t,a=PFt(t,["children","className","value"]),o=OL(),{classes:s,cx:l}=EFt({radius:o.radius},{name:"Accordion",classNames:o.classNames,styles:o.styles,unstyled:o.unstyled,variant:o.variant});return M.createElement(cFt,{value:{value:r}},M.createElement(Ct,NFt({ref:e,className:l(s.item,i),"data-active":o.isItemActive(r)||void 0},a),n))});g_e.displayName="@mantine/core/AccordionItem";var IFt=Object.defineProperty,OFt=Object.defineProperties,jFt=Object.getOwnPropertyDescriptors,V1e=Object.getOwnPropertySymbols,HFt=Object.prototype.hasOwnProperty,VFt=Object.prototype.propertyIsEnumerable,$1e=(u,e,t)=>e in u?IFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,S_=(u,e)=>{for(var t in e||(e={}))HFt.call(e,t)&&$1e(u,t,e[t]);if(V1e)for(var t of V1e(e))VFt.call(e,t)&&$1e(u,t,e[t]);return u},$Ft=(u,e)=>OFt(u,jFt(e));function KFt(u,e){return e==="default"||e==="contained"?u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]}):{}}var WFt=at((u,{transitionDuration:e,chevronPosition:t,chevronSize:n},{variant:i})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:t==="left"?0:u.spacing.sm,marginLeft:t==="left"?u.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${e}ms ease`,marginRight:t==="right"?0:u.spacing.sm,marginLeft:t==="right"?u.spacing.lg:0,width:G(n),minWidth:G(n),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:u.spacing.md,paddingBottom:u.spacing.md},itemTitle:{margin:0,padding:0},control:$Ft(S_(S_(S_({},u.fn.focusStyles()),u.fn.fontStyles()),KFt(u,i)),{width:"100%",display:"flex",alignItems:"center",flexDirection:t==="right"?"row-reverse":"row",paddingRight:u.spacing.md,paddingLeft:t==="right"?`calc(${u.spacing.md} + ${G(4)})`:u.spacing.xs,textAlign:"left",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&:disabled":S_({opacity:.4,cursor:"not-allowed"},u.fn.hover({backgroundColor:"transparent"}))})}));const GFt=WFt;var UFt=Object.defineProperty,qFt=Object.defineProperties,JFt=Object.getOwnPropertyDescriptors,K1e=Object.getOwnPropertySymbols,ZFt=Object.prototype.hasOwnProperty,YFt=Object.prototype.propertyIsEnumerable,W1e=(u,e,t)=>e in u?UFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,G1e=(u,e)=>{for(var t in e||(e={}))ZFt.call(e,t)&&W1e(u,t,e[t]);if(K1e)for(var t of K1e(e))YFt.call(e,t)&&W1e(u,t,e[t]);return u},QFt=(u,e)=>qFt(u,JFt(e)),XFt=at(u=>({root:QFt(G1e(G1e({},u.fn.focusStyles()),u.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:u.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,textDecoration:"none",boxSizing:"border-box"})}));const eyt=XFt;var tyt=Object.defineProperty,VL=Object.getOwnPropertySymbols,f_e=Object.prototype.hasOwnProperty,p_e=Object.prototype.propertyIsEnumerable,U1e=(u,e,t)=>e in u?tyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uyt=(u,e)=>{for(var t in e||(e={}))f_e.call(e,t)&&U1e(u,t,e[t]);if(VL)for(var t of VL(e))p_e.call(e,t)&&U1e(u,t,e[t]);return u},nyt=(u,e)=>{var t={};for(var n in u)f_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&VL)for(var n of VL(u))e.indexOf(n)<0&&p_e.call(u,n)&&(t[n]=u[n]);return t};const D_e=C.forwardRef((u,e)=>{const t=Qe("UnstyledButton",{},u),{className:n,component:i="button",unstyled:r,variant:a}=t,o=nyt(t,["className","component","unstyled","variant"]),{classes:s,cx:l}=eyt(null,{name:"UnstyledButton",unstyled:r,variant:a});return M.createElement(Ct,uyt({component:i,ref:e,className:l(s.root,n),type:i==="button"?"button":void 0},o))});D_e.displayName="@mantine/core/UnstyledButton";const L4=D_e;var iyt=Object.defineProperty,ryt=Object.defineProperties,ayt=Object.getOwnPropertyDescriptors,$L=Object.getOwnPropertySymbols,x_e=Object.prototype.hasOwnProperty,v_e=Object.prototype.propertyIsEnumerable,q1e=(u,e,t)=>e in u?iyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,oyt=(u,e)=>{for(var t in e||(e={}))x_e.call(e,t)&&q1e(u,t,e[t]);if($L)for(var t of $L(e))v_e.call(e,t)&&q1e(u,t,e[t]);return u},syt=(u,e)=>ryt(u,ayt(e)),lyt=(u,e)=>{var t={};for(var n in u)x_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&$L)for(var n of $L(u))e.indexOf(n)<0&&v_e.call(u,n)&&(t[n]=u[n]);return t};const cyt={},C_e=C.forwardRef((u,e)=>{const t=Qe("AccordionControl",cyt,u),{disabled:n,onKeyDown:i,onClick:r,chevron:a,children:o,className:s,icon:l}=t,c=lyt(t,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),d=OL(),{value:h}=l_e(),{classes:E,cx:m}=GFt({transitionDuration:d.transitionDuration,chevronPosition:d.chevronPosition,chevronSize:d.chevronSize,radius:d.radius},{name:"Accordion",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),g=d.isItemActive(h),f=typeof d.order=="number",p=`h${d.order}`,D=M.createElement(L4,syt(oyt({},c),{ref:e,"data-accordion-control":!0,disabled:n,className:m(E.control,s),onClick:x=>{r==null||r(x),d.onChange(h)},type:"button","data-active":g||void 0,"aria-expanded":g,"aria-controls":d.getRegionId(h),id:d.getControlId(h),unstyled:d.unstyled,onKeyDown:Pue({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:d.loop,orientation:"vertical",onKeyDown:i})}),M.createElement("span",{className:E.chevron,"data-rotate":!d.disableChevronRotation&&g||void 0},a||d.chevron),M.createElement("span",{className:E.label},o),l&&M.createElement("span",{className:E.icon},l));return f?M.createElement(p,{className:E.itemTitle},D):D});C_e.displayName="@mantine/core/AccordionControl";var dyt=Object.defineProperty,hyt=Object.defineProperties,Eyt=Object.getOwnPropertyDescriptors,J1e=Object.getOwnPropertySymbols,myt=Object.prototype.hasOwnProperty,gyt=Object.prototype.propertyIsEnumerable,Z1e=(u,e,t)=>e in u?dyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,fyt=(u,e)=>{for(var t in e||(e={}))myt.call(e,t)&&Z1e(u,t,e[t]);if(J1e)for(var t of J1e(e))gyt.call(e,t)&&Z1e(u,t,e[t]);return u},pyt=(u,e)=>hyt(u,Eyt(e)),Dyt=at((u,e)=>({panel:pyt(fyt({},u.fn.fontStyles()),{wordBreak:"break-word",lineHeight:u.lineHeight}),content:{padding:u.spacing.md,paddingTop:`calc(${u.spacing.xs} / 2)`}}));const xyt=Dyt;var vyt=Object.defineProperty,Cyt=Object.defineProperties,byt=Object.getOwnPropertyDescriptors,KL=Object.getOwnPropertySymbols,b_e=Object.prototype.hasOwnProperty,k_e=Object.prototype.propertyIsEnumerable,Y1e=(u,e,t)=>e in u?vyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Zg=(u,e)=>{for(var t in e||(e={}))b_e.call(e,t)&&Y1e(u,t,e[t]);if(KL)for(var t of KL(e))k_e.call(e,t)&&Y1e(u,t,e[t]);return u},LV=(u,e)=>Cyt(u,byt(e)),kyt=(u,e)=>{var t={};for(var n in u)b_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&KL)for(var n of KL(u))e.indexOf(n)<0&&k_e.call(u,n)&&(t[n]=u[n]);return t};function Fyt(u){if(!u||typeof u=="string")return 0;const e=u/36;return Math.round((4+15*e**.25+e/5)*10)}function zV(u){return u!=null&&u.current?u.current.scrollHeight:"auto"}const B_=typeof window<"u"&&window.requestAnimationFrame;function yyt({transitionDuration:u,transitionTimingFunction:e="ease",onTransitionEnd:t=()=>{},opened:n}){const i=C.useRef(null),r=0,a={display:"none",height:0,overflow:"hidden"},[o,s]=C.useState(n?{}:a),l=m=>{ns.flushSync(()=>s(m))},c=m=>{l(g=>Zg(Zg({},g),m))};function d(m){return{transition:`height ${u||Fyt(m)}ms ${e}`}}To(()=>{B_(n?()=>{c({willChange:"height",display:"block",overflow:"hidden"}),B_(()=>{const m=zV(i);c(LV(Zg({},d(m)),{height:m}))})}:()=>{const m=zV(i);c(LV(Zg({},d(m)),{willChange:"height",height:m})),B_(()=>c({height:r,overflow:"hidden"}))})},[n]);const h=m=>{if(!(m.target!==i.current||m.propertyName!=="height"))if(n){const g=zV(i);g===o.height?l({}):c({height:g}),t()}else o.height===r&&(l(a),t())};function E(m={}){var g=m,{style:f={},refKey:p="ref"}=g,D=kyt(g,["style","refKey"]);const x=D[p];return LV(Zg({"aria-hidden":!n},D),{[p]:o_e(i,x),onTransitionEnd:h,style:Zg(Zg({boxSizing:"border-box"},f),o)})}return E}var Ayt=Object.defineProperty,WL=Object.getOwnPropertySymbols,F_e=Object.prototype.hasOwnProperty,y_e=Object.prototype.propertyIsEnumerable,Q1e=(u,e,t)=>e in u?Ayt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,w_=(u,e)=>{for(var t in e||(e={}))F_e.call(e,t)&&Q1e(u,t,e[t]);if(WL)for(var t of WL(e))y_e.call(e,t)&&Q1e(u,t,e[t]);return u},_yt=(u,e)=>{var t={};for(var n in u)F_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&WL)for(var n of WL(u))e.indexOf(n)<0&&y_e.call(u,n)&&(t[n]=u[n]);return t};const Syt={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},A_e=C.forwardRef((u,e)=>{const t=Qe("Collapse",Syt,u),{children:n,in:i,transitionDuration:r,transitionTimingFunction:a,style:o,onTransitionEnd:s,animateOpacity:l}=t,c=_yt(t,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),d=jr(),h=QA(),m=(d.respectReducedMotion?h:!1)?0:r,{systemStyles:g,rest:f}=w4(c),p=yyt({opened:i,transitionDuration:m,transitionTimingFunction:a,onTransitionEnd:s});return m===0?i?M.createElement(Ct,w_({},f),n):null:M.createElement(Ct,w_({},p(w_(w_({style:o,ref:e},f),g))),M.createElement("div",{style:{opacity:i||!l?1:0,transition:l?`opacity ${m}ms ${a}`:"none"}},n))});A_e.displayName="@mantine/core/Collapse";var Byt=Object.defineProperty,wyt=Object.defineProperties,Lyt=Object.getOwnPropertyDescriptors,GL=Object.getOwnPropertySymbols,__e=Object.prototype.hasOwnProperty,S_e=Object.prototype.propertyIsEnumerable,X1e=(u,e,t)=>e in u?Byt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,zyt=(u,e)=>{for(var t in e||(e={}))__e.call(e,t)&&X1e(u,t,e[t]);if(GL)for(var t of GL(e))S_e.call(e,t)&&X1e(u,t,e[t]);return u},Myt=(u,e)=>wyt(u,Lyt(e)),Tyt=(u,e)=>{var t={};for(var n in u)__e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&GL)for(var n of GL(u))e.indexOf(n)<0&&S_e.call(u,n)&&(t[n]=u[n]);return t};const Nyt={};function B_e(u){const e=Qe("AccordionPanel",Nyt,u),{children:t,className:n}=e,i=Tyt(e,["children","className"]),r=OL(),{value:a}=l_e(),{classNames:o,styles:s,unstyled:l}=OL(),{classes:c,cx:d}=xyt({radius:r.radius},{name:"Accordion",classNames:o,styles:s,unstyled:l,variant:r.variant});return M.createElement(A_e,Myt(zyt({},i),{className:d(c.panel,n),in:r.isItemActive(a),transitionDuration:r.transitionDuration,role:"region",id:r.getRegionId(a),"aria-labelledby":r.getControlId(a)}),M.createElement("div",{className:c.content},t))}B_e.displayName="@mantine/core/AccordionPanel";var Pyt=Object.defineProperty,UL=Object.getOwnPropertySymbols,w_e=Object.prototype.hasOwnProperty,L_e=Object.prototype.propertyIsEnumerable,ehe=(u,e,t)=>e in u?Pyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,the=(u,e)=>{for(var t in e||(e={}))w_e.call(e,t)&&ehe(u,t,e[t]);if(UL)for(var t of UL(e))L_e.call(e,t)&&ehe(u,t,e[t]);return u},Ryt=(u,e)=>{var t={};for(var n in u)w_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&UL)for(var n of UL(u))e.indexOf(n)<0&&L_e.call(u,n)&&(t[n]=u[n]);return t};function Iyt(u){const e=u,{style:t}=e,n=Ryt(e,["style"]);return M.createElement("svg",the({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:the({width:G(16),height:G(16)},t)},n),M.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Oyt=Object.defineProperty,jyt=Object.defineProperties,Hyt=Object.getOwnPropertyDescriptors,qL=Object.getOwnPropertySymbols,z_e=Object.prototype.hasOwnProperty,M_e=Object.prototype.propertyIsEnumerable,uhe=(u,e,t)=>e in u?Oyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Vyt=(u,e)=>{for(var t in e||(e={}))z_e.call(e,t)&&uhe(u,t,e[t]);if(qL)for(var t of qL(e))M_e.call(e,t)&&uhe(u,t,e[t]);return u},$yt=(u,e)=>jyt(u,Hyt(e)),Kyt=(u,e)=>{var t={};for(var n in u)z_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qL)for(var n of qL(u))e.indexOf(n)<0&&M_e.call(u,n)&&(t[n]=u[n]);return t};const Wyt={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:M.createElement(Iyt,null)};function nn(u){const e=Qe("Accordion",Wyt,u),{id:t,loop:n,children:i,multiple:r,value:a,defaultValue:o,onChange:s,transitionDuration:l,disableChevronRotation:c,chevronPosition:d,chevronSize:h,order:E,chevron:m,classNames:g,styles:f,unstyled:p,variant:D,radius:x}=e,b=Kyt(e,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return M.createElement(lFt,{id:t,multiple:r,value:a,defaultValue:o,onChange:s,loop:n,transitionDuration:l,disableChevronRotation:c,chevronPosition:d,chevronSize:h,order:E,chevron:m,variant:D,radius:x,classNames:g,styles:f,unstyled:p},M.createElement(Ct,$yt(Vyt({},b),{"data-accordion":!0}),i))}nn.Item=g_e;nn.Control=C_e;nn.Panel=B_e;nn.displayName="@mantine/core/Accordion";var Gyt=Object.defineProperty,Uyt=Object.defineProperties,qyt=Object.getOwnPropertyDescriptors,nhe=Object.getOwnPropertySymbols,Jyt=Object.prototype.hasOwnProperty,Zyt=Object.prototype.propertyIsEnumerable,ihe=(u,e,t)=>e in u?Gyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bZ=(u,e)=>{for(var t in e||(e={}))Jyt.call(e,t)&&ihe(u,t,e[t]);if(nhe)for(var t of nhe(e))Zyt.call(e,t)&&ihe(u,t,e[t]);return u},rhe=(u,e)=>Uyt(u,qyt(e));const Yyt=["subtle","filled","outline","light","default","transparent","gradient"],L_={xs:G(18),sm:G(22),md:G(28),lg:G(34),xl:G(44)};function Qyt({variant:u,theme:e,color:t,gradient:n}){const i=e.fn.variant({color:t,variant:u,gradient:n});return u==="gradient"?{border:0,backgroundImage:i.background,color:i.color,"&:hover":e.fn.hover({backgroundSize:"200%"})}:Yyt.includes(u)?bZ({border:`${G(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover})):null}var Xyt=at((u,{radius:e,color:t,gradient:n},{variant:i,size:r})=>({root:rhe(bZ({position:"relative",borderRadius:u.fn.radius(e),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:ye({size:r,sizes:L_}),minHeight:ye({size:r,sizes:L_}),width:ye({size:r,sizes:L_}),minWidth:ye({size:r,sizes:L_})},Qyt({variant:i,theme:u,color:t,gradient:n})),{"&:active":u.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:u.colors.gray[u.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:i==="transparent"?void 0:u.fn.themeColor("gray",u.colorScheme==="dark"?8:1),borderColor:i==="transparent"?void 0:u.fn.themeColor("gray",u.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":rhe(bZ({content:'""'},u.fn.cover(G(-1))),{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:u.fn.radius(e),cursor:"not-allowed"})}})}));const eAt=Xyt;var tAt=Object.defineProperty,JL=Object.getOwnPropertySymbols,T_e=Object.prototype.hasOwnProperty,N_e=Object.prototype.propertyIsEnumerable,ahe=(u,e,t)=>e in u?tAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ohe=(u,e)=>{for(var t in e||(e={}))T_e.call(e,t)&&ahe(u,t,e[t]);if(JL)for(var t of JL(e))N_e.call(e,t)&&ahe(u,t,e[t]);return u},she=(u,e)=>{var t={};for(var n in u)T_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&JL)for(var n of JL(u))e.indexOf(n)<0&&N_e.call(u,n)&&(t[n]=u[n]);return t};function uAt(u){var e=u,{size:t,color:n}=e,i=she(e,["size","color"]);const r=i,{style:a}=r,o=she(r,["style"]);return M.createElement("svg",ohe({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:ohe({width:t},a)},o),M.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var nAt=Object.defineProperty,ZL=Object.getOwnPropertySymbols,P_e=Object.prototype.hasOwnProperty,R_e=Object.prototype.propertyIsEnumerable,lhe=(u,e,t)=>e in u?nAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,che=(u,e)=>{for(var t in e||(e={}))P_e.call(e,t)&&lhe(u,t,e[t]);if(ZL)for(var t of ZL(e))R_e.call(e,t)&&lhe(u,t,e[t]);return u},dhe=(u,e)=>{var t={};for(var n in u)P_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ZL)for(var n of ZL(u))e.indexOf(n)<0&&R_e.call(u,n)&&(t[n]=u[n]);return t};function iAt(u){var e=u,{size:t,color:n}=e,i=dhe(e,["size","color"]);const r=i,{style:a}=r,o=dhe(r,["style"]);return M.createElement("svg",che({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:che({width:t,height:t},a)},o),M.createElement("g",{fill:"none",fillRule:"evenodd"},M.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},M.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),M.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},M.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var rAt=Object.defineProperty,YL=Object.getOwnPropertySymbols,I_e=Object.prototype.hasOwnProperty,O_e=Object.prototype.propertyIsEnumerable,hhe=(u,e,t)=>e in u?rAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ehe=(u,e)=>{for(var t in e||(e={}))I_e.call(e,t)&&hhe(u,t,e[t]);if(YL)for(var t of YL(e))O_e.call(e,t)&&hhe(u,t,e[t]);return u},mhe=(u,e)=>{var t={};for(var n in u)I_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&YL)for(var n of YL(u))e.indexOf(n)<0&&O_e.call(u,n)&&(t[n]=u[n]);return t};function aAt(u){var e=u,{size:t,color:n}=e,i=mhe(e,["size","color"]);const r=i,{style:a}=r,o=mhe(r,["style"]);return M.createElement("svg",Ehe({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Ehe({width:t},a)},o),M.createElement("circle",{cx:"15",cy:"15",r:"15"},M.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},M.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("circle",{cx:"105",cy:"15",r:"15"},M.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var oAt=Object.defineProperty,QL=Object.getOwnPropertySymbols,j_e=Object.prototype.hasOwnProperty,H_e=Object.prototype.propertyIsEnumerable,ghe=(u,e,t)=>e in u?oAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,sAt=(u,e)=>{for(var t in e||(e={}))j_e.call(e,t)&&ghe(u,t,e[t]);if(QL)for(var t of QL(e))H_e.call(e,t)&&ghe(u,t,e[t]);return u},lAt=(u,e)=>{var t={};for(var n in u)j_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&QL)for(var n of QL(u))e.indexOf(n)<0&&H_e.call(u,n)&&(t[n]=u[n]);return t};const MV={bars:uAt,oval:iAt,dots:aAt},cAt={xs:G(18),sm:G(22),md:G(36),lg:G(44),xl:G(58)},dAt={size:"md"};function Vv(u){const e=Qe("Loader",dAt,u),{size:t,color:n,variant:i}=e,r=lAt(e,["size","color","variant"]),a=jr(),o=i in MV?i:a.loader;return M.createElement(Ct,sAt({role:"presentation",component:MV[o]||MV.bars,size:ye({size:t,sizes:cAt}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},r))}Vv.displayName="@mantine/core/Loader";var hAt=Object.defineProperty,XL=Object.getOwnPropertySymbols,V_e=Object.prototype.hasOwnProperty,$_e=Object.prototype.propertyIsEnumerable,fhe=(u,e,t)=>e in u?hAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,phe=(u,e)=>{for(var t in e||(e={}))V_e.call(e,t)&&fhe(u,t,e[t]);if(XL)for(var t of XL(e))$_e.call(e,t)&&fhe(u,t,e[t]);return u},EAt=(u,e)=>{var t={};for(var n in u)V_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&XL)for(var n of XL(u))e.indexOf(n)<0&&$_e.call(u,n)&&(t[n]=u[n]);return t};const mAt={color:"gray",size:"md",variant:"subtle"},K_e=C.forwardRef((u,e)=>{const t=Qe("ActionIcon",mAt,u),{className:n,color:i,children:r,radius:a,size:o,variant:s,gradient:l,disabled:c,loaderProps:d,loading:h,unstyled:E,__staticSelector:m}=t,g=EAt(t,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:f,cx:p,theme:D}=eAt({radius:a,color:i,gradient:l},{name:["ActionIcon",m],unstyled:E,size:o,variant:s}),x=M.createElement(Vv,phe({color:D.fn.variant({color:i,variant:s}).color,size:"100%","data-action-icon-loader":!0},d));return M.createElement(L4,phe({className:p(f.root,n),ref:e,disabled:c,"data-disabled":c||void 0,"data-loading":h||void 0,unstyled:E},g),h?x:r)});K_e.displayName="@mantine/core/ActionIcon";const Uu=K_e;var gAt=Object.defineProperty,fAt=Object.defineProperties,pAt=Object.getOwnPropertyDescriptors,ez=Object.getOwnPropertySymbols,W_e=Object.prototype.hasOwnProperty,G_e=Object.prototype.propertyIsEnumerable,Dhe=(u,e,t)=>e in u?gAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DAt=(u,e)=>{for(var t in e||(e={}))W_e.call(e,t)&&Dhe(u,t,e[t]);if(ez)for(var t of ez(e))G_e.call(e,t)&&Dhe(u,t,e[t]);return u},xAt=(u,e)=>fAt(u,pAt(e)),vAt=(u,e)=>{var t={};for(var n in u)W_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ez)for(var n of ez(u))e.indexOf(n)<0&&G_e.call(u,n)&&(t[n]=u[n]);return t};function Zue(u){const e=Qe("Portal",{},u),{children:t,target:n,className:i,innerRef:r}=e,a=vAt(e,["children","target","className","innerRef"]),o=jr(),[s,l]=C.useState(!1),c=C.useRef();return _I(()=>(l(!0),c.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(c.current),()=>{!n&&document.body.removeChild(c.current)}),[n]),s?ns.createPortal(M.createElement("div",xAt(DAt({className:i,dir:o.dir},a),{ref:r}),t),c.current):null}Zue.displayName="@mantine/core/Portal";var CAt=Object.defineProperty,tz=Object.getOwnPropertySymbols,U_e=Object.prototype.hasOwnProperty,q_e=Object.prototype.propertyIsEnumerable,xhe=(u,e,t)=>e in u?CAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bAt=(u,e)=>{for(var t in e||(e={}))U_e.call(e,t)&&xhe(u,t,e[t]);if(tz)for(var t of tz(e))q_e.call(e,t)&&xhe(u,t,e[t]);return u},kAt=(u,e)=>{var t={};for(var n in u)U_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&tz)for(var n of tz(u))e.indexOf(n)<0&&q_e.call(u,n)&&(t[n]=u[n]);return t};function XA(u){var e=u,{withinPortal:t=!0,children:n}=e,i=kAt(e,["withinPortal","children"]);return t?M.createElement(Zue,bAt({},i),n):M.createElement(M.Fragment,null,n)}XA.displayName="@mantine/core/OptionalPortal";var FAt=Object.defineProperty,uz=Object.getOwnPropertySymbols,J_e=Object.prototype.hasOwnProperty,Z_e=Object.prototype.propertyIsEnumerable,vhe=(u,e,t)=>e in u?FAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Che=(u,e)=>{for(var t in e||(e={}))J_e.call(e,t)&&vhe(u,t,e[t]);if(uz)for(var t of uz(e))Z_e.call(e,t)&&vhe(u,t,e[t]);return u},yAt=(u,e)=>{var t={};for(var n in u)J_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uz)for(var n of uz(u))e.indexOf(n)<0&&Z_e.call(u,n)&&(t[n]=u[n]);return t};function Y_e(u){const e=u,{width:t,height:n,style:i}=e,r=yAt(e,["width","height","style"]);return M.createElement("svg",Che({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Che({width:t,height:n},i)},r),M.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}Y_e.displayName="@mantine/core/CloseIcon";var AAt=Object.defineProperty,nz=Object.getOwnPropertySymbols,Q_e=Object.prototype.hasOwnProperty,X_e=Object.prototype.propertyIsEnumerable,bhe=(u,e,t)=>e in u?AAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_At=(u,e)=>{for(var t in e||(e={}))Q_e.call(e,t)&&bhe(u,t,e[t]);if(nz)for(var t of nz(e))X_e.call(e,t)&&bhe(u,t,e[t]);return u},SAt=(u,e)=>{var t={};for(var n in u)Q_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nz)for(var n of nz(u))e.indexOf(n)<0&&X_e.call(u,n)&&(t[n]=u[n]);return t};const BAt={xs:G(12),sm:G(16),md:G(20),lg:G(28),xl:G(34)},wAt={size:"sm"},eSe=C.forwardRef((u,e)=>{const t=Qe("CloseButton",wAt,u),{iconSize:n,size:i,children:r}=t,a=SAt(t,["iconSize","size","children"]),o=G(n||BAt[i]);return M.createElement(Uu,_At({ref:e,__staticSelector:"CloseButton",size:i},a),r||M.createElement(Y_e,{width:o,height:o}))});eSe.displayName="@mantine/core/CloseButton";const SI=eSe;var LAt=Object.defineProperty,zAt=Object.defineProperties,MAt=Object.getOwnPropertyDescriptors,khe=Object.getOwnPropertySymbols,TAt=Object.prototype.hasOwnProperty,NAt=Object.prototype.propertyIsEnumerable,Fhe=(u,e,t)=>e in u?LAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,z_=(u,e)=>{for(var t in e||(e={}))TAt.call(e,t)&&Fhe(u,t,e[t]);if(khe)for(var t of khe(e))NAt.call(e,t)&&Fhe(u,t,e[t]);return u},PAt=(u,e)=>zAt(u,MAt(e));function RAt({underline:u,strikethrough:e}){const t=[];return u&&t.push("underline"),e&&t.push("line-through"),t.length>0?t.join(" "):"none"}function IAt({theme:u,color:e}){return e==="dimmed"?u.fn.dimmed():typeof e=="string"&&(e in u.colors||e.split(".")[0]in u.colors)?u.fn.variant({variant:"filled",color:e}).background:e||"inherit"}function OAt(u){return typeof u=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:u,WebkitBoxOrient:"vertical"}:null}function jAt({theme:u,truncate:e}){return e==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:u.dir==="ltr"?"rtl":"ltr",textAlign:u.dir==="ltr"?"right":"left"}:e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var HAt=at((u,{color:e,lineClamp:t,truncate:n,inline:i,inherit:r,underline:a,gradient:o,weight:s,transform:l,align:c,strikethrough:d,italic:h},{size:E})=>{const m=u.fn.variant({variant:"gradient",gradient:o});return{root:PAt(z_(z_(z_(z_({},u.fn.fontStyles()),u.fn.focusStyles()),OAt(t)),jAt({theme:u,truncate:n})),{color:IAt({color:e,theme:u}),fontFamily:r?"inherit":u.fontFamily,fontSize:r||E===void 0?"inherit":ye({size:E,sizes:u.fontSizes}),lineHeight:r?"inherit":i?1:u.lineHeight,textDecoration:RAt({underline:a,strikethrough:d}),WebkitTapHighlightColor:"transparent",fontWeight:r?"inherit":s,textTransform:l,textAlign:c,fontStyle:h?"italic":void 0}),gradient:{backgroundImage:m.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const VAt=HAt;var $At=Object.defineProperty,iz=Object.getOwnPropertySymbols,tSe=Object.prototype.hasOwnProperty,uSe=Object.prototype.propertyIsEnumerable,yhe=(u,e,t)=>e in u?$At(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KAt=(u,e)=>{for(var t in e||(e={}))tSe.call(e,t)&&yhe(u,t,e[t]);if(iz)for(var t of iz(e))uSe.call(e,t)&&yhe(u,t,e[t]);return u},WAt=(u,e)=>{var t={};for(var n in u)tSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iz)for(var n of iz(u))e.indexOf(n)<0&&uSe.call(u,n)&&(t[n]=u[n]);return t};const GAt={variant:"text"},nSe=C.forwardRef((u,e)=>{const t=Qe("Text",GAt,u),{className:n,size:i,weight:r,transform:a,color:o,align:s,variant:l,lineClamp:c,truncate:d,gradient:h,inline:E,inherit:m,underline:g,strikethrough:f,italic:p,classNames:D,styles:x,unstyled:b,span:k,__staticSelector:A}=t,F=WAt(t,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:S,cx:w}=VAt({color:o,lineClamp:c,truncate:d,inline:E,inherit:m,underline:g,strikethrough:f,italic:p,weight:r,transform:a,align:s,gradient:h},{unstyled:b,name:A||"Text",variant:l,size:i});return M.createElement(Ct,KAt({ref:e,className:w(S.root,{[S.gradient]:l==="gradient"},n),component:k?"span":"div"},F))});nSe.displayName="@mantine/core/Text";const _u=nSe;var UAt=Object.defineProperty,Ahe=Object.getOwnPropertySymbols,qAt=Object.prototype.hasOwnProperty,JAt=Object.prototype.propertyIsEnumerable,_he=(u,e,t)=>e in u?UAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZAt=(u,e)=>{for(var t in e||(e={}))qAt.call(e,t)&&_he(u,t,e[t]);if(Ahe)for(var t of Ahe(e))JAt.call(e,t)&&_he(u,t,e[t]);return u};function YAt({theme:u,color:e}){return e==="dimmed"?u.fn.dimmed():u.fn.themeColor(e||u.primaryColor,u.colorScheme==="dark"?4:7,!1,!0)}var QAt=at((u,{color:e,underline:t})=>({root:ZAt({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:YAt({theme:u,color:e})},u.fn.hover({textDecoration:t?"underline":"none"}))}));const XAt=QAt;var e7t=Object.defineProperty,rz=Object.getOwnPropertySymbols,iSe=Object.prototype.hasOwnProperty,rSe=Object.prototype.propertyIsEnumerable,She=(u,e,t)=>e in u?e7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Bhe=(u,e)=>{for(var t in e||(e={}))iSe.call(e,t)&&She(u,t,e[t]);if(rz)for(var t of rz(e))rSe.call(e,t)&&She(u,t,e[t]);return u},t7t=(u,e)=>{var t={};for(var n in u)iSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rz)for(var n of rz(u))e.indexOf(n)<0&&rSe.call(u,n)&&(t[n]=u[n]);return t};const u7t={underline:!0},aSe=C.forwardRef((u,e)=>{const t=Qe("Anchor",u7t,u),{component:n,className:i,unstyled:r,variant:a,size:o,color:s,underline:l}=t,c=t7t(t,["component","className","unstyled","variant","size","color","underline"]),{classes:d,cx:h}=XAt({color:s,underline:l},{name:"Anchor",unstyled:r,variant:a,size:o}),E=n==="button"?{type:"button"}:null;return M.createElement(_u,Bhe(Bhe({component:n||"a",ref:e,className:h(d.root,i),size:o},E),c))});aSe.displayName="@mantine/core/Anchor";const f3=aSe,oSe=C.createContext({zIndex:1e3,fixed:!1,layout:"default"}),n7t=oSe.Provider;function i7t(){return C.useContext(oSe)}function sSe(u,e){if(!u)return[];const t=Object.keys(u).filter(n=>n!=="base").map(n=>[ye({size:n,sizes:e.breakpoints,units:"em"}),u[n]]);return t.sort((n,i)=>Xs(n[0])-Xs(i[0])),t}var r7t=Object.defineProperty,a7t=Object.defineProperties,o7t=Object.getOwnPropertyDescriptors,whe=Object.getOwnPropertySymbols,s7t=Object.prototype.hasOwnProperty,l7t=Object.prototype.propertyIsEnumerable,Lhe=(u,e,t)=>e in u?r7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TV=(u,e)=>{for(var t in e||(e={}))s7t.call(e,t)&&Lhe(u,t,e[t]);if(whe)for(var t of whe(e))l7t.call(e,t)&&Lhe(u,t,e[t]);return u},zhe=(u,e)=>a7t(u,o7t(e)),c7t=at((u,{height:e,fixed:t,position:n,zIndex:i,borderPosition:r,layout:a})=>{const o=typeof e=="object"&&e!==null?sSe(e,u).reduce((s,[l,c])=>(s[`@media (min-width: ${wl(l)})`]={height:G(c),minHeight:G(c)},s),{}):null;return{root:zhe(TV(zhe(TV(TV({},u.fn.fontStyles()),n),{zIndex:i,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof e=="object"?G(e==null?void 0:e.base)||"100%":G(e),maxHeight:typeof e=="object"?G(e==null?void 0:e.base)||"100%":G(e),position:t?"fixed":"static",boxSizing:"border-box",backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white}),o),{borderBottom:r==="bottom"?`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[2]}`:void 0,borderTop:r==="top"?`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[2]}`:void 0})}});const d7t=c7t;var h7t=Object.defineProperty,az=Object.getOwnPropertySymbols,lSe=Object.prototype.hasOwnProperty,cSe=Object.prototype.propertyIsEnumerable,Mhe=(u,e,t)=>e in u?h7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,The=(u,e)=>{for(var t in e||(e={}))lSe.call(e,t)&&Mhe(u,t,e[t]);if(az)for(var t of az(e))cSe.call(e,t)&&Mhe(u,t,e[t]);return u},E7t=(u,e)=>{var t={};for(var n in u)lSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&az)for(var n of az(u))e.indexOf(n)<0&&cSe.call(u,n)&&(t[n]=u[n]);return t};const Yue=C.forwardRef((u,e)=>{var t=u,{children:n,className:i,classNames:r,styles:a,height:o,fixed:s=!1,withBorder:l=!0,position:c,zIndex:d,section:h,unstyled:E,__staticSelector:m,variant:g}=t,f=E7t(t,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const p=i7t(),D=d||p.zIndex||fd("app"),{classes:x,cx:b,theme:k}=d7t({height:o,fixed:p.fixed||s,position:c,zIndex:typeof D=="number"&&p.layout==="default"?D+1:D,layout:p.layout,borderPosition:l?h==="header"?"bottom":"top":"none"},{name:m,classNames:r,styles:a,unstyled:E,variant:g}),A=typeof o=="object"&&o!==null?sSe(o,k).reduce((F,[S,w])=>(F[`@media (min-width: ${wl(S)})`]={[`--mantine-${h}-height`]:G(w)},F),{}):null;return M.createElement(Ct,The({component:h==="header"?"header":"footer",className:b(x.root,i),ref:e},f),n,M.createElement(Bkt,{styles:()=>({":root":The({[`--mantine-${h}-height`]:typeof o=="object"?G(o==null?void 0:o.base)||"100%":G(o)},A)})}))});Yue.displayName="@mantine/core/VerticalSection";var m7t=Object.defineProperty,g7t=Object.defineProperties,f7t=Object.getOwnPropertyDescriptors,Nhe=Object.getOwnPropertySymbols,p7t=Object.prototype.hasOwnProperty,D7t=Object.prototype.propertyIsEnumerable,Phe=(u,e,t)=>e in u?m7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,x7t=(u,e)=>{for(var t in e||(e={}))p7t.call(e,t)&&Phe(u,t,e[t]);if(Nhe)for(var t of Nhe(e))D7t.call(e,t)&&Phe(u,t,e[t]);return u},v7t=(u,e)=>g7t(u,f7t(e));const C7t={fixed:!1,position:{top:0,left:0,right:0}},dSe=C.forwardRef((u,e)=>{const t=Qe("Header",C7t,u);return M.createElement(Yue,v7t(x7t({section:"header",__staticSelector:"Header"},t),{ref:e}))});dSe.displayName="@mantine/core/Header";var b7t=Object.defineProperty,k7t=Object.defineProperties,F7t=Object.getOwnPropertyDescriptors,Rhe=Object.getOwnPropertySymbols,y7t=Object.prototype.hasOwnProperty,A7t=Object.prototype.propertyIsEnumerable,Ihe=(u,e,t)=>e in u?b7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_7t=(u,e)=>{for(var t in e||(e={}))y7t.call(e,t)&&Ihe(u,t,e[t]);if(Rhe)for(var t of Rhe(e))A7t.call(e,t)&&Ihe(u,t,e[t]);return u},S7t=(u,e)=>k7t(u,F7t(e));const B7t={fixed:!1,position:{bottom:0,left:0,right:0}},hSe=C.forwardRef((u,e)=>{const t=Qe("Footer",B7t,u);return M.createElement(Yue,S7t(_7t({section:"footer",__staticSelector:"Footer"},t),{ref:e}))});hSe.displayName="@mantine/core/Footer";var w7t=Object.defineProperty,Ohe=Object.getOwnPropertySymbols,L7t=Object.prototype.hasOwnProperty,z7t=Object.prototype.propertyIsEnumerable,jhe=(u,e,t)=>e in u?w7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ESe=(u,e)=>{for(var t in e||(e={}))L7t.call(e,t)&&jhe(u,t,e[t]);if(Ohe)for(var t of Ohe(e))z7t.call(e,t)&&jhe(u,t,e[t]);return u};function M7t(u,e){const t=ye({size:u.padding,sizes:e.spacing}),n=u.navbarOffsetBreakpoint?ye({size:u.navbarOffsetBreakpoint,sizes:e.breakpoints}):null,i=u.asideOffsetBreakpoint?ye({size:u.asideOffsetBreakpoint,sizes:e.breakpoints}):null;if(!u.fixed)return{padding:t};const r=Xs(n),a=Xs(i);return ESe({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${t})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${t})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${t})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${t})`},r===a?{[`@media (max-width: ${wl(r-1)})`]:{paddingLeft:t,paddingRight:t}}:{[`@media (max-width: ${wl(r-1)})`]:{paddingLeft:t},[`@media (max-width: ${wl(a-1)})`]:{paddingRight:t}})}var T7t=at((u,e)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:ESe({flex:1,width:"100vw",boxSizing:"border-box"},M7t(e,u))}));const N7t=T7t;var P7t=Object.defineProperty,oz=Object.getOwnPropertySymbols,mSe=Object.prototype.hasOwnProperty,gSe=Object.prototype.propertyIsEnumerable,Hhe=(u,e,t)=>e in u?P7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,R7t=(u,e)=>{for(var t in e||(e={}))mSe.call(e,t)&&Hhe(u,t,e[t]);if(oz)for(var t of oz(e))gSe.call(e,t)&&Hhe(u,t,e[t]);return u},I7t=(u,e)=>{var t={};for(var n in u)mSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oz)for(var n of oz(u))e.indexOf(n)<0&&gSe.call(u,n)&&(t[n]=u[n]);return t};const O7t={fixed:!0,padding:"md"},fSe=C.forwardRef((u,e)=>{const t=Qe("AppShell",O7t,u),{children:n,navbar:i,header:r,footer:a,aside:o,fixed:s,zIndex:l,padding:c,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:h,className:E,styles:m,classNames:g,unstyled:f,hidden:p,layout:D,variant:x}=t,b=I7t(t,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:k,cx:A}=N7t({padding:c,fixed:s,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:h},{styles:m,classNames:g,unstyled:f,name:"AppShell",variant:x});return p?M.createElement(M.Fragment,null,n):M.createElement(n7t,{value:{fixed:s,zIndex:l,layout:D}},M.createElement(Ct,R7t({className:A(k.root,E),ref:e},b),r,M.createElement("div",{className:k.body},i,M.createElement("main",{className:k.main},n),o),a))});fSe.displayName="@mantine/core/AppShell";const M_={xs:G(1),sm:G(2),md:G(3),lg:G(4),xl:G(5)};function T_(u,e){const t=u.fn.variant({variant:"outline",color:e}).border;return typeof e=="string"&&(e in u.colors||e.split(".")[0]in u.colors)?t:e===void 0?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]:e}var j7t=at((u,{color:e},{size:t,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:G(1),borderTop:`${ye({size:t,sizes:M_})} ${n} ${T_(u,e)}`,marginRight:u.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${ye({size:t,sizes:M_})} ${n} ${T_(u,e)}`,marginLeft:u.spacing.xs}},labelDefaultStyles:{color:e==="dark"?u.colors.dark[1]:u.fn.themeColor(e,u.colorScheme==="dark"?5:u.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:G(ye({size:t,sizes:M_})),borderTopColor:T_(u,e),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:G(ye({size:t,sizes:M_})),borderLeftColor:T_(u,e),borderLeftStyle:n}}));const H7t=j7t;var V7t=Object.defineProperty,$7t=Object.defineProperties,K7t=Object.getOwnPropertyDescriptors,sz=Object.getOwnPropertySymbols,pSe=Object.prototype.hasOwnProperty,DSe=Object.prototype.propertyIsEnumerable,Vhe=(u,e,t)=>e in u?V7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$he=(u,e)=>{for(var t in e||(e={}))pSe.call(e,t)&&Vhe(u,t,e[t]);if(sz)for(var t of sz(e))DSe.call(e,t)&&Vhe(u,t,e[t]);return u},W7t=(u,e)=>$7t(u,K7t(e)),G7t=(u,e)=>{var t={};for(var n in u)pSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&sz)for(var n of sz(u))e.indexOf(n)<0&&DSe.call(u,n)&&(t[n]=u[n]);return t};const U7t={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},lz=C.forwardRef((u,e)=>{const t=Qe("Divider",U7t,u),{className:n,color:i,orientation:r,size:a,label:o,labelPosition:s,labelProps:l,variant:c,styles:d,classNames:h,unstyled:E}=t,m=G7t(t,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:g,cx:f}=H7t({color:i},{classNames:h,styles:d,unstyled:E,name:"Divider",variant:c,size:a}),p=r==="vertical",D=r==="horizontal",x=!!o&&D,b=!(l!=null&&l.color);return M.createElement(Ct,$he({ref:e,className:f(g.root,{[g.vertical]:p,[g.horizontal]:D,[g.withLabel]:x},n),role:"separator"},m),x&&M.createElement(_u,W7t($he({},l),{size:(l==null?void 0:l.size)||"xs",mt:G(2),className:f(g.label,g[s],{[g.labelDefaultStyles]:b})}),o))});lz.displayName="@mantine/core/Divider";var q7t=Object.defineProperty,J7t=Object.defineProperties,Z7t=Object.getOwnPropertyDescriptors,Khe=Object.getOwnPropertySymbols,Y7t=Object.prototype.hasOwnProperty,Q7t=Object.prototype.propertyIsEnumerable,Whe=(u,e,t)=>e in u?q7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ghe=(u,e)=>{for(var t in e||(e={}))Y7t.call(e,t)&&Whe(u,t,e[t]);if(Khe)for(var t of Khe(e))Q7t.call(e,t)&&Whe(u,t,e[t]);return u},X7t=(u,e)=>J7t(u,Z7t(e)),e9t=at((u,e,{size:t})=>({item:X7t(Ghe({},u.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${ye({size:t,sizes:u.spacing})} / 1.5) ${ye({size:t,sizes:u.spacing})}`,cursor:"pointer",fontSize:ye({size:t,sizes:u.fontSizes}),color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,borderRadius:u.fn.radius(),"&[data-hovered]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[1]},"&[data-selected]":Ghe({backgroundColor:u.fn.variant({variant:"filled"}).background,color:u.fn.variant({variant:"filled"}).color},u.fn.hover({backgroundColor:u.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:u.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:u.colors.gray[6],paddingTop:`calc(${ye({size:t,sizes:u.spacing})} / 2)`,paddingBottom:`calc(${ye({size:t,sizes:u.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${ye({size:t,sizes:u.spacing})} / 1.5) ${ye({size:t,sizes:u.spacing})}`},separatorLabel:{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}}));const t9t=e9t;var u9t=Object.defineProperty,Uhe=Object.getOwnPropertySymbols,n9t=Object.prototype.hasOwnProperty,i9t=Object.prototype.propertyIsEnumerable,qhe=(u,e,t)=>e in u?u9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,r9t=(u,e)=>{for(var t in e||(e={}))n9t.call(e,t)&&qhe(u,t,e[t]);if(Uhe)for(var t of Uhe(e))i9t.call(e,t)&&qhe(u,t,e[t]);return u};function Que({data:u,hovered:e,classNames:t,styles:n,isItemSelected:i,uuid:r,__staticSelector:a,onItemHover:o,onItemSelect:s,itemsRefs:l,itemComponent:c,size:d,nothingFound:h,creatable:E,createLabel:m,unstyled:g,variant:f}){const{classes:p}=t9t(null,{classNames:t,styles:n,unstyled:g,name:a,variant:f,size:d}),D=[],x=[];let b=null;const k=(F,S)=>{const w=typeof i=="function"?i(F.value):!1;return M.createElement(c,r9t({key:F.value,className:p.item,"data-disabled":F.disabled||void 0,"data-hovered":!F.disabled&&e===S||void 0,"data-selected":!F.disabled&&w||void 0,selected:w,onMouseEnter:()=>o(S),id:`${r}-${S}`,role:"option",tabIndex:-1,"aria-selected":e===S,ref:z=>{l&&l.current&&(l.current[F.value]=z)},onMouseDown:F.disabled?null:z=>{z.preventDefault(),s(F)},disabled:F.disabled,variant:f},F))};let A=null;if(u.forEach((F,S)=>{F.creatable?b=S:F.group?(A!==F.group&&(A=F.group,x.push(M.createElement("div",{className:p.separator,key:`__mantine-divider-${S}`},M.createElement(lz,{classNames:{label:p.separatorLabel},label:F.group})))),x.push(k(F,S))):D.push(k(F,S))}),E){const F=u[b];D.push(M.createElement("div",{key:i4(),className:p.item,"data-hovered":e===b||void 0,onMouseEnter:()=>o(b),onMouseDown:S=>{S.preventDefault(),s(F)},tabIndex:-1,ref:S=>{l&&l.current&&(l.current[F.value]=S)}},m))}return x.length>0&&D.length>0&&D.unshift(M.createElement("div",{className:p.separator,key:"empty-group-separator"},M.createElement(lz,null))),x.length>0||D.length>0?M.createElement(M.Fragment,null,x,D):M.createElement(_u,{size:d,unstyled:g,className:p.nothingFound},h)}Que.displayName="@mantine/core/SelectItems";var a9t=Object.defineProperty,cz=Object.getOwnPropertySymbols,xSe=Object.prototype.hasOwnProperty,vSe=Object.prototype.propertyIsEnumerable,Jhe=(u,e,t)=>e in u?a9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,o9t=(u,e)=>{for(var t in e||(e={}))xSe.call(e,t)&&Jhe(u,t,e[t]);if(cz)for(var t of cz(e))vSe.call(e,t)&&Jhe(u,t,e[t]);return u},s9t=(u,e)=>{var t={};for(var n in u)xSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cz)for(var n of cz(u))e.indexOf(n)<0&&vSe.call(u,n)&&(t[n]=u[n]);return t};const Xue=C.forwardRef((u,e)=>{var t=u,{label:n,value:i}=t,r=s9t(t,["label","value"]);return M.createElement("div",o9t({ref:e},r),n||i)});Xue.displayName="@mantine/core/DefaultItem";function l9t(u,e){typeof u=="function"?u(e):u!=null&&(u.current=e)}function CSe(...u){return e=>u.forEach(t=>l9t(t,e))}function Up(...u){return C.useCallback(CSe(...u),u)}const bSe=C.forwardRef((u,e)=>{const{children:t,...n}=u,i=C.Children.toArray(t),r=i.find(d9t);if(r){const a=r.props.children,o=i.map(s=>s===r?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:s);return C.createElement(kZ,vt({},n,{ref:e}),C.isValidElement(a)?C.cloneElement(a,void 0,o):null)}return C.createElement(kZ,vt({},n,{ref:e}),t)});bSe.displayName="Slot";const kZ=C.forwardRef((u,e)=>{const{children:t,...n}=u;return C.isValidElement(t)?C.cloneElement(t,{...h9t(n,t.props),ref:CSe(e,t.ref)}):C.Children.count(t)>1?C.Children.only(null):null});kZ.displayName="SlotClone";const c9t=({children:u})=>C.createElement(C.Fragment,null,u);function d9t(u){return C.isValidElement(u)&&u.type===c9t}function h9t(u,e){const t={...e};for(const n in e){const i=u[n],r=e[n];/^on[A-Z]/.test(n)?i&&r?t[n]=(...o)=>{r(...o),i(...o)}:i&&(t[n]=i):n==="style"?t[n]={...i,...r}:n==="className"&&(t[n]=[i,r].filter(Boolean).join(" "))}return{...u,...t}}const E9t=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],e7=E9t.reduce((u,e)=>{const t=C.forwardRef((n,i)=>{const{asChild:r,...a}=n,o=r?bSe:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(o,vt({},a,{ref:i}))});return t.displayName=`Primitive.${e}`,{...u,[e]:t}},{}),FZ=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function m9t(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const t7=u=>{const{present:e,children:t}=u,n=g9t(e),i=typeof t=="function"?t({present:n.isPresent}):C.Children.only(t),r=Up(n.ref,i.ref);return typeof t=="function"||n.isPresent?C.cloneElement(i,{ref:r}):null};t7.displayName="Presence";function g9t(u){const[e,t]=C.useState(),n=C.useRef({}),i=C.useRef(u),r=C.useRef("none"),a=u?"mounted":"unmounted",[o,s]=m9t(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=N_(n.current);r.current=o==="mounted"?l:"none"},[o]),FZ(()=>{const l=n.current,c=i.current;if(c!==u){const h=r.current,E=N_(l);u?s("MOUNT"):E==="none"||(l==null?void 0:l.display)==="none"?s("UNMOUNT"):s(c&&h!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=u}},[u,s]),FZ(()=>{if(e){const l=d=>{const E=N_(n.current).includes(d.animationName);d.target===e&&E&&ns.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===e&&(r.current=N_(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function N_(u){return(u==null?void 0:u.animationName)||"none"}function f9t(u,e=[]){let t=[];function n(r,a){const o=C.createContext(a),s=t.length;t=[...t,a];function l(d){const{scope:h,children:E,...m}=d,g=(h==null?void 0:h[u][s])||o,f=C.useMemo(()=>m,Object.values(m));return C.createElement(g.Provider,{value:f},E)}function c(d,h){const E=(h==null?void 0:h[u][s])||o,m=C.useContext(E);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",[l,c]}const i=()=>{const r=t.map(a=>C.createContext(a));return function(o){const s=(o==null?void 0:o[u])||r;return C.useMemo(()=>({[`__scope${u}`]:{...o,[u]:s}}),[o,s])}};return i.scopeName=u,[n,p9t(i,...e)]}function p9t(...u){const e=u[0];if(u.length===1)return e;const t=()=>{const n=u.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const a=n.reduce((o,{useScope:s,scopeName:l})=>{const d=s(r)[`__scope${l}`];return{...o,...d}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return t.scopeName=e.scopeName,t}function Lf(u){const e=C.useRef(u);return C.useEffect(()=>{e.current=u}),C.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}const D9t=C.createContext(void 0);function x9t(u){const e=C.useContext(D9t);return u||e||"ltr"}function v9t(u,[e,t]){return Math.min(t,Math.max(e,u))}function p3(u,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(u==null||u(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function C9t(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const kSe="ScrollArea",[FSe,QUn]=f9t(kSe),[b9t,Zl]=FSe(kSe),k9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,type:n="hover",dir:i,scrollHideDelay:r=600,...a}=u,[o,s]=C.useState(null),[l,c]=C.useState(null),[d,h]=C.useState(null),[E,m]=C.useState(null),[g,f]=C.useState(null),[p,D]=C.useState(0),[x,b]=C.useState(0),[k,A]=C.useState(!1),[F,S]=C.useState(!1),w=Up(e,N=>s(N)),z=x9t(i);return C.createElement(b9t,{scope:t,type:n,dir:z,scrollHideDelay:r,scrollArea:o,viewport:l,onViewportChange:c,content:d,onContentChange:h,scrollbarX:E,onScrollbarXChange:m,scrollbarXEnabled:k,onScrollbarXEnabledChange:A,scrollbarY:g,onScrollbarYChange:f,scrollbarYEnabled:F,onScrollbarYEnabledChange:S,onCornerWidthChange:D,onCornerHeightChange:b},C.createElement(e7.div,vt({dir:z},a,{ref:w,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":x+"px",...u.style}})))}),F9t="ScrollAreaViewport",y9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,children:n,...i}=u,r=Zl(F9t,t),a=C.useRef(null),o=Up(e,a,r.onViewportChange);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(e7.div,vt({"data-radix-scroll-area-viewport":""},i,{ref:o,style:{overflowX:r.scrollbarXEnabled?"scroll":"hidden",overflowY:r.scrollbarYEnabled?"scroll":"hidden",...u.style}}),C.createElement("div",{ref:r.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),z4="ScrollAreaScrollbar",A9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=u.orientation==="horizontal";return C.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?C.createElement(_9t,vt({},n,{ref:e,forceMount:t})):i.type==="scroll"?C.createElement(S9t,vt({},n,{ref:e,forceMount:t})):i.type==="auto"?C.createElement(ySe,vt({},n,{ref:e,forceMount:t})):i.type==="always"?C.createElement(ene,vt({},n,{ref:e})):null}),_9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),[r,a]=C.useState(!1);return C.useEffect(()=>{const o=i.scrollArea;let s=0;if(o){const l=()=>{window.clearTimeout(s),a(!0)},c=()=>{s=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",l),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),o.removeEventListener("pointerenter",l),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),C.createElement(t7,{present:t||r},C.createElement(ySe,vt({"data-state":r?"visible":"hidden"},n,{ref:e})))}),S9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),r=u.orientation==="horizontal",a=wI(()=>s("SCROLL_END"),100),[o,s]=C9t("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(o==="idle"){const l=window.setTimeout(()=>s("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[o,i.scrollHideDelay,s]),C.useEffect(()=>{const l=i.viewport,c=r?"scrollLeft":"scrollTop";if(l){let d=l[c];const h=()=>{const E=l[c];d!==E&&(s("SCROLL"),a()),d=E};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,r,s,a]),C.createElement(t7,{present:t||o!=="hidden"},C.createElement(ene,vt({"data-state":o==="hidden"?"hidden":"visible"},n,{ref:e,onPointerEnter:p3(u.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:p3(u.onPointerLeave,()=>s("POINTER_LEAVE"))})))}),ySe=C.forwardRef((u,e)=>{const t=Zl(z4,u.__scopeScrollArea),{forceMount:n,...i}=u,[r,a]=C.useState(!1),o=u.orientation==="horizontal",s=wI(()=>{if(t.viewport){const l=t.viewport.offsetWidth{const{orientation:t="vertical",...n}=u,i=Zl(z4,u.__scopeScrollArea),r=C.useRef(null),a=C.useRef(0),[o,s]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=BSe(o.viewport,o.content),c={...n,sizes:o,onSizesChange:s,hasThumb:l>0&&l<1,onThumbChange:h=>r.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function d(h,E){return P9t(h,a.current,o,E)}return t==="horizontal"?C.createElement(B9t,vt({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&r.current){const h=i.viewport.scrollLeft,E=Zhe(h,o,i.dir);r.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}})):t==="vertical"?C.createElement(w9t,vt({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&r.current){const h=i.viewport.scrollTop,E=Zhe(h,o);r.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}})):null}),B9t=C.forwardRef((u,e)=>{const{sizes:t,onSizesChange:n,...i}=u,r=Zl(z4,u.__scopeScrollArea),[a,o]=C.useState(),s=C.useRef(null),l=Up(e,s,r.onScrollbarXChange);return C.useEffect(()=>{s.current&&o(getComputedStyle(s.current))},[s]),C.createElement(_Se,vt({"data-orientation":"horizontal"},i,{ref:l,sizes:t,style:{bottom:0,left:r.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:r.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":BI(t)+"px",...u.style},onThumbPointerDown:c=>u.onThumbPointerDown(c.x),onDragScroll:c=>u.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(r.viewport){const h=r.viewport.scrollLeft+c.deltaX;u.onWheelScroll(h),LSe(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&a&&n({content:r.viewport.scrollWidth,viewport:r.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:dz(a.paddingLeft),paddingEnd:dz(a.paddingRight)}})}}))}),w9t=C.forwardRef((u,e)=>{const{sizes:t,onSizesChange:n,...i}=u,r=Zl(z4,u.__scopeScrollArea),[a,o]=C.useState(),s=C.useRef(null),l=Up(e,s,r.onScrollbarYChange);return C.useEffect(()=>{s.current&&o(getComputedStyle(s.current))},[s]),C.createElement(_Se,vt({"data-orientation":"vertical"},i,{ref:l,sizes:t,style:{top:0,right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":BI(t)+"px",...u.style},onThumbPointerDown:c=>u.onThumbPointerDown(c.y),onDragScroll:c=>u.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(r.viewport){const h=r.viewport.scrollTop+c.deltaY;u.onWheelScroll(h),LSe(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&a&&n({content:r.viewport.scrollHeight,viewport:r.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:dz(a.paddingTop),paddingEnd:dz(a.paddingBottom)}})}}))}),[L9t,ASe]=FSe(z4),_Se=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,sizes:n,hasThumb:i,onThumbChange:r,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...h}=u,E=Zl(z4,t),[m,g]=C.useState(null),f=Up(e,w=>g(w)),p=C.useRef(null),D=C.useRef(""),x=E.viewport,b=n.content-n.viewport,k=Lf(c),A=Lf(s),F=wI(d,10);function S(w){if(p.current){const z=w.clientX-p.current.left,N=w.clientY-p.current.top;l({x:z,y:N})}}return C.useEffect(()=>{const w=z=>{const N=z.target;(m==null?void 0:m.contains(N))&&k(z,b)};return document.addEventListener("wheel",w,{passive:!1}),()=>document.removeEventListener("wheel",w,{passive:!1})},[x,m,b,k]),C.useEffect(A,[n,A]),$v(m,F),$v(E.content,F),C.createElement(L9t,{scope:t,scrollbar:m,hasThumb:i,onThumbChange:Lf(r),onThumbPointerUp:Lf(a),onThumbPositionChange:A,onThumbPointerDown:Lf(o)},C.createElement(e7.div,vt({},h,{ref:f,style:{position:"absolute",...h.style},onPointerDown:p3(u.onPointerDown,w=>{w.button===0&&(w.target.setPointerCapture(w.pointerId),p.current=m.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S(w))}),onPointerMove:p3(u.onPointerMove,S),onPointerUp:p3(u.onPointerUp,w=>{const z=w.target;z.hasPointerCapture(w.pointerId)&&z.releasePointerCapture(w.pointerId),document.body.style.webkitUserSelect=D.current,p.current=null})})))}),yZ="ScrollAreaThumb",z9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=ASe(yZ,u.__scopeScrollArea);return C.createElement(t7,{present:t||i.hasThumb},C.createElement(M9t,vt({ref:e},n)))}),M9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,style:n,...i}=u,r=Zl(yZ,t),a=ASe(yZ,t),{onThumbPositionChange:o}=a,s=Up(e,d=>a.onThumbChange(d)),l=C.useRef(),c=wI(()=>{l.current&&(l.current(),l.current=void 0)},100);return C.useEffect(()=>{const d=r.viewport;if(d){const h=()=>{if(c(),!l.current){const E=R9t(d,o);l.current=E,o()}};return o(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[r.viewport,c,o]),C.createElement(e7.div,vt({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:p3(u.onPointerDownCapture,d=>{const E=d.target.getBoundingClientRect(),m=d.clientX-E.left,g=d.clientY-E.top;a.onThumbPointerDown({x:m,y:g})}),onPointerUp:p3(u.onPointerUp,a.onThumbPointerUp)}))}),SSe="ScrollAreaCorner",T9t=C.forwardRef((u,e)=>{const t=Zl(SSe,u.__scopeScrollArea),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!=="scroll"&&n?C.createElement(N9t,vt({},u,{ref:e})):null}),N9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,...n}=u,i=Zl(SSe,t),[r,a]=C.useState(0),[o,s]=C.useState(0),l=!!(r&&o);return $v(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),s(d)}),$v(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),l?C.createElement(e7.div,vt({},n,{ref:e,style:{width:r,height:o,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...u.style}})):null});function dz(u){return u?parseInt(u,10):0}function BSe(u,e){const t=u/e;return isNaN(t)?0:t}function BI(u){const e=BSe(u.viewport,u.content),t=u.scrollbar.paddingStart+u.scrollbar.paddingEnd,n=(u.scrollbar.size-t)*e;return Math.max(n,18)}function P9t(u,e,t,n="ltr"){const i=BI(t),r=i/2,a=e||r,o=i-a,s=t.scrollbar.paddingStart+a,l=t.scrollbar.size-t.scrollbar.paddingEnd-o,c=t.content-t.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return wSe([s,l],d)(u)}function Zhe(u,e,t="ltr"){const n=BI(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=e.scrollbar.size-i,a=e.content-e.viewport,o=r-n,s=t==="ltr"?[0,a]:[a*-1,0],l=v9t(u,s);return wSe([0,a],[0,o])(l)}function wSe(u,e){return t=>{if(u[0]===u[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(u[1]-u[0]);return e[0]+n*(t-u[0])}}function LSe(u,e){return u>0&&u{})=>{let t={left:u.scrollLeft,top:u.scrollTop},n=0;return function i(){const r={left:u.scrollLeft,top:u.scrollTop},a=t.left!==r.left,o=t.top!==r.top;(a||o)&&e(),t=r,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function wI(u,e){const t=Lf(u),n=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(n.current),[]),C.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(t,e)},[t,e])}function $v(u,e){const t=Lf(e);FZ(()=>{let n=0;if(u){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(t)});return i.observe(u),()=>{window.cancelAnimationFrame(n),i.unobserve(u)}}},[u,t])}const I9t=k9t,O9t=y9t,Yhe=A9t,Qhe=z9t,j9t=T9t;var H9t=at((u,{scrollbarSize:e,offsetScrollbars:t,scrollbarHovered:n,hidden:i})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:t?G(e):void 0,paddingBottom:t?G(e):void 0},scrollbar:{display:i?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${G(e)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0],[`& .${v1("thumb")}`]:{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.white,.5):u.fn.rgba(u.black,.5)}},'&[data-orientation="vertical"]':{width:G(e)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:G(e)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:v1("thumb"),flex:1,backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.white,.4):u.fn.rgba(u.black,.4),borderRadius:G(e),position:"relative",transition:"background-color 150ms ease",display:i?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:G(44),minHeight:G(44)}},corner:{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:i?"none":void 0}}));const V9t=H9t;var $9t=Object.defineProperty,K9t=Object.defineProperties,W9t=Object.getOwnPropertyDescriptors,hz=Object.getOwnPropertySymbols,zSe=Object.prototype.hasOwnProperty,MSe=Object.prototype.propertyIsEnumerable,Xhe=(u,e,t)=>e in u?$9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,AZ=(u,e)=>{for(var t in e||(e={}))zSe.call(e,t)&&Xhe(u,t,e[t]);if(hz)for(var t of hz(e))MSe.call(e,t)&&Xhe(u,t,e[t]);return u},TSe=(u,e)=>K9t(u,W9t(e)),NSe=(u,e)=>{var t={};for(var n in u)zSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&hz)for(var n of hz(u))e.indexOf(n)<0&&MSe.call(u,n)&&(t[n]=u[n]);return t};const PSe={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},LI=C.forwardRef((u,e)=>{const t=Qe("ScrollArea",PSe,u),{children:n,className:i,classNames:r,styles:a,scrollbarSize:o,scrollHideDelay:s,type:l,dir:c,offsetScrollbars:d,viewportRef:h,onScrollPositionChange:E,unstyled:m,variant:g,viewportProps:f}=t,p=NSe(t,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[D,x]=C.useState(!1),b=jr(),{classes:k,cx:A}=V9t({scrollbarSize:o,offsetScrollbars:d,scrollbarHovered:D,hidden:l==="never"},{name:"ScrollArea",classNames:r,styles:a,unstyled:m,variant:g});return M.createElement(I9t,{type:l==="never"?"always":l,scrollHideDelay:s,dir:c||b.dir,ref:e,asChild:!0},M.createElement(Ct,AZ({className:A(k.root,i)},p),M.createElement(O9t,TSe(AZ({},f),{className:k.viewport,ref:h,onScroll:typeof E=="function"?({currentTarget:F})=>E({x:F.scrollLeft,y:F.scrollTop}):void 0}),n),M.createElement(Yhe,{orientation:"horizontal",className:k.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},M.createElement(Qhe,{className:k.thumb})),M.createElement(Yhe,{orientation:"vertical",className:k.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},M.createElement(Qhe,{className:k.thumb})),M.createElement(j9t,{className:k.corner})))}),RSe=C.forwardRef((u,e)=>{const t=Qe("ScrollAreaAutosize",PSe,u),{children:n,classNames:i,styles:r,scrollbarSize:a,scrollHideDelay:o,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:h,unstyled:E,sx:m,variant:g,viewportProps:f}=t,p=NSe(t,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return M.createElement(Ct,TSe(AZ({},p),{ref:e,sx:[{display:"flex"},...EI(m)]}),M.createElement(Ct,{sx:{display:"flex",flexDirection:"column",flex:1}},M.createElement(LI,{classNames:i,styles:r,scrollHideDelay:o,scrollbarSize:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:h,unstyled:E,variant:g,viewportProps:f},n)))});RSe.displayName="@mantine/core/ScrollAreaAutosize";LI.displayName="@mantine/core/ScrollArea";LI.Autosize=RSe;const QF=LI;var G9t=Object.defineProperty,U9t=Object.defineProperties,q9t=Object.getOwnPropertyDescriptors,Ez=Object.getOwnPropertySymbols,ISe=Object.prototype.hasOwnProperty,OSe=Object.prototype.propertyIsEnumerable,e4e=(u,e,t)=>e in u?G9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,t4e=(u,e)=>{for(var t in e||(e={}))ISe.call(e,t)&&e4e(u,t,e[t]);if(Ez)for(var t of Ez(e))OSe.call(e,t)&&e4e(u,t,e[t]);return u},J9t=(u,e)=>U9t(u,q9t(e)),Z9t=(u,e)=>{var t={};for(var n in u)ISe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Ez)for(var n of Ez(u))e.indexOf(n)<0&&OSe.call(u,n)&&(t[n]=u[n]);return t};const zI=C.forwardRef((u,e)=>{var t=u,{style:n}=t,i=Z9t(t,["style"]);return M.createElement(QF,J9t(t4e({},i),{style:t4e({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:e}),i.children)});zI.displayName="@mantine/core/SelectScrollArea";var Y9t=at(()=>({dropdown:{},itemsWrapper:{padding:G(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const Q9t=Y9t;var X9t=function(u){if(typeof document>"u")return null;var e=Array.isArray(u)?u[0]:u;return e.ownerDocument.body},zD=new WeakMap,P_=new WeakMap,R_={},NV=0,jSe=function(u){return u&&(u.host||jSe(u.parentNode))},e_t=function(u,e){return e.map(function(t){if(u.contains(t))return t;var n=jSe(t);return n&&u.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",u,". Doing nothing"),null)}).filter(function(t){return!!t})},t_t=function(u,e,t,n){var i=e_t(e,Array.isArray(u)?u:[u]);R_[t]||(R_[t]=new WeakMap);var r=R_[t],a=[],o=new Set,s=new Set(i),l=function(d){!d||o.has(d)||(o.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(o.has(h))c(h);else{var E=h.getAttribute(n),m=E!==null&&E!=="false",g=(zD.get(h)||0)+1,f=(r.get(h)||0)+1;zD.set(h,g),r.set(h,f),a.push(h),g===1&&m&&P_.set(h,!0),f===1&&h.setAttribute(t,"true"),m||h.setAttribute(n,"true")}})};return c(e),o.clear(),NV++,function(){a.forEach(function(d){var h=zD.get(d)-1,E=r.get(d)-1;zD.set(d,h),r.set(d,E),h||(P_.has(d)||d.removeAttribute(n),P_.delete(d)),E||d.removeAttribute(t)}),NV--,NV||(zD=new WeakMap,zD=new WeakMap,P_=new WeakMap,R_={})}},HSe=function(u,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(u)?u:[u]),i=e||X9t(u);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),t_t(n,i,t,"aria-hidden")):function(){return null}};const u_t=["top","right","bottom","left"],id=Math.min,Bo=Math.max,mz=Math.round,I_=Math.floor,ag=u=>({x:u,y:u}),n_t={left:"right",right:"left",bottom:"top",top:"bottom"},i_t={start:"end",end:"start"};function _Z(u,e,t){return Bo(u,id(e,t))}function P1(u,e){return typeof u=="function"?u(e):u}function rd(u){return u.split("-")[0]}function T6(u){return u.split("-")[1]}function tne(u){return u==="x"?"y":"x"}function une(u){return u==="y"?"height":"width"}function qp(u){return["top","bottom"].includes(rd(u))?"y":"x"}function nne(u){return tne(qp(u))}function r_t(u,e,t){t===void 0&&(t=!1);const n=T6(u),i=nne(u),r=une(i);let a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=gz(a)),[a,gz(a)]}function a_t(u){const e=gz(u);return[SZ(u),e,SZ(e)]}function SZ(u){return u.replace(/start|end/g,e=>i_t[e])}function o_t(u,e,t){const n=["left","right"],i=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(u){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?r:a;default:return[]}}function s_t(u,e,t,n){const i=T6(u);let r=o_t(rd(u),t==="start",n);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(SZ)))),r}function gz(u){return u.replace(/left|right|bottom|top/g,e=>n_t[e])}function l_t(u){return{top:0,right:0,bottom:0,left:0,...u}}function ine(u){return typeof u!="number"?l_t(u):{top:u,right:u,bottom:u,left:u}}function Kv(u){return{...u,top:u.y,left:u.x,right:u.x+u.width,bottom:u.y+u.height}}function u4e(u,e,t){let{reference:n,floating:i}=u;const r=qp(e),a=nne(e),o=une(a),s=rd(e),l=r==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[o]/2-i[o]/2;let E;switch(s){case"top":E={x:c,y:n.y-i.height};break;case"bottom":E={x:c,y:n.y+n.height};break;case"right":E={x:n.x+n.width,y:d};break;case"left":E={x:n.x-i.width,y:d};break;default:E={x:n.x,y:n.y}}switch(T6(e)){case"start":E[a]-=h*(t&&l?-1:1);break;case"end":E[a]+=h*(t&&l?-1:1);break}return E}const c_t=async(u,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:a}=t,o=r.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:u,floating:e,strategy:i}),{x:c,y:d}=u4e(l,n,s),h=n,E={},m=0;for(let g=0;g({name:"arrow",options:u,async fn(e){const{x:t,y:n,placement:i,rects:r,platform:a,elements:o}=e,{element:s,padding:l=0}=P1(u,e)||{};if(s==null)return{};const c=ine(l),d={x:t,y:n},h=nne(i),E=une(h),m=await a.getDimensions(s),g=h==="y",f=g?"top":"left",p=g?"bottom":"right",D=g?"clientHeight":"clientWidth",x=r.reference[E]+r.reference[h]-d[h]-r.floating[E],b=d[h]-r.reference[h],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s));let A=k?k[D]:0;(!A||!await(a.isElement==null?void 0:a.isElement(k)))&&(A=o.floating[D]||r.floating[E]);const F=x/2-b/2,S=A/2-m[E]/2-1,w=id(c[f],S),z=id(c[p],S),N=w,O=A-m[E]-z,y=A/2-m[E]/2+F,_=_Z(N,y,O),T=T6(i)!=null&&y!=_&&r.reference[E]/2-(yN<=0)){var S,w;const N=(((S=i.flip)==null?void 0:S.index)||0)+1,O=b[N];if(O)return{data:{index:N,overflows:F},reset:{placement:O}};let y=(w=F.filter(_=>_.overflows[0]<=0).sort((_,L)=>_.overflows[1]-L.overflows[1])[0])==null?void 0:w.placement;if(!y)switch(h){case"bestFit":{var z;const _=(z=F.map(L=>[L.placement,L.overflows.filter(T=>T>0).reduce((T,R)=>T+R,0)]).sort((L,T)=>L[1]-T[1])[0])==null?void 0:z[0];_&&(y=_);break}case"initialPlacement":y=a;break}if(n!==y)return{reset:{placement:y}}}return{}}}};function n4e(u,e){return{top:u.top-e.height,right:u.right-e.width,bottom:u.bottom-e.height,left:u.left-e.width}}function i4e(u){return u_t.some(e=>u[e]>=0)}const d_t=function(u){return u===void 0&&(u={}),{name:"hide",options:u,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...i}=P1(u,e);switch(n){case"referenceHidden":{const r=await XF(e,{...i,elementContext:"reference"}),a=n4e(r,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:i4e(a)}}}case"escaped":{const r=await XF(e,{...i,altBoundary:!0}),a=n4e(r,t.floating);return{data:{escapedOffsets:a,escaped:i4e(a)}}}default:return{}}}}};function VSe(u){const e=id(...u.map(r=>r.left)),t=id(...u.map(r=>r.top)),n=Bo(...u.map(r=>r.right)),i=Bo(...u.map(r=>r.bottom));return{x:e,y:t,width:n-e,height:i-t}}function h_t(u){const e=u.slice().sort((i,r)=>i.y-r.y),t=[];let n=null;for(let i=0;in.height/2?t.push([r]):t[t.length-1].push(r),n=r}return t.map(i=>Kv(VSe(i)))}const $Se=function(u){return u===void 0&&(u={}),{name:"inline",options:u,async fn(e){const{placement:t,elements:n,rects:i,platform:r,strategy:a}=e,{padding:o=2,x:s,y:l}=P1(u,e),c=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),d=h_t(c),h=Kv(VSe(c)),E=ine(o);function m(){if(d.length===2&&d[0].left>d[1].right&&s!=null&&l!=null)return d.find(f=>s>f.left-E.left&&sf.top-E.top&&l=2){if(qp(t)==="y"){const z=d[0],N=d[d.length-1],O=rd(t)==="top",y=z.top,_=N.bottom,L=O?z.left:N.left,T=O?z.right:N.right,R=T-L,I=_-y;return{top:y,bottom:_,left:L,right:T,width:R,height:I,x:L,y}}const f=rd(t)==="left",p=Bo(...d.map(z=>z.right)),D=id(...d.map(z=>z.left)),x=d.filter(z=>f?z.left===D:z.right===p),b=x[0].top,k=x[x.length-1].bottom,A=D,F=p,S=F-A,w=k-b;return{top:b,bottom:k,left:A,right:F,width:S,height:w,x:A,y:b}}return h}const g=await r.getElementRects({reference:{getBoundingClientRect:m},floating:n.floating,strategy:a});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};async function E_t(u,e){const{placement:t,platform:n,elements:i}=u,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=rd(t),o=T6(t),s=qp(t)==="y",l=["left","top"].includes(a)?-1:1,c=r&&s?-1:1,d=P1(e,u);let{mainAxis:h,crossAxis:E,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return o&&typeof m=="number"&&(E=o==="end"?m*-1:m),s?{x:E*c,y:h*l}:{x:h*l,y:E*c}}const ane=function(u){return u===void 0&&(u=0),{name:"offset",options:u,async fn(e){const{x:t,y:n}=e,i=await E_t(e,u);return{x:t+i.x,y:n+i.y,data:i}}}},MI=function(u){return u===void 0&&(u={}),{name:"shift",options:u,async fn(e){const{x:t,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:o={fn:f=>{let{x:p,y:D}=f;return{x:p,y:D}}},...s}=P1(u,e),l={x:t,y:n},c=await XF(e,s),d=qp(rd(i)),h=tne(d);let E=l[h],m=l[d];if(r){const f=h==="y"?"top":"left",p=h==="y"?"bottom":"right",D=E+c[f],x=E-c[p];E=_Z(D,E,x)}if(a){const f=d==="y"?"top":"left",p=d==="y"?"bottom":"right",D=m+c[f],x=m-c[p];m=_Z(D,m,x)}const g=o.fn({...e,[h]:E,[d]:m});return{...g,data:{x:g.x-t,y:g.y-n}}}}},KSe=function(u){return u===void 0&&(u={}),{options:u,fn(e){const{x:t,y:n,placement:i,rects:r,middlewareData:a}=e,{offset:o=0,mainAxis:s=!0,crossAxis:l=!0}=P1(u,e),c={x:t,y:n},d=qp(i),h=tne(d);let E=c[h],m=c[d];const g=P1(o,e),f=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){const x=h==="y"?"height":"width",b=r.reference[h]-r.floating[x]+f.mainAxis,k=r.reference[h]+r.reference[x]-f.mainAxis;Ek&&(E=k)}if(l){var p,D;const x=h==="y"?"width":"height",b=["top","left"].includes(rd(i)),k=r.reference[d]-r.floating[x]+(b&&((p=a.offset)==null?void 0:p[d])||0)+(b?0:f.crossAxis),A=r.reference[d]+r.reference[x]+(b?0:((D=a.offset)==null?void 0:D[d])||0)-(b?f.crossAxis:0);mA&&(m=A)}return{[h]:E,[d]:m}}}},WSe=function(u){return u===void 0&&(u={}),{name:"size",options:u,async fn(e){const{placement:t,rects:n,platform:i,elements:r}=e,{apply:a=()=>{},...o}=P1(u,e),s=await XF(e,o),l=rd(t),c=T6(t),d=qp(t)==="y",{width:h,height:E}=n.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=c===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=l,m=c==="end"?"top":"bottom");const f=E-s[m],p=h-s[g],D=!e.middlewareData.shift;let x=f,b=p;if(d){const A=h-s.left-s.right;b=c||D?id(p,A):A}else{const A=E-s.top-s.bottom;x=c||D?id(f,A):A}if(D&&!c){const A=Bo(s.left,0),F=Bo(s.right,0),S=Bo(s.top,0),w=Bo(s.bottom,0);d?b=h-2*(A!==0||F!==0?A+F:Bo(s.left,s.right)):x=E-2*(S!==0||w!==0?S+w:Bo(s.top,s.bottom))}await a({...e,availableWidth:b,availableHeight:x});const k=await i.getDimensions(r.floating);return h!==k.width||E!==k.height?{reset:{rects:!0}}:{}}}};function og(u){return GSe(u)?(u.nodeName||"").toLowerCase():"#document"}function L0(u){var e;return(u==null||(e=u.ownerDocument)==null?void 0:e.defaultView)||window}function M4(u){var e;return(e=(GSe(u)?u.ownerDocument:u.document)||window.document)==null?void 0:e.documentElement}function GSe(u){return u instanceof Node||u instanceof L0(u).Node}function p4(u){return u instanceof Element||u instanceof L0(u).Element}function R1(u){return u instanceof HTMLElement||u instanceof L0(u).HTMLElement}function r4e(u){return typeof ShadowRoot>"u"?!1:u instanceof ShadowRoot||u instanceof L0(u).ShadowRoot}function u7(u){const{overflow:e,overflowX:t,overflowY:n,display:i}=Rl(u);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function m_t(u){return["table","td","th"].includes(og(u))}function one(u){const e=sne(),t=Rl(u);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function g_t(u){let e=Wv(u);for(;R1(e)&&!TI(e);){if(one(e))return e;e=Wv(e)}return null}function sne(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function TI(u){return["html","body","#document"].includes(og(u))}function Rl(u){return L0(u).getComputedStyle(u)}function NI(u){return p4(u)?{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}:{scrollLeft:u.pageXOffset,scrollTop:u.pageYOffset}}function Wv(u){if(og(u)==="html")return u;const e=u.assignedSlot||u.parentNode||r4e(u)&&u.host||M4(u);return r4e(e)?e.host:e}function USe(u){const e=Wv(u);return TI(e)?u.ownerDocument?u.ownerDocument.body:u.body:R1(e)&&u7(e)?e:USe(e)}function km(u,e){var t;e===void 0&&(e=[]);const n=USe(u),i=n===((t=u.ownerDocument)==null?void 0:t.body),r=L0(n);return i?e.concat(r,r.visualViewport||[],u7(n)?n:[]):e.concat(n,km(n))}function qSe(u){const e=Rl(u);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=R1(u),r=i?u.offsetWidth:t,a=i?u.offsetHeight:n,o=mz(t)!==r||mz(n)!==a;return o&&(t=r,n=a),{width:t,height:n,$:o}}function lne(u){return p4(u)?u:u.contextElement}function Tx(u){const e=lne(u);if(!R1(e))return ag(1);const t=e.getBoundingClientRect(),{width:n,height:i,$:r}=qSe(e);let a=(r?mz(t.width):t.width)/n,o=(r?mz(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const f_t=ag(0);function JSe(u){const e=L0(u);return!sne()||!e.visualViewport?f_t:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function p_t(u,e,t){return e===void 0&&(e=!1),!t||e&&t!==L0(u)?!1:e}function cp(u,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=u.getBoundingClientRect(),r=lne(u);let a=ag(1);e&&(n?p4(n)&&(a=Tx(n)):a=Tx(u));const o=p_t(r,t,n)?JSe(r):ag(0);let s=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(r){const h=L0(r),E=n&&p4(n)?L0(n):n;let m=h.frameElement;for(;m&&n&&E!==h;){const g=Tx(m),f=m.getBoundingClientRect(),p=Rl(m),D=f.left+(m.clientLeft+parseFloat(p.paddingLeft))*g.x,x=f.top+(m.clientTop+parseFloat(p.paddingTop))*g.y;s*=g.x,l*=g.y,c*=g.x,d*=g.y,s+=D,l+=x,m=L0(m).frameElement}}return Kv({width:c,height:d,x:s,y:l})}function D_t(u){let{rect:e,offsetParent:t,strategy:n}=u;const i=R1(t),r=M4(t);if(t===r)return e;let a={scrollLeft:0,scrollTop:0},o=ag(1);const s=ag(0);if((i||!i&&n!=="fixed")&&((og(t)!=="body"||u7(r))&&(a=NI(t)),R1(t))){const l=cp(t);o=Tx(t),s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}return{width:e.width*o.x,height:e.height*o.y,x:e.x*o.x-a.scrollLeft*o.x+s.x,y:e.y*o.y-a.scrollTop*o.y+s.y}}function x_t(u){return Array.from(u.getClientRects())}function ZSe(u){return cp(M4(u)).left+NI(u).scrollLeft}function v_t(u){const e=M4(u),t=NI(u),n=u.ownerDocument.body,i=Bo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Bo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+ZSe(u);const o=-t.scrollTop;return Rl(n).direction==="rtl"&&(a+=Bo(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:a,y:o}}function C_t(u,e){const t=L0(u),n=M4(u),i=t.visualViewport;let r=n.clientWidth,a=n.clientHeight,o=0,s=0;if(i){r=i.width,a=i.height;const l=sne();(!l||l&&e==="fixed")&&(o=i.offsetLeft,s=i.offsetTop)}return{width:r,height:a,x:o,y:s}}function b_t(u,e){const t=cp(u,!0,e==="fixed"),n=t.top+u.clientTop,i=t.left+u.clientLeft,r=R1(u)?Tx(u):ag(1),a=u.clientWidth*r.x,o=u.clientHeight*r.y,s=i*r.x,l=n*r.y;return{width:a,height:o,x:s,y:l}}function a4e(u,e,t){let n;if(e==="viewport")n=C_t(u,t);else if(e==="document")n=v_t(M4(u));else if(p4(e))n=b_t(e,t);else{const i=JSe(u);n={...e,x:e.x-i.x,y:e.y-i.y}}return Kv(n)}function YSe(u,e){const t=Wv(u);return t===e||!p4(t)||TI(t)?!1:Rl(t).position==="fixed"||YSe(t,e)}function k_t(u,e){const t=e.get(u);if(t)return t;let n=km(u).filter(o=>p4(o)&&og(o)!=="body"),i=null;const r=Rl(u).position==="fixed";let a=r?Wv(u):u;for(;p4(a)&&!TI(a);){const o=Rl(a),s=one(a);!s&&o.position==="fixed"&&(i=null),(r?!s&&!i:!s&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||u7(a)&&!s&&YSe(u,a))?n=n.filter(c=>c!==a):i=o,a=Wv(a)}return e.set(u,n),n}function F_t(u){let{element:e,boundary:t,rootBoundary:n,strategy:i}=u;const a=[...t==="clippingAncestors"?k_t(e,this._c):[].concat(t),n],o=a[0],s=a.reduce((l,c)=>{const d=a4e(e,c,i);return l.top=Bo(d.top,l.top),l.right=id(d.right,l.right),l.bottom=id(d.bottom,l.bottom),l.left=Bo(d.left,l.left),l},a4e(e,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function y_t(u){return qSe(u)}function A_t(u,e,t){const n=R1(e),i=M4(e),r=t==="fixed",a=cp(u,!0,r,e);let o={scrollLeft:0,scrollTop:0};const s=ag(0);if(n||!n&&!r)if((og(e)!=="body"||u7(i))&&(o=NI(e)),n){const l=cp(e,!0,r,e);s.x=l.x+e.clientLeft,s.y=l.y+e.clientTop}else i&&(s.x=ZSe(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}function o4e(u,e){return!R1(u)||Rl(u).position==="fixed"?null:e?e(u):u.offsetParent}function QSe(u,e){const t=L0(u);if(!R1(u))return t;let n=o4e(u,e);for(;n&&m_t(n)&&Rl(n).position==="static";)n=o4e(n,e);return n&&(og(n)==="html"||og(n)==="body"&&Rl(n).position==="static"&&!one(n))?t:n||g_t(u)||t}const __t=async function(u){let{reference:e,floating:t,strategy:n}=u;const i=this.getOffsetParent||QSe,r=this.getDimensions;return{reference:A_t(e,await i(t),n),floating:{x:0,y:0,...await r(t)}}};function S_t(u){return Rl(u).direction==="rtl"}const B_t={convertOffsetParentRelativeRectToViewportRelativeRect:D_t,getDocumentElement:M4,getClippingRect:F_t,getOffsetParent:QSe,getElementRects:__t,getClientRects:x_t,getDimensions:y_t,getScale:Tx,isElement:p4,isRTL:S_t};function w_t(u,e){let t=null,n;const i=M4(u);function r(){clearTimeout(n),t&&t.disconnect(),t=null}function a(o,s){o===void 0&&(o=!1),s===void 0&&(s=1),r();const{left:l,top:c,width:d,height:h}=u.getBoundingClientRect();if(o||e(),!d||!h)return;const E=I_(c),m=I_(i.clientWidth-(l+d)),g=I_(i.clientHeight-(c+h)),f=I_(l),D={rootMargin:-E+"px "+-m+"px "+-g+"px "+-f+"px",threshold:Bo(0,id(1,s))||1};let x=!0;function b(k){const A=k[0].intersectionRatio;if(A!==s){if(!x)return a();A?a(!1,A):n=setTimeout(()=>{a(!1,1e-7)},100)}x=!1}try{t=new IntersectionObserver(b,{...D,root:i.ownerDocument})}catch{t=new IntersectionObserver(b,D)}t.observe(u)}return a(!0),r}function XSe(u,e,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,l=lne(u),c=i||r?[...l?km(l):[],...km(e)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",t,{passive:!0}),r&&p.addEventListener("resize",t)});const d=l&&o?w_t(l,t):null;let h=-1,E=null;a&&(E=new ResizeObserver(p=>{let[D]=p;D&&D.target===l&&E&&(E.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{E&&E.observe(e)})),t()}),l&&!s&&E.observe(l),E.observe(e));let m,g=s?cp(u):null;s&&f();function f(){const p=cp(u);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&t(),g=p,m=requestAnimationFrame(f)}return t(),()=>{c.forEach(p=>{i&&p.removeEventListener("scroll",t),r&&p.removeEventListener("resize",t)}),d&&d(),E&&E.disconnect(),E=null,s&&cancelAnimationFrame(m)}}const e8e=(u,e,t)=>{const n=new Map,i={platform:B_t,...t},r={...i.platform,_c:n};return c_t(u,e,{...i,platform:r})},t8e=u=>{const{element:e,padding:t}=u;function n(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:u,fn(i){return n(e)?e.current!=null?fz({element:e.current,padding:t}).fn(i):{}:e?fz({element:e,padding:t}).fn(i):{}}}};var N8=typeof document<"u"?C.useLayoutEffect:C.useEffect;function pz(u,e){if(u===e)return!0;if(typeof u!=typeof e)return!1;if(typeof u=="function"&&u.toString()===e.toString())return!0;let t,n,i;if(u&&e&&typeof u=="object"){if(Array.isArray(u)){if(t=u.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!pz(u[n],e[n]))return!1;return!0}if(i=Object.keys(u),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const r=i[n];if(!(r==="_owner"&&u.$$typeof)&&!pz(u[r],e[r]))return!1}return!0}return u!==u&&e!==e}function s4e(u){const e=C.useRef(u);return N8(()=>{e.current=u}),e}function L_t(u){u===void 0&&(u={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,whileElementsMounted:r,open:a}=u,[o,s]=C.useState({x:null,y:null,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[l,c]=C.useState(n);pz(l,n)||c(n);const d=C.useRef(null),h=C.useRef(null),E=C.useRef(o),m=s4e(r),g=s4e(i),[f,p]=C.useState(null),[D,x]=C.useState(null),b=C.useCallback(z=>{d.current!==z&&(d.current=z,p(z))},[]),k=C.useCallback(z=>{h.current!==z&&(h.current=z,x(z))},[]),A=C.useCallback(()=>{if(!d.current||!h.current)return;const z={placement:e,strategy:t,middleware:l};g.current&&(z.platform=g.current),e8e(d.current,h.current,z).then(N=>{const O={...N,isPositioned:!0};F.current&&!pz(E.current,O)&&(E.current=O,ns.flushSync(()=>{s(O)}))})},[l,e,t,g]);N8(()=>{a===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,s(z=>({...z,isPositioned:!1})))},[a]);const F=C.useRef(!1);N8(()=>(F.current=!0,()=>{F.current=!1}),[]),N8(()=>{if(f&&D){if(m.current)return m.current(f,D,A);A()}},[f,D,A,m]);const S=C.useMemo(()=>({reference:d,floating:h,setReference:b,setFloating:k}),[b,k]),w=C.useMemo(()=>({reference:f,floating:D}),[f,D]);return C.useMemo(()=>({...o,update:A,refs:S,elements:w,reference:b,floating:k}),[o,A,S,w,b,k])}var Gv=typeof document<"u"?C.useLayoutEffect:C.useEffect;let PV=!1,z_t=0;const l4e=()=>"floating-ui-"+z_t++;function M_t(){const[u,e]=C.useState(()=>PV?l4e():void 0);return Gv(()=>{u==null&&e(l4e())},[]),C.useEffect(()=>{PV||(PV=!0)},[]),u}const T_t=wm["useId".toString()],c4e=T_t||M_t;function N_t(){const u=new Map;return{emit(e,t){var n;(n=u.get(e))==null||n.forEach(i=>i(t))},on(e,t){u.set(e,[...u.get(e)||[],t])},off(e,t){u.set(e,(u.get(e)||[]).filter(n=>n!==t))}}}const P_t=C.createContext(null),R_t=C.createContext(null),u8e=()=>{var u;return((u=C.useContext(P_t))==null?void 0:u.id)||null},cne=()=>C.useContext(R_t);function $E(u){return(u==null?void 0:u.ownerDocument)||document}function I_t(){const u=navigator.userAgentData;return u!=null&&u.platform?u.platform:navigator.platform}function O_t(){const u=navigator.userAgentData;return u&&Array.isArray(u.brands)?u.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function dne(u){return $E(u).defaultView||window}function l1(u){return u?u instanceof dne(u).Element:!1}function n8e(u){return u?u instanceof dne(u).HTMLElement:!1}function j_t(u){if(typeof ShadowRoot>"u")return!1;const e=dne(u).ShadowRoot;return u instanceof e||u instanceof ShadowRoot}function H_t(u){if(u.mozInputSource===0&&u.isTrusted)return!0;const e=/Android/i;return(e.test(I_t())||e.test(O_t()))&&u.pointerType?u.type==="click"&&u.buttons===1:u.detail===0&&!u.pointerType}function V_t(u){return u.width===0&&u.height===0||u.width===1&&u.height===1&&u.pressure===0&&u.detail===0&&u.pointerType!=="mouse"||u.width<1&&u.height<1&&u.pressure===0&&u.detail===0}function i8e(u,e){const t=["mouse","pen"];return e||t.push("",void 0),t.includes(u)}function d4e(u){const e=C.useRef(u);return Gv(()=>{e.current=u}),e}const h4e="data-floating-ui-safe-polygon";function P8(u,e,t){return t&&!i8e(t)?0:typeof u=="number"?u:u==null?void 0:u[e]}const $_t=function(u,e){let{enabled:t=!0,delay:n=0,handleClose:i=null,mouseOnly:r=!1,restMs:a=0,move:o=!0}=e===void 0?{}:e;const{open:s,onOpenChange:l,dataRef:c,events:d,elements:{domReference:h,floating:E},refs:m}=u,g=cne(),f=u8e(),p=d4e(i),D=d4e(n),x=C.useRef(),b=C.useRef(),k=C.useRef(),A=C.useRef(),F=C.useRef(!0),S=C.useRef(!1),w=C.useRef(()=>{}),z=C.useCallback(()=>{var _;const L=(_=c.current.openEvent)==null?void 0:_.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[c]);C.useEffect(()=>{if(!t)return;function _(){clearTimeout(b.current),clearTimeout(A.current),F.current=!0}return d.on("dismiss",_),()=>{d.off("dismiss",_)}},[t,d]),C.useEffect(()=>{if(!t||!p.current||!s)return;function _(){z()&&l(!1)}const L=$E(E).documentElement;return L.addEventListener("mouseleave",_),()=>{L.removeEventListener("mouseleave",_)}},[E,s,l,t,p,c,z]);const N=C.useCallback(function(_){_===void 0&&(_=!0);const L=P8(D.current,"close",x.current);L&&!k.current?(clearTimeout(b.current),b.current=setTimeout(()=>l(!1),L)):_&&(clearTimeout(b.current),l(!1))},[D,l]),O=C.useCallback(()=>{w.current(),k.current=void 0},[]),y=C.useCallback(()=>{if(S.current){const _=$E(m.floating.current).body;_.style.pointerEvents="",_.removeAttribute(h4e),S.current=!1}},[m]);return C.useEffect(()=>{if(!t)return;function _(){return c.current.openEvent?["click","mousedown"].includes(c.current.openEvent.type):!1}function L(I){if(clearTimeout(b.current),F.current=!1,r&&!i8e(x.current)||a>0&&P8(D.current,"open")===0)return;c.current.openEvent=I;const H=P8(D.current,"open",x.current);H?b.current=setTimeout(()=>{l(!0)},H):l(!0)}function T(I){if(_())return;w.current();const H=$E(E);if(clearTimeout(A.current),p.current){s||clearTimeout(b.current),k.current=p.current({...u,tree:g,x:I.clientX,y:I.clientY,onClose(){y(),O(),N()}});const V=k.current;H.addEventListener("mousemove",V),w.current=()=>{H.removeEventListener("mousemove",V)};return}N()}function R(I){_()||p.current==null||p.current({...u,tree:g,x:I.clientX,y:I.clientY,onClose(){y(),O(),N()}})(I)}if(l1(h)){const I=h;return s&&I.addEventListener("mouseleave",R),E==null||E.addEventListener("mouseleave",R),o&&I.addEventListener("mousemove",L,{once:!0}),I.addEventListener("mouseenter",L),I.addEventListener("mouseleave",T),()=>{s&&I.removeEventListener("mouseleave",R),E==null||E.removeEventListener("mouseleave",R),o&&I.removeEventListener("mousemove",L),I.removeEventListener("mouseenter",L),I.removeEventListener("mouseleave",T)}}},[h,E,t,u,r,a,o,N,O,y,l,s,g,D,p,c]),Gv(()=>{var _;if(t&&s&&(_=p.current)!=null&&_.__options.blockPointerEvents&&z()){const R=$E(E).body;if(R.setAttribute(h4e,""),R.style.pointerEvents="none",S.current=!0,l1(h)&&E){var L,T;const I=h,H=g==null||(L=g.nodesRef.current.find(V=>V.id===f))==null||(T=L.context)==null?void 0:T.elements.floating;return H&&(H.style.pointerEvents=""),I.style.pointerEvents="auto",E.style.pointerEvents="auto",()=>{I.style.pointerEvents="",E.style.pointerEvents=""}}}},[t,s,f,E,h,g,p,c,z]),Gv(()=>{s||(x.current=void 0,O(),y())},[s,O,y]),C.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(A.current),y()},[t,O,y]),C.useMemo(()=>{if(!t)return{};function _(L){x.current=L.pointerType}return{reference:{onPointerDown:_,onPointerEnter:_,onMouseMove(){s||a===0||(clearTimeout(A.current),A.current=setTimeout(()=>{F.current||l(!0)},a))}},floating:{onMouseEnter(){clearTimeout(b.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),N(!1)}}}},[d,t,a,s,l,N])},r8e=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),a8e=()=>C.useContext(r8e),K_t=u=>{let{children:e,delay:t,timeoutMs:n=0}=u;const[i,r]=C.useReducer((s,l)=>({...s,...l}),{delay:t,timeoutMs:n,initialDelay:t,currentId:null,isInstantPhase:!1}),a=C.useRef(null),o=C.useCallback(s=>{r({currentId:s})},[]);return Gv(()=>{i.currentId?a.current===null?a.current=i.currentId:r({isInstantPhase:!0}):(r({isInstantPhase:!1}),a.current=null)},[i.currentId]),C.createElement(r8e.Provider,{value:C.useMemo(()=>({...i,setState:r,setCurrentId:o}),[i,r,o])},e)},W_t=(u,e)=>{let{open:t,onOpenChange:n}=u,{id:i}=e;const{currentId:r,setCurrentId:a,initialDelay:o,setState:s,timeoutMs:l}=a8e();C.useEffect(()=>{r&&(s({delay:{open:1,close:P8(o,"close")}}),r!==i&&n(!1))},[i,n,s,r,o]),C.useEffect(()=>{function c(){n(!1),s({delay:o,currentId:null})}if(!t&&r===i)if(l){const d=window.setTimeout(c,l);return()=>{clearTimeout(d)}}else c()},[t,s,r,i,n,o,l]),C.useEffect(()=>{t&&a(i)},[t,a,i])};function G_t(u){let e=u.activeElement;for(;((t=e)==null||(n=t.shadowRoot)==null?void 0:n.activeElement)!=null;){var t,n;e=e.shadowRoot.activeElement}return e}function E4e(u,e){if(!u||!e)return!1;const t=e.getRootNode&&e.getRootNode();if(u.contains(e))return!0;if(t&&j_t(t)){let n=e;do{if(n&&u===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function RV(u,e){let t=u.filter(i=>{var r;return i.parentId===e&&((r=i.context)==null?void 0:r.open)})||[],n=t;for(;n.length;)n=u.filter(i=>{var r;return(r=n)==null?void 0:r.some(a=>{var o;return i.parentId===a.id&&((o=i.context)==null?void 0:o.open)})})||[],t=t.concat(n);return t}function U_t(u){return"composedPath"in u?u.composedPath()[0]:u.target}const q_t=wm["useInsertionEffect".toString()],J_t=q_t||(u=>u());function o8e(u){const e=C.useRef(()=>{});return J_t(()=>{e.current=u}),C.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i!1),k=typeof h=="function"?b:h,A=C.useRef(!1),{escapeKeyBubbles:F,outsidePressBubbles:S}=Q_t(p);return C.useEffect(()=>{if(!t||!c)return;l.current.__escapeKeyBubbles=F,l.current.__outsidePressBubbles=S;function w(_){if(_.key==="Escape"){const L=D?RV(D.nodesRef.current,r):[];if(L.length>0){let T=!0;if(L.forEach(R=>{var I;if((I=R.context)!=null&&I.open&&!R.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function z(_){const L=A.current;if(A.current=!1,L||typeof k=="function"&&!k(_))return;const T=U_t(_);if(n8e(T)&&s){const H=s.ownerDocument.defaultView||window,V=T.scrollWidth>T.clientWidth,U=T.scrollHeight>T.clientHeight;let J=U&&_.offsetX>T.clientWidth;if(U&&H.getComputedStyle(T).direction==="rtl"&&(J=_.offsetX<=T.offsetWidth-T.clientWidth),J||V&&_.offsetY>T.clientHeight)return}const R=D&&RV(D.nodesRef.current,r).some(H=>{var V;return R8(_,(V=H.context)==null?void 0:V.elements.floating)});if(R8(_,s)||R8(_,o)||R)return;const I=D?RV(D.nodesRef.current,r):[];if(I.length>0){let H=!0;if(I.forEach(V=>{var U;if((U=V.context)!=null&&U.open&&!V.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:H_t(_)||V_t(_)}}),n(!1)}function N(){n(!1)}const O=$E(s);d&&O.addEventListener("keydown",w),k&&O.addEventListener(E,z);let y=[];return f&&(l1(o)&&(y=km(o)),l1(s)&&(y=y.concat(km(s))),!l1(a)&&a&&a.contextElement&&(y=y.concat(km(a.contextElement)))),y=y.filter(_=>{var L;return _!==((L=O.defaultView)==null?void 0:L.visualViewport)}),y.forEach(_=>{_.addEventListener("scroll",N,{passive:!0})}),()=>{d&&O.removeEventListener("keydown",w),k&&O.removeEventListener(E,z),y.forEach(_=>{_.removeEventListener("scroll",N)})}},[l,s,o,a,d,k,E,i,D,r,t,n,f,c,F,S,x]),C.useEffect(()=>{A.current=!1},[k,E]),C.useMemo(()=>c?{reference:{[Z_t[g]]:()=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[Y_t[E]]:()=>{A.current=!0}}}:{},[c,i,m,E,g,n])},eSt=function(u,e){let{open:t,onOpenChange:n,dataRef:i,events:r,refs:a,elements:{floating:o,domReference:s}}=u,{enabled:l=!0,keyboardOnly:c=!0}=e===void 0?{}:e;const d=C.useRef(""),h=C.useRef(!1),E=C.useRef();return C.useEffect(()=>{if(!l)return;const g=$E(o).defaultView||window;function f(){!t&&n8e(s)&&s===G_t($E(s))&&(h.current=!0)}return g.addEventListener("blur",f),()=>{g.removeEventListener("blur",f)}},[o,s,t,l]),C.useEffect(()=>{if(!l)return;function m(g){(g.type==="referencePress"||g.type==="escapeKey")&&(h.current=!0)}return r.on("dismiss",m),()=>{r.off("dismiss",m)}},[r,l]),C.useEffect(()=>()=>{clearTimeout(E.current)},[]),C.useMemo(()=>l?{reference:{onPointerDown(m){let{pointerType:g}=m;d.current=g,h.current=!!(g&&c)},onMouseLeave(){h.current=!1},onFocus(m){var g;h.current||m.type==="focus"&&((g=i.current.openEvent)==null?void 0:g.type)==="mousedown"&&i.current.openEvent&&R8(i.current.openEvent,s)||(i.current.openEvent=m.nativeEvent,n(!0))},onBlur(m){h.current=!1;const g=m.relatedTarget,f=l1(g)&&g.hasAttribute("data-floating-ui-focus-guard")&&g.getAttribute("data-type")==="outside";E.current=setTimeout(()=>{E4e(a.floating.current,g)||E4e(s,g)||f||n(!1)})}}}:{},[l,c,s,a,i,n])},tSt=function(u,e){let{open:t}=u,{enabled:n=!0,role:i="dialog"}=e===void 0?{}:e;const r=c4e(),a=c4e();return C.useMemo(()=>{const o={id:r,role:i};return n?i==="tooltip"?{reference:{"aria-describedby":t?r:void 0},floating:o}:{reference:{"aria-expanded":t?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":t?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...o,...i==="menu"&&{"aria-labelledby":a}}}:{}},[n,i,t,r,a])};function hne(u){u===void 0&&(u={});const{open:e=!1,onOpenChange:t,nodeId:n}=u,i=L_t(u),r=cne(),a=C.useRef(null),o=C.useRef({}),s=C.useState(()=>N_t())[0],[l,c]=C.useState(null),d=C.useCallback(p=>{const D=l1(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),contextElement:p}:p;i.refs.setReference(D)},[i.refs]),h=C.useCallback(p=>{(l1(p)||p===null)&&(a.current=p,c(p)),(l1(i.refs.reference.current)||i.refs.reference.current===null||p!==null&&!l1(p))&&i.refs.setReference(p)},[i.refs]),E=C.useMemo(()=>({...i.refs,setReference:h,setPositionReference:d,domReference:a}),[i.refs,h,d]),m=C.useMemo(()=>({...i.elements,domReference:l}),[i.elements,l]),g=o8e(t),f=C.useMemo(()=>({...i,refs:E,elements:m,dataRef:o,nodeId:n,events:s,open:e,onOpenChange:g}),[i,n,s,e,g,E,m]);return Gv(()=>{const p=r==null?void 0:r.nodesRef.current.find(D=>D.id===n);p&&(p.context=f)}),C.useMemo(()=>({...i,context:f,refs:E,reference:h,positionReference:d}),[i,E,f,h,d])}function IV(u,e,t){const n=new Map;return{...t==="floating"&&{tabIndex:-1},...u,...e.map(i=>i?i[t]:null).concat(u).reduce((i,r)=>(r&&Object.entries(r).forEach(a=>{let[o,s]=a;if(o.indexOf("on")===0){if(n.has(o)||n.set(o,[]),typeof s=="function"){var l;(l=n.get(o))==null||l.push(s),i[o]=function(){for(var c,d=arguments.length,h=new Array(d),E=0;Em(...h))}}}else i[o]=s}),i),{})}}const uSt=function(u){u===void 0&&(u=[]);const e=u,t=C.useCallback(r=>IV(r,u,"reference"),e),n=C.useCallback(r=>IV(r,u,"floating"),e),i=C.useCallback(r=>IV(r,u,"item"),u.map(r=>r==null?void 0:r.item));return C.useMemo(()=>({getReferenceProps:t,getFloatingProps:n,getItemProps:i}),[t,n,i])};function s8e({opened:u,floating:e,position:t,positionDependencies:n}){const[i,r]=C.useState(0);C.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return XSe(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,u,i,t]),To(()=>{e.update()},n),To(()=>{r(a=>a+1)},[u])}function nSt(u){const e=[ane(u.offset)];return u.middlewares.shift&&e.push(MI({limiter:KSe()})),u.middlewares.flip&&e.push(rne()),u.middlewares.inline&&e.push($Se()),e.push(t8e({element:u.arrowRef,padding:u.arrowOffset})),e}function iSt(u){const[e,t]=fs({value:u.opened,defaultValue:u.defaultOpened,finalValue:!1,onChange:u.onChange}),n=()=>{var a;(a=u.onClose)==null||a.call(u),t(!1)},i=()=>{var a,o;e?((a=u.onClose)==null||a.call(u),t(!1)):((o=u.onOpen)==null||o.call(u),t(!0))},r=hne({placement:u.position,middleware:[...nSt(u),...u.width==="target"?[WSe({apply({rects:a}){var o,s;Object.assign((s=(o=r.refs.floating.current)==null?void 0:o.style)!=null?s:{},{width:`${a.reference.width}px`})}})]:[]]});return s8e({opened:u.opened,position:u.position,positionDependencies:u.positionDependencies,floating:r}),To(()=>{var a;(a=u.onPositionChange)==null||a.call(u,r.placement)},[r.placement]),To(()=>{var a,o;u.opened?(o=u.onOpen)==null||o.call(u):(a=u.onClose)==null||a.call(u)},[u.opened]),{floating:r,controlled:typeof u.opened=="boolean",opened:e,onClose:n,onToggle:i}}const l8e={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[rSt,c8e]=U1(l8e.context);var aSt=Object.defineProperty,oSt=Object.defineProperties,sSt=Object.getOwnPropertyDescriptors,Dz=Object.getOwnPropertySymbols,d8e=Object.prototype.hasOwnProperty,h8e=Object.prototype.propertyIsEnumerable,m4e=(u,e,t)=>e in u?aSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,O_=(u,e)=>{for(var t in e||(e={}))d8e.call(e,t)&&m4e(u,t,e[t]);if(Dz)for(var t of Dz(e))h8e.call(e,t)&&m4e(u,t,e[t]);return u},lSt=(u,e)=>oSt(u,sSt(e)),cSt=(u,e)=>{var t={};for(var n in u)d8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Dz)for(var n of Dz(u))e.indexOf(n)<0&&h8e.call(u,n)&&(t[n]=u[n]);return t};const dSt={refProp:"ref",popupType:"dialog"},E8e=C.forwardRef((u,e)=>{const t=Qe("PopoverTarget",dSt,u),{children:n,refProp:i,popupType:r}=t,a=cSt(t,["children","refProp","popupType"]);if(!z6(n))throw new Error(l8e.children);const o=a,s=c8e(),l=q1(s.reference,n.ref,e),c=s.withRoles?{"aria-haspopup":r,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return C.cloneElement(n,O_(lSt(O_(O_(O_({},o),c),s.targetProps),{className:L9e(s.targetProps.className,o.className,n.props.className),[i]:l}),s.controlled?null:{onClick:s.onToggle}))});E8e.displayName="@mantine/core/PopoverTarget";var hSt=at((u,{radius:e,shadow:t})=>({dropdown:{position:"absolute",backgroundColor:u.white,background:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,padding:`${u.spacing.sm} ${u.spacing.md}`,boxShadow:u.shadows[t]||t||"none",borderRadius:u.fn.radius(e),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,zIndex:1}}));const ESt=hSt;var mSt=Object.defineProperty,g4e=Object.getOwnPropertySymbols,gSt=Object.prototype.hasOwnProperty,fSt=Object.prototype.propertyIsEnumerable,f4e=(u,e,t)=>e in u?mSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,MD=(u,e)=>{for(var t in e||(e={}))gSt.call(e,t)&&f4e(u,t,e[t]);if(g4e)for(var t of g4e(e))fSt.call(e,t)&&f4e(u,t,e[t]);return u};const p4e={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function pSt({transition:u,state:e,duration:t,timingFunction:n}){const i={transitionDuration:`${t}ms`,transitionTimingFunction:n};return typeof u=="string"?u in A_?MD(MD(MD({transitionProperty:A_[u].transitionProperty},i),A_[u].common),A_[u][p4e[e]]):null:MD(MD(MD({transitionProperty:u.transitionProperty},i),u.common),u[p4e[e]])}function DSt({duration:u,exitDuration:e,timingFunction:t,mounted:n,onEnter:i,onExit:r,onEntered:a,onExited:o}){const s=jr(),l=QA(),c=s.respectReducedMotion?l:!1,[d,h]=C.useState(c?0:u),[E,m]=C.useState(n?"entered":"exited"),g=C.useRef(-1),f=p=>{const D=p?i:r,x=p?a:o;m(p?"pre-entering":"pre-exiting"),window.clearTimeout(g.current);const b=c?0:p?u:e;if(h(b),b===0)typeof D=="function"&&D(),typeof x=="function"&&x(),m(p?"entered":"exited");else{const k=window.setTimeout(()=>{typeof D=="function"&&D(),m(p?"entering":"exiting")},10);g.current=window.setTimeout(()=>{window.clearTimeout(k),typeof x=="function"&&x(),m(p?"entered":"exited")},b)}};return To(()=>{f(n)},[n]),C.useEffect(()=>()=>window.clearTimeout(g.current),[]),{transitionDuration:d,transitionStatus:E,transitionTimingFunction:t||s.transitionTimingFunction}}function Jp({keepMounted:u,transition:e,duration:t=250,exitDuration:n=t,mounted:i,children:r,timingFunction:a,onExit:o,onEntered:s,onEnter:l,onExited:c}){const{transitionDuration:d,transitionStatus:h,transitionTimingFunction:E}=DSt({mounted:i,exitDuration:n,duration:t,timingFunction:a,onExit:o,onEntered:s,onEnter:l,onExited:c});return d===0?i?M.createElement(M.Fragment,null,r({})):u?r({display:"none"}):null:h==="exited"?u?r({display:"none"}):null:M.createElement(M.Fragment,null,r(pSt({transition:e,duration:d,state:h,timingFunction:E})))}Jp.displayName="@mantine/core/Transition";function Ene({children:u,active:e=!0,refProp:t="ref"}){const n=Gkt(e),i=q1(n,u==null?void 0:u.ref);return z6(u)?C.cloneElement(u,{[t]:i}):u}Ene.displayName="@mantine/core/FocusTrap";var xSt=Object.defineProperty,vSt=Object.defineProperties,CSt=Object.getOwnPropertyDescriptors,D4e=Object.getOwnPropertySymbols,bSt=Object.prototype.hasOwnProperty,kSt=Object.prototype.propertyIsEnumerable,x4e=(u,e,t)=>e in u?xSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,q4=(u,e)=>{for(var t in e||(e={}))bSt.call(e,t)&&x4e(u,t,e[t]);if(D4e)for(var t of D4e(e))kSt.call(e,t)&&x4e(u,t,e[t]);return u},j_=(u,e)=>vSt(u,CSt(e));function v4e(u,e,t,n){return u==="center"||n==="center"?{top:e}:u==="end"?{bottom:t}:u==="start"?{top:t}:{}}function C4e(u,e,t,n,i){return u==="center"||n==="center"?{left:e}:u==="end"?{[i==="ltr"?"right":"left"]:t}:u==="start"?{[i==="ltr"?"left":"right"]:t}:{}}const FSt={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function ySt({position:u,arrowSize:e,arrowOffset:t,arrowRadius:n,arrowPosition:i,arrowX:r,arrowY:a,dir:o}){const[s,l="center"]=u.split("-"),c={width:G(e),height:G(e),transform:"rotate(45deg)",position:"absolute",[FSt[s]]:G(n)},d=G(-e/2);return s==="left"?j_(q4(q4({},c),v4e(l,a,t,i)),{right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}):s==="right"?j_(q4(q4({},c),v4e(l,a,t,i)),{left:d,borderRightColor:"transparent",borderTopColor:"transparent"}):s==="top"?j_(q4(q4({},c),C4e(l,r,t,i,o)),{bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}):s==="bottom"?j_(q4(q4({},c),C4e(l,r,t,i,o)),{top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var ASt=Object.defineProperty,_St=Object.defineProperties,SSt=Object.getOwnPropertyDescriptors,xz=Object.getOwnPropertySymbols,m8e=Object.prototype.hasOwnProperty,g8e=Object.prototype.propertyIsEnumerable,b4e=(u,e,t)=>e in u?ASt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,BSt=(u,e)=>{for(var t in e||(e={}))m8e.call(e,t)&&b4e(u,t,e[t]);if(xz)for(var t of xz(e))g8e.call(e,t)&&b4e(u,t,e[t]);return u},wSt=(u,e)=>_St(u,SSt(e)),LSt=(u,e)=>{var t={};for(var n in u)m8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&xz)for(var n of xz(u))e.indexOf(n)<0&&g8e.call(u,n)&&(t[n]=u[n]);return t};const mne=C.forwardRef((u,e)=>{var t=u,{position:n,arrowSize:i,arrowOffset:r,arrowRadius:a,arrowPosition:o,visible:s,arrowX:l,arrowY:c}=t,d=LSt(t,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=jr();return s?M.createElement("div",wSt(BSt({},d),{ref:e,style:ySt({position:n,arrowSize:i,arrowOffset:r,arrowRadius:a,arrowPosition:o,dir:h.dir,arrowX:l,arrowY:c})})):null});mne.displayName="@mantine/core/FloatingArrow";var zSt=Object.defineProperty,MSt=Object.defineProperties,TSt=Object.getOwnPropertyDescriptors,vz=Object.getOwnPropertySymbols,f8e=Object.prototype.hasOwnProperty,p8e=Object.prototype.propertyIsEnumerable,k4e=(u,e,t)=>e in u?zSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TD=(u,e)=>{for(var t in e||(e={}))f8e.call(e,t)&&k4e(u,t,e[t]);if(vz)for(var t of vz(e))p8e.call(e,t)&&k4e(u,t,e[t]);return u},H_=(u,e)=>MSt(u,TSt(e)),NSt=(u,e)=>{var t={};for(var n in u)f8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&vz)for(var n of vz(u))e.indexOf(n)<0&&p8e.call(u,n)&&(t[n]=u[n]);return t};const PSt={};function D8e(u){var e;const t=Qe("PopoverDropdown",PSt,u),{style:n,className:i,children:r,onKeyDownCapture:a}=t,o=NSt(t,["style","className","children","onKeyDownCapture"]),s=c8e(),{classes:l,cx:c}=ESt({radius:s.radius,shadow:s.shadow},{name:s.__staticSelector,classNames:s.classNames,styles:s.styles,unstyled:s.unstyled,variant:s.variant}),d=n_e({opened:s.opened,shouldReturnFocus:s.returnFocus}),h=s.withRoles?{"aria-labelledby":s.getTargetId(),id:s.getDropdownId(),role:"dialog"}:{};return s.disabled?null:M.createElement(XA,H_(TD({},s.portalProps),{withinPortal:s.withinPortal}),M.createElement(Jp,H_(TD({mounted:s.opened},s.transitionProps),{transition:s.transitionProps.transition||"fade",duration:(e=s.transitionProps.duration)!=null?e:150,keepMounted:s.keepMounted,exitDuration:typeof s.transitionProps.exitDuration=="number"?s.transitionProps.exitDuration:s.transitionProps.duration}),E=>{var m,g;return M.createElement(Ene,{active:s.trapFocus},M.createElement(Ct,TD(H_(TD({},h),{tabIndex:-1,ref:s.floating,style:H_(TD(TD({},n),E),{zIndex:s.zIndex,top:(m=s.y)!=null?m:0,left:(g=s.x)!=null?g:0,width:s.width==="target"?void 0:G(s.width)}),className:c(l.dropdown,i),onKeyDownCapture:Ebt(s.onClose,{active:s.closeOnEscape,onTrigger:d,onKeyDown:a}),"data-position":s.placement}),o),r,M.createElement(mne,{ref:s.arrowRef,arrowX:s.arrowX,arrowY:s.arrowY,visible:s.withArrow,position:s.placement,arrowSize:s.arrowSize,arrowRadius:s.arrowRadius,arrowOffset:s.arrowOffset,arrowPosition:s.arrowPosition,className:l.arrow})))}))}D8e.displayName="@mantine/core/PopoverDropdown";function x8e(u,e){if(u==="rtl"&&(e.includes("right")||e.includes("left"))){const[t,n]=e.split("-"),i=t==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return e}var F4e=Object.getOwnPropertySymbols,RSt=Object.prototype.hasOwnProperty,ISt=Object.prototype.propertyIsEnumerable,OSt=(u,e)=>{var t={};for(var n in u)RSt.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&F4e)for(var n of F4e(u))e.indexOf(n)<0&&ISt.call(u,n)&&(t[n]=u[n]);return t};const jSt={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:fd("popover"),__staticSelector:"Popover",width:"max-content"};function hs(u){var e,t,n,i,r,a;const o=C.useRef(null),s=Qe("Popover",jSt,u),{children:l,position:c,offset:d,onPositionChange:h,positionDependencies:E,opened:m,transitionProps:g,width:f,middlewares:p,withArrow:D,arrowSize:x,arrowOffset:b,arrowRadius:k,arrowPosition:A,unstyled:F,classNames:S,styles:w,closeOnClickOutside:z,withinPortal:N,portalProps:O,closeOnEscape:y,clickOutsideEvents:_,trapFocus:L,onClose:T,onOpen:R,onChange:I,zIndex:H,radius:V,shadow:U,id:J,defaultOpened:Y,__staticSelector:X,withRoles:re,disabled:ge,returnFocus:_e,variant:Ve,keepMounted:Ue}=s,qe=OSt(s,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[Se,de]=C.useState(null),[he,Be]=C.useState(null),je=Jl(J),bt=jr(),qt=iSt({middlewares:p,width:f,position:x8e(bt.dir,c),offset:typeof d=="number"?d+(D?x/2:0):d,arrowRef:o,arrowOffset:b,onPositionChange:h,positionDependencies:E,opened:m,defaultOpened:Y,onChange:I,onOpen:R,onClose:T});Nkt(()=>qt.opened&&z&&qt.onClose(),_,[Se,he]);const ou=C.useCallback(oe=>{de(oe),qt.floating.reference(oe)},[qt.floating.reference]),Vt=C.useCallback(oe=>{Be(oe),qt.floating.floating(oe)},[qt.floating.floating]);return M.createElement(rSt,{value:{returnFocus:_e,disabled:ge,controlled:qt.controlled,reference:ou,floating:Vt,x:qt.floating.x,y:qt.floating.y,arrowX:(n=(t=(e=qt.floating)==null?void 0:e.middlewareData)==null?void 0:t.arrow)==null?void 0:n.x,arrowY:(a=(r=(i=qt.floating)==null?void 0:i.middlewareData)==null?void 0:r.arrow)==null?void 0:a.y,opened:qt.opened,arrowRef:o,transitionProps:g,width:f,withArrow:D,arrowSize:x,arrowOffset:b,arrowRadius:k,arrowPosition:A,placement:qt.floating.placement,trapFocus:L,withinPortal:N,portalProps:O,zIndex:H,radius:V,shadow:U,closeOnEscape:y,onClose:qt.onClose,onToggle:qt.onToggle,getTargetId:()=>`${je}-target`,getDropdownId:()=>`${je}-dropdown`,withRoles:re,targetProps:qe,__staticSelector:X,classNames:S,styles:w,unstyled:F,variant:Ve,keepMounted:Ue}},l)}hs.Target=E8e;hs.Dropdown=D8e;hs.displayName="@mantine/core/Popover";var HSt=Object.defineProperty,Cz=Object.getOwnPropertySymbols,v8e=Object.prototype.hasOwnProperty,C8e=Object.prototype.propertyIsEnumerable,y4e=(u,e,t)=>e in u?HSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,VSt=(u,e)=>{for(var t in e||(e={}))v8e.call(e,t)&&y4e(u,t,e[t]);if(Cz)for(var t of Cz(e))C8e.call(e,t)&&y4e(u,t,e[t]);return u},$St=(u,e)=>{var t={};for(var n in u)v8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Cz)for(var n of Cz(u))e.indexOf(n)<0&&C8e.call(u,n)&&(t[n]=u[n]);return t};function KSt(u){var e=u,{children:t,component:n="div",maxHeight:i=220,direction:r="column",id:a,innerRef:o,__staticSelector:s,styles:l,classNames:c,unstyled:d}=e,h=$St(e,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:E}=Q9t(null,{name:s,styles:l,classNames:c,unstyled:d});return M.createElement(hs.Dropdown,VSt({p:0,onMouseDown:m=>m.preventDefault()},h),M.createElement("div",{style:{maxHeight:G(i),display:"flex"}},M.createElement(Ct,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:m=>m.preventDefault(),style:{flex:1,overflowY:n!==zI?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:o},M.createElement("div",{className:E.itemsWrapper,style:{flexDirection:r}},t))))}function Fm({opened:u,transitionProps:e={transition:"fade",duration:0},shadow:t,withinPortal:n,portalProps:i,children:r,__staticSelector:a,onDirectionChange:o,switchDirectionOnFlip:s,zIndex:l,dropdownPosition:c,positionDependencies:d=[],classNames:h,styles:E,unstyled:m,readOnly:g,variant:f}){return M.createElement(hs,{unstyled:m,classNames:h,styles:E,width:"target",withRoles:!1,opened:u,middlewares:{flip:c==="flip",shift:!1},position:c==="flip"?"bottom":c,positionDependencies:d,zIndex:l,__staticSelector:a,withinPortal:n,portalProps:i,transitionProps:e,shadow:t,disabled:g,onPositionChange:p=>s&&(o==null?void 0:o(p==="top"?"column-reverse":"column")),variant:f},r)}Fm.Target=hs.Target;Fm.Dropdown=KSt;var WSt=Object.defineProperty,GSt=Object.defineProperties,USt=Object.getOwnPropertyDescriptors,bz=Object.getOwnPropertySymbols,b8e=Object.prototype.hasOwnProperty,k8e=Object.prototype.propertyIsEnumerable,A4e=(u,e,t)=>e in u?WSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,V_=(u,e)=>{for(var t in e||(e={}))b8e.call(e,t)&&A4e(u,t,e[t]);if(bz)for(var t of bz(e))k8e.call(e,t)&&A4e(u,t,e[t]);return u},qSt=(u,e)=>GSt(u,USt(e)),JSt=(u,e)=>{var t={};for(var n in u)b8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&bz)for(var n of bz(u))e.indexOf(n)<0&&k8e.call(u,n)&&(t[n]=u[n]);return t};function F8e(u,e,t){const n=Qe(u,e,t),{label:i,description:r,error:a,required:o,classNames:s,styles:l,className:c,unstyled:d,__staticSelector:h,sx:E,errorProps:m,labelProps:g,descriptionProps:f,wrapperProps:p,id:D,size:x,style:b,inputContainer:k,inputWrapperOrder:A,withAsterisk:F,variant:S}=n,w=JSt(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=Jl(D),{systemStyles:N,rest:O}=w4(w),y=V_({label:i,description:r,error:a,required:o,classNames:s,className:c,__staticSelector:h,sx:E,errorProps:m,labelProps:g,descriptionProps:f,unstyled:d,styles:l,id:z,size:x,style:b,inputContainer:k,inputWrapperOrder:A,withAsterisk:F,variant:S},p);return qSt(V_({},O),{classNames:s,styles:l,unstyled:d,wrapperProps:V_(V_({},y),N),inputProps:{required:o,classNames:s,styles:l,unstyled:d,id:z,size:x,__staticSelector:h,error:a,variant:S}})}var ZSt=at((u,e,{size:t})=>({label:{display:"inline-block",fontSize:ye({size:t,sizes:u.fontSizes}),fontWeight:500,color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:u.fn.variant({variant:"filled",color:"red"}).background}}));const YSt=ZSt;var QSt=Object.defineProperty,kz=Object.getOwnPropertySymbols,y8e=Object.prototype.hasOwnProperty,A8e=Object.prototype.propertyIsEnumerable,_4e=(u,e,t)=>e in u?QSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XSt=(u,e)=>{for(var t in e||(e={}))y8e.call(e,t)&&_4e(u,t,e[t]);if(kz)for(var t of kz(e))A8e.call(e,t)&&_4e(u,t,e[t]);return u},e8t=(u,e)=>{var t={};for(var n in u)y8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&kz)for(var n of kz(u))e.indexOf(n)<0&&A8e.call(u,n)&&(t[n]=u[n]);return t};const t8t={labelElement:"label",size:"sm"},gne=C.forwardRef((u,e)=>{const t=Qe("InputLabel",t8t,u),{labelElement:n,children:i,required:r,size:a,classNames:o,styles:s,unstyled:l,className:c,htmlFor:d,__staticSelector:h,variant:E,onMouseDown:m}=t,g=e8t(t,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:f,cx:p}=YSt(null,{name:["InputWrapper",h],classNames:o,styles:s,unstyled:l,variant:E,size:a});return M.createElement(Ct,XSt({component:n,ref:e,className:p(f.label,c),htmlFor:n==="label"?d:void 0,onMouseDown:D=>{m==null||m(D),!D.defaultPrevented&&D.detail>1&&D.preventDefault()}},g),i,r&&M.createElement("span",{className:f.required,"aria-hidden":!0}," *"))});gne.displayName="@mantine/core/InputLabel";var u8t=at((u,e,{size:t})=>({error:{wordBreak:"break-word",color:u.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${ye({size:t,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1.2,display:"block"}}));const n8t=u8t;var i8t=Object.defineProperty,Fz=Object.getOwnPropertySymbols,_8e=Object.prototype.hasOwnProperty,S8e=Object.prototype.propertyIsEnumerable,S4e=(u,e,t)=>e in u?i8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,r8t=(u,e)=>{for(var t in e||(e={}))_8e.call(e,t)&&S4e(u,t,e[t]);if(Fz)for(var t of Fz(e))S8e.call(e,t)&&S4e(u,t,e[t]);return u},a8t=(u,e)=>{var t={};for(var n in u)_8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Fz)for(var n of Fz(u))e.indexOf(n)<0&&S8e.call(u,n)&&(t[n]=u[n]);return t};const o8t={size:"sm"},fne=C.forwardRef((u,e)=>{const t=Qe("InputError",o8t,u),{children:n,className:i,classNames:r,styles:a,unstyled:o,size:s,__staticSelector:l,variant:c}=t,d=a8t(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:E}=n8t(null,{name:["InputWrapper",l],classNames:r,styles:a,unstyled:o,variant:c,size:s});return M.createElement(_u,r8t({className:E(h.error,i),ref:e},d),n)});fne.displayName="@mantine/core/InputError";var s8t=at((u,e,{size:t})=>({description:{wordBreak:"break-word",color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],fontSize:`calc(${ye({size:t,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1.2,display:"block"}}));const l8t=s8t;var c8t=Object.defineProperty,yz=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,w8e=Object.prototype.propertyIsEnumerable,B4e=(u,e,t)=>e in u?c8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,d8t=(u,e)=>{for(var t in e||(e={}))B8e.call(e,t)&&B4e(u,t,e[t]);if(yz)for(var t of yz(e))w8e.call(e,t)&&B4e(u,t,e[t]);return u},h8t=(u,e)=>{var t={};for(var n in u)B8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&yz)for(var n of yz(u))e.indexOf(n)<0&&w8e.call(u,n)&&(t[n]=u[n]);return t};const E8t={size:"sm"},pne=C.forwardRef((u,e)=>{const t=Qe("InputDescription",E8t,u),{children:n,className:i,classNames:r,styles:a,unstyled:o,size:s,__staticSelector:l,variant:c}=t,d=h8t(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:E}=l8t(null,{name:["InputWrapper",l],classNames:r,styles:a,unstyled:o,variant:c,size:s});return M.createElement(_u,d8t({color:"dimmed",className:E(h.description,i),ref:e,unstyled:o},d),n)});pne.displayName="@mantine/core/InputDescription";const L8e=C.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),m8t=L8e.Provider,g8t=()=>C.useContext(L8e);function f8t(u,{hasDescription:e,hasError:t}){const n=u.findIndex(s=>s==="input"),i=u[n-1],r=u[n+1];return{offsetBottom:e&&r==="description"||t&&r==="error",offsetTop:e&&i==="description"||t&&i==="error"}}var p8t=Object.defineProperty,D8t=Object.defineProperties,x8t=Object.getOwnPropertyDescriptors,w4e=Object.getOwnPropertySymbols,v8t=Object.prototype.hasOwnProperty,C8t=Object.prototype.propertyIsEnumerable,L4e=(u,e,t)=>e in u?p8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,b8t=(u,e)=>{for(var t in e||(e={}))v8t.call(e,t)&&L4e(u,t,e[t]);if(w4e)for(var t of w4e(e))C8t.call(e,t)&&L4e(u,t,e[t]);return u},k8t=(u,e)=>D8t(u,x8t(e)),F8t=at(u=>({root:k8t(b8t({},u.fn.fontStyles()),{lineHeight:u.lineHeight})}));const y8t=F8t;var A8t=Object.defineProperty,_8t=Object.defineProperties,S8t=Object.getOwnPropertyDescriptors,Az=Object.getOwnPropertySymbols,z8e=Object.prototype.hasOwnProperty,M8e=Object.prototype.propertyIsEnumerable,z4e=(u,e,t)=>e in u?A8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,J4=(u,e)=>{for(var t in e||(e={}))z8e.call(e,t)&&z4e(u,t,e[t]);if(Az)for(var t of Az(e))M8e.call(e,t)&&z4e(u,t,e[t]);return u},M4e=(u,e)=>_8t(u,S8t(e)),B8t=(u,e)=>{var t={};for(var n in u)z8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Az)for(var n of Az(u))e.indexOf(n)<0&&M8e.call(u,n)&&(t[n]=u[n]);return t};const w8t={labelElement:"label",size:"sm",inputContainer:u=>u,inputWrapperOrder:["label","description","input","error"]},T8e=C.forwardRef((u,e)=>{const t=Qe("InputWrapper",w8t,u),{className:n,label:i,children:r,required:a,id:o,error:s,description:l,labelElement:c,labelProps:d,descriptionProps:h,errorProps:E,classNames:m,styles:g,size:f,inputContainer:p,__staticSelector:D,unstyled:x,inputWrapperOrder:b,withAsterisk:k,variant:A}=t,F=B8t(t,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:S,cx:w}=y8t(null,{classNames:m,styles:g,name:["InputWrapper",D],unstyled:x,variant:A,size:f}),z={classNames:m,styles:g,unstyled:x,size:f,variant:A,__staticSelector:D},N=typeof k=="boolean"?k:a,O=o?`${o}-error`:E==null?void 0:E.id,y=o?`${o}-description`:h==null?void 0:h.id,L=`${!!s&&typeof s!="boolean"?O:""} ${l?y:""}`,T=L.trim().length>0?L.trim():void 0,R=i&&M.createElement(gne,J4(J4({key:"label",labelElement:c,id:o?`${o}-label`:void 0,htmlFor:o,required:N},z),d),i),I=l&&M.createElement(pne,M4e(J4(J4({key:"description"},h),z),{size:(h==null?void 0:h.size)||z.size,id:(h==null?void 0:h.id)||y}),l),H=M.createElement(C.Fragment,{key:"input"},p(r)),V=typeof s!="boolean"&&s&&M.createElement(fne,M4e(J4(J4({},E),z),{size:(E==null?void 0:E.size)||z.size,key:"error",id:(E==null?void 0:E.id)||O}),s),U=b.map(J=>{switch(J){case"label":return R;case"input":return H;case"description":return I;case"error":return V;default:return null}});return M.createElement(m8t,{value:J4({describedBy:T},f8t(b,{hasDescription:!!I,hasError:!!V}))},M.createElement(Ct,J4({className:w(S.root,n),ref:e},F),U))});T8e.displayName="@mantine/core/InputWrapper";var L8t=Object.defineProperty,_z=Object.getOwnPropertySymbols,N8e=Object.prototype.hasOwnProperty,P8e=Object.prototype.propertyIsEnumerable,T4e=(u,e,t)=>e in u?L8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,z8t=(u,e)=>{for(var t in e||(e={}))N8e.call(e,t)&&T4e(u,t,e[t]);if(_z)for(var t of _z(e))P8e.call(e,t)&&T4e(u,t,e[t]);return u},M8t=(u,e)=>{var t={};for(var n in u)N8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&_z)for(var n of _z(u))e.indexOf(n)<0&&P8e.call(u,n)&&(t[n]=u[n]);return t};const T8t={},R8e=C.forwardRef((u,e)=>{const t=Qe("InputPlaceholder",T8t,u),{sx:n}=t,i=M8t(t,["sx"]);return M.createElement(Ct,z8t({component:"span",sx:[r=>r.fn.placeholderStyles(),...EI(n)],ref:e},i))});R8e.displayName="@mantine/core/InputPlaceholder";var N8t=Object.defineProperty,P8t=Object.defineProperties,R8t=Object.getOwnPropertyDescriptors,N4e=Object.getOwnPropertySymbols,I8t=Object.prototype.hasOwnProperty,O8t=Object.prototype.propertyIsEnumerable,P4e=(u,e,t)=>e in u?N8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$_=(u,e)=>{for(var t in e||(e={}))I8t.call(e,t)&&P4e(u,t,e[t]);if(N4e)for(var t of N4e(e))O8t.call(e,t)&&P4e(u,t,e[t]);return u},OV=(u,e)=>P8t(u,R8t(e));const kr={xs:G(30),sm:G(36),md:G(42),lg:G(50),xl:G(60)},j8t=["default","filled","unstyled"];function H8t({theme:u,variant:e}){return j8t.includes(e)?e==="default"?{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,transition:"border-color 100ms ease","&:focus, &:focus-within":u.focusRingStyles.inputStyles(u)}:e==="filled"?{border:`${G(1)} solid transparent`,backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],"&:focus, &:focus-within":u.focusRingStyles.inputStyles(u)}:{borderWidth:0,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,backgroundColor:"transparent",minHeight:G(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var V8t=at((u,{multiline:e,radius:t,invalid:n,rightSectionWidth:i,withRightSection:r,iconWidth:a,offsetBottom:o,offsetTop:s,pointer:l},{variant:c,size:d})=>{const h=u.fn.variant({variant:"filled",color:"red"}).background,E=c==="default"||c==="filled"?{minHeight:ye({size:d,sizes:kr}),paddingLeft:`calc(${ye({size:d,sizes:kr})} / 3)`,paddingRight:r?i||ye({size:d,sizes:kr}):`calc(${ye({size:d,sizes:kr})} / 3)`,borderRadius:u.fn.radius(t)}:c==="unstyled"&&r?{paddingRight:i||ye({size:d,sizes:kr})}:null;return{wrapper:{position:"relative",marginTop:s?`calc(${u.spacing.xs} / 2)`:void 0,marginBottom:o?`calc(${u.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:OV($_($_(OV($_({},u.fn.fontStyles()),{height:e?c==="unstyled"?void 0:"auto":ye({size:d,sizes:kr}),WebkitTapHighlightColor:"transparent",lineHeight:e?u.lineHeight:`calc(${ye({size:d,sizes:kr})} - ${G(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:ye({size:d,sizes:u.fontSizes}),width:"100%",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,display:"block",textAlign:"left",cursor:l?"pointer":void 0}),H8t({theme:u,variant:c})),E),{"&:disabled, &[data-disabled]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:u.colors.dark[2]}},"&[data-invalid]":{color:h,borderColor:h,"&::placeholder":{opacity:1,color:h}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?G(a):ye({size:d,sizes:kr})},"&::placeholder":OV($_({},u.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?G(a):ye({size:d,sizes:kr}),color:n?u.colors.red[u.colorScheme==="dark"?6:7]:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:i||ye({size:d,sizes:kr})}}});const $8t=V8t;var K8t=Object.defineProperty,W8t=Object.defineProperties,G8t=Object.getOwnPropertyDescriptors,Sz=Object.getOwnPropertySymbols,I8e=Object.prototype.hasOwnProperty,O8e=Object.prototype.propertyIsEnumerable,R4e=(u,e,t)=>e in u?K8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,K_=(u,e)=>{for(var t in e||(e={}))I8e.call(e,t)&&R4e(u,t,e[t]);if(Sz)for(var t of Sz(e))O8e.call(e,t)&&R4e(u,t,e[t]);return u},I4e=(u,e)=>W8t(u,G8t(e)),U8t=(u,e)=>{var t={};for(var n in u)I8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Sz)for(var n of Sz(u))e.indexOf(n)<0&&O8e.call(u,n)&&(t[n]=u[n]);return t};const q8t={size:"sm",variant:"default"},Zp=C.forwardRef((u,e)=>{const t=Qe("Input",q8t,u),{className:n,error:i,required:r,disabled:a,variant:o,icon:s,style:l,rightSectionWidth:c,iconWidth:d,rightSection:h,rightSectionProps:E,radius:m,size:g,wrapperProps:f,classNames:p,styles:D,__staticSelector:x,multiline:b,sx:k,unstyled:A,pointer:F}=t,S=U8t(t,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:w,offsetTop:z,describedBy:N}=g8t(),{classes:O,cx:y}=$8t({radius:m,multiline:b,invalid:!!i,rightSectionWidth:c?G(c):void 0,iconWidth:d,withRightSection:!!h,offsetBottom:w,offsetTop:z,pointer:F},{classNames:p,styles:D,name:["Input",x],unstyled:A,variant:o,size:g}),{systemStyles:_,rest:L}=w4(S);return M.createElement(Ct,K_(K_({className:y(O.wrapper,n),sx:k,style:l},_),f),s&&M.createElement("div",{className:O.icon},s),M.createElement(Ct,I4e(K_({component:"input"},L),{ref:e,required:r,"aria-invalid":!!i,"aria-describedby":N,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!s||void 0,"data-invalid":!!i||void 0,className:O.input})),h&&M.createElement("div",I4e(K_({},E),{className:O.rightSection}),h))});Zp.displayName="@mantine/core/Input";Zp.Wrapper=T8e;Zp.Label=gne;Zp.Description=pne;Zp.Error=fne;Zp.Placeholder=R8e;const Ra=Zp;var J8t=Object.defineProperty,Bz=Object.getOwnPropertySymbols,j8e=Object.prototype.hasOwnProperty,H8e=Object.prototype.propertyIsEnumerable,O4e=(u,e,t)=>e in u?J8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Z8t=(u,e)=>{for(var t in e||(e={}))j8e.call(e,t)&&O4e(u,t,e[t]);if(Bz)for(var t of Bz(e))H8e.call(e,t)&&O4e(u,t,e[t]);return u},Y8t=(u,e)=>{var t={};for(var n in u)j8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Bz)for(var n of Bz(u))e.indexOf(n)<0&&H8e.call(u,n)&&(t[n]=u[n]);return t};function Q8t(u){const e=u,{style:t}=e,n=Y8t(e,["style"]);return M.createElement("svg",Z8t({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},n),M.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var X8t=Object.defineProperty,eBt=Object.defineProperties,tBt=Object.getOwnPropertyDescriptors,j4e=Object.getOwnPropertySymbols,uBt=Object.prototype.hasOwnProperty,nBt=Object.prototype.propertyIsEnumerable,H4e=(u,e,t)=>e in u?X8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,iBt=(u,e)=>{for(var t in e||(e={}))uBt.call(e,t)&&H4e(u,t,e[t]);if(j4e)for(var t of j4e(e))nBt.call(e,t)&&H4e(u,t,e[t]);return u},rBt=(u,e)=>eBt(u,tBt(e));const V8e=C.createContext(null);function aBt({spacing:u,children:e}){return M.createElement(V8e.Provider,{value:{spacing:u}},e)}function oBt(){const u=C.useContext(V8e);return u?rBt(iBt({},u),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var sBt=at((u,{spacing:e})=>({root:{display:"flex",paddingLeft:ye({size:e,sizes:u.spacing})}}));const lBt=sBt;var cBt=Object.defineProperty,wz=Object.getOwnPropertySymbols,$8e=Object.prototype.hasOwnProperty,K8e=Object.prototype.propertyIsEnumerable,V4e=(u,e,t)=>e in u?cBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,dBt=(u,e)=>{for(var t in e||(e={}))$8e.call(e,t)&&V4e(u,t,e[t]);if(wz)for(var t of wz(e))K8e.call(e,t)&&V4e(u,t,e[t]);return u},hBt=(u,e)=>{var t={};for(var n in u)$8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wz)for(var n of wz(u))e.indexOf(n)<0&&K8e.call(u,n)&&(t[n]=u[n]);return t};const EBt={},W8e=C.forwardRef((u,e)=>{const t=Qe("AvatarGroup",EBt,u),{children:n,spacing:i="sm",unstyled:r,className:a,variant:o}=t,s=hBt(t,["children","spacing","unstyled","className","variant"]),{classes:l,cx:c}=lBt({spacing:i},{name:"AvatarGroup",unstyled:r,variant:o});return M.createElement(aBt,{spacing:i},M.createElement(Ct,dBt({ref:e,className:c(l.root,a)},s),n))});W8e.displayName="@mantine/core/AvatarGroup";var mBt=Object.defineProperty,gBt=Object.defineProperties,fBt=Object.getOwnPropertyDescriptors,$4e=Object.getOwnPropertySymbols,pBt=Object.prototype.hasOwnProperty,DBt=Object.prototype.propertyIsEnumerable,K4e=(u,e,t)=>e in u?mBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,UC=(u,e)=>{for(var t in e||(e={}))pBt.call(e,t)&&K4e(u,t,e[t]);if($4e)for(var t of $4e(e))DBt.call(e,t)&&K4e(u,t,e[t]);return u},W4e=(u,e)=>gBt(u,fBt(e));const xBt=["filled","light","gradient","outline"],W_={xs:G(16),sm:G(26),md:G(38),lg:G(56),xl:G(84)};function vBt({withinGroup:u,spacing:e,theme:t}){return u?{marginLeft:`calc(${ye({size:e,sizes:t.spacing})} * -1)`,backgroundColor:`${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`,border:`${G(2)} solid ${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`}:null}function CBt({theme:u,variant:e,color:t,gradient:n}){const i=u.fn.variant({variant:e,color:t,gradient:n});return xBt.includes(e)?{placeholder:{color:i.color,backgroundColor:i.background,backgroundImage:e==="gradient"?i.background:void 0,border:`${G(e==="gradient"?0:1)} solid ${i.border}`},placeholderIcon:{color:i.color}}:{}}var bBt=at((u,{radius:e,withinGroup:t,spacing:n,color:i,gradient:r},{variant:a,size:o})=>{const s=CBt({theme:u,color:i,gradient:r,variant:a});return{root:UC(W4e(UC({},u.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:u.fn.radius(e),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:ye({size:o,sizes:W_}),minWidth:ye({size:o,sizes:W_}),height:ye({size:o,sizes:W_})}),vBt({withinGroup:t,spacing:n,theme:u})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:UC(W4e(UC({},u.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:u.fn.radius(e),fontSize:`calc(${ye({size:o,sizes:W_})} / 2.5)`}),s.placeholder),placeholderIcon:UC({width:"70%",height:"70%"},s.placeholderIcon)}});const kBt=bBt;var FBt=Object.defineProperty,yBt=Object.defineProperties,ABt=Object.getOwnPropertyDescriptors,Lz=Object.getOwnPropertySymbols,G8e=Object.prototype.hasOwnProperty,U8e=Object.prototype.propertyIsEnumerable,G4e=(u,e,t)=>e in u?FBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,U4e=(u,e)=>{for(var t in e||(e={}))G8e.call(e,t)&&G4e(u,t,e[t]);if(Lz)for(var t of Lz(e))U8e.call(e,t)&&G4e(u,t,e[t]);return u},_Bt=(u,e)=>yBt(u,ABt(e)),SBt=(u,e)=>{var t={};for(var n in u)G8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Lz)for(var n of Lz(u))e.indexOf(n)<0&&U8e.call(u,n)&&(t[n]=u[n]);return t};const BBt={size:"md",color:"gray",variant:"light"},Dne=C.forwardRef((u,e)=>{const t=Qe("Avatar",BBt,u),{className:n,size:i,src:r,alt:a,radius:o,children:s,color:l,variant:c,gradient:d,classNames:h,styles:E,imageProps:m,unstyled:g}=t,f=SBt(t,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),p=oBt(),[D,x]=C.useState(!r),{classes:b,cx:k}=kBt({color:l,radius:o,withinGroup:p.withinGroup,spacing:p.spacing,gradient:d},{classNames:h,styles:E,unstyled:g,name:"Avatar",variant:c,size:i});return C.useEffect(()=>{x(!r)},[r]),M.createElement(Ct,U4e({component:"div",className:k(b.root,n),ref:e},f),D?M.createElement("div",{className:b.placeholder,title:a},s||M.createElement(Q8t,{className:b.placeholderIcon})):M.createElement("img",_Bt(U4e({},m),{className:b.image,src:r,alt:a,onError:()=>x(!0)})))});Dne.displayName="@mantine/core/Avatar";Dne.Group=W8e;const q4e=Dne;var wBt=Object.defineProperty,LBt=Object.defineProperties,zBt=Object.getOwnPropertyDescriptors,J4e=Object.getOwnPropertySymbols,MBt=Object.prototype.hasOwnProperty,TBt=Object.prototype.propertyIsEnumerable,Z4e=(u,e,t)=>e in u?wBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jV=(u,e)=>{for(var t in e||(e={}))MBt.call(e,t)&&Z4e(u,t,e[t]);if(J4e)for(var t of J4e(e))TBt.call(e,t)&&Z4e(u,t,e[t]);return u},NBt=(u,e)=>LBt(u,zBt(e));const PBt=["light","filled","outline","dot","gradient"],HV={xs:{fontSize:G(9),height:G(16)},sm:{fontSize:G(10),height:G(18)},md:{fontSize:G(11),height:G(20)},lg:{fontSize:G(13),height:G(26)},xl:{fontSize:G(16),height:G(32)}},RBt={xs:G(4),sm:G(4),md:G(6),lg:G(8),xl:G(10)};function IBt({theme:u,variant:e,color:t,size:n,gradient:i}){if(!PBt.includes(e))return null;if(e==="dot"){const a=ye({size:n,sizes:RBt});return{backgroundColor:"transparent",color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[3]}`,paddingLeft:`calc(${ye({size:n,sizes:u.spacing})} / 1.5 - ${a} / 2)`,"&::before":{content:'""',display:"block",width:a,height:a,borderRadius:a,backgroundColor:u.fn.themeColor(t,u.colorScheme==="dark"?4:u.fn.primaryShade("light"),!0),marginRight:a}}}const r=u.fn.variant({color:t,variant:e,gradient:i});return{background:r.background,color:r.color,border:`${G(e==="gradient"?0:1)} solid ${r.border}`}}var OBt=at((u,{color:e,radius:t,gradient:n,fullWidth:i},{variant:r,size:a})=>{const{fontSize:o,height:s}=a in HV?HV[a]:HV.md;return{leftSection:{marginRight:`calc(${u.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${u.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:jV(NBt(jV(jV({},u.fn.focusStyles()),u.fn.fontStyles()),{fontSize:o,height:s,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${s} - ${G(2)})`,textDecoration:"none",padding:`0 calc(${ye({size:a,sizes:u.spacing})} / 1.5)`,boxSizing:"border-box",display:i?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":"auto",textTransform:"uppercase",borderRadius:u.fn.radius(t),fontWeight:700,letterSpacing:G(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),IBt({theme:u,variant:r,color:e,size:a,gradient:n}))}});const jBt=OBt;var HBt=Object.defineProperty,zz=Object.getOwnPropertySymbols,q8e=Object.prototype.hasOwnProperty,J8e=Object.prototype.propertyIsEnumerable,Y4e=(u,e,t)=>e in u?HBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,VBt=(u,e)=>{for(var t in e||(e={}))q8e.call(e,t)&&Y4e(u,t,e[t]);if(zz)for(var t of zz(e))J8e.call(e,t)&&Y4e(u,t,e[t]);return u},$Bt=(u,e)=>{var t={};for(var n in u)q8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&zz)for(var n of zz(u))e.indexOf(n)<0&&J8e.call(u,n)&&(t[n]=u[n]);return t};const KBt={variant:"light",size:"md",radius:"xl"},Z8e=C.forwardRef((u,e)=>{const t=Qe("Badge",KBt,u),{className:n,color:i,variant:r,fullWidth:a,children:o,size:s,leftSection:l,rightSection:c,radius:d,gradient:h,classNames:E,styles:m,unstyled:g}=t,f=$Bt(t,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:p,cx:D}=jBt({fullWidth:a,color:i,radius:d,gradient:h},{classNames:E,styles:m,name:"Badge",unstyled:g,variant:r,size:s});return M.createElement(Ct,VBt({className:D(p.root,n),ref:e},f),l&&M.createElement("span",{className:p.leftSection},l),M.createElement("span",{className:p.inner},o),c&&M.createElement("span",{className:p.rightSection},c))});Z8e.displayName="@mantine/core/Badge";const Uv=Z8e,WBt={xs:G(12),sm:G(18),md:G(24),lg:G(34),xl:G(42)};var GBt=at((u,{color:e,transitionDuration:t},{size:n})=>{const i=ye({size:n,sizes:WBt}),r=e||(u.colorScheme==="dark"?u.white:u.black);return{root:{borderRadius:u.radius.sm,width:`calc(${i} + ${u.spacing.xs})`,height:`calc(${i} + ${u.spacing.xs})`,padding:`calc(${u.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:i,height:`calc(${i} / 12)`,backgroundColor:r,outline:`${G(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${i} / 3) * -1)`},"&::after":{top:`calc(${i} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${i} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${i} / 3)) rotate(-45deg)`}}}}});const UBt=GBt;var qBt=Object.defineProperty,Mz=Object.getOwnPropertySymbols,Y8e=Object.prototype.hasOwnProperty,Q8e=Object.prototype.propertyIsEnumerable,Q4e=(u,e,t)=>e in u?qBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JBt=(u,e)=>{for(var t in e||(e={}))Y8e.call(e,t)&&Q4e(u,t,e[t]);if(Mz)for(var t of Mz(e))Q8e.call(e,t)&&Q4e(u,t,e[t]);return u},ZBt=(u,e)=>{var t={};for(var n in u)Y8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Mz)for(var n of Mz(u))e.indexOf(n)<0&&Q8e.call(u,n)&&(t[n]=u[n]);return t};const YBt={size:"md",transitionDuration:300},X8e=C.forwardRef((u,e)=>{const t=Qe("Burger",YBt,u),{className:n,opened:i,color:r,size:a,classNames:o,styles:s,transitionDuration:l,variant:c}=t,d=ZBt(t,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:h,cx:E}=UBt({color:r,transitionDuration:l},{classNames:o,styles:s,name:"Burger",variant:c,size:a});return M.createElement(L4,JBt({className:E(h.root,n),ref:e},d),M.createElement("div",{"data-opened":i||void 0,className:h.burger}))});X8e.displayName="@mantine/core/Burger";var QBt=at((u,{orientation:e,buttonBorderWidth:t})=>({root:{display:"flex",flexDirection:e==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[e==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${G(t)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[e==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${G(t)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${G(t)} / 2)`,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${G(t)} / 2)`},"& + [data-button]":{[e==="vertical"?"marginTop":"marginLeft"]:`calc(${t} * -1)`,"@media (min-resolution: 192dpi)":{[e==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const XBt=QBt;var ewt=Object.defineProperty,Tz=Object.getOwnPropertySymbols,eBe=Object.prototype.hasOwnProperty,tBe=Object.prototype.propertyIsEnumerable,X4e=(u,e,t)=>e in u?ewt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,twt=(u,e)=>{for(var t in e||(e={}))eBe.call(e,t)&&X4e(u,t,e[t]);if(Tz)for(var t of Tz(e))tBe.call(e,t)&&X4e(u,t,e[t]);return u},uwt=(u,e)=>{var t={};for(var n in u)eBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Tz)for(var n of Tz(u))e.indexOf(n)<0&&tBe.call(u,n)&&(t[n]=u[n]);return t};const nwt={orientation:"horizontal",buttonBorderWidth:1},uBe=C.forwardRef((u,e)=>{const t=Qe("ButtonGroup",nwt,u),{className:n,orientation:i,buttonBorderWidth:r,unstyled:a}=t,o=uwt(t,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:l}=XBt({orientation:i,buttonBorderWidth:r},{name:"ButtonGroup",unstyled:a});return M.createElement(Ct,twt({className:l(s.root,n),ref:e},o))});uBe.displayName="@mantine/core/ButtonGroup";var iwt=Object.defineProperty,rwt=Object.defineProperties,awt=Object.getOwnPropertyDescriptors,eEe=Object.getOwnPropertySymbols,owt=Object.prototype.hasOwnProperty,swt=Object.prototype.propertyIsEnumerable,tEe=(u,e,t)=>e in u?iwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yh=(u,e)=>{for(var t in e||(e={}))owt.call(e,t)&&tEe(u,t,e[t]);if(eEe)for(var t of eEe(e))swt.call(e,t)&&tEe(u,t,e[t]);return u},I8=(u,e)=>rwt(u,awt(e));const lwt=["filled","outline","light","white","default","subtle","gradient"],BZ={xs:{height:kr.xs,paddingLeft:G(14),paddingRight:G(14)},sm:{height:kr.sm,paddingLeft:G(18),paddingRight:G(18)},md:{height:kr.md,paddingLeft:G(22),paddingRight:G(22)},lg:{height:kr.lg,paddingLeft:G(26),paddingRight:G(26)},xl:{height:kr.xl,paddingLeft:G(32),paddingRight:G(32)},"compact-xs":{height:G(22),paddingLeft:G(7),paddingRight:G(7)},"compact-sm":{height:G(26),paddingLeft:G(8),paddingRight:G(8)},"compact-md":{height:G(30),paddingLeft:G(10),paddingRight:G(10)},"compact-lg":{height:G(34),paddingLeft:G(12),paddingRight:G(12)},"compact-xl":{height:G(40),paddingLeft:G(14),paddingRight:G(14)}};function cwt({compact:u,size:e,withLeftIcon:t,withRightIcon:n}){if(u)return BZ[`compact-${e}`];const i=BZ[e];return i?I8(yh({},i),{paddingLeft:t?`calc(${i.paddingLeft} / 1.5)`:i.paddingLeft,paddingRight:n?`calc(${i.paddingRight} / 1.5)`:i.paddingRight}):{}}const dwt=u=>({display:u?"block":"inline-block",width:u?"100%":"auto"});function hwt({variant:u,theme:e,color:t,gradient:n}){if(!lwt.includes(u))return null;const i=e.fn.variant({color:t,variant:u,gradient:n});return u==="gradient"?yh({border:0,backgroundImage:i.background,color:i.color},e.fn.hover({backgroundSize:"200%"})):yh({border:`${G(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover}))}var Ewt=at((u,{radius:e,fullWidth:t,compact:n,withLeftIcon:i,withRightIcon:r,color:a,gradient:o},{variant:s,size:l})=>({root:I8(yh(I8(yh(yh(yh(yh({},cwt({compact:n,size:l,withLeftIcon:i,withRightIcon:r})),u.fn.fontStyles()),u.fn.focusStyles()),dwt(t)),{borderRadius:u.fn.radius(e),fontWeight:600,position:"relative",lineHeight:1,fontSize:ye({size:l,sizes:u.fontSizes}),userSelect:"none",cursor:"pointer"}),hwt({variant:s,theme:u,color:a,gradient:o})),{"&:active":u.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":I8(yh({content:'""'},u.fn.cover(G(-1))),{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:u.fn.radius(e),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:u.spacing.xs},rightIcon:{marginLeft:u.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const mwt=Ewt;var gwt=Object.defineProperty,Nz=Object.getOwnPropertySymbols,nBe=Object.prototype.hasOwnProperty,iBe=Object.prototype.propertyIsEnumerable,uEe=(u,e,t)=>e in u?gwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,nEe=(u,e)=>{for(var t in e||(e={}))nBe.call(e,t)&&uEe(u,t,e[t]);if(Nz)for(var t of Nz(e))iBe.call(e,t)&&uEe(u,t,e[t]);return u},fwt=(u,e)=>{var t={};for(var n in u)nBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Nz)for(var n of Nz(u))e.indexOf(n)<0&&iBe.call(u,n)&&(t[n]=u[n]);return t};const pwt={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},xne=C.forwardRef((u,e)=>{const t=Qe("Button",pwt,u),{className:n,size:i,color:r,type:a,disabled:o,children:s,leftIcon:l,rightIcon:c,fullWidth:d,variant:h,radius:E,uppercase:m,compact:g,loading:f,loaderPosition:p,loaderProps:D,gradient:x,classNames:b,styles:k,unstyled:A}=t,F=fwt(t,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:S,cx:w,theme:z}=mwt({radius:E,color:r,fullWidth:d,compact:g,gradient:x,withLeftIcon:!!l,withRightIcon:!!c},{name:"Button",unstyled:A,classNames:b,styles:k,variant:h,size:i}),N=z.fn.variant({color:r,variant:h}),O=M.createElement(Vv,nEe({color:N.color,size:`calc(${ye({size:i,sizes:BZ}).height} / 2)`},D));return M.createElement(L4,nEe({className:w(S.root,n),type:a,disabled:o,"data-button":!0,"data-disabled":o||void 0,"data-loading":f||void 0,ref:e,unstyled:A},F),M.createElement("div",{className:S.inner},(l||f&&p==="left")&&M.createElement("span",{className:w(S.icon,S.leftIcon)},f&&p==="left"?O:l),f&&p==="center"&&M.createElement("span",{className:S.centerLoader},O),M.createElement("span",{className:S.label,style:{textTransform:m?"uppercase":void 0}},s),(c||f&&p==="right")&&M.createElement("span",{className:w(S.icon,S.rightIcon)},f&&p==="right"?O:c)))});xne.displayName="@mantine/core/Button";xne.Group=uBe;const xl=xne;var Dwt=at((u,{radius:e,shadow:t})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,boxSizing:"border-box",borderRadius:u.fn.radius(e),boxShadow:u.shadows[t]||t||"none","&[data-with-border]":{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`}}}));const xwt=Dwt;var vwt=Object.defineProperty,Pz=Object.getOwnPropertySymbols,rBe=Object.prototype.hasOwnProperty,aBe=Object.prototype.propertyIsEnumerable,iEe=(u,e,t)=>e in u?vwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Cwt=(u,e)=>{for(var t in e||(e={}))rBe.call(e,t)&&iEe(u,t,e[t]);if(Pz)for(var t of Pz(e))aBe.call(e,t)&&iEe(u,t,e[t]);return u},bwt=(u,e)=>{var t={};for(var n in u)rBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Pz)for(var n of Pz(u))e.indexOf(n)<0&&aBe.call(u,n)&&(t[n]=u[n]);return t};const kwt={},oBe=C.forwardRef((u,e)=>{const t=Qe("Paper",kwt,u),{className:n,children:i,radius:r,withBorder:a,shadow:o,unstyled:s,variant:l}=t,c=bwt(t,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:d,cx:h}=xwt({radius:r,shadow:o},{name:"Paper",unstyled:s,variant:l});return M.createElement(Ct,Cwt({className:h(d.root,n),"data-with-border":a||void 0,ref:e},c),i)});oBe.displayName="@mantine/core/Paper";const sBe=oBe,lBe=C.createContext({padding:0}),Fwt=lBe.Provider,ywt=()=>C.useContext(lBe).padding;var Awt=at((u,{padding:e,withBorder:t,inheritPadding:n})=>{const i=ye({size:e,sizes:u.spacing}),r=`calc(-1 * ${i})`,a=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return{cardSection:{display:"block",marginLeft:r,marginRight:r,paddingLeft:n?i:void 0,paddingRight:n?i:void 0,borderTop:t?`${G(1)} solid ${a}`:void 0,borderBottom:t?`${G(1)} solid ${a}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:r,borderTop:0,borderBottom:t?`${G(1)} solid ${a}`:void 0},"&[data-last]":{marginBottom:r,borderBottom:0}}}});const _wt=Awt;var Swt=Object.defineProperty,Rz=Object.getOwnPropertySymbols,cBe=Object.prototype.hasOwnProperty,dBe=Object.prototype.propertyIsEnumerable,rEe=(u,e,t)=>e in u?Swt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Bwt=(u,e)=>{for(var t in e||(e={}))cBe.call(e,t)&&rEe(u,t,e[t]);if(Rz)for(var t of Rz(e))dBe.call(e,t)&&rEe(u,t,e[t]);return u},wwt=(u,e)=>{var t={};for(var n in u)cBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Rz)for(var n of Rz(u))e.indexOf(n)<0&&dBe.call(u,n)&&(t[n]=u[n]);return t};const Lwt={withBorder:!1,inheritPadding:!1},hBe=C.forwardRef((u,e)=>{const t=Qe("CardSection",Lwt,u),{className:n,withBorder:i,inheritPadding:r,unstyled:a,variant:o}=t,s=wwt(t,["className","withBorder","inheritPadding","unstyled","variant"]),{classes:l,cx:c}=_wt({padding:ywt(),withBorder:i,inheritPadding:r},{name:"Card",unstyled:a,variant:o});return M.createElement(Ct,Bwt({className:c(l.cardSection,n),ref:e},s))});hBe.displayName="@mantine/core/CardSection";const EBe=hBe;var zwt=at(u=>({root:{position:"relative",overflow:"hidden",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white}}));const Mwt=zwt;var Twt=Object.defineProperty,Iz=Object.getOwnPropertySymbols,mBe=Object.prototype.hasOwnProperty,gBe=Object.prototype.propertyIsEnumerable,aEe=(u,e,t)=>e in u?Twt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Nwt=(u,e)=>{for(var t in e||(e={}))mBe.call(e,t)&&aEe(u,t,e[t]);if(Iz)for(var t of Iz(e))gBe.call(e,t)&&aEe(u,t,e[t]);return u},Pwt=(u,e)=>{var t={};for(var n in u)mBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Iz)for(var n of Iz(u))e.indexOf(n)<0&&gBe.call(u,n)&&(t[n]=u[n]);return t};const Rwt={padding:"md"},vne=C.forwardRef((u,e)=>{const t=Qe("Card",Rwt,u),{className:n,padding:i,radius:r,children:a,unstyled:o,variant:s}=t,l=Pwt(t,["className","padding","radius","children","unstyled","variant"]),{classes:c,cx:d}=Mwt(null,{name:"Card",unstyled:o,variant:s}),h=C.Children.toArray(a),E=h.map((m,g)=>typeof m=="object"&&m&&"type"in m&&m.type===EBe?C.cloneElement(m,{variant:s,padding:i,"data-first":g===0||void 0,"data-last":g===h.length-1||void 0}):m);return M.createElement(Fwt,{value:{padding:i}},M.createElement(sBe,Nwt({className:d(c.root,n),radius:r,p:i,ref:e},l),E))});vne.Section=EBe;vne.displayName="@mantine/core/Card";const ym=vne;var Iwt=at((u,{inline:e})=>({root:{display:e?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const Owt=Iwt;var jwt=Object.defineProperty,Oz=Object.getOwnPropertySymbols,fBe=Object.prototype.hasOwnProperty,pBe=Object.prototype.propertyIsEnumerable,oEe=(u,e,t)=>e in u?jwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Hwt=(u,e)=>{for(var t in e||(e={}))fBe.call(e,t)&&oEe(u,t,e[t]);if(Oz)for(var t of Oz(e))pBe.call(e,t)&&oEe(u,t,e[t]);return u},Vwt=(u,e)=>{var t={};for(var n in u)fBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Oz)for(var n of Oz(u))e.indexOf(n)<0&&pBe.call(u,n)&&(t[n]=u[n]);return t};const DBe=C.forwardRef((u,e)=>{const t=Qe("Center",{},u),{inline:n,className:i,unstyled:r,variant:a}=t,o=Vwt(t,["inline","className","unstyled","variant"]),{classes:s,cx:l}=Owt({inline:n},{name:"Center",unstyled:r,variant:a});return M.createElement(Ct,Hwt({ref:e,className:l(s.root,i)},o))});DBe.displayName="@mantine/core/Center";const jz=DBe,xBe=C.createContext(null),$wt=xBe.Provider,Kwt=()=>C.useContext(xBe);var Wwt=Object.defineProperty,Hz=Object.getOwnPropertySymbols,vBe=Object.prototype.hasOwnProperty,CBe=Object.prototype.propertyIsEnumerable,sEe=(u,e,t)=>e in u?Wwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,lEe=(u,e)=>{for(var t in e||(e={}))vBe.call(e,t)&&sEe(u,t,e[t]);if(Hz)for(var t of Hz(e))CBe.call(e,t)&&sEe(u,t,e[t]);return u},Gwt=(u,e)=>{var t={};for(var n in u)vBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Hz)for(var n of Hz(u))e.indexOf(n)<0&&CBe.call(u,n)&&(t[n]=u[n]);return t};const Uwt={size:"sm"},bBe=C.forwardRef((u,e)=>{const t=Qe("CheckboxGroup",Uwt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s}=t,l=Gwt(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,d]=fs({value:i,defaultValue:r,finalValue:[],onChange:a}),h=E=>{const m=E.currentTarget.value;d(c.includes(m)?c.filter(g=>g!==m):[...c,m])};return M.createElement($wt,{value:{value:c,onChange:h,size:o}},M.createElement(Ra.Wrapper,lEe(lEe({labelElement:"div",size:o,__staticSelector:"CheckboxGroup",ref:e},s),l),n))});bBe.displayName="@mantine/core/CheckboxGroup";var qwt=Object.defineProperty,Vz=Object.getOwnPropertySymbols,kBe=Object.prototype.hasOwnProperty,FBe=Object.prototype.propertyIsEnumerable,cEe=(u,e,t)=>e in u?qwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$z=(u,e)=>{for(var t in e||(e={}))kBe.call(e,t)&&cEe(u,t,e[t]);if(Vz)for(var t of Vz(e))FBe.call(e,t)&&cEe(u,t,e[t]);return u},yBe=(u,e)=>{var t={};for(var n in u)kBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Vz)for(var n of Vz(u))e.indexOf(n)<0&&FBe.call(u,n)&&(t[n]=u[n]);return t};function Jwt(u){const e=u,{width:t,height:n,style:i}=e,r=yBe(e,["width","height","style"]);return M.createElement("svg",$z({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:$z({width:t,height:n},i)},r),M.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function ABe(u){var e=u,{indeterminate:t}=e,n=yBe(e,["indeterminate"]);return t?M.createElement("svg",$z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),M.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):M.createElement(Jwt,$z({},n))}var Zwt=Object.defineProperty,Ywt=Object.defineProperties,Qwt=Object.getOwnPropertyDescriptors,dEe=Object.getOwnPropertySymbols,Xwt=Object.prototype.hasOwnProperty,eLt=Object.prototype.propertyIsEnumerable,hEe=(u,e,t)=>e in u?Zwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,EEe=(u,e)=>{for(var t in e||(e={}))Xwt.call(e,t)&&hEe(u,t,e[t]);if(dEe)for(var t of dEe(e))eLt.call(e,t)&&hEe(u,t,e[t]);return u},mEe=(u,e)=>Ywt(u,Qwt(e));const tLt={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)};var uLt=at((u,{radius:e,color:t,transitionDuration:n,labelPosition:i,error:r,indeterminate:a},{size:o})=>{const s=ye({size:o,sizes:tLt}),l=u.fn.variant({variant:"filled",color:t});return{icon:mEe(EEe({},u.fn.cover()),{ref:v1("icon"),color:a?"inherit":u.white,transform:a?"none":`translateY(${G(5)}) scale(0.5)`,opacity:a?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${n}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:s,height:s,order:i==="left"?2:1},input:mEe(EEe({},u.fn.focusStyles()),{appearance:"none",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${r?u.fn.variant({variant:"filled",color:"red"}).background:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,width:s,height:s,borderRadius:u.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${n}ms ease, background-color ${n}ms ease`,cursor:u.cursorType,"&:checked":{backgroundColor:l.background,borderColor:l.background,[`& + .${v1("icon")}`]:{opacity:1,color:u.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],borderColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${v1("icon")}`]:{color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[5]}}})}});const nLt=uLt;var iLt=Object.defineProperty,rLt=Object.defineProperties,aLt=Object.getOwnPropertyDescriptors,gEe=Object.getOwnPropertySymbols,oLt=Object.prototype.hasOwnProperty,sLt=Object.prototype.propertyIsEnumerable,fEe=(u,e,t)=>e in u?iLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,lLt=(u,e)=>{for(var t in e||(e={}))oLt.call(e,t)&&fEe(u,t,e[t]);if(gEe)for(var t of gEe(e))sLt.call(e,t)&&fEe(u,t,e[t]);return u},cLt=(u,e)=>rLt(u,aLt(e));const VV={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)};var dLt=at((u,{labelPosition:e},{size:t})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}},labelWrapper:cLt(lLt({},u.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:t in VV?ye({size:t,sizes:u.fontSizes}):void 0,lineHeight:t in VV?ye({size:t,sizes:VV}):void 0,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,cursor:u.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${u.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm},error:{marginTop:`calc(${u.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm},label:{cursor:u.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm,"&:disabled, &[data-disabled]":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}}}));const hLt=dLt;var ELt=Object.defineProperty,Kz=Object.getOwnPropertySymbols,_Be=Object.prototype.hasOwnProperty,SBe=Object.prototype.propertyIsEnumerable,pEe=(u,e,t)=>e in u?ELt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mLt=(u,e)=>{for(var t in e||(e={}))_Be.call(e,t)&&pEe(u,t,e[t]);if(Kz)for(var t of Kz(e))SBe.call(e,t)&&pEe(u,t,e[t]);return u},gLt=(u,e)=>{var t={};for(var n in u)_Be.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Kz)for(var n of Kz(u))e.indexOf(n)<0&&SBe.call(u,n)&&(t[n]=u[n]);return t};const PI=C.forwardRef((u,e)=>{var t=u,{__staticSelector:n,className:i,classNames:r,styles:a,unstyled:o,children:s,label:l,description:c,id:d,disabled:h,error:E,size:m,labelPosition:g,variant:f}=t,p=gLt(t,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:D,cx:x}=hLt({labelPosition:g},{name:n,styles:a,classNames:r,unstyled:o,variant:f,size:m});return M.createElement(Ct,mLt({className:x(D.root,i),ref:e},p),M.createElement("div",{className:x(D.body)},s,M.createElement("div",{className:D.labelWrapper},l&&M.createElement("label",{className:D.label,"data-disabled":h||void 0,htmlFor:d},l),c&&M.createElement(Ra.Description,{className:D.description},c),E&&E!=="boolean"&&M.createElement(Ra.Error,{className:D.error},E))))});PI.displayName="@mantine/core/InlineInput";var fLt=Object.defineProperty,Wz=Object.getOwnPropertySymbols,BBe=Object.prototype.hasOwnProperty,wBe=Object.prototype.propertyIsEnumerable,DEe=(u,e,t)=>e in u?fLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,G_=(u,e)=>{for(var t in e||(e={}))BBe.call(e,t)&&DEe(u,t,e[t]);if(Wz)for(var t of Wz(e))wBe.call(e,t)&&DEe(u,t,e[t]);return u},pLt=(u,e)=>{var t={};for(var n in u)BBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Wz)for(var n of Wz(u))e.indexOf(n)<0&&wBe.call(u,n)&&(t[n]=u[n]);return t};const DLt={size:"sm",transitionDuration:100,icon:ABe,labelPosition:"right"},b0=C.forwardRef((u,e)=>{const t=Qe("Checkbox",DLt,u),{className:n,style:i,sx:r,checked:a,disabled:o,color:s,label:l,indeterminate:c,id:d,size:h,radius:E,wrapperProps:m,children:g,classNames:f,styles:p,transitionDuration:D,icon:x,unstyled:b,labelPosition:k,description:A,error:F,variant:S}=t,w=pLt(t,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=Kwt(),N=Jl(d),{systemStyles:O,rest:y}=w4(w),{classes:_}=nLt({radius:E,color:s,transitionDuration:D,labelPosition:k,error:!!F,indeterminate:c},{name:"Checkbox",classNames:f,styles:p,unstyled:b,variant:S,size:(z==null?void 0:z.size)||h}),L=z?{checked:z.value.includes(y.value),onChange:z.onChange}:{};return M.createElement(PI,G_(G_({className:n,sx:r,style:i,id:N,size:(z==null?void 0:z.size)||h,labelPosition:k,label:l,description:A,error:F,disabled:o,__staticSelector:"Checkbox",classNames:f,styles:p,unstyled:b,"data-checked":L.checked||void 0,variant:S},O),m),M.createElement("div",{className:_.inner},M.createElement("input",G_(G_({id:N,ref:e,type:"checkbox",className:_.input,checked:a,disabled:o},y),L)),M.createElement(x,{indeterminate:c,className:_.icon})))});b0.displayName="@mantine/core/Checkbox";b0.Group=bBe;var xLt=Object.defineProperty,vLt=Object.defineProperties,CLt=Object.getOwnPropertyDescriptors,xEe=Object.getOwnPropertySymbols,bLt=Object.prototype.hasOwnProperty,kLt=Object.prototype.propertyIsEnumerable,vEe=(u,e,t)=>e in u?xLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,FLt=(u,e)=>{for(var t in e||(e={}))bLt.call(e,t)&&vEe(u,t,e[t]);if(xEe)for(var t of xEe(e))kLt.call(e,t)&&vEe(u,t,e[t]);return u},yLt=(u,e)=>vLt(u,CLt(e)),ALt=at((u,{color:e})=>{const t=e||(u.colorScheme==="dark"?"dark":"gray"),n=u.fn.variant({color:t,variant:"light"});return{root:yLt(FLt({},u.fn.fontStyles()),{lineHeight:u.lineHeight,padding:`${G(2)} calc(${u.spacing.xs} / 2)`,borderRadius:u.radius.sm,color:u.colorScheme==="dark"?t==="dark"?u.colors.dark[0]:u.white:u.colors.dark[7],backgroundColor:u.colorScheme==="dark"&&t==="dark"?u.colors.dark[5]:n.background,fontFamily:u.fontFamilyMonospace,fontSize:u.fontSizes.xs}),block:{padding:u.spacing.xs,margin:0,overflowX:"auto"}}});const _Lt=ALt;var SLt=Object.defineProperty,Gz=Object.getOwnPropertySymbols,LBe=Object.prototype.hasOwnProperty,zBe=Object.prototype.propertyIsEnumerable,CEe=(u,e,t)=>e in u?SLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bEe=(u,e)=>{for(var t in e||(e={}))LBe.call(e,t)&&CEe(u,t,e[t]);if(Gz)for(var t of Gz(e))zBe.call(e,t)&&CEe(u,t,e[t]);return u},BLt=(u,e)=>{var t={};for(var n in u)LBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Gz)for(var n of Gz(u))e.indexOf(n)<0&&zBe.call(u,n)&&(t[n]=u[n]);return t};const wLt={},Uz=C.forwardRef((u,e)=>{const t=Qe("Code",wLt,u),{className:n,children:i,block:r,color:a,unstyled:o,variant:s}=t,l=BLt(t,["className","children","block","color","unstyled","variant"]),{classes:c,cx:d}=_Lt({color:a},{name:"Code",unstyled:o,variant:s});return r?M.createElement(Ct,bEe({component:"pre",dir:"ltr",className:d(c.root,c.block,n),ref:e},l),i):M.createElement(Ct,bEe({component:"code",className:d(c.root,n),ref:e,dir:"ltr"},l),i)});Uz.displayName="@mantine/core/Code";var LLt=at((u,{fluid:e,sizes:t},{size:n})=>({root:{paddingLeft:u.spacing.md,paddingRight:u.spacing.md,maxWidth:e?"100%":ye({size:n,sizes:t}),marginLeft:"auto",marginRight:"auto"}}));const zLt=LLt;var MLt=Object.defineProperty,qz=Object.getOwnPropertySymbols,MBe=Object.prototype.hasOwnProperty,TBe=Object.prototype.propertyIsEnumerable,kEe=(u,e,t)=>e in u?MLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TLt=(u,e)=>{for(var t in e||(e={}))MBe.call(e,t)&&kEe(u,t,e[t]);if(qz)for(var t of qz(e))TBe.call(e,t)&&kEe(u,t,e[t]);return u},NLt=(u,e)=>{var t={};for(var n in u)MBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qz)for(var n of qz(u))e.indexOf(n)<0&&TBe.call(u,n)&&(t[n]=u[n]);return t};const PLt={sizes:{xs:G(540),sm:G(720),md:G(960),lg:G(1140),xl:G(1320)}},RI=C.forwardRef((u,e)=>{const t=Qe("Container",PLt,u),{className:n,fluid:i,size:r,unstyled:a,sizes:o,variant:s}=t,l=NLt(t,["className","fluid","size","unstyled","sizes","variant"]),{classes:c,cx:d}=zLt({fluid:i,sizes:o},{unstyled:a,name:"Container",variant:s,size:r});return M.createElement(Ct,TLt({className:d(c.root,n),ref:e},l))});RI.displayName="@mantine/core/Container";const[RLt,ILt]=U1("Drawer component was not found in tree"),FEe={xs:G(320),sm:G(380),md:G(440),lg:G(620),xl:G(780)};var OLt=at((u,{position:e},{size:t})=>({header:{zIndex:1e3},content:{flex:e==="right"||e==="left"?`0 0 ${ye({size:t,sizes:FEe})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:e==="right"||e==="left"?"100%":ye({size:t,sizes:FEe}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:e==="right"?"flex-end":"flex-start",alignItems:e==="bottom"?"flex-end":"flex-start"}}));const jLt=OLt,[HLt,N6]=U1("ModalBase component was not found in tree");var VLt=at(()=>({close:{marginLeft:"auto",marginRight:0}}));const $Lt=VLt;var KLt=Object.defineProperty,Jz=Object.getOwnPropertySymbols,NBe=Object.prototype.hasOwnProperty,PBe=Object.prototype.propertyIsEnumerable,yEe=(u,e,t)=>e in u?KLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,WLt=(u,e)=>{for(var t in e||(e={}))NBe.call(e,t)&&yEe(u,t,e[t]);if(Jz)for(var t of Jz(e))PBe.call(e,t)&&yEe(u,t,e[t]);return u},GLt=(u,e)=>{var t={};for(var n in u)NBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Jz)for(var n of Jz(u))e.indexOf(n)<0&&PBe.call(u,n)&&(t[n]=u[n]);return t};const ULt={size:"sm"},qLt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}CloseButton`,ULt,u),{className:i}=n,r=GLt(n,["className"]),{classes:a,cx:o}=$Lt(null,t.stylesApi);return M.createElement(SI,WLt({className:o(a.close,i),ref:e,onClick:t.onClose},r))});var JLt=at(()=>({overlay:{}}));const ZLt=JLt;var YLt=Object.defineProperty,QLt=Object.defineProperties,XLt=Object.getOwnPropertyDescriptors,AEe=Object.getOwnPropertySymbols,ezt=Object.prototype.hasOwnProperty,tzt=Object.prototype.propertyIsEnumerable,_Ee=(u,e,t)=>e in u?YLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uzt=(u,e)=>{for(var t in e||(e={}))ezt.call(e,t)&&_Ee(u,t,e[t]);if(AEe)for(var t of AEe(e))tzt.call(e,t)&&_Ee(u,t,e[t]);return u},nzt=(u,e)=>QLt(u,XLt(e)),izt=at((u,{color:e,opacity:t,blur:n,radius:i,gradient:r,fixed:a,zIndex:o})=>({root:nzt(uzt({},u.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:r?void 0:u.fn.rgba(e,t),backgroundImage:r,backdropFilter:n?`blur(${G(n)})`:void 0,borderRadius:u.fn.radius(i),zIndex:o,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const rzt=izt;var azt=Object.defineProperty,Zz=Object.getOwnPropertySymbols,RBe=Object.prototype.hasOwnProperty,IBe=Object.prototype.propertyIsEnumerable,SEe=(u,e,t)=>e in u?azt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ozt=(u,e)=>{for(var t in e||(e={}))RBe.call(e,t)&&SEe(u,t,e[t]);if(Zz)for(var t of Zz(e))IBe.call(e,t)&&SEe(u,t,e[t]);return u},szt=(u,e)=>{var t={};for(var n in u)RBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Zz)for(var n of Zz(u))e.indexOf(n)<0&&IBe.call(u,n)&&(t[n]=u[n]);return t};const lzt={opacity:.6,color:"#000",zIndex:fd("modal"),radius:0},OBe=C.forwardRef((u,e)=>{const t=Qe("Overlay",lzt,u),{variant:n,opacity:i,color:r,blur:a,gradient:o,zIndex:s,radius:l,children:c,className:d,classNames:h,styles:E,unstyled:m,center:g,fixed:f}=t,p=szt(t,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:D,cx:x}=rzt({color:r,opacity:i,blur:a,radius:l,gradient:o,fixed:f,zIndex:s},{name:"Overlay",classNames:h,styles:E,unstyled:m,variant:n});return M.createElement(Ct,ozt({ref:e,className:x(D.root,d),"data-center":g||void 0},p),c)});OBe.displayName="@mantine/core/Overlay";const czt=OBe;var dzt=Object.defineProperty,hzt=Object.defineProperties,Ezt=Object.getOwnPropertyDescriptors,Yz=Object.getOwnPropertySymbols,jBe=Object.prototype.hasOwnProperty,HBe=Object.prototype.propertyIsEnumerable,BEe=(u,e,t)=>e in u?dzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,qC=(u,e)=>{for(var t in e||(e={}))jBe.call(e,t)&&BEe(u,t,e[t]);if(Yz)for(var t of Yz(e))HBe.call(e,t)&&BEe(u,t,e[t]);return u},mzt=(u,e)=>hzt(u,Ezt(e)),gzt=(u,e)=>{var t={};for(var n in u)jBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Yz)for(var n of Yz(u))e.indexOf(n)<0&&HBe.call(u,n)&&(t[n]=u[n]);return t};const fzt={},pzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Overlay`,fzt,u),{onClick:i,transitionProps:r,style:a,className:o}=n,s=gzt(n,["onClick","transitionProps","style","className"]),{classes:l,cx:c}=ZLt(null,t.stylesApi),d=h=>{i==null||i(h),t.closeOnClickOutside&&t.onClose()};return M.createElement(Jp,mzt(qC(qC({mounted:t.opened},t.transitionProps),r),{transition:"fade"}),h=>M.createElement(czt,qC({ref:e,onClick:d,fixed:!0,style:qC(qC({},a),h),className:c(l.overlay,o),zIndex:t.zIndex},s)))});var Dzt=at((u,{zIndex:e})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:e,pointerEvents:"none"},content:{pointerEvents:"all"}}));const xzt=Dzt;var vzt=Object.defineProperty,Qz=Object.getOwnPropertySymbols,VBe=Object.prototype.hasOwnProperty,$Be=Object.prototype.propertyIsEnumerable,wEe=(u,e,t)=>e in u?vzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JC=(u,e)=>{for(var t in e||(e={}))VBe.call(e,t)&&wEe(u,t,e[t]);if(Qz)for(var t of Qz(e))$Be.call(e,t)&&wEe(u,t,e[t]);return u},Czt=(u,e)=>{var t={};for(var n in u)VBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Qz)for(var n of Qz(u))e.indexOf(n)<0&&$Be.call(u,n)&&(t[n]=u[n]);return t};const bzt={},kzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Content`,bzt,u),{className:i,transitionProps:r,style:a,onKeyDown:o}=n,s=Czt(n,["className","transitionProps","style","onKeyDown"]),{classes:l,cx:c}=xzt({zIndex:t.zIndex},t.stylesApi),d=h=>{var E;((E=h.target)==null?void 0:E.getAttribute("data-mantine-stop-propagation"))!=="true"&&h.key==="Escape"&&t.closeOnEscape&&t.onClose(),o==null||o(h)};return M.createElement(Jp,JC(JC({mounted:t.opened,transition:"pop"},t.transitionProps),r),h=>M.createElement("div",{className:c(l.inner)},M.createElement(Ene,{active:t.opened&&t.trapFocus},M.createElement(sBe,JC({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":t.bodyMounted?t.getBodyId():void 0,"aria-labelledby":t.titleMounted?t.getTitleId():void 0,onKeyDown:d,ref:e,className:c(l.content,i),style:JC(JC({},a),h),shadow:t.shadow},s),s.children))))});var Fzt=at((u,{padding:e})=>{const t=ye({size:e,sizes:u.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:t,paddingRight:`calc(${t} - ${G(5)})`,position:"sticky",top:0,backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,zIndex:1e3}}});const yzt=Fzt;var Azt=Object.defineProperty,Xz=Object.getOwnPropertySymbols,KBe=Object.prototype.hasOwnProperty,WBe=Object.prototype.propertyIsEnumerable,LEe=(u,e,t)=>e in u?Azt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_zt=(u,e)=>{for(var t in e||(e={}))KBe.call(e,t)&&LEe(u,t,e[t]);if(Xz)for(var t of Xz(e))WBe.call(e,t)&&LEe(u,t,e[t]);return u},Szt=(u,e)=>{var t={};for(var n in u)KBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Xz)for(var n of Xz(u))e.indexOf(n)<0&&WBe.call(u,n)&&(t[n]=u[n]);return t};const Bzt={},wzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Header`,Bzt,u),{className:i}=n,r=Szt(n,["className"]),{classes:a,cx:o}=yzt({padding:t.padding},t.stylesApi);return M.createElement(Ct,_zt({ref:e,className:o(a.header,i)},r))});var Lzt=at(u=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:u.fontSizes.md}}));const zzt=Lzt;var Mzt=Object.defineProperty,eM=Object.getOwnPropertySymbols,GBe=Object.prototype.hasOwnProperty,UBe=Object.prototype.propertyIsEnumerable,zEe=(u,e,t)=>e in u?Mzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Tzt=(u,e)=>{for(var t in e||(e={}))GBe.call(e,t)&&zEe(u,t,e[t]);if(eM)for(var t of eM(e))UBe.call(e,t)&&zEe(u,t,e[t]);return u},Nzt=(u,e)=>{var t={};for(var n in u)GBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&eM)for(var n of eM(u))e.indexOf(n)<0&&UBe.call(u,n)&&(t[n]=u[n]);return t};const Pzt={},Rzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Title`,Pzt,u),{className:i}=n,r=Nzt(n,["className"]),{classes:a,cx:o}=zzt(null,t.stylesApi);return C.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),M.createElement(Ct,Tzt({component:"h2",id:t.getTitleId(),className:o(a.title,i),ref:e},r))});var Izt=at((u,{padding:e})=>({body:{padding:ye({size:e,sizes:u.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Ozt=Izt;var jzt=Object.defineProperty,tM=Object.getOwnPropertySymbols,qBe=Object.prototype.hasOwnProperty,JBe=Object.prototype.propertyIsEnumerable,MEe=(u,e,t)=>e in u?jzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Hzt=(u,e)=>{for(var t in e||(e={}))qBe.call(e,t)&&MEe(u,t,e[t]);if(tM)for(var t of tM(e))JBe.call(e,t)&&MEe(u,t,e[t]);return u},Vzt=(u,e)=>{var t={};for(var n in u)qBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&tM)for(var n of tM(u))e.indexOf(n)<0&&JBe.call(u,n)&&(t[n]=u[n]);return t};const $zt={},Kzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Body`,$zt,u),{className:i}=n,r=Vzt(n,["className"]),{classes:a,cx:o}=Ozt({padding:t.padding},t.stylesApi);return C.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),M.createElement(Ct,Hzt({id:t.getBodyId(),className:o(a.body,i),ref:e},r))});function Wzt({children:u}){return M.createElement(M.Fragment,null,u)}function Gzt({opened:u,transitionDuration:e}){const[t,n]=C.useState(u),i=C.useRef(),a=QA()?0:e;return C.useEffect(()=>(u?(n(!0),window.clearTimeout(i.current)):a===0?n(!1):i.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(i.current)),[u,a]),t}var Uzt=at(()=>({root:{}}));const qzt=Uzt;var Jzt=Object.defineProperty,Zzt=Object.defineProperties,Yzt=Object.getOwnPropertyDescriptors,uM=Object.getOwnPropertySymbols,ZBe=Object.prototype.hasOwnProperty,YBe=Object.prototype.propertyIsEnumerable,TEe=(u,e,t)=>e in u?Jzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$V=(u,e)=>{for(var t in e||(e={}))ZBe.call(e,t)&&TEe(u,t,e[t]);if(uM)for(var t of uM(e))YBe.call(e,t)&&TEe(u,t,e[t]);return u},NEe=(u,e)=>Zzt(u,Yzt(e)),Qzt=(u,e)=>{var t={};for(var n in u)ZBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uM)for(var n of uM(u))e.indexOf(n)<0&&YBe.call(u,n)&&(t[n]=u[n]);return t};const n7={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:fd("modal"),padding:"md",size:"md",shadow:"xl"};function sn(u){const e=Qe("ModalBase",n7,u),{opened:t,onClose:n,children:i,closeOnClickOutside:r,__staticSelector:a,transitionProps:o,withinPortal:s,portalProps:l,keepMounted:c,target:d,zIndex:h,lockScroll:E,trapFocus:m,closeOnEscape:g,returnFocus:f,padding:p,shadow:D,id:x,size:b,variant:k,classNames:A,unstyled:F,styles:S,className:w}=e,z=Qzt(e,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:N,cx:O}=qzt(null,{name:a,classNames:A,styles:S,unstyled:F,variant:k,size:b}),y=Jl(x),[_,L]=C.useState(!1),[T,R]=C.useState(!1),I=typeof(o==null?void 0:o.duration)=="number"?o==null?void 0:o.duration:200,H=Gzt({opened:t,transitionDuration:I});return vZ("keydown",V=>{!m&&V.key==="Escape"&&g&&n()}),n_e({opened:t,shouldReturnFocus:m&&f}),M.createElement(XA,NEe($V({},l),{withinPortal:s,target:d}),M.createElement(HLt,{value:{__staticSelector:a,opened:t,onClose:n,closeOnClickOutside:r,transitionProps:NEe($V({},o),{duration:I,keepMounted:c}),zIndex:h,padding:p,id:y,getTitleId:()=>`${y}-title`,getBodyId:()=>`${y}-body`,titleMounted:_,bodyMounted:T,setTitleMounted:L,setBodyMounted:R,trapFocus:m,closeOnEscape:g,shadow:D,stylesApi:{name:a,size:b,variant:k,classNames:A,styles:S,unstyled:F}}},M.createElement(obt,{enabled:H&&E},M.createElement(Ct,$V({className:O(N.root,w)},z),i))))}sn.CloseButton=qLt;sn.Overlay=pzt;sn.Content=kzt;sn.Header=wzt;sn.Title=Rzt;sn.Body=Kzt;sn.NativeScrollArea=Wzt;var Xzt=Object.defineProperty,eMt=Object.defineProperties,tMt=Object.getOwnPropertyDescriptors,nM=Object.getOwnPropertySymbols,QBe=Object.prototype.hasOwnProperty,XBe=Object.prototype.propertyIsEnumerable,PEe=(u,e,t)=>e in u?Xzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,O8=(u,e)=>{for(var t in e||(e={}))QBe.call(e,t)&&PEe(u,t,e[t]);if(nM)for(var t of nM(e))XBe.call(e,t)&&PEe(u,t,e[t]);return u},ewe=(u,e)=>eMt(u,tMt(e)),uMt=(u,e)=>{var t={};for(var n in u)QBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nM)for(var n of nM(u))e.indexOf(n)<0&&XBe.call(u,n)&&(t[n]=u[n]);return t};const nMt={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},iMt={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},rMt=ewe(O8({},n7),{position:"left"});function twe(u){const e=Qe("DrawerRoot",rMt,u),{classNames:t,variant:n,size:i,scrollAreaComponent:r,position:a,transitionProps:o}=e,s=uMt(e,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:l,cx:c,theme:d}=jLt({position:a},{name:"Drawer",variant:n,size:i}),h=(d.dir==="rtl"?iMt:nMt)[a];return M.createElement(RLt,{value:{scrollAreaComponent:r}},M.createElement(sn,O8({__staticSelector:"Drawer",size:i,variant:n,transitionProps:O8({transition:h,duration:200},o),classNames:ewe(O8({},t),{content:c(l.content,t==null?void 0:t.content),inner:c(l.inner,t==null?void 0:t.inner)})},s)))}var aMt=Object.defineProperty,iM=Object.getOwnPropertySymbols,uwe=Object.prototype.hasOwnProperty,nwe=Object.prototype.propertyIsEnumerable,REe=(u,e,t)=>e in u?aMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,oMt=(u,e)=>{for(var t in e||(e={}))uwe.call(e,t)&&REe(u,t,e[t]);if(iM)for(var t of iM(e))nwe.call(e,t)&&REe(u,t,e[t]);return u},sMt=(u,e)=>{var t={};for(var n in u)uwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iM)for(var n of iM(u))e.indexOf(n)<0&&nwe.call(u,n)&&(t[n]=u[n]);return t};const lMt={shadow:"xl"},iwe=C.forwardRef((u,e)=>{const t=Qe("ModalContent",lMt,u),{children:n,scrollAreaComponent:i}=t,r=sMt(t,["children","scrollAreaComponent"]),a=ILt(),o=i||a.scrollAreaComponent||sn.NativeScrollArea;return M.createElement(sn.Content,oMt({ref:e,radius:0},r),M.createElement(o,{style:{height:"100vh"}},n))});var cMt=Object.defineProperty,dMt=Object.defineProperties,hMt=Object.getOwnPropertyDescriptors,rM=Object.getOwnPropertySymbols,rwe=Object.prototype.hasOwnProperty,awe=Object.prototype.propertyIsEnumerable,IEe=(u,e,t)=>e in u?cMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,j8=(u,e)=>{for(var t in e||(e={}))rwe.call(e,t)&&IEe(u,t,e[t]);if(rM)for(var t of rM(e))awe.call(e,t)&&IEe(u,t,e[t]);return u},EMt=(u,e)=>dMt(u,hMt(e)),mMt=(u,e)=>{var t={};for(var n in u)rwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rM)for(var n of rM(u))e.indexOf(n)<0&&awe.call(u,n)&&(t[n]=u[n]);return t};const gMt=EMt(j8({},n7),{withOverlay:!0,withCloseButton:!0});function T4(u){const e=Qe("Drawer",gMt,u),{title:t,withOverlay:n,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o}=e,s=mMt(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),l=!!t||r;return M.createElement(twe,j8({},s),n&&M.createElement(sn.Overlay,j8({},i)),M.createElement(iwe,null,l&&M.createElement(sn.Header,null,t&&M.createElement(sn.Title,null,t),r&&M.createElement(sn.CloseButton,j8({},a))),M.createElement(sn.Body,null,o)))}T4.Root=twe;T4.CloseButton=sn.CloseButton;T4.Overlay=sn.Overlay;T4.Content=iwe;T4.Header=sn.Header;T4.Title=sn.Title;T4.Body=sn.Body;T4.NativeScrollArea=sn.NativeScrollArea;var fMt=Object.defineProperty,aM=Object.getOwnPropertySymbols,owe=Object.prototype.hasOwnProperty,swe=Object.prototype.propertyIsEnumerable,OEe=(u,e,t)=>e in u?fMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jEe=(u,e)=>{for(var t in e||(e={}))owe.call(e,t)&&OEe(u,t,e[t]);if(aM)for(var t of aM(e))swe.call(e,t)&&OEe(u,t,e[t]);return u},pMt=(u,e)=>{var t={};for(var n in u)owe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&aM)for(var n of aM(u))e.indexOf(n)<0&&swe.call(u,n)&&(t[n]=u[n]);return t};const DMt={multiple:!1},lwe=C.forwardRef((u,e)=>{const t=Qe("FileButton",DMt,u),{onChange:n,children:i,multiple:r,accept:a,name:o,form:s,resetRef:l,disabled:c,capture:d,inputProps:h}=t,E=pMt(t,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),m=C.useRef(),g=()=>{!c&&m.current.click()},f=D=>{n(r?Array.from(D.currentTarget.files):D.currentTarget.files[0]||null)};return Jue(l,()=>{m.current.value=""}),M.createElement(M.Fragment,null,i(jEe({onClick:g},E)),M.createElement("input",jEe({style:{display:"none"},type:"file",accept:a,multiple:r,onChange:f,ref:q1(e,m),name:o,form:s,capture:d},h)))});lwe.displayName="@mantine/core/FileButton";const xMt={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var vMt=Object.defineProperty,CMt=Object.defineProperties,bMt=Object.getOwnPropertyDescriptors,oM=Object.getOwnPropertySymbols,cwe=Object.prototype.hasOwnProperty,dwe=Object.prototype.propertyIsEnumerable,HEe=(u,e,t)=>e in u?vMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kMt=(u,e)=>{for(var t in e||(e={}))cwe.call(e,t)&&HEe(u,t,e[t]);if(oM)for(var t of oM(e))dwe.call(e,t)&&HEe(u,t,e[t]);return u},FMt=(u,e)=>CMt(u,bMt(e)),yMt=(u,e)=>{var t={};for(var n in u)cwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oM)for(var n of oM(u))e.indexOf(n)<0&&dwe.call(u,n)&&(t[n]=u[n]);return t};const AMt={},Am=C.forwardRef((u,e)=>{const t=Qe("Flex",AMt,u),{gap:n,rowGap:i,columnGap:r,align:a,justify:o,wrap:s,direction:l,sx:c}=t,d=yMt(t,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return M.createElement(Ct,FMt(kMt({},d),{sx:[{display:"flex"},h=>CZ({gap:n,rowGap:i,columnGap:r,align:a,justify:o,wrap:s,direction:l},h,xMt),...EI(c)],ref:e}))});Am.displayName="@mantine/core/Flex";function _Mt(u){return C.Children.toArray(u).filter(Boolean)}const hwe={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var SMt=at((u,{spacing:e,position:t,noWrap:n,grow:i,align:r,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:r||"center",flexWrap:n?"nowrap":"wrap",justifyContent:hwe[t],gap:ye({size:e,sizes:u.spacing}),"& > *":{boxSizing:"border-box",maxWidth:i?`calc(${100/a}% - (${G(ye({size:e,sizes:u.spacing}))} - ${ye({size:e,sizes:u.spacing})} / ${a}))`:void 0,flexGrow:i?1:0}}}));const BMt=SMt;var wMt=Object.defineProperty,sM=Object.getOwnPropertySymbols,Ewe=Object.prototype.hasOwnProperty,mwe=Object.prototype.propertyIsEnumerable,VEe=(u,e,t)=>e in u?wMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LMt=(u,e)=>{for(var t in e||(e={}))Ewe.call(e,t)&&VEe(u,t,e[t]);if(sM)for(var t of sM(e))mwe.call(e,t)&&VEe(u,t,e[t]);return u},zMt=(u,e)=>{var t={};for(var n in u)Ewe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&sM)for(var n of sM(u))e.indexOf(n)<0&&mwe.call(u,n)&&(t[n]=u[n]);return t};const MMt={position:"left",spacing:"md"},zi=C.forwardRef((u,e)=>{const t=Qe("Group",MMt,u),{className:n,position:i,align:r,children:a,noWrap:o,grow:s,spacing:l,unstyled:c,variant:d}=t,h=zMt(t,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),E=_Mt(a),{classes:m,cx:g}=BMt({align:r,grow:s,noWrap:o,spacing:l,position:i,count:E.length},{unstyled:c,name:"Group",variant:d});return M.createElement(Ct,LMt({className:g(m.root,n),ref:e},h),E)});zi.displayName="@mantine/core/Group";const gwe={context:"HoverCard component was not found in the tree",children:"HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[TMt,fwe]=U1(gwe.context);var NMt=Object.defineProperty,lM=Object.getOwnPropertySymbols,pwe=Object.prototype.hasOwnProperty,Dwe=Object.prototype.propertyIsEnumerable,$Ee=(u,e,t)=>e in u?NMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,PMt=(u,e)=>{for(var t in e||(e={}))pwe.call(e,t)&&$Ee(u,t,e[t]);if(lM)for(var t of lM(e))Dwe.call(e,t)&&$Ee(u,t,e[t]);return u},RMt=(u,e)=>{var t={};for(var n in u)pwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&lM)for(var n of lM(u))e.indexOf(n)<0&&Dwe.call(u,n)&&(t[n]=u[n]);return t};const IMt={};function xwe(u){const e=Qe("HoverCardDropdown",IMt,u),{children:t,onMouseEnter:n,onMouseLeave:i}=e,r=RMt(e,["children","onMouseEnter","onMouseLeave"]),a=fwe(),o=no(n,a.openDropdown),s=no(i,a.closeDropdown);return M.createElement(hs.Dropdown,PMt({onMouseEnter:o,onMouseLeave:s},r),t)}xwe.displayName="@mantine/core/HoverCardDropdown";var OMt=Object.defineProperty,cM=Object.getOwnPropertySymbols,vwe=Object.prototype.hasOwnProperty,Cwe=Object.prototype.propertyIsEnumerable,KEe=(u,e,t)=>e in u?OMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jMt=(u,e)=>{for(var t in e||(e={}))vwe.call(e,t)&&KEe(u,t,e[t]);if(cM)for(var t of cM(e))Cwe.call(e,t)&&KEe(u,t,e[t]);return u},HMt=(u,e)=>{var t={};for(var n in u)vwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cM)for(var n of cM(u))e.indexOf(n)<0&&Cwe.call(u,n)&&(t[n]=u[n]);return t};const VMt={refProp:"ref"},bwe=C.forwardRef((u,e)=>{const t=Qe("HoverCardTarget",VMt,u),{children:n,refProp:i}=t,r=HMt(t,["children","refProp"]);if(!z6(n))throw new Error(gwe.children);const a=fwe(),o=no(n.props.onMouseEnter,a.openDropdown),s=no(n.props.onMouseLeave,a.closeDropdown);return M.createElement(hs.Target,jMt({refProp:i,ref:e},r),C.cloneElement(n,{onMouseEnter:o,onMouseLeave:s}))});bwe.displayName="@mantine/core/HoverCardTarget";function kwe({open:u,close:e,openDelay:t,closeDelay:n}){const i=C.useRef(-1),r=C.useRef(-1),a=()=>{window.clearTimeout(i.current),window.clearTimeout(r.current)},o=()=>{a(),t===0?u():i.current=window.setTimeout(u,t)},s=()=>{a(),n===0?e():r.current=window.setTimeout(e,n)};return C.useEffect(()=>a,[]),{openDropdown:o,closeDropdown:s}}var $Mt=Object.defineProperty,dM=Object.getOwnPropertySymbols,Fwe=Object.prototype.hasOwnProperty,ywe=Object.prototype.propertyIsEnumerable,WEe=(u,e,t)=>e in u?$Mt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KMt=(u,e)=>{for(var t in e||(e={}))Fwe.call(e,t)&&WEe(u,t,e[t]);if(dM)for(var t of dM(e))ywe.call(e,t)&&WEe(u,t,e[t]);return u},WMt=(u,e)=>{var t={};for(var n in u)Fwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&dM)for(var n of dM(u))e.indexOf(n)<0&&ywe.call(u,n)&&(t[n]=u[n]);return t};const GMt={openDelay:0,closeDelay:150,initiallyOpened:!1};function Ah(u){const e=Qe("HoverCard",GMt,u),{children:t,onOpen:n,onClose:i,openDelay:r,closeDelay:a,initiallyOpened:o}=e,s=WMt(e,["children","onOpen","onClose","openDelay","closeDelay","initiallyOpened"]),[l,{open:c,close:d}]=Un(o,{onClose:i,onOpen:n}),{openDropdown:h,closeDropdown:E}=kwe({open:c,close:d,openDelay:r,closeDelay:a});return M.createElement(TMt,{value:{openDropdown:h,closeDropdown:E}},M.createElement(hs,KMt({opened:l,__staticSelector:"HoverCard"},s),t))}Ah.displayName="@mantine/core/HoverCard";Ah.Target=bwe;Ah.Dropdown=xwe;var UMt=Object.defineProperty,hM=Object.getOwnPropertySymbols,Awe=Object.prototype.hasOwnProperty,_we=Object.prototype.propertyIsEnumerable,GEe=(u,e,t)=>e in u?UMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,UEe=(u,e)=>{for(var t in e||(e={}))Awe.call(e,t)&&GEe(u,t,e[t]);if(hM)for(var t of hM(e))_we.call(e,t)&&GEe(u,t,e[t]);return u},qMt=(u,e)=>{var t={};for(var n in u)Awe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&hM)for(var n of hM(u))e.indexOf(n)<0&&_we.call(u,n)&&(t[n]=u[n]);return t};function JMt(u){const e=u,{width:t,height:n,style:i}=e,r=qMt(e,["width","height","style"]);return M.createElement("svg",UEe({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:UEe({width:t,height:n},i)},r),M.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var ZMt=Object.defineProperty,YMt=Object.defineProperties,QMt=Object.getOwnPropertyDescriptors,qEe=Object.getOwnPropertySymbols,XMt=Object.prototype.hasOwnProperty,eTt=Object.prototype.propertyIsEnumerable,JEe=(u,e,t)=>e in u?ZMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZEe=(u,e)=>{for(var t in e||(e={}))XMt.call(e,t)&&JEe(u,t,e[t]);if(qEe)for(var t of qEe(e))eTt.call(e,t)&&JEe(u,t,e[t]);return u},YEe=(u,e)=>YMt(u,QMt(e)),tTt=at((u,{radius:e})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:YEe(ZEe({},u.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:u.fn.radius(e)}),caption:{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[7],marginTop:u.spacing.xs},placeholder:YEe(ZEe({},u.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0],borderRadius:u.fn.radius(e)})}));const uTt=tTt;var nTt=Object.defineProperty,iTt=Object.defineProperties,rTt=Object.getOwnPropertyDescriptors,EM=Object.getOwnPropertySymbols,Swe=Object.prototype.hasOwnProperty,Bwe=Object.prototype.propertyIsEnumerable,QEe=(u,e,t)=>e in u?nTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZC=(u,e)=>{for(var t in e||(e={}))Swe.call(e,t)&&QEe(u,t,e[t]);if(EM)for(var t of EM(e))Bwe.call(e,t)&&QEe(u,t,e[t]);return u},aTt=(u,e)=>iTt(u,rTt(e)),oTt=(u,e)=>{var t={};for(var n in u)Swe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&EM)for(var n of EM(u))e.indexOf(n)<0&&Bwe.call(u,n)&&(t[n]=u[n]);return t};const sTt={fit:"cover",width:"100%",height:"auto",radius:0},wZ=C.forwardRef((u,e)=>{const t=Qe("Image",sTt,u),{className:n,alt:i,src:r,fit:a,width:o,height:s,radius:l,imageProps:c,withPlaceholder:d,placeholder:h,imageRef:E,classNames:m,styles:g,caption:f,unstyled:p,style:D,variant:x}=t,b=oTt(t,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:k,cx:A}=uTt({radius:l},{classNames:m,styles:g,unstyled:p,name:"Image",variant:x}),[F,S]=C.useState(!r),w=d&&F;return To(()=>{S(!r)},[r]),M.createElement(Ct,ZC({className:A(k.root,n),style:ZC({width:G(o)},D),ref:e},b),M.createElement("figure",{className:k.figure},M.createElement("div",{className:k.imageWrapper},M.createElement("img",aTt(ZC({src:r,alt:i,ref:E},c),{className:A(k.image,c==null?void 0:c.className),onError:z=>{S(!0),typeof(c==null?void 0:c.onError)=="function"&&c.onError(z)},style:ZC(ZC({objectFit:a,width:G(o),height:G(s)},w&&{overflow:"hidden"}),c==null?void 0:c.style)})),w&&M.createElement("div",{className:k.placeholder,title:i},h||M.createElement("div",null,M.createElement(JMt,{width:G(40),height:G(40)})))),!!f&&M.createElement(_u,{component:"figcaption",size:"sm",align:"center",className:k.caption},f)))});wZ.displayName="@mantine/core/Image";var lTt=Object.defineProperty,cTt=Object.defineProperties,dTt=Object.getOwnPropertyDescriptors,XEe=Object.getOwnPropertySymbols,hTt=Object.prototype.hasOwnProperty,ETt=Object.prototype.propertyIsEnumerable,eme=(u,e,t)=>e in u?lTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tme=(u,e)=>{for(var t in e||(e={}))hTt.call(e,t)&&eme(u,t,e[t]);if(XEe)for(var t of XEe(e))ETt.call(e,t)&&eme(u,t,e[t]);return u},ume=(u,e)=>cTt(u,dTt(e));const mTt=u=>K2t({from:{boxShadow:`0 0 ${G(.5)} 0 ${u}`,opacity:.6},to:{boxShadow:`0 0 ${G(.5)} ${G(4.4)} ${u}`,opacity:0}});function nme(u,e=0){const t={},[n,i]=u.split("-");let r="",a="";return n==="top"&&(t.top=e,a="-50%"),n==="middle"&&(t.top="50%",a="-50%"),n==="bottom"&&(t.bottom=e,a="50%"),i==="start"&&(t.left=e,r="-50%"),i==="center"&&(t.left="50%",r="-50%"),i==="end"&&(t.right=e,r="50%"),t.transform=`translate(${r}, ${a})`,t}var gTt=at((u,{radius:e,color:t,position:n,offset:i,inline:r,withBorder:a,withLabel:o,zIndex:s},{size:l})=>{const{background:c}=u.fn.variant({variant:"filled",primaryFallback:!1,color:t||u.primaryColor}),d=G(l);return{root:{position:"relative",display:r?"inline-block":"block"},indicator:ume(tme({},nme(n,i)),{zIndex:s,position:"absolute",[o?"minWidth":"width"]:d,height:d,display:"flex",justifyContent:"center",alignItems:"center",fontSize:u.fontSizes.xs,paddingLeft:o?`calc(${u.spacing.xs} / 2)`:0,paddingRight:o?`calc(${u.spacing.xs} / 2)`:0,borderRadius:u.fn.radius(e),backgroundColor:u.fn.variant({variant:"filled",primaryFallback:!1,color:t||u.primaryColor}).background,border:a?`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[7]:u.white}`:void 0,color:u.white,whiteSpace:"nowrap"}),processing:{animation:`${mTt(c)} 1000ms linear infinite`},common:ume(tme({},nme(n,i)),{position:"absolute",[o?"minWidth":"width"]:d,height:d,borderRadius:u.fn.radius(e)})}});const fTt=gTt;var pTt=Object.defineProperty,mM=Object.getOwnPropertySymbols,wwe=Object.prototype.hasOwnProperty,Lwe=Object.prototype.propertyIsEnumerable,ime=(u,e,t)=>e in u?pTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DTt=(u,e)=>{for(var t in e||(e={}))wwe.call(e,t)&&ime(u,t,e[t]);if(mM)for(var t of mM(e))Lwe.call(e,t)&&ime(u,t,e[t]);return u},xTt=(u,e)=>{var t={};for(var n in u)wwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&mM)for(var n of mM(u))e.indexOf(n)<0&&Lwe.call(u,n)&&(t[n]=u[n]);return t};const vTt={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:fd("app")},zwe=C.forwardRef((u,e)=>{const t=Qe("Indicator",vTt,u),{children:n,position:i,offset:r,size:a,radius:o,inline:s,withBorder:l,className:c,color:d,styles:h,label:E,classNames:m,disabled:g,zIndex:f,unstyled:p,processing:D,variant:x}=t,b=xTt(t,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:k,cx:A}=fTt({position:i,offset:r,radius:o,inline:s,color:d,withBorder:l,zIndex:f,withLabel:!!E},{name:"Indicator",classNames:m,styles:h,unstyled:p,variant:x,size:a});return M.createElement(Ct,DTt({ref:e,className:A(k.root,c)},b),!g&&M.createElement(M.Fragment,null,M.createElement("div",{className:A(k.indicator,k.common)},E),D&&M.createElement("div",{className:A(k.processing,k.common)})),n)});zwe.displayName="@mantine/core/Indicator";function Mwe(u,e){if(u==null)return{};var t={},n=Object.keys(u),i,r;for(r=0;r=0)&&(t[i]=u[i]);return t}const Twe={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[CTt,i7]=U1(Twe.context);var bTt=at(u=>({divider:{marginTop:G(4),marginBottom:G(4),borderTop:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`}}));const kTt=bTt;var FTt=Object.defineProperty,gM=Object.getOwnPropertySymbols,Nwe=Object.prototype.hasOwnProperty,Pwe=Object.prototype.propertyIsEnumerable,rme=(u,e,t)=>e in u?FTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yTt=(u,e)=>{for(var t in e||(e={}))Nwe.call(e,t)&&rme(u,t,e[t]);if(gM)for(var t of gM(e))Pwe.call(e,t)&&rme(u,t,e[t]);return u},ATt=(u,e)=>{var t={};for(var n in u)Nwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&gM)for(var n of gM(u))e.indexOf(n)<0&&Pwe.call(u,n)&&(t[n]=u[n]);return t};const _Tt={},Rwe=C.forwardRef((u,e)=>{const t=Qe("MenuDivider",_Tt,u),{children:n,className:i}=t,r=ATt(t,["children","className"]),{classNames:a,styles:o,unstyled:s,variant:l}=i7(),{classes:c,cx:d}=kTt(null,{name:"Menu",classNames:a,styles:o,unstyled:s,variant:l});return M.createElement(Ct,yTt({className:d(c.divider,i),ref:e},r))});Rwe.displayName="@mantine/core/MenuDivider";var STt=Object.defineProperty,fM=Object.getOwnPropertySymbols,Iwe=Object.prototype.hasOwnProperty,Owe=Object.prototype.propertyIsEnumerable,ame=(u,e,t)=>e in u?STt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,BTt=(u,e)=>{for(var t in e||(e={}))Iwe.call(e,t)&&ame(u,t,e[t]);if(fM)for(var t of fM(e))Owe.call(e,t)&&ame(u,t,e[t]);return u},wTt=(u,e)=>{var t={};for(var n in u)Iwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&fM)for(var n of fM(u))e.indexOf(n)<0&&Owe.call(u,n)&&(t[n]=u[n]);return t};const LTt={};function jwe(u){const e=Qe("MenuDropdown",LTt,u),{children:t,onMouseEnter:n,onMouseLeave:i}=e,r=wTt(e,["children","onMouseEnter","onMouseLeave"]),a=C.useRef(),o=i7(),s=d=>{var h;(d.key==="ArrowUp"||d.key==="ArrowDown")&&(d.preventDefault(),(h=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||h.focus())},l=no(n,()=>o.trigger==="hover"&&o.openDropdown()),c=no(i,()=>o.trigger==="hover"&&o.closeDropdown());return M.createElement(hs.Dropdown,BTt({onMouseEnter:l,onMouseLeave:c,role:"menu","aria-orientation":"vertical"},r),M.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:s,ref:a,style:{outline:0}},t))}jwe.displayName="@mantine/core/MenuDropdown";var zTt=Object.defineProperty,MTt=Object.defineProperties,TTt=Object.getOwnPropertyDescriptors,ome=Object.getOwnPropertySymbols,NTt=Object.prototype.hasOwnProperty,PTt=Object.prototype.propertyIsEnumerable,sme=(u,e,t)=>e in u?zTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,RTt=(u,e)=>{for(var t in e||(e={}))NTt.call(e,t)&&sme(u,t,e[t]);if(ome)for(var t of ome(e))PTt.call(e,t)&&sme(u,t,e[t]);return u},ITt=(u,e)=>MTt(u,TTt(e)),OTt=at((u,{color:e,radius:t})=>({item:ITt(RTt({},u.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:u.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${u.spacing.xs} ${u.spacing.sm}`,cursor:"pointer",borderRadius:u.fn.radius(t),color:e?u.fn.variant({variant:"filled",primaryFallback:!1,color:e}).background:u.colorScheme==="dark"?u.colors.dark[0]:u.black,display:"flex",alignItems:"center","&:disabled":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:e?u.fn.variant({variant:"light",color:e}).background:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[3],.35):u.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:u.spacing.xs},itemRightSection:{}}));const jTt=OTt;var HTt=Object.defineProperty,VTt=Object.defineProperties,$Tt=Object.getOwnPropertyDescriptors,pM=Object.getOwnPropertySymbols,Hwe=Object.prototype.hasOwnProperty,Vwe=Object.prototype.propertyIsEnumerable,lme=(u,e,t)=>e in u?HTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KTt=(u,e)=>{for(var t in e||(e={}))Hwe.call(e,t)&&lme(u,t,e[t]);if(pM)for(var t of pM(e))Vwe.call(e,t)&&lme(u,t,e[t]);return u},WTt=(u,e)=>VTt(u,$Tt(e)),GTt=(u,e)=>{var t={};for(var n in u)Hwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&pM)for(var n of pM(u))e.indexOf(n)<0&&Vwe.call(u,n)&&(t[n]=u[n]);return t};const UTt={},$we=C.forwardRef((u,e)=>{const t=Qe("MenuItem",UTt,u),{children:n,className:i,color:r,closeMenuOnClick:a,icon:o,rightSection:s}=t,l=GTt(t,["children","className","color","closeMenuOnClick","icon","rightSection"]),c=i7(),{classes:d,cx:h,theme:E}=jTt({radius:c.radius,color:r},{name:"Menu",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),m=C.useRef(),g=c.getItemIndex(m.current),f=l,p=no(f.onMouseLeave,()=>c.setHovered(-1)),D=no(f.onMouseEnter,()=>c.setHovered(c.getItemIndex(m.current))),x=no(f.onClick,()=>{typeof a=="boolean"?a&&c.closeDropdownImmediately():c.closeOnItemClick&&c.closeDropdownImmediately()}),b=no(f.onFocus,()=>c.setHovered(c.getItemIndex(m.current)));return M.createElement(Ct,WTt(KTt({component:"button",type:"button"},l),{tabIndex:-1,onFocus:b,className:h(d.item,i),ref:q1(m,e),role:"menuitem","data-menu-item":!0,"data-hovered":c.hovered===g?!0:void 0,onMouseEnter:D,onMouseLeave:p,onClick:x,onKeyDown:Pue({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:c.loop,dir:E.dir,orientation:"vertical",onKeyDown:f.onKeydown})}),o&&M.createElement("div",{className:d.itemIcon},o),n&&M.createElement("div",{className:d.itemLabel},n),s&&M.createElement("div",{className:d.itemRightSection},s))});$we.displayName="@mantine/core/MenuItem";const qTt=$we;var JTt=at(u=>({label:{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],fontWeight:500,fontSize:u.fontSizes.xs,padding:`calc(${u.spacing.xs} / 2) ${u.spacing.sm}`,cursor:"default"}}));const ZTt=JTt;var YTt=Object.defineProperty,DM=Object.getOwnPropertySymbols,Kwe=Object.prototype.hasOwnProperty,Wwe=Object.prototype.propertyIsEnumerable,cme=(u,e,t)=>e in u?YTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QTt=(u,e)=>{for(var t in e||(e={}))Kwe.call(e,t)&&cme(u,t,e[t]);if(DM)for(var t of DM(e))Wwe.call(e,t)&&cme(u,t,e[t]);return u},XTt=(u,e)=>{var t={};for(var n in u)Kwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&DM)for(var n of DM(u))e.indexOf(n)<0&&Wwe.call(u,n)&&(t[n]=u[n]);return t};const eNt={},Gwe=C.forwardRef((u,e)=>{const t=Qe("MenuLabel",eNt,u),{children:n,className:i}=t,r=XTt(t,["children","className"]),{classNames:a,styles:o,unstyled:s,variant:l}=i7(),{classes:c,cx:d}=ZTt(null,{name:"Menu",classNames:a,styles:o,unstyled:s,variant:l});return M.createElement(_u,QTt({className:d(c.label,i),ref:e},r),n)});Gwe.displayName="@mantine/core/MenuLabel";var tNt=Object.defineProperty,xM=Object.getOwnPropertySymbols,Uwe=Object.prototype.hasOwnProperty,qwe=Object.prototype.propertyIsEnumerable,dme=(u,e,t)=>e in u?tNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uNt=(u,e)=>{for(var t in e||(e={}))Uwe.call(e,t)&&dme(u,t,e[t]);if(xM)for(var t of xM(e))qwe.call(e,t)&&dme(u,t,e[t]);return u},nNt=(u,e)=>{var t={};for(var n in u)Uwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&xM)for(var n of xM(u))e.indexOf(n)<0&&qwe.call(u,n)&&(t[n]=u[n]);return t};const iNt={refProp:"ref"},Jwe=C.forwardRef((u,e)=>{const t=Qe("MenuTarget",iNt,u),{children:n,refProp:i}=t,r=nNt(t,["children","refProp"]);if(!z6(n))throw new Error(Twe.children);const a=i7(),o=no(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),s=no(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),l=no(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return M.createElement(hs.Target,uNt({refProp:i,popupType:"menu",ref:e},r),C.cloneElement(n,{onClick:o,onMouseEnter:s,onMouseLeave:l,"data-expanded":a.opened?!0:void 0}))});Jwe.displayName="@mantine/core/MenuTarget";var rNt=at({dropdown:{padding:G(4)}});const aNt=rNt;var oNt=Object.defineProperty,sNt=Object.defineProperties,lNt=Object.getOwnPropertyDescriptors,vM=Object.getOwnPropertySymbols,Zwe=Object.prototype.hasOwnProperty,Ywe=Object.prototype.propertyIsEnumerable,hme=(u,e,t)=>e in u?oNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Eme=(u,e)=>{for(var t in e||(e={}))Zwe.call(e,t)&&hme(u,t,e[t]);if(vM)for(var t of vM(e))Ywe.call(e,t)&&hme(u,t,e[t]);return u},mme=(u,e)=>sNt(u,lNt(e)),cNt=(u,e)=>{var t={};for(var n in u)Zwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&vM)for(var n of vM(u))e.indexOf(n)<0&&Ywe.call(u,n)&&(t[n]=u[n]);return t};const dNt={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function La(u){const e=Qe("Menu",dNt,u),{children:t,onOpen:n,onClose:i,opened:r,defaultOpened:a,onChange:o,closeOnItemClick:s,loop:l,closeOnEscape:c,trigger:d,openDelay:h,closeDelay:E,classNames:m,styles:g,unstyled:f,radius:p,variant:D}=e,x=cNt(e,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:b,cx:k}=aNt(),[A,{setHovered:F,resetHovered:S}]=mbt(),[w,z]=fs({value:r,defaultValue:a,finalValue:!1,onChange:o}),N=()=>{z(!1),w&&(i==null||i())},O=()=>{z(!0),!w&&(n==null||n())},y=()=>w?N():O(),{openDropdown:_,closeDropdown:L}=kwe({open:O,close:N,closeDelay:E,openDelay:h}),T=R=>dbt("[data-menu-item]","[data-menu-dropdown]",R);return To(()=>{S()},[w]),M.createElement(CTt,{value:{opened:w,toggleDropdown:y,getItemIndex:T,hovered:A,setHovered:F,closeOnItemClick:s,closeDropdown:d==="click"?N:L,openDropdown:d==="click"?O:_,closeDropdownImmediately:N,loop:l,trigger:d,radius:p,classNames:m,styles:g,unstyled:f,variant:D}},M.createElement(hs,mme(Eme({},x),{radius:p,opened:w,onChange:y,defaultOpened:a,trapFocus:d==="click",closeOnEscape:c&&d==="click",__staticSelector:"Menu",classNames:mme(Eme({},m),{dropdown:k(b.dropdown,m==null?void 0:m.dropdown)}),styles:g,unstyled:f,variant:D}),t))}La.displayName="@mantine/core/Menu";La.Item=qTt;La.Label=Gwe;La.Dropdown=jwe;La.Target=Jwe;La.Divider=Rwe;const[hNt,ENt]=U1("Modal component was not found in tree"),mNt={xs:G(320),sm:G(380),md:G(440),lg:G(620),xl:G(780)};var gNt=at((u,{yOffset:e,xOffset:t,centered:n,fullScreen:i},{size:r})=>({content:{flex:i?"0 0 100%":`0 0 ${ye({size:r,sizes:mNt})}`,maxWidth:"100%",maxHeight:i?void 0:`calc(100dvh - (${G(e)} * 2))`,height:i?"100vh":void 0,borderRadius:i?0:void 0,overflowY:"auto"},inner:{paddingTop:i?0:e,paddingBottom:i?0:e,paddingLeft:i?0:t,paddingRight:i?0:t,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const fNt=gNt;var pNt=Object.defineProperty,DNt=Object.defineProperties,xNt=Object.getOwnPropertyDescriptors,CM=Object.getOwnPropertySymbols,Qwe=Object.prototype.hasOwnProperty,Xwe=Object.prototype.propertyIsEnumerable,gme=(u,e,t)=>e in u?pNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LZ=(u,e)=>{for(var t in e||(e={}))Qwe.call(e,t)&&gme(u,t,e[t]);if(CM)for(var t of CM(e))Xwe.call(e,t)&&gme(u,t,e[t]);return u},eLe=(u,e)=>DNt(u,xNt(e)),vNt=(u,e)=>{var t={};for(var n in u)Qwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&CM)for(var n of CM(u))e.indexOf(n)<0&&Xwe.call(u,n)&&(t[n]=u[n]);return t};const CNt=eLe(LZ({},n7),{yOffset:"5dvh",xOffset:"5vw"});function tLe(u){const e=Qe("ModalRoot",CNt,u),{classNames:t,variant:n,size:i,yOffset:r,xOffset:a,scrollAreaComponent:o,radius:s,centered:l,fullScreen:c}=e,d=vNt(e,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:E}=fNt({yOffset:r,xOffset:a,centered:l,fullScreen:c},{name:"Modal",variant:n,size:i});return M.createElement(hNt,{value:{yOffset:r,scrollAreaComponent:o,radius:s}},M.createElement(sn,LZ({__staticSelector:"Modal",size:i,variant:n,classNames:eLe(LZ({},t),{content:E(h.content,t==null?void 0:t.content),inner:E(h.inner,t==null?void 0:t.inner)})},d)))}var bNt=Object.defineProperty,bM=Object.getOwnPropertySymbols,uLe=Object.prototype.hasOwnProperty,nLe=Object.prototype.propertyIsEnumerable,fme=(u,e,t)=>e in u?bNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kNt=(u,e)=>{for(var t in e||(e={}))uLe.call(e,t)&&fme(u,t,e[t]);if(bM)for(var t of bM(e))nLe.call(e,t)&&fme(u,t,e[t]);return u},FNt=(u,e)=>{var t={};for(var n in u)uLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&bM)for(var n of bM(u))e.indexOf(n)<0&&nLe.call(u,n)&&(t[n]=u[n]);return t};const yNt={shadow:"xl"},iLe=C.forwardRef((u,e)=>{const t=Qe("ModalContent",yNt,u),{children:n,scrollAreaComponent:i}=t,r=FNt(t,["children","scrollAreaComponent"]),a=ENt(),o=i||a.scrollAreaComponent||sn.NativeScrollArea;return M.createElement(sn.Content,kNt({ref:e,radius:a.radius},r),M.createElement(o,{style:{maxHeight:`calc(100dvh - (${G(a.yOffset)} * 2))`}},n))});var ANt=Object.defineProperty,_Nt=Object.defineProperties,SNt=Object.getOwnPropertyDescriptors,kM=Object.getOwnPropertySymbols,rLe=Object.prototype.hasOwnProperty,aLe=Object.prototype.propertyIsEnumerable,pme=(u,e,t)=>e in u?ANt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,H8=(u,e)=>{for(var t in e||(e={}))rLe.call(e,t)&&pme(u,t,e[t]);if(kM)for(var t of kM(e))aLe.call(e,t)&&pme(u,t,e[t]);return u},BNt=(u,e)=>_Nt(u,SNt(e)),wNt=(u,e)=>{var t={};for(var n in u)rLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&kM)for(var n of kM(u))e.indexOf(n)<0&&aLe.call(u,n)&&(t[n]=u[n]);return t};const LNt=BNt(H8({},n7),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Wi(u){const e=Qe("Modal",LNt,u),{title:t,withOverlay:n,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o}=e,s=wNt(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),l=!!t||r;return M.createElement(tLe,H8({},s),n&&M.createElement(sn.Overlay,H8({},i)),M.createElement(iLe,null,l&&M.createElement(sn.Header,null,t&&M.createElement(sn.Title,null,t),r&&M.createElement(sn.CloseButton,H8({},a))),M.createElement(sn.Body,null,o)))}Wi.Root=tLe;Wi.CloseButton=sn.CloseButton;Wi.Overlay=sn.Overlay;Wi.Content=iLe;Wi.Header=sn.Header;Wi.Title=sn.Title;Wi.Body=sn.Body;Wi.NativeScrollArea=sn.NativeScrollArea;const oLe={xs:G(16),sm:G(22),md:G(26),lg:G(30),xl:G(36)},zNt={xs:G(10),sm:G(12),md:G(14),lg:G(16),xl:G(18)};var MNt=at((u,{disabled:e,radius:t,readOnly:n},{size:i,variant:r})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:e?u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3]:u.colorScheme==="dark"?u.colors.dark[7]:r==="filled"?u.white:u.colors.gray[1],color:e?u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7]:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],height:ye({size:i,sizes:oLe}),paddingLeft:`calc(${ye({size:i,sizes:u.spacing})} / 1.5)`,paddingRight:e||n?ye({size:i,sizes:u.spacing}):0,fontWeight:500,fontSize:ye({size:i,sizes:zNt}),borderRadius:ye({size:t,sizes:u.radius}),cursor:e?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${G(10)})`},defaultValueRemove:{color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],marginLeft:`calc(${ye({size:i,sizes:u.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const TNt=MNt;var NNt=Object.defineProperty,FM=Object.getOwnPropertySymbols,sLe=Object.prototype.hasOwnProperty,lLe=Object.prototype.propertyIsEnumerable,Dme=(u,e,t)=>e in u?NNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,PNt=(u,e)=>{for(var t in e||(e={}))sLe.call(e,t)&&Dme(u,t,e[t]);if(FM)for(var t of FM(e))lLe.call(e,t)&&Dme(u,t,e[t]);return u},RNt=(u,e)=>{var t={};for(var n in u)sLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&FM)for(var n of FM(u))e.indexOf(n)<0&&lLe.call(u,n)&&(t[n]=u[n]);return t};const INt={xs:16,sm:22,md:24,lg:26,xl:30};function cLe(u){var e=u,{label:t,classNames:n,styles:i,className:r,onRemove:a,disabled:o,readOnly:s,size:l,radius:c="sm",variant:d,unstyled:h}=e,E=RNt(e,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:m,cx:g}=TNt({disabled:o,readOnly:s,radius:c},{name:"MultiSelect",classNames:n,styles:i,unstyled:h,size:l,variant:d});return M.createElement("div",PNt({className:g(m.defaultValue,r)},E),M.createElement("span",{className:m.defaultValueLabel},t),!o&&!s&&M.createElement(SI,{"aria-hidden":!0,onMouseDown:a,size:INt[l],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:m.defaultValueRemove,tabIndex:-1,unstyled:h}))}cLe.displayName="@mantine/core/MultiSelect/DefaultValue";function ONt({data:u,searchable:e,limit:t,searchValue:n,filter:i,value:r,disableSelectedItemFiltering:a}){if(!e&&r.length===0)return u;if(!e){const s=[];for(let l=0;lc===u[l].value&&!u[l].disabled))&&s.push(u[l]);return s}const o=[];for(let s=0;sl===u[s].value&&!u[s].disabled),u[s])&&o.push(u[s]),!(o.length>=t));s+=1);return o}var jNt=Object.defineProperty,yM=Object.getOwnPropertySymbols,dLe=Object.prototype.hasOwnProperty,hLe=Object.prototype.propertyIsEnumerable,xme=(u,e,t)=>e in u?jNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,vme=(u,e)=>{for(var t in e||(e={}))dLe.call(e,t)&&xme(u,t,e[t]);if(yM)for(var t of yM(e))hLe.call(e,t)&&xme(u,t,e[t]);return u},HNt=(u,e)=>{var t={};for(var n in u)dLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&yM)for(var n of yM(u))e.indexOf(n)<0&&hLe.call(u,n)&&(t[n]=u[n]);return t};const VNt={xs:G(14),sm:G(18),md:G(20),lg:G(24),xl:G(28)};function $Nt(u){var e=u,{size:t,error:n,style:i}=e,r=HNt(e,["size","error","style"]);const a=jr(),o=ye({size:t,sizes:VNt});return M.createElement("svg",vme({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:vme({color:n?a.colors.red[6]:a.colors.gray[6],width:o,height:o},i),"data-chevron":!0},r),M.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var KNt=Object.defineProperty,WNt=Object.defineProperties,GNt=Object.getOwnPropertyDescriptors,Cme=Object.getOwnPropertySymbols,UNt=Object.prototype.hasOwnProperty,qNt=Object.prototype.propertyIsEnumerable,bme=(u,e,t)=>e in u?KNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JNt=(u,e)=>{for(var t in e||(e={}))UNt.call(e,t)&&bme(u,t,e[t]);if(Cme)for(var t of Cme(e))qNt.call(e,t)&&bme(u,t,e[t]);return u},ZNt=(u,e)=>WNt(u,GNt(e));function ELe({shouldClear:u,clearButtonProps:e,onClear:t,size:n,error:i}){return u?M.createElement(SI,ZNt(JNt({},e),{variant:"transparent",onClick:t,size:n,onMouseDown:r=>r.preventDefault()})):M.createElement($Nt,{error:i,size:n})}ELe.displayName="@mantine/core/SelectRightSection";var YNt=Object.defineProperty,QNt=Object.defineProperties,XNt=Object.getOwnPropertyDescriptors,AM=Object.getOwnPropertySymbols,mLe=Object.prototype.hasOwnProperty,gLe=Object.prototype.propertyIsEnumerable,kme=(u,e,t)=>e in u?YNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KV=(u,e)=>{for(var t in e||(e={}))mLe.call(e,t)&&kme(u,t,e[t]);if(AM)for(var t of AM(e))gLe.call(e,t)&&kme(u,t,e[t]);return u},Fme=(u,e)=>QNt(u,XNt(e)),ePt=(u,e)=>{var t={};for(var n in u)mLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&AM)for(var n of AM(u))e.indexOf(n)<0&&gLe.call(u,n)&&(t[n]=u[n]);return t};function fLe(u){var e=u,{styles:t,rightSection:n,rightSectionWidth:i,theme:r}=e,a=ePt(e,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:i,styles:t};const o=typeof t=="function"?t(r):t;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&M.createElement(ELe,KV({},a)),styles:Fme(KV({},o),{rightSection:Fme(KV({},o==null?void 0:o.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}var tPt=Object.defineProperty,uPt=Object.defineProperties,nPt=Object.getOwnPropertyDescriptors,yme=Object.getOwnPropertySymbols,iPt=Object.prototype.hasOwnProperty,rPt=Object.prototype.propertyIsEnumerable,Ame=(u,e,t)=>e in u?tPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,aPt=(u,e)=>{for(var t in e||(e={}))iPt.call(e,t)&&Ame(u,t,e[t]);if(yme)for(var t of yme(e))rPt.call(e,t)&&Ame(u,t,e[t]);return u},oPt=(u,e)=>uPt(u,nPt(e)),sPt=at((u,{invalid:e},{size:t})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,"&::placeholder":{color:u.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3],color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7]}}},values:{minHeight:`calc(${ye({size:t,sizes:kr})} - ${G(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${u.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:ye({size:t,sizes:kr})}},value:{margin:`calc(${u.spacing.xs} / 2 - ${G(2)}) calc(${u.spacing.xs} / 2)`},searchInput:oPt(aPt({},u.fn.fontStyles()),{flex:1,minWidth:G(60),backgroundColor:"transparent",border:0,outline:0,fontSize:ye({size:t,sizes:u.fontSizes}),padding:0,marginLeft:`calc(${u.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:ye({size:t,sizes:oLe}),"&::placeholder":{opacity:1,color:e?u.colors.red[u.fn.primaryShade()]:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const lPt=sPt;var cPt=Object.defineProperty,dPt=Object.defineProperties,hPt=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,pLe=Object.prototype.hasOwnProperty,DLe=Object.prototype.propertyIsEnumerable,_me=(u,e,t)=>e in u?cPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ND=(u,e)=>{for(var t in e||(e={}))pLe.call(e,t)&&_me(u,t,e[t]);if(_M)for(var t of _M(e))DLe.call(e,t)&&_me(u,t,e[t]);return u},Sme=(u,e)=>dPt(u,hPt(e)),EPt=(u,e)=>{var t={};for(var n in u)pLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&_M)for(var n of _M(u))e.indexOf(n)<0&&DLe.call(u,n)&&(t[n]=u[n]);return t};function mPt(u,e,t){return e?!1:t.label.toLowerCase().trim().includes(u.toLowerCase().trim())}function gPt(u,e){return!!u&&!e.some(t=>t.value.toLowerCase()===u.toLowerCase())}function Bme(u,e){if(!Array.isArray(u))return;if(e.length===0)return[];const t=e.map(n=>typeof n=="object"?n.value:n);return u.filter(n=>t.includes(n))}const fPt={size:"sm",valueComponent:cLe,itemComponent:Xue,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:mPt,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:gPt,switchDirectionOnFlip:!1,zIndex:fd("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},zZ=C.forwardRef((u,e)=>{const t=Qe("MultiSelect",fPt,u),{className:n,style:i,required:r,label:a,description:o,size:s,error:l,classNames:c,styles:d,wrapperProps:h,value:E,defaultValue:m,data:g,onChange:f,valueComponent:p,itemComponent:D,id:x,transitionProps:b,maxDropdownHeight:k,shadow:A,nothingFound:F,onFocus:S,onBlur:w,searchable:z,placeholder:N,filter:O,limit:y,clearSearchOnChange:_,clearable:L,clearSearchOnBlur:T,variant:R,onSearchChange:I,searchValue:H,disabled:V,initiallyOpened:U,radius:J,icon:Y,rightSection:X,rightSectionWidth:re,creatable:ge,getCreateLabel:_e,shouldCreate:Ve,onCreate:Ue,sx:qe,dropdownComponent:Se,onDropdownClose:de,onDropdownOpen:he,maxSelectedValues:Be,withinPortal:je,portalProps:bt,switchDirectionOnFlip:qt,zIndex:ou,selectOnBlur:Vt,name:oe,dropdownPosition:se,errorProps:ie,labelProps:$,descriptionProps:Z,form:ue,positionDependencies:te,onKeyDown:fe,unstyled:Le,inputContainer:Je,inputWrapperOrder:it,readOnly:ct,withAsterisk:xt,clearButtonProps:Jt,hoverOnSearchChange:Ze,disableSelectedItemFiltering:Ie}=t,Tu=EPt(t,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:gu,cx:fn,theme:Wt}=lPt({invalid:!!l},{name:"MultiSelect",classNames:c,styles:d,unstyled:Le,size:s,variant:R}),{systemStyles:Ln,rest:Vu}=w4(Tu),un=C.useRef(),zn=C.useRef({}),bn=Jl(x),[$u,wu]=C.useState(U),[Ou,ki]=C.useState(-1),[$i,Vn]=C.useState("column"),[Ni,ka]=fs({value:H,defaultValue:"",finalValue:void 0,onChange:I}),[fo,eh]=C.useState(!1),{scrollIntoView:Va,targetRef:Hr,scrollableRef:Cd}=s_e({duration:0,offset:5,cancelable:!1,isList:!0}),Og=ge&&typeof _e=="function";let Mt=null;const $n=g.map(su=>typeof su=="string"?{label:su,value:su}:su),ia=S9e({data:$n}),[Xe,le]=fs({value:Bme(E,g),defaultValue:Bme(m,g),finalValue:[],onChange:f}),Ge=C.useRef(!!Be&&Be{if(!ct){const Fi=Xe.filter(X0=>X0!==su);le(Fi),Be&&Fi.length{ka(su.currentTarget.value),!V&&!Ge.current&&z&&wu(!0)},Vr=su=>{typeof S=="function"&&S(su),!V&&!Ge.current&&z&&wu(!0)},Wn=ONt({data:ia,searchable:z,searchValue:Ni,limit:y,filter:O,value:Xe,disableSelectedItemFiltering:Ie});Og&&Ve(Ni,ia)&&(Mt=_e(Ni),Wn.push({label:Ni,value:Ni,creatable:!0}));const Mn=Math.min(Ou,Wn.length-1),a0=(su,Fi,X0)=>{let R4=su;for(;X0(R4);)if(R4=Fi(R4),!Wn[R4].disabled)return R4;return su};To(()=>{ki(Ze&&Ni?0:-1)},[Ni,Ze]),To(()=>{!V&&Xe.length>g.length&&wu(!1),Be&&Xe.length=Be&&(Ge.current=!0,wu(!1))},[Xe]);const P4=su=>{if(!ct)if(_&&ka(""),Xe.includes(su.value))Et(su.value);else{if(su.creatable&&typeof Ue=="function"){const Fi=Ue(su.value);typeof Fi<"u"&&Fi!==null&&le(typeof Fi=="string"?[...Xe,Fi]:[...Xe,Fi.value])}else le([...Xe,su.value]);Xe.length===Be-1&&(Ge.current=!0,wu(!1)),Wn.length===1&&wu(!1)}},P7=su=>{typeof w=="function"&&w(su),Vt&&Wn[Mn]&&$u&&P4(Wn[Mn]),T&&ka(""),wu(!1)},zre=su=>{if(fo||(fe==null||fe(su),ct)||su.key!=="Backspace"&&Be&&Ge.current)return;const Fi=$i==="column",X0=()=>{ki(jg=>{var th;const eC=a0(jg,Hg=>Hg+1,Hg=>Hg{ki(jg=>{var th;const eC=a0(jg,Hg=>Hg-1,Hg=>Hg>0);return $u&&(Hr.current=zn.current[(th=Wn[eC])==null?void 0:th.value],Va({alignment:Fi?"start":"end"})),eC})};switch(su.key){case"ArrowUp":{su.preventDefault(),wu(!0),Fi?R4():X0();break}case"ArrowDown":{su.preventDefault(),wu(!0),Fi?X0():R4();break}case"Enter":{su.preventDefault(),Wn[Mn]&&$u?P4(Wn[Mn]):wu(!0);break}case" ":{z||(su.preventDefault(),Wn[Mn]&&$u?P4(Wn[Mn]):wu(!0));break}case"Backspace":{Xe.length>0&&Ni.length===0&&(le(Xe.slice(0,-1)),wu(!0),Be&&(Ge.current=!1));break}case"Home":{if(!z){su.preventDefault(),$u||wu(!0);const jg=Wn.findIndex(th=>!th.disabled);ki(jg),Va({alignment:Fi?"end":"start"})}break}case"End":{if(!z){su.preventDefault(),$u||wu(!0);const jg=Wn.map(th=>!!th.disabled).lastIndexOf(!1);ki(jg),Va({alignment:Fi?"end":"start"})}break}case"Escape":wu(!1)}},NKe=Xe.map(su=>{let Fi=ia.find(X0=>X0.value===su&&!X0.disabled);return!Fi&&Og&&(Fi={value:su,label:su}),Fi}).filter(su=>!!su).map((su,Fi)=>M.createElement(p,Sme(ND({},su),{variant:R,disabled:V,className:gu.value,readOnly:ct,onRemove:X0=>{X0.preventDefault(),X0.stopPropagation(),Et(su.value)},key:su.value,size:s,styles:d,classNames:c,radius:J,index:Fi}))),PKe=su=>Xe.includes(su),RKe=()=>{var su;ka(""),le([]),(su=un.current)==null||su.focus(),Be&&(Ge.current=!1)},R7=!ct&&(Wn.length>0?$u:$u&&!!F);return To(()=>{const su=R7?he:de;typeof su=="function"&&su()},[R7]),M.createElement(Ra.Wrapper,ND(ND({required:r,id:bn,label:a,error:l,description:o,size:s,className:n,style:i,classNames:c,styles:d,__staticSelector:"MultiSelect",sx:qe,errorProps:ie,descriptionProps:Z,labelProps:$,inputContainer:Je,inputWrapperOrder:it,unstyled:Le,withAsterisk:xt,variant:R},Ln),h),M.createElement(Fm,{opened:R7,transitionProps:b,shadow:"sm",withinPortal:je,portalProps:bt,__staticSelector:"MultiSelect",onDirectionChange:Vn,switchDirectionOnFlip:qt,zIndex:ou,dropdownPosition:se,positionDependencies:[...te,Ni],classNames:c,styles:d,unstyled:Le,variant:R},M.createElement(Fm.Target,null,M.createElement("div",{className:gu.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":$u&&R7?`${bn}-items`:null,"aria-controls":bn,"aria-expanded":$u,onMouseLeave:()=>ki(-1),tabIndex:-1},M.createElement("input",{type:"hidden",name:oe,value:Xe.join(","),form:ue,disabled:V}),M.createElement(Ra,ND({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:R,disabled:V,error:l,required:r,radius:J,icon:Y,unstyled:Le,onMouseDown:su=>{var Fi;su.preventDefault(),!V&&!Ge.current&&wu(!$u),(Fi=un.current)==null||Fi.focus()},classNames:Sme(ND({},c),{input:fn({[gu.input]:!z},c==null?void 0:c.input)})},fLe({theme:Wt,rightSection:X,rightSectionWidth:re,styles:d,size:s,shouldClear:L&&Xe.length>0,onClear:RKe,error:l,disabled:V,clearButtonProps:Jt,readOnly:ct})),M.createElement("div",{className:gu.values,"data-clearable":L||void 0},NKe,M.createElement("input",ND({ref:q1(e,un),type:"search",id:bn,className:fn(gu.searchInput,{[gu.searchInputPointer]:!z,[gu.searchInputInputHidden]:!$u&&Xe.length>0||!z&&Xe.length>0,[gu.searchInputEmpty]:Xe.length===0}),onKeyDown:zre,value:Ni,onChange:Kn,onFocus:Vr,onBlur:P7,readOnly:!z||Ge.current||ct,placeholder:Xe.length===0?N:void 0,disabled:V,"data-mantine-stop-propagation":$u,autoComplete:"off",onCompositionStart:()=>eh(!0),onCompositionEnd:()=>eh(!1)},Vu)))))),M.createElement(Fm.Dropdown,{component:Se||zI,maxHeight:k,direction:$i,id:bn,innerRef:Cd,__staticSelector:"MultiSelect",classNames:c,styles:d},M.createElement(Que,{data:Wn,hovered:Mn,classNames:c,styles:d,uuid:bn,__staticSelector:"MultiSelect",onItemHover:ki,onItemSelect:P4,itemsRefs:zn,itemComponent:D,size:s,nothingFound:F,isItemSelected:PKe,creatable:ge&&!!Mt,createLabel:Mt,unstyled:Le,variant:R}))))});zZ.displayName="@mantine/core/MultiSelect";var pPt=at((u,{color:e,radius:t,withTitle:n})=>{const i=u.fn.radius(t),r=u.fn.variant({variant:"filled",color:e});return{closeButton:u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:u.spacing.md,width:G(28),height:G(28),borderRadius:G(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:r.background,color:u.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:G(22),paddingRight:u.spacing.xs,paddingTop:u.spacing.xs,paddingBottom:u.spacing.xs,borderRadius:i,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,boxShadow:u.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:G(6),top:i,bottom:i,left:G(4),borderRadius:i,backgroundColor:r.background},"&[data-with-icon]":{paddingLeft:u.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:u.spacing.xs},loader:{marginRight:u.spacing.md},title:{lineHeight:1.4,marginBottom:G(2),overflow:"hidden",textOverflow:"ellipsis",color:u.colorScheme==="dark"?u.white:u.colors.gray[9]},description:{color:n?u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]:u.colorScheme==="dark"?u.colors.dark[0]:u.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const DPt=pPt;var xPt=Object.defineProperty,vPt=Object.defineProperties,CPt=Object.getOwnPropertyDescriptors,SM=Object.getOwnPropertySymbols,xLe=Object.prototype.hasOwnProperty,vLe=Object.prototype.propertyIsEnumerable,wme=(u,e,t)=>e in u?xPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Lme=(u,e)=>{for(var t in e||(e={}))xLe.call(e,t)&&wme(u,t,e[t]);if(SM)for(var t of SM(e))vLe.call(e,t)&&wme(u,t,e[t]);return u},bPt=(u,e)=>vPt(u,CPt(e)),kPt=(u,e)=>{var t={};for(var n in u)xLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&SM)for(var n of SM(u))e.indexOf(n)<0&&vLe.call(u,n)&&(t[n]=u[n]);return t};const FPt={withCloseButton:!0},CLe=C.forwardRef((u,e)=>{const t=Qe("Notification",FPt,u),{className:n,color:i,radius:r,loading:a,withCloseButton:o,withBorder:s,title:l,icon:c,children:d,onClose:h,closeButtonProps:E,classNames:m,styles:g,unstyled:f,variant:p}=t,D=kPt(t,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:x,cx:b}=DPt({color:i,radius:r,withTitle:!!l},{name:"Notification",classNames:m,styles:g,unstyled:f,variant:p});return M.createElement(Ct,Lme({className:b(x.root,n),"data-with-icon":!!c||a||void 0,"data-with-border":s||void 0,role:"alert",ref:e},D),c&&!a&&M.createElement("div",{className:x.icon},c),a&&M.createElement(Vv,{size:28,color:i,className:x.loader}),M.createElement("div",{className:x.body},l&&M.createElement(_u,{className:x.title,size:"sm",weight:500},l),M.createElement(_u,{color:"dimmed",className:x.description,size:"sm"},d)),o&&M.createElement(SI,bPt(Lme({iconSize:16,color:"gray"},E),{onClick:h,className:x.closeButton})))});CLe.displayName="@mantine/core/Notification";const yPt=(u,e,t)=>Number.isInteger(u)&&u>=0&&e===0?"numeric":!Number.isInteger(u)&&u>=0&&e!==0?"decimal":Number.isInteger(u)&&u<0&&e===0||!Number.isInteger(u)&&u<0&&e!==0?t==="ios"?"text":"decimal":"numeric";function zme({direction:u,size:e}){return M.createElement("svg",{style:{width:G(e),height:G(e),transform:u==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const bLe={xs:G(20),sm:G(24),md:G(30),lg:G(34),xl:G(36)};var APt=at((u,{radius:e},{size:t})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${G(2)})`,margin:G(1),overflow:"hidden",borderTopRightRadius:u.fn.radius(e),borderBottomRightRadius:u.fn.radius(e)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:ye({size:t,sizes:bLe}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,borderLeft:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:G(1),color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&:not(:disabled):hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]},"&:disabled":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const _Pt=APt;var SPt=Object.defineProperty,BPt=Object.defineProperties,wPt=Object.getOwnPropertyDescriptors,BM=Object.getOwnPropertySymbols,kLe=Object.prototype.hasOwnProperty,FLe=Object.prototype.propertyIsEnumerable,Mme=(u,e,t)=>e in u?SPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,WV=(u,e)=>{for(var t in e||(e={}))kLe.call(e,t)&&Mme(u,t,e[t]);if(BM)for(var t of BM(e))FLe.call(e,t)&&Mme(u,t,e[t]);return u},LPt=(u,e)=>BPt(u,wPt(e)),zPt=(u,e)=>{var t={};for(var n in u)kLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&BM)for(var n of BM(u))e.indexOf(n)<0&&FLe.call(u,n)&&(t[n]=u[n]);return t};const MPt={type:"text",size:"sm",__staticSelector:"TextInput"},wt=C.forwardRef((u,e)=>{const t=F8e("TextInput",MPt,u),{inputProps:n,wrapperProps:i}=t,r=zPt(t,["inputProps","wrapperProps"]);return M.createElement(Ra.Wrapper,WV({},i),M.createElement(Ra,LPt(WV(WV({},n),r),{ref:e})))});wt.displayName="@mantine/core/TextInput";var TPt=Object.defineProperty,NPt=Object.defineProperties,PPt=Object.getOwnPropertyDescriptors,wM=Object.getOwnPropertySymbols,yLe=Object.prototype.hasOwnProperty,ALe=Object.prototype.propertyIsEnumerable,Tme=(u,e,t)=>e in u?TPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,RPt=(u,e)=>{for(var t in e||(e={}))yLe.call(e,t)&&Tme(u,t,e[t]);if(wM)for(var t of wM(e))ALe.call(e,t)&&Tme(u,t,e[t]);return u},IPt=(u,e)=>NPt(u,PPt(e)),OPt=(u,e)=>{var t={};for(var n in u)yLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wM)for(var n of wM(u))e.indexOf(n)<0&&ALe.call(u,n)&&(t[n]=u[n]);return t};const jPt=u=>u||"",HPt=u=>{if(u==="-")return u;let e=u;e[0]==="."&&(e=`0${u}`);const t=parseFloat(e);return Number.isNaN(t)?"":u},Nme={xs:G(10),sm:G(14),md:G(16),lg:G(18),xl:G(20)},VPt={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:jPt,parser:HPt,type:"text"},zo=C.forwardRef((u,e)=>{const t=Qe("NumberInput",VPt,u),{readOnly:n,disabled:i,value:r,onChange:a,decimalSeparator:o,thousandsSeparator:s,min:l,max:c,startValue:d,step:h,stepHoldInterval:E,stepHoldDelay:m,onFocus:g,onBlur:f,onKeyDown:p,onKeyUp:D,hideControls:x,radius:b,variant:k,precision:A,removeTrailingZeros:F,defaultValue:S,noClampOnBlur:w,handlersRef:z,classNames:N,styles:O,size:y,rightSection:_,rightSectionWidth:L,formatter:T,parser:R,inputMode:I,unstyled:H,type:V}=t,U=OPt(t,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:J,cx:Y}=_Pt({radius:b},{classNames:N,styles:O,unstyled:H,name:"NumberInput",variant:k,size:y}),X=Ze=>{if(Ze==="")return"";let Ie=Ze.toFixed(A);return F&&A>0&&(Ie=Ie.replace(new RegExp(`[0]{0,${A}}$`),""),Ie.endsWith(".")&&(Ie=Ie.slice(0,-1))),Ie},re=Ze=>{let Ie=Ze;return o&&(Ie=Ie.replace(".",o)),T(Ie)},ge=Ze=>{let Ie=Ze;return o&&(Ie=Ie.replaceAll(s,"").replace(o,".")),R(Ie)},_e=Ze=>re(X(Ze)),[Ve,Ue]=C.useState(typeof r=="number"?r:typeof S=="number"?S:""),[qe,Se]=C.useState(()=>_e(Ve)),de=C.useRef(),[he,Be]=C.useState(!1),je=(Ze,Ie)=>{if(!he||Ie){const Tu=_e(Ze);Tu!==qe&&Se(Tu)}Ze!==Ve&&Ue(Ze)},bt=typeof l=="number"?l:-1/0,qt=typeof c=="number"?c:1/0,ou=C.useRef();ou.current=()=>{var Ze;let Ie;Ve===""?Ie=(Ze=d??l)!=null?Ze:0:Ie=parseFloat(X(bm(Ve+h,bt,qt))),je(Ie,!0),a==null||a(Ie)};const Vt=C.useRef();Vt.current=()=>{var Ze;let Ie;Ve===""?Ie=(Ze=d??l)!=null?Ze:0:Ie=parseFloat(X(bm(Ve-h,bt,qt))),je(Ie,!0),a==null||a(Ie)},Jue(z,{increment:ou.current,decrement:Vt.current}),C.useEffect(()=>{he||je(r===void 0?Ve:r,!0)},[r,he]);const oe=m!==void 0&&E!==void 0,se=C.useRef(null),ie=C.useRef(0),$=()=>{se.current&&window.clearTimeout(se.current),se.current=null,ie.current=0},Z=Ze=>{Ze?ou.current():Vt.current(),ie.current+=1},ue=Ze=>{if(Z(Ze),oe){const Ie=typeof E=="number"?E:E(ie.current);se.current=window.setTimeout(()=>ue(Ze),Ie)}},te=(Ze,Ie)=>{Ze.preventDefault(),de.current.focus(),Z(Ie),oe&&(se.current=window.setTimeout(()=>ue(Ie),m))};C.useEffect(()=>($(),$),[]);const fe=M.createElement("div",{className:J.rightSection},M.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Ve>=c,className:Y(J.control,J.controlUp),onPointerDown:Ze=>{te(Ze,!0)},onPointerUp:$,onPointerLeave:$},M.createElement(zme,{size:ye({size:y,sizes:Nme}),direction:"up"})),M.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Ve<=l,className:Y(J.control,J.controlDown),onPointerDown:Ze=>{te(Ze,!1)},onPointerUp:$,onPointerLeave:$},M.createElement(zme,{size:ye({size:y,sizes:Nme}),direction:"down"}))),Le=Ze=>{let Ie=Ze;(Ie[0]===`${o}`||Ie[0]===".")&&(Ie=`0${Ie}`);const Tu=parseFloat(X(parseFloat(ge(Ie)))),gu=w?Tu:bm(Tu,bt,qt),fn=Number.isNaN(gu)?"":gu,Wt=Ve!==fn;Se(Ze),je(fn),Wt&&(a==null||a(fn))},Je=Ze=>{Ze.nativeEvent.isComposing||Le(Ze.target.value)},it=Ze=>{Be(!0),g==null||g(Ze)},ct=Ze=>{Be(!1),f==null||f(Ze)},xt=Ze=>{if(typeof p=="function"&&p(Ze),Ze.repeat&&oe&&(Ze.key==="ArrowUp"||Ze.key==="ArrowDown")){Ze.preventDefault();return}n||(Ze.key==="ArrowUp"?te(Ze,!0):Ze.key==="ArrowDown"&&te(Ze,!1))},Jt=Ze=>{typeof D=="function"&&D(Ze),(Ze.key==="ArrowUp"||Ze.key==="ArrowDown")&&$()};return M.createElement(wt,IPt(RPt({},U),{type:V,variant:k,value:qe,disabled:i,readOnly:n,ref:q1(de,e),onChange:Je,onFocus:it,onBlur:ct,onKeyDown:xt,onKeyUp:Jt,rightSection:_||(i||n||x||k==="unstyled"?null:fe),rightSectionWidth:L??`calc(${ye({size:y,sizes:bLe})} + ${G(1)})`,radius:b,max:c,min:l,step:h,size:y,styles:O,classNames:N,inputMode:I||yPt(h,A,oFt()),__staticSelector:"NumberInput",unstyled:H}))});zo.displayName="@mantine/core/NumberInput";const[$Pt,II]=U1("Pagination.Root component was not found in tree"),KPt={siblings:1,boundaries:1};function _Le(u){const{total:e,value:t,defaultValue:n,onChange:i,disabled:r,children:a,siblings:o,boundaries:s,color:l,radius:c,onNextPage:d,onPreviousPage:h,onFirstPage:E,onLastPage:m,getItemProps:g,classNames:f,styles:p,unstyled:D,variant:x,size:b}=Qe("PaginationRoot",KPt,u),{range:k,setPage:A,next:F,previous:S,active:w,first:z,last:N}=Qkt({page:t,initialPage:n,onChange:i,total:e,siblings:o,boundaries:s}),O=no(d,F),y=no(h,S),_=no(E,z),L=no(m,N);return M.createElement($Pt,{value:{total:e,range:k,active:w,disabled:r,color:l,radius:c,getItemProps:g,onChange:A,onNext:O,onPrevious:y,onFirst:_,onLast:L,stylesApi:{name:"Pagination",classNames:f,styles:p,unstyled:D,variant:x,size:b}}},a)}const ey={xs:G(22),sm:G(26),md:G(32),lg:G(38),xl:G(44)};var WPt=at((u,{color:e,radius:t,withPadding:n},{size:i})=>{const r=u.fn.variant({color:e,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,height:ye({size:i,sizes:ey}),minWidth:ye({size:i,sizes:ey}),padding:n?`0 calc(${ye({size:i,sizes:u.spacing})} / 2)`:void 0,fontSize:ye({size:i,sizes:u.fontSizes}),borderRadius:u.fn.radius(t),lineHeight:1,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,"&:not([data-disabled])":u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]}),"&:active:not([data-disabled])":u.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:r.color,backgroundColor:r.background,"&:not([data-disabled])":u.fn.hover({backgroundColor:r.hover})}}}});const GPt=WPt;var UPt=Object.defineProperty,qPt=Object.defineProperties,JPt=Object.getOwnPropertyDescriptors,LM=Object.getOwnPropertySymbols,SLe=Object.prototype.hasOwnProperty,BLe=Object.prototype.propertyIsEnumerable,Pme=(u,e,t)=>e in u?UPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZPt=(u,e)=>{for(var t in e||(e={}))SLe.call(e,t)&&Pme(u,t,e[t]);if(LM)for(var t of LM(e))BLe.call(e,t)&&Pme(u,t,e[t]);return u},YPt=(u,e)=>qPt(u,JPt(e)),QPt=(u,e)=>{var t={};for(var n in u)SLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&LM)for(var n of LM(u))e.indexOf(n)<0&&BLe.call(u,n)&&(t[n]=u[n]);return t};const XPt={withPadding:!0},OI=C.forwardRef((u,e)=>{const t=Qe("PaginationControl",XPt,u),{active:n,className:i,disabled:r,withPadding:a}=t,o=QPt(t,["active","className","disabled","withPadding"]),s=II(),{classes:l,cx:c}=GPt({color:s.color,radius:s.radius,withPadding:a},s.stylesApi);return M.createElement(L4,YPt(ZPt({},o),{disabled:r,"data-active":n||void 0,"data-disabled":r||void 0,ref:e,className:c(l.control,i)}))});OI.displayName="@mantine/core/PaginationControl";var eRt=Object.defineProperty,tRt=Object.defineProperties,uRt=Object.getOwnPropertyDescriptors,zM=Object.getOwnPropertySymbols,wLe=Object.prototype.hasOwnProperty,LLe=Object.prototype.propertyIsEnumerable,Rme=(u,e,t)=>e in u?eRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,dp=(u,e)=>{for(var t in e||(e={}))wLe.call(e,t)&&Rme(u,t,e[t]);if(zM)for(var t of zM(e))LLe.call(e,t)&&Rme(u,t,e[t]);return u},r7=(u,e)=>tRt(u,uRt(e)),nRt=(u,e)=>{var t={};for(var n in u)wLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&zM)for(var n of zM(u))e.indexOf(n)<0&&LLe.call(u,n)&&(t[n]=u[n]);return t};function zLe(u){return`calc(${ye({size:u,sizes:ey})} / 2)`}function a7(u){var e=u,{size:t,style:n,children:i,path:r}=e,a=nRt(e,["size","style","children","path"]);return M.createElement("svg",dp({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:dp({width:t,height:t},n)},a),M.createElement("path",{d:r,fill:"currentColor"}))}const iRt=u=>M.createElement(a7,r7(dp({},u),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),rRt=u=>M.createElement(a7,r7(dp({},u),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),aRt=u=>M.createElement(a7,r7(dp({},u),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),oRt=u=>M.createElement(a7,r7(dp({},u),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),sRt=u=>M.createElement(a7,r7(dp({},u),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var lRt=at((u,e,{size:t})=>({dots:{height:ye({size:t,sizes:ey}),minWidth:ye({size:t,sizes:ey}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const cRt=lRt;var dRt=Object.defineProperty,MM=Object.getOwnPropertySymbols,MLe=Object.prototype.hasOwnProperty,TLe=Object.prototype.propertyIsEnumerable,Ime=(u,e,t)=>e in u?dRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,hRt=(u,e)=>{for(var t in e||(e={}))MLe.call(e,t)&&Ime(u,t,e[t]);if(MM)for(var t of MM(e))TLe.call(e,t)&&Ime(u,t,e[t]);return u},ERt=(u,e)=>{var t={};for(var n in u)MLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&MM)for(var n of MM(u))e.indexOf(n)<0&&TLe.call(u,n)&&(t[n]=u[n]);return t};const mRt={icon:sRt},Cne=C.forwardRef((u,e)=>{const t=Qe("PaginationDots",mRt,u),{className:n,icon:i}=t,r=ERt(t,["className","icon"]),a=II(),{classes:o,cx:s}=cRt(null,a.stylesApi);return M.createElement(Ct,hRt({ref:e,className:s(o.dots,n)},r),M.createElement(i,{size:zLe(a.stylesApi.size)}))});Cne.displayName="@mantine/core/PaginationDots";var gRt=Object.defineProperty,Ome=Object.getOwnPropertySymbols,fRt=Object.prototype.hasOwnProperty,pRt=Object.prototype.propertyIsEnumerable,jme=(u,e,t)=>e in u?gRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DRt=(u,e)=>{for(var t in e||(e={}))fRt.call(e,t)&&jme(u,t,e[t]);if(Ome)for(var t of Ome(e))pRt.call(e,t)&&jme(u,t,e[t]);return u};function bne({dotsIcon:u}){const e=II(),t=e.range.map((n,i)=>{var r;return n==="dots"?M.createElement(Cne,{icon:u,key:i}):M.createElement(OI,DRt({key:i,active:n===e.active,"aria-current":n===e.active?"page":void 0,onClick:()=>e.onChange(n),disabled:e.disabled},(r=e.getItemProps)==null?void 0:r.call(e,n)),n)});return M.createElement(M.Fragment,null,t)}bne.displayName="@mantine/core/PaginationItems";var xRt=at(u=>({icon:{transform:u.dir==="rtl"?"rotate(180deg)":"unset"}}));const vRt=xRt;var CRt=Object.defineProperty,TM=Object.getOwnPropertySymbols,NLe=Object.prototype.hasOwnProperty,PLe=Object.prototype.propertyIsEnumerable,Hme=(u,e,t)=>e in u?CRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bRt=(u,e)=>{for(var t in e||(e={}))NLe.call(e,t)&&Hme(u,t,e[t]);if(TM)for(var t of TM(e))PLe.call(e,t)&&Hme(u,t,e[t]);return u},kRt=(u,e)=>{var t={};for(var n in u)NLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&TM)for(var n of TM(u))e.indexOf(n)<0&&PLe.call(u,n)&&(t[n]=u[n]);return t};function jI({icon:u,name:e,action:t,type:n}){const i={icon:u},r=C.forwardRef((a,o)=>{const s=Qe(e,i,a),{icon:l}=s,c=kRt(s,["icon"]),{classes:d}=vRt(),h=II(),E=n==="next"?h.active===h.total:h.active===1;return M.createElement(OI,bRt({disabled:h.disabled||E,ref:o,onClick:h[t],withPadding:!1},c),M.createElement(l,{className:d.icon,size:zLe(h.stylesApi.size)}))});return r.displayName=`@mantine/core/${e}`,r}const RLe=jI({icon:iRt,name:"PaginationNext",action:"onNext",type:"next"}),ILe=jI({icon:rRt,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),OLe=jI({icon:aRt,name:"PaginationFirst",action:"onFirst",type:"previous"}),jLe=jI({icon:oRt,name:"PaginationLast",action:"onLast",type:"next"});var FRt=Object.defineProperty,NM=Object.getOwnPropertySymbols,HLe=Object.prototype.hasOwnProperty,VLe=Object.prototype.propertyIsEnumerable,Vme=(u,e,t)=>e in u?FRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,YC=(u,e)=>{for(var t in e||(e={}))HLe.call(e,t)&&Vme(u,t,e[t]);if(NM)for(var t of NM(e))VLe.call(e,t)&&Vme(u,t,e[t]);return u},yRt=(u,e)=>{var t={};for(var n in u)HLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&NM)for(var n of NM(u))e.indexOf(n)<0&&VLe.call(u,n)&&(t[n]=u[n]);return t};const ARt={withControls:!0,siblings:1,boundaries:1};function J1(u){const e=Qe("Pagination",ARt,u),{withEdges:t,withControls:n,classNames:i,styles:r,unstyled:a,variant:o,size:s,total:l,value:c,defaultValue:d,onChange:h,disabled:E,siblings:m,boundaries:g,color:f,radius:p,onNextPage:D,onPreviousPage:x,onFirstPage:b,onLastPage:k,getItemProps:A,getControlProps:F,spacing:S,nextIcon:w,previousIcon:z,lastIcon:N,firstIcon:O,dotsIcon:y}=e,_=yRt(e,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),L=jr();return l<=0?null:M.createElement(_Le,{classNames:i,styles:r,unstyled:a,variant:o,size:s,total:l,value:c,defaultValue:d,onChange:h,disabled:E,siblings:m,boundaries:g,color:f,radius:p,onNextPage:D,onPreviousPage:x,onFirstPage:b,onLastPage:k,getItemProps:A},M.createElement(zi,YC({spacing:S??`calc(${ye({size:s,sizes:L.spacing})} / 2)`},_),t&&M.createElement(OLe,YC({icon:O},F==null?void 0:F("first"))),n&&M.createElement(ILe,YC({icon:z},F==null?void 0:F("previous"))),M.createElement(bne,{dotsIcon:y}),n&&M.createElement(RLe,YC({icon:w},F==null?void 0:F("next"))),t&&M.createElement(jLe,YC({icon:N},F==null?void 0:F("last")))))}J1.displayName="@mantine/core/Pagination";J1.Root=_Le;J1.Items=bne;J1.Control=OI;J1.Dots=Cne;J1.Next=RLe;J1.Previous=ILe;J1.Last=jLe;J1.First=OLe;const _Rt=({reveal:u,size:e})=>M.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:e,height:e}},M.createElement("path",{d:u?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}));var SRt=Object.defineProperty,BRt=Object.defineProperties,wRt=Object.getOwnPropertyDescriptors,$me=Object.getOwnPropertySymbols,LRt=Object.prototype.hasOwnProperty,zRt=Object.prototype.propertyIsEnumerable,Kme=(u,e,t)=>e in u?SRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,GV=(u,e)=>{for(var t in e||(e={}))LRt.call(e,t)&&Kme(u,t,e[t]);if($me)for(var t of $me(e))zRt.call(e,t)&&Kme(u,t,e[t]);return u},Wme=(u,e)=>BRt(u,wRt(e)),MRt=at((u,{rightSectionWidth:e},{size:t})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:Wme(GV(GV({},u.fn.fontStyles()),u.fn.cover(0)),{backgroundColor:"transparent",border:`${G(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${G(e)})`,paddingLeft:`calc(${ye({size:t,sizes:kr})} / 3)`,fontSize:ye({size:t,sizes:u.fontSizes}),height:`calc(${ye({size:t,sizes:kr})} - ${G(2)})`,lineHeight:`calc(${ye({size:t,sizes:kr})} - ${G(4)})`,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,"&::placeholder":{color:u.colors.dark[2]}},"&::placeholder":Wme(GV({},u.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:u.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:u.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:ye({size:t,sizes:kr})}})}));const TRt=MRt;var NRt=Object.defineProperty,PRt=Object.defineProperties,RRt=Object.getOwnPropertyDescriptors,PM=Object.getOwnPropertySymbols,$Le=Object.prototype.hasOwnProperty,KLe=Object.prototype.propertyIsEnumerable,Gme=(u,e,t)=>e in u?NRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,U_=(u,e)=>{for(var t in e||(e={}))$Le.call(e,t)&&Gme(u,t,e[t]);if(PM)for(var t of PM(e))KLe.call(e,t)&&Gme(u,t,e[t]);return u},IRt=(u,e)=>PRt(u,RRt(e)),ORt=(u,e)=>{var t={};for(var n in u)$Le.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&PM)for(var n of PM(u))e.indexOf(n)<0&&KLe.call(u,n)&&(t[n]=u[n]);return t};const jRt={xs:G(22),sm:G(26),md:G(28),lg:G(32),xl:G(40)},HRt={xs:G(12),sm:G(15),md:G(17),lg:G(19),xl:G(21)},VRt={xs:G(28),sm:G(32),md:G(34),lg:G(44),xl:G(54)},$Rt={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:_Rt,__staticSelector:"PasswordInput"},MZ=C.forwardRef((u,e)=>{const t=Qe("PasswordInput",$Rt,u),{radius:n,disabled:i,size:r,toggleTabIndex:a,className:o,id:s,label:l,error:c,required:d,style:h,icon:E,description:m,wrapperProps:g,classNames:f,styles:p,variant:D,visibilityToggleIcon:x,__staticSelector:b,sx:k,labelProps:A,descriptionProps:F,errorProps:S,unstyled:w,visibilityToggleLabel:z,withAsterisk:N,inputContainer:O,iconWidth:y,inputWrapperOrder:_,visible:L,defaultVisible:T,onVisibilityChange:R}=t,I=ORt(t,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),H=ye({size:r,sizes:VRt}),{classes:V}=TRt({rightSectionWidth:H},{name:"PasswordInput",classNames:f,styles:p,unstyled:w,size:r,variant:D}),U=Jl(s),{systemStyles:J,rest:Y}=w4(I),[X,re]=fs({value:L,defaultValue:T,finalValue:!1,onChange:R}),ge=()=>re(!X),_e=M.createElement(Uu,{className:V.visibilityToggle,tabIndex:a,radius:n,size:ye({size:r,sizes:jRt}),"aria-hidden":!z,"aria-label":z,unstyled:w,onMouseDown:Ve=>{Ve.preventDefault(),ge()},onKeyDown:Ve=>{Ve.key===" "&&(Ve.preventDefault(),ge())}},M.createElement(x,{reveal:X,size:ye({size:r,sizes:HRt})}));return M.createElement(Ra.Wrapper,U_(U_({required:d,id:U,label:l,error:c,description:m,size:r,className:o,style:h,classNames:f,styles:p,__staticSelector:b,sx:k,errorProps:S,descriptionProps:F,labelProps:A,unstyled:w,withAsterisk:N,inputWrapperOrder:_,inputContainer:O,variant:D},J),g),M.createElement(Ra,{component:"div",error:c,icon:E,size:r,classNames:IRt(U_({},f),{input:V.input}),styles:p,radius:n,disabled:i,__staticSelector:b,rightSectionWidth:H,rightSection:!i&&_e,variant:D,unstyled:w,iconWidth:y},M.createElement("input",U_({type:X?"text":"password",required:d,"data-invalid":!!c||void 0,"data-with-icon":!!E||void 0,className:V.innerInput,disabled:i,id:U,ref:e},Y))))});MZ.displayName="@mantine/core/PasswordInput";const WLe=C.createContext(!1),KRt=WLe.Provider,WRt=()=>C.useContext(WLe);function GLe({children:u,openDelay:e=0,closeDelay:t=0}){return M.createElement(KRt,{value:!0},M.createElement(K_t,{delay:{open:e,close:t}},u))}GLe.displayName="@mantine/core/TooltipGroup";var GRt=Object.defineProperty,URt=Object.defineProperties,qRt=Object.getOwnPropertyDescriptors,Ume=Object.getOwnPropertySymbols,JRt=Object.prototype.hasOwnProperty,ZRt=Object.prototype.propertyIsEnumerable,qme=(u,e,t)=>e in u?GRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Jme=(u,e)=>{for(var t in e||(e={}))JRt.call(e,t)&&qme(u,t,e[t]);if(Ume)for(var t of Ume(e))ZRt.call(e,t)&&qme(u,t,e[t]);return u},YRt=(u,e)=>URt(u,qRt(e));function QRt(u,e){if(!e)return{backgroundColor:u.colorScheme==="dark"?u.colors.gray[2]:u.colors.gray[9],color:u.colorScheme==="dark"?u.black:u.white};const t=u.fn.variant({variant:"filled",color:e,primaryFallback:!1});return{backgroundColor:t.background,color:t.color}}var XRt=at((u,{color:e,radius:t,width:n,multiline:i})=>({tooltip:YRt(Jme(Jme({},u.fn.fontStyles()),QRt(u,e)),{lineHeight:u.lineHeight,fontSize:u.fontSizes.sm,borderRadius:u.fn.radius(t),padding:`calc(${u.spacing.xs} / 2) ${u.spacing.xs}`,position:"absolute",whiteSpace:i?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const ULe=XRt,qLe={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function eIt({offset:u,position:e}){const[t,n]=C.useState(!1),i=C.useRef(),{x:r,y:a,reference:o,floating:s,refs:l,update:c,placement:d}=hne({placement:e,middleware:[MI({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=d.includes("right")?u:e.includes("left")?u*-1:0,E=d.includes("bottom")?u:e.includes("top")?u*-1:0,m=C.useCallback(({clientX:g,clientY:f})=>{o({getBoundingClientRect(){return{width:0,height:0,x:g,y:f,left:g+h,top:f+E,right:g,bottom:f}}})},[o]);return C.useEffect(()=>{if(l.floating.current){const g=i.current;g.addEventListener("mousemove",m);const f=km(l.floating.current);return f.forEach(p=>{p.addEventListener("scroll",c)}),()=>{g.removeEventListener("mousemove",m),f.forEach(p=>{p.removeEventListener("scroll",c)})}}},[o,l.floating.current,c,m,t]),{handleMouseMove:m,x:r,y:a,opened:t,setOpened:n,boundaryRef:i,floating:s}}var tIt=Object.defineProperty,uIt=Object.defineProperties,nIt=Object.getOwnPropertyDescriptors,RM=Object.getOwnPropertySymbols,JLe=Object.prototype.hasOwnProperty,ZLe=Object.prototype.propertyIsEnumerable,Zme=(u,e,t)=>e in u?tIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,q_=(u,e)=>{for(var t in e||(e={}))JLe.call(e,t)&&Zme(u,t,e[t]);if(RM)for(var t of RM(e))ZLe.call(e,t)&&Zme(u,t,e[t]);return u},J_=(u,e)=>uIt(u,nIt(e)),iIt=(u,e)=>{var t={};for(var n in u)JLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&RM)for(var n of RM(u))e.indexOf(n)<0&&ZLe.call(u,n)&&(t[n]=u[n]);return t};const rIt={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:fd("popover")};function YLe(u){var e;const t=Qe("TooltipFloating",rIt,u),{children:n,refProp:i,withinPortal:r,portalProps:a,style:o,className:s,classNames:l,styles:c,unstyled:d,radius:h,color:E,label:m,offset:g,position:f,multiline:p,width:D,zIndex:x,disabled:b,variant:k}=t,A=iIt(t,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:F,x:S,y:w,opened:z,boundaryRef:N,floating:O,setOpened:y}=eIt({offset:g,position:f}),{classes:_,cx:L}=ULe({radius:h,color:E,multiline:p,width:D},{name:"TooltipFloating",classNames:l,styles:c,unstyled:d,variant:k});if(!z6(n))throw new Error(qLe.children);const T=q1(N,n.ref),R=H=>{var V,U;(U=(V=n.props).onMouseEnter)==null||U.call(V,H),F(H),y(!0)},I=H=>{var V,U;(U=(V=n.props).onMouseLeave)==null||U.call(V,H),y(!1)};return M.createElement(M.Fragment,null,M.createElement(XA,J_(q_({},a),{withinPortal:r}),M.createElement(Ct,J_(q_({},A),{ref:O,className:L(_.tooltip,s),style:J_(q_({},o),{zIndex:x,display:!b&&z?"block":"none",top:w??"",left:(e=Math.round(S))!=null?e:""})}),m)),C.cloneElement(n,J_(q_({},n.props),{[i]:T,onMouseEnter:R,onMouseLeave:I})))}YLe.displayName="@mantine/core/TooltipFloating";function aIt(u){const[e,t]=C.useState(!1),i=typeof u.opened=="boolean"?u.opened:e,r=WRt(),a=Jl(),{delay:o,currentId:s,setCurrentId:l}=a8e(),c=C.useCallback(S=>{t(S),S&&l(a)},[l,a]),{x:d,y:h,reference:E,floating:m,context:g,refs:f,update:p,placement:D,middlewareData:{arrow:{x,y:b}={}}}=hne({placement:u.position,open:i,onOpenChange:c,middleware:[ane(u.offset),MI({padding:8}),rne(),t8e({element:u.arrowRef,padding:u.arrowOffset}),...u.inline?[$Se()]:[]]}),{getReferenceProps:k,getFloatingProps:A}=uSt([$_t(g,{enabled:u.events.hover,delay:r?o:{open:u.openDelay,close:u.closeDelay},mouseOnly:!u.events.touch}),eSt(g,{enabled:u.events.focus,keyboardOnly:!0}),tSt(g,{role:"tooltip"}),X_t(g,{enabled:typeof u.opened===void 0}),W_t(g,{id:a})]);return s8e({opened:i,position:u.position,positionDependencies:u.positionDependencies,floating:{refs:f,update:p}}),To(()=>{var S;(S=u.onPositionChange)==null||S.call(u,D)},[D]),{x:d,y:h,arrowX:x,arrowY:b,reference:E,floating:m,getFloatingProps:A,getReferenceProps:k,isGroupPhase:i&&s&&s!==a,opened:i,placement:D}}var oIt=Object.defineProperty,sIt=Object.defineProperties,lIt=Object.getOwnPropertyDescriptors,IM=Object.getOwnPropertySymbols,QLe=Object.prototype.hasOwnProperty,XLe=Object.prototype.propertyIsEnumerable,Yme=(u,e,t)=>e in u?oIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Yg=(u,e)=>{for(var t in e||(e={}))QLe.call(e,t)&&Yme(u,t,e[t]);if(IM)for(var t of IM(e))XLe.call(e,t)&&Yme(u,t,e[t]);return u},UV=(u,e)=>sIt(u,lIt(e)),cIt=(u,e)=>{var t={};for(var n in u)QLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&IM)for(var n of IM(u))e.indexOf(n)<0&&XLe.call(u,n)&&(t[n]=u[n]);return t};const dIt={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:fd("popover"),positionDependencies:[]},HI=C.forwardRef((u,e)=>{var t;const n=C.useRef(null),i=Qe("Tooltip",dIt,u),{children:r,position:a,refProp:o,label:s,openDelay:l,closeDelay:c,onPositionChange:d,opened:h,withinPortal:E,portalProps:m,radius:g,color:f,classNames:p,styles:D,unstyled:x,style:b,className:k,withArrow:A,arrowSize:F,arrowOffset:S,arrowRadius:w,arrowPosition:z,offset:N,transitionProps:O,multiline:y,width:_,events:L,zIndex:T,disabled:R,positionDependencies:I,onClick:H,onMouseEnter:V,onMouseLeave:U,inline:J,variant:Y,keepMounted:X}=i,re=cIt(i,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ge,cx:_e,theme:Ve}=ULe({radius:g,color:f,width:_,multiline:y},{name:"Tooltip",classNames:p,styles:D,unstyled:x,variant:Y}),Ue=aIt({position:x8e(Ve.dir,a),closeDelay:c,openDelay:l,onPositionChange:d,opened:h,events:L,arrowRef:n,arrowOffset:S,offset:N+(A?F/2:0),positionDependencies:[...I,r],inline:J});if(!z6(r))throw new Error(qLe.children);const qe=q1(Ue.reference,r.ref,e);return M.createElement(M.Fragment,null,M.createElement(XA,UV(Yg({},m),{withinPortal:E}),M.createElement(Jp,UV(Yg({keepMounted:X,mounted:!R&&Ue.opened},O),{transition:O.transition||"fade",duration:Ue.isGroupPhase?10:(t=O.duration)!=null?t:100}),Se=>{var de,he;return M.createElement(Ct,Yg(Yg({},re),Ue.getFloatingProps({ref:Ue.floating,className:ge.tooltip,style:UV(Yg(Yg({},b),Se),{zIndex:T,top:(de=Ue.y)!=null?de:0,left:(he=Ue.x)!=null?he:0})})),s,M.createElement(mne,{ref:n,arrowX:Ue.arrowX,arrowY:Ue.arrowY,visible:A,position:Ue.placement,arrowSize:F,arrowOffset:S,arrowRadius:w,arrowPosition:z,className:ge.arrow}))})),C.cloneElement(r,Ue.getReferenceProps(Yg({onClick:H,onMouseEnter:V,onMouseLeave:U,onMouseMove:u.onMouseMove,onPointerDown:u.onPointerDown,onPointerEnter:u.onPointerEnter,[o]:qe,className:_e(k,r.props.className)},r.props))))});HI.Group=GLe;HI.Floating=YLe;HI.displayName="@mantine/core/Tooltip";const K5=HI;var hIt=Object.defineProperty,OM=Object.getOwnPropertySymbols,eze=Object.prototype.hasOwnProperty,tze=Object.prototype.propertyIsEnumerable,Qme=(u,e,t)=>e in u?hIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Xme=(u,e)=>{for(var t in e||(e={}))eze.call(e,t)&&Qme(u,t,e[t]);if(OM)for(var t of OM(e))tze.call(e,t)&&Qme(u,t,e[t]);return u},EIt=(u,e)=>{var t={};for(var n in u)eze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&OM)for(var n of OM(u))e.indexOf(n)<0&&tze.call(u,n)&&(t[n]=u[n]);return t};function mIt(u){const e=u,{width:t,height:n,style:i}=e,r=EIt(e,["width","height","style"]);return M.createElement("svg",Xme({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:Xme({width:t,height:n},i)},r),M.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const uze=C.createContext(null),gIt=uze.Provider,fIt=()=>C.useContext(uze);var pIt=Object.defineProperty,jM=Object.getOwnPropertySymbols,nze=Object.prototype.hasOwnProperty,ize=Object.prototype.propertyIsEnumerable,ege=(u,e,t)=>e in u?pIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tge=(u,e)=>{for(var t in e||(e={}))nze.call(e,t)&&ege(u,t,e[t]);if(jM)for(var t of jM(e))ize.call(e,t)&&ege(u,t,e[t]);return u},DIt=(u,e)=>{var t={};for(var n in u)nze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&jM)for(var n of jM(u))e.indexOf(n)<0&&ize.call(u,n)&&(t[n]=u[n]);return t};const xIt={size:"sm"},rze=C.forwardRef((u,e)=>{const t=Qe("RadioGroup",xIt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s,unstyled:l,name:c}=t,d=DIt(t,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),h=Jl(c),[E,m]=fs({value:i,defaultValue:r,finalValue:"",onChange:a}),g=f=>m(f.currentTarget.value);return M.createElement(gIt,{value:{value:E,onChange:g,size:o,name:h}},M.createElement(Ra.Wrapper,tge(tge({labelElement:"div",size:o,__staticSelector:"RadioGroup",ref:e,unstyled:l},s),d),n))});rze.displayName="@mantine/core/RadioGroup";var vIt=Object.defineProperty,CIt=Object.defineProperties,bIt=Object.getOwnPropertyDescriptors,uge=Object.getOwnPropertySymbols,kIt=Object.prototype.hasOwnProperty,FIt=Object.prototype.propertyIsEnumerable,nge=(u,e,t)=>e in u?vIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yIt=(u,e)=>{for(var t in e||(e={}))kIt.call(e,t)&&nge(u,t,e[t]);if(uge)for(var t of uge(e))FIt.call(e,t)&&nge(u,t,e[t]);return u},AIt=(u,e)=>CIt(u,bIt(e));const qV={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)},Z_={xs:G(6),sm:G(8),md:G(10),lg:G(14),xl:G(16)};var _It=at((u,{color:e,transitionDuration:t,labelPosition:n,error:i},{size:r})=>{const a=u.fn.variant({variant:"filled",color:e}),o=u.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:n==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:v1("icon"),color:u.white,opacity:0,transform:`scale(0.75) translateY(${G(2)})`,transition:`opacity ${t}ms ${u.transitionTimingFunction}`,pointerEvents:"none",width:ye({sizes:Z_,size:r}),height:ye({sizes:Z_,size:r}),position:"absolute",top:`calc(50% - ${ye({sizes:Z_,size:r})} / 2)`,left:`calc(50% - ${ye({sizes:Z_,size:r})} / 2)`},radio:AIt(yIt({},u.fn.focusStyles()),{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${i?o:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,position:"relative",appearance:"none",width:ye({sizes:qV,size:r}),height:ye({sizes:qV,size:r}),borderRadius:ye({sizes:qV,size:r}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:`${t}ms`,cursor:u.cursorType,"&:checked":{background:a.background,borderColor:a.background,[`& + .${v1("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[4],backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],[`& + .${v1("icon")}`]:{color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[4]}}})}});const SIt=_It;var BIt=Object.defineProperty,HM=Object.getOwnPropertySymbols,aze=Object.prototype.hasOwnProperty,oze=Object.prototype.propertyIsEnumerable,ige=(u,e,t)=>e in u?BIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Y_=(u,e)=>{for(var t in e||(e={}))aze.call(e,t)&&ige(u,t,e[t]);if(HM)for(var t of HM(e))oze.call(e,t)&&ige(u,t,e[t]);return u},wIt=(u,e)=>{var t={};for(var n in u)aze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&HM)for(var n of HM(u))e.indexOf(n)<0&&oze.call(u,n)&&(t[n]=u[n]);return t};const LIt={icon:mIt,transitionDuration:100,size:"sm",labelPosition:"right"},zf=C.forwardRef((u,e)=>{var t,n;const i=Qe("Radio",LIt,u),{className:r,style:a,id:o,label:s,size:l,title:c,disabled:d,color:h,classNames:E,styles:m,sx:g,icon:f,transitionDuration:p,wrapperProps:D,unstyled:x,labelPosition:b,description:k,error:A,variant:F}=i,S=wIt(i,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),w=fIt(),z=(t=w==null?void 0:w.size)!=null?t:l,N=u.size?l:z,{classes:O}=SIt({color:h,transitionDuration:p,labelPosition:b,error:!!A},{name:"Radio",classNames:E,styles:m,unstyled:x,variant:F,size:N}),{systemStyles:y,rest:_}=w4(S),L=Jl(o),T=w?{checked:w.value===_.value,name:(n=_.name)!=null?n:w.name,onChange:w.onChange}:{};return M.createElement(PI,Y_(Y_({className:r,sx:g,style:a,id:L,size:N,labelPosition:b,label:s,description:k,error:A,disabled:d,__staticSelector:"Radio",classNames:E,styles:m,unstyled:x,"data-checked":T.checked||void 0,variant:F},y),D),M.createElement("div",{className:O.inner},M.createElement("input",Y_(Y_({ref:e,className:O.radio,type:"radio",id:L,disabled:d},_),T)),M.createElement(f,{className:O.icon,"aria-hidden":!0})))});zf.displayName="@mantine/core/Radio";zf.Group=rze;function zIt({data:u,searchable:e,limit:t,searchValue:n,filter:i,value:r,filterDataOnExactSearchMatch:a}){if(!e)return u;const o=r!=null&&u.find(l=>l.value===r)||null;if(o&&!a&&(o==null?void 0:o.label)===n){if(t){if(t>=u.length)return u;const l=u.indexOf(o),c=l+t,d=c-u.length;return d>0?u.slice(l-d):u.slice(l,c)}return u}const s=[];for(let l=0;l=t));l+=1);return s}var MIt=at(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const TIt=MIt;var NIt=Object.defineProperty,PIt=Object.defineProperties,RIt=Object.getOwnPropertyDescriptors,VM=Object.getOwnPropertySymbols,sze=Object.prototype.hasOwnProperty,lze=Object.prototype.propertyIsEnumerable,rge=(u,e,t)=>e in u?NIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QC=(u,e)=>{for(var t in e||(e={}))sze.call(e,t)&&rge(u,t,e[t]);if(VM)for(var t of VM(e))lze.call(e,t)&&rge(u,t,e[t]);return u},JV=(u,e)=>PIt(u,RIt(e)),IIt=(u,e)=>{var t={};for(var n in u)sze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&VM)for(var n of VM(u))e.indexOf(n)<0&&lze.call(u,n)&&(t[n]=u[n]);return t};function OIt(u,e){return e.label.toLowerCase().trim().includes(u.toLowerCase().trim())}function jIt(u,e){return!!u&&!e.some(t=>t.label.toLowerCase()===u.toLowerCase())}const HIt={required:!1,size:"sm",shadow:"sm",itemComponent:Xue,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:OIt,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:jIt,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:fd("popover"),positionDependencies:[],dropdownPosition:"flip"},li=C.forwardRef((u,e)=>{const t=F8e("Select",HIt,u),{inputProps:n,wrapperProps:i,shadow:r,data:a,value:o,defaultValue:s,onChange:l,itemComponent:c,onKeyDown:d,onBlur:h,onFocus:E,transitionProps:m,initiallyOpened:g,unstyled:f,classNames:p,styles:D,filter:x,maxDropdownHeight:b,searchable:k,clearable:A,nothingFound:F,limit:S,disabled:w,onSearchChange:z,searchValue:N,rightSection:O,rightSectionWidth:y,creatable:_,getCreateLabel:L,shouldCreate:T,selectOnBlur:R,onCreate:I,dropdownComponent:H,onDropdownClose:V,onDropdownOpen:U,withinPortal:J,portalProps:Y,switchDirectionOnFlip:X,zIndex:re,name:ge,dropdownPosition:_e,allowDeselect:Ve,placeholder:Ue,filterDataOnExactSearchMatch:qe,form:Se,positionDependencies:de,readOnly:he,clearButtonProps:Be,hoverOnSearchChange:je}=t,bt=IIt(t,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:qt,cx:ou,theme:Vt}=TIt(),[oe,se]=C.useState(g),[ie,$]=C.useState(-1),Z=C.useRef(),ue=C.useRef({}),[te,fe]=C.useState("column"),Le=te==="column",{scrollIntoView:Je,targetRef:it,scrollableRef:ct}=s_e({duration:0,offset:5,cancelable:!1,isList:!0}),xt=Ve===void 0?A:Ve,Jt=Mt=>{if(oe!==Mt){se(Mt);const $n=Mt?U:V;typeof $n=="function"&&$n()}},Ze=_&&typeof L=="function";let Ie=null;const Tu=a.map(Mt=>typeof Mt=="string"?{label:Mt,value:Mt}:Mt),gu=S9e({data:Tu}),[fn,Wt,Ln]=fs({value:o,defaultValue:s,finalValue:null,onChange:l}),Vu=gu.find(Mt=>Mt.value===fn),[un,zn]=fs({value:N,defaultValue:(Vu==null?void 0:Vu.label)||"",finalValue:void 0,onChange:z}),bn=Mt=>{zn(Mt),k&&typeof z=="function"&&z(Mt)},$u=()=>{var Mt;he||(Wt(null),Ln||bn(""),(Mt=Z.current)==null||Mt.focus())};C.useEffect(()=>{const Mt=gu.find($n=>$n.value===fn);Mt?bn(Mt.label):(!Ze||!fn)&&bn("")},[fn]),C.useEffect(()=>{Vu&&(!k||!oe)&&bn(Vu.label)},[Vu==null?void 0:Vu.label]);const wu=Mt=>{if(!he)if(xt&&(Vu==null?void 0:Vu.value)===Mt.value)Wt(null),Jt(!1);else{if(Mt.creatable&&typeof I=="function"){const $n=I(Mt.value);typeof $n<"u"&&$n!==null&&Wt(typeof $n=="string"?$n:$n.value)}else Wt(Mt.value);Ln||bn(Mt.label),$(-1),Jt(!1),Z.current.focus()}},Ou=zIt({data:gu,searchable:k,limit:S,searchValue:un,filter:x,filterDataOnExactSearchMatch:qe,value:fn});Ze&&T(un,Ou)&&(Ie=L(un),Ou.push({label:un,value:un,creatable:!0}));const ki=(Mt,$n,ia)=>{let Xe=Mt;for(;ia(Xe);)if(Xe=$n(Xe),!Ou[Xe].disabled)return Xe;return Mt};To(()=>{$(je&&un?0:-1)},[un,je]);const $i=fn?Ou.findIndex(Mt=>Mt.value===fn):0,Vn=!he&&(Ou.length>0?oe:oe&&!!F),Ni=()=>{$(Mt=>{var $n;const ia=ki(Mt,Xe=>Xe-1,Xe=>Xe>0);return it.current=ue.current[($n=Ou[ia])==null?void 0:$n.value],Vn&&Je({alignment:Le?"start":"end"}),ia})},ka=()=>{$(Mt=>{var $n;const ia=ki(Mt,Xe=>Xe+1,Xe=>Xewindow.setTimeout(()=>{var Mt;it.current=ue.current[(Mt=Ou[$i])==null?void 0:Mt.value],Je({alignment:Le?"end":"start"})},50);To(()=>{Vn&&fo()},[Vn]);const eh=Mt=>{switch(typeof d=="function"&&d(Mt),Mt.key){case"ArrowUp":{Mt.preventDefault(),oe?Le?Ni():ka():($($i),Jt(!0),fo());break}case"ArrowDown":{Mt.preventDefault(),oe?Le?ka():Ni():($($i),Jt(!0),fo());break}case"Home":{if(!k){Mt.preventDefault(),oe||Jt(!0);const $n=Ou.findIndex(ia=>!ia.disabled);$($n),Vn&&Je({alignment:Le?"end":"start"})}break}case"End":{if(!k){Mt.preventDefault(),oe||Jt(!0);const $n=Ou.map(ia=>!!ia.disabled).lastIndexOf(!1);$($n),Vn&&Je({alignment:Le?"end":"start"})}break}case"Escape":{Mt.preventDefault(),Jt(!1),$(-1);break}case" ":{k||(Mt.preventDefault(),Ou[ie]&&oe?wu(Ou[ie]):(Jt(!0),$($i),fo()));break}case"Enter":k||Mt.preventDefault(),Ou[ie]&&oe&&(Mt.preventDefault(),wu(Ou[ie]))}},Va=Mt=>{typeof h=="function"&&h(Mt);const $n=gu.find(ia=>ia.value===fn);R&&Ou[ie]&&oe&&wu(Ou[ie]),bn(($n==null?void 0:$n.label)||""),Jt(!1)},Hr=Mt=>{typeof E=="function"&&E(Mt),k&&Jt(!0)},Cd=Mt=>{he||(bn(Mt.currentTarget.value),A&&Mt.currentTarget.value===""&&Wt(null),$(-1),Jt(!0))},Og=()=>{he||(Jt(!oe),fn&&!oe&&$($i))};return M.createElement(Ra.Wrapper,JV(QC({},i),{__staticSelector:"Select"}),M.createElement(Fm,{opened:Vn,transitionProps:m,shadow:r,withinPortal:J,portalProps:Y,__staticSelector:"Select",onDirectionChange:fe,switchDirectionOnFlip:X,zIndex:re,dropdownPosition:_e,positionDependencies:[...de,un],classNames:p,styles:D,unstyled:f,variant:n.variant},M.createElement(Fm.Target,null,M.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Vn?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Vn,onMouseLeave:()=>$(-1),tabIndex:-1},M.createElement("input",{type:"hidden",name:ge,value:fn||"",form:Se,disabled:w}),M.createElement(Ra,QC(JV(QC(QC({autoComplete:"off",type:"search"},n),bt),{ref:q1(e,Z),onKeyDown:eh,__staticSelector:"Select",value:un,placeholder:Ue,onChange:Cd,"aria-autocomplete":"list","aria-controls":Vn?`${n.id}-items`:null,"aria-activedescendant":ie>=0?`${n.id}-${ie}`:null,onMouseDown:Og,onBlur:Va,onFocus:Hr,readOnly:!k||he,disabled:w,"data-mantine-stop-propagation":Vn,name:null,classNames:JV(QC({},p),{input:ou({[qt.input]:!k},p==null?void 0:p.input)})}),fLe({theme:Vt,rightSection:O,rightSectionWidth:y,styles:D,size:n.size,shouldClear:A&&!!Vu,onClear:$u,error:i.error,clearButtonProps:Be,disabled:w,readOnly:he}))))),M.createElement(Fm.Dropdown,{component:H||zI,maxHeight:b,direction:te,id:n.id,innerRef:ct,__staticSelector:"Select",classNames:p,styles:D},M.createElement(Que,{data:Ou,hovered:ie,classNames:p,styles:D,isItemSelected:Mt=>Mt===fn,uuid:n.id,__staticSelector:"Select",onItemHover:$,onItemSelect:wu,itemsRefs:ue,itemComponent:c,size:n.size,nothingFound:F,creatable:Ze&&!!Ie,createLabel:Ie,"aria-label":i.label,unstyled:f,variant:n.variant}))))});li.displayName="@mantine/core/Select";function VIt(u,e){if(e.length===0)return e;const t="maxWidth"in e[0]?"maxWidth":"minWidth",n=[...e].sort((i,r)=>Xs(ye({size:r[t],sizes:u.breakpoints}))-Xs(ye({size:i[t],sizes:u.breakpoints})));return t==="minWidth"?n.reverse():n}var $It=Object.defineProperty,age=Object.getOwnPropertySymbols,KIt=Object.prototype.hasOwnProperty,WIt=Object.prototype.propertyIsEnumerable,oge=(u,e,t)=>e in u?$It(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,GIt=(u,e)=>{for(var t in e||(e={}))KIt.call(e,t)&&oge(u,t,e[t]);if(age)for(var t of age(e))WIt.call(e,t)&&oge(u,t,e[t]);return u},UIt=at((u,{spacing:e,breakpoints:t,cols:n,verticalSpacing:i})=>{const r=i!=null,a=VIt(u,t).reduce((o,s)=>{var l,c;const d="maxWidth"in s?"max-width":"min-width",h=ye({size:d==="max-width"?s.maxWidth:s.minWidth,sizes:u.breakpoints,units:"em"}),E=Xs(h)-(d==="max-width"?1:0);return o[`@media (${d}: ${wl(E)})`]={gridTemplateColumns:`repeat(${s.cols}, minmax(0, 1fr))`,gap:`${ye({size:(l=s.verticalSpacing)!=null?l:r?i:e,sizes:u.spacing})} ${ye({size:(c=s.spacing)!=null?c:e,sizes:u.spacing})}`},o},{});return{root:GIt({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`,gap:`${ye({size:r?i:e,sizes:u.spacing})} ${ye({size:e,sizes:u.spacing})}`},a)}});const qIt=UIt;var JIt=Object.defineProperty,$M=Object.getOwnPropertySymbols,cze=Object.prototype.hasOwnProperty,dze=Object.prototype.propertyIsEnumerable,sge=(u,e,t)=>e in u?JIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZIt=(u,e)=>{for(var t in e||(e={}))cze.call(e,t)&&sge(u,t,e[t]);if($M)for(var t of $M(e))dze.call(e,t)&&sge(u,t,e[t]);return u},YIt=(u,e)=>{var t={};for(var n in u)cze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&$M)for(var n of $M(u))e.indexOf(n)<0&&dze.call(u,n)&&(t[n]=u[n]);return t};const QIt={breakpoints:[],cols:1,spacing:"md"},Tc=C.forwardRef((u,e)=>{const t=Qe("SimpleGrid",QIt,u),{className:n,breakpoints:i,cols:r,spacing:a,verticalSpacing:o,children:s,unstyled:l,variant:c}=t,d=YIt(t,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:h,cx:E}=qIt({breakpoints:i,cols:r,spacing:a,verticalSpacing:o},{name:"SimpleGrid",unstyled:l,variant:c});return M.createElement(Ct,ZIt({className:E(h.root,n),ref:e},d),s)});Tc.displayName="@mantine/core/SimpleGrid";function hze({value:u,min:e,max:t}){const n=(u-e)/(t-e)*100;return Math.min(Math.max(n,0),100)}function XIt({value:u,containerWidth:e,min:t,max:n,step:i,precision:r}){const o=(e?Math.min(Math.max(u,0),e)/e:u)*(n-t),s=(o!==0?Math.round(o/i)*i:0)+t,l=Math.max(s,t);return r!==void 0?Number(l.toFixed(r)):l}var eOt=Object.defineProperty,tOt=Object.defineProperties,uOt=Object.getOwnPropertyDescriptors,lge=Object.getOwnPropertySymbols,nOt=Object.prototype.hasOwnProperty,iOt=Object.prototype.propertyIsEnumerable,cge=(u,e,t)=>e in u?eOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,rOt=(u,e)=>{for(var t in e||(e={}))nOt.call(e,t)&&cge(u,t,e[t]);if(lge)for(var t of lge(e))iOt.call(e,t)&&cge(u,t,e[t]);return u},aOt=(u,e)=>tOt(u,uOt(e));const wo={xs:G(4),sm:G(6),md:G(8),lg:G(10),xl:G(12)};var oOt=at(u=>({root:aOt(rOt({},u.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const sOt=oOt;var lOt=Object.defineProperty,cOt=Object.defineProperties,dOt=Object.getOwnPropertyDescriptors,dge=Object.getOwnPropertySymbols,hOt=Object.prototype.hasOwnProperty,EOt=Object.prototype.propertyIsEnumerable,hge=(u,e,t)=>e in u?lOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mOt=(u,e)=>{for(var t in e||(e={}))hOt.call(e,t)&&hge(u,t,e[t]);if(dge)for(var t of dge(e))EOt.call(e,t)&&hge(u,t,e[t]);return u},gOt=(u,e)=>cOt(u,dOt(e)),fOt=at((u,{color:e,disabled:t,thumbSize:n},{size:i})=>({label:{position:"absolute",top:G(-36),backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[9],fontSize:u.fontSizes.xs,color:u.white,padding:`calc(${u.spacing.xs} / 2)`,borderRadius:u.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:gOt(mOt({},u.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:t?"none":"flex",height:n?G(n):`calc(${ye({sizes:wo,size:i})} * 2)`,width:n?G(n):`calc(${ye({sizes:wo,size:i})} * 2)`,backgroundColor:u.colorScheme==="dark"?u.fn.themeColor(e,u.fn.primaryShade()):u.white,border:`${G(4)} solid ${u.colorScheme==="dark"?u.white:u.fn.themeColor(e,u.fn.primaryShade())}`,color:u.colorScheme==="dark"?u.white:u.fn.themeColor(e,u.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:u.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:u.shadows.sm}}));const pOt=fOt,Eze=C.forwardRef(({max:u,min:e,value:t,position:n,label:i,dragging:r,onMouseDown:a,onKeyDownCapture:o,color:s,classNames:l,styles:c,size:d,labelTransition:h,labelTransitionDuration:E,labelTransitionTimingFunction:m,labelAlwaysOn:g,thumbLabel:f,onFocus:p,onBlur:D,showLabelOnHover:x,isHovered:b,children:k=null,disabled:A,unstyled:F,thumbSize:S,variant:w},z)=>{const{classes:N,cx:O,theme:y}=pOt({color:s,disabled:A,thumbSize:S},{name:"Slider",classNames:l,styles:c,unstyled:F,variant:w,size:d}),[_,L]=C.useState(!1),T=g||r||_||x&&b;return M.createElement(Ct,{tabIndex:0,role:"slider","aria-label":f,"aria-valuemax":u,"aria-valuemin":e,"aria-valuenow":t,ref:z,className:O(N.thumb,{[N.dragging]:r}),onFocus:()=>{L(!0),typeof p=="function"&&p()},onBlur:()=>{L(!1),typeof D=="function"&&D()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:o,onClick:R=>R.stopPropagation(),style:{[y.dir==="rtl"?"right":"left"]:`${n}%`}},k,M.createElement(Jp,{mounted:i!=null&&T,duration:E,transition:h,timingFunction:m||y.transitionTimingFunction},R=>M.createElement("div",{style:R,className:N.label},i)))});Eze.displayName="@mantine/core/SliderThumb";function DOt({mark:u,offset:e,value:t,inverted:n=!1}){return n?typeof e=="number"&&u.value<=e||u.value>=t:typeof e=="number"?u.value>=e&&u.value<=t:u.value<=t}var xOt=at((u,{color:e,disabled:t,thumbSize:n},{size:i})=>({marksContainer:{position:"absolute",right:n?G(n/2):ye({sizes:wo,size:i}),left:n?G(n/2):ye({sizes:wo,size:i}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,borderColor:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${G(ye({sizes:wo,size:i}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,height:ye({sizes:wo,size:i}),width:ye({sizes:wo,size:i}),borderRadius:1e3,transform:`translateX(calc(-${ye({sizes:wo,size:i})} / 2))`,backgroundColor:u.white,pointerEvents:"none"},markFilled:{borderColor:t?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:e}).background},markLabel:{transform:`translate(-50%, calc(${u.spacing.xs} / 2))`,fontSize:u.fontSizes.sm,color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const vOt=xOt;function mze({marks:u,color:e,size:t,thumbSize:n,min:i,max:r,value:a,classNames:o,styles:s,offset:l,onChange:c,disabled:d,unstyled:h,inverted:E,variant:m}){const{classes:g,cx:f}=vOt({color:e,disabled:d,thumbSize:n},{name:"Slider",classNames:o,styles:s,unstyled:h,variant:m,size:t}),p=u.map((D,x)=>M.createElement(Ct,{className:g.markWrapper,sx:{left:`${hze({value:D.value,min:i,max:r})}%`},key:x},M.createElement("div",{className:f(g.mark,{[g.markFilled]:DOt({mark:D,value:a,offset:l,inverted:E})})}),D.label&&M.createElement("div",{className:g.markLabel,onMouseDown:b=>{b.stopPropagation(),!d&&c(D.value)},onTouchStart:b=>{b.stopPropagation(),!d&&c(D.value)}},D.label)));return M.createElement("div",{className:g.marksContainer},p)}mze.displayName="@mantine/core/SliderMarks";var COt=at((u,{radius:e,color:t,disabled:n,inverted:i,thumbSize:r},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${ye({sizes:wo,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}}},track:{position:"relative",height:ye({sizes:wo,size:a}),width:"100%",marginRight:r?G(r/2):ye({size:a,sizes:wo}),marginLeft:r?G(r/2):ye({size:a,sizes:wo}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:u.fn.radius(e),right:`calc(${r?G(r/2):ye({size:a,sizes:wo})} * -1)`,left:`calc(${r?G(r/2):ye({size:a,sizes:wo})} * -1)`,backgroundColor:i?n?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:t}).background:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]:n?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:t}).background,borderRadius:u.fn.radius(e)}}));const bOt=COt;var kOt=Object.defineProperty,FOt=Object.defineProperties,yOt=Object.getOwnPropertyDescriptors,KM=Object.getOwnPropertySymbols,gze=Object.prototype.hasOwnProperty,fze=Object.prototype.propertyIsEnumerable,Ege=(u,e,t)=>e in u?kOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mge=(u,e)=>{for(var t in e||(e={}))gze.call(e,t)&&Ege(u,t,e[t]);if(KM)for(var t of KM(e))fze.call(e,t)&&Ege(u,t,e[t]);return u},AOt=(u,e)=>FOt(u,yOt(e)),_Ot=(u,e)=>{var t={};for(var n in u)gze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&KM)for(var n of KM(u))e.indexOf(n)<0&&fze.call(u,n)&&(t[n]=u[n]);return t};function pze(u){var e=u,{filled:t,size:n,thumbSize:i,color:r,classNames:a,styles:o,radius:s,children:l,offset:c,disabled:d,marksOffset:h,unstyled:E,inverted:m,variant:g,containerProps:f}=e,p=_Ot(e,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:D}=bOt({color:r,radius:s,disabled:d,inverted:m,thumbSize:i},{name:"Slider",classNames:a,styles:o,unstyled:E,variant:g,size:n});return M.createElement(M.Fragment,null,M.createElement("div",mge({className:D.trackContainer},f),M.createElement("div",{className:D.track},M.createElement(Ct,{className:D.bar,sx:{left:`calc(${c}% - ${i?G(i/2):ye({size:n,sizes:wo})})`,width:`calc(${t}% + 2 * ${i?G(i/2):ye({size:n,sizes:wo})})`}}),l)),M.createElement(mze,AOt(mge({},p),{size:n,thumbSize:i,color:r,offset:h,classNames:a,styles:o,disabled:d,unstyled:E,inverted:m,variant:g})))}pze.displayName="@mantine/core/SliderTrack";var SOt=Object.defineProperty,BOt=Object.defineProperties,wOt=Object.getOwnPropertyDescriptors,WM=Object.getOwnPropertySymbols,Dze=Object.prototype.hasOwnProperty,xze=Object.prototype.propertyIsEnumerable,gge=(u,e,t)=>e in u?SOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LOt=(u,e)=>{for(var t in e||(e={}))Dze.call(e,t)&&gge(u,t,e[t]);if(WM)for(var t of WM(e))xze.call(e,t)&&gge(u,t,e[t]);return u},zOt=(u,e)=>BOt(u,wOt(e)),MOt=(u,e)=>{var t={};for(var n in u)Dze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&WM)for(var n of WM(u))e.indexOf(n)<0&&xze.call(u,n)&&(t[n]=u[n]);return t};const vze=C.forwardRef((u,e)=>{var t=u,{className:n,size:i,classNames:r,styles:a,disabled:o,unstyled:s,variant:l}=t,c=MOt(t,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:d,cx:h}=sOt(null,{name:"Slider",classNames:r,styles:a,unstyled:s,variant:l,size:i});return M.createElement(Ct,zOt(LOt({},c),{tabIndex:-1,className:h(d.root,n),ref:e}))});vze.displayName="@mantine/core/SliderRoot";function Q_(u,e){return parseFloat(u.toFixed(e))}function TOt(u){if(!u)return 0;const e=u.toString().split(".");return e.length>1?e[1].length:0}var NOt=Object.defineProperty,POt=Object.defineProperties,ROt=Object.getOwnPropertyDescriptors,GM=Object.getOwnPropertySymbols,Cze=Object.prototype.hasOwnProperty,bze=Object.prototype.propertyIsEnumerable,fge=(u,e,t)=>e in u?NOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,IOt=(u,e)=>{for(var t in e||(e={}))Cze.call(e,t)&&fge(u,t,e[t]);if(GM)for(var t of GM(e))bze.call(e,t)&&fge(u,t,e[t]);return u},OOt=(u,e)=>POt(u,ROt(e)),jOt=(u,e)=>{var t={};for(var n in u)Cze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&GM)for(var n of GM(u))e.indexOf(n)<0&&bze.call(u,n)&&(t[n]=u[n]);return t};const HOt={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:u=>u,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:u=>u},kze=C.forwardRef((u,e)=>{const t=Qe("Slider",HOt,u),{classNames:n,styles:i,color:r,value:a,onChange:o,onChangeEnd:s,size:l,radius:c,min:d,max:h,step:E,precision:m,defaultValue:g,name:f,marks:p,label:D,labelTransition:x,labelTransitionDuration:b,labelTransitionTimingFunction:k,labelAlwaysOn:A,thumbLabel:F,showLabelOnHover:S,thumbChildren:w,disabled:z,unstyled:N,thumbSize:O,scale:y,inverted:_,variant:L}=t,T=jOt(t,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),R=m??TOt(E),I=jr(),[H,V]=C.useState(!1),[U,J]=fs({value:typeof a=="number"?bm(a,d,h):a,defaultValue:typeof g=="number"?bm(g,d,h):g,finalValue:bm(0,d,h),onChange:o}),Y=C.useRef(U),X=C.useRef(),re=C.useRef(),ge=hze({value:U,min:d,max:h}),_e=y(U),Ve=typeof D=="function"?D(_e):D,Ue=C.useCallback(({x:he})=>{if(!z){const Be=XIt({value:he,min:d,max:h,step:E,precision:R});J(Be),Y.current=Be}},[z,d,h,E,R,J]),{ref:qe,active:Se}=Ykt(Ue,{onScrubEnd:()=>s==null?void 0:s(Y.current)},I.dir),de=he=>{if(!z)switch(he.key){case"ArrowUp":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(U+E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowRight":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(I.dir==="rtl"?U-E:U+E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowDown":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(U-E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowLeft":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(I.dir==="rtl"?U+E:U-E,d),h),R);s==null||s(Be),J(Be);break}case"Home":{he.preventDefault(),re.current.focus(),s==null||s(d),J(d);break}case"End":{he.preventDefault(),re.current.focus(),s==null||s(h),J(h);break}}};return M.createElement(vze,OOt(IOt({},T),{ref:q1(e,X),onKeyDownCapture:de,onMouseDownCapture:()=>{var he;return(he=X.current)==null?void 0:he.focus()},size:l,classNames:n,styles:i,disabled:z,unstyled:N,variant:L}),M.createElement(pze,{inverted:_,offset:0,filled:ge,marks:p,size:l,thumbSize:O,radius:c,color:r,min:d,max:h,value:_e,onChange:J,classNames:n,styles:i,disabled:z,unstyled:N,variant:L,containerProps:{ref:qe,onMouseEnter:S?()=>V(!0):void 0,onMouseLeave:S?()=>V(!1):void 0}},M.createElement(Eze,{max:h,min:d,value:_e,position:ge,dragging:Se,color:r,size:l,label:Ve,ref:re,labelTransition:x,labelTransitionDuration:b,labelTransitionTimingFunction:k,labelAlwaysOn:A,classNames:n,styles:i,thumbLabel:F,showLabelOnHover:S,isHovered:H,disabled:z,unstyled:N,thumbSize:O,variant:L},w)),M.createElement("input",{type:"hidden",name:f,value:_e}))});kze.displayName="@mantine/core/Slider";var VOt=Object.defineProperty,UM=Object.getOwnPropertySymbols,Fze=Object.prototype.hasOwnProperty,yze=Object.prototype.propertyIsEnumerable,pge=(u,e,t)=>e in u?VOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$Ot=(u,e)=>{for(var t in e||(e={}))Fze.call(e,t)&&pge(u,t,e[t]);if(UM)for(var t of UM(e))yze.call(e,t)&&pge(u,t,e[t]);return u},KOt=(u,e)=>{var t={};for(var n in u)Fze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&UM)for(var n of UM(u))e.indexOf(n)<0&&yze.call(u,n)&&(t[n]=u[n]);return t};const WOt={w:0,h:0},qv=C.forwardRef((u,e)=>{const t=Qe("Space",WOt,u),{w:n,h:i}=t,r=KOt(t,["w","h"]);return M.createElement(Ct,$Ot({ref:e,w:n,miw:n,h:i,mih:i},r))});qv.displayName="@mantine/core/Space";var GOt=at((u,{transitionDuration:e})=>({control:{},root:{position:"relative"},content:{display:"flex",flexDirection:"column",overflow:"hidden",transitionProperty:"max-height",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:`${e}ms`,"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}}}));const UOt=GOt;var qOt=Object.defineProperty,qM=Object.getOwnPropertySymbols,Aze=Object.prototype.hasOwnProperty,_ze=Object.prototype.propertyIsEnumerable,Dge=(u,e,t)=>e in u?qOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JOt=(u,e)=>{for(var t in e||(e={}))Aze.call(e,t)&&Dge(u,t,e[t]);if(qM)for(var t of qM(e))_ze.call(e,t)&&Dge(u,t,e[t]);return u},ZOt=(u,e)=>{var t={};for(var n in u)Aze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qM)for(var n of qM(u))e.indexOf(n)<0&&_ze.call(u,n)&&(t[n]=u[n]);return t};const YOt={maxHeight:100,transitionDuration:200,initialState:!1},kne=C.forwardRef((u,e)=>{const t=Qe("Spoiler",YOt,u),{className:n,children:i,maxHeight:r,hideLabel:a,showLabel:o,transitionDuration:s,controlRef:l,initialState:c,classNames:d,styles:h,unstyled:E,variant:m}=t,g=ZOt(t,["className","children","maxHeight","hideLabel","showLabel","transitionDuration","controlRef","initialState","classNames","styles","unstyled","variant"]),{classes:f,cx:p}=UOt({transitionDuration:s},{name:"Spoiler",classNames:d,styles:h,unstyled:E,variant:m}),[D,x]=C.useState(c),{ref:b,height:k}=aFt(),A=rx(S=>!S),className:f.control},F))});kne.displayName="@mantine/core/Spoiler";var QOt=at((u,{spacing:e,align:t,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:t,justifyContent:n,gap:ye({size:e,sizes:u.spacing})}}));const XOt=QOt;var ejt=Object.defineProperty,JM=Object.getOwnPropertySymbols,Sze=Object.prototype.hasOwnProperty,Bze=Object.prototype.propertyIsEnumerable,xge=(u,e,t)=>e in u?ejt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tjt=(u,e)=>{for(var t in e||(e={}))Sze.call(e,t)&&xge(u,t,e[t]);if(JM)for(var t of JM(e))Bze.call(e,t)&&xge(u,t,e[t]);return u},ujt=(u,e)=>{var t={};for(var n in u)Sze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&JM)for(var n of JM(u))e.indexOf(n)<0&&Bze.call(u,n)&&(t[n]=u[n]);return t};const njt={spacing:"md",align:"stretch",justify:"flex-start"},ju=C.forwardRef((u,e)=>{const t=Qe("Stack",njt,u),{spacing:n,className:i,align:r,justify:a,unstyled:o,variant:s}=t,l=ujt(t,["spacing","className","align","justify","unstyled","variant"]),{classes:c,cx:d}=XOt({spacing:n,align:r,justify:a},{name:"Stack",unstyled:o,variant:s});return M.createElement(Ct,tjt({className:d(c.root,i),ref:e},l))});ju.displayName="@mantine/core/Stack";var ijt=Object.defineProperty,rjt=Object.defineProperties,ajt=Object.getOwnPropertyDescriptors,vge=Object.getOwnPropertySymbols,ojt=Object.prototype.hasOwnProperty,sjt=Object.prototype.propertyIsEnumerable,Cge=(u,e,t)=>e in u?ijt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZV=(u,e)=>{for(var t in e||(e={}))ojt.call(e,t)&&Cge(u,t,e[t]);if(vge)for(var t of vge(e))sjt.call(e,t)&&Cge(u,t,e[t]);return u},ljt=(u,e)=>rjt(u,ajt(e));const wze={xs:G(34),sm:G(36),md:G(42),lg:G(48),xl:G(52)};var cjt=at((u,{color:e,iconSize:t,radius:n,allowStepClick:i,iconPosition:r,orientation:a},{size:o})=>{const s=t?G(t):ye({size:o,sizes:wze}),l=o==="xl"||o==="lg"?u.spacing.md:u.spacing.sm,c=u.fn.radius(n),d=u.fn.variant({variant:"filled",color:e||u.primaryColor,primaryFallback:!1}),h=`calc(${u.spacing.xs} / 2)`,E={step:{justifyContent:"flex-start",minHeight:`calc(${s} + ${u.spacing.xl} + ${h})`,marginTop:h,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${v1("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:ZV({display:"flex",flexDirection:r==="left"?"row":"row-reverse",cursor:i?"pointer":"default"},a==="vertical"?E.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${s} + ${h})`,left:`calc(${s} / 2)`,height:"100vh",position:"absolute",borderLeft:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]}`,ref:v1("verticalSeparator")},verticalSeparatorActive:{borderColor:u.fn.variant({variant:"filled",color:e}).background},stepIcon:{boxSizing:"border-box",height:s,width:s,minWidth:s,borderRadius:c,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7],fontSize:ye({size:o,sizes:u.fontSizes}),"&[data-progress]":{borderColor:d.background},"&[data-completed]":{backgroundColor:d.background,borderColor:d.background,color:u.white}},stepCompletedIcon:ljt(ZV({},u.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:u.white}),stepBody:ZV({display:"flex",flexDirection:"column",marginLeft:r==="left"?l:void 0,marginRight:r==="right"?l:void 0},a==="vertical"?{marginTop:`calc(${t} / 4)`}:null),stepLabel:{textAlign:r,fontWeight:500,fontSize:ye({size:o,sizes:u.fontSizes}),lineHeight:1},stepDescription:{textAlign:r,marginTop:`calc(${ye({size:o,sizes:u.spacing})} / 3)`,marginBottom:`calc(${ye({size:o,sizes:u.spacing})} / 3)`,fontSize:`calc(${ye({size:o,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1}}});const djt=cjt;var hjt=Object.defineProperty,ZM=Object.getOwnPropertySymbols,Lze=Object.prototype.hasOwnProperty,zze=Object.prototype.propertyIsEnumerable,bge=(u,e,t)=>e in u?hjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,YV=(u,e)=>{for(var t in e||(e={}))Lze.call(e,t)&&bge(u,t,e[t]);if(ZM)for(var t of ZM(e))zze.call(e,t)&&bge(u,t,e[t]);return u},Ejt=(u,e)=>{var t={};for(var n in u)Lze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ZM)for(var n of ZM(u))e.indexOf(n)<0&&zze.call(u,n)&&(t[n]=u[n]);return t};const mjt={xs:16,sm:18,md:20,lg:22,xl:24},gjt={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},X_=(u,e)=>typeof u=="function"?M.createElement(u,{step:e}):u,Mze=C.forwardRef((u,e)=>{const t=Qe("StepperStep",gjt,u),{className:n,step:i,state:r,color:a,icon:o,completedIcon:s,progressIcon:l,label:c,description:d,withIcon:h,iconSize:E,size:m,radius:g,loading:f,allowStepClick:p,allowStepSelect:D,iconPosition:x,__staticSelector:b,classNames:k,styles:A,unstyled:F,orientation:S,variant:w}=t,z=Ejt(t,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:N,cx:O}=djt({color:a,iconSize:E,radius:g,allowStepClick:p,iconPosition:x,orientation:S},{name:b,classNames:k,styles:A,unstyled:F,variant:w,size:m}),y=ye({size:m,sizes:mjt}),_=r==="stepCompleted"?null:r==="stepProgress"?l:o,L={"data-progress":r==="stepProgress"||void 0,"data-completed":r==="stepCompleted"||void 0};return M.createElement(L4,YV(YV({className:O(N.step,n),tabIndex:p?0:-1,ref:e},L),z),h&&M.createElement("div",{className:N.stepWrapper},M.createElement("div",YV({className:N.stepIcon},L),M.createElement(Jp,{mounted:r==="stepCompleted",transition:"pop",duration:200},T=>M.createElement("div",{className:N.stepCompletedIcon,style:T},f?M.createElement(Vv,{color:"#fff",size:y,className:N.stepLoader}):X_(s,i)||M.createElement(ABe,{indeterminate:!1,width:y,height:y}))),r!=="stepCompleted"?f?M.createElement(Vv,{size:y,color:a}):X_(_||o,i):null),S==="vertical"&&M.createElement("div",{className:O(N.verticalSeparator,{[N.verticalSeparatorActive]:r==="stepCompleted"})})),(c||d)&&M.createElement("div",{className:N.stepBody},c&&M.createElement(_u,{className:N.stepLabel},X_(c,i)),d&&M.createElement(_u,{className:N.stepDescription,color:"dimmed"},X_(d,i))))});Mze.displayName="@mantine/core/Step";function YM(u){return null}YM.displayName="@mantine/core/StepCompleted";var fjt=Object.defineProperty,pjt=Object.defineProperties,Djt=Object.getOwnPropertyDescriptors,kge=Object.getOwnPropertySymbols,xjt=Object.prototype.hasOwnProperty,vjt=Object.prototype.propertyIsEnumerable,Fge=(u,e,t)=>e in u?fjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XC=(u,e)=>{for(var t in e||(e={}))xjt.call(e,t)&&Fge(u,t,e[t]);if(kge)for(var t of kge(e))vjt.call(e,t)&&Fge(u,t,e[t]);return u},Cjt=(u,e)=>pjt(u,Djt(e)),bjt=at((u,{contentPadding:e,color:t,orientation:n,iconPosition:i,iconSize:r,breakpoint:a},{size:o})=>{const s=typeof a<"u",l=Xs(ye({size:a,sizes:u.breakpoints})),c=typeof r<"u"?`calc(${G(r)} / 2 - ${G(1)})`:`calc(${ye({size:o,sizes:wze})} / 2 - ${G(1)})`,d={steps:{flexDirection:"column",alignItems:i==="left"?"flex-start":"flex-end"},separator:{width:G(2),minHeight:u.spacing.xl,marginLeft:i==="left"?c:0,marginRight:i==="right"?c:0,marginTop:`calc(${u.spacing.xs} / 2)`,marginBottom:`calc(${u.spacing.xs} - ${G(2)})`}},h={steps:{[`@media (max-width: ${wl(l-1)})`]:d.steps},separator:{[`@media (max-width: ${wl(l-1)})`]:d.separator}};return{root:{},steps:XC(XC({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?d.steps:null),s?h.steps:null),separator:XC(XC({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:G(2),backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],marginLeft:u.spacing.md,marginRight:u.spacing.md},n==="vertical"?d.separator:null),s?h.separator:null),separatorActive:{backgroundColor:u.fn.variant({variant:"filled",color:t||u.primaryColor,primaryFallback:!1}).background},content:Cjt(XC({},u.fn.fontStyles()),{paddingTop:ye({size:e,sizes:u.spacing})})}});const kjt=bjt;var Fjt=Object.defineProperty,QM=Object.getOwnPropertySymbols,Tze=Object.prototype.hasOwnProperty,Nze=Object.prototype.propertyIsEnumerable,yge=(u,e,t)=>e in u?Fjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yjt=(u,e)=>{for(var t in e||(e={}))Tze.call(e,t)&&yge(u,t,e[t]);if(QM)for(var t of QM(e))Nze.call(e,t)&&yge(u,t,e[t]);return u},Ajt=(u,e)=>{var t={};for(var n in u)Tze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&QM)for(var n of QM(u))e.indexOf(n)<0&&Nze.call(u,n)&&(t[n]=u[n]);return t};const _jt={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},Jf=C.forwardRef((u,e)=>{var t,n,i;const r=Qe("Stepper",_jt,u),{className:a,children:o,onStepClick:s,active:l,icon:c,completedIcon:d,progressIcon:h,color:E,iconSize:m,contentPadding:g,size:f,radius:p,orientation:D,breakpoint:x,iconPosition:b,allowNextStepsSelect:k,classNames:A,styles:F,unstyled:S,variant:w}=r,z=Ajt(r,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:N,cx:O}=kjt({contentPadding:g,color:E,orientation:D,iconPosition:b,iconSize:m,breakpoint:x},{name:"Stepper",classNames:A,styles:F,unstyled:S,variant:w,size:f}),y=C.Children.toArray(o),_=y.filter(V=>V.type!==YM),L=y.find(V=>V.type===YM),T=_.reduce((V,U,J)=>{const Y=l===J?"stepProgress":l>J?"stepCompleted":"stepInactive",re=(()=>typeof s!="function"?!1:typeof U.props.allowStepSelect=="boolean"?U.props.allowStepSelect:Y==="stepCompleted"||k)();return V.push(C.cloneElement(U,{__staticSelector:"Stepper",icon:U.props.icon||c||J+1,key:J,step:J,variant:w,state:Y,onClick:()=>re&&s(J),allowStepClick:re,completedIcon:U.props.completedIcon||d,progressIcon:U.props.progressIcon||h,color:U.props.color||E,iconSize:m,size:f,radius:p,classNames:A,styles:F,iconPosition:U.props.iconPosition||b,orientation:D,unstyled:S})),D==="horizontal"&&J!==_.length-1&&V.push(M.createElement("div",{className:O(N.separator,{[N.separatorActive]:J_.length-1?I:R;return M.createElement(Ct,yjt({className:O(N.root,a),ref:e},z),M.createElement("div",{className:N.steps},T),H&&M.createElement("div",{className:N.content},H))});Jf.Step=Mze;Jf.Completed=YM;Jf.displayName="@mantine/core/Stepper";const Pze=C.createContext(null),Sjt=Pze.Provider,Bjt=()=>C.useContext(Pze);var wjt=Object.defineProperty,XM=Object.getOwnPropertySymbols,Rze=Object.prototype.hasOwnProperty,Ize=Object.prototype.propertyIsEnumerable,Age=(u,e,t)=>e in u?wjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_ge=(u,e)=>{for(var t in e||(e={}))Rze.call(e,t)&&Age(u,t,e[t]);if(XM)for(var t of XM(e))Ize.call(e,t)&&Age(u,t,e[t]);return u},Ljt=(u,e)=>{var t={};for(var n in u)Rze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&XM)for(var n of XM(u))e.indexOf(n)<0&&Ize.call(u,n)&&(t[n]=u[n]);return t};const zjt={size:"sm"},Oze=C.forwardRef((u,e)=>{const t=Qe("SwitchGroup",zjt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s}=t,l=Ljt(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,d]=fs({value:i,defaultValue:r,finalValue:[],onChange:a}),h=E=>{const m=E.currentTarget.value;d(c.includes(m)?c.filter(g=>g!==m):[...c,m])};return M.createElement(Sjt,{value:{value:c,onChange:h,size:o}},M.createElement(Ra.Wrapper,_ge(_ge({labelElement:"div",size:o,__staticSelector:"SwitchGroup",ref:e},s),l),n))});Oze.displayName="@mantine/core/SwitchGroup";var Mjt=Object.defineProperty,Tjt=Object.defineProperties,Njt=Object.getOwnPropertyDescriptors,Sge=Object.getOwnPropertySymbols,Pjt=Object.prototype.hasOwnProperty,Rjt=Object.prototype.propertyIsEnumerable,Bge=(u,e,t)=>e in u?Mjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ijt=(u,e)=>{for(var t in e||(e={}))Pjt.call(e,t)&&Bge(u,t,e[t]);if(Sge)for(var t of Sge(e))Rjt.call(e,t)&&Bge(u,t,e[t]);return u},Ojt=(u,e)=>Tjt(u,Njt(e));const jjt={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)},Hjt={xs:G(32),sm:G(38),md:G(46),lg:G(56),xl:G(72)},Vjt={xs:G(12),sm:G(14),md:G(18),lg:G(22),xl:G(28)},$jt={xs:G(5),sm:G(6),md:G(7),lg:G(9),xl:G(11)},Kjt={xs:G(4),sm:G(5),md:G(6),lg:G(8),xl:G(10)};var Wjt=at((u,{radius:e,color:t,labelPosition:n,error:i},{size:r})=>{const a=ye({size:r,sizes:Vjt}),o=ye({size:e,sizes:u.radius}),s=u.fn.variant({variant:"filled",color:t}),l=ye({size:r,sizes:Hjt}),c=G(r==="xs"?1:2),d=u.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:Ojt(Ijt({},u.fn.focusStyles("input:focus + &")),{cursor:u.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:o,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[2],border:`${G(1)} solid ${i?d:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,height:ye({size:r,sizes:jjt}),minWidth:l,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:ye({size:r,sizes:$jt}),fontWeight:600,order:n==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[6],transition:`color 150ms ${u.transitionTimingFunction}`,"input:checked + &":{backgroundColor:s.background,borderColor:s.background,color:u.white,transition:`color 150ms ${u.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:o,boxSizing:"border-box",display:"flex",backgroundColor:u.white,height:a,width:a,border:`${G(1)} solid ${u.colorScheme==="dark"?u.white:u.colors.gray[3]}`,left:c,transition:`left 150ms ${u.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${a} - ${c})`,borderColor:u.white},"input:disabled + * > &":{borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],backgroundColor:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${l} - ${a})`,paddingInline:ye({size:r,sizes:Kjt}),marginLeft:`calc(${a} + ${c})`,transition:`margin 150ms ${u.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${a} + ${c})`}}}});const Gjt=Wjt;var Ujt=Object.defineProperty,qjt=Object.defineProperties,Jjt=Object.getOwnPropertyDescriptors,eT=Object.getOwnPropertySymbols,jze=Object.prototype.hasOwnProperty,Hze=Object.prototype.propertyIsEnumerable,wge=(u,e,t)=>e in u?Ujt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QV=(u,e)=>{for(var t in e||(e={}))jze.call(e,t)&&wge(u,t,e[t]);if(eT)for(var t of eT(e))Hze.call(e,t)&&wge(u,t,e[t]);return u},Zjt=(u,e)=>qjt(u,Jjt(e)),Yjt=(u,e)=>{var t={};for(var n in u)jze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&eT)for(var n of eT(u))e.indexOf(n)<0&&Hze.call(u,n)&&(t[n]=u[n]);return t};const Qjt={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},tT=C.forwardRef((u,e)=>{var t;const n=Qe("Switch",Qjt,u),{className:i,color:r,label:a,offLabel:o,onLabel:s,id:l,style:c,size:d,radius:h,wrapperProps:E,children:m,unstyled:g,styles:f,classNames:p,thumbIcon:D,sx:x,checked:b,defaultChecked:k,onChange:A,labelPosition:F,description:S,error:w,disabled:z,variant:N}=n,O=Yjt(n,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),y=Bjt(),_=(y==null?void 0:y.size)||d,{classes:L,cx:T}=Gjt({color:r,radius:h,labelPosition:F,error:!!w},{name:"Switch",classNames:p,styles:f,unstyled:g,size:_,variant:N}),{systemStyles:R,rest:I}=w4(O),H=Jl(l),V=y?{checked:y.value.includes(I.value),onChange:y.onChange}:{},[U,J]=fs({value:(t=V.checked)!=null?t:b,defaultValue:k,finalValue:!1});return M.createElement(PI,QV(QV({className:T(i,L.root),sx:x,style:c,id:H,size:(y==null?void 0:y.size)||d,labelPosition:F,label:a,description:S,error:w,disabled:z,__staticSelector:"Switch",classNames:p,styles:f,unstyled:g,"data-checked":V.checked||void 0,variant:N},R),E),M.createElement("input",Zjt(QV({},I),{disabled:z,checked:U,onChange:Y=>{y?V.onChange(Y):A==null||A(Y),J(Y.currentTarget.checked)},id:H,ref:e,type:"checkbox",className:L.input})),M.createElement("label",{htmlFor:H,className:L.track},M.createElement("div",{className:L.thumb},D),M.createElement("div",{className:L.trackLabel},U?s:o)))});tT.displayName="@mantine/core/Switch";tT.Group=Oze;const TZ={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[Xjt,Fne]=U1(TZ.context);var eHt=Object.defineProperty,Lge=Object.getOwnPropertySymbols,tHt=Object.prototype.hasOwnProperty,uHt=Object.prototype.propertyIsEnumerable,zge=(u,e,t)=>e in u?eHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,nHt=(u,e)=>{for(var t in e||(e={}))tHt.call(e,t)&&zge(u,t,e[t]);if(Lge)for(var t of Lge(e))uHt.call(e,t)&&zge(u,t,e[t]);return u};function iHt({orientation:u,inverted:e,placement:t},n,i){const r=u==="vertical";return i==="default"?{[r?t==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${G(2)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:i==="outline"?{[r?t==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${G(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:i==="pills"?{gap:`calc(${n.spacing.sm} / 2)`}:{}}var rHt=at((u,e,{variant:t})=>{const n=e.orientation==="vertical";return{tabsList:nHt({display:"flex",flexWrap:"wrap",flexDirection:n?"column":"row",justifyContent:hwe[e.position],'& [role="tab"]':{flex:e.grow?1:void 0}},iHt(e,u,t))}});const aHt=rHt;var oHt=Object.defineProperty,sHt=Object.defineProperties,lHt=Object.getOwnPropertyDescriptors,uT=Object.getOwnPropertySymbols,Vze=Object.prototype.hasOwnProperty,$ze=Object.prototype.propertyIsEnumerable,Mge=(u,e,t)=>e in u?oHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,cHt=(u,e)=>{for(var t in e||(e={}))Vze.call(e,t)&&Mge(u,t,e[t]);if(uT)for(var t of uT(e))$ze.call(e,t)&&Mge(u,t,e[t]);return u},dHt=(u,e)=>sHt(u,lHt(e)),hHt=(u,e)=>{var t={};for(var n in u)Vze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uT)for(var n of uT(u))e.indexOf(n)<0&&$ze.call(u,n)&&(t[n]=u[n]);return t};const EHt={grow:!1,position:"left"},Kze=C.forwardRef((u,e)=>{const t=Qe("TabsList",EHt,u),{children:n,className:i,grow:r,position:a}=t,o=hHt(t,["children","className","grow","position"]),{orientation:s,variant:l,color:c,radius:d,inverted:h,placement:E,classNames:m,styles:g,unstyled:f}=Fne(),{classes:p,cx:D}=aHt({orientation:s,grow:r,color:c,position:a,radius:d,inverted:h,placement:E},{name:"Tabs",unstyled:f,classNames:m,styles:g,variant:l});return M.createElement(Ct,dHt(cHt({},o),{className:D(p.tabsList,i),ref:e,role:"tablist","aria-orientation":s}),n)});Kze.displayName="@mantine/core/TabsList";var mHt=at((u,{orientation:e})=>({panel:{flex:e==="vertical"?1:void 0}}));const gHt=mHt;var fHt=Object.defineProperty,pHt=Object.defineProperties,DHt=Object.getOwnPropertyDescriptors,nT=Object.getOwnPropertySymbols,Wze=Object.prototype.hasOwnProperty,Gze=Object.prototype.propertyIsEnumerable,Tge=(u,e,t)=>e in u?fHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,xHt=(u,e)=>{for(var t in e||(e={}))Wze.call(e,t)&&Tge(u,t,e[t]);if(nT)for(var t of nT(e))Gze.call(e,t)&&Tge(u,t,e[t]);return u},vHt=(u,e)=>pHt(u,DHt(e)),CHt=(u,e)=>{var t={};for(var n in u)Wze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nT)for(var n of nT(u))e.indexOf(n)<0&&Gze.call(u,n)&&(t[n]=u[n]);return t};const bHt={},Uze=C.forwardRef((u,e)=>{const t=Qe("TabsPanel",bHt,u),{value:n,children:i,sx:r,className:a}=t,o=CHt(t,["value","children","sx","className"]),s=Fne(),{classes:l,cx:c}=gHt({orientation:s.orientation,color:s.color,radius:s.radius,inverted:s.inverted,placement:s.placement},{name:"Tabs",unstyled:s.unstyled,classNames:s.classNames,styles:s.styles,variant:s.variant}),d=s.getPanelId(n),h=s.value===n,E=s.keepMounted||h?i:null;return C.useEffect(()=>(s.setMountedPanelIds(m=>[...m,d]),s.setMountedPanelIds(m=>m.filter(g=>g!==d))),[d]),M.createElement(Ct,vHt(xHt({},o),{ref:e,sx:[{display:h?void 0:"none"},...EI(r)],className:c(l.panel,a),role:"tabpanel",id:d,"aria-labelledby":s.getTabId(n)}),E)});Uze.displayName="@mantine/core/TabsPanel";var kHt=Object.defineProperty,FHt=Object.defineProperties,yHt=Object.getOwnPropertyDescriptors,Nge=Object.getOwnPropertySymbols,AHt=Object.prototype.hasOwnProperty,_Ht=Object.prototype.propertyIsEnumerable,Pge=(u,e,t)=>e in u?kHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,W5=(u,e)=>{for(var t in e||(e={}))AHt.call(e,t)&&Pge(u,t,e[t]);if(Nge)for(var t of Nge(e))_Ht.call(e,t)&&Pge(u,t,e[t]);return u},Rge=(u,e)=>FHt(u,yHt(e));function SHt(u,{orientation:e,color:t,radius:n,inverted:i,placement:r},a){const o=e==="vertical",s=u.fn.variant({color:t,variant:"filled"}),l=G(u.fn.radius(n)),c=e==="vertical"?r==="left"?`${l} 0 0 ${l}`:` 0 ${l} ${l} 0`:i?`0 0 ${l} ${l}`:`${l} ${l} 0 0`;return a==="default"?Rge(W5({[o?r==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:`${G(2)} solid transparent`,[o?r==="left"?"marginRight":"marginLeft":i?"marginTop":"marginBottom"]:G(-2),borderRadius:c},u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]})),{"&[data-active]":W5({borderColor:s.background,color:u.colorScheme==="dark"?u.white:u.black},u.fn.hover({borderColor:s.background}))}):a==="outline"?{borderRadius:c,border:`${G(1)} solid transparent`,[o?r==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3],"&::before":{content:'""',backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,position:"absolute",bottom:o?0:i?"unset":G(-1),top:o?0:i?G(-1):"unset",[o?"width":"height"]:G(1),right:o?r==="left"?G(-1):"unset":0,left:o?r==="left"?"unset":G(-1):0}}}:a==="pills"?Rge(W5({borderRadius:u.fn.radius(n)},u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]})),{"&[data-active]":W5({backgroundColor:s.background,color:u.white},u.fn.hover({backgroundColor:s.background}))}):{}}var BHt=at((u,e,{variant:t})=>({tabLabel:{},tab:W5({position:"relative",padding:`${u.spacing.xs} ${u.spacing.md}`,paddingLeft:e.withIcon?u.spacing.xs:void 0,paddingRight:e.withRightSection?u.spacing.xs:void 0,fontSize:u.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:e.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":W5({opacity:.5,cursor:"not-allowed"},u.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},SHt(u,e,t)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:G(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:G(7)}}}));const wHt=BHt;var LHt=Object.defineProperty,zHt=Object.defineProperties,MHt=Object.getOwnPropertyDescriptors,iT=Object.getOwnPropertySymbols,qze=Object.prototype.hasOwnProperty,Jze=Object.prototype.propertyIsEnumerable,Ige=(u,e,t)=>e in u?LHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,THt=(u,e)=>{for(var t in e||(e={}))qze.call(e,t)&&Ige(u,t,e[t]);if(iT)for(var t of iT(e))Jze.call(e,t)&&Ige(u,t,e[t]);return u},NHt=(u,e)=>zHt(u,MHt(e)),PHt=(u,e)=>{var t={};for(var n in u)qze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iT)for(var n of iT(u))e.indexOf(n)<0&&Jze.call(u,n)&&(t[n]=u[n]);return t};const RHt={},Zze=C.forwardRef((u,e)=>{const t=Qe("TabsTab",RHt,u),{value:n,children:i,onKeyDown:r,onClick:a,className:o,icon:s,rightSection:l,color:c}=t,d=PHt(t,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),h=Fne(),E=!!s,m=!!l,{theme:g,classes:f,cx:p}=wHt({withIcon:E||m&&!i,withRightSection:m||E&&!i,orientation:h.orientation,color:c||h.color,radius:h.radius,inverted:h.inverted,placement:h.placement},{name:"Tabs",unstyled:h.unstyled,classNames:h.classNames,styles:h.styles,variant:h.variant}),D=n===h.value,x=h.getPanelId(n),b=h.mountedPanelIds.includes(n)?x:void 0,k=A=>{h.onTabChange(h.allowTabDeactivation&&n===h.value?null:n),a==null||a(A)};return M.createElement(L4,NHt(THt({},d),{unstyled:h.unstyled,className:p(f.tab,o),"data-active":D||void 0,ref:e,type:"button",role:"tab",id:h.getTabId(n),"aria-selected":D,tabIndex:D||h.value===null?0:-1,"aria-controls":b,onClick:k,onKeyDown:Pue({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:h.activateTabWithKeyboard,loop:h.loop,dir:g.dir,orientation:h.orientation,onKeyDown:r})}),s&&M.createElement("span",{className:f.tabIcon},s),i&&M.createElement("span",{className:f.tabLabel},i),l&&M.createElement("span",{className:f.tabRightSection},l))});Zze.displayName="@mantine/core/Tab";function Yze({defaultValue:u,value:e,onTabChange:t,orientation:n,children:i,loop:r,id:a,activateTabWithKeyboard:o,allowTabDeactivation:s,variant:l,color:c,radius:d,inverted:h,placement:E,keepMounted:m=!0,classNames:g,styles:f,unstyled:p}){const D=Jl(a),[x,b]=C.useState([]),[k,A]=fs({value:e,defaultValue:u,finalValue:null,onChange:t});return M.createElement(Xjt,{value:{placement:E,value:k,orientation:n,id:D,loop:r,activateTabWithKeyboard:o,getTabId:NL(`${D}-tab`,TZ.value),getPanelId:NL(`${D}-panel`,TZ.value),onTabChange:A,setMountedPanelIds:b,mountedPanelIds:x,allowTabDeactivation:s,variant:l,color:c,radius:d,inverted:h,keepMounted:m,classNames:g,styles:f,unstyled:p}},i)}Yze.displayName="@mantine/core/TabsProvider";var IHt=at((u,{orientation:e,placement:t})=>({root:{display:e==="vertical"?"flex":void 0,flexDirection:t==="right"?"row-reverse":"row"}}));const OHt=IHt;var jHt=Object.defineProperty,HHt=Object.defineProperties,VHt=Object.getOwnPropertyDescriptors,rT=Object.getOwnPropertySymbols,Qze=Object.prototype.hasOwnProperty,Xze=Object.prototype.propertyIsEnumerable,Oge=(u,e,t)=>e in u?jHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$Ht=(u,e)=>{for(var t in e||(e={}))Qze.call(e,t)&&Oge(u,t,e[t]);if(rT)for(var t of rT(e))Xze.call(e,t)&&Oge(u,t,e[t]);return u},KHt=(u,e)=>HHt(u,VHt(e)),WHt=(u,e)=>{var t={};for(var n in u)Qze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rT)for(var n of rT(u))e.indexOf(n)<0&&Xze.call(u,n)&&(t[n]=u[n]);return t};const GHt={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},ri=C.forwardRef((u,e)=>{const t=Qe("Tabs",GHt,u),{defaultValue:n,value:i,orientation:r,loop:a,activateTabWithKeyboard:o,allowTabDeactivation:s,children:l,id:c,onTabChange:d,variant:h,color:E,className:m,unstyled:g,classNames:f,styles:p,radius:D,inverted:x,keepMounted:b,placement:k}=t,A=WHt(t,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:F,cx:S}=OHt({orientation:r,color:E,radius:D,inverted:x,placement:k},{unstyled:g,name:"Tabs",classNames:f,styles:p,variant:h});return M.createElement(Yze,{activateTabWithKeyboard:o,defaultValue:n,orientation:r,onTabChange:d,value:i,id:c,loop:a,allowTabDeactivation:s,color:E,variant:h,radius:D,inverted:x,keepMounted:b,placement:k,classNames:f,styles:p,unstyled:g},M.createElement(Ct,KHt($Ht({},A),{className:S(F.root,m),id:c,ref:e}),l))});ri.List=Kze;ri.Tab=Zze;ri.Panel=Uze;ri.displayName="@mantine/core/Tabs";var UHt=Object.defineProperty,qHt=Object.defineProperties,JHt=Object.getOwnPropertyDescriptors,jge=Object.getOwnPropertySymbols,ZHt=Object.prototype.hasOwnProperty,YHt=Object.prototype.propertyIsEnumerable,Hge=(u,e,t)=>e in u?UHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QHt=(u,e)=>{for(var t in e||(e={}))ZHt.call(e,t)&&Hge(u,t,e[t]);if(jge)for(var t of jge(e))YHt.call(e,t)&&Hge(u,t,e[t]);return u},XHt=(u,e)=>qHt(u,JHt(e));function eVt(u,e,t){return typeof u<"u"?u in t.headings.sizes?t.headings.sizes[u].fontSize:G(u):t.headings.sizes[e].fontSize}function tVt(u,e,t){return typeof u<"u"&&u in t.headings.sizes?t.headings.sizes[u].lineHeight:t.headings.sizes[e].lineHeight}var uVt=at((u,{element:e,weight:t,inline:n},{size:i})=>({root:XHt(QHt({},u.fn.fontStyles()),{fontFamily:u.headings.fontFamily,fontWeight:t||u.headings.sizes[e].fontWeight||u.headings.fontWeight,fontSize:eVt(i,e,u),lineHeight:n?1:tVt(i,e,u),margin:0})}));const nVt=uVt;var iVt=Object.defineProperty,aT=Object.getOwnPropertySymbols,eMe=Object.prototype.hasOwnProperty,tMe=Object.prototype.propertyIsEnumerable,Vge=(u,e,t)=>e in u?iVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,rVt=(u,e)=>{for(var t in e||(e={}))eMe.call(e,t)&&Vge(u,t,e[t]);if(aT)for(var t of aT(e))tMe.call(e,t)&&Vge(u,t,e[t]);return u},aVt=(u,e)=>{var t={};for(var n in u)eMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&aT)for(var n of aT(u))e.indexOf(n)<0&&tMe.call(u,n)&&(t[n]=u[n]);return t};const oVt={order:1},k0=C.forwardRef((u,e)=>{const t=Qe("Title",oVt,u),{className:n,order:i,children:r,unstyled:a,size:o,weight:s,inline:l,variant:c}=t,d=aVt(t,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:E}=nVt({element:`h${i}`,weight:s,inline:l},{name:"Title",unstyled:a,variant:c,size:o});return[1,2,3,4,5,6].includes(i)?M.createElement(_u,rVt({variant:c,component:`h${i}`,ref:e,className:E(h.root,n)},d),r):null});k0.displayName="@mantine/core/Title";const yne=C.createContext(null);yne.displayName="@mantine/modals/ModalsContext";function sVt(){const u=C.useContext(yne);if(!u)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return u}var lVt=Object.defineProperty,cVt=Object.defineProperties,dVt=Object.getOwnPropertyDescriptors,$ge=Object.getOwnPropertySymbols,hVt=Object.prototype.hasOwnProperty,EVt=Object.prototype.propertyIsEnumerable,Kge=(u,e,t)=>e in u?lVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XV=(u,e)=>{for(var t in e||(e={}))hVt.call(e,t)&&Kge(u,t,e[t]);if($ge)for(var t of $ge(e))EVt.call(e,t)&&Kge(u,t,e[t]);return u},Wge=(u,e)=>cVt(u,dVt(e));function mVt({id:u,cancelProps:e,confirmProps:t,labels:n={cancel:"",confirm:""},closeOnConfirm:i=!0,closeOnCancel:r=!0,groupProps:a,onCancel:o,onConfirm:s,children:l}){const{cancel:c,confirm:d}=n,h=sVt(),E=g=>{typeof(e==null?void 0:e.onClick)=="function"&&(e==null||e.onClick(g)),typeof o=="function"&&o(),r&&h.closeModal(u)},m=g=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(g)),typeof s=="function"&&s(),i&&h.closeModal(u)};return M.createElement(M.Fragment,null,l&&M.createElement(Ct,{mb:"md"},l),M.createElement(zi,XV({position:"right"},a),M.createElement(xl,Wge(XV({variant:"default"},e),{onClick:E}),(e==null?void 0:e.children)||c),M.createElement(xl,Wge(XV({},t),{onClick:m}),(t==null?void 0:t.children)||d)))}function Gge(u,e){var t,n,i,r;e&&u.type==="confirm"&&((n=(t=u.props).onCancel)==null||n.call(t)),(r=(i=u.props).onClose)==null||r.call(i)}function gVt(u,e){switch(e.type){case"OPEN":return{current:e.modal,modals:[...u.modals,e.modal]};case"CLOSE":{const t=u.modals.find(i=>i.id===e.modalId);if(!t)return u;Gge(t,e.canceled);const n=u.modals.filter(i=>i.id!==e.modalId);return{current:n[n.length-1]||u.current,modals:n}}case"CLOSE_ALL":return u.modals.length?(u.modals.concat().reverse().forEach(t=>{Gge(t,e.canceled)}),{current:u.current,modals:[]}):u;default:return u}}const[fVt,o7]=B9e("mantine-modals"),pVt=o7("openModal"),DVt=o7("closeModal"),xVt=o7("closeAllModals"),vVt=o7("openConfirmModal"),CVt=u=>o7("openContextModal")(u),Ane={open:pVt,close:DVt,closeAll:xVt,openConfirmModal:vVt,openContextModal:CVt};var bVt=Object.defineProperty,kVt=Object.defineProperties,FVt=Object.getOwnPropertyDescriptors,oT=Object.getOwnPropertySymbols,uMe=Object.prototype.hasOwnProperty,nMe=Object.prototype.propertyIsEnumerable,Uge=(u,e,t)=>e in u?bVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,V8=(u,e)=>{for(var t in e||(e={}))uMe.call(e,t)&&Uge(u,t,e[t]);if(oT)for(var t of oT(e))nMe.call(e,t)&&Uge(u,t,e[t]);return u},qge=(u,e)=>kVt(u,FVt(e)),ff=(u,e)=>{var t={};for(var n in u)uMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oT)for(var n of oT(u))e.indexOf(n)<0&&nMe.call(u,n)&&(t[n]=u[n]);return t};function yVt(u){if(!u)return{confirmProps:{},modalProps:{}};const e=u,{id:t,children:n,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:l,groupProps:c,labels:d}=e,h=ff(e,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:t,children:n,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:V8({id:t},h)}}function AVt({children:u,modalProps:e,labels:t,modals:n}){const[i,r]=C.useReducer(gVt,{modals:[],current:null}),a=C.useRef(i);a.current=i;const o=C.useCallback(f=>{r({type:"CLOSE_ALL",canceled:f})},[a,r]),s=C.useCallback(f=>{var p=f,{modalId:D}=p,x=ff(p,["modalId"]);const b=D||i4();return r({type:"OPEN",modal:{id:b,type:"content",props:x}}),b},[r]),l=C.useCallback(f=>{var p=f,{modalId:D}=p,x=ff(p,["modalId"]);const b=D||i4();return r({type:"OPEN",modal:{id:b,type:"confirm",props:x}}),b},[r]),c=C.useCallback((f,p)=>{var D=p,{modalId:x}=D,b=ff(D,["modalId"]);const k=x||i4();return r({type:"OPEN",modal:{id:k,type:"context",props:b,ctx:f}}),k},[r]),d=C.useCallback((f,p)=>{r({type:"CLOSE",modalId:f,canceled:p})},[a,r]);fVt({openModal:s,openConfirmModal:l,openContextModal:f=>{var p=f,{modal:D}=p,x=ff(p,["modal"]);return c(D,x)},closeModal:d,closeContextModal:d,closeAllModals:o});const h={modals:i.modals,openModal:s,openConfirmModal:l,openContextModal:c,closeModal:d,closeContextModal:d,closeAll:o},E=()=>{const f=a.current.current;switch(f==null?void 0:f.type){case"context":{const p=f.props,{innerProps:D}=p,x=ff(p,["innerProps"]),b=n[f.ctx];return{modalProps:x,content:M.createElement(b,{innerProps:D,context:h,id:f.id})}}case"confirm":{const{modalProps:p,confirmProps:D}=yVt(f.props);return{modalProps:p,content:M.createElement(mVt,qge(V8({},D),{id:f.id,labels:f.props.labels||t}))}}case"content":{const p=f.props,{children:D}=p;return{modalProps:ff(p,["children"]),content:M.createElement(M.Fragment,null,D)}}default:return{modalProps:{},content:null}}},{modalProps:m,content:g}=E();return M.createElement(yne.Provider,{value:h},M.createElement(Wi,qge(V8(V8({zIndex:fd("modal")+1},e),m),{opened:i.modals.length>0,onClose:()=>d(i.current.id)}),g),u)}function NZ(u,e){return NZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},NZ(u,e)}function iMe(u,e){u.prototype=Object.create(e.prototype),u.prototype.constructor=u,NZ(u,e)}var rMe={exports:{}},_Vt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",SVt=_Vt,BVt=SVt;function aMe(){}function oMe(){}oMe.resetWarningCache=aMe;var wVt=function(){function u(n,i,r,a,o,s){if(s!==BVt){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}u.isRequired=u;function e(){return u}var t={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:e,element:u,elementType:u,instanceOf:e,node:u,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:oMe,resetWarningCache:aMe};return t.PropTypes=t,t};rMe.exports=wVt();var LVt=rMe.exports;const Qg=Hl(LVt),Jge={disabled:!1},sT=M.createContext(null);var Ib="unmounted",pf="exited",Df="entering",e5="entered",PZ="exiting",N4=function(u){iMe(e,u);function e(n,i){var r;r=u.call(this,n,i)||this;var a=i,o=a&&!a.isMounting?n.enter:n.appear,s;return r.appearStatus=null,n.in?o?(s=pf,r.appearStatus=Df):s=e5:n.unmountOnExit||n.mountOnEnter?s=Ib:s=pf,r.state={status:s},r.nextCallback=null,r}e.getDerivedStateFromProps=function(i,r){var a=i.in;return a&&r.status===Ib?{status:pf}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(i){var r=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Df&&a!==e5&&(r=Df):(a===Df||a===e5)&&(r=PZ)}this.updateStatus(!1,r)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var i=this.props.timeout,r,a,o;return r=a=o=i,i!=null&&typeof i!="number"&&(r=i.exit,a=i.enter,o=i.appear!==void 0?i.appear:a),{exit:r,enter:a,appear:o}},t.updateStatus=function(i,r){i===void 0&&(i=!1),r!==null?(this.cancelNextCallback(),r===Df?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===pf&&this.setState({status:Ib})},t.performEnter=function(i){var r=this,a=this.props.enter,o=this.context?this.context.isMounting:i,s=this.props.nodeRef?[o]:[zx.findDOMNode(this),o],l=s[0],c=s[1],d=this.getTimeouts(),h=o?d.appear:d.enter;if(!i&&!a||Jge.disabled){this.safeSetState({status:e5},function(){r.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:Df},function(){r.props.onEntering(l,c),r.onTransitionEnd(h,function(){r.safeSetState({status:e5},function(){r.props.onEntered(l,c)})})})},t.performExit=function(){var i=this,r=this.props.exit,a=this.getTimeouts(),o=this.props.nodeRef?void 0:zx.findDOMNode(this);if(!r||Jge.disabled){this.safeSetState({status:pf},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:PZ},function(){i.props.onExiting(o),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:pf},function(){i.props.onExited(o)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(i,r){r=this.setNextCallback(r),this.setState(i,r)},t.setNextCallback=function(i){var r=this,a=!0;return this.nextCallback=function(o){a&&(a=!1,r.nextCallback=null,i(o))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(i,r){this.setNextCallback(r);var a=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}i!=null&&setTimeout(this.nextCallback,i)},t.render=function(){var i=this.state.status;if(i===Ib)return null;var r=this.props,a=r.children;r.in,r.mountOnEnter,r.unmountOnExit,r.appear,r.enter,r.exit,r.timeout,r.addEndListener,r.onEnter,r.onEntering,r.onEntered,r.onExit,r.onExiting,r.onExited,r.nodeRef;var o=Mwe(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return M.createElement(sT.Provider,{value:null},typeof a=="function"?a(i,o):M.cloneElement(M.Children.only(a),o))},e}(M.Component);N4.contextType=sT;N4.propTypes={};function PD(){}N4.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:PD,onEntering:PD,onEntered:PD,onExit:PD,onExiting:PD,onExited:PD};N4.UNMOUNTED=Ib;N4.EXITED=pf;N4.ENTERING=Df;N4.ENTERED=e5;N4.EXITING=PZ;const zVt=N4;function MVt(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function _ne(u,e){var t=function(r){return e&&C.isValidElement(r)?e(r):r},n=Object.create(null);return u&&C.Children.map(u,function(i){return i}).forEach(function(i){n[i.key]=t(i)}),n}function TVt(u,e){u=u||{},e=e||{};function t(c){return c in e?e[c]:u[c]}var n=Object.create(null),i=[];for(var r in u)r in e?i.length&&(n[r]=i,i=[]):i.push(r);var a,o={};for(var s in e){if(n[s])for(a=0;ae in u?UVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Qge=(u,e)=>{for(var t in e||(e={}))qVt.call(e,t)&&Yge(u,t,e[t]);if(Zge)for(var t of Zge(e))JVt.call(e,t)&&Yge(u,t,e[t]);return u};const Xge={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},ZVt={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function YVt({state:u,maxHeight:e,positioning:t,transitionDuration:n}){const[i,r]=t,a=r==="center"?`${i}-center`:r,o={opacity:0,maxHeight:e,transform:Xge[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},s={opacity:1,transform:ZVt[a]},l={opacity:0,maxHeight:0,transform:Xge[a]},c={entering:s,entered:s,exiting:l,exited:l};return Qge(Qge({},o),c[u])}function QVt(u,e){return typeof e=="number"?e:e===!1||u===!1?!1:u}var XVt=Object.defineProperty,e$t=Object.defineProperties,t$t=Object.getOwnPropertyDescriptors,lT=Object.getOwnPropertySymbols,sMe=Object.prototype.hasOwnProperty,lMe=Object.prototype.propertyIsEnumerable,efe=(u,e,t)=>e in u?XVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tfe=(u,e)=>{for(var t in e||(e={}))sMe.call(e,t)&&efe(u,t,e[t]);if(lT)for(var t of lT(e))lMe.call(e,t)&&efe(u,t,e[t]);return u},u$t=(u,e)=>e$t(u,t$t(e)),ufe=(u,e)=>{var t={};for(var n in u)sMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&lT)for(var n of lT(u))e.indexOf(n)<0&&lMe.call(u,n)&&(t[n]=u[n]);return t};function cMe(u){var e=u,{notification:t,autoClose:n,onHide:i,innerRef:r}=e,a=ufe(e,["notification","autoClose","onHide","innerRef"]);const o=t,{autoClose:s,message:l}=o,c=ufe(o,["autoClose","message"]),d=QVt(n,s),h=C.useRef(),E=()=>{i(t.id),window.clearTimeout(h.current)},m=()=>{clearTimeout(h.current)},g=()=>{typeof d=="number"&&(h.current=window.setTimeout(E,d))};return C.useEffect(()=>{typeof t.onOpen=="function"&&t.onOpen(t)},[]),C.useEffect(()=>(g(),m),[n,t.autoClose]),M.createElement(CLe,u$t(tfe(tfe({},c),a),{onClose:E,onMouseEnter:m,onMouseLeave:g,ref:r}),l)}cMe.displayName="@mantine/notifications/NotificationContainer";var n$t=at((u,{zIndex:e})=>({notifications:{width:`calc(100% - ${u.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:e},notification:{"&:not(:first-of-type)":{marginTop:u.spacing.sm}}}));const i$t=n$t;var r$t=Object.defineProperty,a$t=Object.defineProperties,o$t=Object.getOwnPropertyDescriptors,nfe=Object.getOwnPropertySymbols,s$t=Object.prototype.hasOwnProperty,l$t=Object.prototype.propertyIsEnumerable,ife=(u,e,t)=>e in u?r$t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,c$t=(u,e)=>{for(var t in e||(e={}))s$t.call(e,t)&&ife(u,t,e[t]);if(nfe)for(var t of nfe(e))l$t.call(e,t)&&ife(u,t,e[t]);return u},d$t=(u,e)=>a$t(u,o$t(e));function h$t({limit:u}){const{state:e,queue:t,update:n,cleanQueue:i}=Xkt({initialValues:[],limit:u});return{notifications:e,queue:t,showNotification:l=>{const c=l.id||i4();return n(d=>l.id&&d.some(h=>h.id===l.id)?d:[...d,d$t(c$t({},l),{id:c})]),c},updateNotification:l=>n(c=>{const d=c.findIndex(E=>E.id===l.id);if(d===-1)return c;const h=[...c];return h[d]=l,h}),hideNotification:l=>n(c=>c.filter(d=>d.id===l?(typeof d.onClose=="function"&&d.onClose(d),!1):!0)),cleanQueue:i,clean:()=>n(()=>[])}}var E$t=Object.defineProperty,cT=Object.getOwnPropertySymbols,dMe=Object.prototype.hasOwnProperty,hMe=Object.prototype.propertyIsEnumerable,rfe=(u,e,t)=>e in u?E$t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,e$=(u,e)=>{for(var t in e||(e={}))dMe.call(e,t)&&rfe(u,t,e[t]);if(cT)for(var t of cT(e))hMe.call(e,t)&&rfe(u,t,e[t]);return u},m$t=(u,e)=>{var t={};for(var n in u)dMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cT)for(var n of cT(u))e.indexOf(n)<0&&hMe.call(u,n)&&(t[n]=u[n]);return t};const g$t=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],Yp=u=>{var e=u,{className:t,position:n="bottom-right",autoClose:i=4e3,transitionDuration:r=250,containerWidth:a=G(440),notificationMaxHeight:o=G(200),limit:s=5,zIndex:l=fd("overlay"),style:c,children:d,target:h}=e,E=m$t(e,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const m=qkt(),g=C.useRef({}),f=C.useRef(0),{notifications:p,showNotification:D,updateNotification:x,hideNotification:b,clean:k,cleanQueue:A}=h$t({limit:s}),{classes:F,cx:S,theme:w}=i$t({zIndex:l}),z=QA(),O=(w.respectReducedMotion?z:!1)?1:r,y=(g$t.includes(n)?n:"bottom-right").split("-");To(()=>{p.length>f.current&&setTimeout(()=>m(),0),f.current=p.length},[p]),jVt({show:D,hide:b,update:x,clean:k,cleanQueue:A});const _=p.map(L=>M.createElement(zVt,{key:L.id,timeout:O,onEnter:()=>g.current[L.id].offsetHeight,nodeRef:{current:g.current[L.id]}},T=>M.createElement(cMe,{innerRef:R=>{g.current[L.id]=R},notification:L,onHide:b,className:F.notification,autoClose:i,sx:[e$({},YVt({state:T,positioning:y,transitionDuration:O,maxHeight:o})),...Array.isArray(L.sx)?L.sx:[L.sx]]})));return M.createElement(Zue,{target:h},M.createElement(Ct,e$({className:S(F.notifications,t),style:c,sx:e$({maxWidth:a},GVt(y,w.spacing.md))},E),M.createElement(OVt,null,_)))};Yp.displayName="@mantine/notifications/Notifications";Yp.show=c1.show;Yp.hide=c1.hide;Yp.update=c1.update;Yp.clean=c1.clean;Yp.cleanQueue=c1.cleanQueue;let Uo=[],Bne=(u,e)=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},l:e||0,lc:0,listen(i,r){return n.lc=t.push(i,r||n.l)/2,()=>{let a=t.indexOf(i);~a&&(t.splice(a,2),--n.lc||n.off())}},notify(i){let r=!Uo.length;for(let a=0;a(u.events=u.events||{},u.events[t+tS]||(u.events[t+tS]=n(i=>{u.events[t].reduceRight((r,a)=>(a(r),r),{shared:{},...i})})),u.events[t]=u.events[t]||[],u.events[t].push(e),()=>{let i=u.events[t],r=i.indexOf(e);i.splice(r,1),i.length||(delete u.events[t],u.events[t+tS](),delete u.events[t+tS])}),D$t=1e3,EMe=(u,e)=>p$t(u,n=>{let i=e(n);i&&u.events[eS].push(i)},f$t,n=>{let i=u.listen;u.listen=(...a)=>(!u.lc&&!u.active&&(u.active=!0,n()),i(...a));let r=u.off;return u.events[eS]=[],u.off=()=>{r(),setTimeout(()=>{if(u.active&&!u.lc){u.active=!1;for(let a of u.events[eS])a();u.events[eS]=[]}},D$t)},()=>{u.listen=i,u.off=r}});function x$t(u,e,t){let n=new Set([...e,void 0]);return u.listen((i,r)=>{n.has(r)&&t(i,r)})}let mMe=(u={})=>{let e=Bne(u);return e.setKey=function(t,n){typeof n>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==n&&(e.value={...e.value,[t]:n},e.notify(t))},e};function H0(u,e={}){let t=C.useCallback(i=>e.keys?x$t(u,e.keys,i):u.listen(i),[e.keys,u]),n=u.get.bind(u);return C.useSyncExternalStore(t,n,n)}class P6{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ty=typeof window>"u"||"Deno"in window;function rl(){}function v$t(u,e){return typeof u=="function"?u(e):u}function RZ(u){return typeof u=="number"&&u>=0&&u!==1/0}function gMe(u,e){return Math.max(u+(e||0)-Date.now(),0)}function Ob(u,e,t){return l7(u)?typeof e=="function"?{...t,queryKey:u,queryFn:e}:{...e,queryKey:u}:u}function C$t(u,e,t){return l7(u)?typeof e=="function"?{...t,mutationKey:u,mutationFn:e}:{...e,mutationKey:u}:typeof u=="function"?{...e,mutationFn:u}:{...u}}function mE(u,e,t){return l7(u)?[{...e,queryKey:u},t]:[u||{},e]}function afe(u,e){const{type:t="all",exact:n,fetchStatus:i,predicate:r,queryKey:a,stale:o}=u;if(l7(a)){if(n){if(e.queryHash!==wne(a,e.options))return!1}else if(!dT(e.queryKey,a))return!1}if(t!=="all"){const s=e.isActive();if(t==="active"&&!s||t==="inactive"&&s)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||typeof i<"u"&&i!==e.state.fetchStatus||r&&!r(e))}function ofe(u,e){const{exact:t,fetching:n,predicate:i,mutationKey:r}=u;if(l7(r)){if(!e.options.mutationKey)return!1;if(t){if(Yf(e.options.mutationKey)!==Yf(r))return!1}else if(!dT(e.options.mutationKey,r))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function wne(u,e){return((e==null?void 0:e.queryKeyHashFn)||Yf)(u)}function Yf(u){return JSON.stringify(u,(e,t)=>IZ(t)?Object.keys(t).sort().reduce((n,i)=>(n[i]=t[i],n),{}):t)}function dT(u,e){return fMe(u,e)}function fMe(u,e){return u===e?!0:typeof u!=typeof e?!1:u&&e&&typeof u=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!fMe(u[t],e[t])):!1}function pMe(u,e){if(u===e)return u;const t=sfe(u)&&sfe(e);if(t||IZ(u)&&IZ(e)){const n=t?u.length:Object.keys(u).length,i=t?e:Object.keys(e),r=i.length,a=t?[]:{};let o=0;for(let s=0;s"u")return!0;const t=e.prototype;return!(!lfe(t)||!t.hasOwnProperty("isPrototypeOf"))}function lfe(u){return Object.prototype.toString.call(u)==="[object Object]"}function l7(u){return Array.isArray(u)}function DMe(u){return new Promise(e=>{setTimeout(e,u)})}function cfe(u){DMe(0).then(u)}function b$t(){if(typeof AbortController=="function")return new AbortController}function OZ(u,e,t){return t.isDataEqual!=null&&t.isDataEqual(u,e)?u:typeof t.structuralSharing=="function"?t.structuralSharing(u,e):t.structuralSharing!==!1?pMe(u,e):e}class k$t extends P6{constructor(){super(),this.setup=e=>{if(!ty&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ET=new k$t,dfe=["online","offline"];class F$t extends P6{constructor(){super(),this.setup=e=>{if(!ty&&window.addEventListener){const t=()=>e();return dfe.forEach(n=>{window.addEventListener(n,t,!1)}),()=>{dfe.forEach(n=>{window.removeEventListener(n,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const mT=new F$t;function y$t(u){return Math.min(1e3*2**u,3e4)}function VI(u){return(u??"online")==="online"?mT.isOnline():!0}class xMe{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function $8(u){return u instanceof xMe}function vMe(u){let e=!1,t=0,n=!1,i,r,a;const o=new Promise((f,p)=>{r=f,a=p}),s=f=>{n||(E(new xMe(f)),u.abort==null||u.abort())},l=()=>{e=!0},c=()=>{e=!1},d=()=>!ET.isFocused()||u.networkMode!=="always"&&!mT.isOnline(),h=f=>{n||(n=!0,u.onSuccess==null||u.onSuccess(f),i==null||i(),r(f))},E=f=>{n||(n=!0,u.onError==null||u.onError(f),i==null||i(),a(f))},m=()=>new Promise(f=>{i=p=>{const D=n||!d();return D&&f(p),D},u.onPause==null||u.onPause()}).then(()=>{i=void 0,n||u.onContinue==null||u.onContinue()}),g=()=>{if(n)return;let f;try{f=u.fn()}catch(p){f=Promise.reject(p)}Promise.resolve(f).then(h).catch(p=>{var D,x;if(n)return;const b=(D=u.retry)!=null?D:3,k=(x=u.retryDelay)!=null?x:y$t,A=typeof k=="function"?k(t,p):k,F=b===!0||typeof b=="number"&&t{if(d())return m()}).then(()=>{e?E(p):g()})})};return VI(u.networkMode)?g():m().then(g),{promise:o,cancel:s,continue:()=>(i==null?void 0:i())?o:Promise.resolve(),cancelRetry:l,continueRetry:c}}const Lne=console;function A$t(){let u=[],e=0,t=c=>{c()},n=c=>{c()};const i=c=>{let d;e++;try{d=c()}finally{e--,e||o()}return d},r=c=>{e?u.push(c):cfe(()=>{t(c)})},a=c=>(...d)=>{r(()=>{c(...d)})},o=()=>{const c=u;u=[],c.length&&cfe(()=>{n(()=>{c.forEach(d=>{t(d)})})})};return{batch:i,batchCalls:a,schedule:r,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{n=c}}}const gr=A$t();class CMe{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),RZ(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(ty?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class _$t extends CMe{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||Lne,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||S$t(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,t){const n=OZ(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return(t=this.retryer)==null||t.cancel(e),n?n.then(rl).catch(rl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!gMe(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var r;return(r=this.retryer)==null||r.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(m=>m.options.queryFn);E&&this.setOptions(E.options)}Array.isArray(this.options.queryKey);const a=b$t(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},s=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};s(o);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(s(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const h=E=>{if($8(E)&&E.silent||this.dispatch({type:"error",error:E}),!$8(E)){var m,g,f,p;(m=(g=this.cache.config).onError)==null||m.call(g,E,this),(f=(p=this.cache.config).onSettled)==null||f.call(p,this.state.data,E,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=vMe({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:E=>{var m,g,f,p;if(typeof E>"u"){h(new Error(this.queryHash+" data is undefined"));return}this.setData(E),(m=(g=this.cache.config).onSuccess)==null||m.call(g,E,this),(f=(p=this.cache.config).onSettled)==null||f.call(p,E,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(E,m)=>{this.dispatch({type:"failed",failureCount:E,error:m})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const t=n=>{var i,r;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:VI(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(r=e.dataUpdatedAt)!=null?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return $8(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function S$t(u){const e=typeof u.initialData=="function"?u.initialData():u.initialData,t=typeof e<"u",n=t?typeof u.initialDataUpdatedAt=="function"?u.initialDataUpdatedAt():u.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"loading",fetchStatus:"idle"}}class B$t extends P6{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var i;const r=t.queryKey,a=(i=t.queryHash)!=null?i:wne(r,t);let o=this.get(a);return o||(o=new _$t({cache:this,logger:e.getLogger(),queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){gr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=mE(e,t);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>afe(n,i))}findAll(e,t){const[n]=mE(e,t);return Object.keys(n).length>0?this.queries.filter(i=>afe(n,i)):this.queries}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){gr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){gr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class w$t extends CMe{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||Lne,this.observers=[],this.state=e.state||bMe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return(e=(t=this.retryer)==null?void 0:t.continue())!=null?e:this.execute()}async execute(){const e=()=>{var F;return this.retryer=vMe({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,w)=>{this.dispatch({type:"failed",failureCount:S,error:w})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(F=this.options.retry)!=null?F:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t=this.state.status==="loading";try{var n,i,r,a,o,s,l,c;if(!t){var d,h,E,m;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(h=this.mutationCache.config).onMutate)==null?void 0:d.call(h,this.state.variables,this));const S=await((E=(m=this.options).onMutate)==null?void 0:E.call(m,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const F=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,F,this.state.variables,this.state.context,this)),await((r=(a=this.options).onSuccess)==null?void 0:r.call(a,F,this.state.variables,this.state.context)),await((o=(s=this.mutationCache.config).onSettled)==null?void 0:o.call(s,F,null,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,F,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:F}),F}catch(F){try{var g,f,p,D,x,b,k,A;throw await((g=(f=this.mutationCache.config).onError)==null?void 0:g.call(f,F,this.state.variables,this.state.context,this)),await((p=(D=this.options).onError)==null?void 0:p.call(D,F,this.state.variables,this.state.context)),await((x=(b=this.mutationCache.config).onSettled)==null?void 0:x.call(b,void 0,F,this.state.variables,this.state.context,this)),await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,F,this.state.variables,this.state.context)),F}finally{this.dispatch({type:"error",error:F})}}}dispatch(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!VI(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=t(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function bMe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class L$t extends P6{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const i=new w$t({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){gr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(t=>ofe(e,t))}findAll(e){return this.mutations.filter(t=>ofe(e,t))}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const t=this.mutations.filter(n=>n.state.isPaused);return gr.batch(()=>t.reduce((n,i)=>n.then(()=>i.continue().catch(rl)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function z$t(){return{onFetch:u=>{u.fetchFn=()=>{var e,t,n,i,r,a;const o=(e=u.fetchOptions)==null||(t=e.meta)==null?void 0:t.refetchPage,s=(n=u.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,l=s==null?void 0:s.pageParam,c=(s==null?void 0:s.direction)==="forward",d=(s==null?void 0:s.direction)==="backward",h=((r=u.state.data)==null?void 0:r.pages)||[],E=((a=u.state.data)==null?void 0:a.pageParams)||[];let m=E,g=!1;const f=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>{var F;if((F=u.signal)!=null&&F.aborted)g=!0;else{var S;(S=u.signal)==null||S.addEventListener("abort",()=>{g=!0})}return u.signal}})},p=u.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+u.options.queryHash+"'")),D=(A,F,S,w)=>(m=w?[F,...m]:[...m,F],w?[S,...A]:[...A,S]),x=(A,F,S,w)=>{if(g)return Promise.reject("Cancelled");if(typeof S>"u"&&!F&&A.length)return Promise.resolve(A);const z={queryKey:u.queryKey,pageParam:S,meta:u.options.meta};f(z);const N=p(z);return Promise.resolve(N).then(y=>D(A,S,y,w))};let b;if(!h.length)b=x([]);else if(c){const A=typeof l<"u",F=A?l:hfe(u.options,h);b=x(h,A,F)}else if(d){const A=typeof l<"u",F=A?l:M$t(u.options,h);b=x(h,A,F,!0)}else{m=[];const A=typeof u.options.getNextPageParam>"u";b=(o&&h[0]?o(h[0],0,h):!0)?x([],A,E[0]):Promise.resolve(D([],E[0],h[0]));for(let S=1;S{if(o&&h[S]?o(h[S],S,h):!0){const N=A?E[S]:hfe(u.options,w);return x(w,A,N)}return Promise.resolve(D(w,E[S],h[S]))})}return b.then(A=>({pages:A,pageParams:m}))}}}}function hfe(u,e){return u.getNextPageParam==null?void 0:u.getNextPageParam(e[e.length-1],e)}function M$t(u,e){return u.getPreviousPageParam==null?void 0:u.getPreviousPageParam(e[0],e)}class T$t{constructor(e={}){this.queryCache=e.queryCache||new B$t,this.mutationCache=e.mutationCache||new L$t,this.logger=e.logger||Lne,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ET.subscribe(()=>{ET.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=mT.subscribe(()=>{mT.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(t=this.unsubscribeOnline)==null||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=mE(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state.data}ensureQueryData(e,t,n){const i=Ob(e,t,n),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.queryCache.find(e),r=i==null?void 0:i.state.data,a=v$t(t,r);if(typeof a>"u")return;const o=Ob(e),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return gr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state}removeQueries(e,t){const[n]=mE(e,t),i=this.queryCache;gr.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(e,t,n){const[i,r]=mE(e,t,n),a=this.queryCache,o={type:"active",...i};return gr.batch(()=>(a.findAll(i).forEach(s=>{s.reset()}),this.refetchQueries(o,r)))}cancelQueries(e,t,n){const[i,r={}]=mE(e,t,n);typeof r.revert>"u"&&(r.revert=!0);const a=gr.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(r)));return Promise.all(a).then(rl).catch(rl)}invalidateQueries(e,t,n){const[i,r]=mE(e,t,n);return gr.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const s={...i,type:(a=(o=i.refetchType)!=null?o:i.type)!=null?a:"active"};return this.refetchQueries(s,r)})}refetchQueries(e,t,n){const[i,r]=mE(e,t,n),a=gr.batch(()=>this.queryCache.findAll(i).filter(s=>!s.isDisabled()).map(s=>{var l;return s.fetch(void 0,{...r,cancelRefetch:(l=r==null?void 0:r.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(rl);return r!=null&&r.throwOnError||(o=o.catch(rl)),o}fetchQuery(e,t,n){const i=Ob(e,t,n),r=this.defaultQueryOptions(i);typeof r.retry>"u"&&(r.retry=!1);const a=this.queryCache.build(this,r);return a.isStaleByTime(r.staleTime)?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(rl).catch(rl)}fetchInfiniteQuery(e,t,n){const i=Ob(e,t,n);return i.behavior=z$t(),this.fetchQuery(i)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(rl).catch(rl)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(i=>Yf(e)===Yf(i.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(n=>dT(e,n.queryKey));return t==null?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(i=>Yf(e)===Yf(i.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(n=>dT(e,n.mutationKey));return t==null?void 0:t.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=wne(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.useErrorBoundary>"u"&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class N$t extends P6{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Efe(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jZ(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jZ(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),hT(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const r=this.hasListeners();r&&mfe(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(t),r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return R$t(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(rl)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),ty||this.currentResult.isStale||!RZ(this.options.staleTime))return;const t=gMe(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(ty||this.options.enabled===!1||!RZ(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ET.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,i=this.options,r=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,s=e!==n,l=s?e.state:this.currentQueryInitialState,c=s?this.currentResult:this.previousQueryResult,{state:d}=e;let{dataUpdatedAt:h,error:E,errorUpdatedAt:m,fetchStatus:g,status:f}=d,p=!1,D=!1,x;if(t._optimisticResults){const S=this.hasListeners(),w=!S&&Efe(e,t),z=S&&mfe(e,n,t,i);(w||z)&&(g=VI(e.options.networkMode)?"fetching":"paused",h||(f="loading")),t._optimisticResults==="isRestoring"&&(g="idle")}if(t.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&f!=="error")x=c.data,h=c.dataUpdatedAt,f=c.status,p=!0;else if(t.select&&typeof d.data<"u")if(r&&d.data===(a==null?void 0:a.data)&&t.select===this.selectFn)x=this.selectResult;else try{this.selectFn=t.select,x=t.select(d.data),x=OZ(r==null?void 0:r.data,x,t),this.selectResult=x,this.selectError=null}catch(S){this.selectError=S}else x=d.data;if(typeof t.placeholderData<"u"&&typeof x>"u"&&f==="loading"){let S;if(r!=null&&r.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData))S=r.data;else if(S=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof S<"u")try{S=t.select(S),this.selectError=null}catch(w){this.selectError=w}typeof S<"u"&&(f="success",x=OZ(r==null?void 0:r.data,S,t),D=!0)}this.selectError&&(E=this.selectError,x=this.selectResult,m=Date.now(),f="error");const b=g==="fetching",k=f==="loading",A=f==="error";return{status:f,fetchStatus:g,isLoading:k,isSuccess:f==="success",isError:A,isInitialLoading:k&&b,data:x,dataUpdatedAt:h,error:E,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!k,isLoadingError:A&&d.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:D,isPreviousData:p,isRefetchError:A&&d.dataUpdatedAt!==0,isStale:zne(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,hT(n,t))return;this.currentResult=n;const i={cache:!0},r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.trackedProps.size)return!0;const s=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&s.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==t[c]&&s.has(c)})};(e==null?void 0:e.listeners)!==!1&&r()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!$8(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){gr.batch(()=>{if(e.onSuccess){var t,n,i,r;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(i=(r=this.options).onSettled)==null||i.call(r,this.currentResult.data,null)}else if(e.onError){var a,o,s,l;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(s=(l=this.options).onSettled)==null||s.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function P$t(u,e){return e.enabled!==!1&&!u.state.dataUpdatedAt&&!(u.state.status==="error"&&e.retryOnMount===!1)}function Efe(u,e){return P$t(u,e)||u.state.dataUpdatedAt>0&&jZ(u,e,e.refetchOnMount)}function jZ(u,e,t){if(e.enabled!==!1){const n=typeof t=="function"?t(u):t;return n==="always"||n!==!1&&zne(u,e)}return!1}function mfe(u,e,t,n){return t.enabled!==!1&&(u!==e||n.enabled===!1)&&(!t.suspense||u.state.status!=="error")&&zne(u,t)}function zne(u,e){return u.isStaleByTime(e.staleTime)}function R$t(u,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!hT(u.getCurrentResult(),e)}let I$t=class extends P6{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),hT(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:bMe(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){gr.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,n,i,r;(t=(n=this.mutateOptions).onSuccess)==null||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(r=this.mutateOptions).onSettled)==null||i.call(r,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,o,s,l;(a=(o=this.mutateOptions).onError)==null||a.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(s=(l=this.mutateOptions).onSettled)==null||s.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)})})}};var kMe={exports:{}},FMe={};/** + */var Oa=typeof Symbol=="function"&&Symbol.for,Kue=Oa?Symbol.for("react.element"):60103,Wue=Oa?Symbol.for("react.portal"):60106,pI=Oa?Symbol.for("react.fragment"):60107,DI=Oa?Symbol.for("react.strict_mode"):60108,xI=Oa?Symbol.for("react.profiler"):60114,vI=Oa?Symbol.for("react.provider"):60109,CI=Oa?Symbol.for("react.context"):60110,Gue=Oa?Symbol.for("react.async_mode"):60111,bI=Oa?Symbol.for("react.concurrent_mode"):60111,kI=Oa?Symbol.for("react.forward_ref"):60112,FI=Oa?Symbol.for("react.suspense"):60113,k2t=Oa?Symbol.for("react.suspense_list"):60120,yI=Oa?Symbol.for("react.memo"):60115,AI=Oa?Symbol.for("react.lazy"):60116,F2t=Oa?Symbol.for("react.block"):60121,y2t=Oa?Symbol.for("react.fundamental"):60117,A2t=Oa?Symbol.for("react.responder"):60118,_2t=Oa?Symbol.for("react.scope"):60119;function X0(u){if(typeof u=="object"&&u!==null){var e=u.$$typeof;switch(e){case Kue:switch(u=u.type,u){case Gue:case bI:case pI:case xI:case DI:case FI:return u;default:switch(u=u&&u.$$typeof,u){case CI:case kI:case AI:case yI:case vI:return u;default:return e}}case Wue:return e}}}function K9e(u){return X0(u)===bI}ii.AsyncMode=Gue;ii.ConcurrentMode=bI;ii.ContextConsumer=CI;ii.ContextProvider=vI;ii.Element=Kue;ii.ForwardRef=kI;ii.Fragment=pI;ii.Lazy=AI;ii.Memo=yI;ii.Portal=Wue;ii.Profiler=xI;ii.StrictMode=DI;ii.Suspense=FI;ii.isAsyncMode=function(u){return K9e(u)||X0(u)===Gue};ii.isConcurrentMode=K9e;ii.isContextConsumer=function(u){return X0(u)===CI};ii.isContextProvider=function(u){return X0(u)===vI};ii.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===Kue};ii.isForwardRef=function(u){return X0(u)===kI};ii.isFragment=function(u){return X0(u)===pI};ii.isLazy=function(u){return X0(u)===AI};ii.isMemo=function(u){return X0(u)===yI};ii.isPortal=function(u){return X0(u)===Wue};ii.isProfiler=function(u){return X0(u)===xI};ii.isStrictMode=function(u){return X0(u)===DI};ii.isSuspense=function(u){return X0(u)===FI};ii.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===pI||u===bI||u===xI||u===DI||u===FI||u===k2t||typeof u=="object"&&u!==null&&(u.$$typeof===AI||u.$$typeof===yI||u.$$typeof===vI||u.$$typeof===CI||u.$$typeof===kI||u.$$typeof===y2t||u.$$typeof===A2t||u.$$typeof===_2t||u.$$typeof===F2t)};ii.typeOf=X0;$9e.exports=ii;var S2t=$9e.exports,W9e=S2t,B2t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w2t={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},G9e={};G9e[W9e.ForwardRef]=B2t;G9e[W9e.Memo]=w2t;var L2t=!0;function z2t(u,e,t){var n="";return t.split(" ").forEach(function(i){u[i]!==void 0?e.push(u[i]+";"):n+=i+" "}),n}var M2t=function(e,t,n){var i=e.key+"-"+t.name;(n===!1||L2t===!1)&&e.registered[i]===void 0&&(e.registered[i]=t.styles)},U9e=function(e,t,n){M2t(e,t,n);var i=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var r=t;do e.insert(t===r?"."+i:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}};function T2t(u){for(var e=0,t,n=0,i=u.length;i>=4;++n,i-=4)t=u.charCodeAt(n)&255|(u.charCodeAt(++n)&255)<<8|(u.charCodeAt(++n)&255)<<16|(u.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(u.charCodeAt(n+2)&255)<<16;case 2:e^=(u.charCodeAt(n+1)&255)<<8;case 1:e^=u.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var N2t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},P2t=/[A-Z]|^ms/g,R2t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q9e=function(e){return e.charCodeAt(1)===45},f1e=function(e){return e!=null&&typeof e!="boolean"},_V=g2t(function(u){return q9e(u)?u:u.replace(P2t,"-$&").toLowerCase()}),p1e=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(R2t,function(n,i,r){return Hd={name:i,styles:r,next:Hd},i})}return N2t[e]!==1&&!q9e(e)&&typeof t=="number"&&t!==0?t+"px":t};function YF(u,e,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Hd={name:t.name,styles:t.styles,next:Hd},t.name;if(t.styles!==void 0){var n=t.next;if(n!==void 0)for(;n!==void 0;)Hd={name:n.name,styles:n.styles,next:Hd},n=n.next;var i=t.styles+";";return i}return I2t(u,e,t)}case"function":{if(u!==void 0){var r=Hd,a=t(u);return Hd=r,YF(u,e,a)}break}}if(e==null)return t;var o=e[t];return o!==void 0?o:t}function I2t(u,e,t){var n="";if(Array.isArray(t))for(var i=0;ie in u?W2t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Z2t=(u,e)=>{for(var t in e||(e={}))q2t.call(e,t)&&C1e(u,t,e[t]);if(v1e)for(var t of v1e(e))J2t.call(e,t)&&C1e(u,t,e[t]);return u},Y2t=(u,e)=>G2t(u,U2t(e));function Q2t({theme:u}){return M.createElement(ZA,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:u.colorScheme==="dark"?"dark":"light"},body:Y2t(Z2t({},u.fn.fontStyles()),{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,lineHeight:u.lineHeight,fontSize:u.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function $C(u,e,t,n=G){Object.keys(e).forEach(i=>{u[`--mantine-${t}-${i}`]=n(e[i])})}function X2t({theme:u}){const e={"--mantine-color-white":u.white,"--mantine-color-black":u.black,"--mantine-transition-timing-function":u.transitionTimingFunction,"--mantine-line-height":`${u.lineHeight}`,"--mantine-font-family":u.fontFamily,"--mantine-font-family-monospace":u.fontFamilyMonospace,"--mantine-font-family-headings":u.headings.fontFamily,"--mantine-heading-font-weight":`${u.headings.fontWeight}`};$C(e,u.shadows,"shadow"),$C(e,u.fontSizes,"font-size"),$C(e,u.radius,"radius"),$C(e,u.spacing,"spacing"),$C(e,u.breakpoints,"breakpoints",wl),Object.keys(u.colors).forEach(n=>{u.colors[n].forEach((i,r)=>{e[`--mantine-color-${n}-${r}`]=i})});const t=u.headings.sizes;return Object.keys(t).forEach(n=>{e[`--mantine-${n}-font-size`]=t[n].fontSize,e[`--mantine-${n}-line-height`]=`${t[n].lineHeight}`}),M.createElement(ZA,{styles:{":root":e}})}var ekt=Object.defineProperty,tkt=Object.defineProperties,ukt=Object.getOwnPropertyDescriptors,b1e=Object.getOwnPropertySymbols,nkt=Object.prototype.hasOwnProperty,ikt=Object.prototype.propertyIsEnumerable,k1e=(u,e,t)=>e in u?ekt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ad=(u,e)=>{for(var t in e||(e={}))nkt.call(e,t)&&k1e(u,t,e[t]);if(b1e)for(var t of b1e(e))ikt.call(e,t)&&k1e(u,t,e[t]);return u},SV=(u,e)=>tkt(u,ukt(e));function rkt(u,e){var t;if(!e)return u;const n=Object.keys(u).reduce((i,r)=>{if(r==="headings"&&e.headings){const a=e.headings.sizes?Object.keys(u.headings.sizes).reduce((o,s)=>(o[s]=Ad(Ad({},u.headings.sizes[s]),e.headings.sizes[s]),o),{}):u.headings.sizes;return SV(Ad({},i),{headings:SV(Ad(Ad({},u.headings),e.headings),{sizes:a})})}if(r==="breakpoints"&&e.breakpoints){const a=Ad(Ad({},u.breakpoints),e.breakpoints);return SV(Ad({},i),{breakpoints:Object.fromEntries(Object.entries(a).sort((o,s)=>e0(o[1])-e0(s[1])))})}return i[r]=typeof e[r]=="object"?Ad(Ad({},u[r]),e[r]):typeof e[r]=="number"||typeof e[r]=="boolean"||typeof e[r]=="function"?e[r]:e[r]||u[r],i},{});if(e!=null&&e.fontFamily&&!((t=e==null?void 0:e.headings)!=null&&t.fontFamily)&&(n.headings.fontFamily=e.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function akt(u,e){return N9e(rkt(u,e))}function Y9e(u){return Object.keys(u).reduce((e,t)=>(u[t]!==void 0&&(e[t]=u[t]),e),{})}const okt={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${G(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function skt(){return M.createElement(ZA,{styles:okt})}var lkt=Object.defineProperty,F1e=Object.getOwnPropertySymbols,ckt=Object.prototype.hasOwnProperty,dkt=Object.prototype.propertyIsEnumerable,y1e=(u,e,t)=>e in u?lkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,I2=(u,e)=>{for(var t in e||(e={}))ckt.call(e,t)&&y1e(u,t,e[t]);if(F1e)for(var t of F1e(e))dkt.call(e,t)&&y1e(u,t,e[t]);return u};const RL=C.createContext({theme:Oue});function jr(){var u;return((u=C.useContext(RL))==null?void 0:u.theme)||Oue}function hkt(u){const e=jr(),t=n=>{var i,r,a,o;return{styles:((i=e.components[n])==null?void 0:i.styles)||{},classNames:((r=e.components[n])==null?void 0:r.classNames)||{},variants:(a=e.components[n])==null?void 0:a.variants,sizes:(o=e.components[n])==null?void 0:o.sizes}};return Array.isArray(u)?u.map(t):[t(u)]}function Q9e(){var u;return(u=C.useContext(RL))==null?void 0:u.emotionCache}function Qe(u,e,t){var n;const i=jr(),r=(n=i.components[u])==null?void 0:n.defaultProps,a=typeof r=="function"?r(i):r;return I2(I2(I2({},e),a),Y9e(t))}function que({theme:u,emotionCache:e,withNormalizeCSS:t=!1,withGlobalStyles:n=!1,withCSSVariables:i=!1,inherit:r=!1,children:a}){const o=C.useContext(RL),s=akt(Oue,r?I2(I2({},o.theme),u):u);return M.createElement($2t,{theme:s},M.createElement(RL.Provider,{value:{theme:s,emotionCache:e}},t&&M.createElement(skt,null),n&&M.createElement(Q2t,{theme:s}),i&&M.createElement(X2t,{theme:s}),typeof s.globalStyles=="function"&&M.createElement(ZA,{styles:s.globalStyles(s)}),a))}que.displayName="@mantine/core/MantineProvider";const X9e=C.createContext(null);function Ekt(){const u=C.useContext(X9e);if(!u)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return u}function e_e({colorScheme:u,toggleColorScheme:e,children:t}){return M.createElement(X9e.Provider,{value:{colorScheme:u,toggleColorScheme:e}},t)}e_e.displayName="@mantine/core/ColorSchemeProvider";const mkt={app:100,modal:200,popover:300,overlay:400,max:9999};function fd(u){return mkt[u]}function t_e(u){return typeof u=="number"?u:typeof u=="string"?u.includes("px")?Number(u.replace("px","")):u.includes("rem")?Number(u.replace("rem",""))*16:Number(u):NaN}function gkt(u,e){const t=C.useRef();return(!t.current||e.length!==t.current.prevDeps.length||t.current.prevDeps.map((n,i)=>n===e[i]).indexOf(!1)>=0)&&(t.current={v:u(),prevDeps:[...e]}),t.current.v}const fkt=$ue({key:"mantine",prepend:!0});function pkt(){return Q9e()||fkt}var Dkt=Object.defineProperty,A1e=Object.getOwnPropertySymbols,xkt=Object.prototype.hasOwnProperty,vkt=Object.prototype.propertyIsEnumerable,_1e=(u,e,t)=>e in u?Dkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ckt=(u,e)=>{for(var t in e||(e={}))xkt.call(e,t)&&_1e(u,t,e[t]);if(A1e)for(var t of A1e(e))vkt.call(e,t)&&_1e(u,t,e[t]);return u};const BV="ref";function bkt(u){let e;if(u.length!==1)return{args:u,ref:e};const[t]=u;if(!(t instanceof Object))return{args:u,ref:e};if(!(BV in t))return{args:u,ref:e};e=t[BV];const n=Ckt({},t);return delete n[BV],{args:[n],ref:e}}const{cssFactory:kkt}=(()=>{function u(t,n,i){const r=[],a=z2t(t,r,i);return r.length<2?i:a+n(r)}function e(t){const{cache:n}=t,i=(...a)=>{const{ref:o,args:s}=bkt(a),l=Uue(s,n.registered);return U9e(n,l,!1),`${n.key}-${l.name}${o===void 0?"":` ${o}`}`};return{css:i,cx:(...a)=>u(n.registered,i,L9e(a))}}return{cssFactory:e}})();function u_e(){const u=pkt();return gkt(()=>kkt({cache:u}),[u])}function Fkt({cx:u,classes:e,context:t,classNames:n,name:i,cache:r}){const a=t.reduce((o,s)=>(Object.keys(s.classNames).forEach(l=>{typeof o[l]!="string"?o[l]=`${s.classNames[l]}`:o[l]=`${o[l]} ${s.classNames[l]}`}),o),{});return Object.keys(e).reduce((o,s)=>(o[s]=u(e[s],a[s],n!=null&&n[s],Array.isArray(i)?i.filter(Boolean).map(l=>`${(r==null?void 0:r.key)||"mantine"}-${l}-${s}`).join(" "):i?`${(r==null?void 0:r.key)||"mantine"}-${i}-${s}`:null),o),{})}var ykt=Object.defineProperty,S1e=Object.getOwnPropertySymbols,Akt=Object.prototype.hasOwnProperty,_kt=Object.prototype.propertyIsEnumerable,B1e=(u,e,t)=>e in u?ykt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,wV=(u,e)=>{for(var t in e||(e={}))Akt.call(e,t)&&B1e(u,t,e[t]);if(S1e)for(var t of S1e(e))_kt.call(e,t)&&B1e(u,t,e[t]);return u};function DZ(u,e){return e&&Object.keys(e).forEach(t=>{u[t]?u[t]=wV(wV({},u[t]),e[t]):u[t]=wV({},e[t])}),u}function w1e(u,e,t,n){const i=r=>typeof r=="function"?r(e,t||{},n):r||{};return Array.isArray(u)?u.map(r=>i(r.styles)).reduce((r,a)=>DZ(r,a),{}):i(u)}function Skt({ctx:u,theme:e,params:t,variant:n,size:i}){return u.reduce((r,a)=>(a.variants&&n in a.variants&&DZ(r,a.variants[n](e,t,{variant:n,size:i})),a.sizes&&i in a.sizes&&DZ(r,a.sizes[i](e,t,{variant:n,size:i})),r),{})}function at(u){const e=typeof u=="function"?u:()=>u;function t(n,i){const r=jr(),a=hkt(i==null?void 0:i.name),o=Q9e(),s={variant:i==null?void 0:i.variant,size:i==null?void 0:i.size},{css:l,cx:c}=u_e(),d=e(r,n,s),h=w1e(i==null?void 0:i.styles,r,n,s),E=w1e(a,r,n,s),m=Skt({ctx:a,theme:r,params:n,variant:i==null?void 0:i.variant,size:i==null?void 0:i.size}),g=Object.fromEntries(Object.keys(d).map(f=>{const p=c({[l(d[f])]:!(i!=null&&i.unstyled)},l(m[f]),l(E[f]),l(h[f]));return[f,p]}));return{classes:Fkt({cx:c,classes:g,context:a,classNames:i==null?void 0:i.classNames,name:i==null?void 0:i.name,cache:o}),cx:c,theme:r}}return t}function v1(u){return`___ref-${u||""}`}function Bkt({styles:u}){const e=jr();return M.createElement(ZA,{styles:Z9e(typeof u=="function"?u(e):u)})}var wkt=Object.defineProperty,Lkt=Object.defineProperties,zkt=Object.getOwnPropertyDescriptors,L1e=Object.getOwnPropertySymbols,Mkt=Object.prototype.hasOwnProperty,Tkt=Object.prototype.propertyIsEnumerable,z1e=(u,e,t)=>e in u?wkt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KC=(u,e)=>{for(var t in e||(e={}))Mkt.call(e,t)&&z1e(u,t,e[t]);if(L1e)for(var t of L1e(e))Tkt.call(e,t)&&z1e(u,t,e[t]);return u},WC=(u,e)=>Lkt(u,zkt(e));const GC={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${G(10)})`},transitionProperty:"transform, opacity"},A_={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${G(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${G(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:WC(KC({},GC),{common:{transformOrigin:"center center"}}),"pop-bottom-left":WC(KC({},GC),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":WC(KC({},GC),{common:{transformOrigin:"bottom right"}}),"pop-top-left":WC(KC({},GC),{common:{transformOrigin:"top left"}}),"pop-top-right":WC(KC({},GC),{common:{transformOrigin:"top right"}})},M1e=["mousedown","touchstart"];function Nkt(u,e,t){const n=C.useRef();return C.useEffect(()=>{const i=r=>{const{target:a}=r??{};if(Array.isArray(t)){const o=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";t.every(l=>!!l&&!r.composedPath().includes(l))&&!o&&u()}else n.current&&!n.current.contains(a)&&u()};return(e||M1e).forEach(r=>document.addEventListener(r,i)),()=>{(e||M1e).forEach(r=>document.removeEventListener(r,i))}},[n,u,t]),n}function Pkt({timeout:u=2e3}={}){const[e,t]=C.useState(null),[n,i]=C.useState(!1),[r,a]=C.useState(null),o=c=>{clearTimeout(r),a(setTimeout(()=>i(!1),u)),i(c)};return{copy:c=>{"clipboard"in navigator?navigator.clipboard.writeText(c).then(()=>o(!0)).catch(d=>t(d)):t(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),t(null),clearTimeout(r)},error:e,copied:n}}function Rkt(u,e){try{return u.addEventListener("change",e),()=>u.removeEventListener("change",e)}catch{return u.addListener(e),()=>u.removeListener(e)}}function Ikt(u,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(u).matches:!1}function YA(u,e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[n,i]=C.useState(t?e:Ikt(u,e)),r=C.useRef();return C.useEffect(()=>{if("matchMedia"in window)return r.current=window.matchMedia(u),i(r.current.matches),Rkt(r.current,a=>i(a.matches))},[u]),n}function Okt(u,e){return YA("(prefers-color-scheme: dark)",u==="dark",e)?"dark":"light"}function bm(u,e,t){return Math.min(Math.max(u,e),t)}const _I=typeof document<"u"?C.useLayoutEffect:C.useEffect;function To(u,e){const t=C.useRef(!1);C.useEffect(()=>()=>{t.current=!1},[]),C.useEffect(()=>{if(t.current)return u();t.current=!0},e)}function n_e({opened:u,shouldReturnFocus:e=!0}){const t=C.useRef(),n=()=>{var i;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((i=t.current)==null||i.focus({preventScroll:!0}))};return To(()=>{let i=-1;const r=a=>{a.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",r),u?t.current=document.activeElement:e&&(i=window.setTimeout(n,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",r)}},[u,e]),n}const jkt=/input|select|textarea|button|object/,i_e="a, input, select, textarea, button, object, [tabindex]";function Hkt(u){return u.style.display==="none"}function Vkt(u){if(u.getAttribute("aria-hidden")||u.getAttribute("hidden")||u.getAttribute("type")==="hidden")return!1;let t=u;for(;t&&!(t===document.body||t.nodeType===11);){if(Hkt(t))return!1;t=t.parentNode}return!0}function r_e(u){let e=u.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function xZ(u){const e=u.nodeName.toLowerCase(),t=!Number.isNaN(r_e(u));return(jkt.test(e)&&!u.disabled||u instanceof HTMLAnchorElement&&u.href||t)&&Vkt(u)}function a_e(u){const e=r_e(u);return(Number.isNaN(e)||e>=0)&&xZ(u)}function $kt(u){return Array.from(u.querySelectorAll(i_e)).filter(a_e)}function Kkt(u,e){const t=$kt(u);if(!t.length){e.preventDefault();return}const n=t[e.shiftKey?0:t.length-1],i=u.getRootNode();if(!(n===i.activeElement||u===i.activeElement))return;e.preventDefault();const a=t[e.shiftKey?t.length-1:0];a&&a.focus()}function i4(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function Wkt(u,e="body > :not(script)"){const t=i4(),n=Array.from(document.querySelectorAll(e)).map(i=>{var r;if((r=i==null?void 0:i.shadowRoot)!=null&&r.contains(u)||i.contains(u))return;const a=i.getAttribute("aria-hidden"),o=i.getAttribute("data-hidden"),s=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",t),a===null||a==="false"?i.setAttribute("aria-hidden","true"):!o&&!s&&i.setAttribute("data-hidden",a),{node:i,ariaHidden:o||null}});return()=>{n.forEach(i=>{!i||t!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function Gkt(u=!0){const e=C.useRef(),t=C.useRef(null),n=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(i_e));a=o.find(a_e)||o.find(xZ)||null,!a&&xZ(r)&&(a=r)}a&&a.focus({preventScroll:!0})},i=C.useCallback(r=>{if(u){if(r===null){t.current&&(t.current(),t.current=null);return}t.current=Wkt(r),e.current!==r&&(r?(setTimeout(()=>{r.getRootNode()&&n(r)}),e.current=r):e.current=null)}},[u]);return C.useEffect(()=>{if(!u)return;e.current&&setTimeout(()=>n(e.current));const r=a=>{a.key==="Tab"&&e.current&&Kkt(e.current,a)};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r),t.current&&t.current()}},[u]),i}const Ukt=u=>(u+1)%1e6;function qkt(){const[,u]=C.useReducer(Ukt,0);return u}const Jkt=M["useId".toString()]||(()=>{});function Zkt(){const u=Jkt();return u?`mantine-${u.replace(/:/g,"")}`:""}function Jl(u){const e=Zkt(),[t,n]=C.useState(e);return _I(()=>{n(i4())},[]),typeof u=="string"?u:typeof window>"u"?e:t}function vZ(u,e,t){C.useEffect(()=>(window.addEventListener(u,e,t),()=>window.removeEventListener(u,e,t)),[u,e])}function Jue(u,e){typeof u=="function"?u(e):typeof u=="object"&&u!==null&&"current"in u&&(u.current=e)}function o_e(...u){return e=>{u.forEach(t=>Jue(t,e))}}function q1(...u){return C.useCallback(o_e(...u),u)}function Ykt(u,e,t="ltr"){const n=C.useRef(),i=C.useRef(!1),r=C.useRef(!1),a=C.useRef(0),[o,s]=C.useState(!1);return C.useEffect(()=>{i.current=!0},[]),C.useEffect(()=>{const l=({x:D,y:x})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&n.current){n.current.style.userSelect="none";const b=n.current.getBoundingClientRect();if(b.width&&b.height){const k=bm((D-b.left)/b.width,0,1);u({x:t==="ltr"?k:1-k,y:bm((x-b.top)/b.height,0,1)})}}})},c=()=>{document.addEventListener("mousemove",g),document.addEventListener("mouseup",E),document.addEventListener("touchmove",p),document.addEventListener("touchend",E)},d=()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",p),document.removeEventListener("touchend",E)},h=()=>{!r.current&&i.current&&(r.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),s(!0),c())},E=()=>{r.current&&i.current&&(r.current=!1,s(!1),d(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},m=D=>{h(),D.preventDefault(),g(D)},g=D=>l({x:D.clientX,y:D.clientY}),f=D=>{D.cancelable&&D.preventDefault(),h(),p(D)},p=D=>{D.cancelable&&D.preventDefault(),l({x:D.changedTouches[0].clientX,y:D.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",m),n.current.addEventListener("touchstart",f,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",m),n.current.removeEventListener("touchstart",f))}},[t,u]),{ref:n,active:o}}function ps({value:u,defaultValue:e,finalValue:t,onChange:n=()=>{}}){const[i,r]=C.useState(e!==void 0?e:t),a=o=>{r(o),n==null||n(o)};return u!==void 0?[u,n,!0]:[i,a,!1]}function U4(u,e){const t=e-u+1;return Array.from({length:t},(n,i)=>i+u)}const __="dots";function Qkt({total:u,siblings:e=1,boundaries:t=1,page:n,initialPage:i=1,onChange:r}){const a=Math.max(Math.trunc(u),0),[o,s]=ps({value:n,onChange:r,defaultValue:i,finalValue:i}),l=g=>{g<=0?s(1):g>a?s(a):s(g)},c=()=>l(o+1),d=()=>l(o-1),h=()=>l(1),E=()=>l(a);return{range:C.useMemo(()=>{if(e*2+3+t*2>=a)return U4(1,a);const f=Math.max(o-e,t),p=Math.min(o+e,a-t),D=f>t+2,x=pi(l=>{const c=[...l.state,...l.queue,...s];return{state:c.slice(0,e),queue:c.slice(e)}}),update:s=>i(l=>{const c=s([...l.state,...l.queue]);return{state:c.slice(0,e),queue:c.slice(e)}}),cleanQueue:()=>i(s=>({state:s.state,queue:[]}))}}function QA(u,e){return YA("(prefers-reduced-motion: reduce)",u,e)}const eFt=u=>u<.5?2*u*u:-1+(4-2*u)*u,tFt=({axis:u,target:e,parent:t,alignment:n,offset:i,isList:r})=>{if(!e||!t&&typeof document>"u")return 0;const a=!!t,s=(t||document.body).getBoundingClientRect(),l=e.getBoundingClientRect(),c=d=>l[d]-s[d];if(u==="y"){const d=c("top");if(d===0)return 0;if(n==="start"){const E=d-i;return E<=l.height*(r?0:1)||!r?E:0}const h=a?s.height:window.innerHeight;if(n==="end"){const E=d+i-h+l.height;return E>=-l.height*(r?0:1)||!r?E:0}return n==="center"?d-h/2+l.height/2:0}if(u==="x"){const d=c("left");if(d===0)return 0;if(n==="start"){const E=d-i;return E<=l.width||!r?E:0}const h=a?s.width:window.innerWidth;if(n==="end"){const E=d+i-h+l.width;return E>=-l.width||!r?E:0}return n==="center"?d-h/2+l.width/2:0}return 0},uFt=({axis:u,parent:e})=>{if(!e&&typeof document>"u")return 0;const t=u==="y"?"scrollTop":"scrollLeft";if(e)return e[t];const{body:n,documentElement:i}=document;return n[t]+i[t]},nFt=({axis:u,parent:e,distance:t})=>{if(!e&&typeof document>"u")return;const n=u==="y"?"scrollTop":"scrollLeft";if(e)e[n]=t;else{const{body:i,documentElement:r}=document;i[n]=t,r[n]=t}};function s_e({duration:u=1250,axis:e="y",onScrollFinish:t,easing:n=eFt,offset:i=0,cancelable:r=!0,isList:a=!1}={}){const o=C.useRef(0),s=C.useRef(0),l=C.useRef(!1),c=C.useRef(null),d=C.useRef(null),h=QA(),E=()=>{o.current&&cancelAnimationFrame(o.current)},m=C.useCallback(({alignment:f="start"}={})=>{var p;l.current=!1,o.current&&E();const D=(p=uFt({parent:c.current,axis:e}))!=null?p:0,x=tFt({parent:c.current,target:d.current,axis:e,alignment:f,offset:i,isList:a})-(c.current?0:D);function b(){s.current===0&&(s.current=performance.now());const A=performance.now()-s.current,F=h||u===0?1:A/u,S=D+x*n(F);nFt({parent:c.current,axis:e,distance:S}),!l.current&&F<1?o.current=requestAnimationFrame(b):(typeof t=="function"&&t(),s.current=0,o.current=0,E())}b()},[e,u,n,a,i,t,h]),g=()=>{r&&(l.current=!0)};return vZ("wheel",g,{passive:!0}),vZ("touchmove",g,{passive:!0}),C.useEffect(()=>E,[]),{scrollableRef:c,targetRef:d,scrollIntoView:m,cancel:E}}const iFt={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function rFt(){const u=C.useRef(0),e=C.useRef(null),[t,n]=C.useState(iFt),i=C.useMemo(()=>typeof window<"u"?new ResizeObserver(r=>{const a=r[0];a&&(cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{e.current&&n(a.contentRect)}))}):null,[]);return _I(()=>(e.current&&(i.observe(e.current),n(e.current.getBoundingClientRect())),()=>{i.disconnect(),u.current&&cancelAnimationFrame(u.current)}),[e.current]),[e,t]}function aFt(){const[u,{width:e,height:t}]=rFt();return{ref:u,width:e,height:t}}function T1e(){if(typeof window>"u")return"undetermined";const{userAgent:u}=window.navigator,e=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,t=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return e.test(u)?"macos":n.test(u)?"ios":t.test(u)?"windows":/Android/i.test(u)?"android":/Linux/i.test(u)?"linux":"undetermined"}function oFt(u={getValueInEffect:!0}){const[e,t]=C.useState(u.getValueInEffect?"undetermined":T1e());return _I(()=>{u.getValueInEffect&&t(T1e)},[]),e}function Un(u=!1,e){const{onOpen:t,onClose:n}=e||{},[i,r]=C.useState(u),a=C.useCallback(()=>{r(l=>l||(t==null||t(),!0))},[t]),o=C.useCallback(()=>{r(l=>l&&(n==null||n(),!1))},[n]),s=C.useCallback(()=>{i?o():a()},[o,a,i]);return[i,{open:a,close:o,toggle:s}]}const IL={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[sFt,OL]=U1(IL.context);function lFt({children:u,multiple:e,value:t,defaultValue:n,onChange:i,id:r,loop:a,transitionDuration:o,disableChevronRotation:s,chevronPosition:l,chevronSize:c,order:d,chevron:h,variant:E,radius:m,classNames:g,styles:f,unstyled:p}){const D=Jl(r),[x,b]=ps({value:t,defaultValue:n,finalValue:e?[]:null,onChange:i}),k=F=>Array.isArray(x)?x.includes(F):F===x,A=F=>{const S=Array.isArray(x)?x.includes(F)?x.filter(w=>w!==F):[...x,F]:F===x?null:F;b(S)};return M.createElement(sFt,{value:{isItemActive:k,onChange:A,getControlId:NL(`${D}-control`,IL.value),getRegionId:NL(`${D}-panel`,IL.value),transitionDuration:o,disableChevronRotation:s,chevronPosition:l,chevronSize:c,order:d,chevron:h,loop:a,variant:E,radius:m,classNames:g,styles:f,unstyled:p}},u)}const[cFt,l_e]=U1(IL.itemContext);function dFt(u,e,{radius:t}){const n=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3],i=u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],r=u.fn.radius(t);return e==="default"?{color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,borderBottom:`${G(1)} solid ${n}`}:e==="contained"?{border:`${G(1)} solid ${n}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:i},"&:first-of-type":{borderTopRightRadius:r,borderTopLeftRadius:r,"& > [data-accordion-control]":{borderTopRightRadius:r,borderTopLeftRadius:r}},"&:last-of-type":{borderBottomRightRadius:r,borderBottomLeftRadius:r,"& > [data-accordion-control]":{borderBottomRightRadius:r,borderBottomLeftRadius:r}},"& + &":{borderTop:0}}:e==="filled"?{borderRadius:r,"&[data-active]":{backgroundColor:i}}:e==="separated"?{borderRadius:r,backgroundColor:i,border:`${G(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:u.spacing.md},"&[data-active]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderColor:n}}:{}}var hFt=at((u,e,{variant:t})=>({item:dFt(u,t,e)}));const EFt=hFt;var N1e=Object.getOwnPropertySymbols,mFt=Object.prototype.hasOwnProperty,gFt=Object.prototype.propertyIsEnumerable,fFt=(u,e)=>{var t={};for(var n in u)mFt.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&N1e)for(var n of N1e(u))e.indexOf(n)<0&&gFt.call(u,n)&&(t[n]=u[n]);return t};function w4(u){const e=u,{m:t,mx:n,my:i,mt:r,mb:a,ml:o,mr:s,p:l,px:c,py:d,pt:h,pb:E,pl:m,pr:g,bg:f,c:p,opacity:D,ff:x,fz:b,fw:k,lts:A,ta:F,lh:S,fs:w,tt:z,td:N,w:O,miw:y,maw:_,h:L,mih:T,mah:R,bgsz:I,bgp:H,bgr:V,bga:U,pos:J,top:Y,left:X,bottom:re,right:ge,inset:_e,display:Ve}=e,Ue=fFt(e,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:Y9e({m:t,mx:n,my:i,mt:r,mb:a,ml:o,mr:s,p:l,px:c,py:d,pt:h,pb:E,pl:m,pr:g,bg:f,c:p,opacity:D,ff:x,fz:b,fw:k,lts:A,ta:F,lh:S,fs:w,tt:z,td:N,w:O,miw:y,maw:_,h:L,mih:T,mah:R,bgsz:I,bgp:H,bgr:V,bga:U,pos:J,top:Y,left:X,bottom:re,right:ge,inset:_e,display:Ve}),rest:Ue}}function pFt(u,e){const t=Object.keys(u).filter(n=>n!=="base").sort((n,i)=>e0(ye({size:n,sizes:e.breakpoints}))-e0(ye({size:i,sizes:e.breakpoints})));return"base"in u?["base",...t]:t}function DFt({value:u,theme:e,getValue:t,property:n}){if(u==null)return;if(typeof u=="object")return pFt(u,e).reduce((a,o)=>{if(o==="base"&&u.base!==void 0){const l=t(u.base,e);return Array.isArray(n)?(n.forEach(c=>{a[c]=l}),a):(a[n]=l,a)}const s=t(u[o],e);return Array.isArray(n)?(a[e.fn.largerThan(o)]={},n.forEach(l=>{a[e.fn.largerThan(o)][l]=s}),a):(a[e.fn.largerThan(o)]={[n]:s},a)},{});const i=t(u,e);return Array.isArray(n)?n.reduce((r,a)=>(r[a]=i,r),{}):{[n]:i}}function xFt(u,e){return u==="dimmed"?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.fn.variant({variant:"filled",color:u,primaryFallback:!1}).background}function vFt(u){return G(u)}function CFt(u){return u}function bFt(u,e){return ye({size:u,sizes:e.fontSizes})}const kFt=["-xs","-sm","-md","-lg","-xl"];function FFt(u,e){return kFt.includes(u)?`calc(${ye({size:u.replace("-",""),sizes:e.spacing})} * -1)`:ye({size:u,sizes:e.spacing})}const yFt={identity:CFt,color:xFt,size:vFt,fontSize:bFt,spacing:FFt},AFt={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var _Ft=Object.defineProperty,P1e=Object.getOwnPropertySymbols,SFt=Object.prototype.hasOwnProperty,BFt=Object.prototype.propertyIsEnumerable,R1e=(u,e,t)=>e in u?_Ft(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,I1e=(u,e)=>{for(var t in e||(e={}))SFt.call(e,t)&&R1e(u,t,e[t]);if(P1e)for(var t of P1e(e))BFt.call(e,t)&&R1e(u,t,e[t]);return u};function CZ(u,e,t=AFt){return Object.keys(t).reduce((i,r)=>(r in u&&u[r]!==void 0&&i.push(DFt({value:u[r],getValue:yFt[t[r].type],property:t[r].property,theme:e})),i),[]).reduce((i,r)=>(Object.keys(r).forEach(a=>{typeof r[a]=="object"&&r[a]!==null&&a in i?i[a]=I1e(I1e({},i[a]),r[a]):i[a]=r[a]}),i),{})}function O1e(u,e){return typeof u=="function"?u(e):u}function wFt(u,e,t){const n=jr(),{css:i,cx:r}=u_e();return Array.isArray(u)?r(t,i(CZ(e,n)),u.map(a=>i(O1e(a,n)))):r(t,i(O1e(u,n)),i(CZ(e,n)))}var LFt=Object.defineProperty,jL=Object.getOwnPropertySymbols,c_e=Object.prototype.hasOwnProperty,d_e=Object.prototype.propertyIsEnumerable,j1e=(u,e,t)=>e in u?LFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,zFt=(u,e)=>{for(var t in e||(e={}))c_e.call(e,t)&&j1e(u,t,e[t]);if(jL)for(var t of jL(e))d_e.call(e,t)&&j1e(u,t,e[t]);return u},MFt=(u,e)=>{var t={};for(var n in u)c_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&jL)for(var n of jL(u))e.indexOf(n)<0&&d_e.call(u,n)&&(t[n]=u[n]);return t};const h_e=C.forwardRef((u,e)=>{var t=u,{className:n,component:i,style:r,sx:a}=t,o=MFt(t,["className","component","style","sx"]);const{systemStyles:s,rest:l}=w4(o),c=i||"div";return M.createElement(c,zFt({ref:e,className:wFt(a,s,n),style:r},l))});h_e.displayName="@mantine/core/Box";const Ct=h_e;var TFt=Object.defineProperty,HL=Object.getOwnPropertySymbols,E_e=Object.prototype.hasOwnProperty,m_e=Object.prototype.propertyIsEnumerable,H1e=(u,e,t)=>e in u?TFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,NFt=(u,e)=>{for(var t in e||(e={}))E_e.call(e,t)&&H1e(u,t,e[t]);if(HL)for(var t of HL(e))m_e.call(e,t)&&H1e(u,t,e[t]);return u},PFt=(u,e)=>{var t={};for(var n in u)E_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&HL)for(var n of HL(u))e.indexOf(n)<0&&m_e.call(u,n)&&(t[n]=u[n]);return t};const RFt={},g_e=C.forwardRef((u,e)=>{const t=Qe("AccordionItem",RFt,u),{children:n,className:i,value:r}=t,a=PFt(t,["children","className","value"]),o=OL(),{classes:s,cx:l}=EFt({radius:o.radius},{name:"Accordion",classNames:o.classNames,styles:o.styles,unstyled:o.unstyled,variant:o.variant});return M.createElement(cFt,{value:{value:r}},M.createElement(Ct,NFt({ref:e,className:l(s.item,i),"data-active":o.isItemActive(r)||void 0},a),n))});g_e.displayName="@mantine/core/AccordionItem";var IFt=Object.defineProperty,OFt=Object.defineProperties,jFt=Object.getOwnPropertyDescriptors,V1e=Object.getOwnPropertySymbols,HFt=Object.prototype.hasOwnProperty,VFt=Object.prototype.propertyIsEnumerable,$1e=(u,e,t)=>e in u?IFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,S_=(u,e)=>{for(var t in e||(e={}))HFt.call(e,t)&&$1e(u,t,e[t]);if(V1e)for(var t of V1e(e))VFt.call(e,t)&&$1e(u,t,e[t]);return u},$Ft=(u,e)=>OFt(u,jFt(e));function KFt(u,e){return e==="default"||e==="contained"?u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]}):{}}var WFt=at((u,{transitionDuration:e,chevronPosition:t,chevronSize:n},{variant:i})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:t==="left"?0:u.spacing.sm,marginLeft:t==="left"?u.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${e}ms ease`,marginRight:t==="right"?0:u.spacing.sm,marginLeft:t==="right"?u.spacing.lg:0,width:G(n),minWidth:G(n),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:u.spacing.md,paddingBottom:u.spacing.md},itemTitle:{margin:0,padding:0},control:$Ft(S_(S_(S_({},u.fn.focusStyles()),u.fn.fontStyles()),KFt(u,i)),{width:"100%",display:"flex",alignItems:"center",flexDirection:t==="right"?"row-reverse":"row",paddingRight:u.spacing.md,paddingLeft:t==="right"?`calc(${u.spacing.md} + ${G(4)})`:u.spacing.xs,textAlign:"left",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&:disabled":S_({opacity:.4,cursor:"not-allowed"},u.fn.hover({backgroundColor:"transparent"}))})}));const GFt=WFt;var UFt=Object.defineProperty,qFt=Object.defineProperties,JFt=Object.getOwnPropertyDescriptors,K1e=Object.getOwnPropertySymbols,ZFt=Object.prototype.hasOwnProperty,YFt=Object.prototype.propertyIsEnumerable,W1e=(u,e,t)=>e in u?UFt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,G1e=(u,e)=>{for(var t in e||(e={}))ZFt.call(e,t)&&W1e(u,t,e[t]);if(K1e)for(var t of K1e(e))YFt.call(e,t)&&W1e(u,t,e[t]);return u},QFt=(u,e)=>qFt(u,JFt(e)),XFt=at(u=>({root:QFt(G1e(G1e({},u.fn.focusStyles()),u.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:u.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,textDecoration:"none",boxSizing:"border-box"})}));const eyt=XFt;var tyt=Object.defineProperty,VL=Object.getOwnPropertySymbols,f_e=Object.prototype.hasOwnProperty,p_e=Object.prototype.propertyIsEnumerable,U1e=(u,e,t)=>e in u?tyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uyt=(u,e)=>{for(var t in e||(e={}))f_e.call(e,t)&&U1e(u,t,e[t]);if(VL)for(var t of VL(e))p_e.call(e,t)&&U1e(u,t,e[t]);return u},nyt=(u,e)=>{var t={};for(var n in u)f_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&VL)for(var n of VL(u))e.indexOf(n)<0&&p_e.call(u,n)&&(t[n]=u[n]);return t};const D_e=C.forwardRef((u,e)=>{const t=Qe("UnstyledButton",{},u),{className:n,component:i="button",unstyled:r,variant:a}=t,o=nyt(t,["className","component","unstyled","variant"]),{classes:s,cx:l}=eyt(null,{name:"UnstyledButton",unstyled:r,variant:a});return M.createElement(Ct,uyt({component:i,ref:e,className:l(s.root,n),type:i==="button"?"button":void 0},o))});D_e.displayName="@mantine/core/UnstyledButton";const L4=D_e;var iyt=Object.defineProperty,ryt=Object.defineProperties,ayt=Object.getOwnPropertyDescriptors,$L=Object.getOwnPropertySymbols,x_e=Object.prototype.hasOwnProperty,v_e=Object.prototype.propertyIsEnumerable,q1e=(u,e,t)=>e in u?iyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,oyt=(u,e)=>{for(var t in e||(e={}))x_e.call(e,t)&&q1e(u,t,e[t]);if($L)for(var t of $L(e))v_e.call(e,t)&&q1e(u,t,e[t]);return u},syt=(u,e)=>ryt(u,ayt(e)),lyt=(u,e)=>{var t={};for(var n in u)x_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&$L)for(var n of $L(u))e.indexOf(n)<0&&v_e.call(u,n)&&(t[n]=u[n]);return t};const cyt={},C_e=C.forwardRef((u,e)=>{const t=Qe("AccordionControl",cyt,u),{disabled:n,onKeyDown:i,onClick:r,chevron:a,children:o,className:s,icon:l}=t,c=lyt(t,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),d=OL(),{value:h}=l_e(),{classes:E,cx:m}=GFt({transitionDuration:d.transitionDuration,chevronPosition:d.chevronPosition,chevronSize:d.chevronSize,radius:d.radius},{name:"Accordion",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),g=d.isItemActive(h),f=typeof d.order=="number",p=`h${d.order}`,D=M.createElement(L4,syt(oyt({},c),{ref:e,"data-accordion-control":!0,disabled:n,className:m(E.control,s),onClick:x=>{r==null||r(x),d.onChange(h)},type:"button","data-active":g||void 0,"aria-expanded":g,"aria-controls":d.getRegionId(h),id:d.getControlId(h),unstyled:d.unstyled,onKeyDown:Pue({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:d.loop,orientation:"vertical",onKeyDown:i})}),M.createElement("span",{className:E.chevron,"data-rotate":!d.disableChevronRotation&&g||void 0},a||d.chevron),M.createElement("span",{className:E.label},o),l&&M.createElement("span",{className:E.icon},l));return f?M.createElement(p,{className:E.itemTitle},D):D});C_e.displayName="@mantine/core/AccordionControl";var dyt=Object.defineProperty,hyt=Object.defineProperties,Eyt=Object.getOwnPropertyDescriptors,J1e=Object.getOwnPropertySymbols,myt=Object.prototype.hasOwnProperty,gyt=Object.prototype.propertyIsEnumerable,Z1e=(u,e,t)=>e in u?dyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,fyt=(u,e)=>{for(var t in e||(e={}))myt.call(e,t)&&Z1e(u,t,e[t]);if(J1e)for(var t of J1e(e))gyt.call(e,t)&&Z1e(u,t,e[t]);return u},pyt=(u,e)=>hyt(u,Eyt(e)),Dyt=at((u,e)=>({panel:pyt(fyt({},u.fn.fontStyles()),{wordBreak:"break-word",lineHeight:u.lineHeight}),content:{padding:u.spacing.md,paddingTop:`calc(${u.spacing.xs} / 2)`}}));const xyt=Dyt;var vyt=Object.defineProperty,Cyt=Object.defineProperties,byt=Object.getOwnPropertyDescriptors,KL=Object.getOwnPropertySymbols,b_e=Object.prototype.hasOwnProperty,k_e=Object.prototype.propertyIsEnumerable,Y1e=(u,e,t)=>e in u?vyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Zg=(u,e)=>{for(var t in e||(e={}))b_e.call(e,t)&&Y1e(u,t,e[t]);if(KL)for(var t of KL(e))k_e.call(e,t)&&Y1e(u,t,e[t]);return u},LV=(u,e)=>Cyt(u,byt(e)),kyt=(u,e)=>{var t={};for(var n in u)b_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&KL)for(var n of KL(u))e.indexOf(n)<0&&k_e.call(u,n)&&(t[n]=u[n]);return t};function Fyt(u){if(!u||typeof u=="string")return 0;const e=u/36;return Math.round((4+15*e**.25+e/5)*10)}function zV(u){return u!=null&&u.current?u.current.scrollHeight:"auto"}const B_=typeof window<"u"&&window.requestAnimationFrame;function yyt({transitionDuration:u,transitionTimingFunction:e="ease",onTransitionEnd:t=()=>{},opened:n}){const i=C.useRef(null),r=0,a={display:"none",height:0,overflow:"hidden"},[o,s]=C.useState(n?{}:a),l=m=>{is.flushSync(()=>s(m))},c=m=>{l(g=>Zg(Zg({},g),m))};function d(m){return{transition:`height ${u||Fyt(m)}ms ${e}`}}To(()=>{B_(n?()=>{c({willChange:"height",display:"block",overflow:"hidden"}),B_(()=>{const m=zV(i);c(LV(Zg({},d(m)),{height:m}))})}:()=>{const m=zV(i);c(LV(Zg({},d(m)),{willChange:"height",height:m})),B_(()=>c({height:r,overflow:"hidden"}))})},[n]);const h=m=>{if(!(m.target!==i.current||m.propertyName!=="height"))if(n){const g=zV(i);g===o.height?l({}):c({height:g}),t()}else o.height===r&&(l(a),t())};function E(m={}){var g=m,{style:f={},refKey:p="ref"}=g,D=kyt(g,["style","refKey"]);const x=D[p];return LV(Zg({"aria-hidden":!n},D),{[p]:o_e(i,x),onTransitionEnd:h,style:Zg(Zg({boxSizing:"border-box"},f),o)})}return E}var Ayt=Object.defineProperty,WL=Object.getOwnPropertySymbols,F_e=Object.prototype.hasOwnProperty,y_e=Object.prototype.propertyIsEnumerable,Q1e=(u,e,t)=>e in u?Ayt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,w_=(u,e)=>{for(var t in e||(e={}))F_e.call(e,t)&&Q1e(u,t,e[t]);if(WL)for(var t of WL(e))y_e.call(e,t)&&Q1e(u,t,e[t]);return u},_yt=(u,e)=>{var t={};for(var n in u)F_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&WL)for(var n of WL(u))e.indexOf(n)<0&&y_e.call(u,n)&&(t[n]=u[n]);return t};const Syt={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},A_e=C.forwardRef((u,e)=>{const t=Qe("Collapse",Syt,u),{children:n,in:i,transitionDuration:r,transitionTimingFunction:a,style:o,onTransitionEnd:s,animateOpacity:l}=t,c=_yt(t,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),d=jr(),h=QA(),m=(d.respectReducedMotion?h:!1)?0:r,{systemStyles:g,rest:f}=w4(c),p=yyt({opened:i,transitionDuration:m,transitionTimingFunction:a,onTransitionEnd:s});return m===0?i?M.createElement(Ct,w_({},f),n):null:M.createElement(Ct,w_({},p(w_(w_({style:o,ref:e},f),g))),M.createElement("div",{style:{opacity:i||!l?1:0,transition:l?`opacity ${m}ms ${a}`:"none"}},n))});A_e.displayName="@mantine/core/Collapse";var Byt=Object.defineProperty,wyt=Object.defineProperties,Lyt=Object.getOwnPropertyDescriptors,GL=Object.getOwnPropertySymbols,__e=Object.prototype.hasOwnProperty,S_e=Object.prototype.propertyIsEnumerable,X1e=(u,e,t)=>e in u?Byt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,zyt=(u,e)=>{for(var t in e||(e={}))__e.call(e,t)&&X1e(u,t,e[t]);if(GL)for(var t of GL(e))S_e.call(e,t)&&X1e(u,t,e[t]);return u},Myt=(u,e)=>wyt(u,Lyt(e)),Tyt=(u,e)=>{var t={};for(var n in u)__e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&GL)for(var n of GL(u))e.indexOf(n)<0&&S_e.call(u,n)&&(t[n]=u[n]);return t};const Nyt={};function B_e(u){const e=Qe("AccordionPanel",Nyt,u),{children:t,className:n}=e,i=Tyt(e,["children","className"]),r=OL(),{value:a}=l_e(),{classNames:o,styles:s,unstyled:l}=OL(),{classes:c,cx:d}=xyt({radius:r.radius},{name:"Accordion",classNames:o,styles:s,unstyled:l,variant:r.variant});return M.createElement(A_e,Myt(zyt({},i),{className:d(c.panel,n),in:r.isItemActive(a),transitionDuration:r.transitionDuration,role:"region",id:r.getRegionId(a),"aria-labelledby":r.getControlId(a)}),M.createElement("div",{className:c.content},t))}B_e.displayName="@mantine/core/AccordionPanel";var Pyt=Object.defineProperty,UL=Object.getOwnPropertySymbols,w_e=Object.prototype.hasOwnProperty,L_e=Object.prototype.propertyIsEnumerable,ehe=(u,e,t)=>e in u?Pyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,the=(u,e)=>{for(var t in e||(e={}))w_e.call(e,t)&&ehe(u,t,e[t]);if(UL)for(var t of UL(e))L_e.call(e,t)&&ehe(u,t,e[t]);return u},Ryt=(u,e)=>{var t={};for(var n in u)w_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&UL)for(var n of UL(u))e.indexOf(n)<0&&L_e.call(u,n)&&(t[n]=u[n]);return t};function Iyt(u){const e=u,{style:t}=e,n=Ryt(e,["style"]);return M.createElement("svg",the({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:the({width:G(16),height:G(16)},t)},n),M.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Oyt=Object.defineProperty,jyt=Object.defineProperties,Hyt=Object.getOwnPropertyDescriptors,qL=Object.getOwnPropertySymbols,z_e=Object.prototype.hasOwnProperty,M_e=Object.prototype.propertyIsEnumerable,uhe=(u,e,t)=>e in u?Oyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Vyt=(u,e)=>{for(var t in e||(e={}))z_e.call(e,t)&&uhe(u,t,e[t]);if(qL)for(var t of qL(e))M_e.call(e,t)&&uhe(u,t,e[t]);return u},$yt=(u,e)=>jyt(u,Hyt(e)),Kyt=(u,e)=>{var t={};for(var n in u)z_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qL)for(var n of qL(u))e.indexOf(n)<0&&M_e.call(u,n)&&(t[n]=u[n]);return t};const Wyt={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:M.createElement(Iyt,null)};function nn(u){const e=Qe("Accordion",Wyt,u),{id:t,loop:n,children:i,multiple:r,value:a,defaultValue:o,onChange:s,transitionDuration:l,disableChevronRotation:c,chevronPosition:d,chevronSize:h,order:E,chevron:m,classNames:g,styles:f,unstyled:p,variant:D,radius:x}=e,b=Kyt(e,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return M.createElement(lFt,{id:t,multiple:r,value:a,defaultValue:o,onChange:s,loop:n,transitionDuration:l,disableChevronRotation:c,chevronPosition:d,chevronSize:h,order:E,chevron:m,variant:D,radius:x,classNames:g,styles:f,unstyled:p},M.createElement(Ct,$yt(Vyt({},b),{"data-accordion":!0}),i))}nn.Item=g_e;nn.Control=C_e;nn.Panel=B_e;nn.displayName="@mantine/core/Accordion";var Gyt=Object.defineProperty,Uyt=Object.defineProperties,qyt=Object.getOwnPropertyDescriptors,nhe=Object.getOwnPropertySymbols,Jyt=Object.prototype.hasOwnProperty,Zyt=Object.prototype.propertyIsEnumerable,ihe=(u,e,t)=>e in u?Gyt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bZ=(u,e)=>{for(var t in e||(e={}))Jyt.call(e,t)&&ihe(u,t,e[t]);if(nhe)for(var t of nhe(e))Zyt.call(e,t)&&ihe(u,t,e[t]);return u},rhe=(u,e)=>Uyt(u,qyt(e));const Yyt=["subtle","filled","outline","light","default","transparent","gradient"],L_={xs:G(18),sm:G(22),md:G(28),lg:G(34),xl:G(44)};function Qyt({variant:u,theme:e,color:t,gradient:n}){const i=e.fn.variant({color:t,variant:u,gradient:n});return u==="gradient"?{border:0,backgroundImage:i.background,color:i.color,"&:hover":e.fn.hover({backgroundSize:"200%"})}:Yyt.includes(u)?bZ({border:`${G(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover})):null}var Xyt=at((u,{radius:e,color:t,gradient:n},{variant:i,size:r})=>({root:rhe(bZ({position:"relative",borderRadius:u.fn.radius(e),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:ye({size:r,sizes:L_}),minHeight:ye({size:r,sizes:L_}),width:ye({size:r,sizes:L_}),minWidth:ye({size:r,sizes:L_})},Qyt({variant:i,theme:u,color:t,gradient:n})),{"&:active":u.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:u.colors.gray[u.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:i==="transparent"?void 0:u.fn.themeColor("gray",u.colorScheme==="dark"?8:1),borderColor:i==="transparent"?void 0:u.fn.themeColor("gray",u.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":rhe(bZ({content:'""'},u.fn.cover(G(-1))),{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:u.fn.radius(e),cursor:"not-allowed"})}})}));const eAt=Xyt;var tAt=Object.defineProperty,JL=Object.getOwnPropertySymbols,T_e=Object.prototype.hasOwnProperty,N_e=Object.prototype.propertyIsEnumerable,ahe=(u,e,t)=>e in u?tAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ohe=(u,e)=>{for(var t in e||(e={}))T_e.call(e,t)&&ahe(u,t,e[t]);if(JL)for(var t of JL(e))N_e.call(e,t)&&ahe(u,t,e[t]);return u},she=(u,e)=>{var t={};for(var n in u)T_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&JL)for(var n of JL(u))e.indexOf(n)<0&&N_e.call(u,n)&&(t[n]=u[n]);return t};function uAt(u){var e=u,{size:t,color:n}=e,i=she(e,["size","color"]);const r=i,{style:a}=r,o=she(r,["style"]);return M.createElement("svg",ohe({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:ohe({width:t},a)},o),M.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},M.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var nAt=Object.defineProperty,ZL=Object.getOwnPropertySymbols,P_e=Object.prototype.hasOwnProperty,R_e=Object.prototype.propertyIsEnumerable,lhe=(u,e,t)=>e in u?nAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,che=(u,e)=>{for(var t in e||(e={}))P_e.call(e,t)&&lhe(u,t,e[t]);if(ZL)for(var t of ZL(e))R_e.call(e,t)&&lhe(u,t,e[t]);return u},dhe=(u,e)=>{var t={};for(var n in u)P_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ZL)for(var n of ZL(u))e.indexOf(n)<0&&R_e.call(u,n)&&(t[n]=u[n]);return t};function iAt(u){var e=u,{size:t,color:n}=e,i=dhe(e,["size","color"]);const r=i,{style:a}=r,o=dhe(r,["style"]);return M.createElement("svg",che({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:che({width:t,height:t},a)},o),M.createElement("g",{fill:"none",fillRule:"evenodd"},M.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},M.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),M.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},M.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var rAt=Object.defineProperty,YL=Object.getOwnPropertySymbols,I_e=Object.prototype.hasOwnProperty,O_e=Object.prototype.propertyIsEnumerable,hhe=(u,e,t)=>e in u?rAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ehe=(u,e)=>{for(var t in e||(e={}))I_e.call(e,t)&&hhe(u,t,e[t]);if(YL)for(var t of YL(e))O_e.call(e,t)&&hhe(u,t,e[t]);return u},mhe=(u,e)=>{var t={};for(var n in u)I_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&YL)for(var n of YL(u))e.indexOf(n)<0&&O_e.call(u,n)&&(t[n]=u[n]);return t};function aAt(u){var e=u,{size:t,color:n}=e,i=mhe(e,["size","color"]);const r=i,{style:a}=r,o=mhe(r,["style"]);return M.createElement("svg",Ehe({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Ehe({width:t},a)},o),M.createElement("circle",{cx:"15",cy:"15",r:"15"},M.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},M.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),M.createElement("circle",{cx:"105",cy:"15",r:"15"},M.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),M.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var oAt=Object.defineProperty,QL=Object.getOwnPropertySymbols,j_e=Object.prototype.hasOwnProperty,H_e=Object.prototype.propertyIsEnumerable,ghe=(u,e,t)=>e in u?oAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,sAt=(u,e)=>{for(var t in e||(e={}))j_e.call(e,t)&&ghe(u,t,e[t]);if(QL)for(var t of QL(e))H_e.call(e,t)&&ghe(u,t,e[t]);return u},lAt=(u,e)=>{var t={};for(var n in u)j_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&QL)for(var n of QL(u))e.indexOf(n)<0&&H_e.call(u,n)&&(t[n]=u[n]);return t};const MV={bars:uAt,oval:iAt,dots:aAt},cAt={xs:G(18),sm:G(22),md:G(36),lg:G(44),xl:G(58)},dAt={size:"md"};function Vv(u){const e=Qe("Loader",dAt,u),{size:t,color:n,variant:i}=e,r=lAt(e,["size","color","variant"]),a=jr(),o=i in MV?i:a.loader;return M.createElement(Ct,sAt({role:"presentation",component:MV[o]||MV.bars,size:ye({size:t,sizes:cAt}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},r))}Vv.displayName="@mantine/core/Loader";var hAt=Object.defineProperty,XL=Object.getOwnPropertySymbols,V_e=Object.prototype.hasOwnProperty,$_e=Object.prototype.propertyIsEnumerable,fhe=(u,e,t)=>e in u?hAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,phe=(u,e)=>{for(var t in e||(e={}))V_e.call(e,t)&&fhe(u,t,e[t]);if(XL)for(var t of XL(e))$_e.call(e,t)&&fhe(u,t,e[t]);return u},EAt=(u,e)=>{var t={};for(var n in u)V_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&XL)for(var n of XL(u))e.indexOf(n)<0&&$_e.call(u,n)&&(t[n]=u[n]);return t};const mAt={color:"gray",size:"md",variant:"subtle"},K_e=C.forwardRef((u,e)=>{const t=Qe("ActionIcon",mAt,u),{className:n,color:i,children:r,radius:a,size:o,variant:s,gradient:l,disabled:c,loaderProps:d,loading:h,unstyled:E,__staticSelector:m}=t,g=EAt(t,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:f,cx:p,theme:D}=eAt({radius:a,color:i,gradient:l},{name:["ActionIcon",m],unstyled:E,size:o,variant:s}),x=M.createElement(Vv,phe({color:D.fn.variant({color:i,variant:s}).color,size:"100%","data-action-icon-loader":!0},d));return M.createElement(L4,phe({className:p(f.root,n),ref:e,disabled:c,"data-disabled":c||void 0,"data-loading":h||void 0,unstyled:E},g),h?x:r)});K_e.displayName="@mantine/core/ActionIcon";const Uu=K_e;var gAt=Object.defineProperty,fAt=Object.defineProperties,pAt=Object.getOwnPropertyDescriptors,ez=Object.getOwnPropertySymbols,W_e=Object.prototype.hasOwnProperty,G_e=Object.prototype.propertyIsEnumerable,Dhe=(u,e,t)=>e in u?gAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DAt=(u,e)=>{for(var t in e||(e={}))W_e.call(e,t)&&Dhe(u,t,e[t]);if(ez)for(var t of ez(e))G_e.call(e,t)&&Dhe(u,t,e[t]);return u},xAt=(u,e)=>fAt(u,pAt(e)),vAt=(u,e)=>{var t={};for(var n in u)W_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ez)for(var n of ez(u))e.indexOf(n)<0&&G_e.call(u,n)&&(t[n]=u[n]);return t};function Zue(u){const e=Qe("Portal",{},u),{children:t,target:n,className:i,innerRef:r}=e,a=vAt(e,["children","target","className","innerRef"]),o=jr(),[s,l]=C.useState(!1),c=C.useRef();return _I(()=>(l(!0),c.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(c.current),()=>{!n&&document.body.removeChild(c.current)}),[n]),s?is.createPortal(M.createElement("div",xAt(DAt({className:i,dir:o.dir},a),{ref:r}),t),c.current):null}Zue.displayName="@mantine/core/Portal";var CAt=Object.defineProperty,tz=Object.getOwnPropertySymbols,U_e=Object.prototype.hasOwnProperty,q_e=Object.prototype.propertyIsEnumerable,xhe=(u,e,t)=>e in u?CAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bAt=(u,e)=>{for(var t in e||(e={}))U_e.call(e,t)&&xhe(u,t,e[t]);if(tz)for(var t of tz(e))q_e.call(e,t)&&xhe(u,t,e[t]);return u},kAt=(u,e)=>{var t={};for(var n in u)U_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&tz)for(var n of tz(u))e.indexOf(n)<0&&q_e.call(u,n)&&(t[n]=u[n]);return t};function XA(u){var e=u,{withinPortal:t=!0,children:n}=e,i=kAt(e,["withinPortal","children"]);return t?M.createElement(Zue,bAt({},i),n):M.createElement(M.Fragment,null,n)}XA.displayName="@mantine/core/OptionalPortal";var FAt=Object.defineProperty,uz=Object.getOwnPropertySymbols,J_e=Object.prototype.hasOwnProperty,Z_e=Object.prototype.propertyIsEnumerable,vhe=(u,e,t)=>e in u?FAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Che=(u,e)=>{for(var t in e||(e={}))J_e.call(e,t)&&vhe(u,t,e[t]);if(uz)for(var t of uz(e))Z_e.call(e,t)&&vhe(u,t,e[t]);return u},yAt=(u,e)=>{var t={};for(var n in u)J_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uz)for(var n of uz(u))e.indexOf(n)<0&&Z_e.call(u,n)&&(t[n]=u[n]);return t};function Y_e(u){const e=u,{width:t,height:n,style:i}=e,r=yAt(e,["width","height","style"]);return M.createElement("svg",Che({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Che({width:t,height:n},i)},r),M.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}Y_e.displayName="@mantine/core/CloseIcon";var AAt=Object.defineProperty,nz=Object.getOwnPropertySymbols,Q_e=Object.prototype.hasOwnProperty,X_e=Object.prototype.propertyIsEnumerable,bhe=(u,e,t)=>e in u?AAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_At=(u,e)=>{for(var t in e||(e={}))Q_e.call(e,t)&&bhe(u,t,e[t]);if(nz)for(var t of nz(e))X_e.call(e,t)&&bhe(u,t,e[t]);return u},SAt=(u,e)=>{var t={};for(var n in u)Q_e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nz)for(var n of nz(u))e.indexOf(n)<0&&X_e.call(u,n)&&(t[n]=u[n]);return t};const BAt={xs:G(12),sm:G(16),md:G(20),lg:G(28),xl:G(34)},wAt={size:"sm"},eSe=C.forwardRef((u,e)=>{const t=Qe("CloseButton",wAt,u),{iconSize:n,size:i,children:r}=t,a=SAt(t,["iconSize","size","children"]),o=G(n||BAt[i]);return M.createElement(Uu,_At({ref:e,__staticSelector:"CloseButton",size:i},a),r||M.createElement(Y_e,{width:o,height:o}))});eSe.displayName="@mantine/core/CloseButton";const SI=eSe;var LAt=Object.defineProperty,zAt=Object.defineProperties,MAt=Object.getOwnPropertyDescriptors,khe=Object.getOwnPropertySymbols,TAt=Object.prototype.hasOwnProperty,NAt=Object.prototype.propertyIsEnumerable,Fhe=(u,e,t)=>e in u?LAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,z_=(u,e)=>{for(var t in e||(e={}))TAt.call(e,t)&&Fhe(u,t,e[t]);if(khe)for(var t of khe(e))NAt.call(e,t)&&Fhe(u,t,e[t]);return u},PAt=(u,e)=>zAt(u,MAt(e));function RAt({underline:u,strikethrough:e}){const t=[];return u&&t.push("underline"),e&&t.push("line-through"),t.length>0?t.join(" "):"none"}function IAt({theme:u,color:e}){return e==="dimmed"?u.fn.dimmed():typeof e=="string"&&(e in u.colors||e.split(".")[0]in u.colors)?u.fn.variant({variant:"filled",color:e}).background:e||"inherit"}function OAt(u){return typeof u=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:u,WebkitBoxOrient:"vertical"}:null}function jAt({theme:u,truncate:e}){return e==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:u.dir==="ltr"?"rtl":"ltr",textAlign:u.dir==="ltr"?"right":"left"}:e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var HAt=at((u,{color:e,lineClamp:t,truncate:n,inline:i,inherit:r,underline:a,gradient:o,weight:s,transform:l,align:c,strikethrough:d,italic:h},{size:E})=>{const m=u.fn.variant({variant:"gradient",gradient:o});return{root:PAt(z_(z_(z_(z_({},u.fn.fontStyles()),u.fn.focusStyles()),OAt(t)),jAt({theme:u,truncate:n})),{color:IAt({color:e,theme:u}),fontFamily:r?"inherit":u.fontFamily,fontSize:r||E===void 0?"inherit":ye({size:E,sizes:u.fontSizes}),lineHeight:r?"inherit":i?1:u.lineHeight,textDecoration:RAt({underline:a,strikethrough:d}),WebkitTapHighlightColor:"transparent",fontWeight:r?"inherit":s,textTransform:l,textAlign:c,fontStyle:h?"italic":void 0}),gradient:{backgroundImage:m.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const VAt=HAt;var $At=Object.defineProperty,iz=Object.getOwnPropertySymbols,tSe=Object.prototype.hasOwnProperty,uSe=Object.prototype.propertyIsEnumerable,yhe=(u,e,t)=>e in u?$At(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KAt=(u,e)=>{for(var t in e||(e={}))tSe.call(e,t)&&yhe(u,t,e[t]);if(iz)for(var t of iz(e))uSe.call(e,t)&&yhe(u,t,e[t]);return u},WAt=(u,e)=>{var t={};for(var n in u)tSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iz)for(var n of iz(u))e.indexOf(n)<0&&uSe.call(u,n)&&(t[n]=u[n]);return t};const GAt={variant:"text"},nSe=C.forwardRef((u,e)=>{const t=Qe("Text",GAt,u),{className:n,size:i,weight:r,transform:a,color:o,align:s,variant:l,lineClamp:c,truncate:d,gradient:h,inline:E,inherit:m,underline:g,strikethrough:f,italic:p,classNames:D,styles:x,unstyled:b,span:k,__staticSelector:A}=t,F=WAt(t,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:S,cx:w}=VAt({color:o,lineClamp:c,truncate:d,inline:E,inherit:m,underline:g,strikethrough:f,italic:p,weight:r,transform:a,align:s,gradient:h},{unstyled:b,name:A||"Text",variant:l,size:i});return M.createElement(Ct,KAt({ref:e,className:w(S.root,{[S.gradient]:l==="gradient"},n),component:k?"span":"div"},F))});nSe.displayName="@mantine/core/Text";const _u=nSe;var UAt=Object.defineProperty,Ahe=Object.getOwnPropertySymbols,qAt=Object.prototype.hasOwnProperty,JAt=Object.prototype.propertyIsEnumerable,_he=(u,e,t)=>e in u?UAt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZAt=(u,e)=>{for(var t in e||(e={}))qAt.call(e,t)&&_he(u,t,e[t]);if(Ahe)for(var t of Ahe(e))JAt.call(e,t)&&_he(u,t,e[t]);return u};function YAt({theme:u,color:e}){return e==="dimmed"?u.fn.dimmed():u.fn.themeColor(e||u.primaryColor,u.colorScheme==="dark"?4:7,!1,!0)}var QAt=at((u,{color:e,underline:t})=>({root:ZAt({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:YAt({theme:u,color:e})},u.fn.hover({textDecoration:t?"underline":"none"}))}));const XAt=QAt;var e7t=Object.defineProperty,rz=Object.getOwnPropertySymbols,iSe=Object.prototype.hasOwnProperty,rSe=Object.prototype.propertyIsEnumerable,She=(u,e,t)=>e in u?e7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Bhe=(u,e)=>{for(var t in e||(e={}))iSe.call(e,t)&&She(u,t,e[t]);if(rz)for(var t of rz(e))rSe.call(e,t)&&She(u,t,e[t]);return u},t7t=(u,e)=>{var t={};for(var n in u)iSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rz)for(var n of rz(u))e.indexOf(n)<0&&rSe.call(u,n)&&(t[n]=u[n]);return t};const u7t={underline:!0},aSe=C.forwardRef((u,e)=>{const t=Qe("Anchor",u7t,u),{component:n,className:i,unstyled:r,variant:a,size:o,color:s,underline:l}=t,c=t7t(t,["component","className","unstyled","variant","size","color","underline"]),{classes:d,cx:h}=XAt({color:s,underline:l},{name:"Anchor",unstyled:r,variant:a,size:o}),E=n==="button"?{type:"button"}:null;return M.createElement(_u,Bhe(Bhe({component:n||"a",ref:e,className:h(d.root,i),size:o},E),c))});aSe.displayName="@mantine/core/Anchor";const f3=aSe,oSe=C.createContext({zIndex:1e3,fixed:!1,layout:"default"}),n7t=oSe.Provider;function i7t(){return C.useContext(oSe)}function sSe(u,e){if(!u)return[];const t=Object.keys(u).filter(n=>n!=="base").map(n=>[ye({size:n,sizes:e.breakpoints,units:"em"}),u[n]]);return t.sort((n,i)=>e0(n[0])-e0(i[0])),t}var r7t=Object.defineProperty,a7t=Object.defineProperties,o7t=Object.getOwnPropertyDescriptors,whe=Object.getOwnPropertySymbols,s7t=Object.prototype.hasOwnProperty,l7t=Object.prototype.propertyIsEnumerable,Lhe=(u,e,t)=>e in u?r7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TV=(u,e)=>{for(var t in e||(e={}))s7t.call(e,t)&&Lhe(u,t,e[t]);if(whe)for(var t of whe(e))l7t.call(e,t)&&Lhe(u,t,e[t]);return u},zhe=(u,e)=>a7t(u,o7t(e)),c7t=at((u,{height:e,fixed:t,position:n,zIndex:i,borderPosition:r,layout:a})=>{const o=typeof e=="object"&&e!==null?sSe(e,u).reduce((s,[l,c])=>(s[`@media (min-width: ${wl(l)})`]={height:G(c),minHeight:G(c)},s),{}):null;return{root:zhe(TV(zhe(TV(TV({},u.fn.fontStyles()),n),{zIndex:i,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof e=="object"?G(e==null?void 0:e.base)||"100%":G(e),maxHeight:typeof e=="object"?G(e==null?void 0:e.base)||"100%":G(e),position:t?"fixed":"static",boxSizing:"border-box",backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white}),o),{borderBottom:r==="bottom"?`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[2]}`:void 0,borderTop:r==="top"?`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[2]}`:void 0})}});const d7t=c7t;var h7t=Object.defineProperty,az=Object.getOwnPropertySymbols,lSe=Object.prototype.hasOwnProperty,cSe=Object.prototype.propertyIsEnumerable,Mhe=(u,e,t)=>e in u?h7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,The=(u,e)=>{for(var t in e||(e={}))lSe.call(e,t)&&Mhe(u,t,e[t]);if(az)for(var t of az(e))cSe.call(e,t)&&Mhe(u,t,e[t]);return u},E7t=(u,e)=>{var t={};for(var n in u)lSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&az)for(var n of az(u))e.indexOf(n)<0&&cSe.call(u,n)&&(t[n]=u[n]);return t};const Yue=C.forwardRef((u,e)=>{var t=u,{children:n,className:i,classNames:r,styles:a,height:o,fixed:s=!1,withBorder:l=!0,position:c,zIndex:d,section:h,unstyled:E,__staticSelector:m,variant:g}=t,f=E7t(t,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const p=i7t(),D=d||p.zIndex||fd("app"),{classes:x,cx:b,theme:k}=d7t({height:o,fixed:p.fixed||s,position:c,zIndex:typeof D=="number"&&p.layout==="default"?D+1:D,layout:p.layout,borderPosition:l?h==="header"?"bottom":"top":"none"},{name:m,classNames:r,styles:a,unstyled:E,variant:g}),A=typeof o=="object"&&o!==null?sSe(o,k).reduce((F,[S,w])=>(F[`@media (min-width: ${wl(S)})`]={[`--mantine-${h}-height`]:G(w)},F),{}):null;return M.createElement(Ct,The({component:h==="header"?"header":"footer",className:b(x.root,i),ref:e},f),n,M.createElement(Bkt,{styles:()=>({":root":The({[`--mantine-${h}-height`]:typeof o=="object"?G(o==null?void 0:o.base)||"100%":G(o)},A)})}))});Yue.displayName="@mantine/core/VerticalSection";var m7t=Object.defineProperty,g7t=Object.defineProperties,f7t=Object.getOwnPropertyDescriptors,Nhe=Object.getOwnPropertySymbols,p7t=Object.prototype.hasOwnProperty,D7t=Object.prototype.propertyIsEnumerable,Phe=(u,e,t)=>e in u?m7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,x7t=(u,e)=>{for(var t in e||(e={}))p7t.call(e,t)&&Phe(u,t,e[t]);if(Nhe)for(var t of Nhe(e))D7t.call(e,t)&&Phe(u,t,e[t]);return u},v7t=(u,e)=>g7t(u,f7t(e));const C7t={fixed:!1,position:{top:0,left:0,right:0}},dSe=C.forwardRef((u,e)=>{const t=Qe("Header",C7t,u);return M.createElement(Yue,v7t(x7t({section:"header",__staticSelector:"Header"},t),{ref:e}))});dSe.displayName="@mantine/core/Header";var b7t=Object.defineProperty,k7t=Object.defineProperties,F7t=Object.getOwnPropertyDescriptors,Rhe=Object.getOwnPropertySymbols,y7t=Object.prototype.hasOwnProperty,A7t=Object.prototype.propertyIsEnumerable,Ihe=(u,e,t)=>e in u?b7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_7t=(u,e)=>{for(var t in e||(e={}))y7t.call(e,t)&&Ihe(u,t,e[t]);if(Rhe)for(var t of Rhe(e))A7t.call(e,t)&&Ihe(u,t,e[t]);return u},S7t=(u,e)=>k7t(u,F7t(e));const B7t={fixed:!1,position:{bottom:0,left:0,right:0}},hSe=C.forwardRef((u,e)=>{const t=Qe("Footer",B7t,u);return M.createElement(Yue,S7t(_7t({section:"footer",__staticSelector:"Footer"},t),{ref:e}))});hSe.displayName="@mantine/core/Footer";var w7t=Object.defineProperty,Ohe=Object.getOwnPropertySymbols,L7t=Object.prototype.hasOwnProperty,z7t=Object.prototype.propertyIsEnumerable,jhe=(u,e,t)=>e in u?w7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ESe=(u,e)=>{for(var t in e||(e={}))L7t.call(e,t)&&jhe(u,t,e[t]);if(Ohe)for(var t of Ohe(e))z7t.call(e,t)&&jhe(u,t,e[t]);return u};function M7t(u,e){const t=ye({size:u.padding,sizes:e.spacing}),n=u.navbarOffsetBreakpoint?ye({size:u.navbarOffsetBreakpoint,sizes:e.breakpoints}):null,i=u.asideOffsetBreakpoint?ye({size:u.asideOffsetBreakpoint,sizes:e.breakpoints}):null;if(!u.fixed)return{padding:t};const r=e0(n),a=e0(i);return ESe({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${t})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${t})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${t})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${t})`},r===a?{[`@media (max-width: ${wl(r-1)})`]:{paddingLeft:t,paddingRight:t}}:{[`@media (max-width: ${wl(r-1)})`]:{paddingLeft:t},[`@media (max-width: ${wl(a-1)})`]:{paddingRight:t}})}var T7t=at((u,e)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:ESe({flex:1,width:"100vw",boxSizing:"border-box"},M7t(e,u))}));const N7t=T7t;var P7t=Object.defineProperty,oz=Object.getOwnPropertySymbols,mSe=Object.prototype.hasOwnProperty,gSe=Object.prototype.propertyIsEnumerable,Hhe=(u,e,t)=>e in u?P7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,R7t=(u,e)=>{for(var t in e||(e={}))mSe.call(e,t)&&Hhe(u,t,e[t]);if(oz)for(var t of oz(e))gSe.call(e,t)&&Hhe(u,t,e[t]);return u},I7t=(u,e)=>{var t={};for(var n in u)mSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oz)for(var n of oz(u))e.indexOf(n)<0&&gSe.call(u,n)&&(t[n]=u[n]);return t};const O7t={fixed:!0,padding:"md"},fSe=C.forwardRef((u,e)=>{const t=Qe("AppShell",O7t,u),{children:n,navbar:i,header:r,footer:a,aside:o,fixed:s,zIndex:l,padding:c,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:h,className:E,styles:m,classNames:g,unstyled:f,hidden:p,layout:D,variant:x}=t,b=I7t(t,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:k,cx:A}=N7t({padding:c,fixed:s,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:h},{styles:m,classNames:g,unstyled:f,name:"AppShell",variant:x});return p?M.createElement(M.Fragment,null,n):M.createElement(n7t,{value:{fixed:s,zIndex:l,layout:D}},M.createElement(Ct,R7t({className:A(k.root,E),ref:e},b),r,M.createElement("div",{className:k.body},i,M.createElement("main",{className:k.main},n),o),a))});fSe.displayName="@mantine/core/AppShell";const M_={xs:G(1),sm:G(2),md:G(3),lg:G(4),xl:G(5)};function T_(u,e){const t=u.fn.variant({variant:"outline",color:e}).border;return typeof e=="string"&&(e in u.colors||e.split(".")[0]in u.colors)?t:e===void 0?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]:e}var j7t=at((u,{color:e},{size:t,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:G(1),borderTop:`${ye({size:t,sizes:M_})} ${n} ${T_(u,e)}`,marginRight:u.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${ye({size:t,sizes:M_})} ${n} ${T_(u,e)}`,marginLeft:u.spacing.xs}},labelDefaultStyles:{color:e==="dark"?u.colors.dark[1]:u.fn.themeColor(e,u.colorScheme==="dark"?5:u.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:G(ye({size:t,sizes:M_})),borderTopColor:T_(u,e),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:G(ye({size:t,sizes:M_})),borderLeftColor:T_(u,e),borderLeftStyle:n}}));const H7t=j7t;var V7t=Object.defineProperty,$7t=Object.defineProperties,K7t=Object.getOwnPropertyDescriptors,sz=Object.getOwnPropertySymbols,pSe=Object.prototype.hasOwnProperty,DSe=Object.prototype.propertyIsEnumerable,Vhe=(u,e,t)=>e in u?V7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$he=(u,e)=>{for(var t in e||(e={}))pSe.call(e,t)&&Vhe(u,t,e[t]);if(sz)for(var t of sz(e))DSe.call(e,t)&&Vhe(u,t,e[t]);return u},W7t=(u,e)=>$7t(u,K7t(e)),G7t=(u,e)=>{var t={};for(var n in u)pSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&sz)for(var n of sz(u))e.indexOf(n)<0&&DSe.call(u,n)&&(t[n]=u[n]);return t};const U7t={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},lz=C.forwardRef((u,e)=>{const t=Qe("Divider",U7t,u),{className:n,color:i,orientation:r,size:a,label:o,labelPosition:s,labelProps:l,variant:c,styles:d,classNames:h,unstyled:E}=t,m=G7t(t,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:g,cx:f}=H7t({color:i},{classNames:h,styles:d,unstyled:E,name:"Divider",variant:c,size:a}),p=r==="vertical",D=r==="horizontal",x=!!o&&D,b=!(l!=null&&l.color);return M.createElement(Ct,$he({ref:e,className:f(g.root,{[g.vertical]:p,[g.horizontal]:D,[g.withLabel]:x},n),role:"separator"},m),x&&M.createElement(_u,W7t($he({},l),{size:(l==null?void 0:l.size)||"xs",mt:G(2),className:f(g.label,g[s],{[g.labelDefaultStyles]:b})}),o))});lz.displayName="@mantine/core/Divider";var q7t=Object.defineProperty,J7t=Object.defineProperties,Z7t=Object.getOwnPropertyDescriptors,Khe=Object.getOwnPropertySymbols,Y7t=Object.prototype.hasOwnProperty,Q7t=Object.prototype.propertyIsEnumerable,Whe=(u,e,t)=>e in u?q7t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ghe=(u,e)=>{for(var t in e||(e={}))Y7t.call(e,t)&&Whe(u,t,e[t]);if(Khe)for(var t of Khe(e))Q7t.call(e,t)&&Whe(u,t,e[t]);return u},X7t=(u,e)=>J7t(u,Z7t(e)),e9t=at((u,e,{size:t})=>({item:X7t(Ghe({},u.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${ye({size:t,sizes:u.spacing})} / 1.5) ${ye({size:t,sizes:u.spacing})}`,cursor:"pointer",fontSize:ye({size:t,sizes:u.fontSizes}),color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,borderRadius:u.fn.radius(),"&[data-hovered]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[1]},"&[data-selected]":Ghe({backgroundColor:u.fn.variant({variant:"filled"}).background,color:u.fn.variant({variant:"filled"}).color},u.fn.hover({backgroundColor:u.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:u.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:u.colors.gray[6],paddingTop:`calc(${ye({size:t,sizes:u.spacing})} / 2)`,paddingBottom:`calc(${ye({size:t,sizes:u.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${ye({size:t,sizes:u.spacing})} / 1.5) ${ye({size:t,sizes:u.spacing})}`},separatorLabel:{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}}));const t9t=e9t;var u9t=Object.defineProperty,Uhe=Object.getOwnPropertySymbols,n9t=Object.prototype.hasOwnProperty,i9t=Object.prototype.propertyIsEnumerable,qhe=(u,e,t)=>e in u?u9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,r9t=(u,e)=>{for(var t in e||(e={}))n9t.call(e,t)&&qhe(u,t,e[t]);if(Uhe)for(var t of Uhe(e))i9t.call(e,t)&&qhe(u,t,e[t]);return u};function Que({data:u,hovered:e,classNames:t,styles:n,isItemSelected:i,uuid:r,__staticSelector:a,onItemHover:o,onItemSelect:s,itemsRefs:l,itemComponent:c,size:d,nothingFound:h,creatable:E,createLabel:m,unstyled:g,variant:f}){const{classes:p}=t9t(null,{classNames:t,styles:n,unstyled:g,name:a,variant:f,size:d}),D=[],x=[];let b=null;const k=(F,S)=>{const w=typeof i=="function"?i(F.value):!1;return M.createElement(c,r9t({key:F.value,className:p.item,"data-disabled":F.disabled||void 0,"data-hovered":!F.disabled&&e===S||void 0,"data-selected":!F.disabled&&w||void 0,selected:w,onMouseEnter:()=>o(S),id:`${r}-${S}`,role:"option",tabIndex:-1,"aria-selected":e===S,ref:z=>{l&&l.current&&(l.current[F.value]=z)},onMouseDown:F.disabled?null:z=>{z.preventDefault(),s(F)},disabled:F.disabled,variant:f},F))};let A=null;if(u.forEach((F,S)=>{F.creatable?b=S:F.group?(A!==F.group&&(A=F.group,x.push(M.createElement("div",{className:p.separator,key:`__mantine-divider-${S}`},M.createElement(lz,{classNames:{label:p.separatorLabel},label:F.group})))),x.push(k(F,S))):D.push(k(F,S))}),E){const F=u[b];D.push(M.createElement("div",{key:i4(),className:p.item,"data-hovered":e===b||void 0,onMouseEnter:()=>o(b),onMouseDown:S=>{S.preventDefault(),s(F)},tabIndex:-1,ref:S=>{l&&l.current&&(l.current[F.value]=S)}},m))}return x.length>0&&D.length>0&&D.unshift(M.createElement("div",{className:p.separator,key:"empty-group-separator"},M.createElement(lz,null))),x.length>0||D.length>0?M.createElement(M.Fragment,null,x,D):M.createElement(_u,{size:d,unstyled:g,className:p.nothingFound},h)}Que.displayName="@mantine/core/SelectItems";var a9t=Object.defineProperty,cz=Object.getOwnPropertySymbols,xSe=Object.prototype.hasOwnProperty,vSe=Object.prototype.propertyIsEnumerable,Jhe=(u,e,t)=>e in u?a9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,o9t=(u,e)=>{for(var t in e||(e={}))xSe.call(e,t)&&Jhe(u,t,e[t]);if(cz)for(var t of cz(e))vSe.call(e,t)&&Jhe(u,t,e[t]);return u},s9t=(u,e)=>{var t={};for(var n in u)xSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cz)for(var n of cz(u))e.indexOf(n)<0&&vSe.call(u,n)&&(t[n]=u[n]);return t};const Xue=C.forwardRef((u,e)=>{var t=u,{label:n,value:i}=t,r=s9t(t,["label","value"]);return M.createElement("div",o9t({ref:e},r),n||i)});Xue.displayName="@mantine/core/DefaultItem";function l9t(u,e){typeof u=="function"?u(e):u!=null&&(u.current=e)}function CSe(...u){return e=>u.forEach(t=>l9t(t,e))}function Up(...u){return C.useCallback(CSe(...u),u)}const bSe=C.forwardRef((u,e)=>{const{children:t,...n}=u,i=C.Children.toArray(t),r=i.find(d9t);if(r){const a=r.props.children,o=i.map(s=>s===r?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:s);return C.createElement(kZ,vt({},n,{ref:e}),C.isValidElement(a)?C.cloneElement(a,void 0,o):null)}return C.createElement(kZ,vt({},n,{ref:e}),t)});bSe.displayName="Slot";const kZ=C.forwardRef((u,e)=>{const{children:t,...n}=u;return C.isValidElement(t)?C.cloneElement(t,{...h9t(n,t.props),ref:CSe(e,t.ref)}):C.Children.count(t)>1?C.Children.only(null):null});kZ.displayName="SlotClone";const c9t=({children:u})=>C.createElement(C.Fragment,null,u);function d9t(u){return C.isValidElement(u)&&u.type===c9t}function h9t(u,e){const t={...e};for(const n in e){const i=u[n],r=e[n];/^on[A-Z]/.test(n)?i&&r?t[n]=(...o)=>{r(...o),i(...o)}:i&&(t[n]=i):n==="style"?t[n]={...i,...r}:n==="className"&&(t[n]=[i,r].filter(Boolean).join(" "))}return{...u,...t}}const E9t=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],e7=E9t.reduce((u,e)=>{const t=C.forwardRef((n,i)=>{const{asChild:r,...a}=n,o=r?bSe:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(o,vt({},a,{ref:i}))});return t.displayName=`Primitive.${e}`,{...u,[e]:t}},{}),FZ=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function m9t(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const t7=u=>{const{present:e,children:t}=u,n=g9t(e),i=typeof t=="function"?t({present:n.isPresent}):C.Children.only(t),r=Up(n.ref,i.ref);return typeof t=="function"||n.isPresent?C.cloneElement(i,{ref:r}):null};t7.displayName="Presence";function g9t(u){const[e,t]=C.useState(),n=C.useRef({}),i=C.useRef(u),r=C.useRef("none"),a=u?"mounted":"unmounted",[o,s]=m9t(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=N_(n.current);r.current=o==="mounted"?l:"none"},[o]),FZ(()=>{const l=n.current,c=i.current;if(c!==u){const h=r.current,E=N_(l);u?s("MOUNT"):E==="none"||(l==null?void 0:l.display)==="none"?s("UNMOUNT"):s(c&&h!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=u}},[u,s]),FZ(()=>{if(e){const l=d=>{const E=N_(n.current).includes(d.animationName);d.target===e&&E&&is.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===e&&(r.current=N_(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function N_(u){return(u==null?void 0:u.animationName)||"none"}function f9t(u,e=[]){let t=[];function n(r,a){const o=C.createContext(a),s=t.length;t=[...t,a];function l(d){const{scope:h,children:E,...m}=d,g=(h==null?void 0:h[u][s])||o,f=C.useMemo(()=>m,Object.values(m));return C.createElement(g.Provider,{value:f},E)}function c(d,h){const E=(h==null?void 0:h[u][s])||o,m=C.useContext(E);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",[l,c]}const i=()=>{const r=t.map(a=>C.createContext(a));return function(o){const s=(o==null?void 0:o[u])||r;return C.useMemo(()=>({[`__scope${u}`]:{...o,[u]:s}}),[o,s])}};return i.scopeName=u,[n,p9t(i,...e)]}function p9t(...u){const e=u[0];if(u.length===1)return e;const t=()=>{const n=u.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const a=n.reduce((o,{useScope:s,scopeName:l})=>{const d=s(r)[`__scope${l}`];return{...o,...d}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return t.scopeName=e.scopeName,t}function Lf(u){const e=C.useRef(u);return C.useEffect(()=>{e.current=u}),C.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}const D9t=C.createContext(void 0);function x9t(u){const e=C.useContext(D9t);return u||e||"ltr"}function v9t(u,[e,t]){return Math.min(t,Math.max(e,u))}function p3(u,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(u==null||u(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function C9t(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const kSe="ScrollArea",[FSe,QUn]=f9t(kSe),[b9t,Zl]=FSe(kSe),k9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,type:n="hover",dir:i,scrollHideDelay:r=600,...a}=u,[o,s]=C.useState(null),[l,c]=C.useState(null),[d,h]=C.useState(null),[E,m]=C.useState(null),[g,f]=C.useState(null),[p,D]=C.useState(0),[x,b]=C.useState(0),[k,A]=C.useState(!1),[F,S]=C.useState(!1),w=Up(e,N=>s(N)),z=x9t(i);return C.createElement(b9t,{scope:t,type:n,dir:z,scrollHideDelay:r,scrollArea:o,viewport:l,onViewportChange:c,content:d,onContentChange:h,scrollbarX:E,onScrollbarXChange:m,scrollbarXEnabled:k,onScrollbarXEnabledChange:A,scrollbarY:g,onScrollbarYChange:f,scrollbarYEnabled:F,onScrollbarYEnabledChange:S,onCornerWidthChange:D,onCornerHeightChange:b},C.createElement(e7.div,vt({dir:z},a,{ref:w,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":x+"px",...u.style}})))}),F9t="ScrollAreaViewport",y9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,children:n,...i}=u,r=Zl(F9t,t),a=C.useRef(null),o=Up(e,a,r.onViewportChange);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(e7.div,vt({"data-radix-scroll-area-viewport":""},i,{ref:o,style:{overflowX:r.scrollbarXEnabled?"scroll":"hidden",overflowY:r.scrollbarYEnabled?"scroll":"hidden",...u.style}}),C.createElement("div",{ref:r.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),z4="ScrollAreaScrollbar",A9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=u.orientation==="horizontal";return C.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?C.createElement(_9t,vt({},n,{ref:e,forceMount:t})):i.type==="scroll"?C.createElement(S9t,vt({},n,{ref:e,forceMount:t})):i.type==="auto"?C.createElement(ySe,vt({},n,{ref:e,forceMount:t})):i.type==="always"?C.createElement(ene,vt({},n,{ref:e})):null}),_9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),[r,a]=C.useState(!1);return C.useEffect(()=>{const o=i.scrollArea;let s=0;if(o){const l=()=>{window.clearTimeout(s),a(!0)},c=()=>{s=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",l),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(s),o.removeEventListener("pointerenter",l),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),C.createElement(t7,{present:t||r},C.createElement(ySe,vt({"data-state":r?"visible":"hidden"},n,{ref:e})))}),S9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=Zl(z4,u.__scopeScrollArea),r=u.orientation==="horizontal",a=wI(()=>s("SCROLL_END"),100),[o,s]=C9t("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return C.useEffect(()=>{if(o==="idle"){const l=window.setTimeout(()=>s("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[o,i.scrollHideDelay,s]),C.useEffect(()=>{const l=i.viewport,c=r?"scrollLeft":"scrollTop";if(l){let d=l[c];const h=()=>{const E=l[c];d!==E&&(s("SCROLL"),a()),d=E};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,r,s,a]),C.createElement(t7,{present:t||o!=="hidden"},C.createElement(ene,vt({"data-state":o==="hidden"?"hidden":"visible"},n,{ref:e,onPointerEnter:p3(u.onPointerEnter,()=>s("POINTER_ENTER")),onPointerLeave:p3(u.onPointerLeave,()=>s("POINTER_LEAVE"))})))}),ySe=C.forwardRef((u,e)=>{const t=Zl(z4,u.__scopeScrollArea),{forceMount:n,...i}=u,[r,a]=C.useState(!1),o=u.orientation==="horizontal",s=wI(()=>{if(t.viewport){const l=t.viewport.offsetWidth{const{orientation:t="vertical",...n}=u,i=Zl(z4,u.__scopeScrollArea),r=C.useRef(null),a=C.useRef(0),[o,s]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=BSe(o.viewport,o.content),c={...n,sizes:o,onSizesChange:s,hasThumb:l>0&&l<1,onThumbChange:h=>r.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function d(h,E){return P9t(h,a.current,o,E)}return t==="horizontal"?C.createElement(B9t,vt({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&r.current){const h=i.viewport.scrollLeft,E=Zhe(h,o,i.dir);r.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=d(h,i.dir))}})):t==="vertical"?C.createElement(w9t,vt({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&r.current){const h=i.viewport.scrollTop,E=Zhe(h,o);r.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=d(h))}})):null}),B9t=C.forwardRef((u,e)=>{const{sizes:t,onSizesChange:n,...i}=u,r=Zl(z4,u.__scopeScrollArea),[a,o]=C.useState(),s=C.useRef(null),l=Up(e,s,r.onScrollbarXChange);return C.useEffect(()=>{s.current&&o(getComputedStyle(s.current))},[s]),C.createElement(_Se,vt({"data-orientation":"horizontal"},i,{ref:l,sizes:t,style:{bottom:0,left:r.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:r.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":BI(t)+"px",...u.style},onThumbPointerDown:c=>u.onThumbPointerDown(c.x),onDragScroll:c=>u.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(r.viewport){const h=r.viewport.scrollLeft+c.deltaX;u.onWheelScroll(h),LSe(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&a&&n({content:r.viewport.scrollWidth,viewport:r.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:dz(a.paddingLeft),paddingEnd:dz(a.paddingRight)}})}}))}),w9t=C.forwardRef((u,e)=>{const{sizes:t,onSizesChange:n,...i}=u,r=Zl(z4,u.__scopeScrollArea),[a,o]=C.useState(),s=C.useRef(null),l=Up(e,s,r.onScrollbarYChange);return C.useEffect(()=>{s.current&&o(getComputedStyle(s.current))},[s]),C.createElement(_Se,vt({"data-orientation":"vertical"},i,{ref:l,sizes:t,style:{top:0,right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":BI(t)+"px",...u.style},onThumbPointerDown:c=>u.onThumbPointerDown(c.y),onDragScroll:c=>u.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(r.viewport){const h=r.viewport.scrollTop+c.deltaY;u.onWheelScroll(h),LSe(h,d)&&c.preventDefault()}},onResize:()=>{s.current&&r.viewport&&a&&n({content:r.viewport.scrollHeight,viewport:r.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:dz(a.paddingTop),paddingEnd:dz(a.paddingBottom)}})}}))}),[L9t,ASe]=FSe(z4),_Se=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,sizes:n,hasThumb:i,onThumbChange:r,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...h}=u,E=Zl(z4,t),[m,g]=C.useState(null),f=Up(e,w=>g(w)),p=C.useRef(null),D=C.useRef(""),x=E.viewport,b=n.content-n.viewport,k=Lf(c),A=Lf(s),F=wI(d,10);function S(w){if(p.current){const z=w.clientX-p.current.left,N=w.clientY-p.current.top;l({x:z,y:N})}}return C.useEffect(()=>{const w=z=>{const N=z.target;(m==null?void 0:m.contains(N))&&k(z,b)};return document.addEventListener("wheel",w,{passive:!1}),()=>document.removeEventListener("wheel",w,{passive:!1})},[x,m,b,k]),C.useEffect(A,[n,A]),$v(m,F),$v(E.content,F),C.createElement(L9t,{scope:t,scrollbar:m,hasThumb:i,onThumbChange:Lf(r),onThumbPointerUp:Lf(a),onThumbPositionChange:A,onThumbPointerDown:Lf(o)},C.createElement(e7.div,vt({},h,{ref:f,style:{position:"absolute",...h.style},onPointerDown:p3(u.onPointerDown,w=>{w.button===0&&(w.target.setPointerCapture(w.pointerId),p.current=m.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S(w))}),onPointerMove:p3(u.onPointerMove,S),onPointerUp:p3(u.onPointerUp,w=>{const z=w.target;z.hasPointerCapture(w.pointerId)&&z.releasePointerCapture(w.pointerId),document.body.style.webkitUserSelect=D.current,p.current=null})})))}),yZ="ScrollAreaThumb",z9t=C.forwardRef((u,e)=>{const{forceMount:t,...n}=u,i=ASe(yZ,u.__scopeScrollArea);return C.createElement(t7,{present:t||i.hasThumb},C.createElement(M9t,vt({ref:e},n)))}),M9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,style:n,...i}=u,r=Zl(yZ,t),a=ASe(yZ,t),{onThumbPositionChange:o}=a,s=Up(e,d=>a.onThumbChange(d)),l=C.useRef(),c=wI(()=>{l.current&&(l.current(),l.current=void 0)},100);return C.useEffect(()=>{const d=r.viewport;if(d){const h=()=>{if(c(),!l.current){const E=R9t(d,o);l.current=E,o()}};return o(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[r.viewport,c,o]),C.createElement(e7.div,vt({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:p3(u.onPointerDownCapture,d=>{const E=d.target.getBoundingClientRect(),m=d.clientX-E.left,g=d.clientY-E.top;a.onThumbPointerDown({x:m,y:g})}),onPointerUp:p3(u.onPointerUp,a.onThumbPointerUp)}))}),SSe="ScrollAreaCorner",T9t=C.forwardRef((u,e)=>{const t=Zl(SSe,u.__scopeScrollArea),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!=="scroll"&&n?C.createElement(N9t,vt({},u,{ref:e})):null}),N9t=C.forwardRef((u,e)=>{const{__scopeScrollArea:t,...n}=u,i=Zl(SSe,t),[r,a]=C.useState(0),[o,s]=C.useState(0),l=!!(r&&o);return $v(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),s(d)}),$v(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),l?C.createElement(e7.div,vt({},n,{ref:e,style:{width:r,height:o,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...u.style}})):null});function dz(u){return u?parseInt(u,10):0}function BSe(u,e){const t=u/e;return isNaN(t)?0:t}function BI(u){const e=BSe(u.viewport,u.content),t=u.scrollbar.paddingStart+u.scrollbar.paddingEnd,n=(u.scrollbar.size-t)*e;return Math.max(n,18)}function P9t(u,e,t,n="ltr"){const i=BI(t),r=i/2,a=e||r,o=i-a,s=t.scrollbar.paddingStart+a,l=t.scrollbar.size-t.scrollbar.paddingEnd-o,c=t.content-t.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return wSe([s,l],d)(u)}function Zhe(u,e,t="ltr"){const n=BI(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=e.scrollbar.size-i,a=e.content-e.viewport,o=r-n,s=t==="ltr"?[0,a]:[a*-1,0],l=v9t(u,s);return wSe([0,a],[0,o])(l)}function wSe(u,e){return t=>{if(u[0]===u[1]||e[0]===e[1])return e[0];const n=(e[1]-e[0])/(u[1]-u[0]);return e[0]+n*(t-u[0])}}function LSe(u,e){return u>0&&u{})=>{let t={left:u.scrollLeft,top:u.scrollTop},n=0;return function i(){const r={left:u.scrollLeft,top:u.scrollTop},a=t.left!==r.left,o=t.top!==r.top;(a||o)&&e(),t=r,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function wI(u,e){const t=Lf(u),n=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(n.current),[]),C.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(t,e)},[t,e])}function $v(u,e){const t=Lf(e);FZ(()=>{let n=0;if(u){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(t)});return i.observe(u),()=>{window.cancelAnimationFrame(n),i.unobserve(u)}}},[u,t])}const I9t=k9t,O9t=y9t,Yhe=A9t,Qhe=z9t,j9t=T9t;var H9t=at((u,{scrollbarSize:e,offsetScrollbars:t,scrollbarHovered:n,hidden:i})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:t?G(e):void 0,paddingBottom:t?G(e):void 0},scrollbar:{display:i?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${G(e)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0],[`& .${v1("thumb")}`]:{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.white,.5):u.fn.rgba(u.black,.5)}},'&[data-orientation="vertical"]':{width:G(e)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:G(e)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:v1("thumb"),flex:1,backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.white,.4):u.fn.rgba(u.black,.4),borderRadius:G(e),position:"relative",transition:"background-color 150ms ease",display:i?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:G(44),minHeight:G(44)}},corner:{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:i?"none":void 0}}));const V9t=H9t;var $9t=Object.defineProperty,K9t=Object.defineProperties,W9t=Object.getOwnPropertyDescriptors,hz=Object.getOwnPropertySymbols,zSe=Object.prototype.hasOwnProperty,MSe=Object.prototype.propertyIsEnumerable,Xhe=(u,e,t)=>e in u?$9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,AZ=(u,e)=>{for(var t in e||(e={}))zSe.call(e,t)&&Xhe(u,t,e[t]);if(hz)for(var t of hz(e))MSe.call(e,t)&&Xhe(u,t,e[t]);return u},TSe=(u,e)=>K9t(u,W9t(e)),NSe=(u,e)=>{var t={};for(var n in u)zSe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&hz)for(var n of hz(u))e.indexOf(n)<0&&MSe.call(u,n)&&(t[n]=u[n]);return t};const PSe={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},LI=C.forwardRef((u,e)=>{const t=Qe("ScrollArea",PSe,u),{children:n,className:i,classNames:r,styles:a,scrollbarSize:o,scrollHideDelay:s,type:l,dir:c,offsetScrollbars:d,viewportRef:h,onScrollPositionChange:E,unstyled:m,variant:g,viewportProps:f}=t,p=NSe(t,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[D,x]=C.useState(!1),b=jr(),{classes:k,cx:A}=V9t({scrollbarSize:o,offsetScrollbars:d,scrollbarHovered:D,hidden:l==="never"},{name:"ScrollArea",classNames:r,styles:a,unstyled:m,variant:g});return M.createElement(I9t,{type:l==="never"?"always":l,scrollHideDelay:s,dir:c||b.dir,ref:e,asChild:!0},M.createElement(Ct,AZ({className:A(k.root,i)},p),M.createElement(O9t,TSe(AZ({},f),{className:k.viewport,ref:h,onScroll:typeof E=="function"?({currentTarget:F})=>E({x:F.scrollLeft,y:F.scrollTop}):void 0}),n),M.createElement(Yhe,{orientation:"horizontal",className:k.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},M.createElement(Qhe,{className:k.thumb})),M.createElement(Yhe,{orientation:"vertical",className:k.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},M.createElement(Qhe,{className:k.thumb})),M.createElement(j9t,{className:k.corner})))}),RSe=C.forwardRef((u,e)=>{const t=Qe("ScrollAreaAutosize",PSe,u),{children:n,classNames:i,styles:r,scrollbarSize:a,scrollHideDelay:o,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:h,unstyled:E,sx:m,variant:g,viewportProps:f}=t,p=NSe(t,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return M.createElement(Ct,TSe(AZ({},p),{ref:e,sx:[{display:"flex"},...EI(m)]}),M.createElement(Ct,{sx:{display:"flex",flexDirection:"column",flex:1}},M.createElement(LI,{classNames:i,styles:r,scrollHideDelay:o,scrollbarSize:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:h,unstyled:E,variant:g,viewportProps:f},n)))});RSe.displayName="@mantine/core/ScrollAreaAutosize";LI.displayName="@mantine/core/ScrollArea";LI.Autosize=RSe;const QF=LI;var G9t=Object.defineProperty,U9t=Object.defineProperties,q9t=Object.getOwnPropertyDescriptors,Ez=Object.getOwnPropertySymbols,ISe=Object.prototype.hasOwnProperty,OSe=Object.prototype.propertyIsEnumerable,e4e=(u,e,t)=>e in u?G9t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,t4e=(u,e)=>{for(var t in e||(e={}))ISe.call(e,t)&&e4e(u,t,e[t]);if(Ez)for(var t of Ez(e))OSe.call(e,t)&&e4e(u,t,e[t]);return u},J9t=(u,e)=>U9t(u,q9t(e)),Z9t=(u,e)=>{var t={};for(var n in u)ISe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Ez)for(var n of Ez(u))e.indexOf(n)<0&&OSe.call(u,n)&&(t[n]=u[n]);return t};const zI=C.forwardRef((u,e)=>{var t=u,{style:n}=t,i=Z9t(t,["style"]);return M.createElement(QF,J9t(t4e({},i),{style:t4e({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:e}),i.children)});zI.displayName="@mantine/core/SelectScrollArea";var Y9t=at(()=>({dropdown:{},itemsWrapper:{padding:G(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const Q9t=Y9t;var X9t=function(u){if(typeof document>"u")return null;var e=Array.isArray(u)?u[0]:u;return e.ownerDocument.body},zD=new WeakMap,P_=new WeakMap,R_={},NV=0,jSe=function(u){return u&&(u.host||jSe(u.parentNode))},e_t=function(u,e){return e.map(function(t){if(u.contains(t))return t;var n=jSe(t);return n&&u.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",u,". Doing nothing"),null)}).filter(function(t){return!!t})},t_t=function(u,e,t,n){var i=e_t(e,Array.isArray(u)?u:[u]);R_[t]||(R_[t]=new WeakMap);var r=R_[t],a=[],o=new Set,s=new Set(i),l=function(d){!d||o.has(d)||(o.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||s.has(d)||Array.prototype.forEach.call(d.children,function(h){if(o.has(h))c(h);else{var E=h.getAttribute(n),m=E!==null&&E!=="false",g=(zD.get(h)||0)+1,f=(r.get(h)||0)+1;zD.set(h,g),r.set(h,f),a.push(h),g===1&&m&&P_.set(h,!0),f===1&&h.setAttribute(t,"true"),m||h.setAttribute(n,"true")}})};return c(e),o.clear(),NV++,function(){a.forEach(function(d){var h=zD.get(d)-1,E=r.get(d)-1;zD.set(d,h),r.set(d,E),h||(P_.has(d)||d.removeAttribute(n),P_.delete(d)),E||d.removeAttribute(t)}),NV--,NV||(zD=new WeakMap,zD=new WeakMap,P_=new WeakMap,R_={})}},HSe=function(u,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(u)?u:[u]),i=e||X9t(u);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),t_t(n,i,t,"aria-hidden")):function(){return null}};const u_t=["top","right","bottom","left"],id=Math.min,Bo=Math.max,mz=Math.round,I_=Math.floor,ag=u=>({x:u,y:u}),n_t={left:"right",right:"left",bottom:"top",top:"bottom"},i_t={start:"end",end:"start"};function _Z(u,e,t){return Bo(u,id(e,t))}function P1(u,e){return typeof u=="function"?u(e):u}function rd(u){return u.split("-")[0]}function T6(u){return u.split("-")[1]}function tne(u){return u==="x"?"y":"x"}function une(u){return u==="y"?"height":"width"}function qp(u){return["top","bottom"].includes(rd(u))?"y":"x"}function nne(u){return tne(qp(u))}function r_t(u,e,t){t===void 0&&(t=!1);const n=T6(u),i=nne(u),r=une(i);let a=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=gz(a)),[a,gz(a)]}function a_t(u){const e=gz(u);return[SZ(u),e,SZ(e)]}function SZ(u){return u.replace(/start|end/g,e=>i_t[e])}function o_t(u,e,t){const n=["left","right"],i=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(u){case"top":case"bottom":return t?e?i:n:e?n:i;case"left":case"right":return e?r:a;default:return[]}}function s_t(u,e,t,n){const i=T6(u);let r=o_t(rd(u),t==="start",n);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(SZ)))),r}function gz(u){return u.replace(/left|right|bottom|top/g,e=>n_t[e])}function l_t(u){return{top:0,right:0,bottom:0,left:0,...u}}function ine(u){return typeof u!="number"?l_t(u):{top:u,right:u,bottom:u,left:u}}function Kv(u){return{...u,top:u.y,left:u.x,right:u.x+u.width,bottom:u.y+u.height}}function u4e(u,e,t){let{reference:n,floating:i}=u;const r=qp(e),a=nne(e),o=une(a),s=rd(e),l=r==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[o]/2-i[o]/2;let E;switch(s){case"top":E={x:c,y:n.y-i.height};break;case"bottom":E={x:c,y:n.y+n.height};break;case"right":E={x:n.x+n.width,y:d};break;case"left":E={x:n.x-i.width,y:d};break;default:E={x:n.x,y:n.y}}switch(T6(e)){case"start":E[a]-=h*(t&&l?-1:1);break;case"end":E[a]+=h*(t&&l?-1:1);break}return E}const c_t=async(u,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:a}=t,o=r.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:u,floating:e,strategy:i}),{x:c,y:d}=u4e(l,n,s),h=n,E={},m=0;for(let g=0;g({name:"arrow",options:u,async fn(e){const{x:t,y:n,placement:i,rects:r,platform:a,elements:o}=e,{element:s,padding:l=0}=P1(u,e)||{};if(s==null)return{};const c=ine(l),d={x:t,y:n},h=nne(i),E=une(h),m=await a.getDimensions(s),g=h==="y",f=g?"top":"left",p=g?"bottom":"right",D=g?"clientHeight":"clientWidth",x=r.reference[E]+r.reference[h]-d[h]-r.floating[E],b=d[h]-r.reference[h],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s));let A=k?k[D]:0;(!A||!await(a.isElement==null?void 0:a.isElement(k)))&&(A=o.floating[D]||r.floating[E]);const F=x/2-b/2,S=A/2-m[E]/2-1,w=id(c[f],S),z=id(c[p],S),N=w,O=A-m[E]-z,y=A/2-m[E]/2+F,_=_Z(N,y,O),T=T6(i)!=null&&y!=_&&r.reference[E]/2-(yN<=0)){var S,w;const N=(((S=i.flip)==null?void 0:S.index)||0)+1,O=b[N];if(O)return{data:{index:N,overflows:F},reset:{placement:O}};let y=(w=F.filter(_=>_.overflows[0]<=0).sort((_,L)=>_.overflows[1]-L.overflows[1])[0])==null?void 0:w.placement;if(!y)switch(h){case"bestFit":{var z;const _=(z=F.map(L=>[L.placement,L.overflows.filter(T=>T>0).reduce((T,R)=>T+R,0)]).sort((L,T)=>L[1]-T[1])[0])==null?void 0:z[0];_&&(y=_);break}case"initialPlacement":y=a;break}if(n!==y)return{reset:{placement:y}}}return{}}}};function n4e(u,e){return{top:u.top-e.height,right:u.right-e.width,bottom:u.bottom-e.height,left:u.left-e.width}}function i4e(u){return u_t.some(e=>u[e]>=0)}const d_t=function(u){return u===void 0&&(u={}),{name:"hide",options:u,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...i}=P1(u,e);switch(n){case"referenceHidden":{const r=await XF(e,{...i,elementContext:"reference"}),a=n4e(r,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:i4e(a)}}}case"escaped":{const r=await XF(e,{...i,altBoundary:!0}),a=n4e(r,t.floating);return{data:{escapedOffsets:a,escaped:i4e(a)}}}default:return{}}}}};function VSe(u){const e=id(...u.map(r=>r.left)),t=id(...u.map(r=>r.top)),n=Bo(...u.map(r=>r.right)),i=Bo(...u.map(r=>r.bottom));return{x:e,y:t,width:n-e,height:i-t}}function h_t(u){const e=u.slice().sort((i,r)=>i.y-r.y),t=[];let n=null;for(let i=0;in.height/2?t.push([r]):t[t.length-1].push(r),n=r}return t.map(i=>Kv(VSe(i)))}const $Se=function(u){return u===void 0&&(u={}),{name:"inline",options:u,async fn(e){const{placement:t,elements:n,rects:i,platform:r,strategy:a}=e,{padding:o=2,x:s,y:l}=P1(u,e),c=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),d=h_t(c),h=Kv(VSe(c)),E=ine(o);function m(){if(d.length===2&&d[0].left>d[1].right&&s!=null&&l!=null)return d.find(f=>s>f.left-E.left&&sf.top-E.top&&l=2){if(qp(t)==="y"){const z=d[0],N=d[d.length-1],O=rd(t)==="top",y=z.top,_=N.bottom,L=O?z.left:N.left,T=O?z.right:N.right,R=T-L,I=_-y;return{top:y,bottom:_,left:L,right:T,width:R,height:I,x:L,y}}const f=rd(t)==="left",p=Bo(...d.map(z=>z.right)),D=id(...d.map(z=>z.left)),x=d.filter(z=>f?z.left===D:z.right===p),b=x[0].top,k=x[x.length-1].bottom,A=D,F=p,S=F-A,w=k-b;return{top:b,bottom:k,left:A,right:F,width:S,height:w,x:A,y:b}}return h}const g=await r.getElementRects({reference:{getBoundingClientRect:m},floating:n.floating,strategy:a});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}};async function E_t(u,e){const{placement:t,platform:n,elements:i}=u,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=rd(t),o=T6(t),s=qp(t)==="y",l=["left","top"].includes(a)?-1:1,c=r&&s?-1:1,d=P1(e,u);let{mainAxis:h,crossAxis:E,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return o&&typeof m=="number"&&(E=o==="end"?m*-1:m),s?{x:E*c,y:h*l}:{x:h*l,y:E*c}}const ane=function(u){return u===void 0&&(u=0),{name:"offset",options:u,async fn(e){const{x:t,y:n}=e,i=await E_t(e,u);return{x:t+i.x,y:n+i.y,data:i}}}},MI=function(u){return u===void 0&&(u={}),{name:"shift",options:u,async fn(e){const{x:t,y:n,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:o={fn:f=>{let{x:p,y:D}=f;return{x:p,y:D}}},...s}=P1(u,e),l={x:t,y:n},c=await XF(e,s),d=qp(rd(i)),h=tne(d);let E=l[h],m=l[d];if(r){const f=h==="y"?"top":"left",p=h==="y"?"bottom":"right",D=E+c[f],x=E-c[p];E=_Z(D,E,x)}if(a){const f=d==="y"?"top":"left",p=d==="y"?"bottom":"right",D=m+c[f],x=m-c[p];m=_Z(D,m,x)}const g=o.fn({...e,[h]:E,[d]:m});return{...g,data:{x:g.x-t,y:g.y-n}}}}},KSe=function(u){return u===void 0&&(u={}),{options:u,fn(e){const{x:t,y:n,placement:i,rects:r,middlewareData:a}=e,{offset:o=0,mainAxis:s=!0,crossAxis:l=!0}=P1(u,e),c={x:t,y:n},d=qp(i),h=tne(d);let E=c[h],m=c[d];const g=P1(o,e),f=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){const x=h==="y"?"height":"width",b=r.reference[h]-r.floating[x]+f.mainAxis,k=r.reference[h]+r.reference[x]-f.mainAxis;Ek&&(E=k)}if(l){var p,D;const x=h==="y"?"width":"height",b=["top","left"].includes(rd(i)),k=r.reference[d]-r.floating[x]+(b&&((p=a.offset)==null?void 0:p[d])||0)+(b?0:f.crossAxis),A=r.reference[d]+r.reference[x]+(b?0:((D=a.offset)==null?void 0:D[d])||0)-(b?f.crossAxis:0);mA&&(m=A)}return{[h]:E,[d]:m}}}},WSe=function(u){return u===void 0&&(u={}),{name:"size",options:u,async fn(e){const{placement:t,rects:n,platform:i,elements:r}=e,{apply:a=()=>{},...o}=P1(u,e),s=await XF(e,o),l=rd(t),c=T6(t),d=qp(t)==="y",{width:h,height:E}=n.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=c===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=l,m=c==="end"?"top":"bottom");const f=E-s[m],p=h-s[g],D=!e.middlewareData.shift;let x=f,b=p;if(d){const A=h-s.left-s.right;b=c||D?id(p,A):A}else{const A=E-s.top-s.bottom;x=c||D?id(f,A):A}if(D&&!c){const A=Bo(s.left,0),F=Bo(s.right,0),S=Bo(s.top,0),w=Bo(s.bottom,0);d?b=h-2*(A!==0||F!==0?A+F:Bo(s.left,s.right)):x=E-2*(S!==0||w!==0?S+w:Bo(s.top,s.bottom))}await a({...e,availableWidth:b,availableHeight:x});const k=await i.getDimensions(r.floating);return h!==k.width||E!==k.height?{reset:{rects:!0}}:{}}}};function og(u){return GSe(u)?(u.nodeName||"").toLowerCase():"#document"}function z0(u){var e;return(u==null||(e=u.ownerDocument)==null?void 0:e.defaultView)||window}function M4(u){var e;return(e=(GSe(u)?u.ownerDocument:u.document)||window.document)==null?void 0:e.documentElement}function GSe(u){return u instanceof Node||u instanceof z0(u).Node}function p4(u){return u instanceof Element||u instanceof z0(u).Element}function R1(u){return u instanceof HTMLElement||u instanceof z0(u).HTMLElement}function r4e(u){return typeof ShadowRoot>"u"?!1:u instanceof ShadowRoot||u instanceof z0(u).ShadowRoot}function u7(u){const{overflow:e,overflowX:t,overflowY:n,display:i}=Rl(u);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!["inline","contents"].includes(i)}function m_t(u){return["table","td","th"].includes(og(u))}function one(u){const e=sne(),t=Rl(u);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function g_t(u){let e=Wv(u);for(;R1(e)&&!TI(e);){if(one(e))return e;e=Wv(e)}return null}function sne(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function TI(u){return["html","body","#document"].includes(og(u))}function Rl(u){return z0(u).getComputedStyle(u)}function NI(u){return p4(u)?{scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}:{scrollLeft:u.pageXOffset,scrollTop:u.pageYOffset}}function Wv(u){if(og(u)==="html")return u;const e=u.assignedSlot||u.parentNode||r4e(u)&&u.host||M4(u);return r4e(e)?e.host:e}function USe(u){const e=Wv(u);return TI(e)?u.ownerDocument?u.ownerDocument.body:u.body:R1(e)&&u7(e)?e:USe(e)}function km(u,e){var t;e===void 0&&(e=[]);const n=USe(u),i=n===((t=u.ownerDocument)==null?void 0:t.body),r=z0(n);return i?e.concat(r,r.visualViewport||[],u7(n)?n:[]):e.concat(n,km(n))}function qSe(u){const e=Rl(u);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=R1(u),r=i?u.offsetWidth:t,a=i?u.offsetHeight:n,o=mz(t)!==r||mz(n)!==a;return o&&(t=r,n=a),{width:t,height:n,$:o}}function lne(u){return p4(u)?u:u.contextElement}function Tx(u){const e=lne(u);if(!R1(e))return ag(1);const t=e.getBoundingClientRect(),{width:n,height:i,$:r}=qSe(e);let a=(r?mz(t.width):t.width)/n,o=(r?mz(t.height):t.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const f_t=ag(0);function JSe(u){const e=z0(u);return!sne()||!e.visualViewport?f_t:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function p_t(u,e,t){return e===void 0&&(e=!1),!t||e&&t!==z0(u)?!1:e}function cp(u,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=u.getBoundingClientRect(),r=lne(u);let a=ag(1);e&&(n?p4(n)&&(a=Tx(n)):a=Tx(u));const o=p_t(r,t,n)?JSe(r):ag(0);let s=(i.left+o.x)/a.x,l=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(r){const h=z0(r),E=n&&p4(n)?z0(n):n;let m=h.frameElement;for(;m&&n&&E!==h;){const g=Tx(m),f=m.getBoundingClientRect(),p=Rl(m),D=f.left+(m.clientLeft+parseFloat(p.paddingLeft))*g.x,x=f.top+(m.clientTop+parseFloat(p.paddingTop))*g.y;s*=g.x,l*=g.y,c*=g.x,d*=g.y,s+=D,l+=x,m=z0(m).frameElement}}return Kv({width:c,height:d,x:s,y:l})}function D_t(u){let{rect:e,offsetParent:t,strategy:n}=u;const i=R1(t),r=M4(t);if(t===r)return e;let a={scrollLeft:0,scrollTop:0},o=ag(1);const s=ag(0);if((i||!i&&n!=="fixed")&&((og(t)!=="body"||u7(r))&&(a=NI(t)),R1(t))){const l=cp(t);o=Tx(t),s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}return{width:e.width*o.x,height:e.height*o.y,x:e.x*o.x-a.scrollLeft*o.x+s.x,y:e.y*o.y-a.scrollTop*o.y+s.y}}function x_t(u){return Array.from(u.getClientRects())}function ZSe(u){return cp(M4(u)).left+NI(u).scrollLeft}function v_t(u){const e=M4(u),t=NI(u),n=u.ownerDocument.body,i=Bo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Bo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+ZSe(u);const o=-t.scrollTop;return Rl(n).direction==="rtl"&&(a+=Bo(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:a,y:o}}function C_t(u,e){const t=z0(u),n=M4(u),i=t.visualViewport;let r=n.clientWidth,a=n.clientHeight,o=0,s=0;if(i){r=i.width,a=i.height;const l=sne();(!l||l&&e==="fixed")&&(o=i.offsetLeft,s=i.offsetTop)}return{width:r,height:a,x:o,y:s}}function b_t(u,e){const t=cp(u,!0,e==="fixed"),n=t.top+u.clientTop,i=t.left+u.clientLeft,r=R1(u)?Tx(u):ag(1),a=u.clientWidth*r.x,o=u.clientHeight*r.y,s=i*r.x,l=n*r.y;return{width:a,height:o,x:s,y:l}}function a4e(u,e,t){let n;if(e==="viewport")n=C_t(u,t);else if(e==="document")n=v_t(M4(u));else if(p4(e))n=b_t(e,t);else{const i=JSe(u);n={...e,x:e.x-i.x,y:e.y-i.y}}return Kv(n)}function YSe(u,e){const t=Wv(u);return t===e||!p4(t)||TI(t)?!1:Rl(t).position==="fixed"||YSe(t,e)}function k_t(u,e){const t=e.get(u);if(t)return t;let n=km(u).filter(o=>p4(o)&&og(o)!=="body"),i=null;const r=Rl(u).position==="fixed";let a=r?Wv(u):u;for(;p4(a)&&!TI(a);){const o=Rl(a),s=one(a);!s&&o.position==="fixed"&&(i=null),(r?!s&&!i:!s&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||u7(a)&&!s&&YSe(u,a))?n=n.filter(c=>c!==a):i=o,a=Wv(a)}return e.set(u,n),n}function F_t(u){let{element:e,boundary:t,rootBoundary:n,strategy:i}=u;const a=[...t==="clippingAncestors"?k_t(e,this._c):[].concat(t),n],o=a[0],s=a.reduce((l,c)=>{const d=a4e(e,c,i);return l.top=Bo(d.top,l.top),l.right=id(d.right,l.right),l.bottom=id(d.bottom,l.bottom),l.left=Bo(d.left,l.left),l},a4e(e,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function y_t(u){return qSe(u)}function A_t(u,e,t){const n=R1(e),i=M4(e),r=t==="fixed",a=cp(u,!0,r,e);let o={scrollLeft:0,scrollTop:0};const s=ag(0);if(n||!n&&!r)if((og(e)!=="body"||u7(i))&&(o=NI(e)),n){const l=cp(e,!0,r,e);s.x=l.x+e.clientLeft,s.y=l.y+e.clientTop}else i&&(s.x=ZSe(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}function o4e(u,e){return!R1(u)||Rl(u).position==="fixed"?null:e?e(u):u.offsetParent}function QSe(u,e){const t=z0(u);if(!R1(u))return t;let n=o4e(u,e);for(;n&&m_t(n)&&Rl(n).position==="static";)n=o4e(n,e);return n&&(og(n)==="html"||og(n)==="body"&&Rl(n).position==="static"&&!one(n))?t:n||g_t(u)||t}const __t=async function(u){let{reference:e,floating:t,strategy:n}=u;const i=this.getOffsetParent||QSe,r=this.getDimensions;return{reference:A_t(e,await i(t),n),floating:{x:0,y:0,...await r(t)}}};function S_t(u){return Rl(u).direction==="rtl"}const B_t={convertOffsetParentRelativeRectToViewportRelativeRect:D_t,getDocumentElement:M4,getClippingRect:F_t,getOffsetParent:QSe,getElementRects:__t,getClientRects:x_t,getDimensions:y_t,getScale:Tx,isElement:p4,isRTL:S_t};function w_t(u,e){let t=null,n;const i=M4(u);function r(){clearTimeout(n),t&&t.disconnect(),t=null}function a(o,s){o===void 0&&(o=!1),s===void 0&&(s=1),r();const{left:l,top:c,width:d,height:h}=u.getBoundingClientRect();if(o||e(),!d||!h)return;const E=I_(c),m=I_(i.clientWidth-(l+d)),g=I_(i.clientHeight-(c+h)),f=I_(l),D={rootMargin:-E+"px "+-m+"px "+-g+"px "+-f+"px",threshold:Bo(0,id(1,s))||1};let x=!0;function b(k){const A=k[0].intersectionRatio;if(A!==s){if(!x)return a();A?a(!1,A):n=setTimeout(()=>{a(!1,1e-7)},100)}x=!1}try{t=new IntersectionObserver(b,{...D,root:i.ownerDocument})}catch{t=new IntersectionObserver(b,D)}t.observe(u)}return a(!0),r}function XSe(u,e,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:s=!1}=n,l=lne(u),c=i||r?[...l?km(l):[],...km(e)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",t,{passive:!0}),r&&p.addEventListener("resize",t)});const d=l&&o?w_t(l,t):null;let h=-1,E=null;a&&(E=new ResizeObserver(p=>{let[D]=p;D&&D.target===l&&E&&(E.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{E&&E.observe(e)})),t()}),l&&!s&&E.observe(l),E.observe(e));let m,g=s?cp(u):null;s&&f();function f(){const p=cp(u);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&t(),g=p,m=requestAnimationFrame(f)}return t(),()=>{c.forEach(p=>{i&&p.removeEventListener("scroll",t),r&&p.removeEventListener("resize",t)}),d&&d(),E&&E.disconnect(),E=null,s&&cancelAnimationFrame(m)}}const e8e=(u,e,t)=>{const n=new Map,i={platform:B_t,...t},r={...i.platform,_c:n};return c_t(u,e,{...i,platform:r})},t8e=u=>{const{element:e,padding:t}=u;function n(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:u,fn(i){return n(e)?e.current!=null?fz({element:e.current,padding:t}).fn(i):{}:e?fz({element:e,padding:t}).fn(i):{}}}};var N8=typeof document<"u"?C.useLayoutEffect:C.useEffect;function pz(u,e){if(u===e)return!0;if(typeof u!=typeof e)return!1;if(typeof u=="function"&&u.toString()===e.toString())return!0;let t,n,i;if(u&&e&&typeof u=="object"){if(Array.isArray(u)){if(t=u.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!pz(u[n],e[n]))return!1;return!0}if(i=Object.keys(u),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const r=i[n];if(!(r==="_owner"&&u.$$typeof)&&!pz(u[r],e[r]))return!1}return!0}return u!==u&&e!==e}function s4e(u){const e=C.useRef(u);return N8(()=>{e.current=u}),e}function L_t(u){u===void 0&&(u={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,whileElementsMounted:r,open:a}=u,[o,s]=C.useState({x:null,y:null,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[l,c]=C.useState(n);pz(l,n)||c(n);const d=C.useRef(null),h=C.useRef(null),E=C.useRef(o),m=s4e(r),g=s4e(i),[f,p]=C.useState(null),[D,x]=C.useState(null),b=C.useCallback(z=>{d.current!==z&&(d.current=z,p(z))},[]),k=C.useCallback(z=>{h.current!==z&&(h.current=z,x(z))},[]),A=C.useCallback(()=>{if(!d.current||!h.current)return;const z={placement:e,strategy:t,middleware:l};g.current&&(z.platform=g.current),e8e(d.current,h.current,z).then(N=>{const O={...N,isPositioned:!0};F.current&&!pz(E.current,O)&&(E.current=O,is.flushSync(()=>{s(O)}))})},[l,e,t,g]);N8(()=>{a===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,s(z=>({...z,isPositioned:!1})))},[a]);const F=C.useRef(!1);N8(()=>(F.current=!0,()=>{F.current=!1}),[]),N8(()=>{if(f&&D){if(m.current)return m.current(f,D,A);A()}},[f,D,A,m]);const S=C.useMemo(()=>({reference:d,floating:h,setReference:b,setFloating:k}),[b,k]),w=C.useMemo(()=>({reference:f,floating:D}),[f,D]);return C.useMemo(()=>({...o,update:A,refs:S,elements:w,reference:b,floating:k}),[o,A,S,w,b,k])}var Gv=typeof document<"u"?C.useLayoutEffect:C.useEffect;let PV=!1,z_t=0;const l4e=()=>"floating-ui-"+z_t++;function M_t(){const[u,e]=C.useState(()=>PV?l4e():void 0);return Gv(()=>{u==null&&e(l4e())},[]),C.useEffect(()=>{PV||(PV=!0)},[]),u}const T_t=wm["useId".toString()],c4e=T_t||M_t;function N_t(){const u=new Map;return{emit(e,t){var n;(n=u.get(e))==null||n.forEach(i=>i(t))},on(e,t){u.set(e,[...u.get(e)||[],t])},off(e,t){u.set(e,(u.get(e)||[]).filter(n=>n!==t))}}}const P_t=C.createContext(null),R_t=C.createContext(null),u8e=()=>{var u;return((u=C.useContext(P_t))==null?void 0:u.id)||null},cne=()=>C.useContext(R_t);function $E(u){return(u==null?void 0:u.ownerDocument)||document}function I_t(){const u=navigator.userAgentData;return u!=null&&u.platform?u.platform:navigator.platform}function O_t(){const u=navigator.userAgentData;return u&&Array.isArray(u.brands)?u.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function dne(u){return $E(u).defaultView||window}function l1(u){return u?u instanceof dne(u).Element:!1}function n8e(u){return u?u instanceof dne(u).HTMLElement:!1}function j_t(u){if(typeof ShadowRoot>"u")return!1;const e=dne(u).ShadowRoot;return u instanceof e||u instanceof ShadowRoot}function H_t(u){if(u.mozInputSource===0&&u.isTrusted)return!0;const e=/Android/i;return(e.test(I_t())||e.test(O_t()))&&u.pointerType?u.type==="click"&&u.buttons===1:u.detail===0&&!u.pointerType}function V_t(u){return u.width===0&&u.height===0||u.width===1&&u.height===1&&u.pressure===0&&u.detail===0&&u.pointerType!=="mouse"||u.width<1&&u.height<1&&u.pressure===0&&u.detail===0}function i8e(u,e){const t=["mouse","pen"];return e||t.push("",void 0),t.includes(u)}function d4e(u){const e=C.useRef(u);return Gv(()=>{e.current=u}),e}const h4e="data-floating-ui-safe-polygon";function P8(u,e,t){return t&&!i8e(t)?0:typeof u=="number"?u:u==null?void 0:u[e]}const $_t=function(u,e){let{enabled:t=!0,delay:n=0,handleClose:i=null,mouseOnly:r=!1,restMs:a=0,move:o=!0}=e===void 0?{}:e;const{open:s,onOpenChange:l,dataRef:c,events:d,elements:{domReference:h,floating:E},refs:m}=u,g=cne(),f=u8e(),p=d4e(i),D=d4e(n),x=C.useRef(),b=C.useRef(),k=C.useRef(),A=C.useRef(),F=C.useRef(!0),S=C.useRef(!1),w=C.useRef(()=>{}),z=C.useCallback(()=>{var _;const L=(_=c.current.openEvent)==null?void 0:_.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[c]);C.useEffect(()=>{if(!t)return;function _(){clearTimeout(b.current),clearTimeout(A.current),F.current=!0}return d.on("dismiss",_),()=>{d.off("dismiss",_)}},[t,d]),C.useEffect(()=>{if(!t||!p.current||!s)return;function _(){z()&&l(!1)}const L=$E(E).documentElement;return L.addEventListener("mouseleave",_),()=>{L.removeEventListener("mouseleave",_)}},[E,s,l,t,p,c,z]);const N=C.useCallback(function(_){_===void 0&&(_=!0);const L=P8(D.current,"close",x.current);L&&!k.current?(clearTimeout(b.current),b.current=setTimeout(()=>l(!1),L)):_&&(clearTimeout(b.current),l(!1))},[D,l]),O=C.useCallback(()=>{w.current(),k.current=void 0},[]),y=C.useCallback(()=>{if(S.current){const _=$E(m.floating.current).body;_.style.pointerEvents="",_.removeAttribute(h4e),S.current=!1}},[m]);return C.useEffect(()=>{if(!t)return;function _(){return c.current.openEvent?["click","mousedown"].includes(c.current.openEvent.type):!1}function L(I){if(clearTimeout(b.current),F.current=!1,r&&!i8e(x.current)||a>0&&P8(D.current,"open")===0)return;c.current.openEvent=I;const H=P8(D.current,"open",x.current);H?b.current=setTimeout(()=>{l(!0)},H):l(!0)}function T(I){if(_())return;w.current();const H=$E(E);if(clearTimeout(A.current),p.current){s||clearTimeout(b.current),k.current=p.current({...u,tree:g,x:I.clientX,y:I.clientY,onClose(){y(),O(),N()}});const V=k.current;H.addEventListener("mousemove",V),w.current=()=>{H.removeEventListener("mousemove",V)};return}N()}function R(I){_()||p.current==null||p.current({...u,tree:g,x:I.clientX,y:I.clientY,onClose(){y(),O(),N()}})(I)}if(l1(h)){const I=h;return s&&I.addEventListener("mouseleave",R),E==null||E.addEventListener("mouseleave",R),o&&I.addEventListener("mousemove",L,{once:!0}),I.addEventListener("mouseenter",L),I.addEventListener("mouseleave",T),()=>{s&&I.removeEventListener("mouseleave",R),E==null||E.removeEventListener("mouseleave",R),o&&I.removeEventListener("mousemove",L),I.removeEventListener("mouseenter",L),I.removeEventListener("mouseleave",T)}}},[h,E,t,u,r,a,o,N,O,y,l,s,g,D,p,c]),Gv(()=>{var _;if(t&&s&&(_=p.current)!=null&&_.__options.blockPointerEvents&&z()){const R=$E(E).body;if(R.setAttribute(h4e,""),R.style.pointerEvents="none",S.current=!0,l1(h)&&E){var L,T;const I=h,H=g==null||(L=g.nodesRef.current.find(V=>V.id===f))==null||(T=L.context)==null?void 0:T.elements.floating;return H&&(H.style.pointerEvents=""),I.style.pointerEvents="auto",E.style.pointerEvents="auto",()=>{I.style.pointerEvents="",E.style.pointerEvents=""}}}},[t,s,f,E,h,g,p,c,z]),Gv(()=>{s||(x.current=void 0,O(),y())},[s,O,y]),C.useEffect(()=>()=>{O(),clearTimeout(b.current),clearTimeout(A.current),y()},[t,O,y]),C.useMemo(()=>{if(!t)return{};function _(L){x.current=L.pointerType}return{reference:{onPointerDown:_,onPointerEnter:_,onMouseMove(){s||a===0||(clearTimeout(A.current),A.current=setTimeout(()=>{F.current||l(!0)},a))}},floating:{onMouseEnter(){clearTimeout(b.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),N(!1)}}}},[d,t,a,s,l,N])},r8e=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),a8e=()=>C.useContext(r8e),K_t=u=>{let{children:e,delay:t,timeoutMs:n=0}=u;const[i,r]=C.useReducer((s,l)=>({...s,...l}),{delay:t,timeoutMs:n,initialDelay:t,currentId:null,isInstantPhase:!1}),a=C.useRef(null),o=C.useCallback(s=>{r({currentId:s})},[]);return Gv(()=>{i.currentId?a.current===null?a.current=i.currentId:r({isInstantPhase:!0}):(r({isInstantPhase:!1}),a.current=null)},[i.currentId]),C.createElement(r8e.Provider,{value:C.useMemo(()=>({...i,setState:r,setCurrentId:o}),[i,r,o])},e)},W_t=(u,e)=>{let{open:t,onOpenChange:n}=u,{id:i}=e;const{currentId:r,setCurrentId:a,initialDelay:o,setState:s,timeoutMs:l}=a8e();C.useEffect(()=>{r&&(s({delay:{open:1,close:P8(o,"close")}}),r!==i&&n(!1))},[i,n,s,r,o]),C.useEffect(()=>{function c(){n(!1),s({delay:o,currentId:null})}if(!t&&r===i)if(l){const d=window.setTimeout(c,l);return()=>{clearTimeout(d)}}else c()},[t,s,r,i,n,o,l]),C.useEffect(()=>{t&&a(i)},[t,a,i])};function G_t(u){let e=u.activeElement;for(;((t=e)==null||(n=t.shadowRoot)==null?void 0:n.activeElement)!=null;){var t,n;e=e.shadowRoot.activeElement}return e}function E4e(u,e){if(!u||!e)return!1;const t=e.getRootNode&&e.getRootNode();if(u.contains(e))return!0;if(t&&j_t(t)){let n=e;do{if(n&&u===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function RV(u,e){let t=u.filter(i=>{var r;return i.parentId===e&&((r=i.context)==null?void 0:r.open)})||[],n=t;for(;n.length;)n=u.filter(i=>{var r;return(r=n)==null?void 0:r.some(a=>{var o;return i.parentId===a.id&&((o=i.context)==null?void 0:o.open)})})||[],t=t.concat(n);return t}function U_t(u){return"composedPath"in u?u.composedPath()[0]:u.target}const q_t=wm["useInsertionEffect".toString()],J_t=q_t||(u=>u());function o8e(u){const e=C.useRef(()=>{});return J_t(()=>{e.current=u}),C.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i!1),k=typeof h=="function"?b:h,A=C.useRef(!1),{escapeKeyBubbles:F,outsidePressBubbles:S}=Q_t(p);return C.useEffect(()=>{if(!t||!c)return;l.current.__escapeKeyBubbles=F,l.current.__outsidePressBubbles=S;function w(_){if(_.key==="Escape"){const L=D?RV(D.nodesRef.current,r):[];if(L.length>0){let T=!0;if(L.forEach(R=>{var I;if((I=R.context)!=null&&I.open&&!R.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function z(_){const L=A.current;if(A.current=!1,L||typeof k=="function"&&!k(_))return;const T=U_t(_);if(n8e(T)&&s){const H=s.ownerDocument.defaultView||window,V=T.scrollWidth>T.clientWidth,U=T.scrollHeight>T.clientHeight;let J=U&&_.offsetX>T.clientWidth;if(U&&H.getComputedStyle(T).direction==="rtl"&&(J=_.offsetX<=T.offsetWidth-T.clientWidth),J||V&&_.offsetY>T.clientHeight)return}const R=D&&RV(D.nodesRef.current,r).some(H=>{var V;return R8(_,(V=H.context)==null?void 0:V.elements.floating)});if(R8(_,s)||R8(_,o)||R)return;const I=D?RV(D.nodesRef.current,r):[];if(I.length>0){let H=!0;if(I.forEach(V=>{var U;if((U=V.context)!=null&&U.open&&!V.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:H_t(_)||V_t(_)}}),n(!1)}function N(){n(!1)}const O=$E(s);d&&O.addEventListener("keydown",w),k&&O.addEventListener(E,z);let y=[];return f&&(l1(o)&&(y=km(o)),l1(s)&&(y=y.concat(km(s))),!l1(a)&&a&&a.contextElement&&(y=y.concat(km(a.contextElement)))),y=y.filter(_=>{var L;return _!==((L=O.defaultView)==null?void 0:L.visualViewport)}),y.forEach(_=>{_.addEventListener("scroll",N,{passive:!0})}),()=>{d&&O.removeEventListener("keydown",w),k&&O.removeEventListener(E,z),y.forEach(_=>{_.removeEventListener("scroll",N)})}},[l,s,o,a,d,k,E,i,D,r,t,n,f,c,F,S,x]),C.useEffect(()=>{A.current=!1},[k,E]),C.useMemo(()=>c?{reference:{[Z_t[g]]:()=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[Y_t[E]]:()=>{A.current=!0}}}:{},[c,i,m,E,g,n])},eSt=function(u,e){let{open:t,onOpenChange:n,dataRef:i,events:r,refs:a,elements:{floating:o,domReference:s}}=u,{enabled:l=!0,keyboardOnly:c=!0}=e===void 0?{}:e;const d=C.useRef(""),h=C.useRef(!1),E=C.useRef();return C.useEffect(()=>{if(!l)return;const g=$E(o).defaultView||window;function f(){!t&&n8e(s)&&s===G_t($E(s))&&(h.current=!0)}return g.addEventListener("blur",f),()=>{g.removeEventListener("blur",f)}},[o,s,t,l]),C.useEffect(()=>{if(!l)return;function m(g){(g.type==="referencePress"||g.type==="escapeKey")&&(h.current=!0)}return r.on("dismiss",m),()=>{r.off("dismiss",m)}},[r,l]),C.useEffect(()=>()=>{clearTimeout(E.current)},[]),C.useMemo(()=>l?{reference:{onPointerDown(m){let{pointerType:g}=m;d.current=g,h.current=!!(g&&c)},onMouseLeave(){h.current=!1},onFocus(m){var g;h.current||m.type==="focus"&&((g=i.current.openEvent)==null?void 0:g.type)==="mousedown"&&i.current.openEvent&&R8(i.current.openEvent,s)||(i.current.openEvent=m.nativeEvent,n(!0))},onBlur(m){h.current=!1;const g=m.relatedTarget,f=l1(g)&&g.hasAttribute("data-floating-ui-focus-guard")&&g.getAttribute("data-type")==="outside";E.current=setTimeout(()=>{E4e(a.floating.current,g)||E4e(s,g)||f||n(!1)})}}}:{},[l,c,s,a,i,n])},tSt=function(u,e){let{open:t}=u,{enabled:n=!0,role:i="dialog"}=e===void 0?{}:e;const r=c4e(),a=c4e();return C.useMemo(()=>{const o={id:r,role:i};return n?i==="tooltip"?{reference:{"aria-describedby":t?r:void 0},floating:o}:{reference:{"aria-expanded":t?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":t?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...o,...i==="menu"&&{"aria-labelledby":a}}}:{}},[n,i,t,r,a])};function hne(u){u===void 0&&(u={});const{open:e=!1,onOpenChange:t,nodeId:n}=u,i=L_t(u),r=cne(),a=C.useRef(null),o=C.useRef({}),s=C.useState(()=>N_t())[0],[l,c]=C.useState(null),d=C.useCallback(p=>{const D=l1(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),contextElement:p}:p;i.refs.setReference(D)},[i.refs]),h=C.useCallback(p=>{(l1(p)||p===null)&&(a.current=p,c(p)),(l1(i.refs.reference.current)||i.refs.reference.current===null||p!==null&&!l1(p))&&i.refs.setReference(p)},[i.refs]),E=C.useMemo(()=>({...i.refs,setReference:h,setPositionReference:d,domReference:a}),[i.refs,h,d]),m=C.useMemo(()=>({...i.elements,domReference:l}),[i.elements,l]),g=o8e(t),f=C.useMemo(()=>({...i,refs:E,elements:m,dataRef:o,nodeId:n,events:s,open:e,onOpenChange:g}),[i,n,s,e,g,E,m]);return Gv(()=>{const p=r==null?void 0:r.nodesRef.current.find(D=>D.id===n);p&&(p.context=f)}),C.useMemo(()=>({...i,context:f,refs:E,reference:h,positionReference:d}),[i,E,f,h,d])}function IV(u,e,t){const n=new Map;return{...t==="floating"&&{tabIndex:-1},...u,...e.map(i=>i?i[t]:null).concat(u).reduce((i,r)=>(r&&Object.entries(r).forEach(a=>{let[o,s]=a;if(o.indexOf("on")===0){if(n.has(o)||n.set(o,[]),typeof s=="function"){var l;(l=n.get(o))==null||l.push(s),i[o]=function(){for(var c,d=arguments.length,h=new Array(d),E=0;Em(...h))}}}else i[o]=s}),i),{})}}const uSt=function(u){u===void 0&&(u=[]);const e=u,t=C.useCallback(r=>IV(r,u,"reference"),e),n=C.useCallback(r=>IV(r,u,"floating"),e),i=C.useCallback(r=>IV(r,u,"item"),u.map(r=>r==null?void 0:r.item));return C.useMemo(()=>({getReferenceProps:t,getFloatingProps:n,getItemProps:i}),[t,n,i])};function s8e({opened:u,floating:e,position:t,positionDependencies:n}){const[i,r]=C.useState(0);C.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return XSe(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,u,i,t]),To(()=>{e.update()},n),To(()=>{r(a=>a+1)},[u])}function nSt(u){const e=[ane(u.offset)];return u.middlewares.shift&&e.push(MI({limiter:KSe()})),u.middlewares.flip&&e.push(rne()),u.middlewares.inline&&e.push($Se()),e.push(t8e({element:u.arrowRef,padding:u.arrowOffset})),e}function iSt(u){const[e,t]=ps({value:u.opened,defaultValue:u.defaultOpened,finalValue:!1,onChange:u.onChange}),n=()=>{var a;(a=u.onClose)==null||a.call(u),t(!1)},i=()=>{var a,o;e?((a=u.onClose)==null||a.call(u),t(!1)):((o=u.onOpen)==null||o.call(u),t(!0))},r=hne({placement:u.position,middleware:[...nSt(u),...u.width==="target"?[WSe({apply({rects:a}){var o,s;Object.assign((s=(o=r.refs.floating.current)==null?void 0:o.style)!=null?s:{},{width:`${a.reference.width}px`})}})]:[]]});return s8e({opened:u.opened,position:u.position,positionDependencies:u.positionDependencies,floating:r}),To(()=>{var a;(a=u.onPositionChange)==null||a.call(u,r.placement)},[r.placement]),To(()=>{var a,o;u.opened?(o=u.onOpen)==null||o.call(u):(a=u.onClose)==null||a.call(u)},[u.opened]),{floating:r,controlled:typeof u.opened=="boolean",opened:e,onClose:n,onToggle:i}}const l8e={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[rSt,c8e]=U1(l8e.context);var aSt=Object.defineProperty,oSt=Object.defineProperties,sSt=Object.getOwnPropertyDescriptors,Dz=Object.getOwnPropertySymbols,d8e=Object.prototype.hasOwnProperty,h8e=Object.prototype.propertyIsEnumerable,m4e=(u,e,t)=>e in u?aSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,O_=(u,e)=>{for(var t in e||(e={}))d8e.call(e,t)&&m4e(u,t,e[t]);if(Dz)for(var t of Dz(e))h8e.call(e,t)&&m4e(u,t,e[t]);return u},lSt=(u,e)=>oSt(u,sSt(e)),cSt=(u,e)=>{var t={};for(var n in u)d8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Dz)for(var n of Dz(u))e.indexOf(n)<0&&h8e.call(u,n)&&(t[n]=u[n]);return t};const dSt={refProp:"ref",popupType:"dialog"},E8e=C.forwardRef((u,e)=>{const t=Qe("PopoverTarget",dSt,u),{children:n,refProp:i,popupType:r}=t,a=cSt(t,["children","refProp","popupType"]);if(!z6(n))throw new Error(l8e.children);const o=a,s=c8e(),l=q1(s.reference,n.ref,e),c=s.withRoles?{"aria-haspopup":r,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return C.cloneElement(n,O_(lSt(O_(O_(O_({},o),c),s.targetProps),{className:L9e(s.targetProps.className,o.className,n.props.className),[i]:l}),s.controlled?null:{onClick:s.onToggle}))});E8e.displayName="@mantine/core/PopoverTarget";var hSt=at((u,{radius:e,shadow:t})=>({dropdown:{position:"absolute",backgroundColor:u.white,background:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,padding:`${u.spacing.sm} ${u.spacing.md}`,boxShadow:u.shadows[t]||t||"none",borderRadius:u.fn.radius(e),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,zIndex:1}}));const ESt=hSt;var mSt=Object.defineProperty,g4e=Object.getOwnPropertySymbols,gSt=Object.prototype.hasOwnProperty,fSt=Object.prototype.propertyIsEnumerable,f4e=(u,e,t)=>e in u?mSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,MD=(u,e)=>{for(var t in e||(e={}))gSt.call(e,t)&&f4e(u,t,e[t]);if(g4e)for(var t of g4e(e))fSt.call(e,t)&&f4e(u,t,e[t]);return u};const p4e={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function pSt({transition:u,state:e,duration:t,timingFunction:n}){const i={transitionDuration:`${t}ms`,transitionTimingFunction:n};return typeof u=="string"?u in A_?MD(MD(MD({transitionProperty:A_[u].transitionProperty},i),A_[u].common),A_[u][p4e[e]]):null:MD(MD(MD({transitionProperty:u.transitionProperty},i),u.common),u[p4e[e]])}function DSt({duration:u,exitDuration:e,timingFunction:t,mounted:n,onEnter:i,onExit:r,onEntered:a,onExited:o}){const s=jr(),l=QA(),c=s.respectReducedMotion?l:!1,[d,h]=C.useState(c?0:u),[E,m]=C.useState(n?"entered":"exited"),g=C.useRef(-1),f=p=>{const D=p?i:r,x=p?a:o;m(p?"pre-entering":"pre-exiting"),window.clearTimeout(g.current);const b=c?0:p?u:e;if(h(b),b===0)typeof D=="function"&&D(),typeof x=="function"&&x(),m(p?"entered":"exited");else{const k=window.setTimeout(()=>{typeof D=="function"&&D(),m(p?"entering":"exiting")},10);g.current=window.setTimeout(()=>{window.clearTimeout(k),typeof x=="function"&&x(),m(p?"entered":"exited")},b)}};return To(()=>{f(n)},[n]),C.useEffect(()=>()=>window.clearTimeout(g.current),[]),{transitionDuration:d,transitionStatus:E,transitionTimingFunction:t||s.transitionTimingFunction}}function Jp({keepMounted:u,transition:e,duration:t=250,exitDuration:n=t,mounted:i,children:r,timingFunction:a,onExit:o,onEntered:s,onEnter:l,onExited:c}){const{transitionDuration:d,transitionStatus:h,transitionTimingFunction:E}=DSt({mounted:i,exitDuration:n,duration:t,timingFunction:a,onExit:o,onEntered:s,onEnter:l,onExited:c});return d===0?i?M.createElement(M.Fragment,null,r({})):u?r({display:"none"}):null:h==="exited"?u?r({display:"none"}):null:M.createElement(M.Fragment,null,r(pSt({transition:e,duration:d,state:h,timingFunction:E})))}Jp.displayName="@mantine/core/Transition";function Ene({children:u,active:e=!0,refProp:t="ref"}){const n=Gkt(e),i=q1(n,u==null?void 0:u.ref);return z6(u)?C.cloneElement(u,{[t]:i}):u}Ene.displayName="@mantine/core/FocusTrap";var xSt=Object.defineProperty,vSt=Object.defineProperties,CSt=Object.getOwnPropertyDescriptors,D4e=Object.getOwnPropertySymbols,bSt=Object.prototype.hasOwnProperty,kSt=Object.prototype.propertyIsEnumerable,x4e=(u,e,t)=>e in u?xSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,q4=(u,e)=>{for(var t in e||(e={}))bSt.call(e,t)&&x4e(u,t,e[t]);if(D4e)for(var t of D4e(e))kSt.call(e,t)&&x4e(u,t,e[t]);return u},j_=(u,e)=>vSt(u,CSt(e));function v4e(u,e,t,n){return u==="center"||n==="center"?{top:e}:u==="end"?{bottom:t}:u==="start"?{top:t}:{}}function C4e(u,e,t,n,i){return u==="center"||n==="center"?{left:e}:u==="end"?{[i==="ltr"?"right":"left"]:t}:u==="start"?{[i==="ltr"?"left":"right"]:t}:{}}const FSt={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function ySt({position:u,arrowSize:e,arrowOffset:t,arrowRadius:n,arrowPosition:i,arrowX:r,arrowY:a,dir:o}){const[s,l="center"]=u.split("-"),c={width:G(e),height:G(e),transform:"rotate(45deg)",position:"absolute",[FSt[s]]:G(n)},d=G(-e/2);return s==="left"?j_(q4(q4({},c),v4e(l,a,t,i)),{right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}):s==="right"?j_(q4(q4({},c),v4e(l,a,t,i)),{left:d,borderRightColor:"transparent",borderTopColor:"transparent"}):s==="top"?j_(q4(q4({},c),C4e(l,r,t,i,o)),{bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}):s==="bottom"?j_(q4(q4({},c),C4e(l,r,t,i,o)),{top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var ASt=Object.defineProperty,_St=Object.defineProperties,SSt=Object.getOwnPropertyDescriptors,xz=Object.getOwnPropertySymbols,m8e=Object.prototype.hasOwnProperty,g8e=Object.prototype.propertyIsEnumerable,b4e=(u,e,t)=>e in u?ASt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,BSt=(u,e)=>{for(var t in e||(e={}))m8e.call(e,t)&&b4e(u,t,e[t]);if(xz)for(var t of xz(e))g8e.call(e,t)&&b4e(u,t,e[t]);return u},wSt=(u,e)=>_St(u,SSt(e)),LSt=(u,e)=>{var t={};for(var n in u)m8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&xz)for(var n of xz(u))e.indexOf(n)<0&&g8e.call(u,n)&&(t[n]=u[n]);return t};const mne=C.forwardRef((u,e)=>{var t=u,{position:n,arrowSize:i,arrowOffset:r,arrowRadius:a,arrowPosition:o,visible:s,arrowX:l,arrowY:c}=t,d=LSt(t,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=jr();return s?M.createElement("div",wSt(BSt({},d),{ref:e,style:ySt({position:n,arrowSize:i,arrowOffset:r,arrowRadius:a,arrowPosition:o,dir:h.dir,arrowX:l,arrowY:c})})):null});mne.displayName="@mantine/core/FloatingArrow";var zSt=Object.defineProperty,MSt=Object.defineProperties,TSt=Object.getOwnPropertyDescriptors,vz=Object.getOwnPropertySymbols,f8e=Object.prototype.hasOwnProperty,p8e=Object.prototype.propertyIsEnumerable,k4e=(u,e,t)=>e in u?zSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TD=(u,e)=>{for(var t in e||(e={}))f8e.call(e,t)&&k4e(u,t,e[t]);if(vz)for(var t of vz(e))p8e.call(e,t)&&k4e(u,t,e[t]);return u},H_=(u,e)=>MSt(u,TSt(e)),NSt=(u,e)=>{var t={};for(var n in u)f8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&vz)for(var n of vz(u))e.indexOf(n)<0&&p8e.call(u,n)&&(t[n]=u[n]);return t};const PSt={};function D8e(u){var e;const t=Qe("PopoverDropdown",PSt,u),{style:n,className:i,children:r,onKeyDownCapture:a}=t,o=NSt(t,["style","className","children","onKeyDownCapture"]),s=c8e(),{classes:l,cx:c}=ESt({radius:s.radius,shadow:s.shadow},{name:s.__staticSelector,classNames:s.classNames,styles:s.styles,unstyled:s.unstyled,variant:s.variant}),d=n_e({opened:s.opened,shouldReturnFocus:s.returnFocus}),h=s.withRoles?{"aria-labelledby":s.getTargetId(),id:s.getDropdownId(),role:"dialog"}:{};return s.disabled?null:M.createElement(XA,H_(TD({},s.portalProps),{withinPortal:s.withinPortal}),M.createElement(Jp,H_(TD({mounted:s.opened},s.transitionProps),{transition:s.transitionProps.transition||"fade",duration:(e=s.transitionProps.duration)!=null?e:150,keepMounted:s.keepMounted,exitDuration:typeof s.transitionProps.exitDuration=="number"?s.transitionProps.exitDuration:s.transitionProps.duration}),E=>{var m,g;return M.createElement(Ene,{active:s.trapFocus},M.createElement(Ct,TD(H_(TD({},h),{tabIndex:-1,ref:s.floating,style:H_(TD(TD({},n),E),{zIndex:s.zIndex,top:(m=s.y)!=null?m:0,left:(g=s.x)!=null?g:0,width:s.width==="target"?void 0:G(s.width)}),className:c(l.dropdown,i),onKeyDownCapture:Ebt(s.onClose,{active:s.closeOnEscape,onTrigger:d,onKeyDown:a}),"data-position":s.placement}),o),r,M.createElement(mne,{ref:s.arrowRef,arrowX:s.arrowX,arrowY:s.arrowY,visible:s.withArrow,position:s.placement,arrowSize:s.arrowSize,arrowRadius:s.arrowRadius,arrowOffset:s.arrowOffset,arrowPosition:s.arrowPosition,className:l.arrow})))}))}D8e.displayName="@mantine/core/PopoverDropdown";function x8e(u,e){if(u==="rtl"&&(e.includes("right")||e.includes("left"))){const[t,n]=e.split("-"),i=t==="right"?"left":"right";return n===void 0?i:`${i}-${n}`}return e}var F4e=Object.getOwnPropertySymbols,RSt=Object.prototype.hasOwnProperty,ISt=Object.prototype.propertyIsEnumerable,OSt=(u,e)=>{var t={};for(var n in u)RSt.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&F4e)for(var n of F4e(u))e.indexOf(n)<0&&ISt.call(u,n)&&(t[n]=u[n]);return t};const jSt={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:fd("popover"),__staticSelector:"Popover",width:"max-content"};function Es(u){var e,t,n,i,r,a;const o=C.useRef(null),s=Qe("Popover",jSt,u),{children:l,position:c,offset:d,onPositionChange:h,positionDependencies:E,opened:m,transitionProps:g,width:f,middlewares:p,withArrow:D,arrowSize:x,arrowOffset:b,arrowRadius:k,arrowPosition:A,unstyled:F,classNames:S,styles:w,closeOnClickOutside:z,withinPortal:N,portalProps:O,closeOnEscape:y,clickOutsideEvents:_,trapFocus:L,onClose:T,onOpen:R,onChange:I,zIndex:H,radius:V,shadow:U,id:J,defaultOpened:Y,__staticSelector:X,withRoles:re,disabled:ge,returnFocus:_e,variant:Ve,keepMounted:Ue}=s,qe=OSt(s,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[Se,de]=C.useState(null),[he,Be]=C.useState(null),je=Jl(J),bt=jr(),qt=iSt({middlewares:p,width:f,position:x8e(bt.dir,c),offset:typeof d=="number"?d+(D?x/2:0):d,arrowRef:o,arrowOffset:b,onPositionChange:h,positionDependencies:E,opened:m,defaultOpened:Y,onChange:I,onOpen:R,onClose:T});Nkt(()=>qt.opened&&z&&qt.onClose(),_,[Se,he]);const ou=C.useCallback(oe=>{de(oe),qt.floating.reference(oe)},[qt.floating.reference]),Vt=C.useCallback(oe=>{Be(oe),qt.floating.floating(oe)},[qt.floating.floating]);return M.createElement(rSt,{value:{returnFocus:_e,disabled:ge,controlled:qt.controlled,reference:ou,floating:Vt,x:qt.floating.x,y:qt.floating.y,arrowX:(n=(t=(e=qt.floating)==null?void 0:e.middlewareData)==null?void 0:t.arrow)==null?void 0:n.x,arrowY:(a=(r=(i=qt.floating)==null?void 0:i.middlewareData)==null?void 0:r.arrow)==null?void 0:a.y,opened:qt.opened,arrowRef:o,transitionProps:g,width:f,withArrow:D,arrowSize:x,arrowOffset:b,arrowRadius:k,arrowPosition:A,placement:qt.floating.placement,trapFocus:L,withinPortal:N,portalProps:O,zIndex:H,radius:V,shadow:U,closeOnEscape:y,onClose:qt.onClose,onToggle:qt.onToggle,getTargetId:()=>`${je}-target`,getDropdownId:()=>`${je}-dropdown`,withRoles:re,targetProps:qe,__staticSelector:X,classNames:S,styles:w,unstyled:F,variant:Ve,keepMounted:Ue}},l)}Es.Target=E8e;Es.Dropdown=D8e;Es.displayName="@mantine/core/Popover";var HSt=Object.defineProperty,Cz=Object.getOwnPropertySymbols,v8e=Object.prototype.hasOwnProperty,C8e=Object.prototype.propertyIsEnumerable,y4e=(u,e,t)=>e in u?HSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,VSt=(u,e)=>{for(var t in e||(e={}))v8e.call(e,t)&&y4e(u,t,e[t]);if(Cz)for(var t of Cz(e))C8e.call(e,t)&&y4e(u,t,e[t]);return u},$St=(u,e)=>{var t={};for(var n in u)v8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Cz)for(var n of Cz(u))e.indexOf(n)<0&&C8e.call(u,n)&&(t[n]=u[n]);return t};function KSt(u){var e=u,{children:t,component:n="div",maxHeight:i=220,direction:r="column",id:a,innerRef:o,__staticSelector:s,styles:l,classNames:c,unstyled:d}=e,h=$St(e,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:E}=Q9t(null,{name:s,styles:l,classNames:c,unstyled:d});return M.createElement(Es.Dropdown,VSt({p:0,onMouseDown:m=>m.preventDefault()},h),M.createElement("div",{style:{maxHeight:G(i),display:"flex"}},M.createElement(Ct,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:m=>m.preventDefault(),style:{flex:1,overflowY:n!==zI?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:o},M.createElement("div",{className:E.itemsWrapper,style:{flexDirection:r}},t))))}function Fm({opened:u,transitionProps:e={transition:"fade",duration:0},shadow:t,withinPortal:n,portalProps:i,children:r,__staticSelector:a,onDirectionChange:o,switchDirectionOnFlip:s,zIndex:l,dropdownPosition:c,positionDependencies:d=[],classNames:h,styles:E,unstyled:m,readOnly:g,variant:f}){return M.createElement(Es,{unstyled:m,classNames:h,styles:E,width:"target",withRoles:!1,opened:u,middlewares:{flip:c==="flip",shift:!1},position:c==="flip"?"bottom":c,positionDependencies:d,zIndex:l,__staticSelector:a,withinPortal:n,portalProps:i,transitionProps:e,shadow:t,disabled:g,onPositionChange:p=>s&&(o==null?void 0:o(p==="top"?"column-reverse":"column")),variant:f},r)}Fm.Target=Es.Target;Fm.Dropdown=KSt;var WSt=Object.defineProperty,GSt=Object.defineProperties,USt=Object.getOwnPropertyDescriptors,bz=Object.getOwnPropertySymbols,b8e=Object.prototype.hasOwnProperty,k8e=Object.prototype.propertyIsEnumerable,A4e=(u,e,t)=>e in u?WSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,V_=(u,e)=>{for(var t in e||(e={}))b8e.call(e,t)&&A4e(u,t,e[t]);if(bz)for(var t of bz(e))k8e.call(e,t)&&A4e(u,t,e[t]);return u},qSt=(u,e)=>GSt(u,USt(e)),JSt=(u,e)=>{var t={};for(var n in u)b8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&bz)for(var n of bz(u))e.indexOf(n)<0&&k8e.call(u,n)&&(t[n]=u[n]);return t};function F8e(u,e,t){const n=Qe(u,e,t),{label:i,description:r,error:a,required:o,classNames:s,styles:l,className:c,unstyled:d,__staticSelector:h,sx:E,errorProps:m,labelProps:g,descriptionProps:f,wrapperProps:p,id:D,size:x,style:b,inputContainer:k,inputWrapperOrder:A,withAsterisk:F,variant:S}=n,w=JSt(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=Jl(D),{systemStyles:N,rest:O}=w4(w),y=V_({label:i,description:r,error:a,required:o,classNames:s,className:c,__staticSelector:h,sx:E,errorProps:m,labelProps:g,descriptionProps:f,unstyled:d,styles:l,id:z,size:x,style:b,inputContainer:k,inputWrapperOrder:A,withAsterisk:F,variant:S},p);return qSt(V_({},O),{classNames:s,styles:l,unstyled:d,wrapperProps:V_(V_({},y),N),inputProps:{required:o,classNames:s,styles:l,unstyled:d,id:z,size:x,__staticSelector:h,error:a,variant:S}})}var ZSt=at((u,e,{size:t})=>({label:{display:"inline-block",fontSize:ye({size:t,sizes:u.fontSizes}),fontWeight:500,color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:u.fn.variant({variant:"filled",color:"red"}).background}}));const YSt=ZSt;var QSt=Object.defineProperty,kz=Object.getOwnPropertySymbols,y8e=Object.prototype.hasOwnProperty,A8e=Object.prototype.propertyIsEnumerable,_4e=(u,e,t)=>e in u?QSt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XSt=(u,e)=>{for(var t in e||(e={}))y8e.call(e,t)&&_4e(u,t,e[t]);if(kz)for(var t of kz(e))A8e.call(e,t)&&_4e(u,t,e[t]);return u},e8t=(u,e)=>{var t={};for(var n in u)y8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&kz)for(var n of kz(u))e.indexOf(n)<0&&A8e.call(u,n)&&(t[n]=u[n]);return t};const t8t={labelElement:"label",size:"sm"},gne=C.forwardRef((u,e)=>{const t=Qe("InputLabel",t8t,u),{labelElement:n,children:i,required:r,size:a,classNames:o,styles:s,unstyled:l,className:c,htmlFor:d,__staticSelector:h,variant:E,onMouseDown:m}=t,g=e8t(t,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:f,cx:p}=YSt(null,{name:["InputWrapper",h],classNames:o,styles:s,unstyled:l,variant:E,size:a});return M.createElement(Ct,XSt({component:n,ref:e,className:p(f.label,c),htmlFor:n==="label"?d:void 0,onMouseDown:D=>{m==null||m(D),!D.defaultPrevented&&D.detail>1&&D.preventDefault()}},g),i,r&&M.createElement("span",{className:f.required,"aria-hidden":!0}," *"))});gne.displayName="@mantine/core/InputLabel";var u8t=at((u,e,{size:t})=>({error:{wordBreak:"break-word",color:u.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${ye({size:t,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1.2,display:"block"}}));const n8t=u8t;var i8t=Object.defineProperty,Fz=Object.getOwnPropertySymbols,_8e=Object.prototype.hasOwnProperty,S8e=Object.prototype.propertyIsEnumerable,S4e=(u,e,t)=>e in u?i8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,r8t=(u,e)=>{for(var t in e||(e={}))_8e.call(e,t)&&S4e(u,t,e[t]);if(Fz)for(var t of Fz(e))S8e.call(e,t)&&S4e(u,t,e[t]);return u},a8t=(u,e)=>{var t={};for(var n in u)_8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Fz)for(var n of Fz(u))e.indexOf(n)<0&&S8e.call(u,n)&&(t[n]=u[n]);return t};const o8t={size:"sm"},fne=C.forwardRef((u,e)=>{const t=Qe("InputError",o8t,u),{children:n,className:i,classNames:r,styles:a,unstyled:o,size:s,__staticSelector:l,variant:c}=t,d=a8t(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:E}=n8t(null,{name:["InputWrapper",l],classNames:r,styles:a,unstyled:o,variant:c,size:s});return M.createElement(_u,r8t({className:E(h.error,i),ref:e},d),n)});fne.displayName="@mantine/core/InputError";var s8t=at((u,e,{size:t})=>({description:{wordBreak:"break-word",color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],fontSize:`calc(${ye({size:t,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1.2,display:"block"}}));const l8t=s8t;var c8t=Object.defineProperty,yz=Object.getOwnPropertySymbols,B8e=Object.prototype.hasOwnProperty,w8e=Object.prototype.propertyIsEnumerable,B4e=(u,e,t)=>e in u?c8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,d8t=(u,e)=>{for(var t in e||(e={}))B8e.call(e,t)&&B4e(u,t,e[t]);if(yz)for(var t of yz(e))w8e.call(e,t)&&B4e(u,t,e[t]);return u},h8t=(u,e)=>{var t={};for(var n in u)B8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&yz)for(var n of yz(u))e.indexOf(n)<0&&w8e.call(u,n)&&(t[n]=u[n]);return t};const E8t={size:"sm"},pne=C.forwardRef((u,e)=>{const t=Qe("InputDescription",E8t,u),{children:n,className:i,classNames:r,styles:a,unstyled:o,size:s,__staticSelector:l,variant:c}=t,d=h8t(t,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:E}=l8t(null,{name:["InputWrapper",l],classNames:r,styles:a,unstyled:o,variant:c,size:s});return M.createElement(_u,d8t({color:"dimmed",className:E(h.description,i),ref:e,unstyled:o},d),n)});pne.displayName="@mantine/core/InputDescription";const L8e=C.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),m8t=L8e.Provider,g8t=()=>C.useContext(L8e);function f8t(u,{hasDescription:e,hasError:t}){const n=u.findIndex(s=>s==="input"),i=u[n-1],r=u[n+1];return{offsetBottom:e&&r==="description"||t&&r==="error",offsetTop:e&&i==="description"||t&&i==="error"}}var p8t=Object.defineProperty,D8t=Object.defineProperties,x8t=Object.getOwnPropertyDescriptors,w4e=Object.getOwnPropertySymbols,v8t=Object.prototype.hasOwnProperty,C8t=Object.prototype.propertyIsEnumerable,L4e=(u,e,t)=>e in u?p8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,b8t=(u,e)=>{for(var t in e||(e={}))v8t.call(e,t)&&L4e(u,t,e[t]);if(w4e)for(var t of w4e(e))C8t.call(e,t)&&L4e(u,t,e[t]);return u},k8t=(u,e)=>D8t(u,x8t(e)),F8t=at(u=>({root:k8t(b8t({},u.fn.fontStyles()),{lineHeight:u.lineHeight})}));const y8t=F8t;var A8t=Object.defineProperty,_8t=Object.defineProperties,S8t=Object.getOwnPropertyDescriptors,Az=Object.getOwnPropertySymbols,z8e=Object.prototype.hasOwnProperty,M8e=Object.prototype.propertyIsEnumerable,z4e=(u,e,t)=>e in u?A8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,J4=(u,e)=>{for(var t in e||(e={}))z8e.call(e,t)&&z4e(u,t,e[t]);if(Az)for(var t of Az(e))M8e.call(e,t)&&z4e(u,t,e[t]);return u},M4e=(u,e)=>_8t(u,S8t(e)),B8t=(u,e)=>{var t={};for(var n in u)z8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Az)for(var n of Az(u))e.indexOf(n)<0&&M8e.call(u,n)&&(t[n]=u[n]);return t};const w8t={labelElement:"label",size:"sm",inputContainer:u=>u,inputWrapperOrder:["label","description","input","error"]},T8e=C.forwardRef((u,e)=>{const t=Qe("InputWrapper",w8t,u),{className:n,label:i,children:r,required:a,id:o,error:s,description:l,labelElement:c,labelProps:d,descriptionProps:h,errorProps:E,classNames:m,styles:g,size:f,inputContainer:p,__staticSelector:D,unstyled:x,inputWrapperOrder:b,withAsterisk:k,variant:A}=t,F=B8t(t,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:S,cx:w}=y8t(null,{classNames:m,styles:g,name:["InputWrapper",D],unstyled:x,variant:A,size:f}),z={classNames:m,styles:g,unstyled:x,size:f,variant:A,__staticSelector:D},N=typeof k=="boolean"?k:a,O=o?`${o}-error`:E==null?void 0:E.id,y=o?`${o}-description`:h==null?void 0:h.id,L=`${!!s&&typeof s!="boolean"?O:""} ${l?y:""}`,T=L.trim().length>0?L.trim():void 0,R=i&&M.createElement(gne,J4(J4({key:"label",labelElement:c,id:o?`${o}-label`:void 0,htmlFor:o,required:N},z),d),i),I=l&&M.createElement(pne,M4e(J4(J4({key:"description"},h),z),{size:(h==null?void 0:h.size)||z.size,id:(h==null?void 0:h.id)||y}),l),H=M.createElement(C.Fragment,{key:"input"},p(r)),V=typeof s!="boolean"&&s&&M.createElement(fne,M4e(J4(J4({},E),z),{size:(E==null?void 0:E.size)||z.size,key:"error",id:(E==null?void 0:E.id)||O}),s),U=b.map(J=>{switch(J){case"label":return R;case"input":return H;case"description":return I;case"error":return V;default:return null}});return M.createElement(m8t,{value:J4({describedBy:T},f8t(b,{hasDescription:!!I,hasError:!!V}))},M.createElement(Ct,J4({className:w(S.root,n),ref:e},F),U))});T8e.displayName="@mantine/core/InputWrapper";var L8t=Object.defineProperty,_z=Object.getOwnPropertySymbols,N8e=Object.prototype.hasOwnProperty,P8e=Object.prototype.propertyIsEnumerable,T4e=(u,e,t)=>e in u?L8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,z8t=(u,e)=>{for(var t in e||(e={}))N8e.call(e,t)&&T4e(u,t,e[t]);if(_z)for(var t of _z(e))P8e.call(e,t)&&T4e(u,t,e[t]);return u},M8t=(u,e)=>{var t={};for(var n in u)N8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&_z)for(var n of _z(u))e.indexOf(n)<0&&P8e.call(u,n)&&(t[n]=u[n]);return t};const T8t={},R8e=C.forwardRef((u,e)=>{const t=Qe("InputPlaceholder",T8t,u),{sx:n}=t,i=M8t(t,["sx"]);return M.createElement(Ct,z8t({component:"span",sx:[r=>r.fn.placeholderStyles(),...EI(n)],ref:e},i))});R8e.displayName="@mantine/core/InputPlaceholder";var N8t=Object.defineProperty,P8t=Object.defineProperties,R8t=Object.getOwnPropertyDescriptors,N4e=Object.getOwnPropertySymbols,I8t=Object.prototype.hasOwnProperty,O8t=Object.prototype.propertyIsEnumerable,P4e=(u,e,t)=>e in u?N8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$_=(u,e)=>{for(var t in e||(e={}))I8t.call(e,t)&&P4e(u,t,e[t]);if(N4e)for(var t of N4e(e))O8t.call(e,t)&&P4e(u,t,e[t]);return u},OV=(u,e)=>P8t(u,R8t(e));const kr={xs:G(30),sm:G(36),md:G(42),lg:G(50),xl:G(60)},j8t=["default","filled","unstyled"];function H8t({theme:u,variant:e}){return j8t.includes(e)?e==="default"?{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,transition:"border-color 100ms ease","&:focus, &:focus-within":u.focusRingStyles.inputStyles(u)}:e==="filled"?{border:`${G(1)} solid transparent`,backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],"&:focus, &:focus-within":u.focusRingStyles.inputStyles(u)}:{borderWidth:0,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,backgroundColor:"transparent",minHeight:G(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var V8t=at((u,{multiline:e,radius:t,invalid:n,rightSectionWidth:i,withRightSection:r,iconWidth:a,offsetBottom:o,offsetTop:s,pointer:l},{variant:c,size:d})=>{const h=u.fn.variant({variant:"filled",color:"red"}).background,E=c==="default"||c==="filled"?{minHeight:ye({size:d,sizes:kr}),paddingLeft:`calc(${ye({size:d,sizes:kr})} / 3)`,paddingRight:r?i||ye({size:d,sizes:kr}):`calc(${ye({size:d,sizes:kr})} / 3)`,borderRadius:u.fn.radius(t)}:c==="unstyled"&&r?{paddingRight:i||ye({size:d,sizes:kr})}:null;return{wrapper:{position:"relative",marginTop:s?`calc(${u.spacing.xs} / 2)`:void 0,marginBottom:o?`calc(${u.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:OV($_($_(OV($_({},u.fn.fontStyles()),{height:e?c==="unstyled"?void 0:"auto":ye({size:d,sizes:kr}),WebkitTapHighlightColor:"transparent",lineHeight:e?u.lineHeight:`calc(${ye({size:d,sizes:kr})} - ${G(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:ye({size:d,sizes:u.fontSizes}),width:"100%",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,display:"block",textAlign:"left",cursor:l?"pointer":void 0}),H8t({theme:u,variant:c})),E),{"&:disabled, &[data-disabled]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:u.colors.dark[2]}},"&[data-invalid]":{color:h,borderColor:h,"&::placeholder":{opacity:1,color:h}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?G(a):ye({size:d,sizes:kr})},"&::placeholder":OV($_({},u.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?G(a):ye({size:d,sizes:kr}),color:n?u.colors.red[u.colorScheme==="dark"?6:7]:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:i||ye({size:d,sizes:kr})}}});const $8t=V8t;var K8t=Object.defineProperty,W8t=Object.defineProperties,G8t=Object.getOwnPropertyDescriptors,Sz=Object.getOwnPropertySymbols,I8e=Object.prototype.hasOwnProperty,O8e=Object.prototype.propertyIsEnumerable,R4e=(u,e,t)=>e in u?K8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,K_=(u,e)=>{for(var t in e||(e={}))I8e.call(e,t)&&R4e(u,t,e[t]);if(Sz)for(var t of Sz(e))O8e.call(e,t)&&R4e(u,t,e[t]);return u},I4e=(u,e)=>W8t(u,G8t(e)),U8t=(u,e)=>{var t={};for(var n in u)I8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Sz)for(var n of Sz(u))e.indexOf(n)<0&&O8e.call(u,n)&&(t[n]=u[n]);return t};const q8t={size:"sm",variant:"default"},Zp=C.forwardRef((u,e)=>{const t=Qe("Input",q8t,u),{className:n,error:i,required:r,disabled:a,variant:o,icon:s,style:l,rightSectionWidth:c,iconWidth:d,rightSection:h,rightSectionProps:E,radius:m,size:g,wrapperProps:f,classNames:p,styles:D,__staticSelector:x,multiline:b,sx:k,unstyled:A,pointer:F}=t,S=U8t(t,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:w,offsetTop:z,describedBy:N}=g8t(),{classes:O,cx:y}=$8t({radius:m,multiline:b,invalid:!!i,rightSectionWidth:c?G(c):void 0,iconWidth:d,withRightSection:!!h,offsetBottom:w,offsetTop:z,pointer:F},{classNames:p,styles:D,name:["Input",x],unstyled:A,variant:o,size:g}),{systemStyles:_,rest:L}=w4(S);return M.createElement(Ct,K_(K_({className:y(O.wrapper,n),sx:k,style:l},_),f),s&&M.createElement("div",{className:O.icon},s),M.createElement(Ct,I4e(K_({component:"input"},L),{ref:e,required:r,"aria-invalid":!!i,"aria-describedby":N,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!s||void 0,"data-invalid":!!i||void 0,className:O.input})),h&&M.createElement("div",I4e(K_({},E),{className:O.rightSection}),h))});Zp.displayName="@mantine/core/Input";Zp.Wrapper=T8e;Zp.Label=gne;Zp.Description=pne;Zp.Error=fne;Zp.Placeholder=R8e;const Ra=Zp;var J8t=Object.defineProperty,Bz=Object.getOwnPropertySymbols,j8e=Object.prototype.hasOwnProperty,H8e=Object.prototype.propertyIsEnumerable,O4e=(u,e,t)=>e in u?J8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Z8t=(u,e)=>{for(var t in e||(e={}))j8e.call(e,t)&&O4e(u,t,e[t]);if(Bz)for(var t of Bz(e))H8e.call(e,t)&&O4e(u,t,e[t]);return u},Y8t=(u,e)=>{var t={};for(var n in u)j8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Bz)for(var n of Bz(u))e.indexOf(n)<0&&H8e.call(u,n)&&(t[n]=u[n]);return t};function Q8t(u){const e=u,{style:t}=e,n=Y8t(e,["style"]);return M.createElement("svg",Z8t({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},n),M.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var X8t=Object.defineProperty,eBt=Object.defineProperties,tBt=Object.getOwnPropertyDescriptors,j4e=Object.getOwnPropertySymbols,uBt=Object.prototype.hasOwnProperty,nBt=Object.prototype.propertyIsEnumerable,H4e=(u,e,t)=>e in u?X8t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,iBt=(u,e)=>{for(var t in e||(e={}))uBt.call(e,t)&&H4e(u,t,e[t]);if(j4e)for(var t of j4e(e))nBt.call(e,t)&&H4e(u,t,e[t]);return u},rBt=(u,e)=>eBt(u,tBt(e));const V8e=C.createContext(null);function aBt({spacing:u,children:e}){return M.createElement(V8e.Provider,{value:{spacing:u}},e)}function oBt(){const u=C.useContext(V8e);return u?rBt(iBt({},u),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var sBt=at((u,{spacing:e})=>({root:{display:"flex",paddingLeft:ye({size:e,sizes:u.spacing})}}));const lBt=sBt;var cBt=Object.defineProperty,wz=Object.getOwnPropertySymbols,$8e=Object.prototype.hasOwnProperty,K8e=Object.prototype.propertyIsEnumerable,V4e=(u,e,t)=>e in u?cBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,dBt=(u,e)=>{for(var t in e||(e={}))$8e.call(e,t)&&V4e(u,t,e[t]);if(wz)for(var t of wz(e))K8e.call(e,t)&&V4e(u,t,e[t]);return u},hBt=(u,e)=>{var t={};for(var n in u)$8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wz)for(var n of wz(u))e.indexOf(n)<0&&K8e.call(u,n)&&(t[n]=u[n]);return t};const EBt={},W8e=C.forwardRef((u,e)=>{const t=Qe("AvatarGroup",EBt,u),{children:n,spacing:i="sm",unstyled:r,className:a,variant:o}=t,s=hBt(t,["children","spacing","unstyled","className","variant"]),{classes:l,cx:c}=lBt({spacing:i},{name:"AvatarGroup",unstyled:r,variant:o});return M.createElement(aBt,{spacing:i},M.createElement(Ct,dBt({ref:e,className:c(l.root,a)},s),n))});W8e.displayName="@mantine/core/AvatarGroup";var mBt=Object.defineProperty,gBt=Object.defineProperties,fBt=Object.getOwnPropertyDescriptors,$4e=Object.getOwnPropertySymbols,pBt=Object.prototype.hasOwnProperty,DBt=Object.prototype.propertyIsEnumerable,K4e=(u,e,t)=>e in u?mBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,UC=(u,e)=>{for(var t in e||(e={}))pBt.call(e,t)&&K4e(u,t,e[t]);if($4e)for(var t of $4e(e))DBt.call(e,t)&&K4e(u,t,e[t]);return u},W4e=(u,e)=>gBt(u,fBt(e));const xBt=["filled","light","gradient","outline"],W_={xs:G(16),sm:G(26),md:G(38),lg:G(56),xl:G(84)};function vBt({withinGroup:u,spacing:e,theme:t}){return u?{marginLeft:`calc(${ye({size:e,sizes:t.spacing})} * -1)`,backgroundColor:`${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`,border:`${G(2)} solid ${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`}:null}function CBt({theme:u,variant:e,color:t,gradient:n}){const i=u.fn.variant({variant:e,color:t,gradient:n});return xBt.includes(e)?{placeholder:{color:i.color,backgroundColor:i.background,backgroundImage:e==="gradient"?i.background:void 0,border:`${G(e==="gradient"?0:1)} solid ${i.border}`},placeholderIcon:{color:i.color}}:{}}var bBt=at((u,{radius:e,withinGroup:t,spacing:n,color:i,gradient:r},{variant:a,size:o})=>{const s=CBt({theme:u,color:i,gradient:r,variant:a});return{root:UC(W4e(UC({},u.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:u.fn.radius(e),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:ye({size:o,sizes:W_}),minWidth:ye({size:o,sizes:W_}),height:ye({size:o,sizes:W_})}),vBt({withinGroup:t,spacing:n,theme:u})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:UC(W4e(UC({},u.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:u.fn.radius(e),fontSize:`calc(${ye({size:o,sizes:W_})} / 2.5)`}),s.placeholder),placeholderIcon:UC({width:"70%",height:"70%"},s.placeholderIcon)}});const kBt=bBt;var FBt=Object.defineProperty,yBt=Object.defineProperties,ABt=Object.getOwnPropertyDescriptors,Lz=Object.getOwnPropertySymbols,G8e=Object.prototype.hasOwnProperty,U8e=Object.prototype.propertyIsEnumerable,G4e=(u,e,t)=>e in u?FBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,U4e=(u,e)=>{for(var t in e||(e={}))G8e.call(e,t)&&G4e(u,t,e[t]);if(Lz)for(var t of Lz(e))U8e.call(e,t)&&G4e(u,t,e[t]);return u},_Bt=(u,e)=>yBt(u,ABt(e)),SBt=(u,e)=>{var t={};for(var n in u)G8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Lz)for(var n of Lz(u))e.indexOf(n)<0&&U8e.call(u,n)&&(t[n]=u[n]);return t};const BBt={size:"md",color:"gray",variant:"light"},Dne=C.forwardRef((u,e)=>{const t=Qe("Avatar",BBt,u),{className:n,size:i,src:r,alt:a,radius:o,children:s,color:l,variant:c,gradient:d,classNames:h,styles:E,imageProps:m,unstyled:g}=t,f=SBt(t,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),p=oBt(),[D,x]=C.useState(!r),{classes:b,cx:k}=kBt({color:l,radius:o,withinGroup:p.withinGroup,spacing:p.spacing,gradient:d},{classNames:h,styles:E,unstyled:g,name:"Avatar",variant:c,size:i});return C.useEffect(()=>{x(!r)},[r]),M.createElement(Ct,U4e({component:"div",className:k(b.root,n),ref:e},f),D?M.createElement("div",{className:b.placeholder,title:a},s||M.createElement(Q8t,{className:b.placeholderIcon})):M.createElement("img",_Bt(U4e({},m),{className:b.image,src:r,alt:a,onError:()=>x(!0)})))});Dne.displayName="@mantine/core/Avatar";Dne.Group=W8e;const q4e=Dne;var wBt=Object.defineProperty,LBt=Object.defineProperties,zBt=Object.getOwnPropertyDescriptors,J4e=Object.getOwnPropertySymbols,MBt=Object.prototype.hasOwnProperty,TBt=Object.prototype.propertyIsEnumerable,Z4e=(u,e,t)=>e in u?wBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jV=(u,e)=>{for(var t in e||(e={}))MBt.call(e,t)&&Z4e(u,t,e[t]);if(J4e)for(var t of J4e(e))TBt.call(e,t)&&Z4e(u,t,e[t]);return u},NBt=(u,e)=>LBt(u,zBt(e));const PBt=["light","filled","outline","dot","gradient"],HV={xs:{fontSize:G(9),height:G(16)},sm:{fontSize:G(10),height:G(18)},md:{fontSize:G(11),height:G(20)},lg:{fontSize:G(13),height:G(26)},xl:{fontSize:G(16),height:G(32)}},RBt={xs:G(4),sm:G(4),md:G(6),lg:G(8),xl:G(10)};function IBt({theme:u,variant:e,color:t,size:n,gradient:i}){if(!PBt.includes(e))return null;if(e==="dot"){const a=ye({size:n,sizes:RBt});return{backgroundColor:"transparent",color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[3]}`,paddingLeft:`calc(${ye({size:n,sizes:u.spacing})} / 1.5 - ${a} / 2)`,"&::before":{content:'""',display:"block",width:a,height:a,borderRadius:a,backgroundColor:u.fn.themeColor(t,u.colorScheme==="dark"?4:u.fn.primaryShade("light"),!0),marginRight:a}}}const r=u.fn.variant({color:t,variant:e,gradient:i});return{background:r.background,color:r.color,border:`${G(e==="gradient"?0:1)} solid ${r.border}`}}var OBt=at((u,{color:e,radius:t,gradient:n,fullWidth:i},{variant:r,size:a})=>{const{fontSize:o,height:s}=a in HV?HV[a]:HV.md;return{leftSection:{marginRight:`calc(${u.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${u.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:jV(NBt(jV(jV({},u.fn.focusStyles()),u.fn.fontStyles()),{fontSize:o,height:s,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${s} - ${G(2)})`,textDecoration:"none",padding:`0 calc(${ye({size:a,sizes:u.spacing})} / 1.5)`,boxSizing:"border-box",display:i?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:i?"100%":"auto",textTransform:"uppercase",borderRadius:u.fn.radius(t),fontWeight:700,letterSpacing:G(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),IBt({theme:u,variant:r,color:e,size:a,gradient:n}))}});const jBt=OBt;var HBt=Object.defineProperty,zz=Object.getOwnPropertySymbols,q8e=Object.prototype.hasOwnProperty,J8e=Object.prototype.propertyIsEnumerable,Y4e=(u,e,t)=>e in u?HBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,VBt=(u,e)=>{for(var t in e||(e={}))q8e.call(e,t)&&Y4e(u,t,e[t]);if(zz)for(var t of zz(e))J8e.call(e,t)&&Y4e(u,t,e[t]);return u},$Bt=(u,e)=>{var t={};for(var n in u)q8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&zz)for(var n of zz(u))e.indexOf(n)<0&&J8e.call(u,n)&&(t[n]=u[n]);return t};const KBt={variant:"light",size:"md",radius:"xl"},Z8e=C.forwardRef((u,e)=>{const t=Qe("Badge",KBt,u),{className:n,color:i,variant:r,fullWidth:a,children:o,size:s,leftSection:l,rightSection:c,radius:d,gradient:h,classNames:E,styles:m,unstyled:g}=t,f=$Bt(t,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:p,cx:D}=jBt({fullWidth:a,color:i,radius:d,gradient:h},{classNames:E,styles:m,name:"Badge",unstyled:g,variant:r,size:s});return M.createElement(Ct,VBt({className:D(p.root,n),ref:e},f),l&&M.createElement("span",{className:p.leftSection},l),M.createElement("span",{className:p.inner},o),c&&M.createElement("span",{className:p.rightSection},c))});Z8e.displayName="@mantine/core/Badge";const Uv=Z8e,WBt={xs:G(12),sm:G(18),md:G(24),lg:G(34),xl:G(42)};var GBt=at((u,{color:e,transitionDuration:t},{size:n})=>{const i=ye({size:n,sizes:WBt}),r=e||(u.colorScheme==="dark"?u.white:u.black);return{root:{borderRadius:u.radius.sm,width:`calc(${i} + ${u.spacing.xs})`,height:`calc(${i} + ${u.spacing.xs})`,padding:`calc(${u.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:i,height:`calc(${i} / 12)`,backgroundColor:r,outline:`${G(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${i} / 3) * -1)`},"&::after":{top:`calc(${i} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${i} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${i} / 3)) rotate(-45deg)`}}}}});const UBt=GBt;var qBt=Object.defineProperty,Mz=Object.getOwnPropertySymbols,Y8e=Object.prototype.hasOwnProperty,Q8e=Object.prototype.propertyIsEnumerable,Q4e=(u,e,t)=>e in u?qBt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JBt=(u,e)=>{for(var t in e||(e={}))Y8e.call(e,t)&&Q4e(u,t,e[t]);if(Mz)for(var t of Mz(e))Q8e.call(e,t)&&Q4e(u,t,e[t]);return u},ZBt=(u,e)=>{var t={};for(var n in u)Y8e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Mz)for(var n of Mz(u))e.indexOf(n)<0&&Q8e.call(u,n)&&(t[n]=u[n]);return t};const YBt={size:"md",transitionDuration:300},X8e=C.forwardRef((u,e)=>{const t=Qe("Burger",YBt,u),{className:n,opened:i,color:r,size:a,classNames:o,styles:s,transitionDuration:l,variant:c}=t,d=ZBt(t,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:h,cx:E}=UBt({color:r,transitionDuration:l},{classNames:o,styles:s,name:"Burger",variant:c,size:a});return M.createElement(L4,JBt({className:E(h.root,n),ref:e},d),M.createElement("div",{"data-opened":i||void 0,className:h.burger}))});X8e.displayName="@mantine/core/Burger";var QBt=at((u,{orientation:e,buttonBorderWidth:t})=>({root:{display:"flex",flexDirection:e==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[e==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${G(t)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[e==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${G(t)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${G(t)} / 2)`,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${G(t)} / 2)`},"& + [data-button]":{[e==="vertical"?"marginTop":"marginLeft"]:`calc(${t} * -1)`,"@media (min-resolution: 192dpi)":{[e==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const XBt=QBt;var ewt=Object.defineProperty,Tz=Object.getOwnPropertySymbols,eBe=Object.prototype.hasOwnProperty,tBe=Object.prototype.propertyIsEnumerable,X4e=(u,e,t)=>e in u?ewt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,twt=(u,e)=>{for(var t in e||(e={}))eBe.call(e,t)&&X4e(u,t,e[t]);if(Tz)for(var t of Tz(e))tBe.call(e,t)&&X4e(u,t,e[t]);return u},uwt=(u,e)=>{var t={};for(var n in u)eBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Tz)for(var n of Tz(u))e.indexOf(n)<0&&tBe.call(u,n)&&(t[n]=u[n]);return t};const nwt={orientation:"horizontal",buttonBorderWidth:1},uBe=C.forwardRef((u,e)=>{const t=Qe("ButtonGroup",nwt,u),{className:n,orientation:i,buttonBorderWidth:r,unstyled:a}=t,o=uwt(t,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:l}=XBt({orientation:i,buttonBorderWidth:r},{name:"ButtonGroup",unstyled:a});return M.createElement(Ct,twt({className:l(s.root,n),ref:e},o))});uBe.displayName="@mantine/core/ButtonGroup";var iwt=Object.defineProperty,rwt=Object.defineProperties,awt=Object.getOwnPropertyDescriptors,eEe=Object.getOwnPropertySymbols,owt=Object.prototype.hasOwnProperty,swt=Object.prototype.propertyIsEnumerable,tEe=(u,e,t)=>e in u?iwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yh=(u,e)=>{for(var t in e||(e={}))owt.call(e,t)&&tEe(u,t,e[t]);if(eEe)for(var t of eEe(e))swt.call(e,t)&&tEe(u,t,e[t]);return u},I8=(u,e)=>rwt(u,awt(e));const lwt=["filled","outline","light","white","default","subtle","gradient"],BZ={xs:{height:kr.xs,paddingLeft:G(14),paddingRight:G(14)},sm:{height:kr.sm,paddingLeft:G(18),paddingRight:G(18)},md:{height:kr.md,paddingLeft:G(22),paddingRight:G(22)},lg:{height:kr.lg,paddingLeft:G(26),paddingRight:G(26)},xl:{height:kr.xl,paddingLeft:G(32),paddingRight:G(32)},"compact-xs":{height:G(22),paddingLeft:G(7),paddingRight:G(7)},"compact-sm":{height:G(26),paddingLeft:G(8),paddingRight:G(8)},"compact-md":{height:G(30),paddingLeft:G(10),paddingRight:G(10)},"compact-lg":{height:G(34),paddingLeft:G(12),paddingRight:G(12)},"compact-xl":{height:G(40),paddingLeft:G(14),paddingRight:G(14)}};function cwt({compact:u,size:e,withLeftIcon:t,withRightIcon:n}){if(u)return BZ[`compact-${e}`];const i=BZ[e];return i?I8(yh({},i),{paddingLeft:t?`calc(${i.paddingLeft} / 1.5)`:i.paddingLeft,paddingRight:n?`calc(${i.paddingRight} / 1.5)`:i.paddingRight}):{}}const dwt=u=>({display:u?"block":"inline-block",width:u?"100%":"auto"});function hwt({variant:u,theme:e,color:t,gradient:n}){if(!lwt.includes(u))return null;const i=e.fn.variant({color:t,variant:u,gradient:n});return u==="gradient"?yh({border:0,backgroundImage:i.background,color:i.color},e.fn.hover({backgroundSize:"200%"})):yh({border:`${G(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover}))}var Ewt=at((u,{radius:e,fullWidth:t,compact:n,withLeftIcon:i,withRightIcon:r,color:a,gradient:o},{variant:s,size:l})=>({root:I8(yh(I8(yh(yh(yh(yh({},cwt({compact:n,size:l,withLeftIcon:i,withRightIcon:r})),u.fn.fontStyles()),u.fn.focusStyles()),dwt(t)),{borderRadius:u.fn.radius(e),fontWeight:600,position:"relative",lineHeight:1,fontSize:ye({size:l,sizes:u.fontSizes}),userSelect:"none",cursor:"pointer"}),hwt({variant:s,theme:u,color:a,gradient:o})),{"&:active":u.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":I8(yh({content:'""'},u.fn.cover(G(-1))),{backgroundColor:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:u.fn.radius(e),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:u.spacing.xs},rightIcon:{marginLeft:u.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const mwt=Ewt;var gwt=Object.defineProperty,Nz=Object.getOwnPropertySymbols,nBe=Object.prototype.hasOwnProperty,iBe=Object.prototype.propertyIsEnumerable,uEe=(u,e,t)=>e in u?gwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,nEe=(u,e)=>{for(var t in e||(e={}))nBe.call(e,t)&&uEe(u,t,e[t]);if(Nz)for(var t of Nz(e))iBe.call(e,t)&&uEe(u,t,e[t]);return u},fwt=(u,e)=>{var t={};for(var n in u)nBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Nz)for(var n of Nz(u))e.indexOf(n)<0&&iBe.call(u,n)&&(t[n]=u[n]);return t};const pwt={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},xne=C.forwardRef((u,e)=>{const t=Qe("Button",pwt,u),{className:n,size:i,color:r,type:a,disabled:o,children:s,leftIcon:l,rightIcon:c,fullWidth:d,variant:h,radius:E,uppercase:m,compact:g,loading:f,loaderPosition:p,loaderProps:D,gradient:x,classNames:b,styles:k,unstyled:A}=t,F=fwt(t,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:S,cx:w,theme:z}=mwt({radius:E,color:r,fullWidth:d,compact:g,gradient:x,withLeftIcon:!!l,withRightIcon:!!c},{name:"Button",unstyled:A,classNames:b,styles:k,variant:h,size:i}),N=z.fn.variant({color:r,variant:h}),O=M.createElement(Vv,nEe({color:N.color,size:`calc(${ye({size:i,sizes:BZ}).height} / 2)`},D));return M.createElement(L4,nEe({className:w(S.root,n),type:a,disabled:o,"data-button":!0,"data-disabled":o||void 0,"data-loading":f||void 0,ref:e,unstyled:A},F),M.createElement("div",{className:S.inner},(l||f&&p==="left")&&M.createElement("span",{className:w(S.icon,S.leftIcon)},f&&p==="left"?O:l),f&&p==="center"&&M.createElement("span",{className:S.centerLoader},O),M.createElement("span",{className:S.label,style:{textTransform:m?"uppercase":void 0}},s),(c||f&&p==="right")&&M.createElement("span",{className:w(S.icon,S.rightIcon)},f&&p==="right"?O:c)))});xne.displayName="@mantine/core/Button";xne.Group=uBe;const xl=xne;var Dwt=at((u,{radius:e,shadow:t})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,boxSizing:"border-box",borderRadius:u.fn.radius(e),boxShadow:u.shadows[t]||t||"none","&[data-with-border]":{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`}}}));const xwt=Dwt;var vwt=Object.defineProperty,Pz=Object.getOwnPropertySymbols,rBe=Object.prototype.hasOwnProperty,aBe=Object.prototype.propertyIsEnumerable,iEe=(u,e,t)=>e in u?vwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Cwt=(u,e)=>{for(var t in e||(e={}))rBe.call(e,t)&&iEe(u,t,e[t]);if(Pz)for(var t of Pz(e))aBe.call(e,t)&&iEe(u,t,e[t]);return u},bwt=(u,e)=>{var t={};for(var n in u)rBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Pz)for(var n of Pz(u))e.indexOf(n)<0&&aBe.call(u,n)&&(t[n]=u[n]);return t};const kwt={},oBe=C.forwardRef((u,e)=>{const t=Qe("Paper",kwt,u),{className:n,children:i,radius:r,withBorder:a,shadow:o,unstyled:s,variant:l}=t,c=bwt(t,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:d,cx:h}=xwt({radius:r,shadow:o},{name:"Paper",unstyled:s,variant:l});return M.createElement(Ct,Cwt({className:h(d.root,n),"data-with-border":a||void 0,ref:e},c),i)});oBe.displayName="@mantine/core/Paper";const sBe=oBe,lBe=C.createContext({padding:0}),Fwt=lBe.Provider,ywt=()=>C.useContext(lBe).padding;var Awt=at((u,{padding:e,withBorder:t,inheritPadding:n})=>{const i=ye({size:e,sizes:u.spacing}),r=`calc(-1 * ${i})`,a=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return{cardSection:{display:"block",marginLeft:r,marginRight:r,paddingLeft:n?i:void 0,paddingRight:n?i:void 0,borderTop:t?`${G(1)} solid ${a}`:void 0,borderBottom:t?`${G(1)} solid ${a}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:r,borderTop:0,borderBottom:t?`${G(1)} solid ${a}`:void 0},"&[data-last]":{marginBottom:r,borderBottom:0}}}});const _wt=Awt;var Swt=Object.defineProperty,Rz=Object.getOwnPropertySymbols,cBe=Object.prototype.hasOwnProperty,dBe=Object.prototype.propertyIsEnumerable,rEe=(u,e,t)=>e in u?Swt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Bwt=(u,e)=>{for(var t in e||(e={}))cBe.call(e,t)&&rEe(u,t,e[t]);if(Rz)for(var t of Rz(e))dBe.call(e,t)&&rEe(u,t,e[t]);return u},wwt=(u,e)=>{var t={};for(var n in u)cBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Rz)for(var n of Rz(u))e.indexOf(n)<0&&dBe.call(u,n)&&(t[n]=u[n]);return t};const Lwt={withBorder:!1,inheritPadding:!1},hBe=C.forwardRef((u,e)=>{const t=Qe("CardSection",Lwt,u),{className:n,withBorder:i,inheritPadding:r,unstyled:a,variant:o}=t,s=wwt(t,["className","withBorder","inheritPadding","unstyled","variant"]),{classes:l,cx:c}=_wt({padding:ywt(),withBorder:i,inheritPadding:r},{name:"Card",unstyled:a,variant:o});return M.createElement(Ct,Bwt({className:c(l.cardSection,n),ref:e},s))});hBe.displayName="@mantine/core/CardSection";const EBe=hBe;var zwt=at(u=>({root:{position:"relative",overflow:"hidden",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white}}));const Mwt=zwt;var Twt=Object.defineProperty,Iz=Object.getOwnPropertySymbols,mBe=Object.prototype.hasOwnProperty,gBe=Object.prototype.propertyIsEnumerable,aEe=(u,e,t)=>e in u?Twt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Nwt=(u,e)=>{for(var t in e||(e={}))mBe.call(e,t)&&aEe(u,t,e[t]);if(Iz)for(var t of Iz(e))gBe.call(e,t)&&aEe(u,t,e[t]);return u},Pwt=(u,e)=>{var t={};for(var n in u)mBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Iz)for(var n of Iz(u))e.indexOf(n)<0&&gBe.call(u,n)&&(t[n]=u[n]);return t};const Rwt={padding:"md"},vne=C.forwardRef((u,e)=>{const t=Qe("Card",Rwt,u),{className:n,padding:i,radius:r,children:a,unstyled:o,variant:s}=t,l=Pwt(t,["className","padding","radius","children","unstyled","variant"]),{classes:c,cx:d}=Mwt(null,{name:"Card",unstyled:o,variant:s}),h=C.Children.toArray(a),E=h.map((m,g)=>typeof m=="object"&&m&&"type"in m&&m.type===EBe?C.cloneElement(m,{variant:s,padding:i,"data-first":g===0||void 0,"data-last":g===h.length-1||void 0}):m);return M.createElement(Fwt,{value:{padding:i}},M.createElement(sBe,Nwt({className:d(c.root,n),radius:r,p:i,ref:e},l),E))});vne.Section=EBe;vne.displayName="@mantine/core/Card";const ym=vne;var Iwt=at((u,{inline:e})=>({root:{display:e?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const Owt=Iwt;var jwt=Object.defineProperty,Oz=Object.getOwnPropertySymbols,fBe=Object.prototype.hasOwnProperty,pBe=Object.prototype.propertyIsEnumerable,oEe=(u,e,t)=>e in u?jwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Hwt=(u,e)=>{for(var t in e||(e={}))fBe.call(e,t)&&oEe(u,t,e[t]);if(Oz)for(var t of Oz(e))pBe.call(e,t)&&oEe(u,t,e[t]);return u},Vwt=(u,e)=>{var t={};for(var n in u)fBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Oz)for(var n of Oz(u))e.indexOf(n)<0&&pBe.call(u,n)&&(t[n]=u[n]);return t};const DBe=C.forwardRef((u,e)=>{const t=Qe("Center",{},u),{inline:n,className:i,unstyled:r,variant:a}=t,o=Vwt(t,["inline","className","unstyled","variant"]),{classes:s,cx:l}=Owt({inline:n},{name:"Center",unstyled:r,variant:a});return M.createElement(Ct,Hwt({ref:e,className:l(s.root,i)},o))});DBe.displayName="@mantine/core/Center";const jz=DBe,xBe=C.createContext(null),$wt=xBe.Provider,Kwt=()=>C.useContext(xBe);var Wwt=Object.defineProperty,Hz=Object.getOwnPropertySymbols,vBe=Object.prototype.hasOwnProperty,CBe=Object.prototype.propertyIsEnumerable,sEe=(u,e,t)=>e in u?Wwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,lEe=(u,e)=>{for(var t in e||(e={}))vBe.call(e,t)&&sEe(u,t,e[t]);if(Hz)for(var t of Hz(e))CBe.call(e,t)&&sEe(u,t,e[t]);return u},Gwt=(u,e)=>{var t={};for(var n in u)vBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Hz)for(var n of Hz(u))e.indexOf(n)<0&&CBe.call(u,n)&&(t[n]=u[n]);return t};const Uwt={size:"sm"},bBe=C.forwardRef((u,e)=>{const t=Qe("CheckboxGroup",Uwt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s}=t,l=Gwt(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,d]=ps({value:i,defaultValue:r,finalValue:[],onChange:a}),h=E=>{const m=E.currentTarget.value;d(c.includes(m)?c.filter(g=>g!==m):[...c,m])};return M.createElement($wt,{value:{value:c,onChange:h,size:o}},M.createElement(Ra.Wrapper,lEe(lEe({labelElement:"div",size:o,__staticSelector:"CheckboxGroup",ref:e},s),l),n))});bBe.displayName="@mantine/core/CheckboxGroup";var qwt=Object.defineProperty,Vz=Object.getOwnPropertySymbols,kBe=Object.prototype.hasOwnProperty,FBe=Object.prototype.propertyIsEnumerable,cEe=(u,e,t)=>e in u?qwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$z=(u,e)=>{for(var t in e||(e={}))kBe.call(e,t)&&cEe(u,t,e[t]);if(Vz)for(var t of Vz(e))FBe.call(e,t)&&cEe(u,t,e[t]);return u},yBe=(u,e)=>{var t={};for(var n in u)kBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Vz)for(var n of Vz(u))e.indexOf(n)<0&&FBe.call(u,n)&&(t[n]=u[n]);return t};function Jwt(u){const e=u,{width:t,height:n,style:i}=e,r=yBe(e,["width","height","style"]);return M.createElement("svg",$z({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:$z({width:t,height:n},i)},r),M.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function ABe(u){var e=u,{indeterminate:t}=e,n=yBe(e,["indeterminate"]);return t?M.createElement("svg",$z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),M.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):M.createElement(Jwt,$z({},n))}var Zwt=Object.defineProperty,Ywt=Object.defineProperties,Qwt=Object.getOwnPropertyDescriptors,dEe=Object.getOwnPropertySymbols,Xwt=Object.prototype.hasOwnProperty,eLt=Object.prototype.propertyIsEnumerable,hEe=(u,e,t)=>e in u?Zwt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,EEe=(u,e)=>{for(var t in e||(e={}))Xwt.call(e,t)&&hEe(u,t,e[t]);if(dEe)for(var t of dEe(e))eLt.call(e,t)&&hEe(u,t,e[t]);return u},mEe=(u,e)=>Ywt(u,Qwt(e));const tLt={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)};var uLt=at((u,{radius:e,color:t,transitionDuration:n,labelPosition:i,error:r,indeterminate:a},{size:o})=>{const s=ye({size:o,sizes:tLt}),l=u.fn.variant({variant:"filled",color:t});return{icon:mEe(EEe({},u.fn.cover()),{ref:v1("icon"),color:a?"inherit":u.white,transform:a?"none":`translateY(${G(5)}) scale(0.5)`,opacity:a?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${n}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:s,height:s,order:i==="left"?2:1},input:mEe(EEe({},u.fn.focusStyles()),{appearance:"none",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${r?u.fn.variant({variant:"filled",color:"red"}).background:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,width:s,height:s,borderRadius:u.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${n}ms ease, background-color ${n}ms ease`,cursor:u.cursorType,"&:checked":{backgroundColor:l.background,borderColor:l.background,[`& + .${v1("icon")}`]:{opacity:1,color:u.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],borderColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${v1("icon")}`]:{color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[5]}}})}});const nLt=uLt;var iLt=Object.defineProperty,rLt=Object.defineProperties,aLt=Object.getOwnPropertyDescriptors,gEe=Object.getOwnPropertySymbols,oLt=Object.prototype.hasOwnProperty,sLt=Object.prototype.propertyIsEnumerable,fEe=(u,e,t)=>e in u?iLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,lLt=(u,e)=>{for(var t in e||(e={}))oLt.call(e,t)&&fEe(u,t,e[t]);if(gEe)for(var t of gEe(e))sLt.call(e,t)&&fEe(u,t,e[t]);return u},cLt=(u,e)=>rLt(u,aLt(e));const VV={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)};var dLt=at((u,{labelPosition:e},{size:t})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}},labelWrapper:cLt(lLt({},u.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:t in VV?ye({size:t,sizes:u.fontSizes}):void 0,lineHeight:t in VV?ye({size:t,sizes:VV}):void 0,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,cursor:u.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${u.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm},error:{marginTop:`calc(${u.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm},label:{cursor:u.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:u.spacing.sm,"&:disabled, &[data-disabled]":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]}}}));const hLt=dLt;var ELt=Object.defineProperty,Kz=Object.getOwnPropertySymbols,_Be=Object.prototype.hasOwnProperty,SBe=Object.prototype.propertyIsEnumerable,pEe=(u,e,t)=>e in u?ELt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mLt=(u,e)=>{for(var t in e||(e={}))_Be.call(e,t)&&pEe(u,t,e[t]);if(Kz)for(var t of Kz(e))SBe.call(e,t)&&pEe(u,t,e[t]);return u},gLt=(u,e)=>{var t={};for(var n in u)_Be.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Kz)for(var n of Kz(u))e.indexOf(n)<0&&SBe.call(u,n)&&(t[n]=u[n]);return t};const PI=C.forwardRef((u,e)=>{var t=u,{__staticSelector:n,className:i,classNames:r,styles:a,unstyled:o,children:s,label:l,description:c,id:d,disabled:h,error:E,size:m,labelPosition:g,variant:f}=t,p=gLt(t,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:D,cx:x}=hLt({labelPosition:g},{name:n,styles:a,classNames:r,unstyled:o,variant:f,size:m});return M.createElement(Ct,mLt({className:x(D.root,i),ref:e},p),M.createElement("div",{className:x(D.body)},s,M.createElement("div",{className:D.labelWrapper},l&&M.createElement("label",{className:D.label,"data-disabled":h||void 0,htmlFor:d},l),c&&M.createElement(Ra.Description,{className:D.description},c),E&&E!=="boolean"&&M.createElement(Ra.Error,{className:D.error},E))))});PI.displayName="@mantine/core/InlineInput";var fLt=Object.defineProperty,Wz=Object.getOwnPropertySymbols,BBe=Object.prototype.hasOwnProperty,wBe=Object.prototype.propertyIsEnumerable,DEe=(u,e,t)=>e in u?fLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,G_=(u,e)=>{for(var t in e||(e={}))BBe.call(e,t)&&DEe(u,t,e[t]);if(Wz)for(var t of Wz(e))wBe.call(e,t)&&DEe(u,t,e[t]);return u},pLt=(u,e)=>{var t={};for(var n in u)BBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Wz)for(var n of Wz(u))e.indexOf(n)<0&&wBe.call(u,n)&&(t[n]=u[n]);return t};const DLt={size:"sm",transitionDuration:100,icon:ABe,labelPosition:"right"},k0=C.forwardRef((u,e)=>{const t=Qe("Checkbox",DLt,u),{className:n,style:i,sx:r,checked:a,disabled:o,color:s,label:l,indeterminate:c,id:d,size:h,radius:E,wrapperProps:m,children:g,classNames:f,styles:p,transitionDuration:D,icon:x,unstyled:b,labelPosition:k,description:A,error:F,variant:S}=t,w=pLt(t,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=Kwt(),N=Jl(d),{systemStyles:O,rest:y}=w4(w),{classes:_}=nLt({radius:E,color:s,transitionDuration:D,labelPosition:k,error:!!F,indeterminate:c},{name:"Checkbox",classNames:f,styles:p,unstyled:b,variant:S,size:(z==null?void 0:z.size)||h}),L=z?{checked:z.value.includes(y.value),onChange:z.onChange}:{};return M.createElement(PI,G_(G_({className:n,sx:r,style:i,id:N,size:(z==null?void 0:z.size)||h,labelPosition:k,label:l,description:A,error:F,disabled:o,__staticSelector:"Checkbox",classNames:f,styles:p,unstyled:b,"data-checked":L.checked||void 0,variant:S},O),m),M.createElement("div",{className:_.inner},M.createElement("input",G_(G_({id:N,ref:e,type:"checkbox",className:_.input,checked:a,disabled:o},y),L)),M.createElement(x,{indeterminate:c,className:_.icon})))});k0.displayName="@mantine/core/Checkbox";k0.Group=bBe;var xLt=Object.defineProperty,vLt=Object.defineProperties,CLt=Object.getOwnPropertyDescriptors,xEe=Object.getOwnPropertySymbols,bLt=Object.prototype.hasOwnProperty,kLt=Object.prototype.propertyIsEnumerable,vEe=(u,e,t)=>e in u?xLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,FLt=(u,e)=>{for(var t in e||(e={}))bLt.call(e,t)&&vEe(u,t,e[t]);if(xEe)for(var t of xEe(e))kLt.call(e,t)&&vEe(u,t,e[t]);return u},yLt=(u,e)=>vLt(u,CLt(e)),ALt=at((u,{color:e})=>{const t=e||(u.colorScheme==="dark"?"dark":"gray"),n=u.fn.variant({color:t,variant:"light"});return{root:yLt(FLt({},u.fn.fontStyles()),{lineHeight:u.lineHeight,padding:`${G(2)} calc(${u.spacing.xs} / 2)`,borderRadius:u.radius.sm,color:u.colorScheme==="dark"?t==="dark"?u.colors.dark[0]:u.white:u.colors.dark[7],backgroundColor:u.colorScheme==="dark"&&t==="dark"?u.colors.dark[5]:n.background,fontFamily:u.fontFamilyMonospace,fontSize:u.fontSizes.xs}),block:{padding:u.spacing.xs,margin:0,overflowX:"auto"}}});const _Lt=ALt;var SLt=Object.defineProperty,Gz=Object.getOwnPropertySymbols,LBe=Object.prototype.hasOwnProperty,zBe=Object.prototype.propertyIsEnumerable,CEe=(u,e,t)=>e in u?SLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bEe=(u,e)=>{for(var t in e||(e={}))LBe.call(e,t)&&CEe(u,t,e[t]);if(Gz)for(var t of Gz(e))zBe.call(e,t)&&CEe(u,t,e[t]);return u},BLt=(u,e)=>{var t={};for(var n in u)LBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Gz)for(var n of Gz(u))e.indexOf(n)<0&&zBe.call(u,n)&&(t[n]=u[n]);return t};const wLt={},Uz=C.forwardRef((u,e)=>{const t=Qe("Code",wLt,u),{className:n,children:i,block:r,color:a,unstyled:o,variant:s}=t,l=BLt(t,["className","children","block","color","unstyled","variant"]),{classes:c,cx:d}=_Lt({color:a},{name:"Code",unstyled:o,variant:s});return r?M.createElement(Ct,bEe({component:"pre",dir:"ltr",className:d(c.root,c.block,n),ref:e},l),i):M.createElement(Ct,bEe({component:"code",className:d(c.root,n),ref:e,dir:"ltr"},l),i)});Uz.displayName="@mantine/core/Code";var LLt=at((u,{fluid:e,sizes:t},{size:n})=>({root:{paddingLeft:u.spacing.md,paddingRight:u.spacing.md,maxWidth:e?"100%":ye({size:n,sizes:t}),marginLeft:"auto",marginRight:"auto"}}));const zLt=LLt;var MLt=Object.defineProperty,qz=Object.getOwnPropertySymbols,MBe=Object.prototype.hasOwnProperty,TBe=Object.prototype.propertyIsEnumerable,kEe=(u,e,t)=>e in u?MLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,TLt=(u,e)=>{for(var t in e||(e={}))MBe.call(e,t)&&kEe(u,t,e[t]);if(qz)for(var t of qz(e))TBe.call(e,t)&&kEe(u,t,e[t]);return u},NLt=(u,e)=>{var t={};for(var n in u)MBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qz)for(var n of qz(u))e.indexOf(n)<0&&TBe.call(u,n)&&(t[n]=u[n]);return t};const PLt={sizes:{xs:G(540),sm:G(720),md:G(960),lg:G(1140),xl:G(1320)}},RI=C.forwardRef((u,e)=>{const t=Qe("Container",PLt,u),{className:n,fluid:i,size:r,unstyled:a,sizes:o,variant:s}=t,l=NLt(t,["className","fluid","size","unstyled","sizes","variant"]),{classes:c,cx:d}=zLt({fluid:i,sizes:o},{unstyled:a,name:"Container",variant:s,size:r});return M.createElement(Ct,TLt({className:d(c.root,n),ref:e},l))});RI.displayName="@mantine/core/Container";const[RLt,ILt]=U1("Drawer component was not found in tree"),FEe={xs:G(320),sm:G(380),md:G(440),lg:G(620),xl:G(780)};var OLt=at((u,{position:e},{size:t})=>({header:{zIndex:1e3},content:{flex:e==="right"||e==="left"?`0 0 ${ye({size:t,sizes:FEe})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:e==="right"||e==="left"?"100%":ye({size:t,sizes:FEe}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:e==="right"?"flex-end":"flex-start",alignItems:e==="bottom"?"flex-end":"flex-start"}}));const jLt=OLt,[HLt,N6]=U1("ModalBase component was not found in tree");var VLt=at(()=>({close:{marginLeft:"auto",marginRight:0}}));const $Lt=VLt;var KLt=Object.defineProperty,Jz=Object.getOwnPropertySymbols,NBe=Object.prototype.hasOwnProperty,PBe=Object.prototype.propertyIsEnumerable,yEe=(u,e,t)=>e in u?KLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,WLt=(u,e)=>{for(var t in e||(e={}))NBe.call(e,t)&&yEe(u,t,e[t]);if(Jz)for(var t of Jz(e))PBe.call(e,t)&&yEe(u,t,e[t]);return u},GLt=(u,e)=>{var t={};for(var n in u)NBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Jz)for(var n of Jz(u))e.indexOf(n)<0&&PBe.call(u,n)&&(t[n]=u[n]);return t};const ULt={size:"sm"},qLt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}CloseButton`,ULt,u),{className:i}=n,r=GLt(n,["className"]),{classes:a,cx:o}=$Lt(null,t.stylesApi);return M.createElement(SI,WLt({className:o(a.close,i),ref:e,onClick:t.onClose},r))});var JLt=at(()=>({overlay:{}}));const ZLt=JLt;var YLt=Object.defineProperty,QLt=Object.defineProperties,XLt=Object.getOwnPropertyDescriptors,AEe=Object.getOwnPropertySymbols,ezt=Object.prototype.hasOwnProperty,tzt=Object.prototype.propertyIsEnumerable,_Ee=(u,e,t)=>e in u?YLt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uzt=(u,e)=>{for(var t in e||(e={}))ezt.call(e,t)&&_Ee(u,t,e[t]);if(AEe)for(var t of AEe(e))tzt.call(e,t)&&_Ee(u,t,e[t]);return u},nzt=(u,e)=>QLt(u,XLt(e)),izt=at((u,{color:e,opacity:t,blur:n,radius:i,gradient:r,fixed:a,zIndex:o})=>({root:nzt(uzt({},u.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:r?void 0:u.fn.rgba(e,t),backgroundImage:r,backdropFilter:n?`blur(${G(n)})`:void 0,borderRadius:u.fn.radius(i),zIndex:o,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const rzt=izt;var azt=Object.defineProperty,Zz=Object.getOwnPropertySymbols,RBe=Object.prototype.hasOwnProperty,IBe=Object.prototype.propertyIsEnumerable,SEe=(u,e,t)=>e in u?azt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ozt=(u,e)=>{for(var t in e||(e={}))RBe.call(e,t)&&SEe(u,t,e[t]);if(Zz)for(var t of Zz(e))IBe.call(e,t)&&SEe(u,t,e[t]);return u},szt=(u,e)=>{var t={};for(var n in u)RBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Zz)for(var n of Zz(u))e.indexOf(n)<0&&IBe.call(u,n)&&(t[n]=u[n]);return t};const lzt={opacity:.6,color:"#000",zIndex:fd("modal"),radius:0},OBe=C.forwardRef((u,e)=>{const t=Qe("Overlay",lzt,u),{variant:n,opacity:i,color:r,blur:a,gradient:o,zIndex:s,radius:l,children:c,className:d,classNames:h,styles:E,unstyled:m,center:g,fixed:f}=t,p=szt(t,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:D,cx:x}=rzt({color:r,opacity:i,blur:a,radius:l,gradient:o,fixed:f,zIndex:s},{name:"Overlay",classNames:h,styles:E,unstyled:m,variant:n});return M.createElement(Ct,ozt({ref:e,className:x(D.root,d),"data-center":g||void 0},p),c)});OBe.displayName="@mantine/core/Overlay";const czt=OBe;var dzt=Object.defineProperty,hzt=Object.defineProperties,Ezt=Object.getOwnPropertyDescriptors,Yz=Object.getOwnPropertySymbols,jBe=Object.prototype.hasOwnProperty,HBe=Object.prototype.propertyIsEnumerable,BEe=(u,e,t)=>e in u?dzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,qC=(u,e)=>{for(var t in e||(e={}))jBe.call(e,t)&&BEe(u,t,e[t]);if(Yz)for(var t of Yz(e))HBe.call(e,t)&&BEe(u,t,e[t]);return u},mzt=(u,e)=>hzt(u,Ezt(e)),gzt=(u,e)=>{var t={};for(var n in u)jBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Yz)for(var n of Yz(u))e.indexOf(n)<0&&HBe.call(u,n)&&(t[n]=u[n]);return t};const fzt={},pzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Overlay`,fzt,u),{onClick:i,transitionProps:r,style:a,className:o}=n,s=gzt(n,["onClick","transitionProps","style","className"]),{classes:l,cx:c}=ZLt(null,t.stylesApi),d=h=>{i==null||i(h),t.closeOnClickOutside&&t.onClose()};return M.createElement(Jp,mzt(qC(qC({mounted:t.opened},t.transitionProps),r),{transition:"fade"}),h=>M.createElement(czt,qC({ref:e,onClick:d,fixed:!0,style:qC(qC({},a),h),className:c(l.overlay,o),zIndex:t.zIndex},s)))});var Dzt=at((u,{zIndex:e})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:e,pointerEvents:"none"},content:{pointerEvents:"all"}}));const xzt=Dzt;var vzt=Object.defineProperty,Qz=Object.getOwnPropertySymbols,VBe=Object.prototype.hasOwnProperty,$Be=Object.prototype.propertyIsEnumerable,wEe=(u,e,t)=>e in u?vzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JC=(u,e)=>{for(var t in e||(e={}))VBe.call(e,t)&&wEe(u,t,e[t]);if(Qz)for(var t of Qz(e))$Be.call(e,t)&&wEe(u,t,e[t]);return u},Czt=(u,e)=>{var t={};for(var n in u)VBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Qz)for(var n of Qz(u))e.indexOf(n)<0&&$Be.call(u,n)&&(t[n]=u[n]);return t};const bzt={},kzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Content`,bzt,u),{className:i,transitionProps:r,style:a,onKeyDown:o}=n,s=Czt(n,["className","transitionProps","style","onKeyDown"]),{classes:l,cx:c}=xzt({zIndex:t.zIndex},t.stylesApi),d=h=>{var E;((E=h.target)==null?void 0:E.getAttribute("data-mantine-stop-propagation"))!=="true"&&h.key==="Escape"&&t.closeOnEscape&&t.onClose(),o==null||o(h)};return M.createElement(Jp,JC(JC({mounted:t.opened,transition:"pop"},t.transitionProps),r),h=>M.createElement("div",{className:c(l.inner)},M.createElement(Ene,{active:t.opened&&t.trapFocus},M.createElement(sBe,JC({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":t.bodyMounted?t.getBodyId():void 0,"aria-labelledby":t.titleMounted?t.getTitleId():void 0,onKeyDown:d,ref:e,className:c(l.content,i),style:JC(JC({},a),h),shadow:t.shadow},s),s.children))))});var Fzt=at((u,{padding:e})=>{const t=ye({size:e,sizes:u.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:t,paddingRight:`calc(${t} - ${G(5)})`,position:"sticky",top:0,backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,zIndex:1e3}}});const yzt=Fzt;var Azt=Object.defineProperty,Xz=Object.getOwnPropertySymbols,KBe=Object.prototype.hasOwnProperty,WBe=Object.prototype.propertyIsEnumerable,LEe=(u,e,t)=>e in u?Azt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_zt=(u,e)=>{for(var t in e||(e={}))KBe.call(e,t)&&LEe(u,t,e[t]);if(Xz)for(var t of Xz(e))WBe.call(e,t)&&LEe(u,t,e[t]);return u},Szt=(u,e)=>{var t={};for(var n in u)KBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&Xz)for(var n of Xz(u))e.indexOf(n)<0&&WBe.call(u,n)&&(t[n]=u[n]);return t};const Bzt={},wzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Header`,Bzt,u),{className:i}=n,r=Szt(n,["className"]),{classes:a,cx:o}=yzt({padding:t.padding},t.stylesApi);return M.createElement(Ct,_zt({ref:e,className:o(a.header,i)},r))});var Lzt=at(u=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:u.fontSizes.md}}));const zzt=Lzt;var Mzt=Object.defineProperty,eM=Object.getOwnPropertySymbols,GBe=Object.prototype.hasOwnProperty,UBe=Object.prototype.propertyIsEnumerable,zEe=(u,e,t)=>e in u?Mzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Tzt=(u,e)=>{for(var t in e||(e={}))GBe.call(e,t)&&zEe(u,t,e[t]);if(eM)for(var t of eM(e))UBe.call(e,t)&&zEe(u,t,e[t]);return u},Nzt=(u,e)=>{var t={};for(var n in u)GBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&eM)for(var n of eM(u))e.indexOf(n)<0&&UBe.call(u,n)&&(t[n]=u[n]);return t};const Pzt={},Rzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Title`,Pzt,u),{className:i}=n,r=Nzt(n,["className"]),{classes:a,cx:o}=zzt(null,t.stylesApi);return C.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),M.createElement(Ct,Tzt({component:"h2",id:t.getTitleId(),className:o(a.title,i),ref:e},r))});var Izt=at((u,{padding:e})=>({body:{padding:ye({size:e,sizes:u.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Ozt=Izt;var jzt=Object.defineProperty,tM=Object.getOwnPropertySymbols,qBe=Object.prototype.hasOwnProperty,JBe=Object.prototype.propertyIsEnumerable,MEe=(u,e,t)=>e in u?jzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Hzt=(u,e)=>{for(var t in e||(e={}))qBe.call(e,t)&&MEe(u,t,e[t]);if(tM)for(var t of tM(e))JBe.call(e,t)&&MEe(u,t,e[t]);return u},Vzt=(u,e)=>{var t={};for(var n in u)qBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&tM)for(var n of tM(u))e.indexOf(n)<0&&JBe.call(u,n)&&(t[n]=u[n]);return t};const $zt={},Kzt=C.forwardRef((u,e)=>{const t=N6(),n=Qe(`${t.__staticSelector}Body`,$zt,u),{className:i}=n,r=Vzt(n,["className"]),{classes:a,cx:o}=Ozt({padding:t.padding},t.stylesApi);return C.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),M.createElement(Ct,Hzt({id:t.getBodyId(),className:o(a.body,i),ref:e},r))});function Wzt({children:u}){return M.createElement(M.Fragment,null,u)}function Gzt({opened:u,transitionDuration:e}){const[t,n]=C.useState(u),i=C.useRef(),a=QA()?0:e;return C.useEffect(()=>(u?(n(!0),window.clearTimeout(i.current)):a===0?n(!1):i.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(i.current)),[u,a]),t}var Uzt=at(()=>({root:{}}));const qzt=Uzt;var Jzt=Object.defineProperty,Zzt=Object.defineProperties,Yzt=Object.getOwnPropertyDescriptors,uM=Object.getOwnPropertySymbols,ZBe=Object.prototype.hasOwnProperty,YBe=Object.prototype.propertyIsEnumerable,TEe=(u,e,t)=>e in u?Jzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$V=(u,e)=>{for(var t in e||(e={}))ZBe.call(e,t)&&TEe(u,t,e[t]);if(uM)for(var t of uM(e))YBe.call(e,t)&&TEe(u,t,e[t]);return u},NEe=(u,e)=>Zzt(u,Yzt(e)),Qzt=(u,e)=>{var t={};for(var n in u)ZBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uM)for(var n of uM(u))e.indexOf(n)<0&&YBe.call(u,n)&&(t[n]=u[n]);return t};const n7={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:fd("modal"),padding:"md",size:"md",shadow:"xl"};function sn(u){const e=Qe("ModalBase",n7,u),{opened:t,onClose:n,children:i,closeOnClickOutside:r,__staticSelector:a,transitionProps:o,withinPortal:s,portalProps:l,keepMounted:c,target:d,zIndex:h,lockScroll:E,trapFocus:m,closeOnEscape:g,returnFocus:f,padding:p,shadow:D,id:x,size:b,variant:k,classNames:A,unstyled:F,styles:S,className:w}=e,z=Qzt(e,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:N,cx:O}=qzt(null,{name:a,classNames:A,styles:S,unstyled:F,variant:k,size:b}),y=Jl(x),[_,L]=C.useState(!1),[T,R]=C.useState(!1),I=typeof(o==null?void 0:o.duration)=="number"?o==null?void 0:o.duration:200,H=Gzt({opened:t,transitionDuration:I});return vZ("keydown",V=>{!m&&V.key==="Escape"&&g&&n()}),n_e({opened:t,shouldReturnFocus:m&&f}),M.createElement(XA,NEe($V({},l),{withinPortal:s,target:d}),M.createElement(HLt,{value:{__staticSelector:a,opened:t,onClose:n,closeOnClickOutside:r,transitionProps:NEe($V({},o),{duration:I,keepMounted:c}),zIndex:h,padding:p,id:y,getTitleId:()=>`${y}-title`,getBodyId:()=>`${y}-body`,titleMounted:_,bodyMounted:T,setTitleMounted:L,setBodyMounted:R,trapFocus:m,closeOnEscape:g,shadow:D,stylesApi:{name:a,size:b,variant:k,classNames:A,styles:S,unstyled:F}}},M.createElement(obt,{enabled:H&&E},M.createElement(Ct,$V({className:O(N.root,w)},z),i))))}sn.CloseButton=qLt;sn.Overlay=pzt;sn.Content=kzt;sn.Header=wzt;sn.Title=Rzt;sn.Body=Kzt;sn.NativeScrollArea=Wzt;var Xzt=Object.defineProperty,eMt=Object.defineProperties,tMt=Object.getOwnPropertyDescriptors,nM=Object.getOwnPropertySymbols,QBe=Object.prototype.hasOwnProperty,XBe=Object.prototype.propertyIsEnumerable,PEe=(u,e,t)=>e in u?Xzt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,O8=(u,e)=>{for(var t in e||(e={}))QBe.call(e,t)&&PEe(u,t,e[t]);if(nM)for(var t of nM(e))XBe.call(e,t)&&PEe(u,t,e[t]);return u},ewe=(u,e)=>eMt(u,tMt(e)),uMt=(u,e)=>{var t={};for(var n in u)QBe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nM)for(var n of nM(u))e.indexOf(n)<0&&XBe.call(u,n)&&(t[n]=u[n]);return t};const nMt={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},iMt={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},rMt=ewe(O8({},n7),{position:"left"});function twe(u){const e=Qe("DrawerRoot",rMt,u),{classNames:t,variant:n,size:i,scrollAreaComponent:r,position:a,transitionProps:o}=e,s=uMt(e,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:l,cx:c,theme:d}=jLt({position:a},{name:"Drawer",variant:n,size:i}),h=(d.dir==="rtl"?iMt:nMt)[a];return M.createElement(RLt,{value:{scrollAreaComponent:r}},M.createElement(sn,O8({__staticSelector:"Drawer",size:i,variant:n,transitionProps:O8({transition:h,duration:200},o),classNames:ewe(O8({},t),{content:c(l.content,t==null?void 0:t.content),inner:c(l.inner,t==null?void 0:t.inner)})},s)))}var aMt=Object.defineProperty,iM=Object.getOwnPropertySymbols,uwe=Object.prototype.hasOwnProperty,nwe=Object.prototype.propertyIsEnumerable,REe=(u,e,t)=>e in u?aMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,oMt=(u,e)=>{for(var t in e||(e={}))uwe.call(e,t)&&REe(u,t,e[t]);if(iM)for(var t of iM(e))nwe.call(e,t)&&REe(u,t,e[t]);return u},sMt=(u,e)=>{var t={};for(var n in u)uwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iM)for(var n of iM(u))e.indexOf(n)<0&&nwe.call(u,n)&&(t[n]=u[n]);return t};const lMt={shadow:"xl"},iwe=C.forwardRef((u,e)=>{const t=Qe("ModalContent",lMt,u),{children:n,scrollAreaComponent:i}=t,r=sMt(t,["children","scrollAreaComponent"]),a=ILt(),o=i||a.scrollAreaComponent||sn.NativeScrollArea;return M.createElement(sn.Content,oMt({ref:e,radius:0},r),M.createElement(o,{style:{height:"100vh"}},n))});var cMt=Object.defineProperty,dMt=Object.defineProperties,hMt=Object.getOwnPropertyDescriptors,rM=Object.getOwnPropertySymbols,rwe=Object.prototype.hasOwnProperty,awe=Object.prototype.propertyIsEnumerable,IEe=(u,e,t)=>e in u?cMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,j8=(u,e)=>{for(var t in e||(e={}))rwe.call(e,t)&&IEe(u,t,e[t]);if(rM)for(var t of rM(e))awe.call(e,t)&&IEe(u,t,e[t]);return u},EMt=(u,e)=>dMt(u,hMt(e)),mMt=(u,e)=>{var t={};for(var n in u)rwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rM)for(var n of rM(u))e.indexOf(n)<0&&awe.call(u,n)&&(t[n]=u[n]);return t};const gMt=EMt(j8({},n7),{withOverlay:!0,withCloseButton:!0});function T4(u){const e=Qe("Drawer",gMt,u),{title:t,withOverlay:n,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o}=e,s=mMt(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),l=!!t||r;return M.createElement(twe,j8({},s),n&&M.createElement(sn.Overlay,j8({},i)),M.createElement(iwe,null,l&&M.createElement(sn.Header,null,t&&M.createElement(sn.Title,null,t),r&&M.createElement(sn.CloseButton,j8({},a))),M.createElement(sn.Body,null,o)))}T4.Root=twe;T4.CloseButton=sn.CloseButton;T4.Overlay=sn.Overlay;T4.Content=iwe;T4.Header=sn.Header;T4.Title=sn.Title;T4.Body=sn.Body;T4.NativeScrollArea=sn.NativeScrollArea;var fMt=Object.defineProperty,aM=Object.getOwnPropertySymbols,owe=Object.prototype.hasOwnProperty,swe=Object.prototype.propertyIsEnumerable,OEe=(u,e,t)=>e in u?fMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jEe=(u,e)=>{for(var t in e||(e={}))owe.call(e,t)&&OEe(u,t,e[t]);if(aM)for(var t of aM(e))swe.call(e,t)&&OEe(u,t,e[t]);return u},pMt=(u,e)=>{var t={};for(var n in u)owe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&aM)for(var n of aM(u))e.indexOf(n)<0&&swe.call(u,n)&&(t[n]=u[n]);return t};const DMt={multiple:!1},lwe=C.forwardRef((u,e)=>{const t=Qe("FileButton",DMt,u),{onChange:n,children:i,multiple:r,accept:a,name:o,form:s,resetRef:l,disabled:c,capture:d,inputProps:h}=t,E=pMt(t,["onChange","children","multiple","accept","name","form","resetRef","disabled","capture","inputProps"]),m=C.useRef(),g=()=>{!c&&m.current.click()},f=D=>{n(r?Array.from(D.currentTarget.files):D.currentTarget.files[0]||null)};return Jue(l,()=>{m.current.value=""}),M.createElement(M.Fragment,null,i(jEe({onClick:g},E)),M.createElement("input",jEe({style:{display:"none"},type:"file",accept:a,multiple:r,onChange:f,ref:q1(e,m),name:o,form:s,capture:d},h)))});lwe.displayName="@mantine/core/FileButton";const xMt={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var vMt=Object.defineProperty,CMt=Object.defineProperties,bMt=Object.getOwnPropertyDescriptors,oM=Object.getOwnPropertySymbols,cwe=Object.prototype.hasOwnProperty,dwe=Object.prototype.propertyIsEnumerable,HEe=(u,e,t)=>e in u?vMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kMt=(u,e)=>{for(var t in e||(e={}))cwe.call(e,t)&&HEe(u,t,e[t]);if(oM)for(var t of oM(e))dwe.call(e,t)&&HEe(u,t,e[t]);return u},FMt=(u,e)=>CMt(u,bMt(e)),yMt=(u,e)=>{var t={};for(var n in u)cwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oM)for(var n of oM(u))e.indexOf(n)<0&&dwe.call(u,n)&&(t[n]=u[n]);return t};const AMt={},Am=C.forwardRef((u,e)=>{const t=Qe("Flex",AMt,u),{gap:n,rowGap:i,columnGap:r,align:a,justify:o,wrap:s,direction:l,sx:c}=t,d=yMt(t,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return M.createElement(Ct,FMt(kMt({},d),{sx:[{display:"flex"},h=>CZ({gap:n,rowGap:i,columnGap:r,align:a,justify:o,wrap:s,direction:l},h,xMt),...EI(c)],ref:e}))});Am.displayName="@mantine/core/Flex";function _Mt(u){return C.Children.toArray(u).filter(Boolean)}const hwe={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var SMt=at((u,{spacing:e,position:t,noWrap:n,grow:i,align:r,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:r||"center",flexWrap:n?"nowrap":"wrap",justifyContent:hwe[t],gap:ye({size:e,sizes:u.spacing}),"& > *":{boxSizing:"border-box",maxWidth:i?`calc(${100/a}% - (${G(ye({size:e,sizes:u.spacing}))} - ${ye({size:e,sizes:u.spacing})} / ${a}))`:void 0,flexGrow:i?1:0}}}));const BMt=SMt;var wMt=Object.defineProperty,sM=Object.getOwnPropertySymbols,Ewe=Object.prototype.hasOwnProperty,mwe=Object.prototype.propertyIsEnumerable,VEe=(u,e,t)=>e in u?wMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LMt=(u,e)=>{for(var t in e||(e={}))Ewe.call(e,t)&&VEe(u,t,e[t]);if(sM)for(var t of sM(e))mwe.call(e,t)&&VEe(u,t,e[t]);return u},zMt=(u,e)=>{var t={};for(var n in u)Ewe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&sM)for(var n of sM(u))e.indexOf(n)<0&&mwe.call(u,n)&&(t[n]=u[n]);return t};const MMt={position:"left",spacing:"md"},zi=C.forwardRef((u,e)=>{const t=Qe("Group",MMt,u),{className:n,position:i,align:r,children:a,noWrap:o,grow:s,spacing:l,unstyled:c,variant:d}=t,h=zMt(t,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),E=_Mt(a),{classes:m,cx:g}=BMt({align:r,grow:s,noWrap:o,spacing:l,position:i,count:E.length},{unstyled:c,name:"Group",variant:d});return M.createElement(Ct,LMt({className:g(m.root,n),ref:e},h),E)});zi.displayName="@mantine/core/Group";const gwe={context:"HoverCard component was not found in the tree",children:"HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[TMt,fwe]=U1(gwe.context);var NMt=Object.defineProperty,lM=Object.getOwnPropertySymbols,pwe=Object.prototype.hasOwnProperty,Dwe=Object.prototype.propertyIsEnumerable,$Ee=(u,e,t)=>e in u?NMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,PMt=(u,e)=>{for(var t in e||(e={}))pwe.call(e,t)&&$Ee(u,t,e[t]);if(lM)for(var t of lM(e))Dwe.call(e,t)&&$Ee(u,t,e[t]);return u},RMt=(u,e)=>{var t={};for(var n in u)pwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&lM)for(var n of lM(u))e.indexOf(n)<0&&Dwe.call(u,n)&&(t[n]=u[n]);return t};const IMt={};function xwe(u){const e=Qe("HoverCardDropdown",IMt,u),{children:t,onMouseEnter:n,onMouseLeave:i}=e,r=RMt(e,["children","onMouseEnter","onMouseLeave"]),a=fwe(),o=no(n,a.openDropdown),s=no(i,a.closeDropdown);return M.createElement(Es.Dropdown,PMt({onMouseEnter:o,onMouseLeave:s},r),t)}xwe.displayName="@mantine/core/HoverCardDropdown";var OMt=Object.defineProperty,cM=Object.getOwnPropertySymbols,vwe=Object.prototype.hasOwnProperty,Cwe=Object.prototype.propertyIsEnumerable,KEe=(u,e,t)=>e in u?OMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,jMt=(u,e)=>{for(var t in e||(e={}))vwe.call(e,t)&&KEe(u,t,e[t]);if(cM)for(var t of cM(e))Cwe.call(e,t)&&KEe(u,t,e[t]);return u},HMt=(u,e)=>{var t={};for(var n in u)vwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cM)for(var n of cM(u))e.indexOf(n)<0&&Cwe.call(u,n)&&(t[n]=u[n]);return t};const VMt={refProp:"ref"},bwe=C.forwardRef((u,e)=>{const t=Qe("HoverCardTarget",VMt,u),{children:n,refProp:i}=t,r=HMt(t,["children","refProp"]);if(!z6(n))throw new Error(gwe.children);const a=fwe(),o=no(n.props.onMouseEnter,a.openDropdown),s=no(n.props.onMouseLeave,a.closeDropdown);return M.createElement(Es.Target,jMt({refProp:i,ref:e},r),C.cloneElement(n,{onMouseEnter:o,onMouseLeave:s}))});bwe.displayName="@mantine/core/HoverCardTarget";function kwe({open:u,close:e,openDelay:t,closeDelay:n}){const i=C.useRef(-1),r=C.useRef(-1),a=()=>{window.clearTimeout(i.current),window.clearTimeout(r.current)},o=()=>{a(),t===0?u():i.current=window.setTimeout(u,t)},s=()=>{a(),n===0?e():r.current=window.setTimeout(e,n)};return C.useEffect(()=>a,[]),{openDropdown:o,closeDropdown:s}}var $Mt=Object.defineProperty,dM=Object.getOwnPropertySymbols,Fwe=Object.prototype.hasOwnProperty,ywe=Object.prototype.propertyIsEnumerable,WEe=(u,e,t)=>e in u?$Mt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KMt=(u,e)=>{for(var t in e||(e={}))Fwe.call(e,t)&&WEe(u,t,e[t]);if(dM)for(var t of dM(e))ywe.call(e,t)&&WEe(u,t,e[t]);return u},WMt=(u,e)=>{var t={};for(var n in u)Fwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&dM)for(var n of dM(u))e.indexOf(n)<0&&ywe.call(u,n)&&(t[n]=u[n]);return t};const GMt={openDelay:0,closeDelay:150,initiallyOpened:!1};function Ah(u){const e=Qe("HoverCard",GMt,u),{children:t,onOpen:n,onClose:i,openDelay:r,closeDelay:a,initiallyOpened:o}=e,s=WMt(e,["children","onOpen","onClose","openDelay","closeDelay","initiallyOpened"]),[l,{open:c,close:d}]=Un(o,{onClose:i,onOpen:n}),{openDropdown:h,closeDropdown:E}=kwe({open:c,close:d,openDelay:r,closeDelay:a});return M.createElement(TMt,{value:{openDropdown:h,closeDropdown:E}},M.createElement(Es,KMt({opened:l,__staticSelector:"HoverCard"},s),t))}Ah.displayName="@mantine/core/HoverCard";Ah.Target=bwe;Ah.Dropdown=xwe;var UMt=Object.defineProperty,hM=Object.getOwnPropertySymbols,Awe=Object.prototype.hasOwnProperty,_we=Object.prototype.propertyIsEnumerable,GEe=(u,e,t)=>e in u?UMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,UEe=(u,e)=>{for(var t in e||(e={}))Awe.call(e,t)&&GEe(u,t,e[t]);if(hM)for(var t of hM(e))_we.call(e,t)&&GEe(u,t,e[t]);return u},qMt=(u,e)=>{var t={};for(var n in u)Awe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&hM)for(var n of hM(u))e.indexOf(n)<0&&_we.call(u,n)&&(t[n]=u[n]);return t};function JMt(u){const e=u,{width:t,height:n,style:i}=e,r=qMt(e,["width","height","style"]);return M.createElement("svg",UEe({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:UEe({width:t,height:n},i)},r),M.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var ZMt=Object.defineProperty,YMt=Object.defineProperties,QMt=Object.getOwnPropertyDescriptors,qEe=Object.getOwnPropertySymbols,XMt=Object.prototype.hasOwnProperty,eTt=Object.prototype.propertyIsEnumerable,JEe=(u,e,t)=>e in u?ZMt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZEe=(u,e)=>{for(var t in e||(e={}))XMt.call(e,t)&&JEe(u,t,e[t]);if(qEe)for(var t of qEe(e))eTt.call(e,t)&&JEe(u,t,e[t]);return u},YEe=(u,e)=>YMt(u,QMt(e)),tTt=at((u,{radius:e})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:YEe(ZEe({},u.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:u.fn.radius(e)}),caption:{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[7],marginTop:u.spacing.xs},placeholder:YEe(ZEe({},u.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0],borderRadius:u.fn.radius(e)})}));const uTt=tTt;var nTt=Object.defineProperty,iTt=Object.defineProperties,rTt=Object.getOwnPropertyDescriptors,EM=Object.getOwnPropertySymbols,Swe=Object.prototype.hasOwnProperty,Bwe=Object.prototype.propertyIsEnumerable,QEe=(u,e,t)=>e in u?nTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZC=(u,e)=>{for(var t in e||(e={}))Swe.call(e,t)&&QEe(u,t,e[t]);if(EM)for(var t of EM(e))Bwe.call(e,t)&&QEe(u,t,e[t]);return u},aTt=(u,e)=>iTt(u,rTt(e)),oTt=(u,e)=>{var t={};for(var n in u)Swe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&EM)for(var n of EM(u))e.indexOf(n)<0&&Bwe.call(u,n)&&(t[n]=u[n]);return t};const sTt={fit:"cover",width:"100%",height:"auto",radius:0},wZ=C.forwardRef((u,e)=>{const t=Qe("Image",sTt,u),{className:n,alt:i,src:r,fit:a,width:o,height:s,radius:l,imageProps:c,withPlaceholder:d,placeholder:h,imageRef:E,classNames:m,styles:g,caption:f,unstyled:p,style:D,variant:x}=t,b=oTt(t,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:k,cx:A}=uTt({radius:l},{classNames:m,styles:g,unstyled:p,name:"Image",variant:x}),[F,S]=C.useState(!r),w=d&&F;return To(()=>{S(!r)},[r]),M.createElement(Ct,ZC({className:A(k.root,n),style:ZC({width:G(o)},D),ref:e},b),M.createElement("figure",{className:k.figure},M.createElement("div",{className:k.imageWrapper},M.createElement("img",aTt(ZC({src:r,alt:i,ref:E},c),{className:A(k.image,c==null?void 0:c.className),onError:z=>{S(!0),typeof(c==null?void 0:c.onError)=="function"&&c.onError(z)},style:ZC(ZC({objectFit:a,width:G(o),height:G(s)},w&&{overflow:"hidden"}),c==null?void 0:c.style)})),w&&M.createElement("div",{className:k.placeholder,title:i},h||M.createElement("div",null,M.createElement(JMt,{width:G(40),height:G(40)})))),!!f&&M.createElement(_u,{component:"figcaption",size:"sm",align:"center",className:k.caption},f)))});wZ.displayName="@mantine/core/Image";var lTt=Object.defineProperty,cTt=Object.defineProperties,dTt=Object.getOwnPropertyDescriptors,XEe=Object.getOwnPropertySymbols,hTt=Object.prototype.hasOwnProperty,ETt=Object.prototype.propertyIsEnumerable,eme=(u,e,t)=>e in u?lTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tme=(u,e)=>{for(var t in e||(e={}))hTt.call(e,t)&&eme(u,t,e[t]);if(XEe)for(var t of XEe(e))ETt.call(e,t)&&eme(u,t,e[t]);return u},ume=(u,e)=>cTt(u,dTt(e));const mTt=u=>K2t({from:{boxShadow:`0 0 ${G(.5)} 0 ${u}`,opacity:.6},to:{boxShadow:`0 0 ${G(.5)} ${G(4.4)} ${u}`,opacity:0}});function nme(u,e=0){const t={},[n,i]=u.split("-");let r="",a="";return n==="top"&&(t.top=e,a="-50%"),n==="middle"&&(t.top="50%",a="-50%"),n==="bottom"&&(t.bottom=e,a="50%"),i==="start"&&(t.left=e,r="-50%"),i==="center"&&(t.left="50%",r="-50%"),i==="end"&&(t.right=e,r="50%"),t.transform=`translate(${r}, ${a})`,t}var gTt=at((u,{radius:e,color:t,position:n,offset:i,inline:r,withBorder:a,withLabel:o,zIndex:s},{size:l})=>{const{background:c}=u.fn.variant({variant:"filled",primaryFallback:!1,color:t||u.primaryColor}),d=G(l);return{root:{position:"relative",display:r?"inline-block":"block"},indicator:ume(tme({},nme(n,i)),{zIndex:s,position:"absolute",[o?"minWidth":"width"]:d,height:d,display:"flex",justifyContent:"center",alignItems:"center",fontSize:u.fontSizes.xs,paddingLeft:o?`calc(${u.spacing.xs} / 2)`:0,paddingRight:o?`calc(${u.spacing.xs} / 2)`:0,borderRadius:u.fn.radius(e),backgroundColor:u.fn.variant({variant:"filled",primaryFallback:!1,color:t||u.primaryColor}).background,border:a?`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[7]:u.white}`:void 0,color:u.white,whiteSpace:"nowrap"}),processing:{animation:`${mTt(c)} 1000ms linear infinite`},common:ume(tme({},nme(n,i)),{position:"absolute",[o?"minWidth":"width"]:d,height:d,borderRadius:u.fn.radius(e)})}});const fTt=gTt;var pTt=Object.defineProperty,mM=Object.getOwnPropertySymbols,wwe=Object.prototype.hasOwnProperty,Lwe=Object.prototype.propertyIsEnumerable,ime=(u,e,t)=>e in u?pTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DTt=(u,e)=>{for(var t in e||(e={}))wwe.call(e,t)&&ime(u,t,e[t]);if(mM)for(var t of mM(e))Lwe.call(e,t)&&ime(u,t,e[t]);return u},xTt=(u,e)=>{var t={};for(var n in u)wwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&mM)for(var n of mM(u))e.indexOf(n)<0&&Lwe.call(u,n)&&(t[n]=u[n]);return t};const vTt={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:fd("app")},zwe=C.forwardRef((u,e)=>{const t=Qe("Indicator",vTt,u),{children:n,position:i,offset:r,size:a,radius:o,inline:s,withBorder:l,className:c,color:d,styles:h,label:E,classNames:m,disabled:g,zIndex:f,unstyled:p,processing:D,variant:x}=t,b=xTt(t,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:k,cx:A}=fTt({position:i,offset:r,radius:o,inline:s,color:d,withBorder:l,zIndex:f,withLabel:!!E},{name:"Indicator",classNames:m,styles:h,unstyled:p,variant:x,size:a});return M.createElement(Ct,DTt({ref:e,className:A(k.root,c)},b),!g&&M.createElement(M.Fragment,null,M.createElement("div",{className:A(k.indicator,k.common)},E),D&&M.createElement("div",{className:A(k.processing,k.common)})),n)});zwe.displayName="@mantine/core/Indicator";function Mwe(u,e){if(u==null)return{};var t={},n=Object.keys(u),i,r;for(r=0;r=0)&&(t[i]=u[i]);return t}const Twe={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[CTt,i7]=U1(Twe.context);var bTt=at(u=>({divider:{marginTop:G(4),marginBottom:G(4),borderTop:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`}}));const kTt=bTt;var FTt=Object.defineProperty,gM=Object.getOwnPropertySymbols,Nwe=Object.prototype.hasOwnProperty,Pwe=Object.prototype.propertyIsEnumerable,rme=(u,e,t)=>e in u?FTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yTt=(u,e)=>{for(var t in e||(e={}))Nwe.call(e,t)&&rme(u,t,e[t]);if(gM)for(var t of gM(e))Pwe.call(e,t)&&rme(u,t,e[t]);return u},ATt=(u,e)=>{var t={};for(var n in u)Nwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&gM)for(var n of gM(u))e.indexOf(n)<0&&Pwe.call(u,n)&&(t[n]=u[n]);return t};const _Tt={},Rwe=C.forwardRef((u,e)=>{const t=Qe("MenuDivider",_Tt,u),{children:n,className:i}=t,r=ATt(t,["children","className"]),{classNames:a,styles:o,unstyled:s,variant:l}=i7(),{classes:c,cx:d}=kTt(null,{name:"Menu",classNames:a,styles:o,unstyled:s,variant:l});return M.createElement(Ct,yTt({className:d(c.divider,i),ref:e},r))});Rwe.displayName="@mantine/core/MenuDivider";var STt=Object.defineProperty,fM=Object.getOwnPropertySymbols,Iwe=Object.prototype.hasOwnProperty,Owe=Object.prototype.propertyIsEnumerable,ame=(u,e,t)=>e in u?STt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,BTt=(u,e)=>{for(var t in e||(e={}))Iwe.call(e,t)&&ame(u,t,e[t]);if(fM)for(var t of fM(e))Owe.call(e,t)&&ame(u,t,e[t]);return u},wTt=(u,e)=>{var t={};for(var n in u)Iwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&fM)for(var n of fM(u))e.indexOf(n)<0&&Owe.call(u,n)&&(t[n]=u[n]);return t};const LTt={};function jwe(u){const e=Qe("MenuDropdown",LTt,u),{children:t,onMouseEnter:n,onMouseLeave:i}=e,r=wTt(e,["children","onMouseEnter","onMouseLeave"]),a=C.useRef(),o=i7(),s=d=>{var h;(d.key==="ArrowUp"||d.key==="ArrowDown")&&(d.preventDefault(),(h=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||h.focus())},l=no(n,()=>o.trigger==="hover"&&o.openDropdown()),c=no(i,()=>o.trigger==="hover"&&o.closeDropdown());return M.createElement(Es.Dropdown,BTt({onMouseEnter:l,onMouseLeave:c,role:"menu","aria-orientation":"vertical"},r),M.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:s,ref:a,style:{outline:0}},t))}jwe.displayName="@mantine/core/MenuDropdown";var zTt=Object.defineProperty,MTt=Object.defineProperties,TTt=Object.getOwnPropertyDescriptors,ome=Object.getOwnPropertySymbols,NTt=Object.prototype.hasOwnProperty,PTt=Object.prototype.propertyIsEnumerable,sme=(u,e,t)=>e in u?zTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,RTt=(u,e)=>{for(var t in e||(e={}))NTt.call(e,t)&&sme(u,t,e[t]);if(ome)for(var t of ome(e))PTt.call(e,t)&&sme(u,t,e[t]);return u},ITt=(u,e)=>MTt(u,TTt(e)),OTt=at((u,{color:e,radius:t})=>({item:ITt(RTt({},u.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:u.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${u.spacing.xs} ${u.spacing.sm}`,cursor:"pointer",borderRadius:u.fn.radius(t),color:e?u.fn.variant({variant:"filled",primaryFallback:!1,color:e}).background:u.colorScheme==="dark"?u.colors.dark[0]:u.black,display:"flex",alignItems:"center","&:disabled":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:e?u.fn.variant({variant:"light",color:e}).background:u.colorScheme==="dark"?u.fn.rgba(u.colors.dark[3],.35):u.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:u.spacing.xs},itemRightSection:{}}));const jTt=OTt;var HTt=Object.defineProperty,VTt=Object.defineProperties,$Tt=Object.getOwnPropertyDescriptors,pM=Object.getOwnPropertySymbols,Hwe=Object.prototype.hasOwnProperty,Vwe=Object.prototype.propertyIsEnumerable,lme=(u,e,t)=>e in u?HTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KTt=(u,e)=>{for(var t in e||(e={}))Hwe.call(e,t)&&lme(u,t,e[t]);if(pM)for(var t of pM(e))Vwe.call(e,t)&&lme(u,t,e[t]);return u},WTt=(u,e)=>VTt(u,$Tt(e)),GTt=(u,e)=>{var t={};for(var n in u)Hwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&pM)for(var n of pM(u))e.indexOf(n)<0&&Vwe.call(u,n)&&(t[n]=u[n]);return t};const UTt={},$we=C.forwardRef((u,e)=>{const t=Qe("MenuItem",UTt,u),{children:n,className:i,color:r,closeMenuOnClick:a,icon:o,rightSection:s}=t,l=GTt(t,["children","className","color","closeMenuOnClick","icon","rightSection"]),c=i7(),{classes:d,cx:h,theme:E}=jTt({radius:c.radius,color:r},{name:"Menu",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),m=C.useRef(),g=c.getItemIndex(m.current),f=l,p=no(f.onMouseLeave,()=>c.setHovered(-1)),D=no(f.onMouseEnter,()=>c.setHovered(c.getItemIndex(m.current))),x=no(f.onClick,()=>{typeof a=="boolean"?a&&c.closeDropdownImmediately():c.closeOnItemClick&&c.closeDropdownImmediately()}),b=no(f.onFocus,()=>c.setHovered(c.getItemIndex(m.current)));return M.createElement(Ct,WTt(KTt({component:"button",type:"button"},l),{tabIndex:-1,onFocus:b,className:h(d.item,i),ref:q1(m,e),role:"menuitem","data-menu-item":!0,"data-hovered":c.hovered===g?!0:void 0,onMouseEnter:D,onMouseLeave:p,onClick:x,onKeyDown:Pue({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:c.loop,dir:E.dir,orientation:"vertical",onKeyDown:f.onKeydown})}),o&&M.createElement("div",{className:d.itemIcon},o),n&&M.createElement("div",{className:d.itemLabel},n),s&&M.createElement("div",{className:d.itemRightSection},s))});$we.displayName="@mantine/core/MenuItem";const qTt=$we;var JTt=at(u=>({label:{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],fontWeight:500,fontSize:u.fontSizes.xs,padding:`calc(${u.spacing.xs} / 2) ${u.spacing.sm}`,cursor:"default"}}));const ZTt=JTt;var YTt=Object.defineProperty,DM=Object.getOwnPropertySymbols,Kwe=Object.prototype.hasOwnProperty,Wwe=Object.prototype.propertyIsEnumerable,cme=(u,e,t)=>e in u?YTt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QTt=(u,e)=>{for(var t in e||(e={}))Kwe.call(e,t)&&cme(u,t,e[t]);if(DM)for(var t of DM(e))Wwe.call(e,t)&&cme(u,t,e[t]);return u},XTt=(u,e)=>{var t={};for(var n in u)Kwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&DM)for(var n of DM(u))e.indexOf(n)<0&&Wwe.call(u,n)&&(t[n]=u[n]);return t};const eNt={},Gwe=C.forwardRef((u,e)=>{const t=Qe("MenuLabel",eNt,u),{children:n,className:i}=t,r=XTt(t,["children","className"]),{classNames:a,styles:o,unstyled:s,variant:l}=i7(),{classes:c,cx:d}=ZTt(null,{name:"Menu",classNames:a,styles:o,unstyled:s,variant:l});return M.createElement(_u,QTt({className:d(c.label,i),ref:e},r),n)});Gwe.displayName="@mantine/core/MenuLabel";var tNt=Object.defineProperty,xM=Object.getOwnPropertySymbols,Uwe=Object.prototype.hasOwnProperty,qwe=Object.prototype.propertyIsEnumerable,dme=(u,e,t)=>e in u?tNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,uNt=(u,e)=>{for(var t in e||(e={}))Uwe.call(e,t)&&dme(u,t,e[t]);if(xM)for(var t of xM(e))qwe.call(e,t)&&dme(u,t,e[t]);return u},nNt=(u,e)=>{var t={};for(var n in u)Uwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&xM)for(var n of xM(u))e.indexOf(n)<0&&qwe.call(u,n)&&(t[n]=u[n]);return t};const iNt={refProp:"ref"},Jwe=C.forwardRef((u,e)=>{const t=Qe("MenuTarget",iNt,u),{children:n,refProp:i}=t,r=nNt(t,["children","refProp"]);if(!z6(n))throw new Error(Twe.children);const a=i7(),o=no(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),s=no(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),l=no(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return M.createElement(Es.Target,uNt({refProp:i,popupType:"menu",ref:e},r),C.cloneElement(n,{onClick:o,onMouseEnter:s,onMouseLeave:l,"data-expanded":a.opened?!0:void 0}))});Jwe.displayName="@mantine/core/MenuTarget";var rNt=at({dropdown:{padding:G(4)}});const aNt=rNt;var oNt=Object.defineProperty,sNt=Object.defineProperties,lNt=Object.getOwnPropertyDescriptors,vM=Object.getOwnPropertySymbols,Zwe=Object.prototype.hasOwnProperty,Ywe=Object.prototype.propertyIsEnumerable,hme=(u,e,t)=>e in u?oNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Eme=(u,e)=>{for(var t in e||(e={}))Zwe.call(e,t)&&hme(u,t,e[t]);if(vM)for(var t of vM(e))Ywe.call(e,t)&&hme(u,t,e[t]);return u},mme=(u,e)=>sNt(u,lNt(e)),cNt=(u,e)=>{var t={};for(var n in u)Zwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&vM)for(var n of vM(u))e.indexOf(n)<0&&Ywe.call(u,n)&&(t[n]=u[n]);return t};const dNt={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function La(u){const e=Qe("Menu",dNt,u),{children:t,onOpen:n,onClose:i,opened:r,defaultOpened:a,onChange:o,closeOnItemClick:s,loop:l,closeOnEscape:c,trigger:d,openDelay:h,closeDelay:E,classNames:m,styles:g,unstyled:f,radius:p,variant:D}=e,x=cNt(e,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:b,cx:k}=aNt(),[A,{setHovered:F,resetHovered:S}]=mbt(),[w,z]=ps({value:r,defaultValue:a,finalValue:!1,onChange:o}),N=()=>{z(!1),w&&(i==null||i())},O=()=>{z(!0),!w&&(n==null||n())},y=()=>w?N():O(),{openDropdown:_,closeDropdown:L}=kwe({open:O,close:N,closeDelay:E,openDelay:h}),T=R=>dbt("[data-menu-item]","[data-menu-dropdown]",R);return To(()=>{S()},[w]),M.createElement(CTt,{value:{opened:w,toggleDropdown:y,getItemIndex:T,hovered:A,setHovered:F,closeOnItemClick:s,closeDropdown:d==="click"?N:L,openDropdown:d==="click"?O:_,closeDropdownImmediately:N,loop:l,trigger:d,radius:p,classNames:m,styles:g,unstyled:f,variant:D}},M.createElement(Es,mme(Eme({},x),{radius:p,opened:w,onChange:y,defaultOpened:a,trapFocus:d==="click",closeOnEscape:c&&d==="click",__staticSelector:"Menu",classNames:mme(Eme({},m),{dropdown:k(b.dropdown,m==null?void 0:m.dropdown)}),styles:g,unstyled:f,variant:D}),t))}La.displayName="@mantine/core/Menu";La.Item=qTt;La.Label=Gwe;La.Dropdown=jwe;La.Target=Jwe;La.Divider=Rwe;const[hNt,ENt]=U1("Modal component was not found in tree"),mNt={xs:G(320),sm:G(380),md:G(440),lg:G(620),xl:G(780)};var gNt=at((u,{yOffset:e,xOffset:t,centered:n,fullScreen:i},{size:r})=>({content:{flex:i?"0 0 100%":`0 0 ${ye({size:r,sizes:mNt})}`,maxWidth:"100%",maxHeight:i?void 0:`calc(100dvh - (${G(e)} * 2))`,height:i?"100vh":void 0,borderRadius:i?0:void 0,overflowY:"auto"},inner:{paddingTop:i?0:e,paddingBottom:i?0:e,paddingLeft:i?0:t,paddingRight:i?0:t,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const fNt=gNt;var pNt=Object.defineProperty,DNt=Object.defineProperties,xNt=Object.getOwnPropertyDescriptors,CM=Object.getOwnPropertySymbols,Qwe=Object.prototype.hasOwnProperty,Xwe=Object.prototype.propertyIsEnumerable,gme=(u,e,t)=>e in u?pNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LZ=(u,e)=>{for(var t in e||(e={}))Qwe.call(e,t)&&gme(u,t,e[t]);if(CM)for(var t of CM(e))Xwe.call(e,t)&&gme(u,t,e[t]);return u},eLe=(u,e)=>DNt(u,xNt(e)),vNt=(u,e)=>{var t={};for(var n in u)Qwe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&CM)for(var n of CM(u))e.indexOf(n)<0&&Xwe.call(u,n)&&(t[n]=u[n]);return t};const CNt=eLe(LZ({},n7),{yOffset:"5dvh",xOffset:"5vw"});function tLe(u){const e=Qe("ModalRoot",CNt,u),{classNames:t,variant:n,size:i,yOffset:r,xOffset:a,scrollAreaComponent:o,radius:s,centered:l,fullScreen:c}=e,d=vNt(e,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:E}=fNt({yOffset:r,xOffset:a,centered:l,fullScreen:c},{name:"Modal",variant:n,size:i});return M.createElement(hNt,{value:{yOffset:r,scrollAreaComponent:o,radius:s}},M.createElement(sn,LZ({__staticSelector:"Modal",size:i,variant:n,classNames:eLe(LZ({},t),{content:E(h.content,t==null?void 0:t.content),inner:E(h.inner,t==null?void 0:t.inner)})},d)))}var bNt=Object.defineProperty,bM=Object.getOwnPropertySymbols,uLe=Object.prototype.hasOwnProperty,nLe=Object.prototype.propertyIsEnumerable,fme=(u,e,t)=>e in u?bNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kNt=(u,e)=>{for(var t in e||(e={}))uLe.call(e,t)&&fme(u,t,e[t]);if(bM)for(var t of bM(e))nLe.call(e,t)&&fme(u,t,e[t]);return u},FNt=(u,e)=>{var t={};for(var n in u)uLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&bM)for(var n of bM(u))e.indexOf(n)<0&&nLe.call(u,n)&&(t[n]=u[n]);return t};const yNt={shadow:"xl"},iLe=C.forwardRef((u,e)=>{const t=Qe("ModalContent",yNt,u),{children:n,scrollAreaComponent:i}=t,r=FNt(t,["children","scrollAreaComponent"]),a=ENt(),o=i||a.scrollAreaComponent||sn.NativeScrollArea;return M.createElement(sn.Content,kNt({ref:e,radius:a.radius},r),M.createElement(o,{style:{maxHeight:`calc(100dvh - (${G(a.yOffset)} * 2))`}},n))});var ANt=Object.defineProperty,_Nt=Object.defineProperties,SNt=Object.getOwnPropertyDescriptors,kM=Object.getOwnPropertySymbols,rLe=Object.prototype.hasOwnProperty,aLe=Object.prototype.propertyIsEnumerable,pme=(u,e,t)=>e in u?ANt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,H8=(u,e)=>{for(var t in e||(e={}))rLe.call(e,t)&&pme(u,t,e[t]);if(kM)for(var t of kM(e))aLe.call(e,t)&&pme(u,t,e[t]);return u},BNt=(u,e)=>_Nt(u,SNt(e)),wNt=(u,e)=>{var t={};for(var n in u)rLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&kM)for(var n of kM(u))e.indexOf(n)<0&&aLe.call(u,n)&&(t[n]=u[n]);return t};const LNt=BNt(H8({},n7),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Wi(u){const e=Qe("Modal",LNt,u),{title:t,withOverlay:n,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o}=e,s=wNt(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),l=!!t||r;return M.createElement(tLe,H8({},s),n&&M.createElement(sn.Overlay,H8({},i)),M.createElement(iLe,null,l&&M.createElement(sn.Header,null,t&&M.createElement(sn.Title,null,t),r&&M.createElement(sn.CloseButton,H8({},a))),M.createElement(sn.Body,null,o)))}Wi.Root=tLe;Wi.CloseButton=sn.CloseButton;Wi.Overlay=sn.Overlay;Wi.Content=iLe;Wi.Header=sn.Header;Wi.Title=sn.Title;Wi.Body=sn.Body;Wi.NativeScrollArea=sn.NativeScrollArea;const oLe={xs:G(16),sm:G(22),md:G(26),lg:G(30),xl:G(36)},zNt={xs:G(10),sm:G(12),md:G(14),lg:G(16),xl:G(18)};var MNt=at((u,{disabled:e,radius:t,readOnly:n},{size:i,variant:r})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:e?u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3]:u.colorScheme==="dark"?u.colors.dark[7]:r==="filled"?u.white:u.colors.gray[1],color:e?u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7]:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],height:ye({size:i,sizes:oLe}),paddingLeft:`calc(${ye({size:i,sizes:u.spacing})} / 1.5)`,paddingRight:e||n?ye({size:i,sizes:u.spacing}):0,fontWeight:500,fontSize:ye({size:i,sizes:zNt}),borderRadius:ye({size:t,sizes:u.radius}),cursor:e?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${G(10)})`},defaultValueRemove:{color:u.colorScheme==="dark"?u.colors.dark[0]:u.colors.gray[7],marginLeft:`calc(${ye({size:i,sizes:u.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const TNt=MNt;var NNt=Object.defineProperty,FM=Object.getOwnPropertySymbols,sLe=Object.prototype.hasOwnProperty,lLe=Object.prototype.propertyIsEnumerable,Dme=(u,e,t)=>e in u?NNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,PNt=(u,e)=>{for(var t in e||(e={}))sLe.call(e,t)&&Dme(u,t,e[t]);if(FM)for(var t of FM(e))lLe.call(e,t)&&Dme(u,t,e[t]);return u},RNt=(u,e)=>{var t={};for(var n in u)sLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&FM)for(var n of FM(u))e.indexOf(n)<0&&lLe.call(u,n)&&(t[n]=u[n]);return t};const INt={xs:16,sm:22,md:24,lg:26,xl:30};function cLe(u){var e=u,{label:t,classNames:n,styles:i,className:r,onRemove:a,disabled:o,readOnly:s,size:l,radius:c="sm",variant:d,unstyled:h}=e,E=RNt(e,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:m,cx:g}=TNt({disabled:o,readOnly:s,radius:c},{name:"MultiSelect",classNames:n,styles:i,unstyled:h,size:l,variant:d});return M.createElement("div",PNt({className:g(m.defaultValue,r)},E),M.createElement("span",{className:m.defaultValueLabel},t),!o&&!s&&M.createElement(SI,{"aria-hidden":!0,onMouseDown:a,size:INt[l],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:m.defaultValueRemove,tabIndex:-1,unstyled:h}))}cLe.displayName="@mantine/core/MultiSelect/DefaultValue";function ONt({data:u,searchable:e,limit:t,searchValue:n,filter:i,value:r,disableSelectedItemFiltering:a}){if(!e&&r.length===0)return u;if(!e){const s=[];for(let l=0;lc===u[l].value&&!u[l].disabled))&&s.push(u[l]);return s}const o=[];for(let s=0;sl===u[s].value&&!u[s].disabled),u[s])&&o.push(u[s]),!(o.length>=t));s+=1);return o}var jNt=Object.defineProperty,yM=Object.getOwnPropertySymbols,dLe=Object.prototype.hasOwnProperty,hLe=Object.prototype.propertyIsEnumerable,xme=(u,e,t)=>e in u?jNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,vme=(u,e)=>{for(var t in e||(e={}))dLe.call(e,t)&&xme(u,t,e[t]);if(yM)for(var t of yM(e))hLe.call(e,t)&&xme(u,t,e[t]);return u},HNt=(u,e)=>{var t={};for(var n in u)dLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&yM)for(var n of yM(u))e.indexOf(n)<0&&hLe.call(u,n)&&(t[n]=u[n]);return t};const VNt={xs:G(14),sm:G(18),md:G(20),lg:G(24),xl:G(28)};function $Nt(u){var e=u,{size:t,error:n,style:i}=e,r=HNt(e,["size","error","style"]);const a=jr(),o=ye({size:t,sizes:VNt});return M.createElement("svg",vme({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:vme({color:n?a.colors.red[6]:a.colors.gray[6],width:o,height:o},i),"data-chevron":!0},r),M.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var KNt=Object.defineProperty,WNt=Object.defineProperties,GNt=Object.getOwnPropertyDescriptors,Cme=Object.getOwnPropertySymbols,UNt=Object.prototype.hasOwnProperty,qNt=Object.prototype.propertyIsEnumerable,bme=(u,e,t)=>e in u?KNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JNt=(u,e)=>{for(var t in e||(e={}))UNt.call(e,t)&&bme(u,t,e[t]);if(Cme)for(var t of Cme(e))qNt.call(e,t)&&bme(u,t,e[t]);return u},ZNt=(u,e)=>WNt(u,GNt(e));function ELe({shouldClear:u,clearButtonProps:e,onClear:t,size:n,error:i}){return u?M.createElement(SI,ZNt(JNt({},e),{variant:"transparent",onClick:t,size:n,onMouseDown:r=>r.preventDefault()})):M.createElement($Nt,{error:i,size:n})}ELe.displayName="@mantine/core/SelectRightSection";var YNt=Object.defineProperty,QNt=Object.defineProperties,XNt=Object.getOwnPropertyDescriptors,AM=Object.getOwnPropertySymbols,mLe=Object.prototype.hasOwnProperty,gLe=Object.prototype.propertyIsEnumerable,kme=(u,e,t)=>e in u?YNt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,KV=(u,e)=>{for(var t in e||(e={}))mLe.call(e,t)&&kme(u,t,e[t]);if(AM)for(var t of AM(e))gLe.call(e,t)&&kme(u,t,e[t]);return u},Fme=(u,e)=>QNt(u,XNt(e)),ePt=(u,e)=>{var t={};for(var n in u)mLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&AM)for(var n of AM(u))e.indexOf(n)<0&&gLe.call(u,n)&&(t[n]=u[n]);return t};function fLe(u){var e=u,{styles:t,rightSection:n,rightSectionWidth:i,theme:r}=e,a=ePt(e,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:i,styles:t};const o=typeof t=="function"?t(r):t;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&M.createElement(ELe,KV({},a)),styles:Fme(KV({},o),{rightSection:Fme(KV({},o==null?void 0:o.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}var tPt=Object.defineProperty,uPt=Object.defineProperties,nPt=Object.getOwnPropertyDescriptors,yme=Object.getOwnPropertySymbols,iPt=Object.prototype.hasOwnProperty,rPt=Object.prototype.propertyIsEnumerable,Ame=(u,e,t)=>e in u?tPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,aPt=(u,e)=>{for(var t in e||(e={}))iPt.call(e,t)&&Ame(u,t,e[t]);if(yme)for(var t of yme(e))rPt.call(e,t)&&Ame(u,t,e[t]);return u},oPt=(u,e)=>uPt(u,nPt(e)),sPt=at((u,{invalid:e},{size:t})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,"&::placeholder":{color:u.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3],color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7]}}},values:{minHeight:`calc(${ye({size:t,sizes:kr})} - ${G(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${u.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:ye({size:t,sizes:kr})}},value:{margin:`calc(${u.spacing.xs} / 2 - ${G(2)}) calc(${u.spacing.xs} / 2)`},searchInput:oPt(aPt({},u.fn.fontStyles()),{flex:1,minWidth:G(60),backgroundColor:"transparent",border:0,outline:0,fontSize:ye({size:t,sizes:u.fontSizes}),padding:0,marginLeft:`calc(${u.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:ye({size:t,sizes:oLe}),"&::placeholder":{opacity:1,color:e?u.colors.red[u.fn.primaryShade()]:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const lPt=sPt;var cPt=Object.defineProperty,dPt=Object.defineProperties,hPt=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,pLe=Object.prototype.hasOwnProperty,DLe=Object.prototype.propertyIsEnumerable,_me=(u,e,t)=>e in u?cPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ND=(u,e)=>{for(var t in e||(e={}))pLe.call(e,t)&&_me(u,t,e[t]);if(_M)for(var t of _M(e))DLe.call(e,t)&&_me(u,t,e[t]);return u},Sme=(u,e)=>dPt(u,hPt(e)),EPt=(u,e)=>{var t={};for(var n in u)pLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&_M)for(var n of _M(u))e.indexOf(n)<0&&DLe.call(u,n)&&(t[n]=u[n]);return t};function mPt(u,e,t){return e?!1:t.label.toLowerCase().trim().includes(u.toLowerCase().trim())}function gPt(u,e){return!!u&&!e.some(t=>t.value.toLowerCase()===u.toLowerCase())}function Bme(u,e){if(!Array.isArray(u))return;if(e.length===0)return[];const t=e.map(n=>typeof n=="object"?n.value:n);return u.filter(n=>t.includes(n))}const fPt={size:"sm",valueComponent:cLe,itemComponent:Xue,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:mPt,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:gPt,switchDirectionOnFlip:!1,zIndex:fd("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},zZ=C.forwardRef((u,e)=>{const t=Qe("MultiSelect",fPt,u),{className:n,style:i,required:r,label:a,description:o,size:s,error:l,classNames:c,styles:d,wrapperProps:h,value:E,defaultValue:m,data:g,onChange:f,valueComponent:p,itemComponent:D,id:x,transitionProps:b,maxDropdownHeight:k,shadow:A,nothingFound:F,onFocus:S,onBlur:w,searchable:z,placeholder:N,filter:O,limit:y,clearSearchOnChange:_,clearable:L,clearSearchOnBlur:T,variant:R,onSearchChange:I,searchValue:H,disabled:V,initiallyOpened:U,radius:J,icon:Y,rightSection:X,rightSectionWidth:re,creatable:ge,getCreateLabel:_e,shouldCreate:Ve,onCreate:Ue,sx:qe,dropdownComponent:Se,onDropdownClose:de,onDropdownOpen:he,maxSelectedValues:Be,withinPortal:je,portalProps:bt,switchDirectionOnFlip:qt,zIndex:ou,selectOnBlur:Vt,name:oe,dropdownPosition:se,errorProps:ie,labelProps:$,descriptionProps:Z,form:ue,positionDependencies:te,onKeyDown:fe,unstyled:Le,inputContainer:Je,inputWrapperOrder:it,readOnly:ct,withAsterisk:xt,clearButtonProps:Jt,hoverOnSearchChange:Ze,disableSelectedItemFiltering:Ie}=t,Tu=EPt(t,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:gu,cx:fn,theme:Wt}=lPt({invalid:!!l},{name:"MultiSelect",classNames:c,styles:d,unstyled:Le,size:s,variant:R}),{systemStyles:Ln,rest:Vu}=w4(Tu),un=C.useRef(),zn=C.useRef({}),bn=Jl(x),[$u,wu]=C.useState(U),[Ou,ki]=C.useState(-1),[$i,Vn]=C.useState("column"),[Ni,ka]=ps({value:H,defaultValue:"",finalValue:void 0,onChange:I}),[fo,eh]=C.useState(!1),{scrollIntoView:Va,targetRef:Hr,scrollableRef:Cd}=s_e({duration:0,offset:5,cancelable:!1,isList:!0}),Og=ge&&typeof _e=="function";let Mt=null;const $n=g.map(su=>typeof su=="string"?{label:su,value:su}:su),ia=S9e({data:$n}),[Xe,le]=ps({value:Bme(E,g),defaultValue:Bme(m,g),finalValue:[],onChange:f}),Ge=C.useRef(!!Be&&Be{if(!ct){const Fi=Xe.filter(el=>el!==su);le(Fi),Be&&Fi.length{ka(su.currentTarget.value),!V&&!Ge.current&&z&&wu(!0)},Vr=su=>{typeof S=="function"&&S(su),!V&&!Ge.current&&z&&wu(!0)},Wn=ONt({data:ia,searchable:z,searchValue:Ni,limit:y,filter:O,value:Xe,disableSelectedItemFiltering:Ie});Og&&Ve(Ni,ia)&&(Mt=_e(Ni),Wn.push({label:Ni,value:Ni,creatable:!0}));const Mn=Math.min(Ou,Wn.length-1),o0=(su,Fi,el)=>{let R4=su;for(;el(R4);)if(R4=Fi(R4),!Wn[R4].disabled)return R4;return su};To(()=>{ki(Ze&&Ni?0:-1)},[Ni,Ze]),To(()=>{!V&&Xe.length>g.length&&wu(!1),Be&&Xe.length=Be&&(Ge.current=!0,wu(!1))},[Xe]);const P4=su=>{if(!ct)if(_&&ka(""),Xe.includes(su.value))Et(su.value);else{if(su.creatable&&typeof Ue=="function"){const Fi=Ue(su.value);typeof Fi<"u"&&Fi!==null&&le(typeof Fi=="string"?[...Xe,Fi]:[...Xe,Fi.value])}else le([...Xe,su.value]);Xe.length===Be-1&&(Ge.current=!0,wu(!1)),Wn.length===1&&wu(!1)}},P7=su=>{typeof w=="function"&&w(su),Vt&&Wn[Mn]&&$u&&P4(Wn[Mn]),T&&ka(""),wu(!1)},zre=su=>{if(fo||(fe==null||fe(su),ct)||su.key!=="Backspace"&&Be&&Ge.current)return;const Fi=$i==="column",el=()=>{ki(jg=>{var th;const eC=o0(jg,Hg=>Hg+1,Hg=>Hg{ki(jg=>{var th;const eC=o0(jg,Hg=>Hg-1,Hg=>Hg>0);return $u&&(Hr.current=zn.current[(th=Wn[eC])==null?void 0:th.value],Va({alignment:Fi?"start":"end"})),eC})};switch(su.key){case"ArrowUp":{su.preventDefault(),wu(!0),Fi?R4():el();break}case"ArrowDown":{su.preventDefault(),wu(!0),Fi?el():R4();break}case"Enter":{su.preventDefault(),Wn[Mn]&&$u?P4(Wn[Mn]):wu(!0);break}case" ":{z||(su.preventDefault(),Wn[Mn]&&$u?P4(Wn[Mn]):wu(!0));break}case"Backspace":{Xe.length>0&&Ni.length===0&&(le(Xe.slice(0,-1)),wu(!0),Be&&(Ge.current=!1));break}case"Home":{if(!z){su.preventDefault(),$u||wu(!0);const jg=Wn.findIndex(th=>!th.disabled);ki(jg),Va({alignment:Fi?"end":"start"})}break}case"End":{if(!z){su.preventDefault(),$u||wu(!0);const jg=Wn.map(th=>!!th.disabled).lastIndexOf(!1);ki(jg),Va({alignment:Fi?"end":"start"})}break}case"Escape":wu(!1)}},NKe=Xe.map(su=>{let Fi=ia.find(el=>el.value===su&&!el.disabled);return!Fi&&Og&&(Fi={value:su,label:su}),Fi}).filter(su=>!!su).map((su,Fi)=>M.createElement(p,Sme(ND({},su),{variant:R,disabled:V,className:gu.value,readOnly:ct,onRemove:el=>{el.preventDefault(),el.stopPropagation(),Et(su.value)},key:su.value,size:s,styles:d,classNames:c,radius:J,index:Fi}))),PKe=su=>Xe.includes(su),RKe=()=>{var su;ka(""),le([]),(su=un.current)==null||su.focus(),Be&&(Ge.current=!1)},R7=!ct&&(Wn.length>0?$u:$u&&!!F);return To(()=>{const su=R7?he:de;typeof su=="function"&&su()},[R7]),M.createElement(Ra.Wrapper,ND(ND({required:r,id:bn,label:a,error:l,description:o,size:s,className:n,style:i,classNames:c,styles:d,__staticSelector:"MultiSelect",sx:qe,errorProps:ie,descriptionProps:Z,labelProps:$,inputContainer:Je,inputWrapperOrder:it,unstyled:Le,withAsterisk:xt,variant:R},Ln),h),M.createElement(Fm,{opened:R7,transitionProps:b,shadow:"sm",withinPortal:je,portalProps:bt,__staticSelector:"MultiSelect",onDirectionChange:Vn,switchDirectionOnFlip:qt,zIndex:ou,dropdownPosition:se,positionDependencies:[...te,Ni],classNames:c,styles:d,unstyled:Le,variant:R},M.createElement(Fm.Target,null,M.createElement("div",{className:gu.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":$u&&R7?`${bn}-items`:null,"aria-controls":bn,"aria-expanded":$u,onMouseLeave:()=>ki(-1),tabIndex:-1},M.createElement("input",{type:"hidden",name:oe,value:Xe.join(","),form:ue,disabled:V}),M.createElement(Ra,ND({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:R,disabled:V,error:l,required:r,radius:J,icon:Y,unstyled:Le,onMouseDown:su=>{var Fi;su.preventDefault(),!V&&!Ge.current&&wu(!$u),(Fi=un.current)==null||Fi.focus()},classNames:Sme(ND({},c),{input:fn({[gu.input]:!z},c==null?void 0:c.input)})},fLe({theme:Wt,rightSection:X,rightSectionWidth:re,styles:d,size:s,shouldClear:L&&Xe.length>0,onClear:RKe,error:l,disabled:V,clearButtonProps:Jt,readOnly:ct})),M.createElement("div",{className:gu.values,"data-clearable":L||void 0},NKe,M.createElement("input",ND({ref:q1(e,un),type:"search",id:bn,className:fn(gu.searchInput,{[gu.searchInputPointer]:!z,[gu.searchInputInputHidden]:!$u&&Xe.length>0||!z&&Xe.length>0,[gu.searchInputEmpty]:Xe.length===0}),onKeyDown:zre,value:Ni,onChange:Kn,onFocus:Vr,onBlur:P7,readOnly:!z||Ge.current||ct,placeholder:Xe.length===0?N:void 0,disabled:V,"data-mantine-stop-propagation":$u,autoComplete:"off",onCompositionStart:()=>eh(!0),onCompositionEnd:()=>eh(!1)},Vu)))))),M.createElement(Fm.Dropdown,{component:Se||zI,maxHeight:k,direction:$i,id:bn,innerRef:Cd,__staticSelector:"MultiSelect",classNames:c,styles:d},M.createElement(Que,{data:Wn,hovered:Mn,classNames:c,styles:d,uuid:bn,__staticSelector:"MultiSelect",onItemHover:ki,onItemSelect:P4,itemsRefs:zn,itemComponent:D,size:s,nothingFound:F,isItemSelected:PKe,creatable:ge&&!!Mt,createLabel:Mt,unstyled:Le,variant:R}))))});zZ.displayName="@mantine/core/MultiSelect";var pPt=at((u,{color:e,radius:t,withTitle:n})=>{const i=u.fn.radius(t),r=u.fn.variant({variant:"filled",color:e});return{closeButton:u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:u.spacing.md,width:G(28),height:G(28),borderRadius:G(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:r.background,color:u.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:G(22),paddingRight:u.spacing.xs,paddingTop:u.spacing.xs,paddingBottom:u.spacing.xs,borderRadius:i,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,boxShadow:u.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:G(6),top:i,bottom:i,left:G(4),borderRadius:i,backgroundColor:r.background},"&[data-with-icon]":{paddingLeft:u.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:u.spacing.xs},loader:{marginRight:u.spacing.md},title:{lineHeight:1.4,marginBottom:G(2),overflow:"hidden",textOverflow:"ellipsis",color:u.colorScheme==="dark"?u.white:u.colors.gray[9]},description:{color:n?u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]:u.colorScheme==="dark"?u.colors.dark[0]:u.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const DPt=pPt;var xPt=Object.defineProperty,vPt=Object.defineProperties,CPt=Object.getOwnPropertyDescriptors,SM=Object.getOwnPropertySymbols,xLe=Object.prototype.hasOwnProperty,vLe=Object.prototype.propertyIsEnumerable,wme=(u,e,t)=>e in u?xPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Lme=(u,e)=>{for(var t in e||(e={}))xLe.call(e,t)&&wme(u,t,e[t]);if(SM)for(var t of SM(e))vLe.call(e,t)&&wme(u,t,e[t]);return u},bPt=(u,e)=>vPt(u,CPt(e)),kPt=(u,e)=>{var t={};for(var n in u)xLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&SM)for(var n of SM(u))e.indexOf(n)<0&&vLe.call(u,n)&&(t[n]=u[n]);return t};const FPt={withCloseButton:!0},CLe=C.forwardRef((u,e)=>{const t=Qe("Notification",FPt,u),{className:n,color:i,radius:r,loading:a,withCloseButton:o,withBorder:s,title:l,icon:c,children:d,onClose:h,closeButtonProps:E,classNames:m,styles:g,unstyled:f,variant:p}=t,D=kPt(t,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:x,cx:b}=DPt({color:i,radius:r,withTitle:!!l},{name:"Notification",classNames:m,styles:g,unstyled:f,variant:p});return M.createElement(Ct,Lme({className:b(x.root,n),"data-with-icon":!!c||a||void 0,"data-with-border":s||void 0,role:"alert",ref:e},D),c&&!a&&M.createElement("div",{className:x.icon},c),a&&M.createElement(Vv,{size:28,color:i,className:x.loader}),M.createElement("div",{className:x.body},l&&M.createElement(_u,{className:x.title,size:"sm",weight:500},l),M.createElement(_u,{color:"dimmed",className:x.description,size:"sm"},d)),o&&M.createElement(SI,bPt(Lme({iconSize:16,color:"gray"},E),{onClick:h,className:x.closeButton})))});CLe.displayName="@mantine/core/Notification";const yPt=(u,e,t)=>Number.isInteger(u)&&u>=0&&e===0?"numeric":!Number.isInteger(u)&&u>=0&&e!==0?"decimal":Number.isInteger(u)&&u<0&&e===0||!Number.isInteger(u)&&u<0&&e!==0?t==="ios"?"text":"decimal":"numeric";function zme({direction:u,size:e}){return M.createElement("svg",{style:{width:G(e),height:G(e),transform:u==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const bLe={xs:G(20),sm:G(24),md:G(30),lg:G(34),xl:G(36)};var APt=at((u,{radius:e},{size:t})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${G(2)})`,margin:G(1),overflow:"hidden",borderTopRightRadius:u.fn.radius(e),borderBottomRightRadius:u.fn.radius(e)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:ye({size:t,sizes:bLe}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,borderLeft:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:G(1),color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&:not(:disabled):hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]},"&:disabled":{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const _Pt=APt;var SPt=Object.defineProperty,BPt=Object.defineProperties,wPt=Object.getOwnPropertyDescriptors,BM=Object.getOwnPropertySymbols,kLe=Object.prototype.hasOwnProperty,FLe=Object.prototype.propertyIsEnumerable,Mme=(u,e,t)=>e in u?SPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,WV=(u,e)=>{for(var t in e||(e={}))kLe.call(e,t)&&Mme(u,t,e[t]);if(BM)for(var t of BM(e))FLe.call(e,t)&&Mme(u,t,e[t]);return u},LPt=(u,e)=>BPt(u,wPt(e)),zPt=(u,e)=>{var t={};for(var n in u)kLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&BM)for(var n of BM(u))e.indexOf(n)<0&&FLe.call(u,n)&&(t[n]=u[n]);return t};const MPt={type:"text",size:"sm",__staticSelector:"TextInput"},wt=C.forwardRef((u,e)=>{const t=F8e("TextInput",MPt,u),{inputProps:n,wrapperProps:i}=t,r=zPt(t,["inputProps","wrapperProps"]);return M.createElement(Ra.Wrapper,WV({},i),M.createElement(Ra,LPt(WV(WV({},n),r),{ref:e})))});wt.displayName="@mantine/core/TextInput";var TPt=Object.defineProperty,NPt=Object.defineProperties,PPt=Object.getOwnPropertyDescriptors,wM=Object.getOwnPropertySymbols,yLe=Object.prototype.hasOwnProperty,ALe=Object.prototype.propertyIsEnumerable,Tme=(u,e,t)=>e in u?TPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,RPt=(u,e)=>{for(var t in e||(e={}))yLe.call(e,t)&&Tme(u,t,e[t]);if(wM)for(var t of wM(e))ALe.call(e,t)&&Tme(u,t,e[t]);return u},IPt=(u,e)=>NPt(u,PPt(e)),OPt=(u,e)=>{var t={};for(var n in u)yLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wM)for(var n of wM(u))e.indexOf(n)<0&&ALe.call(u,n)&&(t[n]=u[n]);return t};const jPt=u=>u||"",HPt=u=>{if(u==="-")return u;let e=u;e[0]==="."&&(e=`0${u}`);const t=parseFloat(e);return Number.isNaN(t)?"":u},Nme={xs:G(10),sm:G(14),md:G(16),lg:G(18),xl:G(20)},VPt={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:jPt,parser:HPt,type:"text"},zo=C.forwardRef((u,e)=>{const t=Qe("NumberInput",VPt,u),{readOnly:n,disabled:i,value:r,onChange:a,decimalSeparator:o,thousandsSeparator:s,min:l,max:c,startValue:d,step:h,stepHoldInterval:E,stepHoldDelay:m,onFocus:g,onBlur:f,onKeyDown:p,onKeyUp:D,hideControls:x,radius:b,variant:k,precision:A,removeTrailingZeros:F,defaultValue:S,noClampOnBlur:w,handlersRef:z,classNames:N,styles:O,size:y,rightSection:_,rightSectionWidth:L,formatter:T,parser:R,inputMode:I,unstyled:H,type:V}=t,U=OPt(t,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:J,cx:Y}=_Pt({radius:b},{classNames:N,styles:O,unstyled:H,name:"NumberInput",variant:k,size:y}),X=Ze=>{if(Ze==="")return"";let Ie=Ze.toFixed(A);return F&&A>0&&(Ie=Ie.replace(new RegExp(`[0]{0,${A}}$`),""),Ie.endsWith(".")&&(Ie=Ie.slice(0,-1))),Ie},re=Ze=>{let Ie=Ze;return o&&(Ie=Ie.replace(".",o)),T(Ie)},ge=Ze=>{let Ie=Ze;return o&&(Ie=Ie.replaceAll(s,"").replace(o,".")),R(Ie)},_e=Ze=>re(X(Ze)),[Ve,Ue]=C.useState(typeof r=="number"?r:typeof S=="number"?S:""),[qe,Se]=C.useState(()=>_e(Ve)),de=C.useRef(),[he,Be]=C.useState(!1),je=(Ze,Ie)=>{if(!he||Ie){const Tu=_e(Ze);Tu!==qe&&Se(Tu)}Ze!==Ve&&Ue(Ze)},bt=typeof l=="number"?l:-1/0,qt=typeof c=="number"?c:1/0,ou=C.useRef();ou.current=()=>{var Ze;let Ie;Ve===""?Ie=(Ze=d??l)!=null?Ze:0:Ie=parseFloat(X(bm(Ve+h,bt,qt))),je(Ie,!0),a==null||a(Ie)};const Vt=C.useRef();Vt.current=()=>{var Ze;let Ie;Ve===""?Ie=(Ze=d??l)!=null?Ze:0:Ie=parseFloat(X(bm(Ve-h,bt,qt))),je(Ie,!0),a==null||a(Ie)},Jue(z,{increment:ou.current,decrement:Vt.current}),C.useEffect(()=>{he||je(r===void 0?Ve:r,!0)},[r,he]);const oe=m!==void 0&&E!==void 0,se=C.useRef(null),ie=C.useRef(0),$=()=>{se.current&&window.clearTimeout(se.current),se.current=null,ie.current=0},Z=Ze=>{Ze?ou.current():Vt.current(),ie.current+=1},ue=Ze=>{if(Z(Ze),oe){const Ie=typeof E=="number"?E:E(ie.current);se.current=window.setTimeout(()=>ue(Ze),Ie)}},te=(Ze,Ie)=>{Ze.preventDefault(),de.current.focus(),Z(Ie),oe&&(se.current=window.setTimeout(()=>ue(Ie),m))};C.useEffect(()=>($(),$),[]);const fe=M.createElement("div",{className:J.rightSection},M.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Ve>=c,className:Y(J.control,J.controlUp),onPointerDown:Ze=>{te(Ze,!0)},onPointerUp:$,onPointerLeave:$},M.createElement(zme,{size:ye({size:y,sizes:Nme}),direction:"up"})),M.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:Ve<=l,className:Y(J.control,J.controlDown),onPointerDown:Ze=>{te(Ze,!1)},onPointerUp:$,onPointerLeave:$},M.createElement(zme,{size:ye({size:y,sizes:Nme}),direction:"down"}))),Le=Ze=>{let Ie=Ze;(Ie[0]===`${o}`||Ie[0]===".")&&(Ie=`0${Ie}`);const Tu=parseFloat(X(parseFloat(ge(Ie)))),gu=w?Tu:bm(Tu,bt,qt),fn=Number.isNaN(gu)?"":gu,Wt=Ve!==fn;Se(Ze),je(fn),Wt&&(a==null||a(fn))},Je=Ze=>{Ze.nativeEvent.isComposing||Le(Ze.target.value)},it=Ze=>{Be(!0),g==null||g(Ze)},ct=Ze=>{Be(!1),f==null||f(Ze)},xt=Ze=>{if(typeof p=="function"&&p(Ze),Ze.repeat&&oe&&(Ze.key==="ArrowUp"||Ze.key==="ArrowDown")){Ze.preventDefault();return}n||(Ze.key==="ArrowUp"?te(Ze,!0):Ze.key==="ArrowDown"&&te(Ze,!1))},Jt=Ze=>{typeof D=="function"&&D(Ze),(Ze.key==="ArrowUp"||Ze.key==="ArrowDown")&&$()};return M.createElement(wt,IPt(RPt({},U),{type:V,variant:k,value:qe,disabled:i,readOnly:n,ref:q1(de,e),onChange:Je,onFocus:it,onBlur:ct,onKeyDown:xt,onKeyUp:Jt,rightSection:_||(i||n||x||k==="unstyled"?null:fe),rightSectionWidth:L??`calc(${ye({size:y,sizes:bLe})} + ${G(1)})`,radius:b,max:c,min:l,step:h,size:y,styles:O,classNames:N,inputMode:I||yPt(h,A,oFt()),__staticSelector:"NumberInput",unstyled:H}))});zo.displayName="@mantine/core/NumberInput";const[$Pt,II]=U1("Pagination.Root component was not found in tree"),KPt={siblings:1,boundaries:1};function _Le(u){const{total:e,value:t,defaultValue:n,onChange:i,disabled:r,children:a,siblings:o,boundaries:s,color:l,radius:c,onNextPage:d,onPreviousPage:h,onFirstPage:E,onLastPage:m,getItemProps:g,classNames:f,styles:p,unstyled:D,variant:x,size:b}=Qe("PaginationRoot",KPt,u),{range:k,setPage:A,next:F,previous:S,active:w,first:z,last:N}=Qkt({page:t,initialPage:n,onChange:i,total:e,siblings:o,boundaries:s}),O=no(d,F),y=no(h,S),_=no(E,z),L=no(m,N);return M.createElement($Pt,{value:{total:e,range:k,active:w,disabled:r,color:l,radius:c,getItemProps:g,onChange:A,onNext:O,onPrevious:y,onFirst:_,onLast:L,stylesApi:{name:"Pagination",classNames:f,styles:p,unstyled:D,variant:x,size:b}}},a)}const ey={xs:G(22),sm:G(26),md:G(32),lg:G(38),xl:G(44)};var WPt=at((u,{color:e,radius:t,withPadding:n},{size:i})=>{const r=u.fn.variant({color:e,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,height:ye({size:i,sizes:ey}),minWidth:ye({size:i,sizes:ey}),padding:n?`0 calc(${ye({size:i,sizes:u.spacing})} / 2)`:void 0,fontSize:ye({size:i,sizes:u.fontSizes}),borderRadius:u.fn.radius(t),lineHeight:1,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,"&:not([data-disabled])":u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[0]}),"&:active:not([data-disabled])":u.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:r.color,backgroundColor:r.background,"&:not([data-disabled])":u.fn.hover({backgroundColor:r.hover})}}}});const GPt=WPt;var UPt=Object.defineProperty,qPt=Object.defineProperties,JPt=Object.getOwnPropertyDescriptors,LM=Object.getOwnPropertySymbols,SLe=Object.prototype.hasOwnProperty,BLe=Object.prototype.propertyIsEnumerable,Pme=(u,e,t)=>e in u?UPt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZPt=(u,e)=>{for(var t in e||(e={}))SLe.call(e,t)&&Pme(u,t,e[t]);if(LM)for(var t of LM(e))BLe.call(e,t)&&Pme(u,t,e[t]);return u},YPt=(u,e)=>qPt(u,JPt(e)),QPt=(u,e)=>{var t={};for(var n in u)SLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&LM)for(var n of LM(u))e.indexOf(n)<0&&BLe.call(u,n)&&(t[n]=u[n]);return t};const XPt={withPadding:!0},OI=C.forwardRef((u,e)=>{const t=Qe("PaginationControl",XPt,u),{active:n,className:i,disabled:r,withPadding:a}=t,o=QPt(t,["active","className","disabled","withPadding"]),s=II(),{classes:l,cx:c}=GPt({color:s.color,radius:s.radius,withPadding:a},s.stylesApi);return M.createElement(L4,YPt(ZPt({},o),{disabled:r,"data-active":n||void 0,"data-disabled":r||void 0,ref:e,className:c(l.control,i)}))});OI.displayName="@mantine/core/PaginationControl";var eRt=Object.defineProperty,tRt=Object.defineProperties,uRt=Object.getOwnPropertyDescriptors,zM=Object.getOwnPropertySymbols,wLe=Object.prototype.hasOwnProperty,LLe=Object.prototype.propertyIsEnumerable,Rme=(u,e,t)=>e in u?eRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,dp=(u,e)=>{for(var t in e||(e={}))wLe.call(e,t)&&Rme(u,t,e[t]);if(zM)for(var t of zM(e))LLe.call(e,t)&&Rme(u,t,e[t]);return u},r7=(u,e)=>tRt(u,uRt(e)),nRt=(u,e)=>{var t={};for(var n in u)wLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&zM)for(var n of zM(u))e.indexOf(n)<0&&LLe.call(u,n)&&(t[n]=u[n]);return t};function zLe(u){return`calc(${ye({size:u,sizes:ey})} / 2)`}function a7(u){var e=u,{size:t,style:n,children:i,path:r}=e,a=nRt(e,["size","style","children","path"]);return M.createElement("svg",dp({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:dp({width:t,height:t},n)},a),M.createElement("path",{d:r,fill:"currentColor"}))}const iRt=u=>M.createElement(a7,r7(dp({},u),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),rRt=u=>M.createElement(a7,r7(dp({},u),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),aRt=u=>M.createElement(a7,r7(dp({},u),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),oRt=u=>M.createElement(a7,r7(dp({},u),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),sRt=u=>M.createElement(a7,r7(dp({},u),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var lRt=at((u,e,{size:t})=>({dots:{height:ye({size:t,sizes:ey}),minWidth:ye({size:t,sizes:ey}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const cRt=lRt;var dRt=Object.defineProperty,MM=Object.getOwnPropertySymbols,MLe=Object.prototype.hasOwnProperty,TLe=Object.prototype.propertyIsEnumerable,Ime=(u,e,t)=>e in u?dRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,hRt=(u,e)=>{for(var t in e||(e={}))MLe.call(e,t)&&Ime(u,t,e[t]);if(MM)for(var t of MM(e))TLe.call(e,t)&&Ime(u,t,e[t]);return u},ERt=(u,e)=>{var t={};for(var n in u)MLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&MM)for(var n of MM(u))e.indexOf(n)<0&&TLe.call(u,n)&&(t[n]=u[n]);return t};const mRt={icon:sRt},Cne=C.forwardRef((u,e)=>{const t=Qe("PaginationDots",mRt,u),{className:n,icon:i}=t,r=ERt(t,["className","icon"]),a=II(),{classes:o,cx:s}=cRt(null,a.stylesApi);return M.createElement(Ct,hRt({ref:e,className:s(o.dots,n)},r),M.createElement(i,{size:zLe(a.stylesApi.size)}))});Cne.displayName="@mantine/core/PaginationDots";var gRt=Object.defineProperty,Ome=Object.getOwnPropertySymbols,fRt=Object.prototype.hasOwnProperty,pRt=Object.prototype.propertyIsEnumerable,jme=(u,e,t)=>e in u?gRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,DRt=(u,e)=>{for(var t in e||(e={}))fRt.call(e,t)&&jme(u,t,e[t]);if(Ome)for(var t of Ome(e))pRt.call(e,t)&&jme(u,t,e[t]);return u};function bne({dotsIcon:u}){const e=II(),t=e.range.map((n,i)=>{var r;return n==="dots"?M.createElement(Cne,{icon:u,key:i}):M.createElement(OI,DRt({key:i,active:n===e.active,"aria-current":n===e.active?"page":void 0,onClick:()=>e.onChange(n),disabled:e.disabled},(r=e.getItemProps)==null?void 0:r.call(e,n)),n)});return M.createElement(M.Fragment,null,t)}bne.displayName="@mantine/core/PaginationItems";var xRt=at(u=>({icon:{transform:u.dir==="rtl"?"rotate(180deg)":"unset"}}));const vRt=xRt;var CRt=Object.defineProperty,TM=Object.getOwnPropertySymbols,NLe=Object.prototype.hasOwnProperty,PLe=Object.prototype.propertyIsEnumerable,Hme=(u,e,t)=>e in u?CRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,bRt=(u,e)=>{for(var t in e||(e={}))NLe.call(e,t)&&Hme(u,t,e[t]);if(TM)for(var t of TM(e))PLe.call(e,t)&&Hme(u,t,e[t]);return u},kRt=(u,e)=>{var t={};for(var n in u)NLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&TM)for(var n of TM(u))e.indexOf(n)<0&&PLe.call(u,n)&&(t[n]=u[n]);return t};function jI({icon:u,name:e,action:t,type:n}){const i={icon:u},r=C.forwardRef((a,o)=>{const s=Qe(e,i,a),{icon:l}=s,c=kRt(s,["icon"]),{classes:d}=vRt(),h=II(),E=n==="next"?h.active===h.total:h.active===1;return M.createElement(OI,bRt({disabled:h.disabled||E,ref:o,onClick:h[t],withPadding:!1},c),M.createElement(l,{className:d.icon,size:zLe(h.stylesApi.size)}))});return r.displayName=`@mantine/core/${e}`,r}const RLe=jI({icon:iRt,name:"PaginationNext",action:"onNext",type:"next"}),ILe=jI({icon:rRt,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),OLe=jI({icon:aRt,name:"PaginationFirst",action:"onFirst",type:"previous"}),jLe=jI({icon:oRt,name:"PaginationLast",action:"onLast",type:"next"});var FRt=Object.defineProperty,NM=Object.getOwnPropertySymbols,HLe=Object.prototype.hasOwnProperty,VLe=Object.prototype.propertyIsEnumerable,Vme=(u,e,t)=>e in u?FRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,YC=(u,e)=>{for(var t in e||(e={}))HLe.call(e,t)&&Vme(u,t,e[t]);if(NM)for(var t of NM(e))VLe.call(e,t)&&Vme(u,t,e[t]);return u},yRt=(u,e)=>{var t={};for(var n in u)HLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&NM)for(var n of NM(u))e.indexOf(n)<0&&VLe.call(u,n)&&(t[n]=u[n]);return t};const ARt={withControls:!0,siblings:1,boundaries:1};function J1(u){const e=Qe("Pagination",ARt,u),{withEdges:t,withControls:n,classNames:i,styles:r,unstyled:a,variant:o,size:s,total:l,value:c,defaultValue:d,onChange:h,disabled:E,siblings:m,boundaries:g,color:f,radius:p,onNextPage:D,onPreviousPage:x,onFirstPage:b,onLastPage:k,getItemProps:A,getControlProps:F,spacing:S,nextIcon:w,previousIcon:z,lastIcon:N,firstIcon:O,dotsIcon:y}=e,_=yRt(e,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),L=jr();return l<=0?null:M.createElement(_Le,{classNames:i,styles:r,unstyled:a,variant:o,size:s,total:l,value:c,defaultValue:d,onChange:h,disabled:E,siblings:m,boundaries:g,color:f,radius:p,onNextPage:D,onPreviousPage:x,onFirstPage:b,onLastPage:k,getItemProps:A},M.createElement(zi,YC({spacing:S??`calc(${ye({size:s,sizes:L.spacing})} / 2)`},_),t&&M.createElement(OLe,YC({icon:O},F==null?void 0:F("first"))),n&&M.createElement(ILe,YC({icon:z},F==null?void 0:F("previous"))),M.createElement(bne,{dotsIcon:y}),n&&M.createElement(RLe,YC({icon:w},F==null?void 0:F("next"))),t&&M.createElement(jLe,YC({icon:N},F==null?void 0:F("last")))))}J1.displayName="@mantine/core/Pagination";J1.Root=_Le;J1.Items=bne;J1.Control=OI;J1.Dots=Cne;J1.Next=RLe;J1.Previous=ILe;J1.Last=jLe;J1.First=OLe;const _Rt=({reveal:u,size:e})=>M.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:e,height:e}},M.createElement("path",{d:u?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}));var SRt=Object.defineProperty,BRt=Object.defineProperties,wRt=Object.getOwnPropertyDescriptors,$me=Object.getOwnPropertySymbols,LRt=Object.prototype.hasOwnProperty,zRt=Object.prototype.propertyIsEnumerable,Kme=(u,e,t)=>e in u?SRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,GV=(u,e)=>{for(var t in e||(e={}))LRt.call(e,t)&&Kme(u,t,e[t]);if($me)for(var t of $me(e))zRt.call(e,t)&&Kme(u,t,e[t]);return u},Wme=(u,e)=>BRt(u,wRt(e)),MRt=at((u,{rightSectionWidth:e},{size:t})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:Wme(GV(GV({},u.fn.fontStyles()),u.fn.cover(0)),{backgroundColor:"transparent",border:`${G(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${G(e)})`,paddingLeft:`calc(${ye({size:t,sizes:kr})} / 3)`,fontSize:ye({size:t,sizes:u.fontSizes}),height:`calc(${ye({size:t,sizes:kr})} - ${G(2)})`,lineHeight:`calc(${ye({size:t,sizes:kr})} - ${G(4)})`,color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[1],color:u.colors.dark[2],opacity:.6,"&::placeholder":{color:u.colors.dark[2]}},"&::placeholder":Wme(GV({},u.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:u.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:u.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:ye({size:t,sizes:kr})}})}));const TRt=MRt;var NRt=Object.defineProperty,PRt=Object.defineProperties,RRt=Object.getOwnPropertyDescriptors,PM=Object.getOwnPropertySymbols,$Le=Object.prototype.hasOwnProperty,KLe=Object.prototype.propertyIsEnumerable,Gme=(u,e,t)=>e in u?NRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,U_=(u,e)=>{for(var t in e||(e={}))$Le.call(e,t)&&Gme(u,t,e[t]);if(PM)for(var t of PM(e))KLe.call(e,t)&&Gme(u,t,e[t]);return u},IRt=(u,e)=>PRt(u,RRt(e)),ORt=(u,e)=>{var t={};for(var n in u)$Le.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&PM)for(var n of PM(u))e.indexOf(n)<0&&KLe.call(u,n)&&(t[n]=u[n]);return t};const jRt={xs:G(22),sm:G(26),md:G(28),lg:G(32),xl:G(40)},HRt={xs:G(12),sm:G(15),md:G(17),lg:G(19),xl:G(21)},VRt={xs:G(28),sm:G(32),md:G(34),lg:G(44),xl:G(54)},$Rt={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:_Rt,__staticSelector:"PasswordInput"},MZ=C.forwardRef((u,e)=>{const t=Qe("PasswordInput",$Rt,u),{radius:n,disabled:i,size:r,toggleTabIndex:a,className:o,id:s,label:l,error:c,required:d,style:h,icon:E,description:m,wrapperProps:g,classNames:f,styles:p,variant:D,visibilityToggleIcon:x,__staticSelector:b,sx:k,labelProps:A,descriptionProps:F,errorProps:S,unstyled:w,visibilityToggleLabel:z,withAsterisk:N,inputContainer:O,iconWidth:y,inputWrapperOrder:_,visible:L,defaultVisible:T,onVisibilityChange:R}=t,I=ORt(t,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),H=ye({size:r,sizes:VRt}),{classes:V}=TRt({rightSectionWidth:H},{name:"PasswordInput",classNames:f,styles:p,unstyled:w,size:r,variant:D}),U=Jl(s),{systemStyles:J,rest:Y}=w4(I),[X,re]=ps({value:L,defaultValue:T,finalValue:!1,onChange:R}),ge=()=>re(!X),_e=M.createElement(Uu,{className:V.visibilityToggle,tabIndex:a,radius:n,size:ye({size:r,sizes:jRt}),"aria-hidden":!z,"aria-label":z,unstyled:w,onMouseDown:Ve=>{Ve.preventDefault(),ge()},onKeyDown:Ve=>{Ve.key===" "&&(Ve.preventDefault(),ge())}},M.createElement(x,{reveal:X,size:ye({size:r,sizes:HRt})}));return M.createElement(Ra.Wrapper,U_(U_({required:d,id:U,label:l,error:c,description:m,size:r,className:o,style:h,classNames:f,styles:p,__staticSelector:b,sx:k,errorProps:S,descriptionProps:F,labelProps:A,unstyled:w,withAsterisk:N,inputWrapperOrder:_,inputContainer:O,variant:D},J),g),M.createElement(Ra,{component:"div",error:c,icon:E,size:r,classNames:IRt(U_({},f),{input:V.input}),styles:p,radius:n,disabled:i,__staticSelector:b,rightSectionWidth:H,rightSection:!i&&_e,variant:D,unstyled:w,iconWidth:y},M.createElement("input",U_({type:X?"text":"password",required:d,"data-invalid":!!c||void 0,"data-with-icon":!!E||void 0,className:V.innerInput,disabled:i,id:U,ref:e},Y))))});MZ.displayName="@mantine/core/PasswordInput";const WLe=C.createContext(!1),KRt=WLe.Provider,WRt=()=>C.useContext(WLe);function GLe({children:u,openDelay:e=0,closeDelay:t=0}){return M.createElement(KRt,{value:!0},M.createElement(K_t,{delay:{open:e,close:t}},u))}GLe.displayName="@mantine/core/TooltipGroup";var GRt=Object.defineProperty,URt=Object.defineProperties,qRt=Object.getOwnPropertyDescriptors,Ume=Object.getOwnPropertySymbols,JRt=Object.prototype.hasOwnProperty,ZRt=Object.prototype.propertyIsEnumerable,qme=(u,e,t)=>e in u?GRt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Jme=(u,e)=>{for(var t in e||(e={}))JRt.call(e,t)&&qme(u,t,e[t]);if(Ume)for(var t of Ume(e))ZRt.call(e,t)&&qme(u,t,e[t]);return u},YRt=(u,e)=>URt(u,qRt(e));function QRt(u,e){if(!e)return{backgroundColor:u.colorScheme==="dark"?u.colors.gray[2]:u.colors.gray[9],color:u.colorScheme==="dark"?u.black:u.white};const t=u.fn.variant({variant:"filled",color:e,primaryFallback:!1});return{backgroundColor:t.background,color:t.color}}var XRt=at((u,{color:e,radius:t,width:n,multiline:i})=>({tooltip:YRt(Jme(Jme({},u.fn.fontStyles()),QRt(u,e)),{lineHeight:u.lineHeight,fontSize:u.fontSizes.sm,borderRadius:u.fn.radius(t),padding:`calc(${u.spacing.xs} / 2) ${u.spacing.xs}`,position:"absolute",whiteSpace:i?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const ULe=XRt,qLe={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function eIt({offset:u,position:e}){const[t,n]=C.useState(!1),i=C.useRef(),{x:r,y:a,reference:o,floating:s,refs:l,update:c,placement:d}=hne({placement:e,middleware:[MI({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=d.includes("right")?u:e.includes("left")?u*-1:0,E=d.includes("bottom")?u:e.includes("top")?u*-1:0,m=C.useCallback(({clientX:g,clientY:f})=>{o({getBoundingClientRect(){return{width:0,height:0,x:g,y:f,left:g+h,top:f+E,right:g,bottom:f}}})},[o]);return C.useEffect(()=>{if(l.floating.current){const g=i.current;g.addEventListener("mousemove",m);const f=km(l.floating.current);return f.forEach(p=>{p.addEventListener("scroll",c)}),()=>{g.removeEventListener("mousemove",m),f.forEach(p=>{p.removeEventListener("scroll",c)})}}},[o,l.floating.current,c,m,t]),{handleMouseMove:m,x:r,y:a,opened:t,setOpened:n,boundaryRef:i,floating:s}}var tIt=Object.defineProperty,uIt=Object.defineProperties,nIt=Object.getOwnPropertyDescriptors,RM=Object.getOwnPropertySymbols,JLe=Object.prototype.hasOwnProperty,ZLe=Object.prototype.propertyIsEnumerable,Zme=(u,e,t)=>e in u?tIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,q_=(u,e)=>{for(var t in e||(e={}))JLe.call(e,t)&&Zme(u,t,e[t]);if(RM)for(var t of RM(e))ZLe.call(e,t)&&Zme(u,t,e[t]);return u},J_=(u,e)=>uIt(u,nIt(e)),iIt=(u,e)=>{var t={};for(var n in u)JLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&RM)for(var n of RM(u))e.indexOf(n)<0&&ZLe.call(u,n)&&(t[n]=u[n]);return t};const rIt={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:fd("popover")};function YLe(u){var e;const t=Qe("TooltipFloating",rIt,u),{children:n,refProp:i,withinPortal:r,portalProps:a,style:o,className:s,classNames:l,styles:c,unstyled:d,radius:h,color:E,label:m,offset:g,position:f,multiline:p,width:D,zIndex:x,disabled:b,variant:k}=t,A=iIt(t,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:F,x:S,y:w,opened:z,boundaryRef:N,floating:O,setOpened:y}=eIt({offset:g,position:f}),{classes:_,cx:L}=ULe({radius:h,color:E,multiline:p,width:D},{name:"TooltipFloating",classNames:l,styles:c,unstyled:d,variant:k});if(!z6(n))throw new Error(qLe.children);const T=q1(N,n.ref),R=H=>{var V,U;(U=(V=n.props).onMouseEnter)==null||U.call(V,H),F(H),y(!0)},I=H=>{var V,U;(U=(V=n.props).onMouseLeave)==null||U.call(V,H),y(!1)};return M.createElement(M.Fragment,null,M.createElement(XA,J_(q_({},a),{withinPortal:r}),M.createElement(Ct,J_(q_({},A),{ref:O,className:L(_.tooltip,s),style:J_(q_({},o),{zIndex:x,display:!b&&z?"block":"none",top:w??"",left:(e=Math.round(S))!=null?e:""})}),m)),C.cloneElement(n,J_(q_({},n.props),{[i]:T,onMouseEnter:R,onMouseLeave:I})))}YLe.displayName="@mantine/core/TooltipFloating";function aIt(u){const[e,t]=C.useState(!1),i=typeof u.opened=="boolean"?u.opened:e,r=WRt(),a=Jl(),{delay:o,currentId:s,setCurrentId:l}=a8e(),c=C.useCallback(S=>{t(S),S&&l(a)},[l,a]),{x:d,y:h,reference:E,floating:m,context:g,refs:f,update:p,placement:D,middlewareData:{arrow:{x,y:b}={}}}=hne({placement:u.position,open:i,onOpenChange:c,middleware:[ane(u.offset),MI({padding:8}),rne(),t8e({element:u.arrowRef,padding:u.arrowOffset}),...u.inline?[$Se()]:[]]}),{getReferenceProps:k,getFloatingProps:A}=uSt([$_t(g,{enabled:u.events.hover,delay:r?o:{open:u.openDelay,close:u.closeDelay},mouseOnly:!u.events.touch}),eSt(g,{enabled:u.events.focus,keyboardOnly:!0}),tSt(g,{role:"tooltip"}),X_t(g,{enabled:typeof u.opened===void 0}),W_t(g,{id:a})]);return s8e({opened:i,position:u.position,positionDependencies:u.positionDependencies,floating:{refs:f,update:p}}),To(()=>{var S;(S=u.onPositionChange)==null||S.call(u,D)},[D]),{x:d,y:h,arrowX:x,arrowY:b,reference:E,floating:m,getFloatingProps:A,getReferenceProps:k,isGroupPhase:i&&s&&s!==a,opened:i,placement:D}}var oIt=Object.defineProperty,sIt=Object.defineProperties,lIt=Object.getOwnPropertyDescriptors,IM=Object.getOwnPropertySymbols,QLe=Object.prototype.hasOwnProperty,XLe=Object.prototype.propertyIsEnumerable,Yme=(u,e,t)=>e in u?oIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Yg=(u,e)=>{for(var t in e||(e={}))QLe.call(e,t)&&Yme(u,t,e[t]);if(IM)for(var t of IM(e))XLe.call(e,t)&&Yme(u,t,e[t]);return u},UV=(u,e)=>sIt(u,lIt(e)),cIt=(u,e)=>{var t={};for(var n in u)QLe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&IM)for(var n of IM(u))e.indexOf(n)<0&&XLe.call(u,n)&&(t[n]=u[n]);return t};const dIt={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:fd("popover"),positionDependencies:[]},HI=C.forwardRef((u,e)=>{var t;const n=C.useRef(null),i=Qe("Tooltip",dIt,u),{children:r,position:a,refProp:o,label:s,openDelay:l,closeDelay:c,onPositionChange:d,opened:h,withinPortal:E,portalProps:m,radius:g,color:f,classNames:p,styles:D,unstyled:x,style:b,className:k,withArrow:A,arrowSize:F,arrowOffset:S,arrowRadius:w,arrowPosition:z,offset:N,transitionProps:O,multiline:y,width:_,events:L,zIndex:T,disabled:R,positionDependencies:I,onClick:H,onMouseEnter:V,onMouseLeave:U,inline:J,variant:Y,keepMounted:X}=i,re=cIt(i,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ge,cx:_e,theme:Ve}=ULe({radius:g,color:f,width:_,multiline:y},{name:"Tooltip",classNames:p,styles:D,unstyled:x,variant:Y}),Ue=aIt({position:x8e(Ve.dir,a),closeDelay:c,openDelay:l,onPositionChange:d,opened:h,events:L,arrowRef:n,arrowOffset:S,offset:N+(A?F/2:0),positionDependencies:[...I,r],inline:J});if(!z6(r))throw new Error(qLe.children);const qe=q1(Ue.reference,r.ref,e);return M.createElement(M.Fragment,null,M.createElement(XA,UV(Yg({},m),{withinPortal:E}),M.createElement(Jp,UV(Yg({keepMounted:X,mounted:!R&&Ue.opened},O),{transition:O.transition||"fade",duration:Ue.isGroupPhase?10:(t=O.duration)!=null?t:100}),Se=>{var de,he;return M.createElement(Ct,Yg(Yg({},re),Ue.getFloatingProps({ref:Ue.floating,className:ge.tooltip,style:UV(Yg(Yg({},b),Se),{zIndex:T,top:(de=Ue.y)!=null?de:0,left:(he=Ue.x)!=null?he:0})})),s,M.createElement(mne,{ref:n,arrowX:Ue.arrowX,arrowY:Ue.arrowY,visible:A,position:Ue.placement,arrowSize:F,arrowOffset:S,arrowRadius:w,arrowPosition:z,className:ge.arrow}))})),C.cloneElement(r,Ue.getReferenceProps(Yg({onClick:H,onMouseEnter:V,onMouseLeave:U,onMouseMove:u.onMouseMove,onPointerDown:u.onPointerDown,onPointerEnter:u.onPointerEnter,[o]:qe,className:_e(k,r.props.className)},r.props))))});HI.Group=GLe;HI.Floating=YLe;HI.displayName="@mantine/core/Tooltip";const K5=HI;var hIt=Object.defineProperty,OM=Object.getOwnPropertySymbols,eze=Object.prototype.hasOwnProperty,tze=Object.prototype.propertyIsEnumerable,Qme=(u,e,t)=>e in u?hIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Xme=(u,e)=>{for(var t in e||(e={}))eze.call(e,t)&&Qme(u,t,e[t]);if(OM)for(var t of OM(e))tze.call(e,t)&&Qme(u,t,e[t]);return u},EIt=(u,e)=>{var t={};for(var n in u)eze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&OM)for(var n of OM(u))e.indexOf(n)<0&&tze.call(u,n)&&(t[n]=u[n]);return t};function mIt(u){const e=u,{width:t,height:n,style:i}=e,r=EIt(e,["width","height","style"]);return M.createElement("svg",Xme({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:Xme({width:t,height:n},i)},r),M.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const uze=C.createContext(null),gIt=uze.Provider,fIt=()=>C.useContext(uze);var pIt=Object.defineProperty,jM=Object.getOwnPropertySymbols,nze=Object.prototype.hasOwnProperty,ize=Object.prototype.propertyIsEnumerable,ege=(u,e,t)=>e in u?pIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tge=(u,e)=>{for(var t in e||(e={}))nze.call(e,t)&&ege(u,t,e[t]);if(jM)for(var t of jM(e))ize.call(e,t)&&ege(u,t,e[t]);return u},DIt=(u,e)=>{var t={};for(var n in u)nze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&jM)for(var n of jM(u))e.indexOf(n)<0&&ize.call(u,n)&&(t[n]=u[n]);return t};const xIt={size:"sm"},rze=C.forwardRef((u,e)=>{const t=Qe("RadioGroup",xIt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s,unstyled:l,name:c}=t,d=DIt(t,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),h=Jl(c),[E,m]=ps({value:i,defaultValue:r,finalValue:"",onChange:a}),g=f=>m(f.currentTarget.value);return M.createElement(gIt,{value:{value:E,onChange:g,size:o,name:h}},M.createElement(Ra.Wrapper,tge(tge({labelElement:"div",size:o,__staticSelector:"RadioGroup",ref:e,unstyled:l},s),d),n))});rze.displayName="@mantine/core/RadioGroup";var vIt=Object.defineProperty,CIt=Object.defineProperties,bIt=Object.getOwnPropertyDescriptors,uge=Object.getOwnPropertySymbols,kIt=Object.prototype.hasOwnProperty,FIt=Object.prototype.propertyIsEnumerable,nge=(u,e,t)=>e in u?vIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yIt=(u,e)=>{for(var t in e||(e={}))kIt.call(e,t)&&nge(u,t,e[t]);if(uge)for(var t of uge(e))FIt.call(e,t)&&nge(u,t,e[t]);return u},AIt=(u,e)=>CIt(u,bIt(e));const qV={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)},Z_={xs:G(6),sm:G(8),md:G(10),lg:G(14),xl:G(16)};var _It=at((u,{color:e,transitionDuration:t,labelPosition:n,error:i},{size:r})=>{const a=u.fn.variant({variant:"filled",color:e}),o=u.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:n==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:v1("icon"),color:u.white,opacity:0,transform:`scale(0.75) translateY(${G(2)})`,transition:`opacity ${t}ms ${u.transitionTimingFunction}`,pointerEvents:"none",width:ye({sizes:Z_,size:r}),height:ye({sizes:Z_,size:r}),position:"absolute",top:`calc(50% - ${ye({sizes:Z_,size:r})} / 2)`,left:`calc(50% - ${ye({sizes:Z_,size:r})} / 2)`},radio:AIt(yIt({},u.fn.focusStyles()),{backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,border:`${G(1)} solid ${i?o:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[4]}`,position:"relative",appearance:"none",width:ye({sizes:qV,size:r}),height:ye({sizes:qV,size:r}),borderRadius:ye({sizes:qV,size:r}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:`${t}ms`,cursor:u.cursorType,"&:checked":{background:a.background,borderColor:a.background,[`& + .${v1("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[4],backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],[`& + .${v1("icon")}`]:{color:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[4]}}})}});const SIt=_It;var BIt=Object.defineProperty,HM=Object.getOwnPropertySymbols,aze=Object.prototype.hasOwnProperty,oze=Object.prototype.propertyIsEnumerable,ige=(u,e,t)=>e in u?BIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Y_=(u,e)=>{for(var t in e||(e={}))aze.call(e,t)&&ige(u,t,e[t]);if(HM)for(var t of HM(e))oze.call(e,t)&&ige(u,t,e[t]);return u},wIt=(u,e)=>{var t={};for(var n in u)aze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&HM)for(var n of HM(u))e.indexOf(n)<0&&oze.call(u,n)&&(t[n]=u[n]);return t};const LIt={icon:mIt,transitionDuration:100,size:"sm",labelPosition:"right"},zf=C.forwardRef((u,e)=>{var t,n;const i=Qe("Radio",LIt,u),{className:r,style:a,id:o,label:s,size:l,title:c,disabled:d,color:h,classNames:E,styles:m,sx:g,icon:f,transitionDuration:p,wrapperProps:D,unstyled:x,labelPosition:b,description:k,error:A,variant:F}=i,S=wIt(i,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),w=fIt(),z=(t=w==null?void 0:w.size)!=null?t:l,N=u.size?l:z,{classes:O}=SIt({color:h,transitionDuration:p,labelPosition:b,error:!!A},{name:"Radio",classNames:E,styles:m,unstyled:x,variant:F,size:N}),{systemStyles:y,rest:_}=w4(S),L=Jl(o),T=w?{checked:w.value===_.value,name:(n=_.name)!=null?n:w.name,onChange:w.onChange}:{};return M.createElement(PI,Y_(Y_({className:r,sx:g,style:a,id:L,size:N,labelPosition:b,label:s,description:k,error:A,disabled:d,__staticSelector:"Radio",classNames:E,styles:m,unstyled:x,"data-checked":T.checked||void 0,variant:F},y),D),M.createElement("div",{className:O.inner},M.createElement("input",Y_(Y_({ref:e,className:O.radio,type:"radio",id:L,disabled:d},_),T)),M.createElement(f,{className:O.icon,"aria-hidden":!0})))});zf.displayName="@mantine/core/Radio";zf.Group=rze;function zIt({data:u,searchable:e,limit:t,searchValue:n,filter:i,value:r,filterDataOnExactSearchMatch:a}){if(!e)return u;const o=r!=null&&u.find(l=>l.value===r)||null;if(o&&!a&&(o==null?void 0:o.label)===n){if(t){if(t>=u.length)return u;const l=u.indexOf(o),c=l+t,d=c-u.length;return d>0?u.slice(l-d):u.slice(l,c)}return u}const s=[];for(let l=0;l=t));l+=1);return s}var MIt=at(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const TIt=MIt;var NIt=Object.defineProperty,PIt=Object.defineProperties,RIt=Object.getOwnPropertyDescriptors,VM=Object.getOwnPropertySymbols,sze=Object.prototype.hasOwnProperty,lze=Object.prototype.propertyIsEnumerable,rge=(u,e,t)=>e in u?NIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QC=(u,e)=>{for(var t in e||(e={}))sze.call(e,t)&&rge(u,t,e[t]);if(VM)for(var t of VM(e))lze.call(e,t)&&rge(u,t,e[t]);return u},JV=(u,e)=>PIt(u,RIt(e)),IIt=(u,e)=>{var t={};for(var n in u)sze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&VM)for(var n of VM(u))e.indexOf(n)<0&&lze.call(u,n)&&(t[n]=u[n]);return t};function OIt(u,e){return e.label.toLowerCase().trim().includes(u.toLowerCase().trim())}function jIt(u,e){return!!u&&!e.some(t=>t.label.toLowerCase()===u.toLowerCase())}const HIt={required:!1,size:"sm",shadow:"sm",itemComponent:Xue,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:OIt,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:jIt,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:fd("popover"),positionDependencies:[],dropdownPosition:"flip"},li=C.forwardRef((u,e)=>{const t=F8e("Select",HIt,u),{inputProps:n,wrapperProps:i,shadow:r,data:a,value:o,defaultValue:s,onChange:l,itemComponent:c,onKeyDown:d,onBlur:h,onFocus:E,transitionProps:m,initiallyOpened:g,unstyled:f,classNames:p,styles:D,filter:x,maxDropdownHeight:b,searchable:k,clearable:A,nothingFound:F,limit:S,disabled:w,onSearchChange:z,searchValue:N,rightSection:O,rightSectionWidth:y,creatable:_,getCreateLabel:L,shouldCreate:T,selectOnBlur:R,onCreate:I,dropdownComponent:H,onDropdownClose:V,onDropdownOpen:U,withinPortal:J,portalProps:Y,switchDirectionOnFlip:X,zIndex:re,name:ge,dropdownPosition:_e,allowDeselect:Ve,placeholder:Ue,filterDataOnExactSearchMatch:qe,form:Se,positionDependencies:de,readOnly:he,clearButtonProps:Be,hoverOnSearchChange:je}=t,bt=IIt(t,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:qt,cx:ou,theme:Vt}=TIt(),[oe,se]=C.useState(g),[ie,$]=C.useState(-1),Z=C.useRef(),ue=C.useRef({}),[te,fe]=C.useState("column"),Le=te==="column",{scrollIntoView:Je,targetRef:it,scrollableRef:ct}=s_e({duration:0,offset:5,cancelable:!1,isList:!0}),xt=Ve===void 0?A:Ve,Jt=Mt=>{if(oe!==Mt){se(Mt);const $n=Mt?U:V;typeof $n=="function"&&$n()}},Ze=_&&typeof L=="function";let Ie=null;const Tu=a.map(Mt=>typeof Mt=="string"?{label:Mt,value:Mt}:Mt),gu=S9e({data:Tu}),[fn,Wt,Ln]=ps({value:o,defaultValue:s,finalValue:null,onChange:l}),Vu=gu.find(Mt=>Mt.value===fn),[un,zn]=ps({value:N,defaultValue:(Vu==null?void 0:Vu.label)||"",finalValue:void 0,onChange:z}),bn=Mt=>{zn(Mt),k&&typeof z=="function"&&z(Mt)},$u=()=>{var Mt;he||(Wt(null),Ln||bn(""),(Mt=Z.current)==null||Mt.focus())};C.useEffect(()=>{const Mt=gu.find($n=>$n.value===fn);Mt?bn(Mt.label):(!Ze||!fn)&&bn("")},[fn]),C.useEffect(()=>{Vu&&(!k||!oe)&&bn(Vu.label)},[Vu==null?void 0:Vu.label]);const wu=Mt=>{if(!he)if(xt&&(Vu==null?void 0:Vu.value)===Mt.value)Wt(null),Jt(!1);else{if(Mt.creatable&&typeof I=="function"){const $n=I(Mt.value);typeof $n<"u"&&$n!==null&&Wt(typeof $n=="string"?$n:$n.value)}else Wt(Mt.value);Ln||bn(Mt.label),$(-1),Jt(!1),Z.current.focus()}},Ou=zIt({data:gu,searchable:k,limit:S,searchValue:un,filter:x,filterDataOnExactSearchMatch:qe,value:fn});Ze&&T(un,Ou)&&(Ie=L(un),Ou.push({label:un,value:un,creatable:!0}));const ki=(Mt,$n,ia)=>{let Xe=Mt;for(;ia(Xe);)if(Xe=$n(Xe),!Ou[Xe].disabled)return Xe;return Mt};To(()=>{$(je&&un?0:-1)},[un,je]);const $i=fn?Ou.findIndex(Mt=>Mt.value===fn):0,Vn=!he&&(Ou.length>0?oe:oe&&!!F),Ni=()=>{$(Mt=>{var $n;const ia=ki(Mt,Xe=>Xe-1,Xe=>Xe>0);return it.current=ue.current[($n=Ou[ia])==null?void 0:$n.value],Vn&&Je({alignment:Le?"start":"end"}),ia})},ka=()=>{$(Mt=>{var $n;const ia=ki(Mt,Xe=>Xe+1,Xe=>Xewindow.setTimeout(()=>{var Mt;it.current=ue.current[(Mt=Ou[$i])==null?void 0:Mt.value],Je({alignment:Le?"end":"start"})},50);To(()=>{Vn&&fo()},[Vn]);const eh=Mt=>{switch(typeof d=="function"&&d(Mt),Mt.key){case"ArrowUp":{Mt.preventDefault(),oe?Le?Ni():ka():($($i),Jt(!0),fo());break}case"ArrowDown":{Mt.preventDefault(),oe?Le?ka():Ni():($($i),Jt(!0),fo());break}case"Home":{if(!k){Mt.preventDefault(),oe||Jt(!0);const $n=Ou.findIndex(ia=>!ia.disabled);$($n),Vn&&Je({alignment:Le?"end":"start"})}break}case"End":{if(!k){Mt.preventDefault(),oe||Jt(!0);const $n=Ou.map(ia=>!!ia.disabled).lastIndexOf(!1);$($n),Vn&&Je({alignment:Le?"end":"start"})}break}case"Escape":{Mt.preventDefault(),Jt(!1),$(-1);break}case" ":{k||(Mt.preventDefault(),Ou[ie]&&oe?wu(Ou[ie]):(Jt(!0),$($i),fo()));break}case"Enter":k||Mt.preventDefault(),Ou[ie]&&oe&&(Mt.preventDefault(),wu(Ou[ie]))}},Va=Mt=>{typeof h=="function"&&h(Mt);const $n=gu.find(ia=>ia.value===fn);R&&Ou[ie]&&oe&&wu(Ou[ie]),bn(($n==null?void 0:$n.label)||""),Jt(!1)},Hr=Mt=>{typeof E=="function"&&E(Mt),k&&Jt(!0)},Cd=Mt=>{he||(bn(Mt.currentTarget.value),A&&Mt.currentTarget.value===""&&Wt(null),$(-1),Jt(!0))},Og=()=>{he||(Jt(!oe),fn&&!oe&&$($i))};return M.createElement(Ra.Wrapper,JV(QC({},i),{__staticSelector:"Select"}),M.createElement(Fm,{opened:Vn,transitionProps:m,shadow:r,withinPortal:J,portalProps:Y,__staticSelector:"Select",onDirectionChange:fe,switchDirectionOnFlip:X,zIndex:re,dropdownPosition:_e,positionDependencies:[...de,un],classNames:p,styles:D,unstyled:f,variant:n.variant},M.createElement(Fm.Target,null,M.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Vn?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Vn,onMouseLeave:()=>$(-1),tabIndex:-1},M.createElement("input",{type:"hidden",name:ge,value:fn||"",form:Se,disabled:w}),M.createElement(Ra,QC(JV(QC(QC({autoComplete:"off",type:"search"},n),bt),{ref:q1(e,Z),onKeyDown:eh,__staticSelector:"Select",value:un,placeholder:Ue,onChange:Cd,"aria-autocomplete":"list","aria-controls":Vn?`${n.id}-items`:null,"aria-activedescendant":ie>=0?`${n.id}-${ie}`:null,onMouseDown:Og,onBlur:Va,onFocus:Hr,readOnly:!k||he,disabled:w,"data-mantine-stop-propagation":Vn,name:null,classNames:JV(QC({},p),{input:ou({[qt.input]:!k},p==null?void 0:p.input)})}),fLe({theme:Vt,rightSection:O,rightSectionWidth:y,styles:D,size:n.size,shouldClear:A&&!!Vu,onClear:$u,error:i.error,clearButtonProps:Be,disabled:w,readOnly:he}))))),M.createElement(Fm.Dropdown,{component:H||zI,maxHeight:b,direction:te,id:n.id,innerRef:ct,__staticSelector:"Select",classNames:p,styles:D},M.createElement(Que,{data:Ou,hovered:ie,classNames:p,styles:D,isItemSelected:Mt=>Mt===fn,uuid:n.id,__staticSelector:"Select",onItemHover:$,onItemSelect:wu,itemsRefs:ue,itemComponent:c,size:n.size,nothingFound:F,creatable:Ze&&!!Ie,createLabel:Ie,"aria-label":i.label,unstyled:f,variant:n.variant}))))});li.displayName="@mantine/core/Select";function VIt(u,e){if(e.length===0)return e;const t="maxWidth"in e[0]?"maxWidth":"minWidth",n=[...e].sort((i,r)=>e0(ye({size:r[t],sizes:u.breakpoints}))-e0(ye({size:i[t],sizes:u.breakpoints})));return t==="minWidth"?n.reverse():n}var $It=Object.defineProperty,age=Object.getOwnPropertySymbols,KIt=Object.prototype.hasOwnProperty,WIt=Object.prototype.propertyIsEnumerable,oge=(u,e,t)=>e in u?$It(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,GIt=(u,e)=>{for(var t in e||(e={}))KIt.call(e,t)&&oge(u,t,e[t]);if(age)for(var t of age(e))WIt.call(e,t)&&oge(u,t,e[t]);return u},UIt=at((u,{spacing:e,breakpoints:t,cols:n,verticalSpacing:i})=>{const r=i!=null,a=VIt(u,t).reduce((o,s)=>{var l,c;const d="maxWidth"in s?"max-width":"min-width",h=ye({size:d==="max-width"?s.maxWidth:s.minWidth,sizes:u.breakpoints,units:"em"}),E=e0(h)-(d==="max-width"?1:0);return o[`@media (${d}: ${wl(E)})`]={gridTemplateColumns:`repeat(${s.cols}, minmax(0, 1fr))`,gap:`${ye({size:(l=s.verticalSpacing)!=null?l:r?i:e,sizes:u.spacing})} ${ye({size:(c=s.spacing)!=null?c:e,sizes:u.spacing})}`},o},{});return{root:GIt({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`,gap:`${ye({size:r?i:e,sizes:u.spacing})} ${ye({size:e,sizes:u.spacing})}`},a)}});const qIt=UIt;var JIt=Object.defineProperty,$M=Object.getOwnPropertySymbols,cze=Object.prototype.hasOwnProperty,dze=Object.prototype.propertyIsEnumerable,sge=(u,e,t)=>e in u?JIt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZIt=(u,e)=>{for(var t in e||(e={}))cze.call(e,t)&&sge(u,t,e[t]);if($M)for(var t of $M(e))dze.call(e,t)&&sge(u,t,e[t]);return u},YIt=(u,e)=>{var t={};for(var n in u)cze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&$M)for(var n of $M(u))e.indexOf(n)<0&&dze.call(u,n)&&(t[n]=u[n]);return t};const QIt={breakpoints:[],cols:1,spacing:"md"},Tc=C.forwardRef((u,e)=>{const t=Qe("SimpleGrid",QIt,u),{className:n,breakpoints:i,cols:r,spacing:a,verticalSpacing:o,children:s,unstyled:l,variant:c}=t,d=YIt(t,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:h,cx:E}=qIt({breakpoints:i,cols:r,spacing:a,verticalSpacing:o},{name:"SimpleGrid",unstyled:l,variant:c});return M.createElement(Ct,ZIt({className:E(h.root,n),ref:e},d),s)});Tc.displayName="@mantine/core/SimpleGrid";function hze({value:u,min:e,max:t}){const n=(u-e)/(t-e)*100;return Math.min(Math.max(n,0),100)}function XIt({value:u,containerWidth:e,min:t,max:n,step:i,precision:r}){const o=(e?Math.min(Math.max(u,0),e)/e:u)*(n-t),s=(o!==0?Math.round(o/i)*i:0)+t,l=Math.max(s,t);return r!==void 0?Number(l.toFixed(r)):l}var eOt=Object.defineProperty,tOt=Object.defineProperties,uOt=Object.getOwnPropertyDescriptors,lge=Object.getOwnPropertySymbols,nOt=Object.prototype.hasOwnProperty,iOt=Object.prototype.propertyIsEnumerable,cge=(u,e,t)=>e in u?eOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,rOt=(u,e)=>{for(var t in e||(e={}))nOt.call(e,t)&&cge(u,t,e[t]);if(lge)for(var t of lge(e))iOt.call(e,t)&&cge(u,t,e[t]);return u},aOt=(u,e)=>tOt(u,uOt(e));const wo={xs:G(4),sm:G(6),md:G(8),lg:G(10),xl:G(12)};var oOt=at(u=>({root:aOt(rOt({},u.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const sOt=oOt;var lOt=Object.defineProperty,cOt=Object.defineProperties,dOt=Object.getOwnPropertyDescriptors,dge=Object.getOwnPropertySymbols,hOt=Object.prototype.hasOwnProperty,EOt=Object.prototype.propertyIsEnumerable,hge=(u,e,t)=>e in u?lOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mOt=(u,e)=>{for(var t in e||(e={}))hOt.call(e,t)&&hge(u,t,e[t]);if(dge)for(var t of dge(e))EOt.call(e,t)&&hge(u,t,e[t]);return u},gOt=(u,e)=>cOt(u,dOt(e)),fOt=at((u,{color:e,disabled:t,thumbSize:n},{size:i})=>({label:{position:"absolute",top:G(-36),backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[9],fontSize:u.fontSizes.xs,color:u.white,padding:`calc(${u.spacing.xs} / 2)`,borderRadius:u.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:gOt(mOt({},u.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:t?"none":"flex",height:n?G(n):`calc(${ye({sizes:wo,size:i})} * 2)`,width:n?G(n):`calc(${ye({sizes:wo,size:i})} * 2)`,backgroundColor:u.colorScheme==="dark"?u.fn.themeColor(e,u.fn.primaryShade()):u.white,border:`${G(4)} solid ${u.colorScheme==="dark"?u.white:u.fn.themeColor(e,u.fn.primaryShade())}`,color:u.colorScheme==="dark"?u.white:u.fn.themeColor(e,u.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:u.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:u.shadows.sm}}));const pOt=fOt,Eze=C.forwardRef(({max:u,min:e,value:t,position:n,label:i,dragging:r,onMouseDown:a,onKeyDownCapture:o,color:s,classNames:l,styles:c,size:d,labelTransition:h,labelTransitionDuration:E,labelTransitionTimingFunction:m,labelAlwaysOn:g,thumbLabel:f,onFocus:p,onBlur:D,showLabelOnHover:x,isHovered:b,children:k=null,disabled:A,unstyled:F,thumbSize:S,variant:w},z)=>{const{classes:N,cx:O,theme:y}=pOt({color:s,disabled:A,thumbSize:S},{name:"Slider",classNames:l,styles:c,unstyled:F,variant:w,size:d}),[_,L]=C.useState(!1),T=g||r||_||x&&b;return M.createElement(Ct,{tabIndex:0,role:"slider","aria-label":f,"aria-valuemax":u,"aria-valuemin":e,"aria-valuenow":t,ref:z,className:O(N.thumb,{[N.dragging]:r}),onFocus:()=>{L(!0),typeof p=="function"&&p()},onBlur:()=>{L(!1),typeof D=="function"&&D()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:o,onClick:R=>R.stopPropagation(),style:{[y.dir==="rtl"?"right":"left"]:`${n}%`}},k,M.createElement(Jp,{mounted:i!=null&&T,duration:E,transition:h,timingFunction:m||y.transitionTimingFunction},R=>M.createElement("div",{style:R,className:N.label},i)))});Eze.displayName="@mantine/core/SliderThumb";function DOt({mark:u,offset:e,value:t,inverted:n=!1}){return n?typeof e=="number"&&u.value<=e||u.value>=t:typeof e=="number"?u.value>=e&&u.value<=t:u.value<=t}var xOt=at((u,{color:e,disabled:t,thumbSize:n},{size:i})=>({marksContainer:{position:"absolute",right:n?G(n/2):ye({sizes:wo,size:i}),left:n?G(n/2):ye({sizes:wo,size:i}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,borderColor:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${G(ye({sizes:wo,size:i}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]}`,height:ye({sizes:wo,size:i}),width:ye({sizes:wo,size:i}),borderRadius:1e3,transform:`translateX(calc(-${ye({sizes:wo,size:i})} / 2))`,backgroundColor:u.white,pointerEvents:"none"},markFilled:{borderColor:t?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:e}).background},markLabel:{transform:`translate(-50%, calc(${u.spacing.xs} / 2))`,fontSize:u.fontSizes.sm,color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const vOt=xOt;function mze({marks:u,color:e,size:t,thumbSize:n,min:i,max:r,value:a,classNames:o,styles:s,offset:l,onChange:c,disabled:d,unstyled:h,inverted:E,variant:m}){const{classes:g,cx:f}=vOt({color:e,disabled:d,thumbSize:n},{name:"Slider",classNames:o,styles:s,unstyled:h,variant:m,size:t}),p=u.map((D,x)=>M.createElement(Ct,{className:g.markWrapper,sx:{left:`${hze({value:D.value,min:i,max:r})}%`},key:x},M.createElement("div",{className:f(g.mark,{[g.markFilled]:DOt({mark:D,value:a,offset:l,inverted:E})})}),D.label&&M.createElement("div",{className:g.markLabel,onMouseDown:b=>{b.stopPropagation(),!d&&c(D.value)},onTouchStart:b=>{b.stopPropagation(),!d&&c(D.value)}},D.label)));return M.createElement("div",{className:g.marksContainer},p)}mze.displayName="@mantine/core/SliderMarks";var COt=at((u,{radius:e,color:t,disabled:n,inverted:i,thumbSize:r},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${ye({sizes:wo,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]}}},track:{position:"relative",height:ye({sizes:wo,size:a}),width:"100%",marginRight:r?G(r/2):ye({size:a,sizes:wo}),marginLeft:r?G(r/2):ye({size:a,sizes:wo}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:u.fn.radius(e),right:`calc(${r?G(r/2):ye({size:a,sizes:wo})} * -1)`,left:`calc(${r?G(r/2):ye({size:a,sizes:wo})} * -1)`,backgroundColor:i?n?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:t}).background:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:i?u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2]:n?u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[4]:u.fn.variant({variant:"filled",color:t}).background,borderRadius:u.fn.radius(e)}}));const bOt=COt;var kOt=Object.defineProperty,FOt=Object.defineProperties,yOt=Object.getOwnPropertyDescriptors,KM=Object.getOwnPropertySymbols,gze=Object.prototype.hasOwnProperty,fze=Object.prototype.propertyIsEnumerable,Ege=(u,e,t)=>e in u?kOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,mge=(u,e)=>{for(var t in e||(e={}))gze.call(e,t)&&Ege(u,t,e[t]);if(KM)for(var t of KM(e))fze.call(e,t)&&Ege(u,t,e[t]);return u},AOt=(u,e)=>FOt(u,yOt(e)),_Ot=(u,e)=>{var t={};for(var n in u)gze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&KM)for(var n of KM(u))e.indexOf(n)<0&&fze.call(u,n)&&(t[n]=u[n]);return t};function pze(u){var e=u,{filled:t,size:n,thumbSize:i,color:r,classNames:a,styles:o,radius:s,children:l,offset:c,disabled:d,marksOffset:h,unstyled:E,inverted:m,variant:g,containerProps:f}=e,p=_Ot(e,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:D}=bOt({color:r,radius:s,disabled:d,inverted:m,thumbSize:i},{name:"Slider",classNames:a,styles:o,unstyled:E,variant:g,size:n});return M.createElement(M.Fragment,null,M.createElement("div",mge({className:D.trackContainer},f),M.createElement("div",{className:D.track},M.createElement(Ct,{className:D.bar,sx:{left:`calc(${c}% - ${i?G(i/2):ye({size:n,sizes:wo})})`,width:`calc(${t}% + 2 * ${i?G(i/2):ye({size:n,sizes:wo})})`}}),l)),M.createElement(mze,AOt(mge({},p),{size:n,thumbSize:i,color:r,offset:h,classNames:a,styles:o,disabled:d,unstyled:E,inverted:m,variant:g})))}pze.displayName="@mantine/core/SliderTrack";var SOt=Object.defineProperty,BOt=Object.defineProperties,wOt=Object.getOwnPropertyDescriptors,WM=Object.getOwnPropertySymbols,Dze=Object.prototype.hasOwnProperty,xze=Object.prototype.propertyIsEnumerable,gge=(u,e,t)=>e in u?SOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,LOt=(u,e)=>{for(var t in e||(e={}))Dze.call(e,t)&&gge(u,t,e[t]);if(WM)for(var t of WM(e))xze.call(e,t)&&gge(u,t,e[t]);return u},zOt=(u,e)=>BOt(u,wOt(e)),MOt=(u,e)=>{var t={};for(var n in u)Dze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&WM)for(var n of WM(u))e.indexOf(n)<0&&xze.call(u,n)&&(t[n]=u[n]);return t};const vze=C.forwardRef((u,e)=>{var t=u,{className:n,size:i,classNames:r,styles:a,disabled:o,unstyled:s,variant:l}=t,c=MOt(t,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:d,cx:h}=sOt(null,{name:"Slider",classNames:r,styles:a,unstyled:s,variant:l,size:i});return M.createElement(Ct,zOt(LOt({},c),{tabIndex:-1,className:h(d.root,n),ref:e}))});vze.displayName="@mantine/core/SliderRoot";function Q_(u,e){return parseFloat(u.toFixed(e))}function TOt(u){if(!u)return 0;const e=u.toString().split(".");return e.length>1?e[1].length:0}var NOt=Object.defineProperty,POt=Object.defineProperties,ROt=Object.getOwnPropertyDescriptors,GM=Object.getOwnPropertySymbols,Cze=Object.prototype.hasOwnProperty,bze=Object.prototype.propertyIsEnumerable,fge=(u,e,t)=>e in u?NOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,IOt=(u,e)=>{for(var t in e||(e={}))Cze.call(e,t)&&fge(u,t,e[t]);if(GM)for(var t of GM(e))bze.call(e,t)&&fge(u,t,e[t]);return u},OOt=(u,e)=>POt(u,ROt(e)),jOt=(u,e)=>{var t={};for(var n in u)Cze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&GM)for(var n of GM(u))e.indexOf(n)<0&&bze.call(u,n)&&(t[n]=u[n]);return t};const HOt={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:u=>u,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:u=>u},kze=C.forwardRef((u,e)=>{const t=Qe("Slider",HOt,u),{classNames:n,styles:i,color:r,value:a,onChange:o,onChangeEnd:s,size:l,radius:c,min:d,max:h,step:E,precision:m,defaultValue:g,name:f,marks:p,label:D,labelTransition:x,labelTransitionDuration:b,labelTransitionTimingFunction:k,labelAlwaysOn:A,thumbLabel:F,showLabelOnHover:S,thumbChildren:w,disabled:z,unstyled:N,thumbSize:O,scale:y,inverted:_,variant:L}=t,T=jOt(t,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),R=m??TOt(E),I=jr(),[H,V]=C.useState(!1),[U,J]=ps({value:typeof a=="number"?bm(a,d,h):a,defaultValue:typeof g=="number"?bm(g,d,h):g,finalValue:bm(0,d,h),onChange:o}),Y=C.useRef(U),X=C.useRef(),re=C.useRef(),ge=hze({value:U,min:d,max:h}),_e=y(U),Ve=typeof D=="function"?D(_e):D,Ue=C.useCallback(({x:he})=>{if(!z){const Be=XIt({value:he,min:d,max:h,step:E,precision:R});J(Be),Y.current=Be}},[z,d,h,E,R,J]),{ref:qe,active:Se}=Ykt(Ue,{onScrubEnd:()=>s==null?void 0:s(Y.current)},I.dir),de=he=>{if(!z)switch(he.key){case"ArrowUp":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(U+E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowRight":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(I.dir==="rtl"?U-E:U+E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowDown":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(U-E,d),h),R);s==null||s(Be),J(Be);break}case"ArrowLeft":{he.preventDefault(),re.current.focus();const Be=Q_(Math.min(Math.max(I.dir==="rtl"?U+E:U-E,d),h),R);s==null||s(Be),J(Be);break}case"Home":{he.preventDefault(),re.current.focus(),s==null||s(d),J(d);break}case"End":{he.preventDefault(),re.current.focus(),s==null||s(h),J(h);break}}};return M.createElement(vze,OOt(IOt({},T),{ref:q1(e,X),onKeyDownCapture:de,onMouseDownCapture:()=>{var he;return(he=X.current)==null?void 0:he.focus()},size:l,classNames:n,styles:i,disabled:z,unstyled:N,variant:L}),M.createElement(pze,{inverted:_,offset:0,filled:ge,marks:p,size:l,thumbSize:O,radius:c,color:r,min:d,max:h,value:_e,onChange:J,classNames:n,styles:i,disabled:z,unstyled:N,variant:L,containerProps:{ref:qe,onMouseEnter:S?()=>V(!0):void 0,onMouseLeave:S?()=>V(!1):void 0}},M.createElement(Eze,{max:h,min:d,value:_e,position:ge,dragging:Se,color:r,size:l,label:Ve,ref:re,labelTransition:x,labelTransitionDuration:b,labelTransitionTimingFunction:k,labelAlwaysOn:A,classNames:n,styles:i,thumbLabel:F,showLabelOnHover:S,isHovered:H,disabled:z,unstyled:N,thumbSize:O,variant:L},w)),M.createElement("input",{type:"hidden",name:f,value:_e}))});kze.displayName="@mantine/core/Slider";var VOt=Object.defineProperty,UM=Object.getOwnPropertySymbols,Fze=Object.prototype.hasOwnProperty,yze=Object.prototype.propertyIsEnumerable,pge=(u,e,t)=>e in u?VOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$Ot=(u,e)=>{for(var t in e||(e={}))Fze.call(e,t)&&pge(u,t,e[t]);if(UM)for(var t of UM(e))yze.call(e,t)&&pge(u,t,e[t]);return u},KOt=(u,e)=>{var t={};for(var n in u)Fze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&UM)for(var n of UM(u))e.indexOf(n)<0&&yze.call(u,n)&&(t[n]=u[n]);return t};const WOt={w:0,h:0},qv=C.forwardRef((u,e)=>{const t=Qe("Space",WOt,u),{w:n,h:i}=t,r=KOt(t,["w","h"]);return M.createElement(Ct,$Ot({ref:e,w:n,miw:n,h:i,mih:i},r))});qv.displayName="@mantine/core/Space";var GOt=at((u,{transitionDuration:e})=>({control:{},root:{position:"relative"},content:{display:"flex",flexDirection:"column",overflow:"hidden",transitionProperty:"max-height",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:`${e}ms`,"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":void 0}}}));const UOt=GOt;var qOt=Object.defineProperty,qM=Object.getOwnPropertySymbols,Aze=Object.prototype.hasOwnProperty,_ze=Object.prototype.propertyIsEnumerable,Dge=(u,e,t)=>e in u?qOt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,JOt=(u,e)=>{for(var t in e||(e={}))Aze.call(e,t)&&Dge(u,t,e[t]);if(qM)for(var t of qM(e))_ze.call(e,t)&&Dge(u,t,e[t]);return u},ZOt=(u,e)=>{var t={};for(var n in u)Aze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&qM)for(var n of qM(u))e.indexOf(n)<0&&_ze.call(u,n)&&(t[n]=u[n]);return t};const YOt={maxHeight:100,transitionDuration:200,initialState:!1},kne=C.forwardRef((u,e)=>{const t=Qe("Spoiler",YOt,u),{className:n,children:i,maxHeight:r,hideLabel:a,showLabel:o,transitionDuration:s,controlRef:l,initialState:c,classNames:d,styles:h,unstyled:E,variant:m}=t,g=ZOt(t,["className","children","maxHeight","hideLabel","showLabel","transitionDuration","controlRef","initialState","classNames","styles","unstyled","variant"]),{classes:f,cx:p}=UOt({transitionDuration:s},{name:"Spoiler",classNames:d,styles:h,unstyled:E,variant:m}),[D,x]=C.useState(c),{ref:b,height:k}=aFt(),A=rx(S=>!S),className:f.control},F))});kne.displayName="@mantine/core/Spoiler";var QOt=at((u,{spacing:e,align:t,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:t,justifyContent:n,gap:ye({size:e,sizes:u.spacing})}}));const XOt=QOt;var ejt=Object.defineProperty,JM=Object.getOwnPropertySymbols,Sze=Object.prototype.hasOwnProperty,Bze=Object.prototype.propertyIsEnumerable,xge=(u,e,t)=>e in u?ejt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tjt=(u,e)=>{for(var t in e||(e={}))Sze.call(e,t)&&xge(u,t,e[t]);if(JM)for(var t of JM(e))Bze.call(e,t)&&xge(u,t,e[t]);return u},ujt=(u,e)=>{var t={};for(var n in u)Sze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&JM)for(var n of JM(u))e.indexOf(n)<0&&Bze.call(u,n)&&(t[n]=u[n]);return t};const njt={spacing:"md",align:"stretch",justify:"flex-start"},ju=C.forwardRef((u,e)=>{const t=Qe("Stack",njt,u),{spacing:n,className:i,align:r,justify:a,unstyled:o,variant:s}=t,l=ujt(t,["spacing","className","align","justify","unstyled","variant"]),{classes:c,cx:d}=XOt({spacing:n,align:r,justify:a},{name:"Stack",unstyled:o,variant:s});return M.createElement(Ct,tjt({className:d(c.root,i),ref:e},l))});ju.displayName="@mantine/core/Stack";var ijt=Object.defineProperty,rjt=Object.defineProperties,ajt=Object.getOwnPropertyDescriptors,vge=Object.getOwnPropertySymbols,ojt=Object.prototype.hasOwnProperty,sjt=Object.prototype.propertyIsEnumerable,Cge=(u,e,t)=>e in u?ijt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,ZV=(u,e)=>{for(var t in e||(e={}))ojt.call(e,t)&&Cge(u,t,e[t]);if(vge)for(var t of vge(e))sjt.call(e,t)&&Cge(u,t,e[t]);return u},ljt=(u,e)=>rjt(u,ajt(e));const wze={xs:G(34),sm:G(36),md:G(42),lg:G(48),xl:G(52)};var cjt=at((u,{color:e,iconSize:t,radius:n,allowStepClick:i,iconPosition:r,orientation:a},{size:o})=>{const s=t?G(t):ye({size:o,sizes:wze}),l=o==="xl"||o==="lg"?u.spacing.md:u.spacing.sm,c=u.fn.radius(n),d=u.fn.variant({variant:"filled",color:e||u.primaryColor,primaryFallback:!1}),h=`calc(${u.spacing.xs} / 2)`,E={step:{justifyContent:"flex-start",minHeight:`calc(${s} + ${u.spacing.xl} + ${h})`,marginTop:h,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${v1("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:ZV({display:"flex",flexDirection:r==="left"?"row":"row-reverse",cursor:i?"pointer":"default"},a==="vertical"?E.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${s} + ${h})`,left:`calc(${s} / 2)`,height:"100vh",position:"absolute",borderLeft:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]}`,ref:v1("verticalSeparator")},verticalSeparatorActive:{borderColor:u.fn.variant({variant:"filled",color:e}).background},stepIcon:{boxSizing:"border-box",height:s,width:s,minWidth:s,borderRadius:c,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1],border:`${G(2)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7],fontSize:ye({size:o,sizes:u.fontSizes}),"&[data-progress]":{borderColor:d.background},"&[data-completed]":{backgroundColor:d.background,borderColor:d.background,color:u.white}},stepCompletedIcon:ljt(ZV({},u.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:u.white}),stepBody:ZV({display:"flex",flexDirection:"column",marginLeft:r==="left"?l:void 0,marginRight:r==="right"?l:void 0},a==="vertical"?{marginTop:`calc(${t} / 4)`}:null),stepLabel:{textAlign:r,fontWeight:500,fontSize:ye({size:o,sizes:u.fontSizes}),lineHeight:1},stepDescription:{textAlign:r,marginTop:`calc(${ye({size:o,sizes:u.spacing})} / 3)`,marginBottom:`calc(${ye({size:o,sizes:u.spacing})} / 3)`,fontSize:`calc(${ye({size:o,sizes:u.fontSizes})} - ${G(2)})`,lineHeight:1}}});const djt=cjt;var hjt=Object.defineProperty,ZM=Object.getOwnPropertySymbols,Lze=Object.prototype.hasOwnProperty,zze=Object.prototype.propertyIsEnumerable,bge=(u,e,t)=>e in u?hjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,YV=(u,e)=>{for(var t in e||(e={}))Lze.call(e,t)&&bge(u,t,e[t]);if(ZM)for(var t of ZM(e))zze.call(e,t)&&bge(u,t,e[t]);return u},Ejt=(u,e)=>{var t={};for(var n in u)Lze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&ZM)for(var n of ZM(u))e.indexOf(n)<0&&zze.call(u,n)&&(t[n]=u[n]);return t};const mjt={xs:16,sm:18,md:20,lg:22,xl:24},gjt={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},X_=(u,e)=>typeof u=="function"?M.createElement(u,{step:e}):u,Mze=C.forwardRef((u,e)=>{const t=Qe("StepperStep",gjt,u),{className:n,step:i,state:r,color:a,icon:o,completedIcon:s,progressIcon:l,label:c,description:d,withIcon:h,iconSize:E,size:m,radius:g,loading:f,allowStepClick:p,allowStepSelect:D,iconPosition:x,__staticSelector:b,classNames:k,styles:A,unstyled:F,orientation:S,variant:w}=t,z=Ejt(t,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:N,cx:O}=djt({color:a,iconSize:E,radius:g,allowStepClick:p,iconPosition:x,orientation:S},{name:b,classNames:k,styles:A,unstyled:F,variant:w,size:m}),y=ye({size:m,sizes:mjt}),_=r==="stepCompleted"?null:r==="stepProgress"?l:o,L={"data-progress":r==="stepProgress"||void 0,"data-completed":r==="stepCompleted"||void 0};return M.createElement(L4,YV(YV({className:O(N.step,n),tabIndex:p?0:-1,ref:e},L),z),h&&M.createElement("div",{className:N.stepWrapper},M.createElement("div",YV({className:N.stepIcon},L),M.createElement(Jp,{mounted:r==="stepCompleted",transition:"pop",duration:200},T=>M.createElement("div",{className:N.stepCompletedIcon,style:T},f?M.createElement(Vv,{color:"#fff",size:y,className:N.stepLoader}):X_(s,i)||M.createElement(ABe,{indeterminate:!1,width:y,height:y}))),r!=="stepCompleted"?f?M.createElement(Vv,{size:y,color:a}):X_(_||o,i):null),S==="vertical"&&M.createElement("div",{className:O(N.verticalSeparator,{[N.verticalSeparatorActive]:r==="stepCompleted"})})),(c||d)&&M.createElement("div",{className:N.stepBody},c&&M.createElement(_u,{className:N.stepLabel},X_(c,i)),d&&M.createElement(_u,{className:N.stepDescription,color:"dimmed"},X_(d,i))))});Mze.displayName="@mantine/core/Step";function YM(u){return null}YM.displayName="@mantine/core/StepCompleted";var fjt=Object.defineProperty,pjt=Object.defineProperties,Djt=Object.getOwnPropertyDescriptors,kge=Object.getOwnPropertySymbols,xjt=Object.prototype.hasOwnProperty,vjt=Object.prototype.propertyIsEnumerable,Fge=(u,e,t)=>e in u?fjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XC=(u,e)=>{for(var t in e||(e={}))xjt.call(e,t)&&Fge(u,t,e[t]);if(kge)for(var t of kge(e))vjt.call(e,t)&&Fge(u,t,e[t]);return u},Cjt=(u,e)=>pjt(u,Djt(e)),bjt=at((u,{contentPadding:e,color:t,orientation:n,iconPosition:i,iconSize:r,breakpoint:a},{size:o})=>{const s=typeof a<"u",l=e0(ye({size:a,sizes:u.breakpoints})),c=typeof r<"u"?`calc(${G(r)} / 2 - ${G(1)})`:`calc(${ye({size:o,sizes:wze})} / 2 - ${G(1)})`,d={steps:{flexDirection:"column",alignItems:i==="left"?"flex-start":"flex-end"},separator:{width:G(2),minHeight:u.spacing.xl,marginLeft:i==="left"?c:0,marginRight:i==="right"?c:0,marginTop:`calc(${u.spacing.xs} / 2)`,marginBottom:`calc(${u.spacing.xs} - ${G(2)})`}},h={steps:{[`@media (max-width: ${wl(l-1)})`]:d.steps},separator:{[`@media (max-width: ${wl(l-1)})`]:d.separator}};return{root:{},steps:XC(XC({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?d.steps:null),s?h.steps:null),separator:XC(XC({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:G(2),backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],marginLeft:u.spacing.md,marginRight:u.spacing.md},n==="vertical"?d.separator:null),s?h.separator:null),separatorActive:{backgroundColor:u.fn.variant({variant:"filled",color:t||u.primaryColor,primaryFallback:!1}).background},content:Cjt(XC({},u.fn.fontStyles()),{paddingTop:ye({size:e,sizes:u.spacing})})}});const kjt=bjt;var Fjt=Object.defineProperty,QM=Object.getOwnPropertySymbols,Tze=Object.prototype.hasOwnProperty,Nze=Object.prototype.propertyIsEnumerable,yge=(u,e,t)=>e in u?Fjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,yjt=(u,e)=>{for(var t in e||(e={}))Tze.call(e,t)&&yge(u,t,e[t]);if(QM)for(var t of QM(e))Nze.call(e,t)&&yge(u,t,e[t]);return u},Ajt=(u,e)=>{var t={};for(var n in u)Tze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&QM)for(var n of QM(u))e.indexOf(n)<0&&Nze.call(u,n)&&(t[n]=u[n]);return t};const _jt={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},Jf=C.forwardRef((u,e)=>{var t,n,i;const r=Qe("Stepper",_jt,u),{className:a,children:o,onStepClick:s,active:l,icon:c,completedIcon:d,progressIcon:h,color:E,iconSize:m,contentPadding:g,size:f,radius:p,orientation:D,breakpoint:x,iconPosition:b,allowNextStepsSelect:k,classNames:A,styles:F,unstyled:S,variant:w}=r,z=Ajt(r,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:N,cx:O}=kjt({contentPadding:g,color:E,orientation:D,iconPosition:b,iconSize:m,breakpoint:x},{name:"Stepper",classNames:A,styles:F,unstyled:S,variant:w,size:f}),y=C.Children.toArray(o),_=y.filter(V=>V.type!==YM),L=y.find(V=>V.type===YM),T=_.reduce((V,U,J)=>{const Y=l===J?"stepProgress":l>J?"stepCompleted":"stepInactive",re=(()=>typeof s!="function"?!1:typeof U.props.allowStepSelect=="boolean"?U.props.allowStepSelect:Y==="stepCompleted"||k)();return V.push(C.cloneElement(U,{__staticSelector:"Stepper",icon:U.props.icon||c||J+1,key:J,step:J,variant:w,state:Y,onClick:()=>re&&s(J),allowStepClick:re,completedIcon:U.props.completedIcon||d,progressIcon:U.props.progressIcon||h,color:U.props.color||E,iconSize:m,size:f,radius:p,classNames:A,styles:F,iconPosition:U.props.iconPosition||b,orientation:D,unstyled:S})),D==="horizontal"&&J!==_.length-1&&V.push(M.createElement("div",{className:O(N.separator,{[N.separatorActive]:J_.length-1?I:R;return M.createElement(Ct,yjt({className:O(N.root,a),ref:e},z),M.createElement("div",{className:N.steps},T),H&&M.createElement("div",{className:N.content},H))});Jf.Step=Mze;Jf.Completed=YM;Jf.displayName="@mantine/core/Stepper";const Pze=C.createContext(null),Sjt=Pze.Provider,Bjt=()=>C.useContext(Pze);var wjt=Object.defineProperty,XM=Object.getOwnPropertySymbols,Rze=Object.prototype.hasOwnProperty,Ize=Object.prototype.propertyIsEnumerable,Age=(u,e,t)=>e in u?wjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,_ge=(u,e)=>{for(var t in e||(e={}))Rze.call(e,t)&&Age(u,t,e[t]);if(XM)for(var t of XM(e))Ize.call(e,t)&&Age(u,t,e[t]);return u},Ljt=(u,e)=>{var t={};for(var n in u)Rze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&XM)for(var n of XM(u))e.indexOf(n)<0&&Ize.call(u,n)&&(t[n]=u[n]);return t};const zjt={size:"sm"},Oze=C.forwardRef((u,e)=>{const t=Qe("SwitchGroup",zjt,u),{children:n,value:i,defaultValue:r,onChange:a,size:o,wrapperProps:s}=t,l=Ljt(t,["children","value","defaultValue","onChange","size","wrapperProps"]),[c,d]=ps({value:i,defaultValue:r,finalValue:[],onChange:a}),h=E=>{const m=E.currentTarget.value;d(c.includes(m)?c.filter(g=>g!==m):[...c,m])};return M.createElement(Sjt,{value:{value:c,onChange:h,size:o}},M.createElement(Ra.Wrapper,_ge(_ge({labelElement:"div",size:o,__staticSelector:"SwitchGroup",ref:e},s),l),n))});Oze.displayName="@mantine/core/SwitchGroup";var Mjt=Object.defineProperty,Tjt=Object.defineProperties,Njt=Object.getOwnPropertyDescriptors,Sge=Object.getOwnPropertySymbols,Pjt=Object.prototype.hasOwnProperty,Rjt=Object.prototype.propertyIsEnumerable,Bge=(u,e,t)=>e in u?Mjt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Ijt=(u,e)=>{for(var t in e||(e={}))Pjt.call(e,t)&&Bge(u,t,e[t]);if(Sge)for(var t of Sge(e))Rjt.call(e,t)&&Bge(u,t,e[t]);return u},Ojt=(u,e)=>Tjt(u,Njt(e));const jjt={xs:G(16),sm:G(20),md:G(24),lg:G(30),xl:G(36)},Hjt={xs:G(32),sm:G(38),md:G(46),lg:G(56),xl:G(72)},Vjt={xs:G(12),sm:G(14),md:G(18),lg:G(22),xl:G(28)},$jt={xs:G(5),sm:G(6),md:G(7),lg:G(9),xl:G(11)},Kjt={xs:G(4),sm:G(5),md:G(6),lg:G(8),xl:G(10)};var Wjt=at((u,{radius:e,color:t,labelPosition:n,error:i},{size:r})=>{const a=ye({size:r,sizes:Vjt}),o=ye({size:e,sizes:u.radius}),s=u.fn.variant({variant:"filled",color:t}),l=ye({size:r,sizes:Hjt}),c=G(r==="xs"?1:2),d=u.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:Ojt(Ijt({},u.fn.focusStyles("input:focus + &")),{cursor:u.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:o,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[2],border:`${G(1)} solid ${i?d:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,height:ye({size:r,sizes:jjt}),minWidth:l,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:u.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:ye({size:r,sizes:$jt}),fontWeight:600,order:n==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[6],transition:`color 150ms ${u.transitionTimingFunction}`,"input:checked + &":{backgroundColor:s.background,borderColor:s.background,color:u.white,transition:`color 150ms ${u.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:o,boxSizing:"border-box",display:"flex",backgroundColor:u.white,height:a,width:a,border:`${G(1)} solid ${u.colorScheme==="dark"?u.white:u.colors.gray[3]}`,left:c,transition:`left 150ms ${u.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:u.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${a} - ${c})`,borderColor:u.white},"input:disabled + * > &":{borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[2],backgroundColor:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${l} - ${a})`,paddingInline:ye({size:r,sizes:Kjt}),marginLeft:`calc(${a} + ${c})`,transition:`margin 150ms ${u.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${a} + ${c})`}}}});const Gjt=Wjt;var Ujt=Object.defineProperty,qjt=Object.defineProperties,Jjt=Object.getOwnPropertyDescriptors,eT=Object.getOwnPropertySymbols,jze=Object.prototype.hasOwnProperty,Hze=Object.prototype.propertyIsEnumerable,wge=(u,e,t)=>e in u?Ujt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QV=(u,e)=>{for(var t in e||(e={}))jze.call(e,t)&&wge(u,t,e[t]);if(eT)for(var t of eT(e))Hze.call(e,t)&&wge(u,t,e[t]);return u},Zjt=(u,e)=>qjt(u,Jjt(e)),Yjt=(u,e)=>{var t={};for(var n in u)jze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&eT)for(var n of eT(u))e.indexOf(n)<0&&Hze.call(u,n)&&(t[n]=u[n]);return t};const Qjt={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},tT=C.forwardRef((u,e)=>{var t;const n=Qe("Switch",Qjt,u),{className:i,color:r,label:a,offLabel:o,onLabel:s,id:l,style:c,size:d,radius:h,wrapperProps:E,children:m,unstyled:g,styles:f,classNames:p,thumbIcon:D,sx:x,checked:b,defaultChecked:k,onChange:A,labelPosition:F,description:S,error:w,disabled:z,variant:N}=n,O=Yjt(n,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),y=Bjt(),_=(y==null?void 0:y.size)||d,{classes:L,cx:T}=Gjt({color:r,radius:h,labelPosition:F,error:!!w},{name:"Switch",classNames:p,styles:f,unstyled:g,size:_,variant:N}),{systemStyles:R,rest:I}=w4(O),H=Jl(l),V=y?{checked:y.value.includes(I.value),onChange:y.onChange}:{},[U,J]=ps({value:(t=V.checked)!=null?t:b,defaultValue:k,finalValue:!1});return M.createElement(PI,QV(QV({className:T(i,L.root),sx:x,style:c,id:H,size:(y==null?void 0:y.size)||d,labelPosition:F,label:a,description:S,error:w,disabled:z,__staticSelector:"Switch",classNames:p,styles:f,unstyled:g,"data-checked":V.checked||void 0,variant:N},R),E),M.createElement("input",Zjt(QV({},I),{disabled:z,checked:U,onChange:Y=>{y?V.onChange(Y):A==null||A(Y),J(Y.currentTarget.checked)},id:H,ref:e,type:"checkbox",className:L.input})),M.createElement("label",{htmlFor:H,className:L.track},M.createElement("div",{className:L.thumb},D),M.createElement("div",{className:L.trackLabel},U?s:o)))});tT.displayName="@mantine/core/Switch";tT.Group=Oze;const TZ={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[Xjt,Fne]=U1(TZ.context);var eHt=Object.defineProperty,Lge=Object.getOwnPropertySymbols,tHt=Object.prototype.hasOwnProperty,uHt=Object.prototype.propertyIsEnumerable,zge=(u,e,t)=>e in u?eHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,nHt=(u,e)=>{for(var t in e||(e={}))tHt.call(e,t)&&zge(u,t,e[t]);if(Lge)for(var t of Lge(e))uHt.call(e,t)&&zge(u,t,e[t]);return u};function iHt({orientation:u,inverted:e,placement:t},n,i){const r=u==="vertical";return i==="default"?{[r?t==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${G(2)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:i==="outline"?{[r?t==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${G(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:i==="pills"?{gap:`calc(${n.spacing.sm} / 2)`}:{}}var rHt=at((u,e,{variant:t})=>{const n=e.orientation==="vertical";return{tabsList:nHt({display:"flex",flexWrap:"wrap",flexDirection:n?"column":"row",justifyContent:hwe[e.position],'& [role="tab"]':{flex:e.grow?1:void 0}},iHt(e,u,t))}});const aHt=rHt;var oHt=Object.defineProperty,sHt=Object.defineProperties,lHt=Object.getOwnPropertyDescriptors,uT=Object.getOwnPropertySymbols,Vze=Object.prototype.hasOwnProperty,$ze=Object.prototype.propertyIsEnumerable,Mge=(u,e,t)=>e in u?oHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,cHt=(u,e)=>{for(var t in e||(e={}))Vze.call(e,t)&&Mge(u,t,e[t]);if(uT)for(var t of uT(e))$ze.call(e,t)&&Mge(u,t,e[t]);return u},dHt=(u,e)=>sHt(u,lHt(e)),hHt=(u,e)=>{var t={};for(var n in u)Vze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&uT)for(var n of uT(u))e.indexOf(n)<0&&$ze.call(u,n)&&(t[n]=u[n]);return t};const EHt={grow:!1,position:"left"},Kze=C.forwardRef((u,e)=>{const t=Qe("TabsList",EHt,u),{children:n,className:i,grow:r,position:a}=t,o=hHt(t,["children","className","grow","position"]),{orientation:s,variant:l,color:c,radius:d,inverted:h,placement:E,classNames:m,styles:g,unstyled:f}=Fne(),{classes:p,cx:D}=aHt({orientation:s,grow:r,color:c,position:a,radius:d,inverted:h,placement:E},{name:"Tabs",unstyled:f,classNames:m,styles:g,variant:l});return M.createElement(Ct,dHt(cHt({},o),{className:D(p.tabsList,i),ref:e,role:"tablist","aria-orientation":s}),n)});Kze.displayName="@mantine/core/TabsList";var mHt=at((u,{orientation:e})=>({panel:{flex:e==="vertical"?1:void 0}}));const gHt=mHt;var fHt=Object.defineProperty,pHt=Object.defineProperties,DHt=Object.getOwnPropertyDescriptors,nT=Object.getOwnPropertySymbols,Wze=Object.prototype.hasOwnProperty,Gze=Object.prototype.propertyIsEnumerable,Tge=(u,e,t)=>e in u?fHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,xHt=(u,e)=>{for(var t in e||(e={}))Wze.call(e,t)&&Tge(u,t,e[t]);if(nT)for(var t of nT(e))Gze.call(e,t)&&Tge(u,t,e[t]);return u},vHt=(u,e)=>pHt(u,DHt(e)),CHt=(u,e)=>{var t={};for(var n in u)Wze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&nT)for(var n of nT(u))e.indexOf(n)<0&&Gze.call(u,n)&&(t[n]=u[n]);return t};const bHt={},Uze=C.forwardRef((u,e)=>{const t=Qe("TabsPanel",bHt,u),{value:n,children:i,sx:r,className:a}=t,o=CHt(t,["value","children","sx","className"]),s=Fne(),{classes:l,cx:c}=gHt({orientation:s.orientation,color:s.color,radius:s.radius,inverted:s.inverted,placement:s.placement},{name:"Tabs",unstyled:s.unstyled,classNames:s.classNames,styles:s.styles,variant:s.variant}),d=s.getPanelId(n),h=s.value===n,E=s.keepMounted||h?i:null;return C.useEffect(()=>(s.setMountedPanelIds(m=>[...m,d]),s.setMountedPanelIds(m=>m.filter(g=>g!==d))),[d]),M.createElement(Ct,vHt(xHt({},o),{ref:e,sx:[{display:h?void 0:"none"},...EI(r)],className:c(l.panel,a),role:"tabpanel",id:d,"aria-labelledby":s.getTabId(n)}),E)});Uze.displayName="@mantine/core/TabsPanel";var kHt=Object.defineProperty,FHt=Object.defineProperties,yHt=Object.getOwnPropertyDescriptors,Nge=Object.getOwnPropertySymbols,AHt=Object.prototype.hasOwnProperty,_Ht=Object.prototype.propertyIsEnumerable,Pge=(u,e,t)=>e in u?kHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,W5=(u,e)=>{for(var t in e||(e={}))AHt.call(e,t)&&Pge(u,t,e[t]);if(Nge)for(var t of Nge(e))_Ht.call(e,t)&&Pge(u,t,e[t]);return u},Rge=(u,e)=>FHt(u,yHt(e));function SHt(u,{orientation:e,color:t,radius:n,inverted:i,placement:r},a){const o=e==="vertical",s=u.fn.variant({color:t,variant:"filled"}),l=G(u.fn.radius(n)),c=e==="vertical"?r==="left"?`${l} 0 0 ${l}`:` 0 ${l} ${l} 0`:i?`0 0 ${l} ${l}`:`${l} ${l} 0 0`;return a==="default"?Rge(W5({[o?r==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:`${G(2)} solid transparent`,[o?r==="left"?"marginRight":"marginLeft":i?"marginTop":"marginBottom"]:G(-2),borderRadius:c},u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]})),{"&[data-active]":W5({borderColor:s.background,color:u.colorScheme==="dark"?u.white:u.black},u.fn.hover({borderColor:s.background}))}):a==="outline"?{borderRadius:c,border:`${G(1)} solid transparent`,[o?r==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3],"&::before":{content:'""',backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,position:"absolute",bottom:o?0:i?"unset":G(-1),top:o?0:i?G(-1):"unset",[o?"width":"height"]:G(1),right:o?r==="left"?G(-1):"unset":0,left:o?r==="left"?"unset":G(-1):0}}}:a==="pills"?Rge(W5({borderRadius:u.fn.radius(n)},u.fn.hover({backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]})),{"&[data-active]":W5({backgroundColor:s.background,color:u.white},u.fn.hover({backgroundColor:s.background}))}):{}}var BHt=at((u,e,{variant:t})=>({tabLabel:{},tab:W5({position:"relative",padding:`${u.spacing.xs} ${u.spacing.md}`,paddingLeft:e.withIcon?u.spacing.xs:void 0,paddingRight:e.withRightSection?u.spacing.xs:void 0,fontSize:u.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:e.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":W5({opacity:.5,cursor:"not-allowed"},u.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},SHt(u,e,t)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:G(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:G(7)}}}));const wHt=BHt;var LHt=Object.defineProperty,zHt=Object.defineProperties,MHt=Object.getOwnPropertyDescriptors,iT=Object.getOwnPropertySymbols,qze=Object.prototype.hasOwnProperty,Jze=Object.prototype.propertyIsEnumerable,Ige=(u,e,t)=>e in u?LHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,THt=(u,e)=>{for(var t in e||(e={}))qze.call(e,t)&&Ige(u,t,e[t]);if(iT)for(var t of iT(e))Jze.call(e,t)&&Ige(u,t,e[t]);return u},NHt=(u,e)=>zHt(u,MHt(e)),PHt=(u,e)=>{var t={};for(var n in u)qze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&iT)for(var n of iT(u))e.indexOf(n)<0&&Jze.call(u,n)&&(t[n]=u[n]);return t};const RHt={},Zze=C.forwardRef((u,e)=>{const t=Qe("TabsTab",RHt,u),{value:n,children:i,onKeyDown:r,onClick:a,className:o,icon:s,rightSection:l,color:c}=t,d=PHt(t,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),h=Fne(),E=!!s,m=!!l,{theme:g,classes:f,cx:p}=wHt({withIcon:E||m&&!i,withRightSection:m||E&&!i,orientation:h.orientation,color:c||h.color,radius:h.radius,inverted:h.inverted,placement:h.placement},{name:"Tabs",unstyled:h.unstyled,classNames:h.classNames,styles:h.styles,variant:h.variant}),D=n===h.value,x=h.getPanelId(n),b=h.mountedPanelIds.includes(n)?x:void 0,k=A=>{h.onTabChange(h.allowTabDeactivation&&n===h.value?null:n),a==null||a(A)};return M.createElement(L4,NHt(THt({},d),{unstyled:h.unstyled,className:p(f.tab,o),"data-active":D||void 0,ref:e,type:"button",role:"tab",id:h.getTabId(n),"aria-selected":D,tabIndex:D||h.value===null?0:-1,"aria-controls":b,onClick:k,onKeyDown:Pue({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:h.activateTabWithKeyboard,loop:h.loop,dir:g.dir,orientation:h.orientation,onKeyDown:r})}),s&&M.createElement("span",{className:f.tabIcon},s),i&&M.createElement("span",{className:f.tabLabel},i),l&&M.createElement("span",{className:f.tabRightSection},l))});Zze.displayName="@mantine/core/Tab";function Yze({defaultValue:u,value:e,onTabChange:t,orientation:n,children:i,loop:r,id:a,activateTabWithKeyboard:o,allowTabDeactivation:s,variant:l,color:c,radius:d,inverted:h,placement:E,keepMounted:m=!0,classNames:g,styles:f,unstyled:p}){const D=Jl(a),[x,b]=C.useState([]),[k,A]=ps({value:e,defaultValue:u,finalValue:null,onChange:t});return M.createElement(Xjt,{value:{placement:E,value:k,orientation:n,id:D,loop:r,activateTabWithKeyboard:o,getTabId:NL(`${D}-tab`,TZ.value),getPanelId:NL(`${D}-panel`,TZ.value),onTabChange:A,setMountedPanelIds:b,mountedPanelIds:x,allowTabDeactivation:s,variant:l,color:c,radius:d,inverted:h,keepMounted:m,classNames:g,styles:f,unstyled:p}},i)}Yze.displayName="@mantine/core/TabsProvider";var IHt=at((u,{orientation:e,placement:t})=>({root:{display:e==="vertical"?"flex":void 0,flexDirection:t==="right"?"row-reverse":"row"}}));const OHt=IHt;var jHt=Object.defineProperty,HHt=Object.defineProperties,VHt=Object.getOwnPropertyDescriptors,rT=Object.getOwnPropertySymbols,Qze=Object.prototype.hasOwnProperty,Xze=Object.prototype.propertyIsEnumerable,Oge=(u,e,t)=>e in u?jHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$Ht=(u,e)=>{for(var t in e||(e={}))Qze.call(e,t)&&Oge(u,t,e[t]);if(rT)for(var t of rT(e))Xze.call(e,t)&&Oge(u,t,e[t]);return u},KHt=(u,e)=>HHt(u,VHt(e)),WHt=(u,e)=>{var t={};for(var n in u)Qze.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&rT)for(var n of rT(u))e.indexOf(n)<0&&Xze.call(u,n)&&(t[n]=u[n]);return t};const GHt={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},ri=C.forwardRef((u,e)=>{const t=Qe("Tabs",GHt,u),{defaultValue:n,value:i,orientation:r,loop:a,activateTabWithKeyboard:o,allowTabDeactivation:s,children:l,id:c,onTabChange:d,variant:h,color:E,className:m,unstyled:g,classNames:f,styles:p,radius:D,inverted:x,keepMounted:b,placement:k}=t,A=WHt(t,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:F,cx:S}=OHt({orientation:r,color:E,radius:D,inverted:x,placement:k},{unstyled:g,name:"Tabs",classNames:f,styles:p,variant:h});return M.createElement(Yze,{activateTabWithKeyboard:o,defaultValue:n,orientation:r,onTabChange:d,value:i,id:c,loop:a,allowTabDeactivation:s,color:E,variant:h,radius:D,inverted:x,keepMounted:b,placement:k,classNames:f,styles:p,unstyled:g},M.createElement(Ct,KHt($Ht({},A),{className:S(F.root,m),id:c,ref:e}),l))});ri.List=Kze;ri.Tab=Zze;ri.Panel=Uze;ri.displayName="@mantine/core/Tabs";var UHt=Object.defineProperty,qHt=Object.defineProperties,JHt=Object.getOwnPropertyDescriptors,jge=Object.getOwnPropertySymbols,ZHt=Object.prototype.hasOwnProperty,YHt=Object.prototype.propertyIsEnumerable,Hge=(u,e,t)=>e in u?UHt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,QHt=(u,e)=>{for(var t in e||(e={}))ZHt.call(e,t)&&Hge(u,t,e[t]);if(jge)for(var t of jge(e))YHt.call(e,t)&&Hge(u,t,e[t]);return u},XHt=(u,e)=>qHt(u,JHt(e));function eVt(u,e,t){return typeof u<"u"?u in t.headings.sizes?t.headings.sizes[u].fontSize:G(u):t.headings.sizes[e].fontSize}function tVt(u,e,t){return typeof u<"u"&&u in t.headings.sizes?t.headings.sizes[u].lineHeight:t.headings.sizes[e].lineHeight}var uVt=at((u,{element:e,weight:t,inline:n},{size:i})=>({root:XHt(QHt({},u.fn.fontStyles()),{fontFamily:u.headings.fontFamily,fontWeight:t||u.headings.sizes[e].fontWeight||u.headings.fontWeight,fontSize:eVt(i,e,u),lineHeight:n?1:tVt(i,e,u),margin:0})}));const nVt=uVt;var iVt=Object.defineProperty,aT=Object.getOwnPropertySymbols,eMe=Object.prototype.hasOwnProperty,tMe=Object.prototype.propertyIsEnumerable,Vge=(u,e,t)=>e in u?iVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,rVt=(u,e)=>{for(var t in e||(e={}))eMe.call(e,t)&&Vge(u,t,e[t]);if(aT)for(var t of aT(e))tMe.call(e,t)&&Vge(u,t,e[t]);return u},aVt=(u,e)=>{var t={};for(var n in u)eMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&aT)for(var n of aT(u))e.indexOf(n)<0&&tMe.call(u,n)&&(t[n]=u[n]);return t};const oVt={order:1},F0=C.forwardRef((u,e)=>{const t=Qe("Title",oVt,u),{className:n,order:i,children:r,unstyled:a,size:o,weight:s,inline:l,variant:c}=t,d=aVt(t,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:E}=nVt({element:`h${i}`,weight:s,inline:l},{name:"Title",unstyled:a,variant:c,size:o});return[1,2,3,4,5,6].includes(i)?M.createElement(_u,rVt({variant:c,component:`h${i}`,ref:e,className:E(h.root,n)},d),r):null});F0.displayName="@mantine/core/Title";const yne=C.createContext(null);yne.displayName="@mantine/modals/ModalsContext";function sVt(){const u=C.useContext(yne);if(!u)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return u}var lVt=Object.defineProperty,cVt=Object.defineProperties,dVt=Object.getOwnPropertyDescriptors,$ge=Object.getOwnPropertySymbols,hVt=Object.prototype.hasOwnProperty,EVt=Object.prototype.propertyIsEnumerable,Kge=(u,e,t)=>e in u?lVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,XV=(u,e)=>{for(var t in e||(e={}))hVt.call(e,t)&&Kge(u,t,e[t]);if($ge)for(var t of $ge(e))EVt.call(e,t)&&Kge(u,t,e[t]);return u},Wge=(u,e)=>cVt(u,dVt(e));function mVt({id:u,cancelProps:e,confirmProps:t,labels:n={cancel:"",confirm:""},closeOnConfirm:i=!0,closeOnCancel:r=!0,groupProps:a,onCancel:o,onConfirm:s,children:l}){const{cancel:c,confirm:d}=n,h=sVt(),E=g=>{typeof(e==null?void 0:e.onClick)=="function"&&(e==null||e.onClick(g)),typeof o=="function"&&o(),r&&h.closeModal(u)},m=g=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(g)),typeof s=="function"&&s(),i&&h.closeModal(u)};return M.createElement(M.Fragment,null,l&&M.createElement(Ct,{mb:"md"},l),M.createElement(zi,XV({position:"right"},a),M.createElement(xl,Wge(XV({variant:"default"},e),{onClick:E}),(e==null?void 0:e.children)||c),M.createElement(xl,Wge(XV({},t),{onClick:m}),(t==null?void 0:t.children)||d)))}function Gge(u,e){var t,n,i,r;e&&u.type==="confirm"&&((n=(t=u.props).onCancel)==null||n.call(t)),(r=(i=u.props).onClose)==null||r.call(i)}function gVt(u,e){switch(e.type){case"OPEN":return{current:e.modal,modals:[...u.modals,e.modal]};case"CLOSE":{const t=u.modals.find(i=>i.id===e.modalId);if(!t)return u;Gge(t,e.canceled);const n=u.modals.filter(i=>i.id!==e.modalId);return{current:n[n.length-1]||u.current,modals:n}}case"CLOSE_ALL":return u.modals.length?(u.modals.concat().reverse().forEach(t=>{Gge(t,e.canceled)}),{current:u.current,modals:[]}):u;default:return u}}const[fVt,o7]=B9e("mantine-modals"),pVt=o7("openModal"),DVt=o7("closeModal"),xVt=o7("closeAllModals"),vVt=o7("openConfirmModal"),CVt=u=>o7("openContextModal")(u),Ane={open:pVt,close:DVt,closeAll:xVt,openConfirmModal:vVt,openContextModal:CVt};var bVt=Object.defineProperty,kVt=Object.defineProperties,FVt=Object.getOwnPropertyDescriptors,oT=Object.getOwnPropertySymbols,uMe=Object.prototype.hasOwnProperty,nMe=Object.prototype.propertyIsEnumerable,Uge=(u,e,t)=>e in u?bVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,V8=(u,e)=>{for(var t in e||(e={}))uMe.call(e,t)&&Uge(u,t,e[t]);if(oT)for(var t of oT(e))nMe.call(e,t)&&Uge(u,t,e[t]);return u},qge=(u,e)=>kVt(u,FVt(e)),ff=(u,e)=>{var t={};for(var n in u)uMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&oT)for(var n of oT(u))e.indexOf(n)<0&&nMe.call(u,n)&&(t[n]=u[n]);return t};function yVt(u){if(!u)return{confirmProps:{},modalProps:{}};const e=u,{id:t,children:n,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:l,groupProps:c,labels:d}=e,h=ff(e,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:t,children:n,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:V8({id:t},h)}}function AVt({children:u,modalProps:e,labels:t,modals:n}){const[i,r]=C.useReducer(gVt,{modals:[],current:null}),a=C.useRef(i);a.current=i;const o=C.useCallback(f=>{r({type:"CLOSE_ALL",canceled:f})},[a,r]),s=C.useCallback(f=>{var p=f,{modalId:D}=p,x=ff(p,["modalId"]);const b=D||i4();return r({type:"OPEN",modal:{id:b,type:"content",props:x}}),b},[r]),l=C.useCallback(f=>{var p=f,{modalId:D}=p,x=ff(p,["modalId"]);const b=D||i4();return r({type:"OPEN",modal:{id:b,type:"confirm",props:x}}),b},[r]),c=C.useCallback((f,p)=>{var D=p,{modalId:x}=D,b=ff(D,["modalId"]);const k=x||i4();return r({type:"OPEN",modal:{id:k,type:"context",props:b,ctx:f}}),k},[r]),d=C.useCallback((f,p)=>{r({type:"CLOSE",modalId:f,canceled:p})},[a,r]);fVt({openModal:s,openConfirmModal:l,openContextModal:f=>{var p=f,{modal:D}=p,x=ff(p,["modal"]);return c(D,x)},closeModal:d,closeContextModal:d,closeAllModals:o});const h={modals:i.modals,openModal:s,openConfirmModal:l,openContextModal:c,closeModal:d,closeContextModal:d,closeAll:o},E=()=>{const f=a.current.current;switch(f==null?void 0:f.type){case"context":{const p=f.props,{innerProps:D}=p,x=ff(p,["innerProps"]),b=n[f.ctx];return{modalProps:x,content:M.createElement(b,{innerProps:D,context:h,id:f.id})}}case"confirm":{const{modalProps:p,confirmProps:D}=yVt(f.props);return{modalProps:p,content:M.createElement(mVt,qge(V8({},D),{id:f.id,labels:f.props.labels||t}))}}case"content":{const p=f.props,{children:D}=p;return{modalProps:ff(p,["children"]),content:M.createElement(M.Fragment,null,D)}}default:return{modalProps:{},content:null}}},{modalProps:m,content:g}=E();return M.createElement(yne.Provider,{value:h},M.createElement(Wi,qge(V8(V8({zIndex:fd("modal")+1},e),m),{opened:i.modals.length>0,onClose:()=>d(i.current.id)}),g),u)}function NZ(u,e){return NZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},NZ(u,e)}function iMe(u,e){u.prototype=Object.create(e.prototype),u.prototype.constructor=u,NZ(u,e)}var rMe={exports:{}},_Vt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",SVt=_Vt,BVt=SVt;function aMe(){}function oMe(){}oMe.resetWarningCache=aMe;var wVt=function(){function u(n,i,r,a,o,s){if(s!==BVt){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}u.isRequired=u;function e(){return u}var t={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:e,element:u,elementType:u,instanceOf:e,node:u,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:oMe,resetWarningCache:aMe};return t.PropTypes=t,t};rMe.exports=wVt();var LVt=rMe.exports;const Qg=Hl(LVt),Jge={disabled:!1},sT=M.createContext(null);var Ib="unmounted",pf="exited",Df="entering",e5="entered",PZ="exiting",N4=function(u){iMe(e,u);function e(n,i){var r;r=u.call(this,n,i)||this;var a=i,o=a&&!a.isMounting?n.enter:n.appear,s;return r.appearStatus=null,n.in?o?(s=pf,r.appearStatus=Df):s=e5:n.unmountOnExit||n.mountOnEnter?s=Ib:s=pf,r.state={status:s},r.nextCallback=null,r}e.getDerivedStateFromProps=function(i,r){var a=i.in;return a&&r.status===Ib?{status:pf}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(i){var r=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Df&&a!==e5&&(r=Df):(a===Df||a===e5)&&(r=PZ)}this.updateStatus(!1,r)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var i=this.props.timeout,r,a,o;return r=a=o=i,i!=null&&typeof i!="number"&&(r=i.exit,a=i.enter,o=i.appear!==void 0?i.appear:a),{exit:r,enter:a,appear:o}},t.updateStatus=function(i,r){i===void 0&&(i=!1),r!==null?(this.cancelNextCallback(),r===Df?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===pf&&this.setState({status:Ib})},t.performEnter=function(i){var r=this,a=this.props.enter,o=this.context?this.context.isMounting:i,s=this.props.nodeRef?[o]:[zx.findDOMNode(this),o],l=s[0],c=s[1],d=this.getTimeouts(),h=o?d.appear:d.enter;if(!i&&!a||Jge.disabled){this.safeSetState({status:e5},function(){r.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:Df},function(){r.props.onEntering(l,c),r.onTransitionEnd(h,function(){r.safeSetState({status:e5},function(){r.props.onEntered(l,c)})})})},t.performExit=function(){var i=this,r=this.props.exit,a=this.getTimeouts(),o=this.props.nodeRef?void 0:zx.findDOMNode(this);if(!r||Jge.disabled){this.safeSetState({status:pf},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:PZ},function(){i.props.onExiting(o),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:pf},function(){i.props.onExited(o)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(i,r){r=this.setNextCallback(r),this.setState(i,r)},t.setNextCallback=function(i){var r=this,a=!0;return this.nextCallback=function(o){a&&(a=!1,r.nextCallback=null,i(o))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},t.onTransitionEnd=function(i,r){this.setNextCallback(r);var a=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}i!=null&&setTimeout(this.nextCallback,i)},t.render=function(){var i=this.state.status;if(i===Ib)return null;var r=this.props,a=r.children;r.in,r.mountOnEnter,r.unmountOnExit,r.appear,r.enter,r.exit,r.timeout,r.addEndListener,r.onEnter,r.onEntering,r.onEntered,r.onExit,r.onExiting,r.onExited,r.nodeRef;var o=Mwe(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return M.createElement(sT.Provider,{value:null},typeof a=="function"?a(i,o):M.cloneElement(M.Children.only(a),o))},e}(M.Component);N4.contextType=sT;N4.propTypes={};function PD(){}N4.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:PD,onEntering:PD,onEntered:PD,onExit:PD,onExiting:PD,onExited:PD};N4.UNMOUNTED=Ib;N4.EXITED=pf;N4.ENTERING=Df;N4.ENTERED=e5;N4.EXITING=PZ;const zVt=N4;function MVt(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function _ne(u,e){var t=function(r){return e&&C.isValidElement(r)?e(r):r},n=Object.create(null);return u&&C.Children.map(u,function(i){return i}).forEach(function(i){n[i.key]=t(i)}),n}function TVt(u,e){u=u||{},e=e||{};function t(c){return c in e?e[c]:u[c]}var n=Object.create(null),i=[];for(var r in u)r in e?i.length&&(n[r]=i,i=[]):i.push(r);var a,o={};for(var s in e){if(n[s])for(a=0;ae in u?UVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Qge=(u,e)=>{for(var t in e||(e={}))qVt.call(e,t)&&Yge(u,t,e[t]);if(Zge)for(var t of Zge(e))JVt.call(e,t)&&Yge(u,t,e[t]);return u};const Xge={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},ZVt={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function YVt({state:u,maxHeight:e,positioning:t,transitionDuration:n}){const[i,r]=t,a=r==="center"?`${i}-center`:r,o={opacity:0,maxHeight:e,transform:Xge[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},s={opacity:1,transform:ZVt[a]},l={opacity:0,maxHeight:0,transform:Xge[a]},c={entering:s,entered:s,exiting:l,exited:l};return Qge(Qge({},o),c[u])}function QVt(u,e){return typeof e=="number"?e:e===!1||u===!1?!1:u}var XVt=Object.defineProperty,e$t=Object.defineProperties,t$t=Object.getOwnPropertyDescriptors,lT=Object.getOwnPropertySymbols,sMe=Object.prototype.hasOwnProperty,lMe=Object.prototype.propertyIsEnumerable,efe=(u,e,t)=>e in u?XVt(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,tfe=(u,e)=>{for(var t in e||(e={}))sMe.call(e,t)&&efe(u,t,e[t]);if(lT)for(var t of lT(e))lMe.call(e,t)&&efe(u,t,e[t]);return u},u$t=(u,e)=>e$t(u,t$t(e)),ufe=(u,e)=>{var t={};for(var n in u)sMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&lT)for(var n of lT(u))e.indexOf(n)<0&&lMe.call(u,n)&&(t[n]=u[n]);return t};function cMe(u){var e=u,{notification:t,autoClose:n,onHide:i,innerRef:r}=e,a=ufe(e,["notification","autoClose","onHide","innerRef"]);const o=t,{autoClose:s,message:l}=o,c=ufe(o,["autoClose","message"]),d=QVt(n,s),h=C.useRef(),E=()=>{i(t.id),window.clearTimeout(h.current)},m=()=>{clearTimeout(h.current)},g=()=>{typeof d=="number"&&(h.current=window.setTimeout(E,d))};return C.useEffect(()=>{typeof t.onOpen=="function"&&t.onOpen(t)},[]),C.useEffect(()=>(g(),m),[n,t.autoClose]),M.createElement(CLe,u$t(tfe(tfe({},c),a),{onClose:E,onMouseEnter:m,onMouseLeave:g,ref:r}),l)}cMe.displayName="@mantine/notifications/NotificationContainer";var n$t=at((u,{zIndex:e})=>({notifications:{width:`calc(100% - ${u.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:e},notification:{"&:not(:first-of-type)":{marginTop:u.spacing.sm}}}));const i$t=n$t;var r$t=Object.defineProperty,a$t=Object.defineProperties,o$t=Object.getOwnPropertyDescriptors,nfe=Object.getOwnPropertySymbols,s$t=Object.prototype.hasOwnProperty,l$t=Object.prototype.propertyIsEnumerable,ife=(u,e,t)=>e in u?r$t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,c$t=(u,e)=>{for(var t in e||(e={}))s$t.call(e,t)&&ife(u,t,e[t]);if(nfe)for(var t of nfe(e))l$t.call(e,t)&&ife(u,t,e[t]);return u},d$t=(u,e)=>a$t(u,o$t(e));function h$t({limit:u}){const{state:e,queue:t,update:n,cleanQueue:i}=Xkt({initialValues:[],limit:u});return{notifications:e,queue:t,showNotification:l=>{const c=l.id||i4();return n(d=>l.id&&d.some(h=>h.id===l.id)?d:[...d,d$t(c$t({},l),{id:c})]),c},updateNotification:l=>n(c=>{const d=c.findIndex(E=>E.id===l.id);if(d===-1)return c;const h=[...c];return h[d]=l,h}),hideNotification:l=>n(c=>c.filter(d=>d.id===l?(typeof d.onClose=="function"&&d.onClose(d),!1):!0)),cleanQueue:i,clean:()=>n(()=>[])}}var E$t=Object.defineProperty,cT=Object.getOwnPropertySymbols,dMe=Object.prototype.hasOwnProperty,hMe=Object.prototype.propertyIsEnumerable,rfe=(u,e,t)=>e in u?E$t(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,e$=(u,e)=>{for(var t in e||(e={}))dMe.call(e,t)&&rfe(u,t,e[t]);if(cT)for(var t of cT(e))hMe.call(e,t)&&rfe(u,t,e[t]);return u},m$t=(u,e)=>{var t={};for(var n in u)dMe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&cT)for(var n of cT(u))e.indexOf(n)<0&&hMe.call(u,n)&&(t[n]=u[n]);return t};const g$t=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],Yp=u=>{var e=u,{className:t,position:n="bottom-right",autoClose:i=4e3,transitionDuration:r=250,containerWidth:a=G(440),notificationMaxHeight:o=G(200),limit:s=5,zIndex:l=fd("overlay"),style:c,children:d,target:h}=e,E=m$t(e,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const m=qkt(),g=C.useRef({}),f=C.useRef(0),{notifications:p,showNotification:D,updateNotification:x,hideNotification:b,clean:k,cleanQueue:A}=h$t({limit:s}),{classes:F,cx:S,theme:w}=i$t({zIndex:l}),z=QA(),O=(w.respectReducedMotion?z:!1)?1:r,y=(g$t.includes(n)?n:"bottom-right").split("-");To(()=>{p.length>f.current&&setTimeout(()=>m(),0),f.current=p.length},[p]),jVt({show:D,hide:b,update:x,clean:k,cleanQueue:A});const _=p.map(L=>M.createElement(zVt,{key:L.id,timeout:O,onEnter:()=>g.current[L.id].offsetHeight,nodeRef:{current:g.current[L.id]}},T=>M.createElement(cMe,{innerRef:R=>{g.current[L.id]=R},notification:L,onHide:b,className:F.notification,autoClose:i,sx:[e$({},YVt({state:T,positioning:y,transitionDuration:O,maxHeight:o})),...Array.isArray(L.sx)?L.sx:[L.sx]]})));return M.createElement(Zue,{target:h},M.createElement(Ct,e$({className:S(F.notifications,t),style:c,sx:e$({maxWidth:a},GVt(y,w.spacing.md))},E),M.createElement(OVt,null,_)))};Yp.displayName="@mantine/notifications/Notifications";Yp.show=c1.show;Yp.hide=c1.hide;Yp.update=c1.update;Yp.clean=c1.clean;Yp.cleanQueue=c1.cleanQueue;let Uo=[],Bne=(u,e)=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},l:e||0,lc:0,listen(i,r){return n.lc=t.push(i,r||n.l)/2,()=>{let a=t.indexOf(i);~a&&(t.splice(a,2),--n.lc||n.off())}},notify(i){let r=!Uo.length;for(let a=0;a(u.events=u.events||{},u.events[t+tS]||(u.events[t+tS]=n(i=>{u.events[t].reduceRight((r,a)=>(a(r),r),{shared:{},...i})})),u.events[t]=u.events[t]||[],u.events[t].push(e),()=>{let i=u.events[t],r=i.indexOf(e);i.splice(r,1),i.length||(delete u.events[t],u.events[t+tS](),delete u.events[t+tS])}),D$t=1e3,EMe=(u,e)=>p$t(u,n=>{let i=e(n);i&&u.events[eS].push(i)},f$t,n=>{let i=u.listen;u.listen=(...a)=>(!u.lc&&!u.active&&(u.active=!0,n()),i(...a));let r=u.off;return u.events[eS]=[],u.off=()=>{r(),setTimeout(()=>{if(u.active&&!u.lc){u.active=!1;for(let a of u.events[eS])a();u.events[eS]=[]}},D$t)},()=>{u.listen=i,u.off=r}});function x$t(u,e,t){let n=new Set([...e,void 0]);return u.listen((i,r)=>{n.has(r)&&t(i,r)})}let mMe=(u={})=>{let e=Bne(u);return e.setKey=function(t,n){typeof n>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==n&&(e.value={...e.value,[t]:n},e.notify(t))},e};function V0(u,e={}){let t=C.useCallback(i=>e.keys?x$t(u,e.keys,i):u.listen(i),[e.keys,u]),n=u.get.bind(u);return C.useSyncExternalStore(t,n,n)}class P6{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ty=typeof window>"u"||"Deno"in window;function al(){}function v$t(u,e){return typeof u=="function"?u(e):u}function RZ(u){return typeof u=="number"&&u>=0&&u!==1/0}function gMe(u,e){return Math.max(u+(e||0)-Date.now(),0)}function Ob(u,e,t){return l7(u)?typeof e=="function"?{...t,queryKey:u,queryFn:e}:{...e,queryKey:u}:u}function C$t(u,e,t){return l7(u)?typeof e=="function"?{...t,mutationKey:u,mutationFn:e}:{...e,mutationKey:u}:typeof u=="function"?{...e,mutationFn:u}:{...u}}function mE(u,e,t){return l7(u)?[{...e,queryKey:u},t]:[u||{},e]}function afe(u,e){const{type:t="all",exact:n,fetchStatus:i,predicate:r,queryKey:a,stale:o}=u;if(l7(a)){if(n){if(e.queryHash!==wne(a,e.options))return!1}else if(!dT(e.queryKey,a))return!1}if(t!=="all"){const s=e.isActive();if(t==="active"&&!s||t==="inactive"&&s)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||typeof i<"u"&&i!==e.state.fetchStatus||r&&!r(e))}function ofe(u,e){const{exact:t,fetching:n,predicate:i,mutationKey:r}=u;if(l7(r)){if(!e.options.mutationKey)return!1;if(t){if(Yf(e.options.mutationKey)!==Yf(r))return!1}else if(!dT(e.options.mutationKey,r))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function wne(u,e){return((e==null?void 0:e.queryKeyHashFn)||Yf)(u)}function Yf(u){return JSON.stringify(u,(e,t)=>IZ(t)?Object.keys(t).sort().reduce((n,i)=>(n[i]=t[i],n),{}):t)}function dT(u,e){return fMe(u,e)}function fMe(u,e){return u===e?!0:typeof u!=typeof e?!1:u&&e&&typeof u=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!fMe(u[t],e[t])):!1}function pMe(u,e){if(u===e)return u;const t=sfe(u)&&sfe(e);if(t||IZ(u)&&IZ(e)){const n=t?u.length:Object.keys(u).length,i=t?e:Object.keys(e),r=i.length,a=t?[]:{};let o=0;for(let s=0;s"u")return!0;const t=e.prototype;return!(!lfe(t)||!t.hasOwnProperty("isPrototypeOf"))}function lfe(u){return Object.prototype.toString.call(u)==="[object Object]"}function l7(u){return Array.isArray(u)}function DMe(u){return new Promise(e=>{setTimeout(e,u)})}function cfe(u){DMe(0).then(u)}function b$t(){if(typeof AbortController=="function")return new AbortController}function OZ(u,e,t){return t.isDataEqual!=null&&t.isDataEqual(u,e)?u:typeof t.structuralSharing=="function"?t.structuralSharing(u,e):t.structuralSharing!==!1?pMe(u,e):e}class k$t extends P6{constructor(){super(),this.setup=e=>{if(!ty&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ET=new k$t,dfe=["online","offline"];class F$t extends P6{constructor(){super(),this.setup=e=>{if(!ty&&window.addEventListener){const t=()=>e();return dfe.forEach(n=>{window.addEventListener(n,t,!1)}),()=>{dfe.forEach(n=>{window.removeEventListener(n,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const mT=new F$t;function y$t(u){return Math.min(1e3*2**u,3e4)}function VI(u){return(u??"online")==="online"?mT.isOnline():!0}class xMe{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function $8(u){return u instanceof xMe}function vMe(u){let e=!1,t=0,n=!1,i,r,a;const o=new Promise((f,p)=>{r=f,a=p}),s=f=>{n||(E(new xMe(f)),u.abort==null||u.abort())},l=()=>{e=!0},c=()=>{e=!1},d=()=>!ET.isFocused()||u.networkMode!=="always"&&!mT.isOnline(),h=f=>{n||(n=!0,u.onSuccess==null||u.onSuccess(f),i==null||i(),r(f))},E=f=>{n||(n=!0,u.onError==null||u.onError(f),i==null||i(),a(f))},m=()=>new Promise(f=>{i=p=>{const D=n||!d();return D&&f(p),D},u.onPause==null||u.onPause()}).then(()=>{i=void 0,n||u.onContinue==null||u.onContinue()}),g=()=>{if(n)return;let f;try{f=u.fn()}catch(p){f=Promise.reject(p)}Promise.resolve(f).then(h).catch(p=>{var D,x;if(n)return;const b=(D=u.retry)!=null?D:3,k=(x=u.retryDelay)!=null?x:y$t,A=typeof k=="function"?k(t,p):k,F=b===!0||typeof b=="number"&&t{if(d())return m()}).then(()=>{e?E(p):g()})})};return VI(u.networkMode)?g():m().then(g),{promise:o,cancel:s,continue:()=>(i==null?void 0:i())?o:Promise.resolve(),cancelRetry:l,continueRetry:c}}const Lne=console;function A$t(){let u=[],e=0,t=c=>{c()},n=c=>{c()};const i=c=>{let d;e++;try{d=c()}finally{e--,e||o()}return d},r=c=>{e?u.push(c):cfe(()=>{t(c)})},a=c=>(...d)=>{r(()=>{c(...d)})},o=()=>{const c=u;u=[],c.length&&cfe(()=>{n(()=>{c.forEach(d=>{t(d)})})})};return{batch:i,batchCalls:a,schedule:r,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{n=c}}}const gr=A$t();class CMe{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),RZ(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(ty?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class _$t extends CMe{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||Lne,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||S$t(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,t){const n=OZ(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return(t=this.retryer)==null||t.cancel(e),n?n.then(al).catch(al):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!gMe(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var r;return(r=this.retryer)==null||r.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(m=>m.options.queryFn);E&&this.setOptions(E.options)}Array.isArray(this.options.queryKey);const a=b$t(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},s=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};s(o);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(s(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const h=E=>{if($8(E)&&E.silent||this.dispatch({type:"error",error:E}),!$8(E)){var m,g,f,p;(m=(g=this.cache.config).onError)==null||m.call(g,E,this),(f=(p=this.cache.config).onSettled)==null||f.call(p,this.state.data,E,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=vMe({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:E=>{var m,g,f,p;if(typeof E>"u"){h(new Error(this.queryHash+" data is undefined"));return}this.setData(E),(m=(g=this.cache.config).onSuccess)==null||m.call(g,E,this),(f=(p=this.cache.config).onSettled)==null||f.call(p,E,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(E,m)=>{this.dispatch({type:"failed",failureCount:E,error:m})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const t=n=>{var i,r;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:VI(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(r=e.dataUpdatedAt)!=null?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return $8(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function S$t(u){const e=typeof u.initialData=="function"?u.initialData():u.initialData,t=typeof e<"u",n=t?typeof u.initialDataUpdatedAt=="function"?u.initialDataUpdatedAt():u.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"loading",fetchStatus:"idle"}}class B$t extends P6{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var i;const r=t.queryKey,a=(i=t.queryHash)!=null?i:wne(r,t);let o=this.get(a);return o||(o=new _$t({cache:this,logger:e.getLogger(),queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){gr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=mE(e,t);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>afe(n,i))}findAll(e,t){const[n]=mE(e,t);return Object.keys(n).length>0?this.queries.filter(i=>afe(n,i)):this.queries}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){gr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){gr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class w$t extends CMe{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||Lne,this.observers=[],this.state=e.state||bMe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return(e=(t=this.retryer)==null?void 0:t.continue())!=null?e:this.execute()}async execute(){const e=()=>{var F;return this.retryer=vMe({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,w)=>{this.dispatch({type:"failed",failureCount:S,error:w})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(F=this.options.retry)!=null?F:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t=this.state.status==="loading";try{var n,i,r,a,o,s,l,c;if(!t){var d,h,E,m;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(h=this.mutationCache.config).onMutate)==null?void 0:d.call(h,this.state.variables,this));const S=await((E=(m=this.options).onMutate)==null?void 0:E.call(m,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const F=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,F,this.state.variables,this.state.context,this)),await((r=(a=this.options).onSuccess)==null?void 0:r.call(a,F,this.state.variables,this.state.context)),await((o=(s=this.mutationCache.config).onSettled)==null?void 0:o.call(s,F,null,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,F,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:F}),F}catch(F){try{var g,f,p,D,x,b,k,A;throw await((g=(f=this.mutationCache.config).onError)==null?void 0:g.call(f,F,this.state.variables,this.state.context,this)),await((p=(D=this.options).onError)==null?void 0:p.call(D,F,this.state.variables,this.state.context)),await((x=(b=this.mutationCache.config).onSettled)==null?void 0:x.call(b,void 0,F,this.state.variables,this.state.context,this)),await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,F,this.state.variables,this.state.context)),F}finally{this.dispatch({type:"error",error:F})}}}dispatch(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!VI(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=t(this.state),gr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function bMe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class L$t extends P6{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const i=new w$t({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){gr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(t=>ofe(e,t))}findAll(e){return this.mutations.filter(t=>ofe(e,t))}notify(e){gr.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const t=this.mutations.filter(n=>n.state.isPaused);return gr.batch(()=>t.reduce((n,i)=>n.then(()=>i.continue().catch(al)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function z$t(){return{onFetch:u=>{u.fetchFn=()=>{var e,t,n,i,r,a;const o=(e=u.fetchOptions)==null||(t=e.meta)==null?void 0:t.refetchPage,s=(n=u.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,l=s==null?void 0:s.pageParam,c=(s==null?void 0:s.direction)==="forward",d=(s==null?void 0:s.direction)==="backward",h=((r=u.state.data)==null?void 0:r.pages)||[],E=((a=u.state.data)==null?void 0:a.pageParams)||[];let m=E,g=!1;const f=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>{var F;if((F=u.signal)!=null&&F.aborted)g=!0;else{var S;(S=u.signal)==null||S.addEventListener("abort",()=>{g=!0})}return u.signal}})},p=u.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+u.options.queryHash+"'")),D=(A,F,S,w)=>(m=w?[F,...m]:[...m,F],w?[S,...A]:[...A,S]),x=(A,F,S,w)=>{if(g)return Promise.reject("Cancelled");if(typeof S>"u"&&!F&&A.length)return Promise.resolve(A);const z={queryKey:u.queryKey,pageParam:S,meta:u.options.meta};f(z);const N=p(z);return Promise.resolve(N).then(y=>D(A,S,y,w))};let b;if(!h.length)b=x([]);else if(c){const A=typeof l<"u",F=A?l:hfe(u.options,h);b=x(h,A,F)}else if(d){const A=typeof l<"u",F=A?l:M$t(u.options,h);b=x(h,A,F,!0)}else{m=[];const A=typeof u.options.getNextPageParam>"u";b=(o&&h[0]?o(h[0],0,h):!0)?x([],A,E[0]):Promise.resolve(D([],E[0],h[0]));for(let S=1;S{if(o&&h[S]?o(h[S],S,h):!0){const N=A?E[S]:hfe(u.options,w);return x(w,A,N)}return Promise.resolve(D(w,E[S],h[S]))})}return b.then(A=>({pages:A,pageParams:m}))}}}}function hfe(u,e){return u.getNextPageParam==null?void 0:u.getNextPageParam(e[e.length-1],e)}function M$t(u,e){return u.getPreviousPageParam==null?void 0:u.getPreviousPageParam(e[0],e)}class T$t{constructor(e={}){this.queryCache=e.queryCache||new B$t,this.mutationCache=e.mutationCache||new L$t,this.logger=e.logger||Lne,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ET.subscribe(()=>{ET.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=mT.subscribe(()=>{mT.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(t=this.unsubscribeOnline)==null||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=mE(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state.data}ensureQueryData(e,t,n){const i=Ob(e,t,n),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.queryCache.find(e),r=i==null?void 0:i.state.data,a=v$t(t,r);if(typeof a>"u")return;const o=Ob(e),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return gr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state}removeQueries(e,t){const[n]=mE(e,t),i=this.queryCache;gr.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(e,t,n){const[i,r]=mE(e,t,n),a=this.queryCache,o={type:"active",...i};return gr.batch(()=>(a.findAll(i).forEach(s=>{s.reset()}),this.refetchQueries(o,r)))}cancelQueries(e,t,n){const[i,r={}]=mE(e,t,n);typeof r.revert>"u"&&(r.revert=!0);const a=gr.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(r)));return Promise.all(a).then(al).catch(al)}invalidateQueries(e,t,n){const[i,r]=mE(e,t,n);return gr.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const s={...i,type:(a=(o=i.refetchType)!=null?o:i.type)!=null?a:"active"};return this.refetchQueries(s,r)})}refetchQueries(e,t,n){const[i,r]=mE(e,t,n),a=gr.batch(()=>this.queryCache.findAll(i).filter(s=>!s.isDisabled()).map(s=>{var l;return s.fetch(void 0,{...r,cancelRefetch:(l=r==null?void 0:r.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(al);return r!=null&&r.throwOnError||(o=o.catch(al)),o}fetchQuery(e,t,n){const i=Ob(e,t,n),r=this.defaultQueryOptions(i);typeof r.retry>"u"&&(r.retry=!1);const a=this.queryCache.build(this,r);return a.isStaleByTime(r.staleTime)?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(al).catch(al)}fetchInfiniteQuery(e,t,n){const i=Ob(e,t,n);return i.behavior=z$t(),this.fetchQuery(i)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(al).catch(al)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(i=>Yf(e)===Yf(i.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(n=>dT(e,n.queryKey));return t==null?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(i=>Yf(e)===Yf(i.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(n=>dT(e,n.mutationKey));return t==null?void 0:t.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=wne(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.useErrorBoundary>"u"&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class N$t extends P6{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Efe(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jZ(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jZ(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),hT(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const r=this.hasListeners();r&&mfe(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(t),r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return R$t(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(al)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),ty||this.currentResult.isStale||!RZ(this.options.staleTime))return;const t=gMe(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(ty||this.options.enabled===!1||!RZ(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ET.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,i=this.options,r=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,s=e!==n,l=s?e.state:this.currentQueryInitialState,c=s?this.currentResult:this.previousQueryResult,{state:d}=e;let{dataUpdatedAt:h,error:E,errorUpdatedAt:m,fetchStatus:g,status:f}=d,p=!1,D=!1,x;if(t._optimisticResults){const S=this.hasListeners(),w=!S&&Efe(e,t),z=S&&mfe(e,n,t,i);(w||z)&&(g=VI(e.options.networkMode)?"fetching":"paused",h||(f="loading")),t._optimisticResults==="isRestoring"&&(g="idle")}if(t.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&f!=="error")x=c.data,h=c.dataUpdatedAt,f=c.status,p=!0;else if(t.select&&typeof d.data<"u")if(r&&d.data===(a==null?void 0:a.data)&&t.select===this.selectFn)x=this.selectResult;else try{this.selectFn=t.select,x=t.select(d.data),x=OZ(r==null?void 0:r.data,x,t),this.selectResult=x,this.selectError=null}catch(S){this.selectError=S}else x=d.data;if(typeof t.placeholderData<"u"&&typeof x>"u"&&f==="loading"){let S;if(r!=null&&r.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData))S=r.data;else if(S=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof S<"u")try{S=t.select(S),this.selectError=null}catch(w){this.selectError=w}typeof S<"u"&&(f="success",x=OZ(r==null?void 0:r.data,S,t),D=!0)}this.selectError&&(E=this.selectError,x=this.selectResult,m=Date.now(),f="error");const b=g==="fetching",k=f==="loading",A=f==="error";return{status:f,fetchStatus:g,isLoading:k,isSuccess:f==="success",isError:A,isInitialLoading:k&&b,data:x,dataUpdatedAt:h,error:E,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!k,isLoadingError:A&&d.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:D,isPreviousData:p,isRefetchError:A&&d.dataUpdatedAt!==0,isStale:zne(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,hT(n,t))return;this.currentResult=n;const i={cache:!0},r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.trackedProps.size)return!0;const s=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&s.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==t[c]&&s.has(c)})};(e==null?void 0:e.listeners)!==!1&&r()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!$8(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){gr.batch(()=>{if(e.onSuccess){var t,n,i,r;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(i=(r=this.options).onSettled)==null||i.call(r,this.currentResult.data,null)}else if(e.onError){var a,o,s,l;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(s=(l=this.options).onSettled)==null||s.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function P$t(u,e){return e.enabled!==!1&&!u.state.dataUpdatedAt&&!(u.state.status==="error"&&e.retryOnMount===!1)}function Efe(u,e){return P$t(u,e)||u.state.dataUpdatedAt>0&&jZ(u,e,e.refetchOnMount)}function jZ(u,e,t){if(e.enabled!==!1){const n=typeof t=="function"?t(u):t;return n==="always"||n!==!1&&zne(u,e)}return!1}function mfe(u,e,t,n){return t.enabled!==!1&&(u!==e||n.enabled===!1)&&(!t.suspense||u.state.status!=="error")&&zne(u,t)}function zne(u,e){return u.isStaleByTime(e.staleTime)}function R$t(u,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!hT(u.getCurrentResult(),e)}let I$t=class extends P6{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),hT(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:bMe(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){gr.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,n,i,r;(t=(n=this.mutateOptions).onSuccess)==null||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(r=this.mutateOptions).onSettled)==null||i.call(r,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,o,s,l;(a=(o=this.mutateOptions).onError)==null||a.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(s=(l=this.mutateOptions).onSettled)==null||s.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)})})}};var kMe={exports:{}},FMe={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -847,7 +847,7 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};class IMe{constructor(e,t="GraphQL request",n={line:1,column:1}){typeof e=="string"||In(!1,`Body must be a string. Received: ${Tt(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||In(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||In(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function jKt(u){return pd(u,IMe)}function Bg(u,e){return new OMe(u,e).parseDocument()}function HKt(u,e){const t=new OMe(u,e);t.expectToken(Oe.SOF);const n=t.parseValueLiteral(!1);return t.expectToken(Oe.EOF),n}class OMe{constructor(e,t={}){const n=jKt(e)?e:new IMe(e);this._lexer=new kKt(n),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Oe.NAME);return this.node(e,{kind:De.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:De.DOCUMENT,definitions:this.many(Oe.SOF,this.parseDefinition,Oe.EOF)})}parseDefinition(){if(this.peek(Oe.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Oe.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ma(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Oe.BRACE_L))return this.node(e,{kind:De.OPERATION_DEFINITION,operation:vl.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(Oe.NAME)&&(n=this.parseName()),this.node(e,{kind:De.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Oe.NAME);switch(e.value){case"query":return vl.QUERY;case"mutation":return vl.MUTATION;case"subscription":return vl.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Oe.PAREN_L,this.parseVariableDefinition,Oe.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:De.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Oe.DOLLAR),this.node(e,{kind:De.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:De.SELECTION_SET,selections:this.many(Oe.BRACE_L,this.parseSelection,Oe.BRACE_R)})}parseSelection(){return this.peek(Oe.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,i;return this.expectOptionalToken(Oe.COLON)?(n=t,i=this.parseName()):i=t,this.node(e,{kind:De.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.PAREN_L,t,Oe.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(t,{kind:De.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Oe.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Oe.NAME)?this.node(e,{kind:De.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:De.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Oe.BRACKET_L:return this.parseList(e);case Oe.BRACE_L:return this.parseObject(e);case Oe.INT:return this.advanceLexer(),this.node(t,{kind:De.INT,value:t.value});case Oe.FLOAT:return this.advanceLexer(),this.node(t,{kind:De.FLOAT,value:t.value});case Oe.STRING:case Oe.BLOCK_STRING:return this.parseStringLiteral();case Oe.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:De.BOOLEAN,value:!0});case"false":return this.node(t,{kind:De.BOOLEAN,value:!1});case"null":return this.node(t,{kind:De.NULL});default:return this.node(t,{kind:De.ENUM,value:t.value})}case Oe.DOLLAR:if(e)if(this.expectToken(Oe.DOLLAR),this._lexer.token.kind===Oe.NAME){const n=this._lexer.token.value;throw Ma(this._lexer.source,t.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:De.STRING,value:e.value,block:e.kind===Oe.BLOCK_STRING})}parseList(e){const t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:De.LIST,values:this.any(Oe.BRACKET_L,t,Oe.BRACKET_R)})}parseObject(e){const t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:De.OBJECT,fields:this.any(Oe.BRACE_L,t,Oe.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(t,{kind:De.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Oe.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Oe.AT),this.node(t,{kind:De.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Oe.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Oe.BRACKET_R),t=this.node(e,{kind:De.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Oe.BANG)?this.node(e,{kind:De.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:De.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.STRING)||this.peek(Oe.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);return this.node(e,{kind:De.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Oe.COLON);const n=this.parseNamedType();return this.node(e,{kind:De.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:De.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:De.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseFieldDefinition,Oe.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.COLON);const r=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:De.FIELD_DEFINITION,description:t,name:n,arguments:i,type:r,directives:a})}parseArgumentDefs(){return this.optionalMany(Oe.PAREN_L,this.parseInputValueDef,Oe.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Oe.COLON);const i=this.parseTypeReference();let r;this.expectOptionalToken(Oe.EQUALS)&&(r=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:De.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:De.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:De.UNION_TYPE_DEFINITION,description:t,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.EQUALS)?this.delimitedMany(Oe.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:De.ENUM_TYPE_DEFINITION,description:t,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseEnumValueDefinition,Oe.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:De.ENUM_VALUE_DEFINITION,description:t,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ma(this._lexer.source,this._lexer.token.start,`${uS(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseInputValueDef,Oe.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Oe.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);if(t.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:De.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:De.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:De.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:De.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.UNION_TYPE_EXTENSION,name:t,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.ENUM_TYPE_EXTENSION,name:t,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Oe.AT);const n=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:De.DIRECTIVE_DEFINITION,description:t,name:n,arguments:i,repeatable:r,locations:a})}parseDirectiveLocations(){return this.delimitedMany(Oe.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(cu,t.value))return t;throw this.unexpected(e)}node(e,t){return this._options.noLocation!==!0&&(t.loc=new DKt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ma(this._lexer.source,t.start,`Expected ${jMe(e)}, found ${uS(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const t=this._lexer.token;if(t.kind===Oe.NAME&&t.value===e)this.advanceLexer();else throw Ma(this._lexer.source,t.start,`Expected "${e}", found ${uS(t)}.`)}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Oe.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const t=e??this._lexer.token;return Ma(this._lexer.source,t.start,`Unexpected ${uS(t)}.`)}any(e,t,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(t.call(this));return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(e,t,n){this.expectToken(e);const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(e!==void 0&&t.kind!==Oe.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ma(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function uS(u){const e=u.value;return jMe(u.kind)+(e!=null?` "${e}"`:"")}function jMe(u){return FKt(u)?`"${u}"`:u}const VKt=5;function $Kt(u,e){const[t,n]=e?[u,e]:[void 0,u];let i=" Did you mean ";t&&(i+=t+" ");const r=n.map(s=>`"${s}"`);switch(r.length){case 0:return"";case 1:return i+r[0]+"?";case 2:return i+r[0]+" or "+r[1]+"?"}const a=r.slice(0,VKt),o=a.pop();return i+a.join(", ")+", or "+o+"?"}function xfe(u){return u}function HMe(u,e){const t=Object.create(null);for(const n of u)t[e(n)]=n;return t}function Qf(u,e,t){const n=Object.create(null);for(const i of u)n[e(i)]=t(i);return n}function GI(u,e){const t=Object.create(null);for(const n of Object.keys(u))t[n]=e(u[n],n);return t}function KKt(u,e){let t=0,n=0;for(;t0);let o=0;do++n,o=o*10+r-KZ,r=e.charCodeAt(n);while(nS(r)&&o>0);if(ao)return 1}else{if(ir)return 1;++t,++n}}return u.length-e.length}const KZ=48,WKt=57;function nS(u){return!isNaN(u)&&KZ<=u&&u<=WKt}function GKt(u,e){const t=Object.create(null),n=new UKt(u),i=Math.floor(u.length*.4)+1;for(const r of e){const a=n.measure(r,i);a!==void 0&&(t[r]=a)}return Object.keys(t).sort((r,a)=>{const o=t[r]-t[a];return o!==0?o:KKt(r,a)})}class UKt{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=vfe(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let i=vfe(n),r=this._inputArray;if(i.lengtht)return;const s=this._rows;for(let c=0;c<=o;c++)s[0][c]=c;for(let c=1;c<=a;c++){const d=s[(c-1)%3],h=s[c%3];let E=h[0]=c;for(let m=1;m<=o;m++){const g=i[c-1]===r[m-1]?0:1;let f=Math.min(d[m]+1,h[m-1]+1,d[m-1]+g);if(c>1&&m>1&&i[c-1]===r[m-2]&&i[c-2]===r[m-1]){const p=s[(c-2)%3][m-2];f=Math.min(f,p+1)}ft)return}const l=s[a%3][o];return l<=t?l:void 0}}function vfe(u){const e=u.length,t=new Array(e);for(let n=0;nu.value},Variable:{leave:u=>"$"+u.name},Document:{leave:u=>Nt(u.definitions,` +spurious results.`)}}return!1};class IMe{constructor(e,t="GraphQL request",n={line:1,column:1}){typeof e=="string"||In(!1,`Body must be a string. Received: ${Tt(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||In(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||In(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function jKt(u){return pd(u,IMe)}function Bg(u,e){return new OMe(u,e).parseDocument()}function HKt(u,e){const t=new OMe(u,e);t.expectToken(Oe.SOF);const n=t.parseValueLiteral(!1);return t.expectToken(Oe.EOF),n}class OMe{constructor(e,t={}){const n=jKt(e)?e:new IMe(e);this._lexer=new kKt(n),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Oe.NAME);return this.node(e,{kind:De.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:De.DOCUMENT,definitions:this.many(Oe.SOF,this.parseDefinition,Oe.EOF)})}parseDefinition(){if(this.peek(Oe.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Oe.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ma(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Oe.BRACE_L))return this.node(e,{kind:De.OPERATION_DEFINITION,operation:vl.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(Oe.NAME)&&(n=this.parseName()),this.node(e,{kind:De.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Oe.NAME);switch(e.value){case"query":return vl.QUERY;case"mutation":return vl.MUTATION;case"subscription":return vl.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Oe.PAREN_L,this.parseVariableDefinition,Oe.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:De.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Oe.DOLLAR),this.node(e,{kind:De.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:De.SELECTION_SET,selections:this.many(Oe.BRACE_L,this.parseSelection,Oe.BRACE_R)})}parseSelection(){return this.peek(Oe.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,i;return this.expectOptionalToken(Oe.COLON)?(n=t,i=this.parseName()):i=t,this.node(e,{kind:De.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.PAREN_L,t,Oe.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(t,{kind:De.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Oe.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Oe.NAME)?this.node(e,{kind:De.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:De.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Oe.BRACKET_L:return this.parseList(e);case Oe.BRACE_L:return this.parseObject(e);case Oe.INT:return this.advanceLexer(),this.node(t,{kind:De.INT,value:t.value});case Oe.FLOAT:return this.advanceLexer(),this.node(t,{kind:De.FLOAT,value:t.value});case Oe.STRING:case Oe.BLOCK_STRING:return this.parseStringLiteral();case Oe.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:De.BOOLEAN,value:!0});case"false":return this.node(t,{kind:De.BOOLEAN,value:!1});case"null":return this.node(t,{kind:De.NULL});default:return this.node(t,{kind:De.ENUM,value:t.value})}case Oe.DOLLAR:if(e)if(this.expectToken(Oe.DOLLAR),this._lexer.token.kind===Oe.NAME){const n=this._lexer.token.value;throw Ma(this._lexer.source,t.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:De.STRING,value:e.value,block:e.kind===Oe.BLOCK_STRING})}parseList(e){const t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:De.LIST,values:this.any(Oe.BRACKET_L,t,Oe.BRACKET_R)})}parseObject(e){const t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:De.OBJECT,fields:this.any(Oe.BRACE_L,t,Oe.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Oe.COLON),this.node(t,{kind:De.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Oe.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Oe.AT),this.node(t,{kind:De.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Oe.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Oe.BRACKET_R),t=this.node(e,{kind:De.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Oe.BANG)?this.node(e,{kind:De.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:De.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.STRING)||this.peek(Oe.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);return this.node(e,{kind:De.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Oe.COLON);const n=this.parseNamedType();return this.node(e,{kind:De.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:De.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:De.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseFieldDefinition,Oe.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.COLON);const r=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:De.FIELD_DEFINITION,description:t,name:n,arguments:i,type:r,directives:a})}parseArgumentDefs(){return this.optionalMany(Oe.PAREN_L,this.parseInputValueDef,Oe.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Oe.COLON);const i=this.parseTypeReference();let r;this.expectOptionalToken(Oe.EQUALS)&&(r=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:De.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:De.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(e,{kind:De.UNION_TYPE_DEFINITION,description:t,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.EQUALS)?this.delimitedMany(Oe.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(e,{kind:De.ENUM_TYPE_DEFINITION,description:t,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseEnumValueDefinition,Oe.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:De.ENUM_VALUE_DEFINITION,description:t,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ma(this._lexer.source,this._lexer.token.start,`${uS(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(Oe.BRACE_L,this.parseInputValueDef,Oe.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Oe.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Oe.BRACE_L,this.parseOperationTypeDefinition,Oe.BRACE_R);if(t.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:De.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:De.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:De.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:De.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.UNION_TYPE_EXTENSION,name:t,directives:n,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.ENUM_TYPE_EXTENSION,name:t,directives:n,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Oe.AT);const n=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:De.DIRECTIVE_DEFINITION,description:t,name:n,arguments:i,repeatable:r,locations:a})}parseDirectiveLocations(){return this.delimitedMany(Oe.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(cu,t.value))return t;throw this.unexpected(e)}node(e,t){return this._options.noLocation!==!0&&(t.loc=new DKt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ma(this._lexer.source,t.start,`Expected ${jMe(e)}, found ${uS(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const t=this._lexer.token;if(t.kind===Oe.NAME&&t.value===e)this.advanceLexer();else throw Ma(this._lexer.source,t.start,`Expected "${e}", found ${uS(t)}.`)}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Oe.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const t=e??this._lexer.token;return Ma(this._lexer.source,t.start,`Unexpected ${uS(t)}.`)}any(e,t,n){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(n);)i.push(t.call(this));return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(e,t,n){this.expectToken(e);const i=[];do i.push(t.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(e!==void 0&&t.kind!==Oe.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ma(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function uS(u){const e=u.value;return jMe(u.kind)+(e!=null?` "${e}"`:"")}function jMe(u){return FKt(u)?`"${u}"`:u}const VKt=5;function $Kt(u,e){const[t,n]=e?[u,e]:[void 0,u];let i=" Did you mean ";t&&(i+=t+" ");const r=n.map(s=>`"${s}"`);switch(r.length){case 0:return"";case 1:return i+r[0]+"?";case 2:return i+r[0]+" or "+r[1]+"?"}const a=r.slice(0,VKt),o=a.pop();return i+a.join(", ")+", or "+o+"?"}function xfe(u){return u}function HMe(u,e){const t=Object.create(null);for(const n of u)t[e(n)]=n;return t}function Qf(u,e,t){const n=Object.create(null);for(const i of u)n[e(i)]=t(i);return n}function GI(u,e){const t=Object.create(null);for(const n of Object.keys(u))t[n]=e(u[n],n);return t}function KKt(u,e){let t=0,n=0;for(;t0);let o=0;do++n,o=o*10+r-KZ,r=e.charCodeAt(n);while(nS(r)&&o>0);if(ao)return 1}else{if(ir)return 1;++t,++n}}return u.length-e.length}const KZ=48,WKt=57;function nS(u){return!isNaN(u)&&KZ<=u&&u<=WKt}function GKt(u,e){const t=Object.create(null),n=new UKt(u),i=Math.floor(u.length*.4)+1;for(const r of e){const a=n.measure(r,i);a!==void 0&&(t[r]=a)}return Object.keys(t).sort((r,a)=>{const o=t[r]-t[a];return o!==0?o:KKt(r,a)})}class UKt{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=vfe(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let i=vfe(n),r=this._inputArray;if(i.lengtht)return;const s=this._rows;for(let c=0;c<=o;c++)s[0][c]=c;for(let c=1;c<=a;c++){const d=s[(c-1)%3],h=s[c%3];let E=h[0]=c;for(let m=1;m<=o;m++){const g=i[c-1]===r[m-1]?0:1;let f=Math.min(d[m]+1,h[m-1]+1,d[m-1]+g);if(c>1&&m>1&&i[c-1]===r[m-2]&&i[c-2]===r[m-1]){const p=s[(c-2)%3][m-2];f=Math.min(f,p+1)}ft)return}const l=s[a%3][o];return l<=t?l:void 0}}function vfe(u){const e=u.length,t=new Array(e);for(let n=0;nu.value},Variable:{leave:u=>"$"+u.name},Document:{leave:u=>Nt(u.definitions,` `)},OperationDefinition:{leave(u){const e=Ju("(",Nt(u.variableDefinitions,", "),")"),t=Nt([u.operation,Nt([u.name,e]),Nt(u.directives," ")]," ");return(t==="query"?"":t+" ")+u.selectionSet}},VariableDefinition:{leave:({variable:u,type:e,defaultValue:t,directives:n})=>u+": "+e+Ju(" = ",t)+Ju(" ",Nt(n," "))},SelectionSet:{leave:({selections:u})=>uc(u)},Field:{leave({alias:u,name:e,arguments:t,directives:n,selectionSet:i}){const r=Ju("",u,": ")+e;let a=r+Ju("(",Nt(t,", "),")");return a.length>QKt&&(a=r+Ju(`( `,K8(Nt(t,` @@ -874,11 +874,11 @@ spurious results.`)}}return!1};class IMe{constructor(e,t="GraphQL request",n={li `)),` }`)}function Ju(u,e,t=""){return e!=null&&e!==""?u+e+t:""}function K8(u){return Ju(" ",u.replace(/\n/g,` `))}function Cfe(u){var e;return(e=u==null?void 0:u.some(t=>t.includes(` -`)))!==null&&e!==void 0?e:!1}function WZ(u,e){switch(u.kind){case De.NULL:return null;case De.INT:return parseInt(u.value,10);case De.FLOAT:return parseFloat(u.value);case De.STRING:case De.ENUM:case De.BOOLEAN:return u.value;case De.LIST:return u.values.map(t=>WZ(t,e));case De.OBJECT:return Qf(u.fields,t=>t.name.value,t=>WZ(t.value,e));case De.VARIABLE:return e==null?void 0:e[u.name.value]}}function Dd(u){if(u!=null||In(!1,"Must provide name."),typeof u=="string"||In(!1,"Expected name to be a string."),u.length===0)throw new Rn("Expected name to be a non-empty string.");for(let e=1;ea(WZ(o,s)),this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(r=e.extensionASTNodes)!==null&&r!==void 0?r:[],e.specifiedByURL==null||typeof e.specifiedByURL=="string"||In(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Tt(e.specifiedByURL)}.`),e.serialize==null||typeof e.serialize=="function"||In(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&(typeof e.parseValue=="function"&&typeof e.parseLiteral=="function"||In(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Z1{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=()=>UMe(e),this._interfaces=()=>GMe(e),e.isTypeOf==null||typeof e.isTypeOf=="function"||In(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Tt(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JMe(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function GMe(u){var e;const t=KMe((e=u.interfaces)!==null&&e!==void 0?e:[]);return Array.isArray(t)||In(!1,`${u.name} interfaces must be an Array or a function which returns an Array.`),t}function UMe(u){const e=WMe(u.fields);return Nx(e)||In(!1,`${u.name} fields must be an object with field names as keys or a function which returns such an object.`),GI(e,(t,n)=>{var i;Nx(t)||In(!1,`${u.name}.${n} field config must be an object.`),t.resolve==null||typeof t.resolve=="function"||In(!1,`${u.name}.${n} field resolver must be a function if provided, but got: ${Tt(t.resolve)}.`);const r=(i=t.args)!==null&&i!==void 0?i:{};return Nx(r)||In(!1,`${u.name}.${n} args must be an object with argument names as keys.`),{name:Dd(n),description:t.description,type:t.type,args:qMe(r),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}})}function qMe(u){return Object.entries(u).map(([e,t])=>({name:Dd(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}))}function Nx(u){return D4(u)&&!Array.isArray(u)}function JMe(u){return GI(u,e=>({description:e.description,type:e.type,args:ZMe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function ZMe(u){return Qf(u,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Ine(u){return Mr(u.type)&&u.defaultValue===void 0}class Px{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=UMe.bind(void 0,e),this._interfaces=GMe.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||In(!1,`${this.name} must provide "resolveType" as a function, but got: ${Tt(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JMe(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class YMe{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._types=rWt.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||In(!1,`${this.name} must provide "resolveType" as a function, but got: ${Tt(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function rWt(u){const e=KMe(u.types);return Array.isArray(e)||In(!1,`Must provide Array of types or a function which returns such an array for Union ${u.name}.`),e}class I6{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._values=aWt(this.name,e.values),this._valueLookup=new Map(this._values.map(n=>[n.value,n])),this._nameLookup=HMe(this._values,n=>n.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(t===void 0)throw new Rn(`Enum "${this.name}" cannot represent value: ${Tt(e)}`);return t.name}parseValue(e){if(typeof e!="string"){const n=Tt(e);throw new Rn(`Enum "${this.name}" cannot represent non-string value: ${n}.`+iS(this,n))}const t=this.getValue(e);if(t==null)throw new Rn(`Value "${e}" does not exist in "${this.name}" enum.`+iS(this,e));return t.value}parseLiteral(e,t){if(e.kind!==De.ENUM){const i=t0(e);throw new Rn(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+iS(this,i),{nodes:e})}const n=this.getValue(e.value);if(n==null){const i=t0(e);throw new Rn(`Value "${i}" does not exist in "${this.name}" enum.`+iS(this,i),{nodes:e})}return n.value}toConfig(){const e=Qf(this.getValues(),t=>t.name,t=>({description:t.description,value:t.value,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function iS(u,e){const t=u.getValues().map(i=>i.name),n=GKt(e,t);return $Kt("the enum value",n)}function aWt(u,e){return Nx(e)||In(!1,`${u} values must be an object with value names as keys.`),Object.entries(e).map(([t,n])=>(Nx(n)||In(!1,`${u}.${t} must refer to an object with a "value" key representing an internal value but got: ${Tt(n)}.`),{name:eWt(t),description:n.description,value:n.value!==void 0?n.value:t,deprecationReason:n.deprecationReason,extensions:Yl(n.extensions),astNode:n.astNode}))}class One{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=oWt.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const e=GI(this.getFields(),t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function oWt(u){const e=WMe(u.fields);return Nx(e)||In(!1,`${u.name} fields must be an object with field names as keys or a function which returns such an object.`),GI(e,(t,n)=>(!("resolve"in t)||In(!1,`${u.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:Dd(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}))}function sWt(u){return Mr(u.type)&&u.defaultValue===void 0}function GZ(u,e){return u===e?!0:Mr(u)&&Mr(e)||Es(u)&&Es(e)?GZ(u.ofType,e.ofType):!1}function W8(u,e,t){return e===t?!0:Mr(t)?Mr(e)?W8(u,e.ofType,t.ofType):!1:Mr(e)?W8(u,e.ofType,t):Es(t)?Es(e)?W8(u,e.ofType,t.ofType):!1:Es(e)?!1:_m(t)&&(Ji(e)||qi(e))&&u.isSubType(t,e)}function lWt(u,e,t){return e===t?!0:_m(e)?_m(t)?u.getPossibleTypes(e).some(n=>u.isSubType(t,n)):u.isSubType(e,t):_m(t)?u.isSubType(t,e):!1}const n$=2147483647,i$=-2147483648,cWt=new Qp({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(u){const e=c7(u);if(typeof e=="boolean")return e?1:0;let t=e;if(typeof e=="string"&&e!==""&&(t=Number(e)),typeof t!="number"||!Number.isInteger(t))throw new Rn(`Int cannot represent non-integer value: ${Tt(e)}`);if(t>n$||tn$||un$||e({description:{type:Tr,resolve:u=>u.description},types:{description:"A list of all types supported by this server.",type:new Qu(new Rs(new Qu(Nc))),resolve(u){return Object.values(u.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Qu(Nc),resolve:u=>u.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Nc,resolve:u=>u.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Nc,resolve:u=>u.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Qu(new Rs(new Qu(uTe))),resolve:u=>u.getDirectives()}})}),uTe=new Z1({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +`)))!==null&&e!==void 0?e:!1}function WZ(u,e){switch(u.kind){case De.NULL:return null;case De.INT:return parseInt(u.value,10);case De.FLOAT:return parseFloat(u.value);case De.STRING:case De.ENUM:case De.BOOLEAN:return u.value;case De.LIST:return u.values.map(t=>WZ(t,e));case De.OBJECT:return Qf(u.fields,t=>t.name.value,t=>WZ(t.value,e));case De.VARIABLE:return e==null?void 0:e[u.name.value]}}function Dd(u){if(u!=null||In(!1,"Must provide name."),typeof u=="string"||In(!1,"Expected name to be a string."),u.length===0)throw new Rn("Expected name to be a non-empty string.");for(let e=1;ea(WZ(o,s)),this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(r=e.extensionASTNodes)!==null&&r!==void 0?r:[],e.specifiedByURL==null||typeof e.specifiedByURL=="string"||In(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Tt(e.specifiedByURL)}.`),e.serialize==null||typeof e.serialize=="function"||In(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&(typeof e.parseValue=="function"&&typeof e.parseLiteral=="function"||In(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Z1{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=()=>UMe(e),this._interfaces=()=>GMe(e),e.isTypeOf==null||typeof e.isTypeOf=="function"||In(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Tt(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JMe(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function GMe(u){var e;const t=KMe((e=u.interfaces)!==null&&e!==void 0?e:[]);return Array.isArray(t)||In(!1,`${u.name} interfaces must be an Array or a function which returns an Array.`),t}function UMe(u){const e=WMe(u.fields);return Nx(e)||In(!1,`${u.name} fields must be an object with field names as keys or a function which returns such an object.`),GI(e,(t,n)=>{var i;Nx(t)||In(!1,`${u.name}.${n} field config must be an object.`),t.resolve==null||typeof t.resolve=="function"||In(!1,`${u.name}.${n} field resolver must be a function if provided, but got: ${Tt(t.resolve)}.`);const r=(i=t.args)!==null&&i!==void 0?i:{};return Nx(r)||In(!1,`${u.name}.${n} args must be an object with argument names as keys.`),{name:Dd(n),description:t.description,type:t.type,args:qMe(r),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}})}function qMe(u){return Object.entries(u).map(([e,t])=>({name:Dd(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}))}function Nx(u){return D4(u)&&!Array.isArray(u)}function JMe(u){return GI(u,e=>({description:e.description,type:e.type,args:ZMe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function ZMe(u){return Qf(u,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Ine(u){return Mr(u.type)&&u.defaultValue===void 0}class Px{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=UMe.bind(void 0,e),this._interfaces=GMe.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||In(!1,`${this.name} must provide "resolveType" as a function, but got: ${Tt(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JMe(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class YMe{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._types=rWt.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||In(!1,`${this.name} must provide "resolveType" as a function, but got: ${Tt(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function rWt(u){const e=KMe(u.types);return Array.isArray(e)||In(!1,`Must provide Array of types or a function which returns such an array for Union ${u.name}.`),e}class I6{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._values=aWt(this.name,e.values),this._valueLookup=new Map(this._values.map(n=>[n.value,n])),this._nameLookup=HMe(this._values,n=>n.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(t===void 0)throw new Rn(`Enum "${this.name}" cannot represent value: ${Tt(e)}`);return t.name}parseValue(e){if(typeof e!="string"){const n=Tt(e);throw new Rn(`Enum "${this.name}" cannot represent non-string value: ${n}.`+iS(this,n))}const t=this.getValue(e);if(t==null)throw new Rn(`Value "${e}" does not exist in "${this.name}" enum.`+iS(this,e));return t.value}parseLiteral(e,t){if(e.kind!==De.ENUM){const i=u0(e);throw new Rn(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+iS(this,i),{nodes:e})}const n=this.getValue(e.value);if(n==null){const i=u0(e);throw new Rn(`Value "${i}" does not exist in "${this.name}" enum.`+iS(this,i),{nodes:e})}return n.value}toConfig(){const e=Qf(this.getValues(),t=>t.name,t=>({description:t.description,value:t.value,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function iS(u,e){const t=u.getValues().map(i=>i.name),n=GKt(e,t);return $Kt("the enum value",n)}function aWt(u,e){return Nx(e)||In(!1,`${u} values must be an object with value names as keys.`),Object.entries(e).map(([t,n])=>(Nx(n)||In(!1,`${u}.${t} must refer to an object with a "value" key representing an internal value but got: ${Tt(n)}.`),{name:eWt(t),description:n.description,value:n.value!==void 0?n.value:t,deprecationReason:n.deprecationReason,extensions:Yl(n.extensions),astNode:n.astNode}))}class One{constructor(e){var t;this.name=Dd(e.name),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=oWt.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const e=GI(this.getFields(),t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function oWt(u){const e=WMe(u.fields);return Nx(e)||In(!1,`${u.name} fields must be an object with field names as keys or a function which returns such an object.`),GI(e,(t,n)=>(!("resolve"in t)||In(!1,`${u.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:Dd(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Yl(t.extensions),astNode:t.astNode}))}function sWt(u){return Mr(u.type)&&u.defaultValue===void 0}function GZ(u,e){return u===e?!0:Mr(u)&&Mr(e)||ms(u)&&ms(e)?GZ(u.ofType,e.ofType):!1}function W8(u,e,t){return e===t?!0:Mr(t)?Mr(e)?W8(u,e.ofType,t.ofType):!1:Mr(e)?W8(u,e.ofType,t):ms(t)?ms(e)?W8(u,e.ofType,t.ofType):!1:ms(e)?!1:_m(t)&&(Ji(e)||qi(e))&&u.isSubType(t,e)}function lWt(u,e,t){return e===t?!0:_m(e)?_m(t)?u.getPossibleTypes(e).some(n=>u.isSubType(t,n)):u.isSubType(e,t):_m(t)?u.isSubType(t,e):!1}const n$=2147483647,i$=-2147483648,cWt=new Qp({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(u){const e=c7(u);if(typeof e=="boolean")return e?1:0;let t=e;if(typeof e=="string"&&e!==""&&(t=Number(e)),typeof t!="number"||!Number.isInteger(t))throw new Rn(`Int cannot represent non-integer value: ${Tt(e)}`);if(t>n$||tn$||un$||e({description:{type:Tr,resolve:u=>u.description},types:{description:"A list of all types supported by this server.",type:new Qu(new Is(new Qu(Nc))),resolve(u){return Object.values(u.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Qu(Nc),resolve:u=>u.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Nc,resolve:u=>u.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Nc,resolve:u=>u.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Qu(new Is(new Qu(uTe))),resolve:u=>u.getDirectives()}})}),uTe=new Z1({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},isRepeatable:{type:new Qu(Xa),resolve:u=>u.isRepeatable},locations:{type:new Qu(new Rs(new Qu(nTe))),resolve:u=>u.locations},args:{type:new Qu(new Rs(new Qu(qI))),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){return e?u.args:u.args.filter(t=>t.deprecationReason==null)}}})}),nTe=new I6({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:cu.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:cu.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:cu.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:cu.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:cu.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:cu.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:cu.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:cu.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:cu.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:cu.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:cu.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:cu.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:cu.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:cu.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:cu.UNION,description:"Location adjacent to a union definition."},ENUM:{value:cu.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:cu.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:cu.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:cu.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Nc=new Z1({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Qu(aTe),resolve(u){if(wg(u))return fi.SCALAR;if(qi(u))return fi.OBJECT;if(Ji(u))return fi.INTERFACE;if(Il(u))return fi.UNION;if(V0(u))return fi.ENUM;if(jo(u))return fi.INPUT_OBJECT;if(Es(u))return fi.LIST;if(Mr(u))return fi.NON_NULL;$I(!1,`Unexpected type: "${Tt(u)}".`)}},name:{type:Tr,resolve:u=>"name"in u?u.name:void 0},description:{type:Tr,resolve:u=>"description"in u?u.description:void 0},specifiedByURL:{type:Tr,resolve:u=>"specifiedByURL"in u?u.specifiedByURL:void 0},fields:{type:new Rs(new Qu(iTe)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if(qi(u)||Ji(u)){const t=Object.values(u.getFields());return e?t:t.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new Rs(new Qu(Nc)),resolve(u){if(qi(u)||Ji(u))return u.getInterfaces()}},possibleTypes:{type:new Rs(new Qu(Nc)),resolve(u,e,t,{schema:n}){if(_m(u))return n.getPossibleTypes(u)}},enumValues:{type:new Rs(new Qu(rTe)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if(V0(u)){const t=u.getValues();return e?t:t.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new Rs(new Qu(qI)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if(jo(u)){const t=Object.values(u.getFields());return e?t:t.filter(n=>n.deprecationReason==null)}}},ofType:{type:Nc,resolve:u=>"ofType"in u?u.ofType:void 0}})}),iTe=new Z1({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},args:{type:new Qu(new Rs(new Qu(qI))),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){return e?u.args:u.args.filter(t=>t.deprecationReason==null)}},type:{type:new Qu(Nc),resolve:u=>u.type},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})}),qI=new Z1({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},type:{type:new Qu(Nc),resolve:u=>u.type},defaultValue:{type:Tr,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(u){const{type:e,defaultValue:t}=u,n=U5(t,e);return n?t0(n):null}},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})}),rTe=new Z1({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})});var fi;(function(u){u.SCALAR="SCALAR",u.OBJECT="OBJECT",u.INTERFACE="INTERFACE",u.UNION="UNION",u.ENUM="ENUM",u.INPUT_OBJECT="INPUT_OBJECT",u.LIST="LIST",u.NON_NULL="NON_NULL"})(fi||(fi={}));const aTe=new I6({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:fi.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:fi.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:fi.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:fi.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:fi.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:fi.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:fi.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:fi.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),ny={name:"__schema",type:new Qu(jne),description:"Access the current type schema of this server.",args:[],resolve:(u,e,t,{schema:n})=>n,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},iy={name:"__type",type:Nc,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Qu(Tr),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(u,{name:e},t,{schema:n})=>n.getType(e),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ry={name:"__typename",type:new Qu(Tr),description:"The name of the current Object type at runtime.",args:[],resolve:(u,e,t,{parentType:n})=>n.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},oTe=Object.freeze([jne,uTe,nTe,Nc,iTe,qI,rTe,aTe]);function DWt(u){return oTe.some(({name:e})=>u.name===e)}function UZ(u){return pd(u,sTe)}function xWt(u){if(!UZ(u))throw new Error(`Expected ${Tt(u)} to be a GraphQL schema.`);return u}class sTe{constructor(e){var t,n;this.__validationErrors=e.assumeValid===!0?[]:void 0,D4(e)||In(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||In(!1,`"types" must be Array if provided but got: ${Tt(e.types)}.`),!e.directives||Array.isArray(e.directives)||In(!1,`"directives" must be Array if provided but got: ${Tt(e.directives)}.`),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=(n=e.directives)!==null&&n!==void 0?n:fWt;const i=new Set(e.types);if(e.types!=null)for(const r of e.types)i.delete(r),Fc(r,i);this._queryType!=null&&Fc(this._queryType,i),this._mutationType!=null&&Fc(this._mutationType,i),this._subscriptionType!=null&&Fc(this._subscriptionType,i);for(const r of this._directives)if(eTe(r))for(const a of r.args)Fc(a.type,i);Fc(jne,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const r of i){if(r==null)continue;const a=r.name;if(a||In(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[a]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=r,Ji(r)){for(const o of r.getInterfaces())if(Ji(o)){let s=this._implementationsMap[o.name];s===void 0&&(s=this._implementationsMap[o.name]={objects:[],interfaces:[]}),s.interfaces.push(r)}}else if(qi(r)){for(const o of r.getInterfaces())if(Ji(o)){let s=this._implementationsMap[o.name];s===void 0&&(s=this._implementationsMap[o.name]={objects:[],interfaces:[]}),s.objects.push(r)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case vl.QUERY:return this.getQueryType();case vl.MUTATION:return this.getMutationType();case vl.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return Il(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return t??{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(n===void 0){if(n=Object.create(null),Il(e))for(const i of e.getTypes())n[i.name]=!0;else{const i=this.getImplementations(e);for(const r of i.objects)n[r.name]=!0;for(const r of i.interfaces)n[r.name]=!0}this._subTypeMap[e.name]=n}return n[t.name]!==void 0}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Fc(u,e){const t=F0(u);if(!e.has(t)){if(e.add(t),Il(t))for(const n of t.getTypes())Fc(n,e);else if(qi(t)||Ji(t)){for(const n of t.getInterfaces())Fc(n,e);for(const n of Object.values(t.getFields())){Fc(n.type,e);for(const i of n.args)Fc(i.type,e)}}else if(jo(t))for(const n of Object.values(t.getFields()))Fc(n.type,e)}return e}function lTe(u){if(xWt(u),u.__validationErrors)return u.__validationErrors;const e=new vWt(u);CWt(e),bWt(e),kWt(e);const t=e.getErrors();return u.__validationErrors=t,t}function nqn(u){const e=lTe(u);if(e.length!==0)throw new Error(e.map(t=>t.message).join(` +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},isRepeatable:{type:new Qu(Xa),resolve:u=>u.isRepeatable},locations:{type:new Qu(new Is(new Qu(nTe))),resolve:u=>u.locations},args:{type:new Qu(new Is(new Qu(qI))),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){return e?u.args:u.args.filter(t=>t.deprecationReason==null)}}})}),nTe=new I6({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:cu.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:cu.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:cu.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:cu.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:cu.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:cu.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:cu.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:cu.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:cu.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:cu.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:cu.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:cu.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:cu.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:cu.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:cu.UNION,description:"Location adjacent to a union definition."},ENUM:{value:cu.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:cu.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:cu.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:cu.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Nc=new Z1({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Qu(aTe),resolve(u){if(wg(u))return fi.SCALAR;if(qi(u))return fi.OBJECT;if(Ji(u))return fi.INTERFACE;if(Il(u))return fi.UNION;if($0(u))return fi.ENUM;if(jo(u))return fi.INPUT_OBJECT;if(ms(u))return fi.LIST;if(Mr(u))return fi.NON_NULL;$I(!1,`Unexpected type: "${Tt(u)}".`)}},name:{type:Tr,resolve:u=>"name"in u?u.name:void 0},description:{type:Tr,resolve:u=>"description"in u?u.description:void 0},specifiedByURL:{type:Tr,resolve:u=>"specifiedByURL"in u?u.specifiedByURL:void 0},fields:{type:new Is(new Qu(iTe)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if(qi(u)||Ji(u)){const t=Object.values(u.getFields());return e?t:t.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new Is(new Qu(Nc)),resolve(u){if(qi(u)||Ji(u))return u.getInterfaces()}},possibleTypes:{type:new Is(new Qu(Nc)),resolve(u,e,t,{schema:n}){if(_m(u))return n.getPossibleTypes(u)}},enumValues:{type:new Is(new Qu(rTe)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if($0(u)){const t=u.getValues();return e?t:t.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new Is(new Qu(qI)),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){if(jo(u)){const t=Object.values(u.getFields());return e?t:t.filter(n=>n.deprecationReason==null)}}},ofType:{type:Nc,resolve:u=>"ofType"in u?u.ofType:void 0}})}),iTe=new Z1({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},args:{type:new Qu(new Is(new Qu(qI))),args:{includeDeprecated:{type:Xa,defaultValue:!1}},resolve(u,{includeDeprecated:e}){return e?u.args:u.args.filter(t=>t.deprecationReason==null)}},type:{type:new Qu(Nc),resolve:u=>u.type},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})}),qI=new Z1({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},type:{type:new Qu(Nc),resolve:u=>u.type},defaultValue:{type:Tr,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(u){const{type:e,defaultValue:t}=u,n=U5(t,e);return n?u0(n):null}},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})}),rTe=new Z1({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Qu(Tr),resolve:u=>u.name},description:{type:Tr,resolve:u=>u.description},isDeprecated:{type:new Qu(Xa),resolve:u=>u.deprecationReason!=null},deprecationReason:{type:Tr,resolve:u=>u.deprecationReason}})});var fi;(function(u){u.SCALAR="SCALAR",u.OBJECT="OBJECT",u.INTERFACE="INTERFACE",u.UNION="UNION",u.ENUM="ENUM",u.INPUT_OBJECT="INPUT_OBJECT",u.LIST="LIST",u.NON_NULL="NON_NULL"})(fi||(fi={}));const aTe=new I6({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:fi.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:fi.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:fi.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:fi.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:fi.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:fi.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:fi.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:fi.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),ny={name:"__schema",type:new Qu(jne),description:"Access the current type schema of this server.",args:[],resolve:(u,e,t,{schema:n})=>n,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},iy={name:"__type",type:Nc,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Qu(Tr),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(u,{name:e},t,{schema:n})=>n.getType(e),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ry={name:"__typename",type:new Qu(Tr),description:"The name of the current Object type at runtime.",args:[],resolve:(u,e,t,{parentType:n})=>n.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},oTe=Object.freeze([jne,uTe,nTe,Nc,iTe,qI,rTe,aTe]);function DWt(u){return oTe.some(({name:e})=>u.name===e)}function UZ(u){return pd(u,sTe)}function xWt(u){if(!UZ(u))throw new Error(`Expected ${Tt(u)} to be a GraphQL schema.`);return u}class sTe{constructor(e){var t,n;this.__validationErrors=e.assumeValid===!0?[]:void 0,D4(e)||In(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||In(!1,`"types" must be Array if provided but got: ${Tt(e.types)}.`),!e.directives||Array.isArray(e.directives)||In(!1,`"directives" must be Array if provided but got: ${Tt(e.directives)}.`),this.description=e.description,this.extensions=Yl(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=(n=e.directives)!==null&&n!==void 0?n:fWt;const i=new Set(e.types);if(e.types!=null)for(const r of e.types)i.delete(r),Fc(r,i);this._queryType!=null&&Fc(this._queryType,i),this._mutationType!=null&&Fc(this._mutationType,i),this._subscriptionType!=null&&Fc(this._subscriptionType,i);for(const r of this._directives)if(eTe(r))for(const a of r.args)Fc(a.type,i);Fc(jne,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const r of i){if(r==null)continue;const a=r.name;if(a||In(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[a]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=r,Ji(r)){for(const o of r.getInterfaces())if(Ji(o)){let s=this._implementationsMap[o.name];s===void 0&&(s=this._implementationsMap[o.name]={objects:[],interfaces:[]}),s.interfaces.push(r)}}else if(qi(r)){for(const o of r.getInterfaces())if(Ji(o)){let s=this._implementationsMap[o.name];s===void 0&&(s=this._implementationsMap[o.name]={objects:[],interfaces:[]}),s.objects.push(r)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case vl.QUERY:return this.getQueryType();case vl.MUTATION:return this.getMutationType();case vl.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return Il(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return t??{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(n===void 0){if(n=Object.create(null),Il(e))for(const i of e.getTypes())n[i.name]=!0;else{const i=this.getImplementations(e);for(const r of i.objects)n[r.name]=!0;for(const r of i.interfaces)n[r.name]=!0}this._subTypeMap[e.name]=n}return n[t.name]!==void 0}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Fc(u,e){const t=y0(u);if(!e.has(t)){if(e.add(t),Il(t))for(const n of t.getTypes())Fc(n,e);else if(qi(t)||Ji(t)){for(const n of t.getInterfaces())Fc(n,e);for(const n of Object.values(t.getFields())){Fc(n.type,e);for(const i of n.args)Fc(i.type,e)}}else if(jo(t))for(const n of Object.values(t.getFields()))Fc(n.type,e)}return e}function lTe(u){if(xWt(u),u.__validationErrors)return u.__validationErrors;const e=new vWt(u);CWt(e),bWt(e),kWt(e);const t=e.getErrors();return u.__validationErrors=t,t}function nqn(u){const e=lTe(u);if(e.length!==0)throw new Error(e.map(t=>t.message).join(` -`))}class vWt{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new Rn(e,{nodes:n}))}getErrors(){return this._errors}}function CWt(u){const e=u.schema,t=e.getQueryType();if(!t)u.reportError("Query root type must be provided.",e.astNode);else if(!qi(t)){var n;u.reportError(`Query root type must be Object type, it cannot be ${Tt(t)}.`,(n=r$(e,vl.QUERY))!==null&&n!==void 0?n:t.astNode)}const i=e.getMutationType();if(i&&!qi(i)){var r;u.reportError(`Mutation root type must be Object type if provided, it cannot be ${Tt(i)}.`,(r=r$(e,vl.MUTATION))!==null&&r!==void 0?r:i.astNode)}const a=e.getSubscriptionType();if(a&&!qi(a)){var o;u.reportError(`Subscription root type must be Object type if provided, it cannot be ${Tt(a)}.`,(o=r$(e,vl.SUBSCRIPTION))!==null&&o!==void 0?o:a.astNode)}}function r$(u,e){var t;return(t=[u.astNode,...u.extensionASTNodes].flatMap(n=>{var i;return(i=n==null?void 0:n.operationTypes)!==null&&i!==void 0?i:[]}).find(n=>n.operation===e))===null||t===void 0?void 0:t.type}function bWt(u){for(const t of u.schema.getDirectives()){if(!eTe(t)){u.reportError(`Expected directive but got: ${Tt(t)}.`,t==null?void 0:t.astNode);continue}Ep(u,t);for(const n of t.args)if(Ep(u,n),hl(n.type)||u.reportError(`The type of @${t.name}(${n.name}:) must be Input Type but got: ${Tt(n.type)}.`,n.astNode),Ine(n)&&n.deprecationReason!=null){var e;u.reportError(`Required argument @${t.name}(${n.name}:) cannot be deprecated.`,[Hne(n.astNode),(e=n.astNode)===null||e===void 0?void 0:e.type])}}}function Ep(u,e){e.name.startsWith("__")&&u.reportError(`Name "${e.name}" must not begin with "__", which is reserved by GraphQL introspection.`,e.astNode)}function kWt(u){const e=BWt(u),t=u.schema.getTypeMap();for(const n of Object.values(t)){if(!Rne(n)){u.reportError(`Expected GraphQL named type but got: ${Tt(n)}.`,n.astNode);continue}DWt(n)||Ep(u,n),qi(n)||Ji(n)?(kfe(u,n),Ffe(u,n)):Il(n)?AWt(u,n):V0(n)?_Wt(u,n):jo(n)&&(SWt(u,n),e(n))}}function kfe(u,e){const t=Object.values(e.getFields());t.length===0&&u.reportError(`Type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const a of t){if(Ep(u,a),!D3(a.type)){var n;u.reportError(`The type of ${e.name}.${a.name} must be Output Type but got: ${Tt(a.type)}.`,(n=a.astNode)===null||n===void 0?void 0:n.type)}for(const o of a.args){const s=o.name;if(Ep(u,o),!hl(o.type)){var i;u.reportError(`The type of ${e.name}.${a.name}(${s}:) must be Input Type but got: ${Tt(o.type)}.`,(i=o.astNode)===null||i===void 0?void 0:i.type)}if(Ine(o)&&o.deprecationReason!=null){var r;u.reportError(`Required argument ${e.name}.${a.name}(${s}:) cannot be deprecated.`,[Hne(o.astNode),(r=o.astNode)===null||r===void 0?void 0:r.type])}}}}function Ffe(u,e){const t=Object.create(null);for(const n of e.getInterfaces()){if(!Ji(n)){u.reportError(`Type ${Tt(e)} must only implement Interface types, it cannot implement ${Tt(n)}.`,O2(e,n));continue}if(e===n){u.reportError(`Type ${e.name} cannot implement itself because it would create a circular reference.`,O2(e,n));continue}if(t[n.name]){u.reportError(`Type ${e.name} can only implement ${n.name} once.`,O2(e,n));continue}t[n.name]=!0,yWt(u,e,n),FWt(u,e,n)}}function FWt(u,e,t){const n=e.getFields();for(const s of Object.values(t.getFields())){const l=s.name,c=n[l];if(!c){u.reportError(`Interface field ${t.name}.${l} expected but ${e.name} does not provide it.`,[s.astNode,e.astNode,...e.extensionASTNodes]);continue}if(!W8(u.schema,c.type,s.type)){var i,r;u.reportError(`Interface field ${t.name}.${l} expects type ${Tt(s.type)} but ${e.name}.${l} is type ${Tt(c.type)}.`,[(i=s.astNode)===null||i===void 0?void 0:i.type,(r=c.astNode)===null||r===void 0?void 0:r.type])}for(const d of s.args){const h=d.name,E=c.args.find(m=>m.name===h);if(!E){u.reportError(`Interface field argument ${t.name}.${l}(${h}:) expected but ${e.name}.${l} does not provide it.`,[d.astNode,c.astNode]);continue}if(!GZ(d.type,E.type)){var a,o;u.reportError(`Interface field argument ${t.name}.${l}(${h}:) expects type ${Tt(d.type)} but ${e.name}.${l}(${h}:) is type ${Tt(E.type)}.`,[(a=d.astNode)===null||a===void 0?void 0:a.type,(o=E.astNode)===null||o===void 0?void 0:o.type])}}for(const d of c.args){const h=d.name;!s.args.find(m=>m.name===h)&&Ine(d)&&u.reportError(`Object field ${e.name}.${l} includes required argument ${h} that is missing from the Interface field ${t.name}.${l}.`,[d.astNode,s.astNode])}}}function yWt(u,e,t){const n=e.getInterfaces();for(const i of t.getInterfaces())n.includes(i)||u.reportError(i===e?`Type ${e.name} cannot implement ${t.name} because it would create a circular reference.`:`Type ${e.name} must implement ${i.name} because it is implemented by ${t.name}.`,[...O2(t,i),...O2(e,t)])}function AWt(u,e){const t=e.getTypes();t.length===0&&u.reportError(`Union type ${e.name} must define one or more member types.`,[e.astNode,...e.extensionASTNodes]);const n=Object.create(null);for(const i of t){if(n[i.name]){u.reportError(`Union type ${e.name} can only include type ${i.name} once.`,yfe(e,i.name));continue}n[i.name]=!0,qi(i)||u.reportError(`Union type ${e.name} can only include Object types, it cannot include ${Tt(i)}.`,yfe(e,String(i)))}}function _Wt(u,e){const t=e.getValues();t.length===0&&u.reportError(`Enum type ${e.name} must define one or more values.`,[e.astNode,...e.extensionASTNodes]);for(const n of t)Ep(u,n)}function SWt(u,e){const t=Object.values(e.getFields());t.length===0&&u.reportError(`Input Object type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const r of t){if(Ep(u,r),!hl(r.type)){var n;u.reportError(`The type of ${e.name}.${r.name} must be Input Type but got: ${Tt(r.type)}.`,(n=r.astNode)===null||n===void 0?void 0:n.type)}if(sWt(r)&&r.deprecationReason!=null){var i;u.reportError(`Required input field ${e.name}.${r.name} cannot be deprecated.`,[Hne(r.astNode),(i=r.astNode)===null||i===void 0?void 0:i.type])}}}function BWt(u){const e=Object.create(null),t=[],n=Object.create(null);return i;function i(r){if(e[r.name])return;e[r.name]=!0,n[r.name]=t.length;const a=Object.values(r.getFields());for(const o of a)if(Mr(o.type)&&jo(o.type.ofType)){const s=o.type.ofType,l=n[s.name];if(t.push(o),l===void 0)i(s);else{const c=t.slice(l),d=c.map(h=>h.name).join(".");u.reportError(`Cannot reference Input Object "${s.name}" within itself through a series of non-null fields: "${d}".`,c.map(h=>h.astNode))}t.pop()}n[r.name]=void 0}}function O2(u,e){const{astNode:t,extensionASTNodes:n}=u;return(t!=null?[t,...n]:n).flatMap(r=>{var a;return(a=r.interfaces)!==null&&a!==void 0?a:[]}).filter(r=>r.name.value===e.name)}function yfe(u,e){const{astNode:t,extensionASTNodes:n}=u;return(t!=null?[t,...n]:n).flatMap(r=>{var a;return(a=r.types)!==null&&a!==void 0?a:[]}).filter(r=>r.name.value===e)}function Hne(u){var e;return u==null||(e=u.directives)===null||e===void 0?void 0:e.find(t=>t.name.value===tTe.name)}function ay(u,e){switch(e.kind){case De.LIST_TYPE:{const t=ay(u,e.type);return t&&new Rs(t)}case De.NON_NULL_TYPE:{const t=ay(u,e.type);return t&&new Qu(t)}case De.NAMED_TYPE:return u.getType(e.name.value)}}class cTe{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??wWt,t&&(hl(t)&&this._inputTypeStack.push(t),Cl(t)&&this._parentTypeStack.push(t),D3(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case De.SELECTION_SET:{const i=F0(this.getType());this._parentTypeStack.push(Cl(i)?i:void 0);break}case De.FIELD:{const i=this.getParentType();let r,a;i&&(r=this._getFieldDef(t,i,e),r&&(a=r.type)),this._fieldDefStack.push(r),this._typeStack.push(D3(a)?a:void 0);break}case De.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case De.OPERATION_DEFINITION:{const i=t.getRootType(e.operation);this._typeStack.push(qi(i)?i:void 0);break}case De.INLINE_FRAGMENT:case De.FRAGMENT_DEFINITION:{const i=e.typeCondition,r=i?ay(t,i):F0(this.getType());this._typeStack.push(D3(r)?r:void 0);break}case De.VARIABLE_DEFINITION:{const i=ay(t,e.type);this._inputTypeStack.push(hl(i)?i:void 0);break}case De.ARGUMENT:{var n;let i,r;const a=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();a&&(i=a.args.find(o=>o.name===e.name.value),i&&(r=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.LIST:{const i=$Me(this.getInputType()),r=Es(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.OBJECT_FIELD:{const i=F0(this.getInputType());let r,a;jo(i)&&(a=i.getFields()[e.name.value],a&&(r=a.type)),this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.ENUM:{const i=F0(this.getInputType());let r;V0(i)&&(r=i.getValue(e.value)),this._enumValue=r;break}}}leave(e){switch(e.kind){case De.SELECTION_SET:this._parentTypeStack.pop();break;case De.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case De.DIRECTIVE:this._directive=null;break;case De.OPERATION_DEFINITION:case De.INLINE_FRAGMENT:case De.FRAGMENT_DEFINITION:this._typeStack.pop();break;case De.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case De.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case De.LIST:case De.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case De.ENUM:this._enumValue=null;break}}}function wWt(u,e,t){const n=t.name.value;if(n===ny.name&&u.getQueryType()===e)return ny;if(n===iy.name&&u.getQueryType()===e)return iy;if(n===ry.name&&Cl(e))return ry;if(qi(e)||Ji(e))return e.getFields()[n]}function LWt(u,e){return{enter(...t){const n=t[0];u.enter(n);const i=gT(e,n.kind).enter;if(i){const r=i.apply(e,t);return r!==void 0&&(u.leave(n),VZ(r)&&u.enter(r)),r}},leave(...t){const n=t[0],i=gT(e,n.kind).leave;let r;return i&&(r=i.apply(e,t)),u.leave(n),r}}}function Hb(u,e,t){if(u){if(u.kind===De.VARIABLE){const n=u.name.value;if(t==null||t[n]===void 0)return;const i=t[n];return i===null&&Mr(e)?void 0:i}if(Mr(e))return u.kind===De.NULL?void 0:Hb(u,e.ofType,t);if(u.kind===De.NULL)return null;if(Es(e)){const n=e.ofType;if(u.kind===De.LIST){const r=[];for(const a of u.values)if(Afe(a,t)){if(Mr(n))return;r.push(null)}else{const o=Hb(a,n,t);if(o===void 0)return;r.push(o)}return r}const i=Hb(u,n,t);return i===void 0?void 0:[i]}if(jo(e)){if(u.kind!==De.OBJECT)return;const n=Object.create(null),i=HMe(u.fields,r=>r.name.value);for(const r of Object.values(e.getFields())){const a=i[r.name];if(!a||Afe(a.value,t)){if(r.defaultValue!==void 0)n[r.name]=r.defaultValue;else if(Mr(r.type))return;continue}const o=Hb(a.value,r.type,t);if(o===void 0)return;n[r.name]=o}return n}if(UI(e)){let n;try{n=e.parseLiteral(u,t)}catch{return}return n===void 0?void 0:n}$I(!1,"Unexpected input type: "+Tt(e))}}function Afe(u,e){return u.kind===De.VARIABLE&&(e==null||e[u.name.value]===void 0)}function zWt(u){const e={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...u},t=e.descriptions?"description":"",n=e.specifiedByUrl?"specifiedByURL":"",i=e.directiveIsRepeatable?"isRepeatable":"",r=e.schemaDescription?t:"";function a(o){return e.inputValueDeprecation?o:""}return` +`))}class vWt{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new Rn(e,{nodes:n}))}getErrors(){return this._errors}}function CWt(u){const e=u.schema,t=e.getQueryType();if(!t)u.reportError("Query root type must be provided.",e.astNode);else if(!qi(t)){var n;u.reportError(`Query root type must be Object type, it cannot be ${Tt(t)}.`,(n=r$(e,vl.QUERY))!==null&&n!==void 0?n:t.astNode)}const i=e.getMutationType();if(i&&!qi(i)){var r;u.reportError(`Mutation root type must be Object type if provided, it cannot be ${Tt(i)}.`,(r=r$(e,vl.MUTATION))!==null&&r!==void 0?r:i.astNode)}const a=e.getSubscriptionType();if(a&&!qi(a)){var o;u.reportError(`Subscription root type must be Object type if provided, it cannot be ${Tt(a)}.`,(o=r$(e,vl.SUBSCRIPTION))!==null&&o!==void 0?o:a.astNode)}}function r$(u,e){var t;return(t=[u.astNode,...u.extensionASTNodes].flatMap(n=>{var i;return(i=n==null?void 0:n.operationTypes)!==null&&i!==void 0?i:[]}).find(n=>n.operation===e))===null||t===void 0?void 0:t.type}function bWt(u){for(const t of u.schema.getDirectives()){if(!eTe(t)){u.reportError(`Expected directive but got: ${Tt(t)}.`,t==null?void 0:t.astNode);continue}Ep(u,t);for(const n of t.args)if(Ep(u,n),hl(n.type)||u.reportError(`The type of @${t.name}(${n.name}:) must be Input Type but got: ${Tt(n.type)}.`,n.astNode),Ine(n)&&n.deprecationReason!=null){var e;u.reportError(`Required argument @${t.name}(${n.name}:) cannot be deprecated.`,[Hne(n.astNode),(e=n.astNode)===null||e===void 0?void 0:e.type])}}}function Ep(u,e){e.name.startsWith("__")&&u.reportError(`Name "${e.name}" must not begin with "__", which is reserved by GraphQL introspection.`,e.astNode)}function kWt(u){const e=BWt(u),t=u.schema.getTypeMap();for(const n of Object.values(t)){if(!Rne(n)){u.reportError(`Expected GraphQL named type but got: ${Tt(n)}.`,n.astNode);continue}DWt(n)||Ep(u,n),qi(n)||Ji(n)?(kfe(u,n),Ffe(u,n)):Il(n)?AWt(u,n):$0(n)?_Wt(u,n):jo(n)&&(SWt(u,n),e(n))}}function kfe(u,e){const t=Object.values(e.getFields());t.length===0&&u.reportError(`Type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const a of t){if(Ep(u,a),!D3(a.type)){var n;u.reportError(`The type of ${e.name}.${a.name} must be Output Type but got: ${Tt(a.type)}.`,(n=a.astNode)===null||n===void 0?void 0:n.type)}for(const o of a.args){const s=o.name;if(Ep(u,o),!hl(o.type)){var i;u.reportError(`The type of ${e.name}.${a.name}(${s}:) must be Input Type but got: ${Tt(o.type)}.`,(i=o.astNode)===null||i===void 0?void 0:i.type)}if(Ine(o)&&o.deprecationReason!=null){var r;u.reportError(`Required argument ${e.name}.${a.name}(${s}:) cannot be deprecated.`,[Hne(o.astNode),(r=o.astNode)===null||r===void 0?void 0:r.type])}}}}function Ffe(u,e){const t=Object.create(null);for(const n of e.getInterfaces()){if(!Ji(n)){u.reportError(`Type ${Tt(e)} must only implement Interface types, it cannot implement ${Tt(n)}.`,O2(e,n));continue}if(e===n){u.reportError(`Type ${e.name} cannot implement itself because it would create a circular reference.`,O2(e,n));continue}if(t[n.name]){u.reportError(`Type ${e.name} can only implement ${n.name} once.`,O2(e,n));continue}t[n.name]=!0,yWt(u,e,n),FWt(u,e,n)}}function FWt(u,e,t){const n=e.getFields();for(const s of Object.values(t.getFields())){const l=s.name,c=n[l];if(!c){u.reportError(`Interface field ${t.name}.${l} expected but ${e.name} does not provide it.`,[s.astNode,e.astNode,...e.extensionASTNodes]);continue}if(!W8(u.schema,c.type,s.type)){var i,r;u.reportError(`Interface field ${t.name}.${l} expects type ${Tt(s.type)} but ${e.name}.${l} is type ${Tt(c.type)}.`,[(i=s.astNode)===null||i===void 0?void 0:i.type,(r=c.astNode)===null||r===void 0?void 0:r.type])}for(const d of s.args){const h=d.name,E=c.args.find(m=>m.name===h);if(!E){u.reportError(`Interface field argument ${t.name}.${l}(${h}:) expected but ${e.name}.${l} does not provide it.`,[d.astNode,c.astNode]);continue}if(!GZ(d.type,E.type)){var a,o;u.reportError(`Interface field argument ${t.name}.${l}(${h}:) expects type ${Tt(d.type)} but ${e.name}.${l}(${h}:) is type ${Tt(E.type)}.`,[(a=d.astNode)===null||a===void 0?void 0:a.type,(o=E.astNode)===null||o===void 0?void 0:o.type])}}for(const d of c.args){const h=d.name;!s.args.find(m=>m.name===h)&&Ine(d)&&u.reportError(`Object field ${e.name}.${l} includes required argument ${h} that is missing from the Interface field ${t.name}.${l}.`,[d.astNode,s.astNode])}}}function yWt(u,e,t){const n=e.getInterfaces();for(const i of t.getInterfaces())n.includes(i)||u.reportError(i===e?`Type ${e.name} cannot implement ${t.name} because it would create a circular reference.`:`Type ${e.name} must implement ${i.name} because it is implemented by ${t.name}.`,[...O2(t,i),...O2(e,t)])}function AWt(u,e){const t=e.getTypes();t.length===0&&u.reportError(`Union type ${e.name} must define one or more member types.`,[e.astNode,...e.extensionASTNodes]);const n=Object.create(null);for(const i of t){if(n[i.name]){u.reportError(`Union type ${e.name} can only include type ${i.name} once.`,yfe(e,i.name));continue}n[i.name]=!0,qi(i)||u.reportError(`Union type ${e.name} can only include Object types, it cannot include ${Tt(i)}.`,yfe(e,String(i)))}}function _Wt(u,e){const t=e.getValues();t.length===0&&u.reportError(`Enum type ${e.name} must define one or more values.`,[e.astNode,...e.extensionASTNodes]);for(const n of t)Ep(u,n)}function SWt(u,e){const t=Object.values(e.getFields());t.length===0&&u.reportError(`Input Object type ${e.name} must define one or more fields.`,[e.astNode,...e.extensionASTNodes]);for(const r of t){if(Ep(u,r),!hl(r.type)){var n;u.reportError(`The type of ${e.name}.${r.name} must be Input Type but got: ${Tt(r.type)}.`,(n=r.astNode)===null||n===void 0?void 0:n.type)}if(sWt(r)&&r.deprecationReason!=null){var i;u.reportError(`Required input field ${e.name}.${r.name} cannot be deprecated.`,[Hne(r.astNode),(i=r.astNode)===null||i===void 0?void 0:i.type])}}}function BWt(u){const e=Object.create(null),t=[],n=Object.create(null);return i;function i(r){if(e[r.name])return;e[r.name]=!0,n[r.name]=t.length;const a=Object.values(r.getFields());for(const o of a)if(Mr(o.type)&&jo(o.type.ofType)){const s=o.type.ofType,l=n[s.name];if(t.push(o),l===void 0)i(s);else{const c=t.slice(l),d=c.map(h=>h.name).join(".");u.reportError(`Cannot reference Input Object "${s.name}" within itself through a series of non-null fields: "${d}".`,c.map(h=>h.astNode))}t.pop()}n[r.name]=void 0}}function O2(u,e){const{astNode:t,extensionASTNodes:n}=u;return(t!=null?[t,...n]:n).flatMap(r=>{var a;return(a=r.interfaces)!==null&&a!==void 0?a:[]}).filter(r=>r.name.value===e.name)}function yfe(u,e){const{astNode:t,extensionASTNodes:n}=u;return(t!=null?[t,...n]:n).flatMap(r=>{var a;return(a=r.types)!==null&&a!==void 0?a:[]}).filter(r=>r.name.value===e)}function Hne(u){var e;return u==null||(e=u.directives)===null||e===void 0?void 0:e.find(t=>t.name.value===tTe.name)}function ay(u,e){switch(e.kind){case De.LIST_TYPE:{const t=ay(u,e.type);return t&&new Is(t)}case De.NON_NULL_TYPE:{const t=ay(u,e.type);return t&&new Qu(t)}case De.NAMED_TYPE:return u.getType(e.name.value)}}class cTe{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??wWt,t&&(hl(t)&&this._inputTypeStack.push(t),Cl(t)&&this._parentTypeStack.push(t),D3(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case De.SELECTION_SET:{const i=y0(this.getType());this._parentTypeStack.push(Cl(i)?i:void 0);break}case De.FIELD:{const i=this.getParentType();let r,a;i&&(r=this._getFieldDef(t,i,e),r&&(a=r.type)),this._fieldDefStack.push(r),this._typeStack.push(D3(a)?a:void 0);break}case De.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case De.OPERATION_DEFINITION:{const i=t.getRootType(e.operation);this._typeStack.push(qi(i)?i:void 0);break}case De.INLINE_FRAGMENT:case De.FRAGMENT_DEFINITION:{const i=e.typeCondition,r=i?ay(t,i):y0(this.getType());this._typeStack.push(D3(r)?r:void 0);break}case De.VARIABLE_DEFINITION:{const i=ay(t,e.type);this._inputTypeStack.push(hl(i)?i:void 0);break}case De.ARGUMENT:{var n;let i,r;const a=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();a&&(i=a.args.find(o=>o.name===e.name.value),i&&(r=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.LIST:{const i=$Me(this.getInputType()),r=ms(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.OBJECT_FIELD:{const i=y0(this.getInputType());let r,a;jo(i)&&(a=i.getFields()[e.name.value],a&&(r=a.type)),this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(hl(r)?r:void 0);break}case De.ENUM:{const i=y0(this.getInputType());let r;$0(i)&&(r=i.getValue(e.value)),this._enumValue=r;break}}}leave(e){switch(e.kind){case De.SELECTION_SET:this._parentTypeStack.pop();break;case De.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case De.DIRECTIVE:this._directive=null;break;case De.OPERATION_DEFINITION:case De.INLINE_FRAGMENT:case De.FRAGMENT_DEFINITION:this._typeStack.pop();break;case De.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case De.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case De.LIST:case De.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case De.ENUM:this._enumValue=null;break}}}function wWt(u,e,t){const n=t.name.value;if(n===ny.name&&u.getQueryType()===e)return ny;if(n===iy.name&&u.getQueryType()===e)return iy;if(n===ry.name&&Cl(e))return ry;if(qi(e)||Ji(e))return e.getFields()[n]}function LWt(u,e){return{enter(...t){const n=t[0];u.enter(n);const i=gT(e,n.kind).enter;if(i){const r=i.apply(e,t);return r!==void 0&&(u.leave(n),VZ(r)&&u.enter(r)),r}},leave(...t){const n=t[0],i=gT(e,n.kind).leave;let r;return i&&(r=i.apply(e,t)),u.leave(n),r}}}function Hb(u,e,t){if(u){if(u.kind===De.VARIABLE){const n=u.name.value;if(t==null||t[n]===void 0)return;const i=t[n];return i===null&&Mr(e)?void 0:i}if(Mr(e))return u.kind===De.NULL?void 0:Hb(u,e.ofType,t);if(u.kind===De.NULL)return null;if(ms(e)){const n=e.ofType;if(u.kind===De.LIST){const r=[];for(const a of u.values)if(Afe(a,t)){if(Mr(n))return;r.push(null)}else{const o=Hb(a,n,t);if(o===void 0)return;r.push(o)}return r}const i=Hb(u,n,t);return i===void 0?void 0:[i]}if(jo(e)){if(u.kind!==De.OBJECT)return;const n=Object.create(null),i=HMe(u.fields,r=>r.name.value);for(const r of Object.values(e.getFields())){const a=i[r.name];if(!a||Afe(a.value,t)){if(r.defaultValue!==void 0)n[r.name]=r.defaultValue;else if(Mr(r.type))return;continue}const o=Hb(a.value,r.type,t);if(o===void 0)return;n[r.name]=o}return n}if(UI(e)){let n;try{n=e.parseLiteral(u,t)}catch{return}return n===void 0?void 0:n}$I(!1,"Unexpected input type: "+Tt(e))}}function Afe(u,e){return u.kind===De.VARIABLE&&(e==null||e[u.name.value]===void 0)}function zWt(u){const e={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...u},t=e.descriptions?"description":"",n=e.specifiedByUrl?"specifiedByURL":"",i=e.directiveIsRepeatable?"isRepeatable":"",r=e.schemaDescription?t:"";function a(o){return e.inputValueDeprecation?o:""}return` query IntrospectionQuery { __schema { ${r} @@ -983,7 +983,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}function MWt(u,e){D4(u)&&D4(u.__schema)||In(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Tt(u)}.`);const t=u.__schema,n=Qf(t.types,w=>w.name,w=>h(w));for(const w of[...dWt,...oTe])n[w.name]&&(n[w.name]=w);const i=t.queryType?c(t.queryType):null,r=t.mutationType?c(t.mutationType):null,a=t.subscriptionType?c(t.subscriptionType):null,o=t.directives?t.directives.map(S):[];return new sTe({description:t.description,query:i,mutation:r,subscription:a,types:Object.values(n),directives:o,assumeValid:e==null?void 0:e.assumeValid});function s(w){if(w.kind===fi.LIST){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");return new Rs(s(z))}if(w.kind===fi.NON_NULL){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");const N=s(z);return new Qu(iWt(N))}return l(w)}function l(w){const z=w.name;if(!z)throw new Error(`Unknown type reference: ${Tt(w)}.`);const N=n[z];if(!N)throw new Error(`Invalid or incomplete schema, unknown type: ${z}. Ensure that a full introspection query is used in order to build a client schema.`);return N}function c(w){return tWt(l(w))}function d(w){return uWt(l(w))}function h(w){if(w!=null&&w.name!=null&&w.kind!=null)switch(w.kind){case fi.SCALAR:return E(w);case fi.OBJECT:return g(w);case fi.INTERFACE:return f(w);case fi.UNION:return p(w);case fi.ENUM:return D(w);case fi.INPUT_OBJECT:return x(w)}const z=Tt(w);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${z}.`)}function E(w){return new Qp({name:w.name,description:w.description,specifiedByURL:w.specifiedByURL})}function m(w){if(w.interfaces===null&&w.kind===fi.INTERFACE)return[];if(!w.interfaces){const z=Tt(w);throw new Error(`Introspection result missing interfaces: ${z}.`)}return w.interfaces.map(d)}function g(w){return new Z1({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function f(w){return new Px({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function p(w){if(!w.possibleTypes){const z=Tt(w);throw new Error(`Introspection result missing possibleTypes: ${z}.`)}return new YMe({name:w.name,description:w.description,types:()=>w.possibleTypes.map(c)})}function D(w){if(!w.enumValues){const z=Tt(w);throw new Error(`Introspection result missing enumValues: ${z}.`)}return new I6({name:w.name,description:w.description,values:Qf(w.enumValues,z=>z.name,z=>({description:z.description,deprecationReason:z.deprecationReason}))})}function x(w){if(!w.inputFields){const z=Tt(w);throw new Error(`Introspection result missing inputFields: ${z}.`)}return new One({name:w.name,description:w.description,fields:()=>A(w.inputFields)})}function b(w){if(!w.fields)throw new Error(`Introspection result missing fields: ${Tt(w)}.`);return Qf(w.fields,z=>z.name,k)}function k(w){const z=s(w.type);if(!D3(z)){const N=Tt(z);throw new Error(`Introspection must provide output type for fields, but received: ${N}.`)}if(!w.args){const N=Tt(w);throw new Error(`Introspection result missing field args: ${N}.`)}return{description:w.description,deprecationReason:w.deprecationReason,type:z,args:A(w.args)}}function A(w){return Qf(w,z=>z.name,F)}function F(w){const z=s(w.type);if(!hl(z)){const O=Tt(z);throw new Error(`Introspection must provide input type for arguments, but received: ${O}.`)}const N=w.defaultValue!=null?Hb(HKt(w.defaultValue),z):void 0;return{description:w.description,type:z,defaultValue:N,deprecationReason:w.deprecationReason}}function S(w){if(!w.args){const z=Tt(w);throw new Error(`Introspection result missing directive args: ${z}.`)}if(!w.locations){const z=Tt(w);throw new Error(`Introspection result missing directive locations: ${z}.`)}return new O6({name:w.name,description:w.description,isRepeatable:w.isRepeatable,locations:w.locations.slice(),args:A(w.args)})}}const _fe=u=>{var n,i;let e;const t=u.definitions.filter(r=>r.kind==="OperationDefinition");return t.length===1&&(e=(i=(n=t[0])==null?void 0:n.name)==null?void 0:i.value),e},a$=u=>{if(typeof u=="string"){let t;try{const n=Bg(u);t=_fe(n)}catch{}return{query:u,operationName:t}}const e=_fe(u);return{query:t0(u),operationName:e}};class j2 extends Error{constructor(e,t){const n=`${j2.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`;super(n),Object.setPrototypeOf(this,j2.prototype),this.response=e,this.request=t,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j2)}static extractMessage(e){var t,n;return((n=(t=e.errors)==null?void 0:t[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var qZ={exports:{}};(function(u,e){var t=typeof self<"u"?self:bl,n=function(){function r(){this.fetch=!1,this.DOMException=t.DOMException}return r.prototype=t,new r}();(function(r){(function(a){var o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function s(_){return _&&DataView.prototype.isPrototypeOf(_)}if(o.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function h(_){return typeof _!="string"&&(_=String(_)),_}function E(_){var L={next:function(){var T=_.shift();return{done:T===void 0,value:T}}};return o.iterable&&(L[Symbol.iterator]=function(){return L}),L}function m(_){this.map={},_ instanceof m?_.forEach(function(L,T){this.append(T,L)},this):Array.isArray(_)?_.forEach(function(L){this.append(L[0],L[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(L){this.append(L,_[L])},this)}m.prototype.append=function(_,L){_=d(_),L=h(L);var T=this.map[_];this.map[_]=T?T+", "+L:L},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,L){this.map[d(_)]=h(L)},m.prototype.forEach=function(_,L){for(var T in this.map)this.map.hasOwnProperty(T)&&_.call(L,this.map[T],T,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(L,T){_.push(T)}),E(_)},m.prototype.values=function(){var _=[];return this.forEach(function(L){_.push(L)}),E(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(L,T){_.push([T,L])}),E(_)},o.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function g(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function f(_){return new Promise(function(L,T){_.onload=function(){L(_.result)},_.onerror=function(){T(_.error)}})}function p(_){var L=new FileReader,T=f(L);return L.readAsArrayBuffer(_),T}function D(_){var L=new FileReader,T=f(L);return L.readAsText(_),T}function x(_){for(var L=new Uint8Array(_),T=new Array(L.length),R=0;R-1?L:_}function S(_,L){L=L||{};var T=L.body;if(_ instanceof S){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,L.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!T&&_._bodyInit!=null&&(T=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new m(L.headers)),this.method=F(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})};function w(_){var L=new FormData;return _.trim().split("&").forEach(function(T){if(T){var R=T.split("="),I=R.shift().replace(/\+/g," "),H=R.join("=").replace(/\+/g," ");L.append(decodeURIComponent(I),decodeURIComponent(H))}}),L}function z(_){var L=new m,T=_.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(R){var I=R.split(":"),H=I.shift().trim();if(H){var V=I.join(":").trim();L.append(H,V)}}),L}k.call(S.prototype);function N(_,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new m(L.headers),this.url=L.url||"",this._initBody(_)}k.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var O=[301,302,303,307,308];N.redirect=function(_,L){if(O.indexOf(L)===-1)throw new RangeError("Invalid status code");return new N(null,{status:L,headers:{location:_}})},a.DOMException=r.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,T){this.message=L,this.name=T;var R=Error(L);this.stack=R.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function y(_,L){return new Promise(function(T,R){var I=new S(_,L);if(I.signal&&I.signal.aborted)return R(new a.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function V(){H.abort()}H.onload=function(){var U={status:H.status,statusText:H.statusText,headers:z(H.getAllResponseHeaders()||"")};U.url="responseURL"in H?H.responseURL:U.headers.get("X-Request-URL");var J="response"in H?H.response:H.responseText;T(new N(J,U))},H.onerror=function(){R(new TypeError("Network request failed"))},H.ontimeout=function(){R(new TypeError("Network request failed"))},H.onabort=function(){R(new a.DOMException("Aborted","AbortError"))},H.open(I.method,I.url,!0),I.credentials==="include"?H.withCredentials=!0:I.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&o.blob&&(H.responseType="blob"),I.headers.forEach(function(U,J){H.setRequestHeader(J,U)}),I.signal&&(I.signal.addEventListener("abort",V),H.onreadystatechange=function(){H.readyState===4&&I.signal.removeEventListener("abort",V)}),H.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return y.polyfill=!0,r.fetch||(r.fetch=y,r.Headers=m,r.Request=S,r.Response=N),a.Headers=m,a.Request=S,a.Response=N,a.fetch=y,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,u.exports=e})(qZ,qZ.exports);var fT=qZ.exports;const G8=Hl(fT),TWt=Lxe({__proto__:null,default:G8},[fT]),RD=u=>{let e={};return u&&(typeof Headers<"u"&&u instanceof Headers||TWt&&fT.Headers&&u instanceof fT.Headers?e=cKt(u):Array.isArray(u)?u.forEach(([t,n])=>{t&&n!==void 0&&(e[t]=n)}):e=u),e},Sfe=u=>u.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),NWt=u=>{if(!Array.isArray(u.query)){const n=u,i=[`query=${encodeURIComponent(Sfe(n.query))}`];return u.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof u.variables<"u"&&!Array.isArray(u.variables))throw new Error("Cannot create query with given variable type, array expected");const e=u,t=u.query.reduce((n,i,r)=>(n.push({query:Sfe(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[r]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`},PWt=u=>async e=>{const{url:t,query:n,variables:i,operationName:r,fetch:a,fetchOptions:o,middleware:s}=e,l={...e.headers};let c="",d;u==="POST"?(d=RWt(n,i,r,o.jsonSerializer),typeof d=="string"&&(l["Content-Type"]="application/json")):c=NWt({query:n,variables:i,operationName:r,jsonSerializer:o.jsonSerializer??Mne});const h={method:u,headers:l,body:d,...o};let E=t,m=h;if(s){const g=await Promise.resolve(s({...h,url:t,operationName:r,variables:i})),{url:f,...p}=g;E=f,m=p}return c&&(E=`${E}?${c}`),await a(E,m)};class dTe{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...n)=>{const[i,r,a]=n,o=hKt(i,r,a),{headers:s,fetch:l=G8,method:c="POST",requestMiddleware:d,responseMiddleware:h,...E}=this.requestConfig,{url:m}=this;o.signal!==void 0&&(E.signal=o.signal);const{operationName:g}=a$(o.query);return o$({url:m,query:o.query,variables:o.variables,headers:{...RD(s$(s)),...RD(o.requestHeaders)},operationName:g,fetch:l,method:c,fetchOptions:E,middleware:d}).then(f=>(h&&h(f),f)).catch(f=>{throw h&&h(f),f})}}async request(e,...t){const[n,i]=t,r=dKt(e,n,i),{headers:a,fetch:o=G8,method:s="POST",requestMiddleware:l,responseMiddleware:c,...d}=this.requestConfig,{url:h}=this;r.signal!==void 0&&(d.signal=r.signal);const{query:E,operationName:m}=a$(r.document);return o$({url:h,query:E,variables:r.variables,headers:{...RD(s$(a)),...RD(r.requestHeaders)},operationName:m,fetch:o,method:s,fetchOptions:d,middleware:l}).then(g=>(c&&c(g),g.data)).catch(g=>{throw c&&c(g),g})}batchRequests(e,t){const n=EKt(e,t),{headers:i,...r}=this.requestConfig;n.signal!==void 0&&(r.signal=n.signal);const a=n.documents.map(({document:s})=>a$(s).query),o=n.documents.map(({variables:s})=>s);return o$({url:this.url,query:a,variables:o,headers:{...RD(s$(i)),...RD(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??G8,method:this.requestConfig.method||"POST",fetchOptions:r,middleware:this.requestConfig.requestMiddleware}).then(s=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s.data)).catch(s=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}const o$=async u=>{const{query:e,variables:t,fetchOptions:n}=u,i=PWt(lKt(u.method??"post")),r=Array.isArray(u.query),a=await i(u),o=await IWt(a,n.jsonSerializer??Mne),s=Array.isArray(o)?!o.some(({data:c})=>!c):!!o.data,l=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&l&&s){const{errors:c,...d}=(Array.isArray(o),o),h=n.errorPolicy==="ignore"?d:o;return{...r?{data:h}:h,headers:a.headers,status:a.status}}else{const c=typeof o=="string"?{error:o}:o;throw new j2({...c,status:a.status,headers:a.headers},{query:e,variables:t})}};async function JZ(u,e,...t){const n=mKt(u,e,...t);return new dTe(n.url).request({...n})}const RWt=(u,e,t,n)=>{const i=n??Mne;if(!Array.isArray(u))return i.stringify({query:u,variables:e,operationName:t});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const r=u.reduce((a,o,s)=>(a.push({query:o,variables:e?e[s]:void 0}),a),[]);return i.stringify(r)},IWt=async(u,e)=>{let t;return u.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(t=n)}),t&&(t.toLowerCase().startsWith("application/json")||t.toLowerCase().startsWith("application/graphql+json")||t.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await u.text()):u.text()},s$=u=>typeof u=="function"?u():u;let pT=u=>u,Qd={},Nd={addEventListener(){},removeEventListener(){}};function OWt(){try{return typeof localStorage<"u"}catch{return!1}}OWt()&&(Qd=localStorage);let jWt={addEventListener(u,e,t){window.addEventListener("storage",e),window.addEventListener("pageshow",t)},removeEventListener(u,e,t){window.removeEventListener("storage",e),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(Nd=jWt);function Vne(u,e=void 0,t={}){let n=t.encode||pT,i=t.decode||pT,r=Bne(e),a=r.set;r.set=l=>{typeof l>"u"?delete Qd[u]:Qd[u]=n(l),a(l)};function o(l){l.key===u?l.newValue===null?a(void 0):a(i(l.newValue)):Qd[u]||a(void 0)}function s(){r.set(Qd[u]?i(Qd[u]):e)}return EMe(r,()=>{if(s(),t.listen!==!1)return Nd.addEventListener(u,o,s),()=>{Nd.removeEventListener(u,o,s)}}),r}function HWt(u,e={},t={}){let n=t.encode||pT,i=t.decode||pT,r=mMe(),a=r.setKey;r.setKey=(c,d)=>{typeof d>"u"?(t.listen!==!1&&Nd.perKey&&Nd.removeEventListener(u+c,s,l),delete Qd[u+c]):(t.listen!==!1&&Nd.perKey&&!(c in r.value)&&Nd.addEventListener(u+c,s,l),Qd[u+c]=n(d)),a(c,d)};let o=r.set;r.set=function(c){for(let d in c)r.setKey(d,c[d]);for(let d in r.value)d in c||r.setKey(d)};function s(c){c.key?c.key.startsWith(u)&&(c.newValue===null?a(c.key.slice(u.length),void 0):a(c.key.slice(u.length),i(c.newValue))):o({})}function l(){let c={...e};for(let d in Qd)d.startsWith(u)&&(c[d.slice(u.length)]=i(Qd[d]));r.set(c)}return EMe(r,()=>{if(l(),t.listen!==!1)return Nd.addEventListener(u,s,l),()=>{Nd.removeEventListener(u,s,l);for(let c in r.value)Nd.removeEventListener(u+c,s,l)}}),r}var al=(u=>(u.Fixed="fixed",u.Min="min",u.MinAvg10="min_avg10",u.MinMovingAvg="min_moving_avg",u.Random="random",u))(al||{});const VWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetJsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},$Wt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetMode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},KWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},WWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},GWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},UWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},qWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},JWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},ZWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},YWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},QWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},XWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},eGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},tGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},uGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},nGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},iGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},rGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},aGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},oGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupSetPolicy"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupSetPolicy"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}]}]}}]},sGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},lGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},cGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},dGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},hGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},EGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"args"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"args"},value:{kind:"Variable",name:{kind:"Name",value:"args"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"error"}},{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},mGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},gGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"arg"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"arg"},value:{kind:"Variable",name:{kind:"Name",value:"arg"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"sub"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"nodeImportResult"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]},fGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},pGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},DGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Run"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dry"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"run"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dry"},value:{kind:"Variable",name:{kind:"Name",value:"dry"}}}]}]}}]},xGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAvatar"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"avatar"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateAvatar"},arguments:[{kind:"Argument",name:{kind:"Name",value:"avatar"},value:{kind:"Variable",name:{kind:"Name",value:"avatar"}}}]}]}}]},vGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},CGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Mode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},bGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Defaults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},kGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Interfaces"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},FGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"JsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},yGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"General"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dae"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"running"}},{kind:"Field",name:{kind:"Name",value:"modified"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},AGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}}]}}]}}]}}]},_Gt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"link"}}]}}]}}]}}]}}]},SGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"global"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logLevel"}},{kind:"Field",name:{kind:"Name",value:"tproxyPort"}},{kind:"Field",name:{kind:"Name",value:"allowInsecure"}},{kind:"Field",name:{kind:"Name",value:"checkInterval"}},{kind:"Field",name:{kind:"Name",value:"checkTolerance"}},{kind:"Field",name:{kind:"Name",value:"lanInterface"}},{kind:"Field",name:{kind:"Name",value:"wanInterface"}},{kind:"Field",name:{kind:"Name",value:"udpCheckDns"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckUrl"}},{kind:"Field",name:{kind:"Name",value:"dialMode"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckHttpMethod"}},{kind:"Field",name:{kind:"Name",value:"disableWaitingNetwork"}},{kind:"Field",name:{kind:"Name",value:"autoConfigKernelParameter"}},{kind:"Field",name:{kind:"Name",value:"sniffingTimeout"}},{kind:"Field",name:{kind:"Name",value:"tlsImplementation"}},{kind:"Field",name:{kind:"Name",value:"utlsImitate"}},{kind:"Field",name:{kind:"Name",value:"tproxyPortProtect"}},{kind:"Field",name:{kind:"Name",value:"soMarkFromDae"}}]}}]}}]}}]},BGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}},{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"policy"}},{kind:"Field",name:{kind:"Name",value:"policyParams"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"val"}}]}}]}}]}}]},wGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}}]},LGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DNSs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dnss"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dns"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"request"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}},{kind:"Field",name:{kind:"Name",value:"response"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"selected"}}]}}]}}]},zGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"User"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"}}]}}]}}]},MGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NumberUsers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberUsers"}}]}}]},TGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]},NGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Token"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]};var $ne=(u=>(u.error="error",u.warn="warn",u.info="info",u.debug="debug",u.trace="trace",u))($ne||{}),hc=(u=>(u.ip="ip",u.domain="domain",u.domainP="domain+",u.domainPP="domain++",u))(hc||{}),Kne=(u=>(u.CONNECT="CONNECT",u.HEAD="HEAD",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.GET="GET",u.POST="POST",u.DELETE="DELETE",u.PATCH="PATCH",u.PUT="PUT",u))(Kne||{}),DT=(u=>(u.tls="tls",u.utls="utls",u))(DT||{}),Wne=(u=>(u.randomized="randomized",u.randomizedalpn="randomizedalpn",u.randomizednoalpn="randomizednoalpn",u.firefox_auto="firefox_auto",u.firefox_55="firefox_55",u.firefox_56="firefox_56",u.firefox_63="firefox_63",u.firefox_65="firefox_65",u.firefox_99="firefox_99",u.firefox_102="firefox_102",u.firefox_105="firefox_105",u.chrome_auto="chrome_auto",u.chrome_58="chrome_58",u.chrome_62="chrome_62",u.chrome_70="chrome_70",u.chrome_72="chrome_72",u.chrome_83="chrome_83",u.chrome_87="chrome_87",u.chrome_96="chrome_96",u.chrome_100="chrome_100",u.chrome_102="chrome_102",u.ios_auto="ios_auto",u.ios_11_1="ios_11_1",u.ios_12_1="ios_12_1",u.ios_13="ios_13",u.ios_14="ios_14",u.android_11_okhttp="android_11_okhttp",u.edge_auto="edge_auto",u.edge_85="edge_85",u.edge_106="edge_106",u.safari_auto="safari_auto",u.safari_16_0="safari_16_0",u.utls_360_auto="360_auto",u.utls_360_7_5="360_7_5",u.utls_360_11_0="360_11_0",u.qq_auto="qq_auto",u.qq_11_1="qq_11_1",u))(Wne||{});const hTe=u=>[[u("error"),"error"],[u("warn"),"warn"],[u("info"),"info"],[u("debug"),"debug"],[u("trace"),"trace"]];var ZZ=(u=>(u.simple="simple",u.advanced="advanced",u))(ZZ||{});const PGt=3,ja=["general"],Gne=["user"],Une=["node"],JI=["subscription"],Xp=["config"],j6=["routing"],H6=["dns"],Ql=["group"];var Xi=(u=>(u.node="node",u.subscription="subscription",u.subscription_node="subscription_node",u.groupNode="group_node",u.groupSubscription="group_subscription",u))(Xi||{}),es=(u=>(u.config="config",u.dns="dns",u.routing="routing",u.group="group",u))(es||{});const ETe=`${location.protocol}//${location.hostname}:2023/graphql`,RGt=$ne.info,mTe=12345,gTe=!0,fTe=0,pTe=!1,DTe=30,xTe=0,vTe=100,CTe=["dns.google.com:53","8.8.8.8","2001:4860:4860::8888"],bTe=["http://cp.cloudflare.com","1.1.1.1","2606:4700:4700::1111"],kTe=hc.domain,FTe=Kne.HEAD,yTe=!1,ATe=!0,_Te=DT.tls,STe=Wne.chrome_auto,IGt="global",OGt="default",jGt="default",BTe="proxy",HGt=(u=[])=>({logLevel:RGt,tproxyPort:mTe,tproxyPortProtect:gTe,soMarkFromDae:fTe,allowInsecure:pTe,checkInterval:`${DTe}s`,checkTolerance:`${xTe}ms`,sniffingTimeout:`${vTe}ms`,lanInterface:u,wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,tcpCheckHttpMethod:FTe,dialMode:kTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe,disableWaitingNetwork:yTe}),wTe=al.MinMovingAvg,VGt=` + `}function MWt(u,e){D4(u)&&D4(u.__schema)||In(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Tt(u)}.`);const t=u.__schema,n=Qf(t.types,w=>w.name,w=>h(w));for(const w of[...dWt,...oTe])n[w.name]&&(n[w.name]=w);const i=t.queryType?c(t.queryType):null,r=t.mutationType?c(t.mutationType):null,a=t.subscriptionType?c(t.subscriptionType):null,o=t.directives?t.directives.map(S):[];return new sTe({description:t.description,query:i,mutation:r,subscription:a,types:Object.values(n),directives:o,assumeValid:e==null?void 0:e.assumeValid});function s(w){if(w.kind===fi.LIST){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");return new Is(s(z))}if(w.kind===fi.NON_NULL){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");const N=s(z);return new Qu(iWt(N))}return l(w)}function l(w){const z=w.name;if(!z)throw new Error(`Unknown type reference: ${Tt(w)}.`);const N=n[z];if(!N)throw new Error(`Invalid or incomplete schema, unknown type: ${z}. Ensure that a full introspection query is used in order to build a client schema.`);return N}function c(w){return tWt(l(w))}function d(w){return uWt(l(w))}function h(w){if(w!=null&&w.name!=null&&w.kind!=null)switch(w.kind){case fi.SCALAR:return E(w);case fi.OBJECT:return g(w);case fi.INTERFACE:return f(w);case fi.UNION:return p(w);case fi.ENUM:return D(w);case fi.INPUT_OBJECT:return x(w)}const z=Tt(w);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${z}.`)}function E(w){return new Qp({name:w.name,description:w.description,specifiedByURL:w.specifiedByURL})}function m(w){if(w.interfaces===null&&w.kind===fi.INTERFACE)return[];if(!w.interfaces){const z=Tt(w);throw new Error(`Introspection result missing interfaces: ${z}.`)}return w.interfaces.map(d)}function g(w){return new Z1({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function f(w){return new Px({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function p(w){if(!w.possibleTypes){const z=Tt(w);throw new Error(`Introspection result missing possibleTypes: ${z}.`)}return new YMe({name:w.name,description:w.description,types:()=>w.possibleTypes.map(c)})}function D(w){if(!w.enumValues){const z=Tt(w);throw new Error(`Introspection result missing enumValues: ${z}.`)}return new I6({name:w.name,description:w.description,values:Qf(w.enumValues,z=>z.name,z=>({description:z.description,deprecationReason:z.deprecationReason}))})}function x(w){if(!w.inputFields){const z=Tt(w);throw new Error(`Introspection result missing inputFields: ${z}.`)}return new One({name:w.name,description:w.description,fields:()=>A(w.inputFields)})}function b(w){if(!w.fields)throw new Error(`Introspection result missing fields: ${Tt(w)}.`);return Qf(w.fields,z=>z.name,k)}function k(w){const z=s(w.type);if(!D3(z)){const N=Tt(z);throw new Error(`Introspection must provide output type for fields, but received: ${N}.`)}if(!w.args){const N=Tt(w);throw new Error(`Introspection result missing field args: ${N}.`)}return{description:w.description,deprecationReason:w.deprecationReason,type:z,args:A(w.args)}}function A(w){return Qf(w,z=>z.name,F)}function F(w){const z=s(w.type);if(!hl(z)){const O=Tt(z);throw new Error(`Introspection must provide input type for arguments, but received: ${O}.`)}const N=w.defaultValue!=null?Hb(HKt(w.defaultValue),z):void 0;return{description:w.description,type:z,defaultValue:N,deprecationReason:w.deprecationReason}}function S(w){if(!w.args){const z=Tt(w);throw new Error(`Introspection result missing directive args: ${z}.`)}if(!w.locations){const z=Tt(w);throw new Error(`Introspection result missing directive locations: ${z}.`)}return new O6({name:w.name,description:w.description,isRepeatable:w.isRepeatable,locations:w.locations.slice(),args:A(w.args)})}}const _fe=u=>{var n,i;let e;const t=u.definitions.filter(r=>r.kind==="OperationDefinition");return t.length===1&&(e=(i=(n=t[0])==null?void 0:n.name)==null?void 0:i.value),e},a$=u=>{if(typeof u=="string"){let t;try{const n=Bg(u);t=_fe(n)}catch{}return{query:u,operationName:t}}const e=_fe(u);return{query:u0(u),operationName:e}};class j2 extends Error{constructor(e,t){const n=`${j2.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`;super(n),Object.setPrototypeOf(this,j2.prototype),this.response=e,this.request=t,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j2)}static extractMessage(e){var t,n;return((n=(t=e.errors)==null?void 0:t[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var qZ={exports:{}};(function(u,e){var t=typeof self<"u"?self:bl,n=function(){function r(){this.fetch=!1,this.DOMException=t.DOMException}return r.prototype=t,new r}();(function(r){(function(a){var o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function s(_){return _&&DataView.prototype.isPrototypeOf(_)}if(o.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function h(_){return typeof _!="string"&&(_=String(_)),_}function E(_){var L={next:function(){var T=_.shift();return{done:T===void 0,value:T}}};return o.iterable&&(L[Symbol.iterator]=function(){return L}),L}function m(_){this.map={},_ instanceof m?_.forEach(function(L,T){this.append(T,L)},this):Array.isArray(_)?_.forEach(function(L){this.append(L[0],L[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(L){this.append(L,_[L])},this)}m.prototype.append=function(_,L){_=d(_),L=h(L);var T=this.map[_];this.map[_]=T?T+", "+L:L},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,L){this.map[d(_)]=h(L)},m.prototype.forEach=function(_,L){for(var T in this.map)this.map.hasOwnProperty(T)&&_.call(L,this.map[T],T,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(L,T){_.push(T)}),E(_)},m.prototype.values=function(){var _=[];return this.forEach(function(L){_.push(L)}),E(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(L,T){_.push([T,L])}),E(_)},o.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function g(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function f(_){return new Promise(function(L,T){_.onload=function(){L(_.result)},_.onerror=function(){T(_.error)}})}function p(_){var L=new FileReader,T=f(L);return L.readAsArrayBuffer(_),T}function D(_){var L=new FileReader,T=f(L);return L.readAsText(_),T}function x(_){for(var L=new Uint8Array(_),T=new Array(L.length),R=0;R-1?L:_}function S(_,L){L=L||{};var T=L.body;if(_ instanceof S){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,L.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!T&&_._bodyInit!=null&&(T=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new m(L.headers)),this.method=F(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})};function w(_){var L=new FormData;return _.trim().split("&").forEach(function(T){if(T){var R=T.split("="),I=R.shift().replace(/\+/g," "),H=R.join("=").replace(/\+/g," ");L.append(decodeURIComponent(I),decodeURIComponent(H))}}),L}function z(_){var L=new m,T=_.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(R){var I=R.split(":"),H=I.shift().trim();if(H){var V=I.join(":").trim();L.append(H,V)}}),L}k.call(S.prototype);function N(_,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new m(L.headers),this.url=L.url||"",this._initBody(_)}k.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var O=[301,302,303,307,308];N.redirect=function(_,L){if(O.indexOf(L)===-1)throw new RangeError("Invalid status code");return new N(null,{status:L,headers:{location:_}})},a.DOMException=r.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,T){this.message=L,this.name=T;var R=Error(L);this.stack=R.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function y(_,L){return new Promise(function(T,R){var I=new S(_,L);if(I.signal&&I.signal.aborted)return R(new a.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function V(){H.abort()}H.onload=function(){var U={status:H.status,statusText:H.statusText,headers:z(H.getAllResponseHeaders()||"")};U.url="responseURL"in H?H.responseURL:U.headers.get("X-Request-URL");var J="response"in H?H.response:H.responseText;T(new N(J,U))},H.onerror=function(){R(new TypeError("Network request failed"))},H.ontimeout=function(){R(new TypeError("Network request failed"))},H.onabort=function(){R(new a.DOMException("Aborted","AbortError"))},H.open(I.method,I.url,!0),I.credentials==="include"?H.withCredentials=!0:I.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&o.blob&&(H.responseType="blob"),I.headers.forEach(function(U,J){H.setRequestHeader(J,U)}),I.signal&&(I.signal.addEventListener("abort",V),H.onreadystatechange=function(){H.readyState===4&&I.signal.removeEventListener("abort",V)}),H.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return y.polyfill=!0,r.fetch||(r.fetch=y,r.Headers=m,r.Request=S,r.Response=N),a.Headers=m,a.Request=S,a.Response=N,a.fetch=y,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,u.exports=e})(qZ,qZ.exports);var fT=qZ.exports;const G8=Hl(fT),TWt=Lxe({__proto__:null,default:G8},[fT]),RD=u=>{let e={};return u&&(typeof Headers<"u"&&u instanceof Headers||TWt&&fT.Headers&&u instanceof fT.Headers?e=cKt(u):Array.isArray(u)?u.forEach(([t,n])=>{t&&n!==void 0&&(e[t]=n)}):e=u),e},Sfe=u=>u.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),NWt=u=>{if(!Array.isArray(u.query)){const n=u,i=[`query=${encodeURIComponent(Sfe(n.query))}`];return u.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof u.variables<"u"&&!Array.isArray(u.variables))throw new Error("Cannot create query with given variable type, array expected");const e=u,t=u.query.reduce((n,i,r)=>(n.push({query:Sfe(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[r]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`},PWt=u=>async e=>{const{url:t,query:n,variables:i,operationName:r,fetch:a,fetchOptions:o,middleware:s}=e,l={...e.headers};let c="",d;u==="POST"?(d=RWt(n,i,r,o.jsonSerializer),typeof d=="string"&&(l["Content-Type"]="application/json")):c=NWt({query:n,variables:i,operationName:r,jsonSerializer:o.jsonSerializer??Mne});const h={method:u,headers:l,body:d,...o};let E=t,m=h;if(s){const g=await Promise.resolve(s({...h,url:t,operationName:r,variables:i})),{url:f,...p}=g;E=f,m=p}return c&&(E=`${E}?${c}`),await a(E,m)};class dTe{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...n)=>{const[i,r,a]=n,o=hKt(i,r,a),{headers:s,fetch:l=G8,method:c="POST",requestMiddleware:d,responseMiddleware:h,...E}=this.requestConfig,{url:m}=this;o.signal!==void 0&&(E.signal=o.signal);const{operationName:g}=a$(o.query);return o$({url:m,query:o.query,variables:o.variables,headers:{...RD(s$(s)),...RD(o.requestHeaders)},operationName:g,fetch:l,method:c,fetchOptions:E,middleware:d}).then(f=>(h&&h(f),f)).catch(f=>{throw h&&h(f),f})}}async request(e,...t){const[n,i]=t,r=dKt(e,n,i),{headers:a,fetch:o=G8,method:s="POST",requestMiddleware:l,responseMiddleware:c,...d}=this.requestConfig,{url:h}=this;r.signal!==void 0&&(d.signal=r.signal);const{query:E,operationName:m}=a$(r.document);return o$({url:h,query:E,variables:r.variables,headers:{...RD(s$(a)),...RD(r.requestHeaders)},operationName:m,fetch:o,method:s,fetchOptions:d,middleware:l}).then(g=>(c&&c(g),g.data)).catch(g=>{throw c&&c(g),g})}batchRequests(e,t){const n=EKt(e,t),{headers:i,...r}=this.requestConfig;n.signal!==void 0&&(r.signal=n.signal);const a=n.documents.map(({document:s})=>a$(s).query),o=n.documents.map(({variables:s})=>s);return o$({url:this.url,query:a,variables:o,headers:{...RD(s$(i)),...RD(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??G8,method:this.requestConfig.method||"POST",fetchOptions:r,middleware:this.requestConfig.requestMiddleware}).then(s=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s.data)).catch(s=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}const o$=async u=>{const{query:e,variables:t,fetchOptions:n}=u,i=PWt(lKt(u.method??"post")),r=Array.isArray(u.query),a=await i(u),o=await IWt(a,n.jsonSerializer??Mne),s=Array.isArray(o)?!o.some(({data:c})=>!c):!!o.data,l=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&l&&s){const{errors:c,...d}=(Array.isArray(o),o),h=n.errorPolicy==="ignore"?d:o;return{...r?{data:h}:h,headers:a.headers,status:a.status}}else{const c=typeof o=="string"?{error:o}:o;throw new j2({...c,status:a.status,headers:a.headers},{query:e,variables:t})}};async function JZ(u,e,...t){const n=mKt(u,e,...t);return new dTe(n.url).request({...n})}const RWt=(u,e,t,n)=>{const i=n??Mne;if(!Array.isArray(u))return i.stringify({query:u,variables:e,operationName:t});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const r=u.reduce((a,o,s)=>(a.push({query:o,variables:e?e[s]:void 0}),a),[]);return i.stringify(r)},IWt=async(u,e)=>{let t;return u.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(t=n)}),t&&(t.toLowerCase().startsWith("application/json")||t.toLowerCase().startsWith("application/graphql+json")||t.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await u.text()):u.text()},s$=u=>typeof u=="function"?u():u;let pT=u=>u,Qd={},Nd={addEventListener(){},removeEventListener(){}};function OWt(){try{return typeof localStorage<"u"}catch{return!1}}OWt()&&(Qd=localStorage);let jWt={addEventListener(u,e,t){window.addEventListener("storage",e),window.addEventListener("pageshow",t)},removeEventListener(u,e,t){window.removeEventListener("storage",e),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(Nd=jWt);function Vne(u,e=void 0,t={}){let n=t.encode||pT,i=t.decode||pT,r=Bne(e),a=r.set;r.set=l=>{typeof l>"u"?delete Qd[u]:Qd[u]=n(l),a(l)};function o(l){l.key===u?l.newValue===null?a(void 0):a(i(l.newValue)):Qd[u]||a(void 0)}function s(){r.set(Qd[u]?i(Qd[u]):e)}return EMe(r,()=>{if(s(),t.listen!==!1)return Nd.addEventListener(u,o,s),()=>{Nd.removeEventListener(u,o,s)}}),r}function HWt(u,e={},t={}){let n=t.encode||pT,i=t.decode||pT,r=mMe(),a=r.setKey;r.setKey=(c,d)=>{typeof d>"u"?(t.listen!==!1&&Nd.perKey&&Nd.removeEventListener(u+c,s,l),delete Qd[u+c]):(t.listen!==!1&&Nd.perKey&&!(c in r.value)&&Nd.addEventListener(u+c,s,l),Qd[u+c]=n(d)),a(c,d)};let o=r.set;r.set=function(c){for(let d in c)r.setKey(d,c[d]);for(let d in r.value)d in c||r.setKey(d)};function s(c){c.key?c.key.startsWith(u)&&(c.newValue===null?a(c.key.slice(u.length),void 0):a(c.key.slice(u.length),i(c.newValue))):o({})}function l(){let c={...e};for(let d in Qd)d.startsWith(u)&&(c[d.slice(u.length)]=i(Qd[d]));r.set(c)}return EMe(r,()=>{if(l(),t.listen!==!1)return Nd.addEventListener(u,s,l),()=>{Nd.removeEventListener(u,s,l);for(let c in r.value)Nd.removeEventListener(u+c,s,l)}}),r}var qo=(u=>(u.Fixed="fixed",u.Min="min",u.MinAvg10="min_avg10",u.MinMovingAvg="min_moving_avg",u.Random="random",u))(qo||{});const VWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetJsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},$Wt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetMode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},KWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},WWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},GWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},UWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},qWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},JWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},ZWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},YWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},QWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},XWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},eGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},tGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},uGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},nGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},iGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},rGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},aGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},oGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupSetPolicy"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupSetPolicy"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}]}]}}]},sGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},lGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},cGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},dGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},hGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},EGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"args"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"args"},value:{kind:"Variable",name:{kind:"Name",value:"args"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"error"}},{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},mGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},gGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"arg"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"arg"},value:{kind:"Variable",name:{kind:"Name",value:"arg"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"sub"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"nodeImportResult"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]},fGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},pGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},DGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Run"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dry"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"run"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dry"},value:{kind:"Variable",name:{kind:"Name",value:"dry"}}}]}]}}]},xGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAvatar"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"avatar"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateAvatar"},arguments:[{kind:"Argument",name:{kind:"Name",value:"avatar"},value:{kind:"Variable",name:{kind:"Name",value:"avatar"}}}]}]}}]},vGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},CGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Mode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},bGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Defaults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},kGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Interfaces"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},FGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"JsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},yGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"General"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dae"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"running"}},{kind:"Field",name:{kind:"Name",value:"modified"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},AGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}}]}}]}}]}}]},_Gt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"link"}}]}}]}}]}}]}}]},SGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"global"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logLevel"}},{kind:"Field",name:{kind:"Name",value:"tproxyPort"}},{kind:"Field",name:{kind:"Name",value:"allowInsecure"}},{kind:"Field",name:{kind:"Name",value:"checkInterval"}},{kind:"Field",name:{kind:"Name",value:"checkTolerance"}},{kind:"Field",name:{kind:"Name",value:"lanInterface"}},{kind:"Field",name:{kind:"Name",value:"wanInterface"}},{kind:"Field",name:{kind:"Name",value:"udpCheckDns"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckUrl"}},{kind:"Field",name:{kind:"Name",value:"dialMode"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckHttpMethod"}},{kind:"Field",name:{kind:"Name",value:"disableWaitingNetwork"}},{kind:"Field",name:{kind:"Name",value:"autoConfigKernelParameter"}},{kind:"Field",name:{kind:"Name",value:"sniffingTimeout"}},{kind:"Field",name:{kind:"Name",value:"tlsImplementation"}},{kind:"Field",name:{kind:"Name",value:"utlsImitate"}},{kind:"Field",name:{kind:"Name",value:"tproxyPortProtect"}},{kind:"Field",name:{kind:"Name",value:"soMarkFromDae"}}]}}]}}]}}]},BGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}},{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"policy"}},{kind:"Field",name:{kind:"Name",value:"policyParams"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"val"}}]}}]}}]}}]},wGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}}]},LGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DNSs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dnss"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dns"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"request"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}},{kind:"Field",name:{kind:"Name",value:"response"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"selected"}}]}}]}}]},zGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"User"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"}}]}}]}}]},MGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NumberUsers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberUsers"}}]}}]},TGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]},NGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Token"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]};var $ne=(u=>(u.error="error",u.warn="warn",u.info="info",u.debug="debug",u.trace="trace",u))($ne||{}),hc=(u=>(u.ip="ip",u.domain="domain",u.domainP="domain+",u.domainPP="domain++",u))(hc||{}),Kne=(u=>(u.CONNECT="CONNECT",u.HEAD="HEAD",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.GET="GET",u.POST="POST",u.DELETE="DELETE",u.PATCH="PATCH",u.PUT="PUT",u))(Kne||{}),DT=(u=>(u.tls="tls",u.utls="utls",u))(DT||{}),Wne=(u=>(u.randomized="randomized",u.randomizedalpn="randomizedalpn",u.randomizednoalpn="randomizednoalpn",u.firefox_auto="firefox_auto",u.firefox_55="firefox_55",u.firefox_56="firefox_56",u.firefox_63="firefox_63",u.firefox_65="firefox_65",u.firefox_99="firefox_99",u.firefox_102="firefox_102",u.firefox_105="firefox_105",u.chrome_auto="chrome_auto",u.chrome_58="chrome_58",u.chrome_62="chrome_62",u.chrome_70="chrome_70",u.chrome_72="chrome_72",u.chrome_83="chrome_83",u.chrome_87="chrome_87",u.chrome_96="chrome_96",u.chrome_100="chrome_100",u.chrome_102="chrome_102",u.ios_auto="ios_auto",u.ios_11_1="ios_11_1",u.ios_12_1="ios_12_1",u.ios_13="ios_13",u.ios_14="ios_14",u.android_11_okhttp="android_11_okhttp",u.edge_auto="edge_auto",u.edge_85="edge_85",u.edge_106="edge_106",u.safari_auto="safari_auto",u.safari_16_0="safari_16_0",u.utls_360_auto="360_auto",u.utls_360_7_5="360_7_5",u.utls_360_11_0="360_11_0",u.qq_auto="qq_auto",u.qq_11_1="qq_11_1",u))(Wne||{});const hTe=u=>[[u("error"),"error"],[u("warn"),"warn"],[u("info"),"info"],[u("debug"),"debug"],[u("trace"),"trace"]];var ZZ=(u=>(u.simple="simple",u.advanced="advanced",u))(ZZ||{});const PGt=3,ja=["general"],Gne=["user"],Une=["node"],JI=["subscription"],Xp=["config"],j6=["routing"],H6=["dns"],Ql=["group"];var Xi=(u=>(u.node="node",u.subscription="subscription",u.subscription_node="subscription_node",u.groupNode="group_node",u.groupSubscription="group_subscription",u))(Xi||{}),ts=(u=>(u.config="config",u.dns="dns",u.routing="routing",u.group="group",u))(ts||{});const ETe=`${location.protocol}//${location.hostname}:2023/graphql`,RGt=$ne.info,mTe=12345,gTe=!0,fTe=0,pTe=!1,DTe=30,xTe=0,vTe=100,CTe=["dns.google.com:53","8.8.8.8","2001:4860:4860::8888"],bTe=["http://cp.cloudflare.com","1.1.1.1","2606:4700:4700::1111"],kTe=hc.domain,FTe=Kne.HEAD,yTe=!1,ATe=!0,_Te=DT.tls,STe=Wne.chrome_auto,IGt="global",OGt="default",jGt="default",BTe="proxy",HGt=(u=[])=>({logLevel:RGt,tproxyPort:mTe,tproxyPortProtect:gTe,soMarkFromDae:fTe,allowInsecure:pTe,checkInterval:`${DTe}s`,checkTolerance:`${xTe}ms`,sniffingTimeout:`${vTe}ms`,lanInterface:u,wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,tcpCheckHttpMethod:FTe,dialMode:kTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe,disableWaitingNetwork:yTe}),wTe=qo.MinMovingAvg,VGt=` pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct dip(geoip:private) -> direct dip(geoip:cn) -> direct @@ -1000,7 +1000,7 @@ routing { fallback: googledns } } -`.trim(),KGt={type:"none",tls:"none",net:"tcp",scy:"auto",add:"",aid:0,allowInsecure:!1,alpn:"",flow:"none",host:"",id:"",path:"",port:0,ps:"",v:"",sni:""},WGt={plugin:"",method:"aes-128-gcm",obfs:"http",host:"",impl:"",mode:"",name:"",password:"",path:"",port:0,server:"",tls:""},GGt={method:"aes-128-cfb",proto:"origin",obfs:"plain",name:"",obfsParam:"",password:"",port:0,protoParam:"",server:""},UGt={method:"origin",obfs:"none",allowInsecure:!1,host:"",name:"",password:"",path:"",peer:"",port:0,server:"",ssCipher:"aes-128-gcm",ssPassword:""},qGt={name:"",port:0,server:"",alpn:"",congestion_control:"",disable_sni:!1,allowInsecure:!1,uuid:"",password:"",udp_relay_mode:"",sni:""},JGt={name:"",port:0,server:"",congestion_control:"",allowInsecure:!1,uuid:"",password:"",pinned_certchain_sha256:"",sni:""},ZGt={name:"",port:443,server:"",auth:"",obfs:"",obfsPassword:"",sni:"",allowInsecure:!1,pinSHA256:""},YGt={host:"",name:"",password:"",port:0,username:""},QGt={host:"",name:"",password:"",port:0,username:""},XGt="vs-dark",eUt="githubLight",LTe={fontSize:14,fontWeight:"bold",fontFamily:"Source Code Pro","semanticHighlighting.enabled":!0,lineHeight:1.6,minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"selection",cursorBlinking:"solid",formatOnPaste:!0,insertSpaces:!0,tabSize:2,lineNumbers:"off",padding:{top:8,bottom:8}},tUt={ignoreCase:!1,keywords:["dip","direct","domain","dport","fallback","must_rules","ipversion","l4proto","mac","pname","qname","request","response","routing","sip","sport","tcp","udp","upstream"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,symbols:/[->&!:,]+/,operators:["&&","!"],tokenizer:{root:[[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[{}()]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d+/,"number"],[/[,:]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*$/,"comment"]]}};var An;(function(u){u.assertEqual=i=>i;function e(i){}u.assertIs=e;function t(i){throw new Error}u.assertNever=t,u.arrayToEnum=i=>{const r={};for(const a of i)r[a]=a;return r},u.getValidEnumValues=i=>{const r=u.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of r)a[o]=i[o];return u.objectValues(a)},u.objectValues=i=>u.objectKeys(i).map(function(r){return i[r]}),u.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const r=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&r.push(a);return r},u.find=(i,r)=>{for(const a of i)if(r(a))return a},u.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,r=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(r)}u.joinValues=n,u.jsonStringifyReplacer=(i,r)=>typeof r=="bigint"?r.toString():r})(An||(An={}));var YZ;(function(u){u.mergeShapes=(e,t)=>({...e,...t})})(YZ||(YZ={}));const kt=An.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),AE=u=>{switch(typeof u){case"undefined":return kt.undefined;case"string":return kt.string;case"number":return isNaN(u)?kt.nan:kt.number;case"boolean":return kt.boolean;case"function":return kt.function;case"bigint":return kt.bigint;case"symbol":return kt.symbol;case"object":return Array.isArray(u)?kt.array:u===null?kt.null:u.then&&typeof u.then=="function"&&u.catch&&typeof u.catch=="function"?kt.promise:typeof Map<"u"&&u instanceof Map?kt.map:typeof Set<"u"&&u instanceof Set?kt.set:typeof Date<"u"&&u instanceof Date?kt.date:kt.object;default:return kt.unknown}},ot=An.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uUt=u=>JSON.stringify(u,null,2).replace(/"([^"]+)":/g,"$1:");class Uc extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(r){return r.message},n={_errors:[]},i=r=>{for(const a of r.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let o=n,s=0;for(;st.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Uc.create=u=>new Uc(u);const oy=(u,e)=>{let t;switch(u.code){case ot.invalid_type:u.received===kt.undefined?t="Required":t=`Expected ${u.expected}, received ${u.received}`;break;case ot.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(u.expected,An.jsonStringifyReplacer)}`;break;case ot.unrecognized_keys:t=`Unrecognized key(s) in object: ${An.joinValues(u.keys,", ")}`;break;case ot.invalid_union:t="Invalid input";break;case ot.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${An.joinValues(u.options)}`;break;case ot.invalid_enum_value:t=`Invalid enum value. Expected ${An.joinValues(u.options)}, received '${u.received}'`;break;case ot.invalid_arguments:t="Invalid function arguments";break;case ot.invalid_return_type:t="Invalid function return type";break;case ot.invalid_date:t="Invalid date";break;case ot.invalid_string:typeof u.validation=="object"?"includes"in u.validation?(t=`Invalid input: must include "${u.validation.includes}"`,typeof u.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?t=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?t=`Invalid input: must end with "${u.validation.endsWith}"`:An.assertNever(u.validation):u.validation!=="regex"?t=`Invalid ${u.validation}`:t="Invalid";break;case ot.too_small:u.type==="array"?t=`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:u.type==="string"?t=`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:u.type==="number"?t=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="date"?t=`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:t="Invalid input";break;case ot.too_big:u.type==="array"?t=`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:u.type==="string"?t=`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:u.type==="number"?t=`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="bigint"?t=`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="date"?t=`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:t="Invalid input";break;case ot.custom:t="Invalid input";break;case ot.invalid_intersection_types:t="Intersection results could not be merged";break;case ot.not_multiple_of:t=`Number must be a multiple of ${u.multipleOf}`;break;case ot.not_finite:t="Number must be finite";break;default:t=e.defaultError,An.assertNever(u)}return{message:t}};let zTe=oy;function nUt(u){zTe=u}function xT(){return zTe}const vT=u=>{const{data:e,path:t,errorMaps:n,issueData:i}=u,r=[...t,...i.path||[]],a={...i,path:r};let o="";const s=n.filter(l=>!!l).slice().reverse();for(const l of s)o=l(a,{data:e,defaultError:o}).message;return{...i,path:r,message:i.message||o}},iUt=[];function yt(u,e){const t=vT({issueData:e,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,xT(),oy].filter(n=>!!n)});u.common.issues.push(t)}class Ho{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Fu;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t)n.push({key:await i.key,value:await i.value});return Ho.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:r,value:a}=i;if(r.status==="aborted"||a.status==="aborted")return Fu;r.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[r.value]=a.value)}return{status:e.value,value:n}}}const Fu=Object.freeze({status:"aborted"}),MTe=u=>({status:"dirty",value:u}),ps=u=>({status:"valid",value:u}),QZ=u=>u.status==="aborted",XZ=u=>u.status==="dirty",sy=u=>u.status==="valid",CT=u=>typeof Promise<"u"&&u instanceof Promise;var Qt;(function(u){u.errToObj=e=>typeof e=="string"?{message:e}:e||{},u.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Qt||(Qt={}));class I1{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Bfe=(u,e)=>{if(sy(e))return{success:!0,data:e.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Uc(u.common.issues);return this._error=t,this._error}}};function Bu(u){if(!u)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=u;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:n??o.defaultError}:{message:t??o.defaultError},description:i}}class Iu{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return AE(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:AE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ho,ctx:{common:e.parent.common,data:e.data,parsedType:AE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(CT(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:AE(e)},r=this._parseSync({data:e,path:i.path,parent:i});return Bfe(i,r)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:AE(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(CT(i)?i:Promise.resolve(i));return Bfe(n,r)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,r)=>{const a=e(i),o=()=>r.addIssue({code:ot.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new od({schema:this,typeName:mu.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return r4.create(this,this._def)}nullable(){return fp.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qc.create(this,this._def)}promise(){return Yv.create(this,this._def)}or(e){return hy.create([this,e],this._def)}and(e){return Ey.create(this,e,this._def)}transform(e){return new od({...Bu(this._def),schema:this,typeName:mu.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Dy({...Bu(this._def),innerType:this,defaultValue:t,typeName:mu.ZodDefault})}brand(){return new NTe({typeName:mu.ZodBranded,type:this,...Bu(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new yT({...Bu(this._def),innerType:this,catchValue:t,typeName:mu.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return d7.create(this,e)}readonly(){return _T.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const rUt=/^c[^\s-]{8,}$/i,aUt=/^[a-z][a-z0-9]*$/,oUt=/^[0-9A-HJKMNP-TV-Z]{26}$/,sUt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lUt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cUt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let l$;const dUt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,hUt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,EUt=u=>u.precision?u.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${u.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${u.precision}}Z$`):u.precision===0?u.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):u.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function mUt(u,e){return!!((e==="v4"||!e)&&dUt.test(u)||(e==="v6"||!e)&&hUt.test(u))}class Pc extends Iu{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==kt.string){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.string,received:r.parsedType}),Fu}const n=new Ho;let i;for(const r of this._def.checks)if(r.kind==="min")e.data.lengthr.value&&(i=this._getOrReturnCtx(e,i),yt(i,{code:ot.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if(r.kind==="length"){const a=e.data.length>r.value,o=e.data.lengthe.test(i),{validation:t,code:ot.invalid_string,...Qt.errToObj(n)})}_addCheck(e){return new Pc({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Qt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Qt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Qt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Qt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Qt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Qt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Qt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Qt.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...Qt.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Qt.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Qt.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Qt.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Qt.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Qt.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Qt.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Qt.errToObj(t)})}nonempty(e){return this.min(1,Qt.errToObj(e))}trim(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Pc({checks:[],typeName:mu.ZodString,coerce:(e=u==null?void 0:u.coerce)!==null&&e!==void 0?e:!1,...Bu(u)})};function gUt(u,e){const t=(u.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,r=parseInt(u.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return r%a/Math.pow(10,i)}class sg extends Iu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==kt.number){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.number,received:r.parsedType}),Fu}let n;const i=new Ho;for(const r of this._def.checks)r.kind==="int"?An.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()):r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind==="multipleOf"?gUt(e.data,r.value)!==0&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_finite,message:r.message}),i.dirty()):An.assertNever(r);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Qt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Qt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Qt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Qt.toString(t))}setLimit(e,t,n,i){return new sg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Qt.toString(i)}]})}_addCheck(e){return new sg({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Qt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Qt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Qt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Qt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Qt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Qt.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Qt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Qt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Qt.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&An.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew sg({checks:[],typeName:mu.ZodNumber,coerce:(u==null?void 0:u.coerce)||!1,...Bu(u)});class lg extends Iu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==kt.bigint){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.bigint,received:r.parsedType}),Fu}let n;const i=new Ho;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):An.assertNever(r);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Qt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Qt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Qt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Qt.toString(t))}setLimit(e,t,n,i){return new lg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Qt.toString(i)}]})}_addCheck(e){return new lg({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Qt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Qt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Qt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Qt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Qt.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new lg({checks:[],typeName:mu.ZodBigInt,coerce:(e=u==null?void 0:u.coerce)!==null&&e!==void 0?e:!1,...Bu(u)})};class ly extends Iu{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==kt.boolean){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.boolean,received:n.parsedType}),Fu}return ps(e.data)}}ly.create=u=>new ly({typeName:mu.ZodBoolean,coerce:(u==null?void 0:u.coerce)||!1,...Bu(u)});class mp extends Iu{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==kt.date){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.date,received:r.parsedType}),Fu}if(isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_date}),Fu}const n=new Ho;let i;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()r.value&&(i=this._getOrReturnCtx(e,i),yt(i,{code:ot.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):An.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mp({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Qt.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Qt.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew mp({checks:[],coerce:(u==null?void 0:u.coerce)||!1,typeName:mu.ZodDate,...Bu(u)});class bT extends Iu{_parse(e){if(this._getType(e)!==kt.symbol){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.symbol,received:n.parsedType}),Fu}return ps(e.data)}}bT.create=u=>new bT({typeName:mu.ZodSymbol,...Bu(u)});class cy extends Iu{_parse(e){if(this._getType(e)!==kt.undefined){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.undefined,received:n.parsedType}),Fu}return ps(e.data)}}cy.create=u=>new cy({typeName:mu.ZodUndefined,...Bu(u)});class dy extends Iu{_parse(e){if(this._getType(e)!==kt.null){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.null,received:n.parsedType}),Fu}return ps(e.data)}}dy.create=u=>new dy({typeName:mu.ZodNull,...Bu(u)});class Zv extends Iu{constructor(){super(...arguments),this._any=!0}_parse(e){return ps(e.data)}}Zv.create=u=>new Zv({typeName:mu.ZodAny,...Bu(u)});class x3 extends Iu{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ps(e.data)}}x3.create=u=>new x3({typeName:mu.ZodUnknown,...Bu(u)});class x4 extends Iu{_parse(e){const t=this._getOrReturnCtx(e);return yt(t,{code:ot.invalid_type,expected:kt.never,received:t.parsedType}),Fu}}x4.create=u=>new x4({typeName:mu.ZodNever,...Bu(u)});class kT extends Iu{_parse(e){if(this._getType(e)!==kt.undefined){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.void,received:n.parsedType}),Fu}return ps(e.data)}}kT.create=u=>new kT({typeName:mu.ZodVoid,...Bu(u)});class qc extends Iu{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==kt.array)return yt(t,{code:ot.invalid_type,expected:kt.array,received:t.parsedType}),Fu;if(i.exactLength!==null){const a=t.data.length>i.exactLength.value,o=t.data.lengthi.maxLength.value&&(yt(t,{code:ot.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,o)=>i.type._parseAsync(new I1(t,a,t.path,o)))).then(a=>Ho.mergeArray(n,a));const r=[...t.data].map((a,o)=>i.type._parseSync(new I1(t,a,t.path,o)));return Ho.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new qc({...this._def,minLength:{value:e,message:Qt.toString(t)}})}max(e,t){return new qc({...this._def,maxLength:{value:e,message:Qt.toString(t)}})}length(e,t){return new qc({...this._def,exactLength:{value:e,message:Qt.toString(t)}})}nonempty(e){return this.min(1,e)}}qc.create=(u,e)=>new qc({type:u,minLength:null,maxLength:null,exactLength:null,typeName:mu.ZodArray,...Bu(e)});function t5(u){if(u instanceof er){const e={};for(const t in u.shape){const n=u.shape[t];e[t]=r4.create(t5(n))}return new er({...u._def,shape:()=>e})}else return u instanceof qc?new qc({...u._def,type:t5(u.element)}):u instanceof r4?r4.create(t5(u.unwrap())):u instanceof fp?fp.create(t5(u.unwrap())):u instanceof O1?O1.create(u.items.map(e=>t5(e))):u}class er extends Iu{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=An.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==kt.object){const l=this._getOrReturnCtx(e);return yt(l,{code:ot.invalid_type,expected:kt.object,received:l.parsedType}),Fu}const{status:n,ctx:i}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof x4&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||o.push(l);const s=[];for(const l of a){const c=r[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new I1(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof x4){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of o)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")o.length>0&&(yt(i,{code:ot.unrecognized_keys,keys:o}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of o){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new I1(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key;l.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>Ho.mergeObjectSync(n,l)):Ho.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(e){return Qt.errToObj,new er({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,r,a,o;const s=(a=(r=(i=this._def).errorMap)===null||r===void 0?void 0:r.call(i,t,n).message)!==null&&a!==void 0?a:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=Qt.errToObj(e).message)!==null&&o!==void 0?o:s}:{message:s}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(e){return new er({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new er({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:mu.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new er({...this._def,catchall:e})}pick(e){const t={};return An.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new er({...this._def,shape:()=>t})}omit(e){const t={};return An.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new er({...this._def,shape:()=>t})}deepPartial(){return t5(this)}partial(e){const t={};return An.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new er({...this._def,shape:()=>t})}required(e){const t={};return An.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let r=this.shape[n];for(;r instanceof r4;)r=r._def.innerType;t[n]=r}}),new er({...this._def,shape:()=>t})}keyof(){return TTe(An.objectKeys(this.shape))}}er.create=(u,e)=>new er({shape:()=>u,unknownKeys:"strip",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});er.strictCreate=(u,e)=>new er({shape:()=>u,unknownKeys:"strict",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});er.lazycreate=(u,e)=>new er({shape:u,unknownKeys:"strip",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});class hy extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(r){for(const o of r)if(o.result.status==="valid")return o.result;for(const o of r)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const a=r.map(o=>new Uc(o.ctx.common.issues));return yt(t,{code:ot.invalid_union,unionErrors:a}),Fu}if(t.common.async)return Promise.all(n.map(async r=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(i);{let r;const a=[];for(const s of n){const l={...t,common:{...t.common,issues:[]},parent:null},c=s._parseSync({data:t.data,path:t.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!r&&(r={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const o=a.map(s=>new Uc(s));return yt(t,{code:ot.invalid_union,unionErrors:o}),Fu}}get options(){return this._def.options}}hy.create=(u,e)=>new hy({options:u,typeName:mu.ZodUnion,...Bu(e)});const U8=u=>u instanceof gy?U8(u.schema):u instanceof od?U8(u.innerType()):u instanceof fy?[u.value]:u instanceof cg?u.options:u instanceof py?Object.keys(u.enum):u instanceof Dy?U8(u._def.innerType):u instanceof cy?[void 0]:u instanceof dy?[null]:null;class ZI extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.object)return yt(t,{code:ot.invalid_type,expected:kt.object,received:t.parsedType}),Fu;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(yt(t,{code:ot.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Fu)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const r of t){const a=U8(r.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,r)}}return new ZI({typeName:mu.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Bu(n)})}}function eY(u,e){const t=AE(u),n=AE(e);if(u===e)return{valid:!0,data:u};if(t===kt.object&&n===kt.object){const i=An.objectKeys(e),r=An.objectKeys(u).filter(o=>i.indexOf(o)!==-1),a={...u,...e};for(const o of r){const s=eY(u[o],e[o]);if(!s.valid)return{valid:!1};a[o]=s.data}return{valid:!0,data:a}}else if(t===kt.array&&n===kt.array){if(u.length!==e.length)return{valid:!1};const i=[];for(let r=0;r{if(QZ(r)||QZ(a))return Fu;const o=eY(r.value,a.value);return o.valid?((XZ(r)||XZ(a))&&t.dirty(),{status:t.value,value:o.data}):(yt(n,{code:ot.invalid_intersection_types}),Fu)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([r,a])=>i(r,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ey.create=(u,e,t)=>new Ey({left:u,right:e,typeName:mu.ZodIntersection,...Bu(t)});class O1 extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.array)return yt(n,{code:ot.invalid_type,expected:kt.array,received:n.parsedType}),Fu;if(n.data.lengththis._def.items.length&&(yt(n,{code:ot.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map((a,o)=>{const s=this._def.items[o]||this._def.rest;return s?s._parse(new I1(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(r).then(a=>Ho.mergeArray(t,a)):Ho.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new O1({...this._def,rest:e})}}O1.create=(u,e)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new O1({items:u,typeName:mu.ZodTuple,rest:null,...Bu(e)})};class my extends Iu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.object)return yt(n,{code:ot.invalid_type,expected:kt.object,received:n.parsedType}),Fu;const i=[],r=this._def.keyType,a=this._def.valueType;for(const o in n.data)i.push({key:r._parse(new I1(n,o,n.path,o)),value:a._parse(new I1(n,n.data[o],n.path,o))});return n.common.async?Ho.mergeObjectAsync(t,i):Ho.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Iu?new my({keyType:e,valueType:t,typeName:mu.ZodRecord,...Bu(n)}):new my({keyType:Pc.create(),valueType:e,typeName:mu.ZodRecord,...Bu(t)})}}class FT extends Iu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.map)return yt(n,{code:ot.invalid_type,expected:kt.map,received:n.parsedType}),Fu;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map(([o,s],l)=>({key:i._parse(new I1(n,o,n.path,[l,"key"])),value:r._parse(new I1(n,s,n.path,[l,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return Fu;(l.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(l.value,c.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return Fu;(l.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(l.value,c.value)}return{status:t.value,value:o}}}}FT.create=(u,e,t)=>new FT({valueType:e,keyType:u,typeName:mu.ZodMap,...Bu(t)});class gp extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.set)return yt(n,{code:ot.invalid_type,expected:kt.set,received:n.parsedType}),Fu;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(yt(n,{code:ot.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return Fu;c.status==="dirty"&&t.dirty(),l.add(c.value)}return{status:t.value,value:l}}const o=[...n.data.values()].map((s,l)=>r._parse(new I1(n,s,n.path,l)));return n.common.async?Promise.all(o).then(s=>a(s)):a(o)}min(e,t){return new gp({...this._def,minSize:{value:e,message:Qt.toString(t)}})}max(e,t){return new gp({...this._def,maxSize:{value:e,message:Qt.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}gp.create=(u,e)=>new gp({valueType:u,minSize:null,maxSize:null,typeName:mu.ZodSet,...Bu(e)});class Rx extends Iu{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.function)return yt(t,{code:ot.invalid_type,expected:kt.function,received:t.parsedType}),Fu;function n(o,s){return vT({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xT(),oy].filter(l=>!!l),issueData:{code:ot.invalid_arguments,argumentsError:s}})}function i(o,s){return vT({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xT(),oy].filter(l=>!!l),issueData:{code:ot.invalid_return_type,returnTypeError:s}})}const r={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Yv){const o=this;return ps(async function(...s){const l=new Uc([]),c=await o._def.args.parseAsync(s,r).catch(E=>{throw l.addIssue(n(s,E)),l}),d=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(d,r).catch(E=>{throw l.addIssue(i(d,E)),l})})}else{const o=this;return ps(function(...s){const l=o._def.args.safeParse(s,r);if(!l.success)throw new Uc([n(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=o._def.returns.safeParse(c,r);if(!d.success)throw new Uc([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Rx({...this._def,args:O1.create(e).rest(x3.create())})}returns(e){return new Rx({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Rx({args:e||O1.create([]).rest(x3.create()),returns:t||x3.create(),typeName:mu.ZodFunction,...Bu(n)})}}class gy extends Iu{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}gy.create=(u,e)=>new gy({getter:u,typeName:mu.ZodLazy,...Bu(e)});class fy extends Iu{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return yt(t,{received:t.data,code:ot.invalid_literal,expected:this._def.value}),Fu}return{status:"valid",value:e.data}}get value(){return this._def.value}}fy.create=(u,e)=>new fy({value:u,typeName:mu.ZodLiteral,...Bu(e)});function TTe(u,e){return new cg({values:u,typeName:mu.ZodEnum,...Bu(e)})}class cg extends Iu{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return yt(t,{expected:An.joinValues(n),received:t.parsedType,code:ot.invalid_type}),Fu}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return yt(t,{received:t.data,code:ot.invalid_enum_value,options:n}),Fu}return ps(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return cg.create(e)}exclude(e){return cg.create(this.options.filter(t=>!e.includes(t)))}}cg.create=TTe;class py extends Iu{_parse(e){const t=An.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==kt.string&&n.parsedType!==kt.number){const i=An.objectValues(t);return yt(n,{expected:An.joinValues(i),received:n.parsedType,code:ot.invalid_type}),Fu}if(t.indexOf(e.data)===-1){const i=An.objectValues(t);return yt(n,{received:n.data,code:ot.invalid_enum_value,options:i}),Fu}return ps(e.data)}get enum(){return this._def.values}}py.create=(u,e)=>new py({values:u,typeName:mu.ZodNativeEnum,...Bu(e)});class Yv extends Iu{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.promise&&t.common.async===!1)return yt(t,{code:ot.invalid_type,expected:kt.promise,received:t.parsedType}),Fu;const n=t.parsedType===kt.promise?t.data:Promise.resolve(t.data);return ps(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Yv.create=(u,e)=>new Yv({type:u,typeName:mu.ZodPromise,...Bu(e)});class od extends Iu{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===mu.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:a=>{yt(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),i.type==="preprocess"){const a=i.transform(n.data,r);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(i.type==="refinement"){const a=o=>{const s=i.refinement(o,r);if(n.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Fu:(o.status==="dirty"&&t.dirty(),a(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?Fu:(o.status==="dirty"&&t.dirty(),a(o.value).then(()=>({status:t.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!sy(a))return a;const o=i.transform(a.value,r);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>sy(a)?Promise.resolve(i.transform(a.value,r)).then(o=>({status:t.value,value:o})):a);An.assertNever(i)}}od.create=(u,e,t)=>new od({schema:u,typeName:mu.ZodEffects,effect:e,...Bu(t)});od.createWithPreprocess=(u,e,t)=>new od({schema:e,effect:{type:"preprocess",transform:u},typeName:mu.ZodEffects,...Bu(t)});class r4 extends Iu{_parse(e){return this._getType(e)===kt.undefined?ps(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r4.create=(u,e)=>new r4({innerType:u,typeName:mu.ZodOptional,...Bu(e)});class fp extends Iu{_parse(e){return this._getType(e)===kt.null?ps(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fp.create=(u,e)=>new fp({innerType:u,typeName:mu.ZodNullable,...Bu(e)});class Dy extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===kt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Dy.create=(u,e)=>new Dy({innerType:u,typeName:mu.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Bu(e)});class yT extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return CT(i)?i.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Uc(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Uc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}yT.create=(u,e)=>new yT({innerType:u,typeName:mu.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Bu(e)});class AT extends Iu{_parse(e){if(this._getType(e)!==kt.nan){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.nan,received:n.parsedType}),Fu}return{status:"valid",value:e.data}}}AT.create=u=>new AT({typeName:mu.ZodNaN,...Bu(u)});const fUt=Symbol("zod_brand");class NTe extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class d7 extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return r.status==="aborted"?Fu:r.status==="dirty"?(t.dirty(),MTe(r.value)):this._def.out._parseAsync({data:r.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Fu:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new d7({in:e,out:t,typeName:mu.ZodPipeline})}}class _T extends Iu{_parse(e){const t=this._def.innerType._parse(e);return sy(t)&&(t.value=Object.freeze(t.value)),t}}_T.create=(u,e)=>new _T({innerType:u,typeName:mu.ZodReadonly,...Bu(e)});const PTe=(u,e={},t)=>u?Zv.create().superRefine((n,i)=>{var r,a;if(!u(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,s=(a=(r=o.fatal)!==null&&r!==void 0?r:t)!==null&&a!==void 0?a:!0,l=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...l,fatal:s})}}):Zv.create(),pUt={object:er.lazycreate};var mu;(function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"})(mu||(mu={}));const DUt=(u,e={message:`Input not instance of ${u.name}`})=>PTe(t=>t instanceof u,e),RTe=Pc.create,ITe=sg.create,xUt=AT.create,vUt=lg.create,OTe=ly.create,CUt=mp.create,bUt=bT.create,kUt=cy.create,FUt=dy.create,yUt=Zv.create,AUt=x3.create,_Ut=x4.create,SUt=kT.create,BUt=qc.create,wUt=er.create,LUt=er.strictCreate,zUt=hy.create,MUt=ZI.create,TUt=Ey.create,NUt=O1.create,PUt=my.create,RUt=FT.create,IUt=gp.create,OUt=Rx.create,jUt=gy.create,HUt=fy.create,VUt=cg.create,$Ut=py.create,KUt=Yv.create,wfe=od.create,WUt=r4.create,GUt=fp.create,UUt=od.createWithPreprocess,qUt=d7.create,JUt=()=>RTe().optional(),ZUt=()=>ITe().optional(),YUt=()=>OTe().optional(),QUt={string:u=>Pc.create({...u,coerce:!0}),number:u=>sg.create({...u,coerce:!0}),boolean:u=>ly.create({...u,coerce:!0}),bigint:u=>lg.create({...u,coerce:!0}),date:u=>mp.create({...u,coerce:!0})},XUt=Fu;var ke=Object.freeze({__proto__:null,defaultErrorMap:oy,setErrorMap:nUt,getErrorMap:xT,makeIssue:vT,EMPTY_PATH:iUt,addIssueToContext:yt,ParseStatus:Ho,INVALID:Fu,DIRTY:MTe,OK:ps,isAborted:QZ,isDirty:XZ,isValid:sy,isAsync:CT,get util(){return An},get objectUtil(){return YZ},ZodParsedType:kt,getParsedType:AE,ZodType:Iu,ZodString:Pc,ZodNumber:sg,ZodBigInt:lg,ZodBoolean:ly,ZodDate:mp,ZodSymbol:bT,ZodUndefined:cy,ZodNull:dy,ZodAny:Zv,ZodUnknown:x3,ZodNever:x4,ZodVoid:kT,ZodArray:qc,ZodObject:er,ZodUnion:hy,ZodDiscriminatedUnion:ZI,ZodIntersection:Ey,ZodTuple:O1,ZodRecord:my,ZodMap:FT,ZodSet:gp,ZodFunction:Rx,ZodLazy:gy,ZodLiteral:fy,ZodEnum:cg,ZodNativeEnum:py,ZodPromise:Yv,ZodEffects:od,ZodTransformer:od,ZodOptional:r4,ZodNullable:fp,ZodDefault:Dy,ZodCatch:yT,ZodNaN:AT,BRAND:fUt,ZodBranded:NTe,ZodPipeline:d7,ZodReadonly:_T,custom:PTe,Schema:Iu,ZodSchema:Iu,late:pUt,get ZodFirstPartyTypeKind(){return mu},coerce:QUt,any:yUt,array:BUt,bigint:vUt,boolean:OTe,date:CUt,discriminatedUnion:MUt,effect:wfe,enum:VUt,function:OUt,instanceof:DUt,intersection:TUt,lazy:jUt,literal:HUt,map:RUt,nan:xUt,nativeEnum:$Ut,never:_Ut,null:FUt,nullable:GUt,number:ITe,object:wUt,oboolean:YUt,onumber:ZUt,optional:WUt,ostring:JUt,pipeline:qUt,preprocess:UUt,promise:KUt,record:PUt,set:IUt,strictObject:LUt,string:RTe,symbol:bUt,transformer:wfe,tuple:NUt,undefined:kUt,union:zUt,unknown:AUt,void:SUt,NEVER:XUt,ZodIssueCode:ot,quotelessJson:uUt,ZodError:Uc});const eqt=ke.object({ps:ke.string(),add:ke.string().nonempty(),port:ke.number().min(0).max(65535),id:ke.string().nonempty(),aid:ke.number().min(0).max(65535),net:ke.enum(["tcp","kcp","ws","h2","grpc"]),type:ke.enum(["none","http","srtp","utp","wechat-video","dtls","wireguard"]),host:ke.string(),path:ke.string(),tls:ke.enum(["none","tls"]),flow:ke.enum(["none","xtls-rprx-origin","xtls-rprx-origin-udp443","xtls-rprx-vision","xtls-rprx-vision-udp443"]),alpn:ke.string(),scy:ke.enum(["auto","aes-128-gcm","chacha20-poly1305","none","zero"]),v:ke.literal(""),allowInsecure:ke.boolean(),sni:ke.string()}),tqt=ke.object({method:ke.enum(["aes-128-gcm","aes-256-gcm","chacha20-poly1305","chacha20-ietf-poly1305","plain","none"]),plugin:ke.enum(["","simple-obfs","v2ray-plugin"]),obfs:ke.enum(["http","tls"]),tls:ke.enum(["","tls"]),path:ke.string(),mode:ke.string(),host:ke.string(),password:ke.string().nonempty(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string(),impl:ke.enum(["","chained","transport"])}),uqt=ke.object({method:ke.enum(["aes-128-cfb","aes-192-cfb","aes-256-cfb","aes-128-ctr","aes-192-ctr","aes-256-ctr","aes-128-ofb","aes-192-ofb","aes-256-ofb","des-cfb","bf-cfb","cast5-cfb","rc4-md5","chacha20-ietf","salsa20","camellia-128-cfb","camellia-192-cfb","camellia-256-cfb","idea-cfb","rc2-cfb","seed-cfb","none"]),password:ke.string().nonempty(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535).positive(),name:ke.string(),proto:ke.enum(["origin","verify_sha1","auth_sha1_v4","auth_aes128_md5","auth_aes128_sha1","auth_chain_a","auth_chain_b"]),protoParam:ke.string(),obfs:ke.enum(["plain","http_simple","http_post","random_head","tls1.2_ticket_auth"]),obfsParam:ke.string()}),nqt=ke.object({name:ke.string(),server:ke.string().nonempty(),peer:ke.string(),host:ke.string(),path:ke.string(),allowInsecure:ke.boolean(),port:ke.number().min(0).max(65535),password:ke.string().nonempty(),method:ke.enum(["origin","shadowsocks"]),ssCipher:ke.enum(["aes-128-gcm","aes-256-gcm","chacha20-poly1305","chacha20-ietf-poly1305"]),ssPassword:ke.string(),obfs:ke.enum(["none","websocket"])}),iqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),uuid:ke.string().nonempty(),password:ke.string().nonempty(),allowInsecure:ke.boolean(),disable_sni:ke.boolean(),sni:ke.string(),congestion_control:ke.string(),alpn:ke.string(),udp_relay_mode:ke.string()}),rqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),uuid:ke.string().nonempty(),password:ke.string().nonempty(),allowInsecure:ke.boolean(),pinned_certchain_sha256:ke.string(),sni:ke.string(),congestion_control:ke.string()}),aqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),auth:ke.string(),obfs:ke.string(),obfsPassword:ke.string(),sni:ke.string(),allowInsecure:ke.boolean(),pinSHA256:ke.string()}),oqt=ke.object({username:ke.string(),password:ke.string(),host:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string()}),sqt=ke.object({username:ke.string(),password:ke.string(),host:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string()}),Lfe=Vne("mode"),xy=Vne("token"),Qv=Vne("endpointURL",ETe),zfe=HWt("APP_STATE",{preferredColorScheme:"",colsPerRow:PGt,nodeSortableKeys:[],subscriptionSortableKeys:[],configSortableKeys:[],routingSortableKeys:[],dnsSortableKeys:[],groupSortableKeys:[]},{encode:JSON.stringify,decode:JSON.parse}),h7=mMe({defaultConfigID:"",defaultRoutingID:"",defaultDNSID:"",defaultGroupID:""}),jTe=Bne("dark"),HTe=C.createContext(null),lqt=({client:u,children:e})=>B.jsx(HTe.Provider,{value:u,children:e}),Mu=()=>C.useContext(HTe),cqt=({children:u})=>{const e=H0(Qv),t=H0(xy),n=C.useMemo(()=>new T$t,[]),i=C.useMemo(()=>new dTe(e,{headers:{authorization:`Bearer ${t}`},responseMiddleware:r=>{var o,s;const a=(s=(o=r.response)==null?void 0:o.errors)==null?void 0:s[0];return a&&(c1.show({color:"red",message:a.message}),a.message==="access denied"&&xy.set("")),r}}),[e,t]);return B.jsx(J$t,{client:n,children:B.jsx(lqt,{client:i,children:u})})};var VTe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Mfe(u){return typeof u=="object"&&u!==null&&typeof u.then=="function"}function dqt(u){return new Promise((e,t)=>{const n=u.subscribe({next(i){e(i),n.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})})}function $Te(u){return typeof u=="object"&&u!==null&&"subscribe"in u&&typeof u.subscribe=="function"}function KTe(u){return typeof u=="object"&&u!==null&&(u[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in u)}function hqt(u){var e;return VTe(this,void 0,void 0,function*(){const t=(e=("return"in u?u:u[Symbol.asyncIterator]()).return)===null||e===void 0?void 0:e.bind(u),i=yield("next"in u?u:u[Symbol.asyncIterator]()).next.bind(u)();return t==null||t(),i.value})}function Tfe(u){return VTe(this,void 0,void 0,function*(){const e=yield u;return KTe(e)?hqt(e):$Te(e)?dqt(e):e})}async function Eqt(u,e){let t=u.headers["content-type"];if(!t||!~t.indexOf("multipart/"))return u;let n=t.indexOf("boundary="),i="-";if(~n){let r=n+9,a=t.indexOf(";",r);i=t.slice(r,a>-1?a:void 0).trim().replace(/"/g,"")}return async function*(r,a,o){let s,l,c,d=!o||!o.multiple,h=Buffer.byteLength(a),E=Buffer.alloc(0),m=[];e:for await(let g of r){s=E.byteLength,E=Buffer.concat([E,g]);let f=g.indexOf(a);for(~f?s+=f:s=E.indexOf(a),m=[];~s;){let p=E.subarray(0,s),D=E.subarray(s+h);if(l){let x=p.indexOf(`\r +`.trim(),KGt={type:"none",tls:"none",net:"tcp",scy:"auto",add:"",aid:0,allowInsecure:!1,alpn:"",flow:"none",host:"",id:"",path:"",port:0,ps:"",v:"",sni:""},WGt={plugin:"",method:"aes-128-gcm",obfs:"http",host:"",impl:"",mode:"",name:"",password:"",path:"",port:0,server:"",tls:""},GGt={method:"aes-128-cfb",proto:"origin",obfs:"plain",name:"",obfsParam:"",password:"",port:0,protoParam:"",server:""},UGt={method:"origin",obfs:"none",allowInsecure:!1,host:"",name:"",password:"",path:"",peer:"",port:0,server:"",ssCipher:"aes-128-gcm",ssPassword:""},qGt={name:"",port:0,server:"",alpn:"",congestion_control:"",disable_sni:!1,allowInsecure:!1,uuid:"",password:"",udp_relay_mode:"",sni:""},JGt={name:"",port:0,server:"",congestion_control:"",allowInsecure:!1,uuid:"",password:"",pinned_certchain_sha256:"",sni:""},ZGt={name:"",port:443,server:"",auth:"",obfs:"",obfsPassword:"",sni:"",allowInsecure:!1,pinSHA256:""},YGt={host:"",name:"",password:"",port:0,username:""},QGt={host:"",name:"",password:"",port:0,username:""},XGt="vs-dark",eUt="githubLight",LTe={fontSize:14,fontWeight:"bold",fontFamily:"Source Code Pro","semanticHighlighting.enabled":!0,lineHeight:1.6,minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"selection",cursorBlinking:"solid",formatOnPaste:!0,insertSpaces:!0,tabSize:2,lineNumbers:"off",padding:{top:8,bottom:8}},tUt={ignoreCase:!1,keywords:["dip","direct","domain","dport","fallback","must_rules","ipversion","l4proto","mac","pname","qname","request","response","routing","sip","sport","tcp","udp","upstream"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,symbols:/[->&!:,]+/,operators:["&&","!"],tokenizer:{root:[[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[{}()]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d+/,"number"],[/[,:]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*$/,"comment"]]}};var An;(function(u){u.assertEqual=i=>i;function e(i){}u.assertIs=e;function t(i){throw new Error}u.assertNever=t,u.arrayToEnum=i=>{const r={};for(const a of i)r[a]=a;return r},u.getValidEnumValues=i=>{const r=u.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of r)a[o]=i[o];return u.objectValues(a)},u.objectValues=i=>u.objectKeys(i).map(function(r){return i[r]}),u.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const r=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&r.push(a);return r},u.find=(i,r)=>{for(const a of i)if(r(a))return a},u.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,r=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(r)}u.joinValues=n,u.jsonStringifyReplacer=(i,r)=>typeof r=="bigint"?r.toString():r})(An||(An={}));var YZ;(function(u){u.mergeShapes=(e,t)=>({...e,...t})})(YZ||(YZ={}));const kt=An.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),AE=u=>{switch(typeof u){case"undefined":return kt.undefined;case"string":return kt.string;case"number":return isNaN(u)?kt.nan:kt.number;case"boolean":return kt.boolean;case"function":return kt.function;case"bigint":return kt.bigint;case"symbol":return kt.symbol;case"object":return Array.isArray(u)?kt.array:u===null?kt.null:u.then&&typeof u.then=="function"&&u.catch&&typeof u.catch=="function"?kt.promise:typeof Map<"u"&&u instanceof Map?kt.map:typeof Set<"u"&&u instanceof Set?kt.set:typeof Date<"u"&&u instanceof Date?kt.date:kt.object;default:return kt.unknown}},ot=An.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uUt=u=>JSON.stringify(u,null,2).replace(/"([^"]+)":/g,"$1:");class Uc extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(r){return r.message},n={_errors:[]},i=r=>{for(const a of r.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(t(a));else{let o=n,s=0;for(;st.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Uc.create=u=>new Uc(u);const oy=(u,e)=>{let t;switch(u.code){case ot.invalid_type:u.received===kt.undefined?t="Required":t=`Expected ${u.expected}, received ${u.received}`;break;case ot.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(u.expected,An.jsonStringifyReplacer)}`;break;case ot.unrecognized_keys:t=`Unrecognized key(s) in object: ${An.joinValues(u.keys,", ")}`;break;case ot.invalid_union:t="Invalid input";break;case ot.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${An.joinValues(u.options)}`;break;case ot.invalid_enum_value:t=`Invalid enum value. Expected ${An.joinValues(u.options)}, received '${u.received}'`;break;case ot.invalid_arguments:t="Invalid function arguments";break;case ot.invalid_return_type:t="Invalid function return type";break;case ot.invalid_date:t="Invalid date";break;case ot.invalid_string:typeof u.validation=="object"?"includes"in u.validation?(t=`Invalid input: must include "${u.validation.includes}"`,typeof u.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${u.validation.position}`)):"startsWith"in u.validation?t=`Invalid input: must start with "${u.validation.startsWith}"`:"endsWith"in u.validation?t=`Invalid input: must end with "${u.validation.endsWith}"`:An.assertNever(u.validation):u.validation!=="regex"?t=`Invalid ${u.validation}`:t="Invalid";break;case ot.too_small:u.type==="array"?t=`Array must contain ${u.exact?"exactly":u.inclusive?"at least":"more than"} ${u.minimum} element(s)`:u.type==="string"?t=`String must contain ${u.exact?"exactly":u.inclusive?"at least":"over"} ${u.minimum} character(s)`:u.type==="number"?t=`Number must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${u.minimum}`:u.type==="date"?t=`Date must be ${u.exact?"exactly equal to ":u.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(u.minimum))}`:t="Invalid input";break;case ot.too_big:u.type==="array"?t=`Array must contain ${u.exact?"exactly":u.inclusive?"at most":"less than"} ${u.maximum} element(s)`:u.type==="string"?t=`String must contain ${u.exact?"exactly":u.inclusive?"at most":"under"} ${u.maximum} character(s)`:u.type==="number"?t=`Number must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="bigint"?t=`BigInt must be ${u.exact?"exactly":u.inclusive?"less than or equal to":"less than"} ${u.maximum}`:u.type==="date"?t=`Date must be ${u.exact?"exactly":u.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(u.maximum))}`:t="Invalid input";break;case ot.custom:t="Invalid input";break;case ot.invalid_intersection_types:t="Intersection results could not be merged";break;case ot.not_multiple_of:t=`Number must be a multiple of ${u.multipleOf}`;break;case ot.not_finite:t="Number must be finite";break;default:t=e.defaultError,An.assertNever(u)}return{message:t}};let zTe=oy;function nUt(u){zTe=u}function xT(){return zTe}const vT=u=>{const{data:e,path:t,errorMaps:n,issueData:i}=u,r=[...t,...i.path||[]],a={...i,path:r};let o="";const s=n.filter(l=>!!l).slice().reverse();for(const l of s)o=l(a,{data:e,defaultError:o}).message;return{...i,path:r,message:i.message||o}},iUt=[];function yt(u,e){const t=vT({issueData:e,data:u.data,path:u.path,errorMaps:[u.common.contextualErrorMap,u.schemaErrorMap,xT(),oy].filter(n=>!!n)});u.common.issues.push(t)}class Ho{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Fu;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t)n.push({key:await i.key,value:await i.value});return Ho.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:r,value:a}=i;if(r.status==="aborted"||a.status==="aborted")return Fu;r.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[r.value]=a.value)}return{status:e.value,value:n}}}const Fu=Object.freeze({status:"aborted"}),MTe=u=>({status:"dirty",value:u}),Ds=u=>({status:"valid",value:u}),QZ=u=>u.status==="aborted",XZ=u=>u.status==="dirty",sy=u=>u.status==="valid",CT=u=>typeof Promise<"u"&&u instanceof Promise;var Qt;(function(u){u.errToObj=e=>typeof e=="string"?{message:e}:e||{},u.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Qt||(Qt={}));class I1{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Bfe=(u,e)=>{if(sy(e))return{success:!0,data:e.value};if(!u.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Uc(u.common.issues);return this._error=t,this._error}}};function Bu(u){if(!u)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=u;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:n??o.defaultError}:{message:t??o.defaultError},description:i}}class Iu{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return AE(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:AE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ho,ctx:{common:e.parent.common,data:e.data,parsedType:AE(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(CT(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:AE(e)},r=this._parseSync({data:e,path:i.path,parent:i});return Bfe(i,r)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:AE(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(CT(i)?i:Promise.resolve(i));return Bfe(n,r)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,r)=>{const a=e(i),o=()=>r.addIssue({code:ot.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(s=>s?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new od({schema:this,typeName:mu.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return r4.create(this,this._def)}nullable(){return fp.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qc.create(this,this._def)}promise(){return Yv.create(this,this._def)}or(e){return hy.create([this,e],this._def)}and(e){return Ey.create(this,e,this._def)}transform(e){return new od({...Bu(this._def),schema:this,typeName:mu.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Dy({...Bu(this._def),innerType:this,defaultValue:t,typeName:mu.ZodDefault})}brand(){return new NTe({typeName:mu.ZodBranded,type:this,...Bu(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new yT({...Bu(this._def),innerType:this,catchValue:t,typeName:mu.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return d7.create(this,e)}readonly(){return _T.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const rUt=/^c[^\s-]{8,}$/i,aUt=/^[a-z][a-z0-9]*$/,oUt=/^[0-9A-HJKMNP-TV-Z]{26}$/,sUt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lUt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cUt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let l$;const dUt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,hUt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,EUt=u=>u.precision?u.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${u.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${u.precision}}Z$`):u.precision===0?u.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):u.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function mUt(u,e){return!!((e==="v4"||!e)&&dUt.test(u)||(e==="v6"||!e)&&hUt.test(u))}class Pc extends Iu{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==kt.string){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.string,received:r.parsedType}),Fu}const n=new Ho;let i;for(const r of this._def.checks)if(r.kind==="min")e.data.lengthr.value&&(i=this._getOrReturnCtx(e,i),yt(i,{code:ot.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if(r.kind==="length"){const a=e.data.length>r.value,o=e.data.lengthe.test(i),{validation:t,code:ot.invalid_string,...Qt.errToObj(n)})}_addCheck(e){return new Pc({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Qt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Qt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Qt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Qt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Qt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Qt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Qt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Qt.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...Qt.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Qt.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Qt.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Qt.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Qt.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Qt.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Qt.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Qt.errToObj(t)})}nonempty(e){return this.min(1,Qt.errToObj(e))}trim(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Pc({checks:[],typeName:mu.ZodString,coerce:(e=u==null?void 0:u.coerce)!==null&&e!==void 0?e:!1,...Bu(u)})};function gUt(u,e){const t=(u.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,r=parseInt(u.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return r%a/Math.pow(10,i)}class sg extends Iu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==kt.number){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.number,received:r.parsedType}),Fu}let n;const i=new Ho;for(const r of this._def.checks)r.kind==="int"?An.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()):r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind==="multipleOf"?gUt(e.data,r.value)!==0&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_finite,message:r.message}),i.dirty()):An.assertNever(r);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Qt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Qt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Qt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Qt.toString(t))}setLimit(e,t,n,i){return new sg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Qt.toString(i)}]})}_addCheck(e){return new sg({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Qt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Qt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Qt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Qt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Qt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Qt.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Qt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Qt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Qt.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&An.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew sg({checks:[],typeName:mu.ZodNumber,coerce:(u==null?void 0:u.coerce)||!1,...Bu(u)});class lg extends Iu{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==kt.bigint){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.bigint,received:r.parsedType}),Fu}let n;const i=new Ho;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),yt(n,{code:ot.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):An.assertNever(r);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Qt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Qt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Qt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Qt.toString(t))}setLimit(e,t,n,i){return new lg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Qt.toString(i)}]})}_addCheck(e){return new lg({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Qt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Qt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Qt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Qt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Qt.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new lg({checks:[],typeName:mu.ZodBigInt,coerce:(e=u==null?void 0:u.coerce)!==null&&e!==void 0?e:!1,...Bu(u)})};class ly extends Iu{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==kt.boolean){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.boolean,received:n.parsedType}),Fu}return Ds(e.data)}}ly.create=u=>new ly({typeName:mu.ZodBoolean,coerce:(u==null?void 0:u.coerce)||!1,...Bu(u)});class mp extends Iu{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==kt.date){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_type,expected:kt.date,received:r.parsedType}),Fu}if(isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return yt(r,{code:ot.invalid_date}),Fu}const n=new Ho;let i;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()r.value&&(i=this._getOrReturnCtx(e,i),yt(i,{code:ot.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):An.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mp({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Qt.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Qt.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew mp({checks:[],coerce:(u==null?void 0:u.coerce)||!1,typeName:mu.ZodDate,...Bu(u)});class bT extends Iu{_parse(e){if(this._getType(e)!==kt.symbol){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.symbol,received:n.parsedType}),Fu}return Ds(e.data)}}bT.create=u=>new bT({typeName:mu.ZodSymbol,...Bu(u)});class cy extends Iu{_parse(e){if(this._getType(e)!==kt.undefined){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.undefined,received:n.parsedType}),Fu}return Ds(e.data)}}cy.create=u=>new cy({typeName:mu.ZodUndefined,...Bu(u)});class dy extends Iu{_parse(e){if(this._getType(e)!==kt.null){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.null,received:n.parsedType}),Fu}return Ds(e.data)}}dy.create=u=>new dy({typeName:mu.ZodNull,...Bu(u)});class Zv extends Iu{constructor(){super(...arguments),this._any=!0}_parse(e){return Ds(e.data)}}Zv.create=u=>new Zv({typeName:mu.ZodAny,...Bu(u)});class x3 extends Iu{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ds(e.data)}}x3.create=u=>new x3({typeName:mu.ZodUnknown,...Bu(u)});class x4 extends Iu{_parse(e){const t=this._getOrReturnCtx(e);return yt(t,{code:ot.invalid_type,expected:kt.never,received:t.parsedType}),Fu}}x4.create=u=>new x4({typeName:mu.ZodNever,...Bu(u)});class kT extends Iu{_parse(e){if(this._getType(e)!==kt.undefined){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.void,received:n.parsedType}),Fu}return Ds(e.data)}}kT.create=u=>new kT({typeName:mu.ZodVoid,...Bu(u)});class qc extends Iu{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==kt.array)return yt(t,{code:ot.invalid_type,expected:kt.array,received:t.parsedType}),Fu;if(i.exactLength!==null){const a=t.data.length>i.exactLength.value,o=t.data.lengthi.maxLength.value&&(yt(t,{code:ot.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((a,o)=>i.type._parseAsync(new I1(t,a,t.path,o)))).then(a=>Ho.mergeArray(n,a));const r=[...t.data].map((a,o)=>i.type._parseSync(new I1(t,a,t.path,o)));return Ho.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new qc({...this._def,minLength:{value:e,message:Qt.toString(t)}})}max(e,t){return new qc({...this._def,maxLength:{value:e,message:Qt.toString(t)}})}length(e,t){return new qc({...this._def,exactLength:{value:e,message:Qt.toString(t)}})}nonempty(e){return this.min(1,e)}}qc.create=(u,e)=>new qc({type:u,minLength:null,maxLength:null,exactLength:null,typeName:mu.ZodArray,...Bu(e)});function t5(u){if(u instanceof er){const e={};for(const t in u.shape){const n=u.shape[t];e[t]=r4.create(t5(n))}return new er({...u._def,shape:()=>e})}else return u instanceof qc?new qc({...u._def,type:t5(u.element)}):u instanceof r4?r4.create(t5(u.unwrap())):u instanceof fp?fp.create(t5(u.unwrap())):u instanceof O1?O1.create(u.items.map(e=>t5(e))):u}class er extends Iu{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=An.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==kt.object){const l=this._getOrReturnCtx(e);return yt(l,{code:ot.invalid_type,expected:kt.object,received:l.parsedType}),Fu}const{status:n,ctx:i}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof x4&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||o.push(l);const s=[];for(const l of a){const c=r[l],d=i.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new I1(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof x4){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of o)s.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")o.length>0&&(yt(i,{code:ot.unrecognized_keys,keys:o}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of o){const d=i.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new I1(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of s){const d=await c.key;l.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>Ho.mergeObjectSync(n,l)):Ho.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(e){return Qt.errToObj,new er({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,r,a,o;const s=(a=(r=(i=this._def).errorMap)===null||r===void 0?void 0:r.call(i,t,n).message)!==null&&a!==void 0?a:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=Qt.errToObj(e).message)!==null&&o!==void 0?o:s}:{message:s}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(e){return new er({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new er({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:mu.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new er({...this._def,catchall:e})}pick(e){const t={};return An.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new er({...this._def,shape:()=>t})}omit(e){const t={};return An.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new er({...this._def,shape:()=>t})}deepPartial(){return t5(this)}partial(e){const t={};return An.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new er({...this._def,shape:()=>t})}required(e){const t={};return An.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let r=this.shape[n];for(;r instanceof r4;)r=r._def.innerType;t[n]=r}}),new er({...this._def,shape:()=>t})}keyof(){return TTe(An.objectKeys(this.shape))}}er.create=(u,e)=>new er({shape:()=>u,unknownKeys:"strip",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});er.strictCreate=(u,e)=>new er({shape:()=>u,unknownKeys:"strict",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});er.lazycreate=(u,e)=>new er({shape:u,unknownKeys:"strip",catchall:x4.create(),typeName:mu.ZodObject,...Bu(e)});class hy extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(r){for(const o of r)if(o.result.status==="valid")return o.result;for(const o of r)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const a=r.map(o=>new Uc(o.ctx.common.issues));return yt(t,{code:ot.invalid_union,unionErrors:a}),Fu}if(t.common.async)return Promise.all(n.map(async r=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(i);{let r;const a=[];for(const s of n){const l={...t,common:{...t.common,issues:[]},parent:null},c=s._parseSync({data:t.data,path:t.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!r&&(r={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const o=a.map(s=>new Uc(s));return yt(t,{code:ot.invalid_union,unionErrors:o}),Fu}}get options(){return this._def.options}}hy.create=(u,e)=>new hy({options:u,typeName:mu.ZodUnion,...Bu(e)});const U8=u=>u instanceof gy?U8(u.schema):u instanceof od?U8(u.innerType()):u instanceof fy?[u.value]:u instanceof cg?u.options:u instanceof py?Object.keys(u.enum):u instanceof Dy?U8(u._def.innerType):u instanceof cy?[void 0]:u instanceof dy?[null]:null;class ZI extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.object)return yt(t,{code:ot.invalid_type,expected:kt.object,received:t.parsedType}),Fu;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(yt(t,{code:ot.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Fu)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const r of t){const a=U8(r.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,r)}}return new ZI({typeName:mu.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Bu(n)})}}function eY(u,e){const t=AE(u),n=AE(e);if(u===e)return{valid:!0,data:u};if(t===kt.object&&n===kt.object){const i=An.objectKeys(e),r=An.objectKeys(u).filter(o=>i.indexOf(o)!==-1),a={...u,...e};for(const o of r){const s=eY(u[o],e[o]);if(!s.valid)return{valid:!1};a[o]=s.data}return{valid:!0,data:a}}else if(t===kt.array&&n===kt.array){if(u.length!==e.length)return{valid:!1};const i=[];for(let r=0;r{if(QZ(r)||QZ(a))return Fu;const o=eY(r.value,a.value);return o.valid?((XZ(r)||XZ(a))&&t.dirty(),{status:t.value,value:o.data}):(yt(n,{code:ot.invalid_intersection_types}),Fu)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([r,a])=>i(r,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ey.create=(u,e,t)=>new Ey({left:u,right:e,typeName:mu.ZodIntersection,...Bu(t)});class O1 extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.array)return yt(n,{code:ot.invalid_type,expected:kt.array,received:n.parsedType}),Fu;if(n.data.lengththis._def.items.length&&(yt(n,{code:ot.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map((a,o)=>{const s=this._def.items[o]||this._def.rest;return s?s._parse(new I1(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(r).then(a=>Ho.mergeArray(t,a)):Ho.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new O1({...this._def,rest:e})}}O1.create=(u,e)=>{if(!Array.isArray(u))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new O1({items:u,typeName:mu.ZodTuple,rest:null,...Bu(e)})};class my extends Iu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.object)return yt(n,{code:ot.invalid_type,expected:kt.object,received:n.parsedType}),Fu;const i=[],r=this._def.keyType,a=this._def.valueType;for(const o in n.data)i.push({key:r._parse(new I1(n,o,n.path,o)),value:a._parse(new I1(n,n.data[o],n.path,o))});return n.common.async?Ho.mergeObjectAsync(t,i):Ho.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Iu?new my({keyType:e,valueType:t,typeName:mu.ZodRecord,...Bu(n)}):new my({keyType:Pc.create(),valueType:e,typeName:mu.ZodRecord,...Bu(t)})}}class FT extends Iu{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.map)return yt(n,{code:ot.invalid_type,expected:kt.map,received:n.parsedType}),Fu;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map(([o,s],l)=>({key:i._parse(new I1(n,o,n.path,[l,"key"])),value:r._parse(new I1(n,s,n.path,[l,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const s of a){const l=await s.key,c=await s.value;if(l.status==="aborted"||c.status==="aborted")return Fu;(l.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(l.value,c.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const s of a){const l=s.key,c=s.value;if(l.status==="aborted"||c.status==="aborted")return Fu;(l.status==="dirty"||c.status==="dirty")&&t.dirty(),o.set(l.value,c.value)}return{status:t.value,value:o}}}}FT.create=(u,e,t)=>new FT({valueType:e,keyType:u,typeName:mu.ZodMap,...Bu(t)});class gp extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==kt.set)return yt(n,{code:ot.invalid_type,expected:kt.set,received:n.parsedType}),Fu;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(yt(n,{code:ot.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(s){const l=new Set;for(const c of s){if(c.status==="aborted")return Fu;c.status==="dirty"&&t.dirty(),l.add(c.value)}return{status:t.value,value:l}}const o=[...n.data.values()].map((s,l)=>r._parse(new I1(n,s,n.path,l)));return n.common.async?Promise.all(o).then(s=>a(s)):a(o)}min(e,t){return new gp({...this._def,minSize:{value:e,message:Qt.toString(t)}})}max(e,t){return new gp({...this._def,maxSize:{value:e,message:Qt.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}gp.create=(u,e)=>new gp({valueType:u,minSize:null,maxSize:null,typeName:mu.ZodSet,...Bu(e)});class Rx extends Iu{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.function)return yt(t,{code:ot.invalid_type,expected:kt.function,received:t.parsedType}),Fu;function n(o,s){return vT({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xT(),oy].filter(l=>!!l),issueData:{code:ot.invalid_arguments,argumentsError:s}})}function i(o,s){return vT({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xT(),oy].filter(l=>!!l),issueData:{code:ot.invalid_return_type,returnTypeError:s}})}const r={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Yv){const o=this;return Ds(async function(...s){const l=new Uc([]),c=await o._def.args.parseAsync(s,r).catch(E=>{throw l.addIssue(n(s,E)),l}),d=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(d,r).catch(E=>{throw l.addIssue(i(d,E)),l})})}else{const o=this;return Ds(function(...s){const l=o._def.args.safeParse(s,r);if(!l.success)throw new Uc([n(s,l.error)]);const c=Reflect.apply(a,this,l.data),d=o._def.returns.safeParse(c,r);if(!d.success)throw new Uc([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Rx({...this._def,args:O1.create(e).rest(x3.create())})}returns(e){return new Rx({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Rx({args:e||O1.create([]).rest(x3.create()),returns:t||x3.create(),typeName:mu.ZodFunction,...Bu(n)})}}class gy extends Iu{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}gy.create=(u,e)=>new gy({getter:u,typeName:mu.ZodLazy,...Bu(e)});class fy extends Iu{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return yt(t,{received:t.data,code:ot.invalid_literal,expected:this._def.value}),Fu}return{status:"valid",value:e.data}}get value(){return this._def.value}}fy.create=(u,e)=>new fy({value:u,typeName:mu.ZodLiteral,...Bu(e)});function TTe(u,e){return new cg({values:u,typeName:mu.ZodEnum,...Bu(e)})}class cg extends Iu{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return yt(t,{expected:An.joinValues(n),received:t.parsedType,code:ot.invalid_type}),Fu}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return yt(t,{received:t.data,code:ot.invalid_enum_value,options:n}),Fu}return Ds(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return cg.create(e)}exclude(e){return cg.create(this.options.filter(t=>!e.includes(t)))}}cg.create=TTe;class py extends Iu{_parse(e){const t=An.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==kt.string&&n.parsedType!==kt.number){const i=An.objectValues(t);return yt(n,{expected:An.joinValues(i),received:n.parsedType,code:ot.invalid_type}),Fu}if(t.indexOf(e.data)===-1){const i=An.objectValues(t);return yt(n,{received:n.data,code:ot.invalid_enum_value,options:i}),Fu}return Ds(e.data)}get enum(){return this._def.values}}py.create=(u,e)=>new py({values:u,typeName:mu.ZodNativeEnum,...Bu(e)});class Yv extends Iu{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==kt.promise&&t.common.async===!1)return yt(t,{code:ot.invalid_type,expected:kt.promise,received:t.parsedType}),Fu;const n=t.parsedType===kt.promise?t.data:Promise.resolve(t.data);return Ds(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Yv.create=(u,e)=>new Yv({type:u,typeName:mu.ZodPromise,...Bu(e)});class od extends Iu{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===mu.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:a=>{yt(n,a),a.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),i.type==="preprocess"){const a=i.transform(n.data,r);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(i.type==="refinement"){const a=o=>{const s=i.refinement(o,r);if(n.common.async)return Promise.resolve(s);if(s instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Fu:(o.status==="dirty"&&t.dirty(),a(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?Fu:(o.status==="dirty"&&t.dirty(),a(o.value).then(()=>({status:t.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!sy(a))return a;const o=i.transform(a.value,r);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>sy(a)?Promise.resolve(i.transform(a.value,r)).then(o=>({status:t.value,value:o})):a);An.assertNever(i)}}od.create=(u,e,t)=>new od({schema:u,typeName:mu.ZodEffects,effect:e,...Bu(t)});od.createWithPreprocess=(u,e,t)=>new od({schema:e,effect:{type:"preprocess",transform:u},typeName:mu.ZodEffects,...Bu(t)});class r4 extends Iu{_parse(e){return this._getType(e)===kt.undefined?Ds(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}r4.create=(u,e)=>new r4({innerType:u,typeName:mu.ZodOptional,...Bu(e)});class fp extends Iu{_parse(e){return this._getType(e)===kt.null?Ds(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fp.create=(u,e)=>new fp({innerType:u,typeName:mu.ZodNullable,...Bu(e)});class Dy extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===kt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Dy.create=(u,e)=>new Dy({innerType:u,typeName:mu.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Bu(e)});class yT extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return CT(i)?i.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Uc(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Uc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}yT.create=(u,e)=>new yT({innerType:u,typeName:mu.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Bu(e)});class AT extends Iu{_parse(e){if(this._getType(e)!==kt.nan){const n=this._getOrReturnCtx(e);return yt(n,{code:ot.invalid_type,expected:kt.nan,received:n.parsedType}),Fu}return{status:"valid",value:e.data}}}AT.create=u=>new AT({typeName:mu.ZodNaN,...Bu(u)});const fUt=Symbol("zod_brand");class NTe extends Iu{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class d7 extends Iu{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return r.status==="aborted"?Fu:r.status==="dirty"?(t.dirty(),MTe(r.value)):this._def.out._parseAsync({data:r.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Fu:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new d7({in:e,out:t,typeName:mu.ZodPipeline})}}class _T extends Iu{_parse(e){const t=this._def.innerType._parse(e);return sy(t)&&(t.value=Object.freeze(t.value)),t}}_T.create=(u,e)=>new _T({innerType:u,typeName:mu.ZodReadonly,...Bu(e)});const PTe=(u,e={},t)=>u?Zv.create().superRefine((n,i)=>{var r,a;if(!u(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,s=(a=(r=o.fatal)!==null&&r!==void 0?r:t)!==null&&a!==void 0?a:!0,l=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...l,fatal:s})}}):Zv.create(),pUt={object:er.lazycreate};var mu;(function(u){u.ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly"})(mu||(mu={}));const DUt=(u,e={message:`Input not instance of ${u.name}`})=>PTe(t=>t instanceof u,e),RTe=Pc.create,ITe=sg.create,xUt=AT.create,vUt=lg.create,OTe=ly.create,CUt=mp.create,bUt=bT.create,kUt=cy.create,FUt=dy.create,yUt=Zv.create,AUt=x3.create,_Ut=x4.create,SUt=kT.create,BUt=qc.create,wUt=er.create,LUt=er.strictCreate,zUt=hy.create,MUt=ZI.create,TUt=Ey.create,NUt=O1.create,PUt=my.create,RUt=FT.create,IUt=gp.create,OUt=Rx.create,jUt=gy.create,HUt=fy.create,VUt=cg.create,$Ut=py.create,KUt=Yv.create,wfe=od.create,WUt=r4.create,GUt=fp.create,UUt=od.createWithPreprocess,qUt=d7.create,JUt=()=>RTe().optional(),ZUt=()=>ITe().optional(),YUt=()=>OTe().optional(),QUt={string:u=>Pc.create({...u,coerce:!0}),number:u=>sg.create({...u,coerce:!0}),boolean:u=>ly.create({...u,coerce:!0}),bigint:u=>lg.create({...u,coerce:!0}),date:u=>mp.create({...u,coerce:!0})},XUt=Fu;var ke=Object.freeze({__proto__:null,defaultErrorMap:oy,setErrorMap:nUt,getErrorMap:xT,makeIssue:vT,EMPTY_PATH:iUt,addIssueToContext:yt,ParseStatus:Ho,INVALID:Fu,DIRTY:MTe,OK:Ds,isAborted:QZ,isDirty:XZ,isValid:sy,isAsync:CT,get util(){return An},get objectUtil(){return YZ},ZodParsedType:kt,getParsedType:AE,ZodType:Iu,ZodString:Pc,ZodNumber:sg,ZodBigInt:lg,ZodBoolean:ly,ZodDate:mp,ZodSymbol:bT,ZodUndefined:cy,ZodNull:dy,ZodAny:Zv,ZodUnknown:x3,ZodNever:x4,ZodVoid:kT,ZodArray:qc,ZodObject:er,ZodUnion:hy,ZodDiscriminatedUnion:ZI,ZodIntersection:Ey,ZodTuple:O1,ZodRecord:my,ZodMap:FT,ZodSet:gp,ZodFunction:Rx,ZodLazy:gy,ZodLiteral:fy,ZodEnum:cg,ZodNativeEnum:py,ZodPromise:Yv,ZodEffects:od,ZodTransformer:od,ZodOptional:r4,ZodNullable:fp,ZodDefault:Dy,ZodCatch:yT,ZodNaN:AT,BRAND:fUt,ZodBranded:NTe,ZodPipeline:d7,ZodReadonly:_T,custom:PTe,Schema:Iu,ZodSchema:Iu,late:pUt,get ZodFirstPartyTypeKind(){return mu},coerce:QUt,any:yUt,array:BUt,bigint:vUt,boolean:OTe,date:CUt,discriminatedUnion:MUt,effect:wfe,enum:VUt,function:OUt,instanceof:DUt,intersection:TUt,lazy:jUt,literal:HUt,map:RUt,nan:xUt,nativeEnum:$Ut,never:_Ut,null:FUt,nullable:GUt,number:ITe,object:wUt,oboolean:YUt,onumber:ZUt,optional:WUt,ostring:JUt,pipeline:qUt,preprocess:UUt,promise:KUt,record:PUt,set:IUt,strictObject:LUt,string:RTe,symbol:bUt,transformer:wfe,tuple:NUt,undefined:kUt,union:zUt,unknown:AUt,void:SUt,NEVER:XUt,ZodIssueCode:ot,quotelessJson:uUt,ZodError:Uc});const eqt=ke.object({ps:ke.string(),add:ke.string().nonempty(),port:ke.number().min(0).max(65535),id:ke.string().nonempty(),aid:ke.number().min(0).max(65535),net:ke.enum(["tcp","kcp","ws","h2","grpc"]),type:ke.enum(["none","http","srtp","utp","wechat-video","dtls","wireguard"]),host:ke.string(),path:ke.string(),tls:ke.enum(["none","tls"]),flow:ke.enum(["none","xtls-rprx-origin","xtls-rprx-origin-udp443","xtls-rprx-vision","xtls-rprx-vision-udp443"]),alpn:ke.string(),scy:ke.enum(["auto","aes-128-gcm","chacha20-poly1305","none","zero"]),v:ke.literal(""),allowInsecure:ke.boolean(),sni:ke.string()}),tqt=ke.object({method:ke.enum(["aes-128-gcm","aes-256-gcm","chacha20-poly1305","chacha20-ietf-poly1305","plain","none"]),plugin:ke.enum(["","simple-obfs","v2ray-plugin"]),obfs:ke.enum(["http","tls"]),tls:ke.enum(["","tls"]),path:ke.string(),mode:ke.string(),host:ke.string(),password:ke.string().nonempty(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string(),impl:ke.enum(["","chained","transport"])}),uqt=ke.object({method:ke.enum(["aes-128-cfb","aes-192-cfb","aes-256-cfb","aes-128-ctr","aes-192-ctr","aes-256-ctr","aes-128-ofb","aes-192-ofb","aes-256-ofb","des-cfb","bf-cfb","cast5-cfb","rc4-md5","chacha20-ietf","salsa20","camellia-128-cfb","camellia-192-cfb","camellia-256-cfb","idea-cfb","rc2-cfb","seed-cfb","none"]),password:ke.string().nonempty(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535).positive(),name:ke.string(),proto:ke.enum(["origin","verify_sha1","auth_sha1_v4","auth_aes128_md5","auth_aes128_sha1","auth_chain_a","auth_chain_b"]),protoParam:ke.string(),obfs:ke.enum(["plain","http_simple","http_post","random_head","tls1.2_ticket_auth"]),obfsParam:ke.string()}),nqt=ke.object({name:ke.string(),server:ke.string().nonempty(),peer:ke.string(),host:ke.string(),path:ke.string(),allowInsecure:ke.boolean(),port:ke.number().min(0).max(65535),password:ke.string().nonempty(),method:ke.enum(["origin","shadowsocks"]),ssCipher:ke.enum(["aes-128-gcm","aes-256-gcm","chacha20-poly1305","chacha20-ietf-poly1305"]),ssPassword:ke.string(),obfs:ke.enum(["none","websocket"])}),iqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),uuid:ke.string().nonempty(),password:ke.string().nonempty(),allowInsecure:ke.boolean(),disable_sni:ke.boolean(),sni:ke.string(),congestion_control:ke.string(),alpn:ke.string(),udp_relay_mode:ke.string()}),rqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),uuid:ke.string().nonempty(),password:ke.string().nonempty(),allowInsecure:ke.boolean(),pinned_certchain_sha256:ke.string(),sni:ke.string(),congestion_control:ke.string()}),aqt=ke.object({name:ke.string(),server:ke.string().nonempty(),port:ke.number().min(0).max(65535),auth:ke.string(),obfs:ke.string(),obfsPassword:ke.string(),sni:ke.string(),allowInsecure:ke.boolean(),pinSHA256:ke.string()}),oqt=ke.object({username:ke.string(),password:ke.string(),host:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string()}),sqt=ke.object({username:ke.string(),password:ke.string(),host:ke.string().nonempty(),port:ke.number().min(0).max(65535),name:ke.string()}),Lfe=Vne("mode"),xy=Vne("token"),Qv=Vne("endpointURL",ETe),zfe=HWt("APP_STATE",{preferredColorScheme:"",colsPerRow:PGt,nodeSortableKeys:[],subscriptionSortableKeys:[],configSortableKeys:[],routingSortableKeys:[],dnsSortableKeys:[],groupSortableKeys:[]},{encode:JSON.stringify,decode:JSON.parse}),h7=mMe({defaultConfigID:"",defaultRoutingID:"",defaultDNSID:"",defaultGroupID:""}),jTe=Bne("dark"),HTe=C.createContext(null),lqt=({client:u,children:e})=>B.jsx(HTe.Provider,{value:u,children:e}),Mu=()=>C.useContext(HTe),cqt=({children:u})=>{const e=V0(Qv),t=V0(xy),n=C.useMemo(()=>new T$t,[]),i=C.useMemo(()=>new dTe(e,{headers:{authorization:`Bearer ${t}`},responseMiddleware:r=>{var o,s;const a=(s=(o=r.response)==null?void 0:o.errors)==null?void 0:s[0];return a&&(c1.show({color:"red",message:a.message}),a.message==="access denied"&&xy.set("")),r}}),[e,t]);return B.jsx(J$t,{client:n,children:B.jsx(lqt,{client:i,children:u})})};var VTe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function Mfe(u){return typeof u=="object"&&u!==null&&typeof u.then=="function"}function dqt(u){return new Promise((e,t)=>{const n=u.subscribe({next(i){e(i),n.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})})}function $Te(u){return typeof u=="object"&&u!==null&&"subscribe"in u&&typeof u.subscribe=="function"}function KTe(u){return typeof u=="object"&&u!==null&&(u[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in u)}function hqt(u){var e;return VTe(this,void 0,void 0,function*(){const t=(e=("return"in u?u:u[Symbol.asyncIterator]()).return)===null||e===void 0?void 0:e.bind(u),i=yield("next"in u?u:u[Symbol.asyncIterator]()).next.bind(u)();return t==null||t(),i.value})}function Tfe(u){return VTe(this,void 0,void 0,function*(){const e=yield u;return KTe(e)?hqt(e):$Te(e)?dqt(e):e})}async function Eqt(u,e){let t=u.headers["content-type"];if(!t||!~t.indexOf("multipart/"))return u;let n=t.indexOf("boundary="),i="-";if(~n){let r=n+9,a=t.indexOf(";",r);i=t.slice(r,a>-1?a:void 0).trim().replace(/"/g,"")}return async function*(r,a,o){let s,l,c,d=!o||!o.multiple,h=Buffer.byteLength(a),E=Buffer.alloc(0),m=[];e:for await(let g of r){s=E.byteLength,E=Buffer.concat([E,g]);let f=g.indexOf(a);for(~f?s+=f:s=E.indexOf(a),m=[];~s;){let p=E.subarray(0,s),D=E.subarray(s+h);if(l){let x=p.indexOf(`\r \r `)+4,b=p.lastIndexOf(`\r `,x),k=!1,A=p.subarray(x,b>-1?void 0:b),F=String(p.subarray(0,x)).trim().split(`\r @@ -1010,15 +1010,15 @@ ${d.headers} Body:: ${d.body}`);throw new Error(`Expected multipart chunks to be of json type. got: -${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=o.return)&&(yield _h(r.call(o)))}finally{if(i)throw i.error}}})},Aqt=(u,e)=>{if(u.wsClient)return GTe(u.wsClient);if(u.subscriptionUrl)return kqt(u.subscriptionUrl,Object.assign(Object.assign({},u.wsConnectionParams),e==null?void 0:e.headers));const t=u.legacyClient||u.legacyWsClient;if(t)return Fqt(t)};function _qt(u){let e;if(typeof window<"u"&&window.fetch&&(e=window.fetch),((u==null?void 0:u.enableIncrementalDelivery)===null||u.enableIncrementalDelivery!==!1)&&(u.enableIncrementalDelivery=!0),u.fetch&&(e=u.fetch),!e)throw new Error("No valid fetcher implementation available");const t=bqt(u,e),n=u.enableIncrementalDelivery?yqt(u,e):t;return(i,r)=>{if(i.operationName==="IntrospectionQuery")return(u.schemaFetcher||t)(i,r);if(r!=null&&r.documentAST?Cqt(r.documentAST,i.operationName||void 0):!1){const o=Aqt(u,r);if(!o)throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${u.subscriptionUrl?`Provided URL ${u.subscriptionUrl} failed`:"Please provide subscriptionUrl, wsClient or legacyClient option first."}`);return o(i)}return n(i,r)}}function tY(u){return JSON.stringify(u,null,2)}function Sqt(u){return Object.assign(Object.assign({},u),{message:u.message,stack:u.stack})}function Pfe(u){return u instanceof Error?Sqt(u):u}function vy(u){return Array.isArray(u)?tY({errors:u.map(e=>Pfe(e))}):tY({errors:[Pfe(u)]})}function uY(u){return tY(u)}function Bqt(u,e,t){const n=[];if(!u||!e)return{insertions:n,result:e};let i;try{i=Bg(e)}catch{return{insertions:n,result:e}}const r=t||wqt,a=new cTe(u);return ad(i,{leave(o){a.leave(o)},enter(o){if(a.enter(o),o.kind==="Field"&&!o.selectionSet){const s=a.getType(),l=UTe(Mqt(s),r);if(l&&o.loc){const c=zqt(e,o.loc.start);n.push({index:o.loc.end,string:" "+t0(l).replaceAll(` +${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=o.return)&&(yield _h(r.call(o)))}finally{if(i)throw i.error}}})},Aqt=(u,e)=>{if(u.wsClient)return GTe(u.wsClient);if(u.subscriptionUrl)return kqt(u.subscriptionUrl,Object.assign(Object.assign({},u.wsConnectionParams),e==null?void 0:e.headers));const t=u.legacyClient||u.legacyWsClient;if(t)return Fqt(t)};function _qt(u){let e;if(typeof window<"u"&&window.fetch&&(e=window.fetch),((u==null?void 0:u.enableIncrementalDelivery)===null||u.enableIncrementalDelivery!==!1)&&(u.enableIncrementalDelivery=!0),u.fetch&&(e=u.fetch),!e)throw new Error("No valid fetcher implementation available");const t=bqt(u,e),n=u.enableIncrementalDelivery?yqt(u,e):t;return(i,r)=>{if(i.operationName==="IntrospectionQuery")return(u.schemaFetcher||t)(i,r);if(r!=null&&r.documentAST?Cqt(r.documentAST,i.operationName||void 0):!1){const o=Aqt(u,r);if(!o)throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${u.subscriptionUrl?`Provided URL ${u.subscriptionUrl} failed`:"Please provide subscriptionUrl, wsClient or legacyClient option first."}`);return o(i)}return n(i,r)}}function tY(u){return JSON.stringify(u,null,2)}function Sqt(u){return Object.assign(Object.assign({},u),{message:u.message,stack:u.stack})}function Pfe(u){return u instanceof Error?Sqt(u):u}function vy(u){return Array.isArray(u)?tY({errors:u.map(e=>Pfe(e))}):tY({errors:[Pfe(u)]})}function uY(u){return tY(u)}function Bqt(u,e,t){const n=[];if(!u||!e)return{insertions:n,result:e};let i;try{i=Bg(e)}catch{return{insertions:n,result:e}}const r=t||wqt,a=new cTe(u);return ad(i,{leave(o){a.leave(o)},enter(o){if(a.enter(o),o.kind==="Field"&&!o.selectionSet){const s=a.getType(),l=UTe(Mqt(s),r);if(l&&o.loc){const c=zqt(e,o.loc.start);n.push({index:o.loc.end,string:" "+u0(l).replaceAll(` `,` -`+c)})}}}}),{insertions:n,result:Lqt(e,n)}}function wqt(u){if(!("getFields"in u))return[];const e=u.getFields();if(e.id)return["id"];if(e.edges)return["edges"];if(e.node)return["node"];const t=[];for(const n of Object.keys(e))UI(e[n].type)&&t.push(n);return t}function UTe(u,e){const t=F0(u);if(!u||UI(u))return;const n=e(t);if(!(!Array.isArray(n)||n.length===0||!("getFields"in t)))return{kind:De.SELECTION_SET,selections:n.map(i=>{const r=t.getFields()[i],a=r?r.type:null;return{kind:De.FIELD,name:{kind:De.NAME,value:i},selectionSet:UTe(a,e)}})}}function Lqt(u,e){if(e.length===0)return u;let t="",n=0;for(const{index:i,string:r}of e)t+=u.slice(n,i)+r,n=i;return t+=u.slice(n),t}function zqt(u,e){let t=e,n=e;for(;t;){const i=u.charCodeAt(t-1);if(i===10||i===13||i===8232||i===8233)break;t--,i!==9&&i!==11&&i!==12&&i!==32&&i!==160&&(n=t)}return u.slice(t,n)}function Mqt(u){if(u)return u}function Tqt(u,e){var t;const n=new Map,i=[];for(const r of u)if(r.kind==="Field"){const a=e(r),o=n.get(a);if(!((t=r.directives)===null||t===void 0)&&t.length){const s=Object.assign({},r);i.push(s)}else if(o!=null&&o.selectionSet&&r.selectionSet)o.selectionSet.selections=[...o.selectionSet.selections,...r.selectionSet.selections];else if(!o){const s=Object.assign({},r);n.set(a,s),i.push(s)}}else i.push(r);return i}function qTe(u,e,t){var n;const i=t?F0(t).name:null,r=[],a=[];for(let o of e){if(o.kind==="FragmentSpread"){const s=o.name.value;if(!o.directives||o.directives.length===0){if(a.includes(s))continue;a.push(s)}const l=u[o.name.value];if(l){const{typeCondition:c,directives:d,selectionSet:h}=l;o={kind:De.INLINE_FRAGMENT,typeCondition:c,directives:d,selectionSet:h}}}if(o.kind===De.INLINE_FRAGMENT&&(!o.directives||((n=o.directives)===null||n===void 0?void 0:n.length)===0)){const s=o.typeCondition?o.typeCondition.name.value:null;if(!s||s===i){r.push(...qTe(u,o.selectionSet.selections,t));continue}}r.push(o)}return r}function Nqt(u,e){const t=e?new cTe(e):null,n=Object.create(null);for(const o of u.definitions)o.kind===De.FRAGMENT_DEFINITION&&(n[o.name.value]=o);const i={SelectionSet(o){const s=t?t.getParentType():null;let{selections:l}=o;return l=qTe(n,l,s),Object.assign(Object.assign({},o),{selections:l})},FragmentDefinition(){return null}},r=ad(u,t?LWt(t,i):i);return ad(r,{SelectionSet(o){let{selections:s}=o;return s=Tqt(s,l=>l.alias?l.alias.value:l.name.value),Object.assign(Object.assign({},o),{selections:s})},FragmentDefinition(){return null}})}function Pqt(u,e,t){if(!t||t.length<1)return;const n=t.map(i=>{var r;return(r=i.name)===null||r===void 0?void 0:r.value});if(e&&n.includes(e))return e;if(e&&u){const r=u.map(a=>{var o;return(o=a.name)===null||o===void 0?void 0:o.value}).indexOf(e);if(r!==-1&&r"u"?this.storage=null:this.storage={getItem:window.localStorage.getItem.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),get length(){let t=0;for(const n in window.localStorage)n.indexOf(`${rS}:`)===0&&(t+=1);return t},clear(){for(const t in window.localStorage)t.indexOf(`${rS}:`)===0&&window.localStorage.removeItem(t)}}}get(e){if(!this.storage)return null;const t=`${rS}:${e}`,n=this.storage.getItem(t);return n==="null"||n==="undefined"?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,i=null;if(this.storage){const r=`${rS}:${e}`;if(t)try{this.storage.setItem(r,t)}catch(a){i=a instanceof Error?a:new Error(`${a}`),n=Rqt(this.storage,a)}else this.storage.removeItem(r)}return{isQuotaError:n,error:i}}clear(){this.storage&&this.storage.clear()}}const rS="graphiql";class Rfe{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some(t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName)}edit(e,t){if(typeof t=="number"&&this.items[t]){const i=this.items[t];if(i.query===e.query&&i.variables===e.variables&&i.headers===e.headers&&i.operationName===e.operationName){this.items.splice(t,1,e),this.save();return}}const n=this.items.findIndex(i=>i.query===e.query&&i.variables===e.variables&&i.headers===e.headers&&i.operationName===e.operationName);n!==-1&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex(n=>n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName);t!==-1&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const i=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(!(i!=null&&i.error))this.items=t;else if(i.isQuotaError&&this.maxSize)t.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const Iqt=1e5;class Oqt{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:n,variables:i,headers:r,operationName:a})=>{if(!this.shouldSaveQuery(n,i,r,this.history.fetchRecent()))return;this.history.push({query:n,variables:i,headers:r,operationName:a});const o=this.history.items,s=this.favorite.items;this.queries=o.concat(s)},this.deleteHistory=({query:n,variables:i,headers:r,operationName:a,favorite:o},s=!1)=>{function l(c){const d=c.items.find(h=>h.query===n&&h.variables===i&&h.headers===r&&h.operationName===a);d&&c.delete(d)}(o||s)&&l(this.favorite),(!o||s)&&l(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new Rfe("queries",this.storage,this.maxHistoryLength),this.favorite=new Rfe("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,i){if(!e)return!1;try{Bg(e)}catch{return!1}return e.length>Iqt?!1:i?!(JSON.stringify(e)===JSON.stringify(i.query)&&(JSON.stringify(t)===JSON.stringify(i.variables)&&(JSON.stringify(n)===JSON.stringify(i.headers)||n&&!i.headers)||t&&!i.variables)):!0}toggleFavorite({query:e,variables:t,headers:n,operationName:i,label:r,favorite:a}){const o={query:e,variables:t,headers:n,operationName:i,label:r};a?(o.favorite=!1,this.favorite.delete(o),this.history.push(o)):(o.favorite=!0,this.favorite.push(o),this.history.delete(o)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:i,label:r,favorite:a},o){const s={query:e,variables:t,headers:n,operationName:i,label:r};a?this.favorite.edit(Object.assign(Object.assign({},s),{favorite:a}),o):this.history.edit(s,o),this.queries=[...this.history.items,...this.favorite.items]}}function JTe(u){var e,t,n="";if(typeof u=="string"||typeof u=="number")n+=u;else if(typeof u=="object")if(Array.isArray(u))for(e=0;e{switch(t.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":e=t;break}}),e}function Ife(u,e,t){return t===ny.name&&u.getQueryType()===e?ny:t===iy.name&&u.getQueryType()===e?iy:t===ry.name&&Cl(e)?ry:"getFields"in e?e.getFields()[t]:null}function ZTe(u,e){const t=[];let n=u;for(;n!=null&&n.kind;)t.push(n),n=n.prevState;for(let i=t.length-1;i>=0;i--)e(t[i])}function pp(u){const e=Object.keys(u),t=e.length,n=new Array(t);for(let i=0;i!n.isDeprecated);const t=u.map(n=>({proximity:Vqt(YTe(n.label),e),entry:n}));return c$(c$(t,n=>n.proximity<=2),n=>!n.entry.isDeprecated).sort((n,i)=>(n.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||n.proximity-i.proximity||n.entry.label.length-i.entry.label.length).map(n=>n.entry)}function c$(u,e){const t=u.filter(e);return t.length===0?u:t}function YTe(u){return u.toLowerCase().replaceAll(/\W/g,"")}function Vqt(u,e){let t=$qt(e,u);return u.length>e.length&&(t-=u.length-e.length-1,t+=u.indexOf(e)===0?0:.5),t}function $qt(u,e){let t,n;const i=[],r=u.length,a=e.length;for(t=0;t<=r;t++)i[t]=[t];for(n=1;n<=a;n++)i[0][n]=n;for(t=1;t<=r;t++)for(n=1;n<=a;n++){const o=u[t-1]===e[n-1]?0:1;i[t][n]=Math.min(i[t-1][n]+1,i[t][n-1]+1,i[t-1][n-1]+o),t>1&&n>1&&u[t-1]===e[n-2]&&u[t-2]===e[n-1]&&(i[t][n]=Math.min(i[t][n],i[t-2][n-2]+o))}return i[r][a]}var Ofe;(function(u){function e(t){return typeof t=="string"}u.is=e})(Ofe||(Ofe={}));var iY;(function(u){function e(t){return typeof t=="string"}u.is=e})(iY||(iY={}));var jfe;(function(u){u.MIN_VALUE=-2147483648,u.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&u.MIN_VALUE<=t&&t<=u.MAX_VALUE}u.is=e})(jfe||(jfe={}));var ST;(function(u){u.MIN_VALUE=0,u.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&u.MIN_VALUE<=t&&t<=u.MAX_VALUE}u.is=e})(ST||(ST={}));var yc;(function(u){function e(n,i){return n===Number.MAX_VALUE&&(n=ST.MAX_VALUE),i===Number.MAX_VALUE&&(i=ST.MAX_VALUE),{line:n,character:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.uinteger(i.line)&&xe.uinteger(i.character)}u.is=t})(yc||(yc={}));var Rr;(function(u){function e(n,i,r,a){if(xe.uinteger(n)&&xe.uinteger(i)&&xe.uinteger(r)&&xe.uinteger(a))return{start:yc.create(n,i),end:yc.create(r,a)};if(yc.is(n)&&yc.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments[".concat(n,", ").concat(i,", ").concat(r,", ").concat(a,"]"))}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&yc.is(i.start)&&yc.is(i.end)}u.is=t})(Rr||(Rr={}));var BT;(function(u){function e(n,i){return{uri:n,range:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.range)&&(xe.string(i.uri)||xe.undefined(i.uri))}u.is=t})(BT||(BT={}));var Hfe;(function(u){function e(n,i,r,a){return{targetUri:n,targetRange:i,targetSelectionRange:r,originSelectionRange:a}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.targetRange)&&xe.string(i.targetUri)&&Rr.is(i.targetSelectionRange)&&(Rr.is(i.originSelectionRange)||xe.undefined(i.originSelectionRange))}u.is=t})(Hfe||(Hfe={}));var rY;(function(u){function e(n,i,r,a){return{red:n,green:i,blue:r,alpha:a}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.numberRange(i.red,0,1)&&xe.numberRange(i.green,0,1)&&xe.numberRange(i.blue,0,1)&&xe.numberRange(i.alpha,0,1)}u.is=t})(rY||(rY={}));var Vfe;(function(u){function e(n,i){return{range:n,color:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.range)&&rY.is(i.color)}u.is=t})(Vfe||(Vfe={}));var $fe;(function(u){function e(n,i,r){return{label:n,textEdit:i,additionalTextEdits:r}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.string(i.label)&&(xe.undefined(i.textEdit)||a4.is(i))&&(xe.undefined(i.additionalTextEdits)||xe.typedArray(i.additionalTextEdits,a4.is))}u.is=t})($fe||($fe={}));var Kfe;(function(u){u.Comment="comment",u.Imports="imports",u.Region="region"})(Kfe||(Kfe={}));var Wfe;(function(u){function e(n,i,r,a,o,s){var l={startLine:n,endLine:i};return xe.defined(r)&&(l.startCharacter=r),xe.defined(a)&&(l.endCharacter=a),xe.defined(o)&&(l.kind=o),xe.defined(s)&&(l.collapsedText=s),l}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.uinteger(i.startLine)&&xe.uinteger(i.startLine)&&(xe.undefined(i.startCharacter)||xe.uinteger(i.startCharacter))&&(xe.undefined(i.endCharacter)||xe.uinteger(i.endCharacter))&&(xe.undefined(i.kind)||xe.string(i.kind))}u.is=t})(Wfe||(Wfe={}));var aY;(function(u){function e(n,i){return{location:n,message:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&BT.is(i.location)&&xe.string(i.message)}u.is=t})(aY||(aY={}));var Gfe;(function(u){u.Error=1,u.Warning=2,u.Information=3,u.Hint=4})(Gfe||(Gfe={}));var Ufe;(function(u){u.Unnecessary=1,u.Deprecated=2})(Ufe||(Ufe={}));var qfe;(function(u){function e(t){var n=t;return xe.objectLiteral(n)&&xe.string(n.href)}u.is=e})(qfe||(qfe={}));var wT;(function(u){function e(n,i,r,a,o,s){var l={range:n,message:i};return xe.defined(r)&&(l.severity=r),xe.defined(a)&&(l.code=a),xe.defined(o)&&(l.source=o),xe.defined(s)&&(l.relatedInformation=s),l}u.create=e;function t(n){var i,r=n;return xe.defined(r)&&Rr.is(r.range)&&xe.string(r.message)&&(xe.number(r.severity)||xe.undefined(r.severity))&&(xe.integer(r.code)||xe.string(r.code)||xe.undefined(r.code))&&(xe.undefined(r.codeDescription)||xe.string((i=r.codeDescription)===null||i===void 0?void 0:i.href))&&(xe.string(r.source)||xe.undefined(r.source))&&(xe.undefined(r.relatedInformation)||xe.typedArray(r.relatedInformation,aY.is))}u.is=t})(wT||(wT={}));var Xv;(function(u){function e(n,i){for(var r=[],a=2;a0&&(o.arguments=r),o}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.title)&&xe.string(i.command)}u.is=t})(Xv||(Xv={}));var a4;(function(u){function e(r,a){return{range:r,newText:a}}u.replace=e;function t(r,a){return{range:{start:r,end:r},newText:a}}u.insert=t;function n(r){return{range:r,newText:""}}u.del=n;function i(r){var a=r;return xe.objectLiteral(a)&&xe.string(a.newText)&&Rr.is(a.range)}u.is=i})(a4||(a4={}));var Ix;(function(u){function e(n,i,r){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),r!==void 0&&(a.description=r),a}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.string(i.label)&&(xe.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(xe.string(i.description)||i.description===void 0)}u.is=t})(Ix||(Ix={}));var Lo;(function(u){function e(t){var n=t;return xe.string(n)}u.is=e})(Lo||(Lo={}));var gE;(function(u){function e(r,a,o){return{range:r,newText:a,annotationId:o}}u.replace=e;function t(r,a,o){return{range:{start:r,end:r},newText:a,annotationId:o}}u.insert=t;function n(r,a){return{range:r,newText:"",annotationId:a}}u.del=n;function i(r){var a=r;return a4.is(a)&&(Ix.is(a.annotationId)||Lo.is(a.annotationId))}u.is=i})(gE||(gE={}));var LT;(function(u){function e(n,i){return{textDocument:n,edits:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&zT.is(i.textDocument)&&Array.isArray(i.edits)}u.is=t})(LT||(LT={}));var Cy;(function(u){function e(n,i,r){var a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),r!==void 0&&(a.annotationId=r),a}u.create=e;function t(n){var i=n;return i&&i.kind==="create"&&xe.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(Cy||(Cy={}));var by;(function(u){function e(n,i,r,a){var o={kind:"rename",oldUri:n,newUri:i};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(o.options=r),a!==void 0&&(o.annotationId=a),o}u.create=e;function t(n){var i=n;return i&&i.kind==="rename"&&xe.string(i.oldUri)&&xe.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(by||(by={}));var ky;(function(u){function e(n,i,r){var a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),r!==void 0&&(a.annotationId=r),a}u.create=e;function t(n){var i=n;return i&&i.kind==="delete"&&xe.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||xe.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||xe.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(ky||(ky={}));var oY;(function(u){function e(t){var n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return xe.string(i.kind)?Cy.is(i)||by.is(i)||ky.is(i):LT.is(i)}))}u.is=e})(oY||(oY={}));var aS=function(){function u(e,t){this.edits=e,this.changeAnnotations=t}return u.prototype.insert=function(e,t,n){var i,r;if(n===void 0?i=a4.insert(e,t):Lo.is(n)?(r=n,i=gE.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=gE.insert(e,t,r)),this.edits.push(i),r!==void 0)return r},u.prototype.replace=function(e,t,n){var i,r;if(n===void 0?i=a4.replace(e,t):Lo.is(n)?(r=n,i=gE.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=gE.replace(e,t,r)),this.edits.push(i),r!==void 0)return r},u.prototype.delete=function(e,t){var n,i;if(t===void 0?n=a4.del(e):Lo.is(t)?(i=t,n=gE.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=gE.del(e,i)),this.edits.push(n),i!==void 0)return i},u.prototype.add=function(e){this.edits.push(e)},u.prototype.all=function(){return this.edits},u.prototype.clear=function(){this.edits.splice(0,this.edits.length)},u.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},u}(),Jfe=function(){function u(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return u.prototype.all=function(){return this._annotations},Object.defineProperty(u.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.manage=function(e,t){var n;if(Lo.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw new Error("Id ".concat(n," is already in use."));if(t===void 0)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},u.prototype.nextId=function(){return this._counter++,this._counter.toString()},u}();(function(){function u(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Jfe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(n){if(LT.is(n)){var i=new aS(n.edits,t._changeAnnotations);t._textEditChanges[n.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(n){var i=new aS(e.changes[n]);t._textEditChanges[n]=i})):this._workspaceEdit={}}return Object.defineProperty(u.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),u.prototype.getTextEditChange=function(e){if(zT.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){var i=[],r={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(r),n=new aS(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[e];if(!n){var i=[];this._workspaceEdit.changes[e]=i,n=new aS(i),this._textEditChanges[e]=n}return n}},u.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Jfe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},u.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},u.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ix.is(t)||Lo.is(t)?i=t:n=t;var r,a;if(i===void 0?r=Cy.create(e,n):(a=Lo.is(i)?i:this._changeAnnotations.manage(i),r=Cy.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),a!==void 0)return a},u.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;Ix.is(n)||Lo.is(n)?r=n:i=n;var a,o;if(r===void 0?a=by.create(e,t,i):(o=Lo.is(r)?r:this._changeAnnotations.manage(r),a=by.create(e,t,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},u.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ix.is(t)||Lo.is(t)?i=t:n=t;var r,a;if(i===void 0?r=ky.create(e,n):(a=Lo.is(i)?i:this._changeAnnotations.manage(i),r=ky.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),a!==void 0)return a},u})();var Zfe;(function(u){function e(n){return{uri:n}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)}u.is=t})(Zfe||(Zfe={}));var Yfe;(function(u){function e(n,i){return{uri:n,version:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&xe.integer(i.version)}u.is=t})(Yfe||(Yfe={}));var zT;(function(u){function e(n,i){return{uri:n,version:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&(i.version===null||xe.integer(i.version))}u.is=t})(zT||(zT={}));var Qfe;(function(u){function e(n,i,r,a){return{uri:n,languageId:i,version:r,text:a}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&xe.string(i.languageId)&&xe.integer(i.version)&&xe.string(i.text)}u.is=t})(Qfe||(Qfe={}));var sY;(function(u){u.PlainText="plaintext",u.Markdown="markdown";function e(t){var n=t;return n===u.PlainText||n===u.Markdown}u.is=e})(sY||(sY={}));var Fy;(function(u){function e(t){var n=t;return xe.objectLiteral(t)&&sY.is(n.kind)&&xe.string(n.value)}u.is=e})(Fy||(Fy={}));var Xfe;(function(u){u.Text=1,u.Method=2,u.Function=3,u.Constructor=4,u.Field=5,u.Variable=6,u.Class=7,u.Interface=8,u.Module=9,u.Property=10,u.Unit=11,u.Value=12,u.Enum=13,u.Keyword=14,u.Snippet=15,u.Color=16,u.File=17,u.Reference=18,u.Folder=19,u.EnumMember=20,u.Constant=21,u.Struct=22,u.Event=23,u.Operator=24,u.TypeParameter=25})(Xfe||(Xfe={}));var lY;(function(u){u.PlainText=1,u.Snippet=2})(lY||(lY={}));var e3e;(function(u){u.Deprecated=1})(e3e||(e3e={}));var t3e;(function(u){function e(n,i,r){return{newText:n,insert:i,replace:r}}u.create=e;function t(n){var i=n;return i&&xe.string(i.newText)&&Rr.is(i.insert)&&Rr.is(i.replace)}u.is=t})(t3e||(t3e={}));var u3e;(function(u){u.asIs=1,u.adjustIndentation=2})(u3e||(u3e={}));var n3e;(function(u){function e(t){var n=t;return n&&(xe.string(n.detail)||n.detail===void 0)&&(xe.string(n.description)||n.description===void 0)}u.is=e})(n3e||(n3e={}));var i3e;(function(u){function e(t){return{label:t}}u.create=e})(i3e||(i3e={}));var r3e;(function(u){function e(t,n){return{items:t||[],isIncomplete:!!n}}u.create=e})(r3e||(r3e={}));var MT;(function(u){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}u.fromPlainText=e;function t(n){var i=n;return xe.string(i)||xe.objectLiteral(i)&&xe.string(i.language)&&xe.string(i.value)}u.is=t})(MT||(MT={}));var a3e;(function(u){function e(t){var n=t;return!!n&&xe.objectLiteral(n)&&(Fy.is(n.contents)||MT.is(n.contents)||xe.typedArray(n.contents,MT.is))&&(t.range===void 0||Rr.is(t.range))}u.is=e})(a3e||(a3e={}));var o3e;(function(u){function e(t,n){return n?{label:t,documentation:n}:{label:t}}u.create=e})(o3e||(o3e={}));var s3e;(function(u){function e(t,n){for(var i=[],r=2;r=0;c--){var d=s[c],h=r.offsetAt(d.range.start),E=r.offsetAt(d.range.end);if(E<=l)o=o.substring(0,h)+d.newText+o.substring(E,o.length);else throw new Error("Overlapping edit");l=h}return o}u.applyEdits=n;function i(r,a){if(r.length<=1)return r;var o=r.length/2|0,s=r.slice(0,o),l=r.slice(o);i(s,a),i(l,a);for(var c=0,d=0,h=0;c{const r=t.getFields()[i],a=r?r.type:null;return{kind:De.FIELD,name:{kind:De.NAME,value:i},selectionSet:UTe(a,e)}})}}function Lqt(u,e){if(e.length===0)return u;let t="",n=0;for(const{index:i,string:r}of e)t+=u.slice(n,i)+r,n=i;return t+=u.slice(n),t}function zqt(u,e){let t=e,n=e;for(;t;){const i=u.charCodeAt(t-1);if(i===10||i===13||i===8232||i===8233)break;t--,i!==9&&i!==11&&i!==12&&i!==32&&i!==160&&(n=t)}return u.slice(t,n)}function Mqt(u){if(u)return u}function Tqt(u,e){var t;const n=new Map,i=[];for(const r of u)if(r.kind==="Field"){const a=e(r),o=n.get(a);if(!((t=r.directives)===null||t===void 0)&&t.length){const s=Object.assign({},r);i.push(s)}else if(o!=null&&o.selectionSet&&r.selectionSet)o.selectionSet.selections=[...o.selectionSet.selections,...r.selectionSet.selections];else if(!o){const s=Object.assign({},r);n.set(a,s),i.push(s)}}else i.push(r);return i}function qTe(u,e,t){var n;const i=t?y0(t).name:null,r=[],a=[];for(let o of e){if(o.kind==="FragmentSpread"){const s=o.name.value;if(!o.directives||o.directives.length===0){if(a.includes(s))continue;a.push(s)}const l=u[o.name.value];if(l){const{typeCondition:c,directives:d,selectionSet:h}=l;o={kind:De.INLINE_FRAGMENT,typeCondition:c,directives:d,selectionSet:h}}}if(o.kind===De.INLINE_FRAGMENT&&(!o.directives||((n=o.directives)===null||n===void 0?void 0:n.length)===0)){const s=o.typeCondition?o.typeCondition.name.value:null;if(!s||s===i){r.push(...qTe(u,o.selectionSet.selections,t));continue}}r.push(o)}return r}function Nqt(u,e){const t=e?new cTe(e):null,n=Object.create(null);for(const o of u.definitions)o.kind===De.FRAGMENT_DEFINITION&&(n[o.name.value]=o);const i={SelectionSet(o){const s=t?t.getParentType():null;let{selections:l}=o;return l=qTe(n,l,s),Object.assign(Object.assign({},o),{selections:l})},FragmentDefinition(){return null}},r=ad(u,t?LWt(t,i):i);return ad(r,{SelectionSet(o){let{selections:s}=o;return s=Tqt(s,l=>l.alias?l.alias.value:l.name.value),Object.assign(Object.assign({},o),{selections:s})},FragmentDefinition(){return null}})}function Pqt(u,e,t){if(!t||t.length<1)return;const n=t.map(i=>{var r;return(r=i.name)===null||r===void 0?void 0:r.value});if(e&&n.includes(e))return e;if(e&&u){const r=u.map(a=>{var o;return(o=a.name)===null||o===void 0?void 0:o.value}).indexOf(e);if(r!==-1&&r"u"?this.storage=null:this.storage={getItem:window.localStorage.getItem.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),get length(){let t=0;for(const n in window.localStorage)n.indexOf(`${rS}:`)===0&&(t+=1);return t},clear(){for(const t in window.localStorage)t.indexOf(`${rS}:`)===0&&window.localStorage.removeItem(t)}}}get(e){if(!this.storage)return null;const t=`${rS}:${e}`,n=this.storage.getItem(t);return n==="null"||n==="undefined"?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,i=null;if(this.storage){const r=`${rS}:${e}`;if(t)try{this.storage.setItem(r,t)}catch(a){i=a instanceof Error?a:new Error(`${a}`),n=Rqt(this.storage,a)}else this.storage.removeItem(r)}return{isQuotaError:n,error:i}}clear(){this.storage&&this.storage.clear()}}const rS="graphiql";class Rfe{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some(t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName)}edit(e,t){if(typeof t=="number"&&this.items[t]){const i=this.items[t];if(i.query===e.query&&i.variables===e.variables&&i.headers===e.headers&&i.operationName===e.operationName){this.items.splice(t,1,e),this.save();return}}const n=this.items.findIndex(i=>i.query===e.query&&i.variables===e.variables&&i.headers===e.headers&&i.operationName===e.operationName);n!==-1&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex(n=>n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName);t!==-1&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const i=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(!(i!=null&&i.error))this.items=t;else if(i.isQuotaError&&this.maxSize)t.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const Iqt=1e5;class Oqt{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:n,variables:i,headers:r,operationName:a})=>{if(!this.shouldSaveQuery(n,i,r,this.history.fetchRecent()))return;this.history.push({query:n,variables:i,headers:r,operationName:a});const o=this.history.items,s=this.favorite.items;this.queries=o.concat(s)},this.deleteHistory=({query:n,variables:i,headers:r,operationName:a,favorite:o},s=!1)=>{function l(c){const d=c.items.find(h=>h.query===n&&h.variables===i&&h.headers===r&&h.operationName===a);d&&c.delete(d)}(o||s)&&l(this.favorite),(!o||s)&&l(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new Rfe("queries",this.storage,this.maxHistoryLength),this.favorite=new Rfe("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,i){if(!e)return!1;try{Bg(e)}catch{return!1}return e.length>Iqt?!1:i?!(JSON.stringify(e)===JSON.stringify(i.query)&&(JSON.stringify(t)===JSON.stringify(i.variables)&&(JSON.stringify(n)===JSON.stringify(i.headers)||n&&!i.headers)||t&&!i.variables)):!0}toggleFavorite({query:e,variables:t,headers:n,operationName:i,label:r,favorite:a}){const o={query:e,variables:t,headers:n,operationName:i,label:r};a?(o.favorite=!1,this.favorite.delete(o),this.history.push(o)):(o.favorite=!0,this.favorite.push(o),this.history.delete(o)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:i,label:r,favorite:a},o){const s={query:e,variables:t,headers:n,operationName:i,label:r};a?this.favorite.edit(Object.assign(Object.assign({},s),{favorite:a}),o):this.history.edit(s,o),this.queries=[...this.history.items,...this.favorite.items]}}function JTe(u){var e,t,n="";if(typeof u=="string"||typeof u=="number")n+=u;else if(typeof u=="object")if(Array.isArray(u))for(e=0;e{switch(t.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":e=t;break}}),e}function Ife(u,e,t){return t===ny.name&&u.getQueryType()===e?ny:t===iy.name&&u.getQueryType()===e?iy:t===ry.name&&Cl(e)?ry:"getFields"in e?e.getFields()[t]:null}function ZTe(u,e){const t=[];let n=u;for(;n!=null&&n.kind;)t.push(n),n=n.prevState;for(let i=t.length-1;i>=0;i--)e(t[i])}function pp(u){const e=Object.keys(u),t=e.length,n=new Array(t);for(let i=0;i!n.isDeprecated);const t=u.map(n=>({proximity:Vqt(YTe(n.label),e),entry:n}));return c$(c$(t,n=>n.proximity<=2),n=>!n.entry.isDeprecated).sort((n,i)=>(n.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||n.proximity-i.proximity||n.entry.label.length-i.entry.label.length).map(n=>n.entry)}function c$(u,e){const t=u.filter(e);return t.length===0?u:t}function YTe(u){return u.toLowerCase().replaceAll(/\W/g,"")}function Vqt(u,e){let t=$qt(e,u);return u.length>e.length&&(t-=u.length-e.length-1,t+=u.indexOf(e)===0?0:.5),t}function $qt(u,e){let t,n;const i=[],r=u.length,a=e.length;for(t=0;t<=r;t++)i[t]=[t];for(n=1;n<=a;n++)i[0][n]=n;for(t=1;t<=r;t++)for(n=1;n<=a;n++){const o=u[t-1]===e[n-1]?0:1;i[t][n]=Math.min(i[t-1][n]+1,i[t][n-1]+1,i[t-1][n-1]+o),t>1&&n>1&&u[t-1]===e[n-2]&&u[t-2]===e[n-1]&&(i[t][n]=Math.min(i[t][n],i[t-2][n-2]+o))}return i[r][a]}var Ofe;(function(u){function e(t){return typeof t=="string"}u.is=e})(Ofe||(Ofe={}));var iY;(function(u){function e(t){return typeof t=="string"}u.is=e})(iY||(iY={}));var jfe;(function(u){u.MIN_VALUE=-2147483648,u.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&u.MIN_VALUE<=t&&t<=u.MAX_VALUE}u.is=e})(jfe||(jfe={}));var ST;(function(u){u.MIN_VALUE=0,u.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&u.MIN_VALUE<=t&&t<=u.MAX_VALUE}u.is=e})(ST||(ST={}));var yc;(function(u){function e(n,i){return n===Number.MAX_VALUE&&(n=ST.MAX_VALUE),i===Number.MAX_VALUE&&(i=ST.MAX_VALUE),{line:n,character:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.uinteger(i.line)&&xe.uinteger(i.character)}u.is=t})(yc||(yc={}));var Rr;(function(u){function e(n,i,r,a){if(xe.uinteger(n)&&xe.uinteger(i)&&xe.uinteger(r)&&xe.uinteger(a))return{start:yc.create(n,i),end:yc.create(r,a)};if(yc.is(n)&&yc.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments[".concat(n,", ").concat(i,", ").concat(r,", ").concat(a,"]"))}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&yc.is(i.start)&&yc.is(i.end)}u.is=t})(Rr||(Rr={}));var BT;(function(u){function e(n,i){return{uri:n,range:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.range)&&(xe.string(i.uri)||xe.undefined(i.uri))}u.is=t})(BT||(BT={}));var Hfe;(function(u){function e(n,i,r,a){return{targetUri:n,targetRange:i,targetSelectionRange:r,originSelectionRange:a}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.targetRange)&&xe.string(i.targetUri)&&Rr.is(i.targetSelectionRange)&&(Rr.is(i.originSelectionRange)||xe.undefined(i.originSelectionRange))}u.is=t})(Hfe||(Hfe={}));var rY;(function(u){function e(n,i,r,a){return{red:n,green:i,blue:r,alpha:a}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.numberRange(i.red,0,1)&&xe.numberRange(i.green,0,1)&&xe.numberRange(i.blue,0,1)&&xe.numberRange(i.alpha,0,1)}u.is=t})(rY||(rY={}));var Vfe;(function(u){function e(n,i){return{range:n,color:i}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&Rr.is(i.range)&&rY.is(i.color)}u.is=t})(Vfe||(Vfe={}));var $fe;(function(u){function e(n,i,r){return{label:n,textEdit:i,additionalTextEdits:r}}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.string(i.label)&&(xe.undefined(i.textEdit)||a4.is(i))&&(xe.undefined(i.additionalTextEdits)||xe.typedArray(i.additionalTextEdits,a4.is))}u.is=t})($fe||($fe={}));var Kfe;(function(u){u.Comment="comment",u.Imports="imports",u.Region="region"})(Kfe||(Kfe={}));var Wfe;(function(u){function e(n,i,r,a,o,s){var l={startLine:n,endLine:i};return xe.defined(r)&&(l.startCharacter=r),xe.defined(a)&&(l.endCharacter=a),xe.defined(o)&&(l.kind=o),xe.defined(s)&&(l.collapsedText=s),l}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.uinteger(i.startLine)&&xe.uinteger(i.startLine)&&(xe.undefined(i.startCharacter)||xe.uinteger(i.startCharacter))&&(xe.undefined(i.endCharacter)||xe.uinteger(i.endCharacter))&&(xe.undefined(i.kind)||xe.string(i.kind))}u.is=t})(Wfe||(Wfe={}));var aY;(function(u){function e(n,i){return{location:n,message:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&BT.is(i.location)&&xe.string(i.message)}u.is=t})(aY||(aY={}));var Gfe;(function(u){u.Error=1,u.Warning=2,u.Information=3,u.Hint=4})(Gfe||(Gfe={}));var Ufe;(function(u){u.Unnecessary=1,u.Deprecated=2})(Ufe||(Ufe={}));var qfe;(function(u){function e(t){var n=t;return xe.objectLiteral(n)&&xe.string(n.href)}u.is=e})(qfe||(qfe={}));var wT;(function(u){function e(n,i,r,a,o,s){var l={range:n,message:i};return xe.defined(r)&&(l.severity=r),xe.defined(a)&&(l.code=a),xe.defined(o)&&(l.source=o),xe.defined(s)&&(l.relatedInformation=s),l}u.create=e;function t(n){var i,r=n;return xe.defined(r)&&Rr.is(r.range)&&xe.string(r.message)&&(xe.number(r.severity)||xe.undefined(r.severity))&&(xe.integer(r.code)||xe.string(r.code)||xe.undefined(r.code))&&(xe.undefined(r.codeDescription)||xe.string((i=r.codeDescription)===null||i===void 0?void 0:i.href))&&(xe.string(r.source)||xe.undefined(r.source))&&(xe.undefined(r.relatedInformation)||xe.typedArray(r.relatedInformation,aY.is))}u.is=t})(wT||(wT={}));var Xv;(function(u){function e(n,i){for(var r=[],a=2;a0&&(o.arguments=r),o}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.title)&&xe.string(i.command)}u.is=t})(Xv||(Xv={}));var a4;(function(u){function e(r,a){return{range:r,newText:a}}u.replace=e;function t(r,a){return{range:{start:r,end:r},newText:a}}u.insert=t;function n(r){return{range:r,newText:""}}u.del=n;function i(r){var a=r;return xe.objectLiteral(a)&&xe.string(a.newText)&&Rr.is(a.range)}u.is=i})(a4||(a4={}));var Ix;(function(u){function e(n,i,r){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),r!==void 0&&(a.description=r),a}u.create=e;function t(n){var i=n;return xe.objectLiteral(i)&&xe.string(i.label)&&(xe.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(xe.string(i.description)||i.description===void 0)}u.is=t})(Ix||(Ix={}));var Lo;(function(u){function e(t){var n=t;return xe.string(n)}u.is=e})(Lo||(Lo={}));var gE;(function(u){function e(r,a,o){return{range:r,newText:a,annotationId:o}}u.replace=e;function t(r,a,o){return{range:{start:r,end:r},newText:a,annotationId:o}}u.insert=t;function n(r,a){return{range:r,newText:"",annotationId:a}}u.del=n;function i(r){var a=r;return a4.is(a)&&(Ix.is(a.annotationId)||Lo.is(a.annotationId))}u.is=i})(gE||(gE={}));var LT;(function(u){function e(n,i){return{textDocument:n,edits:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&zT.is(i.textDocument)&&Array.isArray(i.edits)}u.is=t})(LT||(LT={}));var Cy;(function(u){function e(n,i,r){var a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),r!==void 0&&(a.annotationId=r),a}u.create=e;function t(n){var i=n;return i&&i.kind==="create"&&xe.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(Cy||(Cy={}));var by;(function(u){function e(n,i,r,a){var o={kind:"rename",oldUri:n,newUri:i};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(o.options=r),a!==void 0&&(o.annotationId=a),o}u.create=e;function t(n){var i=n;return i&&i.kind==="rename"&&xe.string(i.oldUri)&&xe.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||xe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||xe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(by||(by={}));var ky;(function(u){function e(n,i,r){var a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),r!==void 0&&(a.annotationId=r),a}u.create=e;function t(n){var i=n;return i&&i.kind==="delete"&&xe.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||xe.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||xe.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Lo.is(i.annotationId))}u.is=t})(ky||(ky={}));var oY;(function(u){function e(t){var n=t;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return xe.string(i.kind)?Cy.is(i)||by.is(i)||ky.is(i):LT.is(i)}))}u.is=e})(oY||(oY={}));var aS=function(){function u(e,t){this.edits=e,this.changeAnnotations=t}return u.prototype.insert=function(e,t,n){var i,r;if(n===void 0?i=a4.insert(e,t):Lo.is(n)?(r=n,i=gE.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=gE.insert(e,t,r)),this.edits.push(i),r!==void 0)return r},u.prototype.replace=function(e,t,n){var i,r;if(n===void 0?i=a4.replace(e,t):Lo.is(n)?(r=n,i=gE.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=gE.replace(e,t,r)),this.edits.push(i),r!==void 0)return r},u.prototype.delete=function(e,t){var n,i;if(t===void 0?n=a4.del(e):Lo.is(t)?(i=t,n=gE.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=gE.del(e,i)),this.edits.push(n),i!==void 0)return i},u.prototype.add=function(e){this.edits.push(e)},u.prototype.all=function(){return this.edits},u.prototype.clear=function(){this.edits.splice(0,this.edits.length)},u.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},u}(),Jfe=function(){function u(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return u.prototype.all=function(){return this._annotations},Object.defineProperty(u.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.manage=function(e,t){var n;if(Lo.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw new Error("Id ".concat(n," is already in use."));if(t===void 0)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},u.prototype.nextId=function(){return this._counter++,this._counter.toString()},u}();(function(){function u(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Jfe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(n){if(LT.is(n)){var i=new aS(n.edits,t._changeAnnotations);t._textEditChanges[n.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(n){var i=new aS(e.changes[n]);t._textEditChanges[n]=i})):this._workspaceEdit={}}return Object.defineProperty(u.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),u.prototype.getTextEditChange=function(e){if(zT.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){var i=[],r={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(r),n=new aS(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[e];if(!n){var i=[];this._workspaceEdit.changes[e]=i,n=new aS(i),this._textEditChanges[e]=n}return n}},u.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Jfe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},u.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},u.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ix.is(t)||Lo.is(t)?i=t:n=t;var r,a;if(i===void 0?r=Cy.create(e,n):(a=Lo.is(i)?i:this._changeAnnotations.manage(i),r=Cy.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),a!==void 0)return a},u.prototype.renameFile=function(e,t,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;Ix.is(n)||Lo.is(n)?r=n:i=n;var a,o;if(r===void 0?a=by.create(e,t,i):(o=Lo.is(r)?r:this._changeAnnotations.manage(r),a=by.create(e,t,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},u.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ix.is(t)||Lo.is(t)?i=t:n=t;var r,a;if(i===void 0?r=ky.create(e,n):(a=Lo.is(i)?i:this._changeAnnotations.manage(i),r=ky.create(e,n,a)),this._workspaceEdit.documentChanges.push(r),a!==void 0)return a},u})();var Zfe;(function(u){function e(n){return{uri:n}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)}u.is=t})(Zfe||(Zfe={}));var Yfe;(function(u){function e(n,i){return{uri:n,version:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&xe.integer(i.version)}u.is=t})(Yfe||(Yfe={}));var zT;(function(u){function e(n,i){return{uri:n,version:i}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&(i.version===null||xe.integer(i.version))}u.is=t})(zT||(zT={}));var Qfe;(function(u){function e(n,i,r,a){return{uri:n,languageId:i,version:r,text:a}}u.create=e;function t(n){var i=n;return xe.defined(i)&&xe.string(i.uri)&&xe.string(i.languageId)&&xe.integer(i.version)&&xe.string(i.text)}u.is=t})(Qfe||(Qfe={}));var sY;(function(u){u.PlainText="plaintext",u.Markdown="markdown";function e(t){var n=t;return n===u.PlainText||n===u.Markdown}u.is=e})(sY||(sY={}));var Fy;(function(u){function e(t){var n=t;return xe.objectLiteral(t)&&sY.is(n.kind)&&xe.string(n.value)}u.is=e})(Fy||(Fy={}));var Xfe;(function(u){u.Text=1,u.Method=2,u.Function=3,u.Constructor=4,u.Field=5,u.Variable=6,u.Class=7,u.Interface=8,u.Module=9,u.Property=10,u.Unit=11,u.Value=12,u.Enum=13,u.Keyword=14,u.Snippet=15,u.Color=16,u.File=17,u.Reference=18,u.Folder=19,u.EnumMember=20,u.Constant=21,u.Struct=22,u.Event=23,u.Operator=24,u.TypeParameter=25})(Xfe||(Xfe={}));var lY;(function(u){u.PlainText=1,u.Snippet=2})(lY||(lY={}));var e3e;(function(u){u.Deprecated=1})(e3e||(e3e={}));var t3e;(function(u){function e(n,i,r){return{newText:n,insert:i,replace:r}}u.create=e;function t(n){var i=n;return i&&xe.string(i.newText)&&Rr.is(i.insert)&&Rr.is(i.replace)}u.is=t})(t3e||(t3e={}));var u3e;(function(u){u.asIs=1,u.adjustIndentation=2})(u3e||(u3e={}));var n3e;(function(u){function e(t){var n=t;return n&&(xe.string(n.detail)||n.detail===void 0)&&(xe.string(n.description)||n.description===void 0)}u.is=e})(n3e||(n3e={}));var i3e;(function(u){function e(t){return{label:t}}u.create=e})(i3e||(i3e={}));var r3e;(function(u){function e(t,n){return{items:t||[],isIncomplete:!!n}}u.create=e})(r3e||(r3e={}));var MT;(function(u){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}u.fromPlainText=e;function t(n){var i=n;return xe.string(i)||xe.objectLiteral(i)&&xe.string(i.language)&&xe.string(i.value)}u.is=t})(MT||(MT={}));var a3e;(function(u){function e(t){var n=t;return!!n&&xe.objectLiteral(n)&&(Fy.is(n.contents)||MT.is(n.contents)||xe.typedArray(n.contents,MT.is))&&(t.range===void 0||Rr.is(t.range))}u.is=e})(a3e||(a3e={}));var o3e;(function(u){function e(t,n){return n?{label:t,documentation:n}:{label:t}}u.create=e})(o3e||(o3e={}));var s3e;(function(u){function e(t,n){for(var i=[],r=2;r=0;c--){var d=s[c],h=r.offsetAt(d.range.start),E=r.offsetAt(d.range.end);if(E<=l)o=o.substring(0,h)+d.newText+o.substring(E,o.length);else throw new Error("Overlapping edit");l=h}return o}u.applyEdits=n;function i(r,a){if(r.length<=1)return r;var o=r.length/2|0,s=r.slice(0,o),l=r.slice(o);i(s,a),i(l,a);for(var c=0,d=0,h=0;c0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},u.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(i===0)return yc.create(0,e);for(;ne?i=r:n=r+1}var a=n-1;return yc.create(a,e-t[a])},u.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],i=e.line+1"u"}u.undefined=n;function i(E){return E===!0||E===!1}u.boolean=i;function r(E){return e.call(E)==="[object String]"}u.string=r;function a(E){return e.call(E)==="[object Number]"}u.number=a;function o(E,m,g){return e.call(E)==="[object Number]"&&m<=E&&E<=g}u.numberRange=o;function s(E){return e.call(E)==="[object Number]"&&-2147483648<=E&&E<=2147483647}u.integer=s;function l(E){return e.call(E)==="[object Number]"&&0<=E&&E<=2147483647}u.uinteger=l;function c(E){return e.call(E)==="[object Function]"}u.func=c;function d(E){return E!==null&&typeof E=="object"}u.objectLiteral=d;function h(E,m){return Array.isArray(E)&&E.every(m)}u.typedArray=h})(xe||(xe={}));var zu;(function(u){u.Text=1,u.Method=2,u.Function=3,u.Constructor=4,u.Field=5,u.Variable=6,u.Class=7,u.Interface=8,u.Module=9,u.Property=10,u.Unit=11,u.Value=12,u.Enum=13,u.Keyword=14,u.Snippet=15,u.Color=16,u.File=17,u.Reference=18,u.Folder=19,u.EnumMember=20,u.Constant=21,u.Struct=22,u.Event=23,u.Operator=24,u.TypeParameter=25})(zu||(zu={}));class M3e{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const t=this._sourceText.charAt(this._pos);return this._pos++,t},this.eat=t=>{if(this._testNextCharacter(t))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=t=>{let n=this._testNextCharacter(t),i=!1;for(n&&(i=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(t),i=!0;return i},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=t=>{this._pos=t},this.match=(t,n=!0,i=!1)=>{let r=null,a=null;return typeof t=="string"?(a=new RegExp(t,i?"i":"g").test(this._sourceText.slice(this._pos,this._pos+t.length)),r=t):t instanceof RegExp&&(a=this._sourceText.slice(this._pos).match(t),r=a==null?void 0:a[0]),a!=null&&(typeof t=="string"||a instanceof Array&&this._sourceText.startsWith(a[0],this._pos))?(n&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),a):!1},this.backUp=t=>{this._pos-=t},this.column=()=>this._pos,this.indentation=()=>{const t=this._sourceText.match(/\s*/);let n=0;if(t&&t.length!==0){const i=t[0];let r=0;for(;i.length>r;)i.charCodeAt(r)===9?n+=2:n++,r++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return typeof e=="string"?n=t===e:n=e instanceof RegExp?e.test(t):e(t),n}}function vr(u){return{ofRule:u}}function pn(u,e){return{ofRule:u,isList:!0,separator:e}}function Wqt(u,e){const t=u.match;return u.match=n=>{let i=!1;return t&&(i=t(n)),i&&e.every(r=>r.match&&!r.match(n))},u}function d$(u,e){return{style:e,match:t=>t.kind===u}}function yu(u,e){return{style:e||"punctuation",match:t=>t.kind==="Punctuation"&&t.value===u}}const Gqt=u=>u===" "||u===" "||u===","||u===` -`||u==="\r"||u==="\uFEFF"||u===" ",Uqt={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},qqt={Document:[pn("Definition")],Definition(u){switch(u.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return De.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[$a("query"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],Mutation:[$a("mutation"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],Subscription:[$a("subscription"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],VariableDefinitions:[yu("("),pn("VariableDefinition"),yu(")")],VariableDefinition:["Variable",yu(":"),"Type",vr("DefaultValue")],Variable:[yu("$","variable"),yi("variable")],DefaultValue:[yu("="),"Value"],SelectionSet:[yu("{"),pn("Selection"),yu("}")],Selection(u,e){return u.value==="..."?e.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":e.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[yi("property"),yu(":"),yi("qualifier"),vr("Arguments"),pn("Directive"),vr("SelectionSet")],Field:[yi("property"),vr("Arguments"),pn("Directive"),vr("SelectionSet")],Arguments:[yu("("),pn("Argument"),yu(")")],Argument:[yi("attribute"),yu(":"),"Value"],FragmentSpread:[yu("..."),yi("def"),pn("Directive")],InlineFragment:[yu("..."),vr("TypeCondition"),pn("Directive"),"SelectionSet"],FragmentDefinition:[$a("fragment"),vr(Wqt(yi("def"),[$a("on")])),"TypeCondition",pn("Directive"),"SelectionSet"],TypeCondition:[$a("on"),"NamedType"],Value(u){switch(u.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(u.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(u.value){case"true":case"false":return"BooleanValue"}return u.value==="null"?"NullValue":"EnumValue"}},NumberValue:[d$("Number","number")],StringValue:[{style:"string",match:u=>u.kind==="String",update(u,e){e.value.startsWith('"""')&&(u.inBlockstring=!e.value.slice(3).endsWith('"""'))}}],BooleanValue:[d$("Name","builtin")],NullValue:[d$("Name","keyword")],EnumValue:[yi("string-2")],ListValue:[yu("["),pn("Value"),yu("]")],ObjectValue:[yu("{"),pn("ObjectField"),yu("}")],ObjectField:[yi("attribute"),yu(":"),"Value"],Type(u){return u.value==="["?"ListType":"NonNullType"},ListType:[yu("["),"Type",yu("]"),vr(yu("!"))],NonNullType:["NamedType",vr(yu("!"))],NamedType:[Jqt("atom")],Directive:[yu("@","meta"),yi("meta"),vr("Arguments")],DirectiveDef:[$a("directive"),yu("@","meta"),yi("meta"),vr("ArgumentsDef"),$a("on"),pn("DirectiveLocation",yu("|"))],InterfaceDef:[$a("interface"),yi("atom"),vr("Implements"),pn("Directive"),yu("{"),pn("FieldDef"),yu("}")],Implements:[$a("implements"),pn("NamedType",yu("&"))],DirectiveLocation:[yi("string-2")],SchemaDef:[$a("schema"),pn("Directive"),yu("{"),pn("OperationTypeDef"),yu("}")],OperationTypeDef:[yi("keyword"),yu(":"),yi("atom")],ScalarDef:[$a("scalar"),yi("atom"),pn("Directive")],ObjectTypeDef:[$a("type"),yi("atom"),vr("Implements"),pn("Directive"),yu("{"),pn("FieldDef"),yu("}")],FieldDef:[yi("property"),vr("ArgumentsDef"),yu(":"),"Type",pn("Directive")],ArgumentsDef:[yu("("),pn("InputValueDef"),yu(")")],InputValueDef:[yi("attribute"),yu(":"),"Type",vr("DefaultValue"),pn("Directive")],UnionDef:[$a("union"),yi("atom"),pn("Directive"),yu("="),pn("UnionMember",yu("|"))],UnionMember:["NamedType"],EnumDef:[$a("enum"),yi("atom"),pn("Directive"),yu("{"),pn("EnumValueDef"),yu("}")],EnumValueDef:[yi("string-2"),pn("Directive")],InputDef:[$a("input"),yi("atom"),pn("Directive"),yu("{"),pn("InputValueDef"),yu("}")],ExtendDef:[$a("extend"),"ExtensionDefinition"],ExtensionDefinition(u){switch(u.value){case"schema":return De.SCHEMA_EXTENSION;case"scalar":return De.SCALAR_TYPE_EXTENSION;case"type":return De.OBJECT_TYPE_EXTENSION;case"interface":return De.INTERFACE_TYPE_EXTENSION;case"union":return De.UNION_TYPE_EXTENSION;case"enum":return De.ENUM_TYPE_EXTENSION;case"input":return De.INPUT_OBJECT_TYPE_EXTENSION}},[De.SCHEMA_EXTENSION]:["SchemaDef"],[De.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[De.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[De.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[De.UNION_TYPE_EXTENSION]:["UnionDef"],[De.ENUM_TYPE_EXTENSION]:["EnumDef"],[De.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function $a(u){return{style:"keyword",match:e=>e.kind==="Name"&&e.value===u}}function yi(u){return{style:u,match:e=>e.kind==="Name",update(e,t){e.name=t.value}}}function Jqt(u){return{style:u,match:e=>e.kind==="Name",update(e,t){var n;!((n=e.prevState)===null||n===void 0)&&n.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}function Zqt(u={eatWhitespace:e=>e.eatWhile(Gqt),lexRules:Uqt,parseRules:qqt,editorConfig:{}}){return{startState(){const e={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Vb(u.parseRules,e,De.DOCUMENT),e},token(e,t){return Yqt(e,t,u)}}}function Yqt(u,e,t){var n;if(e.inBlockstring)return u.match(/.*"""/)?(e.inBlockstring=!1,"string"):(u.skipToEnd(),"string");const{lexRules:i,parseRules:r,eatWhitespace:a,editorConfig:o}=t;if(e.rule&&e.rule.length===0?qne(e):e.needsAdvance&&(e.needsAdvance=!1,hY(e,!0)),u.sol()){const c=(o==null?void 0:o.tabSize)||2;e.indentLevel=Math.floor(u.indentation()/c)}if(a(u))return"ws";const s=Xqt(i,u);if(!s)return u.match(/\S+/)||u.match(/\s/),Vb(h$,e,"Invalid"),"invalidchar";if(s.kind==="Comment")return Vb(h$,e,"Comment"),"comment";const l=T3e({},e);if(s.kind==="Punctuation"){if(/^[{([]/.test(s.value))e.indentLevel!==void 0&&(e.levels=(e.levels||[]).concat(e.indentLevel+1));else if(/^[})\]]/.test(s.value)){const c=e.levels=(e.levels||[]).slice(0,-1);e.indentLevel&&c.length>0&&c.at(-1){const e=[];if(u)try{ad(Bg(u),{FragmentDefinition(t){e.push(t)}})}catch{return[]}return e},uJt=[De.SCHEMA_DEFINITION,De.OPERATION_TYPE_DEFINITION,De.SCALAR_TYPE_DEFINITION,De.OBJECT_TYPE_DEFINITION,De.INTERFACE_TYPE_DEFINITION,De.UNION_TYPE_DEFINITION,De.ENUM_TYPE_DEFINITION,De.INPUT_OBJECT_TYPE_DEFINITION,De.DIRECTIVE_DEFINITION,De.SCHEMA_EXTENSION,De.SCALAR_TYPE_EXTENSION,De.OBJECT_TYPE_EXTENSION,De.INTERFACE_TYPE_EXTENSION,De.UNION_TYPE_EXTENSION,De.ENUM_TYPE_EXTENSION,De.INPUT_OBJECT_TYPE_EXTENSION],nJt=u=>{let e=!1;if(u)try{ad(Bg(u),{enter(t){if(t.kind!=="Document")return uJt.includes(t.kind)?(e=!0,G5):!1}})}catch{return e}return e};function iqn(u,e,t,n,i,r){var a;const o=Object.assign(Object.assign({},r),{schema:u}),s=n||pJt(e,t,1),l=s.state.kind==="Invalid"?s.state.prevState:s.state,c=(r==null?void 0:r.mode)||vJt(e,r==null?void 0:r.uri);if(!l)return[];const{kind:d,step:h,prevState:E}=l,m=xJt(u,s.state);if(d===nt.DOCUMENT)return c===v3.TYPE_SYSTEM?rJt(s):aJt(s);if(d===nt.EXTEND_DEF)return oJt(s);if(((a=E==null?void 0:E.prevState)===null||a===void 0?void 0:a.kind)===nt.EXTENSION_DEFINITION&&l.name)return Qi(s,[]);if((E==null?void 0:E.kind)===De.SCALAR_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(wg).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.OBJECT_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(f=>qi(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.INTERFACE_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(Ji).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.UNION_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(Il).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.ENUM_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(f=>V0(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.INPUT_OBJECT_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(jo).map(f=>({label:f.name,kind:zu.Function})));if(d===nt.IMPLEMENTS||d===nt.NAMED_TYPE&&(E==null?void 0:E.kind)===nt.IMPLEMENTS)return cJt(s,l,u,e,m);if(d===nt.SELECTION_SET||d===nt.FIELD||d===nt.ALIASED_FIELD)return sJt(s,m,o);if(d===nt.ARGUMENTS||d===nt.ARGUMENT&&h===0){const{argDefs:f}=m;if(f)return Qi(s,f.map(p=>{var D;return{label:p.name,insertText:p.name+": ",command:QTe,detail:String(p.type),documentation:(D=p.description)!==null&&D!==void 0?D:void 0,kind:zu.Variable,type:p.type}}))}if((d===nt.OBJECT_VALUE||d===nt.OBJECT_FIELD&&h===0)&&m.objectFieldDefs){const f=pp(m.objectFieldDefs),p=d===nt.OBJECT_VALUE?zu.Value:zu.Field;return Qi(s,f.map(D=>{var x;return{label:D.name,detail:String(D.type),documentation:(x=D.description)!==null&&x!==void 0?x:void 0,kind:p,type:D.type}}))}if(d===nt.ENUM_VALUE||d===nt.LIST_VALUE&&h===1||d===nt.OBJECT_FIELD&&h===2||d===nt.ARGUMENT&&h===2)return lJt(s,m,e,u);if(d===nt.VARIABLE&&h===1){const f=F0(m.inputType),p=XTe(e,u,s);return Qi(s,p.filter(D=>D.detail===(f==null?void 0:f.name)))}if(d===nt.TYPE_CONDITION&&h===1||d===nt.NAMED_TYPE&&E!=null&&E.kind===nt.TYPE_CONDITION)return dJt(s,m,u);if(d===nt.FRAGMENT_SPREAD&&h===1)return hJt(s,m,u,e,Array.isArray(i)?i:tJt(i));const g=eNe(l);if(c===v3.TYPE_SYSTEM&&!g.needsAdvance&&d===nt.NAMED_TYPE||d===nt.LIST_TYPE){if(g.kind===nt.FIELD_DEF)return Qi(s,Object.values(u.getTypeMap()).filter(f=>D3(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if(g.kind===nt.INPUT_VALUE_DEF)return Qi(s,Object.values(u.getTypeMap()).filter(f=>hl(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})))}return d===nt.VARIABLE_DEFINITION&&h===2||d===nt.LIST_TYPE&&h===1||d===nt.NAMED_TYPE&&E&&(E.kind===nt.VARIABLE_DEFINITION||E.kind===nt.LIST_TYPE||E.kind===nt.NON_NULL_TYPE)?gJt(s,u):d===nt.DIRECTIVE?fJt(s,l,u):[]}const oS=` { +`||u==="\r"||u==="\uFEFF"||u===" ",Uqt={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},qqt={Document:[pn("Definition")],Definition(u){switch(u.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return De.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[$a("query"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],Mutation:[$a("mutation"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],Subscription:[$a("subscription"),vr(yi("def")),vr("VariableDefinitions"),pn("Directive"),"SelectionSet"],VariableDefinitions:[yu("("),pn("VariableDefinition"),yu(")")],VariableDefinition:["Variable",yu(":"),"Type",vr("DefaultValue")],Variable:[yu("$","variable"),yi("variable")],DefaultValue:[yu("="),"Value"],SelectionSet:[yu("{"),pn("Selection"),yu("}")],Selection(u,e){return u.value==="..."?e.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":e.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[yi("property"),yu(":"),yi("qualifier"),vr("Arguments"),pn("Directive"),vr("SelectionSet")],Field:[yi("property"),vr("Arguments"),pn("Directive"),vr("SelectionSet")],Arguments:[yu("("),pn("Argument"),yu(")")],Argument:[yi("attribute"),yu(":"),"Value"],FragmentSpread:[yu("..."),yi("def"),pn("Directive")],InlineFragment:[yu("..."),vr("TypeCondition"),pn("Directive"),"SelectionSet"],FragmentDefinition:[$a("fragment"),vr(Wqt(yi("def"),[$a("on")])),"TypeCondition",pn("Directive"),"SelectionSet"],TypeCondition:[$a("on"),"NamedType"],Value(u){switch(u.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(u.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(u.value){case"true":case"false":return"BooleanValue"}return u.value==="null"?"NullValue":"EnumValue"}},NumberValue:[d$("Number","number")],StringValue:[{style:"string",match:u=>u.kind==="String",update(u,e){e.value.startsWith('"""')&&(u.inBlockstring=!e.value.slice(3).endsWith('"""'))}}],BooleanValue:[d$("Name","builtin")],NullValue:[d$("Name","keyword")],EnumValue:[yi("string-2")],ListValue:[yu("["),pn("Value"),yu("]")],ObjectValue:[yu("{"),pn("ObjectField"),yu("}")],ObjectField:[yi("attribute"),yu(":"),"Value"],Type(u){return u.value==="["?"ListType":"NonNullType"},ListType:[yu("["),"Type",yu("]"),vr(yu("!"))],NonNullType:["NamedType",vr(yu("!"))],NamedType:[Jqt("atom")],Directive:[yu("@","meta"),yi("meta"),vr("Arguments")],DirectiveDef:[$a("directive"),yu("@","meta"),yi("meta"),vr("ArgumentsDef"),$a("on"),pn("DirectiveLocation",yu("|"))],InterfaceDef:[$a("interface"),yi("atom"),vr("Implements"),pn("Directive"),yu("{"),pn("FieldDef"),yu("}")],Implements:[$a("implements"),pn("NamedType",yu("&"))],DirectiveLocation:[yi("string-2")],SchemaDef:[$a("schema"),pn("Directive"),yu("{"),pn("OperationTypeDef"),yu("}")],OperationTypeDef:[yi("keyword"),yu(":"),yi("atom")],ScalarDef:[$a("scalar"),yi("atom"),pn("Directive")],ObjectTypeDef:[$a("type"),yi("atom"),vr("Implements"),pn("Directive"),yu("{"),pn("FieldDef"),yu("}")],FieldDef:[yi("property"),vr("ArgumentsDef"),yu(":"),"Type",pn("Directive")],ArgumentsDef:[yu("("),pn("InputValueDef"),yu(")")],InputValueDef:[yi("attribute"),yu(":"),"Type",vr("DefaultValue"),pn("Directive")],UnionDef:[$a("union"),yi("atom"),pn("Directive"),yu("="),pn("UnionMember",yu("|"))],UnionMember:["NamedType"],EnumDef:[$a("enum"),yi("atom"),pn("Directive"),yu("{"),pn("EnumValueDef"),yu("}")],EnumValueDef:[yi("string-2"),pn("Directive")],InputDef:[$a("input"),yi("atom"),pn("Directive"),yu("{"),pn("InputValueDef"),yu("}")],ExtendDef:[$a("extend"),"ExtensionDefinition"],ExtensionDefinition(u){switch(u.value){case"schema":return De.SCHEMA_EXTENSION;case"scalar":return De.SCALAR_TYPE_EXTENSION;case"type":return De.OBJECT_TYPE_EXTENSION;case"interface":return De.INTERFACE_TYPE_EXTENSION;case"union":return De.UNION_TYPE_EXTENSION;case"enum":return De.ENUM_TYPE_EXTENSION;case"input":return De.INPUT_OBJECT_TYPE_EXTENSION}},[De.SCHEMA_EXTENSION]:["SchemaDef"],[De.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[De.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[De.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[De.UNION_TYPE_EXTENSION]:["UnionDef"],[De.ENUM_TYPE_EXTENSION]:["EnumDef"],[De.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function $a(u){return{style:"keyword",match:e=>e.kind==="Name"&&e.value===u}}function yi(u){return{style:u,match:e=>e.kind==="Name",update(e,t){e.name=t.value}}}function Jqt(u){return{style:u,match:e=>e.kind==="Name",update(e,t){var n;!((n=e.prevState)===null||n===void 0)&&n.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}function Zqt(u={eatWhitespace:e=>e.eatWhile(Gqt),lexRules:Uqt,parseRules:qqt,editorConfig:{}}){return{startState(){const e={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Vb(u.parseRules,e,De.DOCUMENT),e},token(e,t){return Yqt(e,t,u)}}}function Yqt(u,e,t){var n;if(e.inBlockstring)return u.match(/.*"""/)?(e.inBlockstring=!1,"string"):(u.skipToEnd(),"string");const{lexRules:i,parseRules:r,eatWhitespace:a,editorConfig:o}=t;if(e.rule&&e.rule.length===0?qne(e):e.needsAdvance&&(e.needsAdvance=!1,hY(e,!0)),u.sol()){const c=(o==null?void 0:o.tabSize)||2;e.indentLevel=Math.floor(u.indentation()/c)}if(a(u))return"ws";const s=Xqt(i,u);if(!s)return u.match(/\S+/)||u.match(/\s/),Vb(h$,e,"Invalid"),"invalidchar";if(s.kind==="Comment")return Vb(h$,e,"Comment"),"comment";const l=T3e({},e);if(s.kind==="Punctuation"){if(/^[{([]/.test(s.value))e.indentLevel!==void 0&&(e.levels=(e.levels||[]).concat(e.indentLevel+1));else if(/^[})\]]/.test(s.value)){const c=e.levels=(e.levels||[]).slice(0,-1);e.indentLevel&&c.length>0&&c.at(-1){const e=[];if(u)try{ad(Bg(u),{FragmentDefinition(t){e.push(t)}})}catch{return[]}return e},uJt=[De.SCHEMA_DEFINITION,De.OPERATION_TYPE_DEFINITION,De.SCALAR_TYPE_DEFINITION,De.OBJECT_TYPE_DEFINITION,De.INTERFACE_TYPE_DEFINITION,De.UNION_TYPE_DEFINITION,De.ENUM_TYPE_DEFINITION,De.INPUT_OBJECT_TYPE_DEFINITION,De.DIRECTIVE_DEFINITION,De.SCHEMA_EXTENSION,De.SCALAR_TYPE_EXTENSION,De.OBJECT_TYPE_EXTENSION,De.INTERFACE_TYPE_EXTENSION,De.UNION_TYPE_EXTENSION,De.ENUM_TYPE_EXTENSION,De.INPUT_OBJECT_TYPE_EXTENSION],nJt=u=>{let e=!1;if(u)try{ad(Bg(u),{enter(t){if(t.kind!=="Document")return uJt.includes(t.kind)?(e=!0,G5):!1}})}catch{return e}return e};function iqn(u,e,t,n,i,r){var a;const o=Object.assign(Object.assign({},r),{schema:u}),s=n||pJt(e,t,1),l=s.state.kind==="Invalid"?s.state.prevState:s.state,c=(r==null?void 0:r.mode)||vJt(e,r==null?void 0:r.uri);if(!l)return[];const{kind:d,step:h,prevState:E}=l,m=xJt(u,s.state);if(d===nt.DOCUMENT)return c===v3.TYPE_SYSTEM?rJt(s):aJt(s);if(d===nt.EXTEND_DEF)return oJt(s);if(((a=E==null?void 0:E.prevState)===null||a===void 0?void 0:a.kind)===nt.EXTENSION_DEFINITION&&l.name)return Qi(s,[]);if((E==null?void 0:E.kind)===De.SCALAR_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(wg).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.OBJECT_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(f=>qi(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.INTERFACE_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(Ji).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.UNION_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(Il).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.ENUM_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(f=>$0(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if((E==null?void 0:E.kind)===De.INPUT_OBJECT_TYPE_EXTENSION)return Qi(s,Object.values(u.getTypeMap()).filter(jo).map(f=>({label:f.name,kind:zu.Function})));if(d===nt.IMPLEMENTS||d===nt.NAMED_TYPE&&(E==null?void 0:E.kind)===nt.IMPLEMENTS)return cJt(s,l,u,e,m);if(d===nt.SELECTION_SET||d===nt.FIELD||d===nt.ALIASED_FIELD)return sJt(s,m,o);if(d===nt.ARGUMENTS||d===nt.ARGUMENT&&h===0){const{argDefs:f}=m;if(f)return Qi(s,f.map(p=>{var D;return{label:p.name,insertText:p.name+": ",command:QTe,detail:String(p.type),documentation:(D=p.description)!==null&&D!==void 0?D:void 0,kind:zu.Variable,type:p.type}}))}if((d===nt.OBJECT_VALUE||d===nt.OBJECT_FIELD&&h===0)&&m.objectFieldDefs){const f=pp(m.objectFieldDefs),p=d===nt.OBJECT_VALUE?zu.Value:zu.Field;return Qi(s,f.map(D=>{var x;return{label:D.name,detail:String(D.type),documentation:(x=D.description)!==null&&x!==void 0?x:void 0,kind:p,type:D.type}}))}if(d===nt.ENUM_VALUE||d===nt.LIST_VALUE&&h===1||d===nt.OBJECT_FIELD&&h===2||d===nt.ARGUMENT&&h===2)return lJt(s,m,e,u);if(d===nt.VARIABLE&&h===1){const f=y0(m.inputType),p=XTe(e,u,s);return Qi(s,p.filter(D=>D.detail===(f==null?void 0:f.name)))}if(d===nt.TYPE_CONDITION&&h===1||d===nt.NAMED_TYPE&&E!=null&&E.kind===nt.TYPE_CONDITION)return dJt(s,m,u);if(d===nt.FRAGMENT_SPREAD&&h===1)return hJt(s,m,u,e,Array.isArray(i)?i:tJt(i));const g=eNe(l);if(c===v3.TYPE_SYSTEM&&!g.needsAdvance&&d===nt.NAMED_TYPE||d===nt.LIST_TYPE){if(g.kind===nt.FIELD_DEF)return Qi(s,Object.values(u.getTypeMap()).filter(f=>D3(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})));if(g.kind===nt.INPUT_VALUE_DEF)return Qi(s,Object.values(u.getTypeMap()).filter(f=>hl(f)&&!f.name.startsWith("__")).map(f=>({label:f.name,kind:zu.Function})))}return d===nt.VARIABLE_DEFINITION&&h===2||d===nt.LIST_TYPE&&h===1||d===nt.NAMED_TYPE&&E&&(E.kind===nt.VARIABLE_DEFINITION||E.kind===nt.LIST_TYPE||E.kind===nt.NON_NULL_TYPE)?gJt(s,u):d===nt.DIRECTIVE?fJt(s,l,u):[]}const oS=` { $1 -}`,iJt=u=>{const{type:e}=u;return Cl(e)||Es(e)&&Cl(e.ofType)||Mr(e)&&(Cl(e.ofType)||Es(e.ofType)&&Cl(e.ofType.ofType))?oS:null};function rJt(u){return Qi(u,[{label:"extend",kind:zu.Function},{label:"type",kind:zu.Function},{label:"interface",kind:zu.Function},{label:"union",kind:zu.Function},{label:"input",kind:zu.Function},{label:"scalar",kind:zu.Function},{label:"schema",kind:zu.Function}])}function aJt(u){return Qi(u,[{label:"query",kind:zu.Function},{label:"mutation",kind:zu.Function},{label:"subscription",kind:zu.Function},{label:"fragment",kind:zu.Function},{label:"{",kind:zu.Constructor}])}function oJt(u){return Qi(u,[{label:"type",kind:zu.Function},{label:"interface",kind:zu.Function},{label:"union",kind:zu.Function},{label:"input",kind:zu.Function},{label:"scalar",kind:zu.Function},{label:"schema",kind:zu.Function}])}function sJt(u,e,t){var n;if(e.parentType){const{parentType:i}=e;let r=[];return"getFields"in i&&(r=pp(i.getFields())),Cl(i)&&r.push(ry),i===((n=t==null?void 0:t.schema)===null||n===void 0?void 0:n.getQueryType())&&r.push(ny,iy),Qi(u,r.map((a,o)=>{var s;const l={sortText:String(o)+a.name,label:a.name,detail:String(a.type),documentation:(s=a.description)!==null&&s!==void 0?s:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:zu.Field,type:a.type};if(t!=null&&t.fillLeafsOnComplete){const c=iJt(a);c&&(l.insertText=a.name+c,l.insertTextFormat=lY.Snippet,l.command=QTe)}return l}))}return[]}function lJt(u,e,t,n){const i=F0(e.inputType),r=XTe(t,n,u).filter(a=>a.detail===i.name);if(i instanceof I6){const a=i.getValues();return Qi(u,a.map(o=>{var s;return{label:o.name,detail:String(i),documentation:(s=o.description)!==null&&s!==void 0?s:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:zu.EnumMember,type:i}}).concat(r))}return i===Xa?Qi(u,r.concat([{label:"true",detail:String(Xa),documentation:"Not false.",kind:zu.Variable,type:Xa},{label:"false",detail:String(Xa),documentation:"Not true.",kind:zu.Variable,type:Xa}])):r}function cJt(u,e,t,n,i){if(e.needsSeparator)return[];const r=t.getTypeMap(),a=pp(r).filter(Ji),o=a.map(({name:E})=>E),s=new Set;YI(n,(E,m)=>{var g,f,p,D,x;if(m.name&&(m.kind===nt.INTERFACE_DEF&&!o.includes(m.name)&&s.add(m.name),m.kind===nt.NAMED_TYPE&&((g=m.prevState)===null||g===void 0?void 0:g.kind)===nt.IMPLEMENTS)){if(i.interfaceDef){if((f=i.interfaceDef)===null||f===void 0?void 0:f.getInterfaces().find(({name:F})=>F===m.name))return;const k=t.getType(m.name),A=(p=i.interfaceDef)===null||p===void 0?void 0:p.toConfig();i.interfaceDef=new Px(Object.assign(Object.assign({},A),{interfaces:[...A.interfaces,k||new Px({name:m.name,fields:{}})]}))}else if(i.objectTypeDef){if((D=i.objectTypeDef)===null||D===void 0?void 0:D.getInterfaces().find(({name:F})=>F===m.name))return;const k=t.getType(m.name),A=(x=i.objectTypeDef)===null||x===void 0?void 0:x.toConfig();i.objectTypeDef=new Z1(Object.assign(Object.assign({},A),{interfaces:[...A.interfaces,k||new Px({name:m.name,fields:{}})]}))}}});const l=i.interfaceDef||i.objectTypeDef,d=((l==null?void 0:l.getInterfaces())||[]).map(({name:E})=>E),h=a.concat([...s].map(E=>({name:E}))).filter(({name:E})=>E!==(l==null?void 0:l.name)&&!d.includes(E));return Qi(u,h.map(E=>{const m={label:E.name,kind:zu.Interface,type:E};return E!=null&&E.description&&(m.documentation=E.description),m}))}function dJt(u,e,t,n){let i;if(e.parentType)if(_m(e.parentType)){const r=nWt(e.parentType),a=t.getPossibleTypes(r),o=Object.create(null);for(const s of a)for(const l of s.getInterfaces())o[l.name]=l;i=a.concat(pp(o))}else i=[e.parentType];else{const r=t.getTypeMap();i=pp(r).filter(a=>Cl(a)&&!a.name.startsWith("__"))}return Qi(u,i.map(r=>{const a=F0(r);return{label:String(r),documentation:(a==null?void 0:a.description)||"",kind:zu.Field}}))}function hJt(u,e,t,n,i){if(!n)return[];const r=t.getTypeMap(),a=jqt(u.state),o=mJt(n);i&&i.length>0&&o.push(...i);const s=o.filter(l=>r[l.typeCondition.name.value]&&!(a&&a.kind===nt.FRAGMENT_DEFINITION&&a.name===l.name.value)&&Cl(e.parentType)&&Cl(r[l.typeCondition.name.value])&&lWt(t,e.parentType,r[l.typeCondition.name.value]));return Qi(u,s.map(l=>({label:l.name.value,detail:String(r[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,kind:zu.Field,type:r[l.typeCondition.name.value]})))}const EJt=(u,e)=>{var t,n,i,r,a,o,s,l,c,d;if(((t=u.prevState)===null||t===void 0?void 0:t.kind)===e)return u.prevState;if(((i=(n=u.prevState)===null||n===void 0?void 0:n.prevState)===null||i===void 0?void 0:i.kind)===e)return u.prevState.prevState;if(((o=(a=(r=u.prevState)===null||r===void 0?void 0:r.prevState)===null||a===void 0?void 0:a.prevState)===null||o===void 0?void 0:o.kind)===e)return u.prevState.prevState.prevState;if(((d=(c=(l=(s=u.prevState)===null||s===void 0?void 0:s.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||d===void 0?void 0:d.kind)===e)return u.prevState.prevState.prevState.prevState};function XTe(u,e,t){let n=null,i;const r=Object.create({});return YI(u,(a,o)=>{if((o==null?void 0:o.kind)===nt.VARIABLE&&o.name&&(n=o.name),(o==null?void 0:o.kind)===nt.NAMED_TYPE&&n){const s=EJt(o,nt.TYPE);s!=null&&s.type&&(i=e.getType(s==null?void 0:s.type))}n&&i&&!r[n]&&(r[n]={detail:i.toString(),insertText:t.string==="$"?n:"$"+n,label:n,type:i,kind:zu.Variable},n=null,i=null)}),pp(r)}function mJt(u){const e=[];return YI(u,(t,n)=>{n.kind===nt.FRAGMENT_DEFINITION&&n.name&&n.type&&e.push({kind:nt.FRAGMENT_DEFINITION,name:{kind:De.NAME,value:n.name},selectionSet:{kind:nt.SELECTION_SET,selections:[]},typeCondition:{kind:nt.NAMED_TYPE,name:{kind:De.NAME,value:n.type}}})}),e}function gJt(u,e,t){const n=e.getTypeMap(),i=pp(n).filter(hl);return Qi(u,i.map(r=>({label:r.name,documentation:r.description,kind:zu.Variable})))}function fJt(u,e,t,n){var i;if(!((i=e.prevState)===null||i===void 0)&&i.kind){const r=t.getDirectives().filter(a=>DJt(e.prevState,a));return Qi(u,r.map(a=>({label:a.name,documentation:a.description||"",kind:zu.Function})))}return[]}function pJt(u,e,t=0){let n=null,i=null,r=null;const a=YI(u,(o,s,l,c)=>{if(!(c!==e.line||o.getCurrentPosition()+t{var m;switch(E.kind){case nt.QUERY:case"ShortQuery":d=u.getQueryType();break;case nt.MUTATION:d=u.getMutationType();break;case nt.SUBSCRIPTION:d=u.getSubscriptionType();break;case nt.INLINE_FRAGMENT:case nt.FRAGMENT_DEFINITION:E.type&&(d=u.getType(E.type));break;case nt.FIELD:case nt.ALIASED_FIELD:{!d||!E.name?a=null:(a=c?Ife(u,c,E.name):null,d=a?a.type:null);break}case nt.SELECTION_SET:c=F0(d);break;case nt.DIRECTIVE:i=E.name?u.getDirective(E.name):null;break;case nt.INTERFACE_DEF:E.name&&(s=null,h=new Px({name:E.name,interfaces:[],fields:{}}));break;case nt.OBJECT_TYPE_DEF:E.name&&(h=null,s=new Z1({name:E.name,interfaces:[],fields:{}}));break;case nt.ARGUMENTS:{if(E.prevState)switch(E.prevState.kind){case nt.FIELD:n=a&&a.args;break;case nt.DIRECTIVE:n=i&&i.args;break;case nt.ALIASED_FIELD:{const x=(m=E.prevState)===null||m===void 0?void 0:m.name;if(!x){n=null;break}const b=c?Ife(u,c,x):null;if(!b){n=null;break}n=b.args;break}default:n=null;break}else n=null;break}case nt.ARGUMENT:if(n){for(let x=0;xx.value===E.name):null;break;case nt.LIST_VALUE:const f=$Me(o);o=f instanceof Rs?f.ofType:null;break;case nt.OBJECT_VALUE:const p=F0(o);l=p instanceof One?p.getFields():null;break;case nt.OBJECT_FIELD:const D=E.name&&l?l[E.name]:null;o=D==null?void 0:D.type;break;case nt.NAMED_TYPE:E.name&&(d=u.getType(E.name));break}}),{argDef:t,argDefs:n,directiveDef:i,enumValue:r,fieldDef:a,inputType:o,objectFieldDefs:l,parentType:c,type:d,interfaceDef:h,objectTypeDef:s}}var v3;(function(u){u.TYPE_SYSTEM="TYPE_SYSTEM",u.EXECUTABLE="EXECUTABLE"})(v3||(v3={}));function vJt(u,e){return e!=null&&e.endsWith(".graphqls")||nJt(u)?v3.TYPE_SYSTEM:v3.EXECUTABLE}function eNe(u){return u.prevState&&u.kind&&[nt.NAMED_TYPE,nt.LIST_TYPE,nt.TYPE,nt.NON_NULL_TYPE].includes(u.kind)?eNe(u.prevState):u}var QI={exports:{}};function tNe(u,e){if(u!=null)return u;var t=new Error(e!==void 0?e:"Got unexpected "+u);throw t.framesToPop=1,t}QI.exports=tNe;QI.exports.default=tNe;Object.defineProperty(QI.exports,"__esModule",{value:!0});var CJt=QI.exports;const P3e=Hl(CJt),bJt=(u,e)=>{if(!e)return[];const t=new Map,n=new Set;ad(u,{FragmentDefinition(a){t.set(a.name.value,!0)},FragmentSpread(a){n.has(a.name.value)||n.add(a.name.value)}});const i=new Set;for(const a of n)!t.has(a)&&e.has(a)&&i.add(P3e(e.get(a)));const r=[];for(const a of i)ad(a,{FragmentSpread(o){!n.has(o.name.value)&&e.get(o.name.value)&&(i.add(P3e(e.get(o.name.value))),n.add(o.name.value))}}),t.has(a.name.value)||r.push(a);return r};function kJt(u,e){const t=Object.create(null);for(const n of e.definitions)if(n.kind==="OperationDefinition"){const{variableDefinitions:i}=n;if(i)for(const{variable:r,type:a}of i){const o=ay(u,a);o?t[r.name.value]=o:a.kind===De.NAMED_TYPE&&a.name.value==="Float"&&(t[r.name.value]=QMe)}}return t}function FJt(u,e){const t=e?kJt(e,u):void 0,n=[];return ad(u,{OperationDefinition(i){n.push(i)}}),{variableToType:t,operations:n}}function yJt(u,e){if(e)try{const t=Bg(e);return Object.assign(Object.assign({},FJt(t,u)),{documentAST:t})}catch{return}}globalThis&&globalThis.__awaiter;/*! +}`,iJt=u=>{const{type:e}=u;return Cl(e)||ms(e)&&Cl(e.ofType)||Mr(e)&&(Cl(e.ofType)||ms(e.ofType)&&Cl(e.ofType.ofType))?oS:null};function rJt(u){return Qi(u,[{label:"extend",kind:zu.Function},{label:"type",kind:zu.Function},{label:"interface",kind:zu.Function},{label:"union",kind:zu.Function},{label:"input",kind:zu.Function},{label:"scalar",kind:zu.Function},{label:"schema",kind:zu.Function}])}function aJt(u){return Qi(u,[{label:"query",kind:zu.Function},{label:"mutation",kind:zu.Function},{label:"subscription",kind:zu.Function},{label:"fragment",kind:zu.Function},{label:"{",kind:zu.Constructor}])}function oJt(u){return Qi(u,[{label:"type",kind:zu.Function},{label:"interface",kind:zu.Function},{label:"union",kind:zu.Function},{label:"input",kind:zu.Function},{label:"scalar",kind:zu.Function},{label:"schema",kind:zu.Function}])}function sJt(u,e,t){var n;if(e.parentType){const{parentType:i}=e;let r=[];return"getFields"in i&&(r=pp(i.getFields())),Cl(i)&&r.push(ry),i===((n=t==null?void 0:t.schema)===null||n===void 0?void 0:n.getQueryType())&&r.push(ny,iy),Qi(u,r.map((a,o)=>{var s;const l={sortText:String(o)+a.name,label:a.name,detail:String(a.type),documentation:(s=a.description)!==null&&s!==void 0?s:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:zu.Field,type:a.type};if(t!=null&&t.fillLeafsOnComplete){const c=iJt(a);c&&(l.insertText=a.name+c,l.insertTextFormat=lY.Snippet,l.command=QTe)}return l}))}return[]}function lJt(u,e,t,n){const i=y0(e.inputType),r=XTe(t,n,u).filter(a=>a.detail===i.name);if(i instanceof I6){const a=i.getValues();return Qi(u,a.map(o=>{var s;return{label:o.name,detail:String(i),documentation:(s=o.description)!==null&&s!==void 0?s:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:zu.EnumMember,type:i}}).concat(r))}return i===Xa?Qi(u,r.concat([{label:"true",detail:String(Xa),documentation:"Not false.",kind:zu.Variable,type:Xa},{label:"false",detail:String(Xa),documentation:"Not true.",kind:zu.Variable,type:Xa}])):r}function cJt(u,e,t,n,i){if(e.needsSeparator)return[];const r=t.getTypeMap(),a=pp(r).filter(Ji),o=a.map(({name:E})=>E),s=new Set;YI(n,(E,m)=>{var g,f,p,D,x;if(m.name&&(m.kind===nt.INTERFACE_DEF&&!o.includes(m.name)&&s.add(m.name),m.kind===nt.NAMED_TYPE&&((g=m.prevState)===null||g===void 0?void 0:g.kind)===nt.IMPLEMENTS)){if(i.interfaceDef){if((f=i.interfaceDef)===null||f===void 0?void 0:f.getInterfaces().find(({name:F})=>F===m.name))return;const k=t.getType(m.name),A=(p=i.interfaceDef)===null||p===void 0?void 0:p.toConfig();i.interfaceDef=new Px(Object.assign(Object.assign({},A),{interfaces:[...A.interfaces,k||new Px({name:m.name,fields:{}})]}))}else if(i.objectTypeDef){if((D=i.objectTypeDef)===null||D===void 0?void 0:D.getInterfaces().find(({name:F})=>F===m.name))return;const k=t.getType(m.name),A=(x=i.objectTypeDef)===null||x===void 0?void 0:x.toConfig();i.objectTypeDef=new Z1(Object.assign(Object.assign({},A),{interfaces:[...A.interfaces,k||new Px({name:m.name,fields:{}})]}))}}});const l=i.interfaceDef||i.objectTypeDef,d=((l==null?void 0:l.getInterfaces())||[]).map(({name:E})=>E),h=a.concat([...s].map(E=>({name:E}))).filter(({name:E})=>E!==(l==null?void 0:l.name)&&!d.includes(E));return Qi(u,h.map(E=>{const m={label:E.name,kind:zu.Interface,type:E};return E!=null&&E.description&&(m.documentation=E.description),m}))}function dJt(u,e,t,n){let i;if(e.parentType)if(_m(e.parentType)){const r=nWt(e.parentType),a=t.getPossibleTypes(r),o=Object.create(null);for(const s of a)for(const l of s.getInterfaces())o[l.name]=l;i=a.concat(pp(o))}else i=[e.parentType];else{const r=t.getTypeMap();i=pp(r).filter(a=>Cl(a)&&!a.name.startsWith("__"))}return Qi(u,i.map(r=>{const a=y0(r);return{label:String(r),documentation:(a==null?void 0:a.description)||"",kind:zu.Field}}))}function hJt(u,e,t,n,i){if(!n)return[];const r=t.getTypeMap(),a=jqt(u.state),o=mJt(n);i&&i.length>0&&o.push(...i);const s=o.filter(l=>r[l.typeCondition.name.value]&&!(a&&a.kind===nt.FRAGMENT_DEFINITION&&a.name===l.name.value)&&Cl(e.parentType)&&Cl(r[l.typeCondition.name.value])&&lWt(t,e.parentType,r[l.typeCondition.name.value]));return Qi(u,s.map(l=>({label:l.name.value,detail:String(r[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,kind:zu.Field,type:r[l.typeCondition.name.value]})))}const EJt=(u,e)=>{var t,n,i,r,a,o,s,l,c,d;if(((t=u.prevState)===null||t===void 0?void 0:t.kind)===e)return u.prevState;if(((i=(n=u.prevState)===null||n===void 0?void 0:n.prevState)===null||i===void 0?void 0:i.kind)===e)return u.prevState.prevState;if(((o=(a=(r=u.prevState)===null||r===void 0?void 0:r.prevState)===null||a===void 0?void 0:a.prevState)===null||o===void 0?void 0:o.kind)===e)return u.prevState.prevState.prevState;if(((d=(c=(l=(s=u.prevState)===null||s===void 0?void 0:s.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||d===void 0?void 0:d.kind)===e)return u.prevState.prevState.prevState.prevState};function XTe(u,e,t){let n=null,i;const r=Object.create({});return YI(u,(a,o)=>{if((o==null?void 0:o.kind)===nt.VARIABLE&&o.name&&(n=o.name),(o==null?void 0:o.kind)===nt.NAMED_TYPE&&n){const s=EJt(o,nt.TYPE);s!=null&&s.type&&(i=e.getType(s==null?void 0:s.type))}n&&i&&!r[n]&&(r[n]={detail:i.toString(),insertText:t.string==="$"?n:"$"+n,label:n,type:i,kind:zu.Variable},n=null,i=null)}),pp(r)}function mJt(u){const e=[];return YI(u,(t,n)=>{n.kind===nt.FRAGMENT_DEFINITION&&n.name&&n.type&&e.push({kind:nt.FRAGMENT_DEFINITION,name:{kind:De.NAME,value:n.name},selectionSet:{kind:nt.SELECTION_SET,selections:[]},typeCondition:{kind:nt.NAMED_TYPE,name:{kind:De.NAME,value:n.type}}})}),e}function gJt(u,e,t){const n=e.getTypeMap(),i=pp(n).filter(hl);return Qi(u,i.map(r=>({label:r.name,documentation:r.description,kind:zu.Variable})))}function fJt(u,e,t,n){var i;if(!((i=e.prevState)===null||i===void 0)&&i.kind){const r=t.getDirectives().filter(a=>DJt(e.prevState,a));return Qi(u,r.map(a=>({label:a.name,documentation:a.description||"",kind:zu.Function})))}return[]}function pJt(u,e,t=0){let n=null,i=null,r=null;const a=YI(u,(o,s,l,c)=>{if(!(c!==e.line||o.getCurrentPosition()+t{var m;switch(E.kind){case nt.QUERY:case"ShortQuery":d=u.getQueryType();break;case nt.MUTATION:d=u.getMutationType();break;case nt.SUBSCRIPTION:d=u.getSubscriptionType();break;case nt.INLINE_FRAGMENT:case nt.FRAGMENT_DEFINITION:E.type&&(d=u.getType(E.type));break;case nt.FIELD:case nt.ALIASED_FIELD:{!d||!E.name?a=null:(a=c?Ife(u,c,E.name):null,d=a?a.type:null);break}case nt.SELECTION_SET:c=y0(d);break;case nt.DIRECTIVE:i=E.name?u.getDirective(E.name):null;break;case nt.INTERFACE_DEF:E.name&&(s=null,h=new Px({name:E.name,interfaces:[],fields:{}}));break;case nt.OBJECT_TYPE_DEF:E.name&&(h=null,s=new Z1({name:E.name,interfaces:[],fields:{}}));break;case nt.ARGUMENTS:{if(E.prevState)switch(E.prevState.kind){case nt.FIELD:n=a&&a.args;break;case nt.DIRECTIVE:n=i&&i.args;break;case nt.ALIASED_FIELD:{const x=(m=E.prevState)===null||m===void 0?void 0:m.name;if(!x){n=null;break}const b=c?Ife(u,c,x):null;if(!b){n=null;break}n=b.args;break}default:n=null;break}else n=null;break}case nt.ARGUMENT:if(n){for(let x=0;xx.value===E.name):null;break;case nt.LIST_VALUE:const f=$Me(o);o=f instanceof Is?f.ofType:null;break;case nt.OBJECT_VALUE:const p=y0(o);l=p instanceof One?p.getFields():null;break;case nt.OBJECT_FIELD:const D=E.name&&l?l[E.name]:null;o=D==null?void 0:D.type;break;case nt.NAMED_TYPE:E.name&&(d=u.getType(E.name));break}}),{argDef:t,argDefs:n,directiveDef:i,enumValue:r,fieldDef:a,inputType:o,objectFieldDefs:l,parentType:c,type:d,interfaceDef:h,objectTypeDef:s}}var v3;(function(u){u.TYPE_SYSTEM="TYPE_SYSTEM",u.EXECUTABLE="EXECUTABLE"})(v3||(v3={}));function vJt(u,e){return e!=null&&e.endsWith(".graphqls")||nJt(u)?v3.TYPE_SYSTEM:v3.EXECUTABLE}function eNe(u){return u.prevState&&u.kind&&[nt.NAMED_TYPE,nt.LIST_TYPE,nt.TYPE,nt.NON_NULL_TYPE].includes(u.kind)?eNe(u.prevState):u}var QI={exports:{}};function tNe(u,e){if(u!=null)return u;var t=new Error(e!==void 0?e:"Got unexpected "+u);throw t.framesToPop=1,t}QI.exports=tNe;QI.exports.default=tNe;Object.defineProperty(QI.exports,"__esModule",{value:!0});var CJt=QI.exports;const P3e=Hl(CJt),bJt=(u,e)=>{if(!e)return[];const t=new Map,n=new Set;ad(u,{FragmentDefinition(a){t.set(a.name.value,!0)},FragmentSpread(a){n.has(a.name.value)||n.add(a.name.value)}});const i=new Set;for(const a of n)!t.has(a)&&e.has(a)&&i.add(P3e(e.get(a)));const r=[];for(const a of i)ad(a,{FragmentSpread(o){!n.has(o.name.value)&&e.get(o.name.value)&&(i.add(P3e(e.get(o.name.value))),n.add(o.name.value))}}),t.has(a.name.value)||r.push(a);return r};function kJt(u,e){const t=Object.create(null);for(const n of e.definitions)if(n.kind==="OperationDefinition"){const{variableDefinitions:i}=n;if(i)for(const{variable:r,type:a}of i){const o=ay(u,a);o?t[r.name.value]=o:a.kind===De.NAMED_TYPE&&a.name.value==="Float"&&(t[r.name.value]=QMe)}}return t}function FJt(u,e){const t=e?kJt(e,u):void 0,n=[];return ad(u,{OperationDefinition(i){n.push(i)}}),{variableToType:t,operations:n}}function yJt(u,e){if(e)try{const t=Bg(e);return Object.assign(Object.assign({},FJt(t,u)),{documentAST:t})}catch{return}}globalThis&&globalThis.__awaiter;/*! * is-primitive * * Copyright (c) 2014-present, Jon Schlinkert. @@ -1038,10 +1038,10 @@ ${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. * * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert). * Released under the MIT License. - */const{deleteProperty:wJt}=Reflect,LJt=AJt,I3e=BJt,O3e=u=>typeof u=="object"&&u!==null||typeof u=="function",zJt=u=>u==="__proto__"||u==="constructor"||u==="prototype",Jne=u=>{if(!LJt(u))throw new TypeError("Object keys must be strings or symbols");if(zJt(u))throw new Error(`Cannot set unsafe key: "${u}"`)},MJt=u=>Array.isArray(u)?u.flat().map(String).join(","):u,TJt=(u,e)=>{if(typeof u!="string"||!e)return u;let t=u+";";return e.arrays!==void 0&&(t+=`arrays=${e.arrays};`),e.separator!==void 0&&(t+=`separator=${e.separator};`),e.split!==void 0&&(t+=`split=${e.split};`),e.merge!==void 0&&(t+=`merge=${e.merge};`),e.preservePaths!==void 0&&(t+=`preservePaths=${e.preservePaths};`),t},NJt=(u,e,t)=>{const n=MJt(e?TJt(u,e):u);Jne(n);const i=Dp.cache.get(n)||t();return Dp.cache.set(n,i),i},PJt=(u,e={})=>{const t=e.separator||".",n=t==="/"?!1:e.preservePaths;if(typeof u=="string"&&n!==!1&&/\//.test(u))return[u];const i=[];let r="";const a=o=>{let s;o.trim()!==""&&Number.isInteger(s=Number(o))?i.push(s):i.push(o)};for(let o=0;oe&&typeof e.split=="function"?e.split(u):typeof u=="symbol"?[u]:Array.isArray(u)?u:NJt(u,e,()=>PJt(u,e)),RJt=(u,e,t,n)=>{if(Jne(e),t===void 0)wJt(u,e);else if(n&&n.merge){const i=n.merge==="function"?n.merge:Object.assign;i&&I3e(u[e])&&I3e(t)?u[e]=i(u[e],t):u[e]=t}else u[e]=t;return u},Dp=(u,e,t,n)=>{if(!e||!O3e(u))return u;const i=uNe(e,n);let r=u;for(let a=0;a{Dp.cache=new Map};var IJt=Dp;const OJt=Hl(IJt);var jJt=function(){var u=document.getSelection();if(!u.rangeCount)return function(){};for(var e=document.activeElement,t=[],n=0;n"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=j3e[e.format]||j3e.default;window.clipboardData.setData(d,u)}else c.clipboardData.clearData(),c.clipboardData.setData(e.format,u);e.onCopy&&(c.preventDefault(),e.onCopy(c.clipboardData))}),document.body.appendChild(o),r.selectNodeContents(o),a.addRange(r);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",u),e.onCopy&&e.onCopy(window.clipboardData),s=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),n=$Jt("message"in e?e.message:VJt),window.prompt(n,u)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(r):a.removeAllRanges()),o&&document.body.removeChild(o),i()}return s}var nNe=KJt;const WJt=Hl(nNe);function Gu(u,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(u==null||u(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function GJt(u,e){typeof u=="function"?u(e):u!=null&&(u.current=e)}function Zne(...u){return e=>u.forEach(t=>GJt(t,e))}function co(...u){return C.useCallback(Zne(...u),u)}function eD(u,e=[]){let t=[];function n(r,a){const o=C.createContext(a),s=t.length;t=[...t,a];function l(d){const{scope:h,children:E,...m}=d,g=(h==null?void 0:h[u][s])||o,f=C.useMemo(()=>m,Object.values(m));return C.createElement(g.Provider,{value:f},E)}function c(d,h){const E=(h==null?void 0:h[u][s])||o,m=C.useContext(E);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",[l,c]}const i=()=>{const r=t.map(a=>C.createContext(a));return function(o){const s=(o==null?void 0:o[u])||r;return C.useMemo(()=>({[`__scope${u}`]:{...o,[u]:s}}),[o,s])}};return i.scopeName=u,[n,UJt(i,...e)]}function UJt(...u){const e=u[0];if(u.length===1)return e;const t=()=>{const n=u.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const a=n.reduce((o,{useScope:s,scopeName:l})=>{const d=s(r)[`__scope${l}`];return{...o,...d}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return t.scopeName=e.scopeName,t}const e6=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},qJt=wm["useId".toString()]||(()=>{});let JJt=0;function C3(u){const[e,t]=C.useState(qJt());return e6(()=>{u||t(n=>n??String(JJt++))},[u]),u||(e?`radix-${e}`:"")}function j1(u){const e=C.useRef(u);return C.useEffect(()=>{e.current=u}),C.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}function XI({prop:u,defaultProp:e,onChange:t=()=>{}}){const[n,i]=ZJt({defaultProp:e,onChange:t}),r=u!==void 0,a=r?u:n,o=j1(t),s=C.useCallback(l=>{if(r){const d=typeof l=="function"?l(u):l;d!==u&&o(d)}else i(l)},[r,u,i,o]);return[a,s]}function ZJt({defaultProp:u,onChange:e}){const t=C.useState(u),[n]=t,i=C.useRef(n),r=j1(e);return C.useEffect(()=>{i.current!==n&&(r(n),i.current=n)},[n,i,r]),t}const t6=C.forwardRef((u,e)=>{const{children:t,...n}=u,i=C.Children.toArray(t),r=i.find(YJt);if(r){const a=r.props.children,o=i.map(s=>s===r?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:s);return C.createElement(EY,vt({},n,{ref:e}),C.isValidElement(a)?C.cloneElement(a,void 0,o):null)}return C.createElement(EY,vt({},n,{ref:e}),t)});t6.displayName="Slot";const EY=C.forwardRef((u,e)=>{const{children:t,...n}=u;return C.isValidElement(t)?C.cloneElement(t,{...QJt(n,t.props),ref:e?Zne(e,t.ref):t.ref}):C.Children.count(t)>1?C.Children.only(null):null});EY.displayName="SlotClone";const iNe=({children:u})=>C.createElement(C.Fragment,null,u);function YJt(u){return C.isValidElement(u)&&u.type===iNe}function QJt(u,e){const t={...e};for(const n in e){const i=u[n],r=e[n];/^on[A-Z]/.test(n)?i&&r?t[n]=(...o)=>{r(...o),i(...o)}:i&&(t[n]=i):n==="style"?t[n]={...i,...r}:n==="className"&&(t[n]=[i,r].filter(Boolean).join(" "))}return{...u,...t}}const XJt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$o=XJt.reduce((u,e)=>{const t=C.forwardRef((n,i)=>{const{asChild:r,...a}=n,o=r?t6:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(o,vt({},a,{ref:i}))});return t.displayName=`Primitive.${e}`,{...u,[e]:t}},{});function rNe(u,e){u&&ns.flushSync(()=>u.dispatchEvent(e))}function eZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[t,e])}const mY="dismissableLayer.update",tZt="dismissableLayer.pointerDownOutside",uZt="dismissableLayer.focusOutside";let H3e;const nZt=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yne=C.forwardRef((u,e)=>{var t;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=u,c=C.useContext(nZt),[d,h]=C.useState(null),E=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=C.useState({}),g=co(e,S=>h(S)),f=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),D=f.indexOf(p),x=d?f.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=D,A=iZt(S=>{const w=S.target,z=[...c.branches].some(N=>N.contains(w));!k||z||(r==null||r(S),o==null||o(S),S.defaultPrevented||s==null||s())},E),F=rZt(S=>{const w=S.target;[...c.branches].some(N=>N.contains(w))||(a==null||a(S),o==null||o(S),S.defaultPrevented||s==null||s())},E);return eZt(S=>{x===c.layers.size-1&&(i==null||i(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},E),C.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(H3e=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),V3e(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=H3e)}},[d,E,n,c]),C.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),V3e())},[d,c]),C.useEffect(()=>{const S=()=>m({});return document.addEventListener(mY,S),()=>document.removeEventListener(mY,S)},[]),C.createElement($o.div,vt({},l,{ref:g,style:{pointerEvents:b?k?"auto":"none":void 0,...u.style},onFocusCapture:Gu(u.onFocusCapture,F.onFocusCapture),onBlurCapture:Gu(u.onBlurCapture,F.onBlurCapture),onPointerDownCapture:Gu(u.onPointerDownCapture,A.onPointerDownCapture)}))});function iZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const r=o=>{if(o.target&&!n.current){let l=function(){aNe(tZt,t,s,{discrete:!0})};const s={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",r),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function rZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u),n=C.useRef(!1);return C.useEffect(()=>{const i=r=>{r.target&&!n.current&&aNe(uZt,t,{originalEvent:r},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function V3e(){const u=new CustomEvent(mY);document.dispatchEvent(u)}function aNe(u,e,t,{discrete:n}){const i=t.originalEvent.target,r=new CustomEvent(u,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(u,e,{once:!0}),n?rNe(i,r):i.dispatchEvent(r)}const E$="focusScope.autoFocusOnMount",m$="focusScope.autoFocusOnUnmount",$3e={bubbles:!1,cancelable:!0},oNe=C.forwardRef((u,e)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:r,...a}=u,[o,s]=C.useState(null),l=j1(i),c=j1(r),d=C.useRef(null),h=co(e,g=>s(g)),E=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let g=function(x){if(E.paused||!o)return;const b=x.target;o.contains(b)?d.current=b:rE(d.current,{select:!0})},f=function(x){if(E.paused||!o)return;const b=x.relatedTarget;b!==null&&(o.contains(b)||rE(d.current,{select:!0}))},p=function(x){const b=document.activeElement;for(const k of x)k.removedNodes.length>0&&(o!=null&&o.contains(b)||rE(o))};document.addEventListener("focusin",g),document.addEventListener("focusout",f);const D=new MutationObserver(p);return o&&D.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",f),D.disconnect()}}},[n,o,E.paused]),C.useEffect(()=>{if(o){W3e.add(E);const g=document.activeElement;if(!o.contains(g)){const p=new CustomEvent(E$,$3e);o.addEventListener(E$,l),o.dispatchEvent(p),p.defaultPrevented||(aZt(dZt(sNe(o)),{select:!0}),document.activeElement===g&&rE(o))}return()=>{o.removeEventListener(E$,l),setTimeout(()=>{const p=new CustomEvent(m$,$3e);o.addEventListener(m$,c),o.dispatchEvent(p),p.defaultPrevented||rE(g??document.body,{select:!0}),o.removeEventListener(m$,c),W3e.remove(E)},0)}}},[o,l,c,E]);const m=C.useCallback(g=>{if(!t&&!n||E.paused)return;const f=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(f&&p){const D=g.currentTarget,[x,b]=oZt(D);x&&b?!g.shiftKey&&p===b?(g.preventDefault(),t&&rE(x,{select:!0})):g.shiftKey&&p===x&&(g.preventDefault(),t&&rE(b,{select:!0})):p===D&&g.preventDefault()}},[t,n,E.paused]);return C.createElement($o.div,vt({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function aZt(u,{select:e=!1}={}){const t=document.activeElement;for(const n of u)if(rE(n,{select:e}),document.activeElement!==t)return}function oZt(u){const e=sNe(u),t=K3e(e,u),n=K3e(e.reverse(),u);return[t,n]}function sNe(u){const e=[],t=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function K3e(u,e){for(const t of u)if(!sZt(t,{upTo:e}))return t}function sZt(u,{upTo:e}){if(getComputedStyle(u).visibility==="hidden")return!0;for(;u;){if(e!==void 0&&u===e)return!1;if(getComputedStyle(u).display==="none")return!0;u=u.parentElement}return!1}function lZt(u){return u instanceof HTMLInputElement&&"select"in u}function rE(u,{select:e=!1}={}){if(u&&u.focus){const t=document.activeElement;u.focus({preventScroll:!0}),u!==t&&lZt(u)&&e&&u.select()}}const W3e=cZt();function cZt(){let u=[];return{add(e){const t=u[0];e!==t&&(t==null||t.pause()),u=G3e(u,e),u.unshift(e)},remove(e){var t;u=G3e(u,e),(t=u[0])===null||t===void 0||t.resume()}}}function G3e(u,e){const t=[...u],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}function dZt(u){return u.filter(e=>e.tagName!=="A")}const Qne=C.forwardRef((u,e)=>{var t;const{container:n=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...i}=u;return n?zx.createPortal(C.createElement($o.div,vt({},i,{ref:e})),n):null});function hZt(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const Lg=u=>{const{present:e,children:t}=u,n=EZt(e),i=typeof t=="function"?t({present:n.isPresent}):C.Children.only(t),r=co(n.ref,i.ref);return typeof t=="function"||n.isPresent?C.cloneElement(i,{ref:r}):null};Lg.displayName="Presence";function EZt(u){const[e,t]=C.useState(),n=C.useRef({}),i=C.useRef(u),r=C.useRef("none"),a=u?"mounted":"unmounted",[o,s]=hZt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=sS(n.current);r.current=o==="mounted"?l:"none"},[o]),e6(()=>{const l=n.current,c=i.current;if(c!==u){const h=r.current,E=sS(l);u?s("MOUNT"):E==="none"||(l==null?void 0:l.display)==="none"?s("UNMOUNT"):s(c&&h!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=u}},[u,s]),e6(()=>{if(e){const l=d=>{const E=sS(n.current).includes(d.animationName);d.target===e&&E&&ns.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===e&&(r.current=sS(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function sS(u){return(u==null?void 0:u.animationName)||"none"}let g$=0;function lNe(){C.useEffect(()=>{var u,e;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(u=t[0])!==null&&u!==void 0?u:U3e()),document.body.insertAdjacentElement("beforeend",(e=t[1])!==null&&e!==void 0?e:U3e()),g$++,()=>{g$===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),g$--}},[])}function U3e(){const u=document.createElement("span");return u.setAttribute("data-radix-focus-guard",""),u.tabIndex=0,u.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",u}var cNe=x9e(),f$=function(){},eO=C.forwardRef(function(u,e){var t=C.useRef(null),n=C.useState({onScrollCapture:f$,onWheelCapture:f$,onTouchMoveCapture:f$}),i=n[0],r=n[1],a=u.forwardProps,o=u.children,s=u.className,l=u.removeScrollBar,c=u.enabled,d=u.shards,h=u.sideCar,E=u.noIsolation,m=u.inert,g=u.allowPinchZoom,f=u.as,p=f===void 0?"div":f,D=go(u,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=h,b=D9e([t,e]),k=Ke(Ke({},D),i);return C.createElement(C.Fragment,null,c&&C.createElement(x,{sideCar:cNe,removeScrollBar:l,shards:d,noIsolation:E,inert:m,setCallbacks:r,allowPinchZoom:!!g,lockRef:t}),a?C.cloneElement(C.Children.only(o),Ke(Ke({},k),{ref:b})):C.createElement(p,Ke({},k,{className:s,ref:b}),o))});eO.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eO.classNames={fullWidth:R2,zeroRight:P2};var gY=!1;if(typeof window<"u")try{var lS=Object.defineProperty({},"passive",{get:function(){return gY=!0,!0}});window.addEventListener("test",lS,lS),window.removeEventListener("test",lS,lS)}catch{gY=!1}var ID=gY?{passive:!1}:!1,mZt=function(u){return u.tagName==="TEXTAREA"},dNe=function(u,e){var t=window.getComputedStyle(u);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!mZt(u)&&t[e]==="visible")},gZt=function(u){return dNe(u,"overflowY")},fZt=function(u){return dNe(u,"overflowX")},q3e=function(u,e){var t=e;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var n=hNe(u,t);if(n){var i=ENe(u,t),r=i[1],a=i[2];if(r>a)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},pZt=function(u){var e=u.scrollTop,t=u.scrollHeight,n=u.clientHeight;return[e,t,n]},DZt=function(u){var e=u.scrollLeft,t=u.scrollWidth,n=u.clientWidth;return[e,t,n]},hNe=function(u,e){return u==="v"?gZt(e):fZt(e)},ENe=function(u,e){return u==="v"?pZt(e):DZt(e)},xZt=function(u,e){return u==="h"&&e==="rtl"?-1:1},vZt=function(u,e,t,n,i){var r=xZt(u,window.getComputedStyle(e).direction),a=r*n,o=t.target,s=e.contains(o),l=!1,c=a>0,d=0,h=0;do{var E=ENe(u,o),m=E[0],g=E[1],f=E[2],p=g-f-r*m;(m||p)&&hNe(u,o)&&(d+=p,h+=m),o=o.parentNode}while(!s&&o!==document.body||s&&(e.contains(o)||e===o));return(c&&(i&&d===0||!i&&a>d)||!c&&(i&&h===0||!i&&-a>h))&&(l=!0),l},cS=function(u){return"changedTouches"in u?[u.changedTouches[0].clientX,u.changedTouches[0].clientY]:[0,0]},J3e=function(u){return[u.deltaX,u.deltaY]},Z3e=function(u){return u&&"current"in u?u.current:u},CZt=function(u,e){return u[0]===e[0]&&u[1]===e[1]},bZt=function(u){return` + */const{deleteProperty:wJt}=Reflect,LJt=AJt,I3e=BJt,O3e=u=>typeof u=="object"&&u!==null||typeof u=="function",zJt=u=>u==="__proto__"||u==="constructor"||u==="prototype",Jne=u=>{if(!LJt(u))throw new TypeError("Object keys must be strings or symbols");if(zJt(u))throw new Error(`Cannot set unsafe key: "${u}"`)},MJt=u=>Array.isArray(u)?u.flat().map(String).join(","):u,TJt=(u,e)=>{if(typeof u!="string"||!e)return u;let t=u+";";return e.arrays!==void 0&&(t+=`arrays=${e.arrays};`),e.separator!==void 0&&(t+=`separator=${e.separator};`),e.split!==void 0&&(t+=`split=${e.split};`),e.merge!==void 0&&(t+=`merge=${e.merge};`),e.preservePaths!==void 0&&(t+=`preservePaths=${e.preservePaths};`),t},NJt=(u,e,t)=>{const n=MJt(e?TJt(u,e):u);Jne(n);const i=Dp.cache.get(n)||t();return Dp.cache.set(n,i),i},PJt=(u,e={})=>{const t=e.separator||".",n=t==="/"?!1:e.preservePaths;if(typeof u=="string"&&n!==!1&&/\//.test(u))return[u];const i=[];let r="";const a=o=>{let s;o.trim()!==""&&Number.isInteger(s=Number(o))?i.push(s):i.push(o)};for(let o=0;oe&&typeof e.split=="function"?e.split(u):typeof u=="symbol"?[u]:Array.isArray(u)?u:NJt(u,e,()=>PJt(u,e)),RJt=(u,e,t,n)=>{if(Jne(e),t===void 0)wJt(u,e);else if(n&&n.merge){const i=n.merge==="function"?n.merge:Object.assign;i&&I3e(u[e])&&I3e(t)?u[e]=i(u[e],t):u[e]=t}else u[e]=t;return u},Dp=(u,e,t,n)=>{if(!e||!O3e(u))return u;const i=uNe(e,n);let r=u;for(let a=0;a{Dp.cache=new Map};var IJt=Dp;const OJt=Hl(IJt);var jJt=function(){var u=document.getSelection();if(!u.rangeCount)return function(){};for(var e=document.activeElement,t=[],n=0;n"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=j3e[e.format]||j3e.default;window.clipboardData.setData(d,u)}else c.clipboardData.clearData(),c.clipboardData.setData(e.format,u);e.onCopy&&(c.preventDefault(),e.onCopy(c.clipboardData))}),document.body.appendChild(o),r.selectNodeContents(o),a.addRange(r);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",u),e.onCopy&&e.onCopy(window.clipboardData),s=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),n=$Jt("message"in e?e.message:VJt),window.prompt(n,u)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(r):a.removeAllRanges()),o&&document.body.removeChild(o),i()}return s}var nNe=KJt;const WJt=Hl(nNe);function Gu(u,e,{checkForDefaultPrevented:t=!0}={}){return function(i){if(u==null||u(i),t===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function GJt(u,e){typeof u=="function"?u(e):u!=null&&(u.current=e)}function Zne(...u){return e=>u.forEach(t=>GJt(t,e))}function co(...u){return C.useCallback(Zne(...u),u)}function eD(u,e=[]){let t=[];function n(r,a){const o=C.createContext(a),s=t.length;t=[...t,a];function l(d){const{scope:h,children:E,...m}=d,g=(h==null?void 0:h[u][s])||o,f=C.useMemo(()=>m,Object.values(m));return C.createElement(g.Provider,{value:f},E)}function c(d,h){const E=(h==null?void 0:h[u][s])||o,m=C.useContext(E);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",[l,c]}const i=()=>{const r=t.map(a=>C.createContext(a));return function(o){const s=(o==null?void 0:o[u])||r;return C.useMemo(()=>({[`__scope${u}`]:{...o,[u]:s}}),[o,s])}};return i.scopeName=u,[n,UJt(i,...e)]}function UJt(...u){const e=u[0];if(u.length===1)return e;const t=()=>{const n=u.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const a=n.reduce((o,{useScope:s,scopeName:l})=>{const d=s(r)[`__scope${l}`];return{...o,...d}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return t.scopeName=e.scopeName,t}const e6=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},qJt=wm["useId".toString()]||(()=>{});let JJt=0;function C3(u){const[e,t]=C.useState(qJt());return e6(()=>{u||t(n=>n??String(JJt++))},[u]),u||(e?`radix-${e}`:"")}function j1(u){const e=C.useRef(u);return C.useEffect(()=>{e.current=u}),C.useMemo(()=>(...t)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...t)},[])}function XI({prop:u,defaultProp:e,onChange:t=()=>{}}){const[n,i]=ZJt({defaultProp:e,onChange:t}),r=u!==void 0,a=r?u:n,o=j1(t),s=C.useCallback(l=>{if(r){const d=typeof l=="function"?l(u):l;d!==u&&o(d)}else i(l)},[r,u,i,o]);return[a,s]}function ZJt({defaultProp:u,onChange:e}){const t=C.useState(u),[n]=t,i=C.useRef(n),r=j1(e);return C.useEffect(()=>{i.current!==n&&(r(n),i.current=n)},[n,i,r]),t}const t6=C.forwardRef((u,e)=>{const{children:t,...n}=u,i=C.Children.toArray(t),r=i.find(YJt);if(r){const a=r.props.children,o=i.map(s=>s===r?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:s);return C.createElement(EY,vt({},n,{ref:e}),C.isValidElement(a)?C.cloneElement(a,void 0,o):null)}return C.createElement(EY,vt({},n,{ref:e}),t)});t6.displayName="Slot";const EY=C.forwardRef((u,e)=>{const{children:t,...n}=u;return C.isValidElement(t)?C.cloneElement(t,{...QJt(n,t.props),ref:e?Zne(e,t.ref):t.ref}):C.Children.count(t)>1?C.Children.only(null):null});EY.displayName="SlotClone";const iNe=({children:u})=>C.createElement(C.Fragment,null,u);function YJt(u){return C.isValidElement(u)&&u.type===iNe}function QJt(u,e){const t={...e};for(const n in e){const i=u[n],r=e[n];/^on[A-Z]/.test(n)?i&&r?t[n]=(...o)=>{r(...o),i(...o)}:i&&(t[n]=i):n==="style"?t[n]={...i,...r}:n==="className"&&(t[n]=[i,r].filter(Boolean).join(" "))}return{...u,...t}}const XJt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$o=XJt.reduce((u,e)=>{const t=C.forwardRef((n,i)=>{const{asChild:r,...a}=n,o=r?t6:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(o,vt({},a,{ref:i}))});return t.displayName=`Primitive.${e}`,{...u,[e]:t}},{});function rNe(u,e){u&&is.flushSync(()=>u.dispatchEvent(e))}function eZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[t,e])}const mY="dismissableLayer.update",tZt="dismissableLayer.pointerDownOutside",uZt="dismissableLayer.focusOutside";let H3e;const nZt=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yne=C.forwardRef((u,e)=>{var t;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=u,c=C.useContext(nZt),[d,h]=C.useState(null),E=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=C.useState({}),g=co(e,S=>h(S)),f=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),D=f.indexOf(p),x=d?f.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=D,A=iZt(S=>{const w=S.target,z=[...c.branches].some(N=>N.contains(w));!k||z||(r==null||r(S),o==null||o(S),S.defaultPrevented||s==null||s())},E),F=rZt(S=>{const w=S.target;[...c.branches].some(N=>N.contains(w))||(a==null||a(S),o==null||o(S),S.defaultPrevented||s==null||s())},E);return eZt(S=>{x===c.layers.size-1&&(i==null||i(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},E),C.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(H3e=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),V3e(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=H3e)}},[d,E,n,c]),C.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),V3e())},[d,c]),C.useEffect(()=>{const S=()=>m({});return document.addEventListener(mY,S),()=>document.removeEventListener(mY,S)},[]),C.createElement($o.div,vt({},l,{ref:g,style:{pointerEvents:b?k?"auto":"none":void 0,...u.style},onFocusCapture:Gu(u.onFocusCapture,F.onFocusCapture),onBlurCapture:Gu(u.onBlurCapture,F.onBlurCapture),onPointerDownCapture:Gu(u.onPointerDownCapture,A.onPointerDownCapture)}))});function iZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const r=o=>{if(o.target&&!n.current){let l=function(){aNe(tZt,t,s,{discrete:!0})};const s={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",r),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function rZt(u,e=globalThis==null?void 0:globalThis.document){const t=j1(u),n=C.useRef(!1);return C.useEffect(()=>{const i=r=>{r.target&&!n.current&&aNe(uZt,t,{originalEvent:r},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function V3e(){const u=new CustomEvent(mY);document.dispatchEvent(u)}function aNe(u,e,t,{discrete:n}){const i=t.originalEvent.target,r=new CustomEvent(u,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(u,e,{once:!0}),n?rNe(i,r):i.dispatchEvent(r)}const E$="focusScope.autoFocusOnMount",m$="focusScope.autoFocusOnUnmount",$3e={bubbles:!1,cancelable:!0},oNe=C.forwardRef((u,e)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:r,...a}=u,[o,s]=C.useState(null),l=j1(i),c=j1(r),d=C.useRef(null),h=co(e,g=>s(g)),E=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let g=function(x){if(E.paused||!o)return;const b=x.target;o.contains(b)?d.current=b:rE(d.current,{select:!0})},f=function(x){if(E.paused||!o)return;const b=x.relatedTarget;b!==null&&(o.contains(b)||rE(d.current,{select:!0}))},p=function(x){const b=document.activeElement;for(const k of x)k.removedNodes.length>0&&(o!=null&&o.contains(b)||rE(o))};document.addEventListener("focusin",g),document.addEventListener("focusout",f);const D=new MutationObserver(p);return o&&D.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",f),D.disconnect()}}},[n,o,E.paused]),C.useEffect(()=>{if(o){W3e.add(E);const g=document.activeElement;if(!o.contains(g)){const p=new CustomEvent(E$,$3e);o.addEventListener(E$,l),o.dispatchEvent(p),p.defaultPrevented||(aZt(dZt(sNe(o)),{select:!0}),document.activeElement===g&&rE(o))}return()=>{o.removeEventListener(E$,l),setTimeout(()=>{const p=new CustomEvent(m$,$3e);o.addEventListener(m$,c),o.dispatchEvent(p),p.defaultPrevented||rE(g??document.body,{select:!0}),o.removeEventListener(m$,c),W3e.remove(E)},0)}}},[o,l,c,E]);const m=C.useCallback(g=>{if(!t&&!n||E.paused)return;const f=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(f&&p){const D=g.currentTarget,[x,b]=oZt(D);x&&b?!g.shiftKey&&p===b?(g.preventDefault(),t&&rE(x,{select:!0})):g.shiftKey&&p===x&&(g.preventDefault(),t&&rE(b,{select:!0})):p===D&&g.preventDefault()}},[t,n,E.paused]);return C.createElement($o.div,vt({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function aZt(u,{select:e=!1}={}){const t=document.activeElement;for(const n of u)if(rE(n,{select:e}),document.activeElement!==t)return}function oZt(u){const e=sNe(u),t=K3e(e,u),n=K3e(e.reverse(),u);return[t,n]}function sNe(u){const e=[],t=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function K3e(u,e){for(const t of u)if(!sZt(t,{upTo:e}))return t}function sZt(u,{upTo:e}){if(getComputedStyle(u).visibility==="hidden")return!0;for(;u;){if(e!==void 0&&u===e)return!1;if(getComputedStyle(u).display==="none")return!0;u=u.parentElement}return!1}function lZt(u){return u instanceof HTMLInputElement&&"select"in u}function rE(u,{select:e=!1}={}){if(u&&u.focus){const t=document.activeElement;u.focus({preventScroll:!0}),u!==t&&lZt(u)&&e&&u.select()}}const W3e=cZt();function cZt(){let u=[];return{add(e){const t=u[0];e!==t&&(t==null||t.pause()),u=G3e(u,e),u.unshift(e)},remove(e){var t;u=G3e(u,e),(t=u[0])===null||t===void 0||t.resume()}}}function G3e(u,e){const t=[...u],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}function dZt(u){return u.filter(e=>e.tagName!=="A")}const Qne=C.forwardRef((u,e)=>{var t;const{container:n=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...i}=u;return n?zx.createPortal(C.createElement($o.div,vt({},i,{ref:e})),n):null});function hZt(u,e){return C.useReducer((t,n)=>{const i=e[t][n];return i??t},u)}const Lg=u=>{const{present:e,children:t}=u,n=EZt(e),i=typeof t=="function"?t({present:n.isPresent}):C.Children.only(t),r=co(n.ref,i.ref);return typeof t=="function"||n.isPresent?C.cloneElement(i,{ref:r}):null};Lg.displayName="Presence";function EZt(u){const[e,t]=C.useState(),n=C.useRef({}),i=C.useRef(u),r=C.useRef("none"),a=u?"mounted":"unmounted",[o,s]=hZt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=sS(n.current);r.current=o==="mounted"?l:"none"},[o]),e6(()=>{const l=n.current,c=i.current;if(c!==u){const h=r.current,E=sS(l);u?s("MOUNT"):E==="none"||(l==null?void 0:l.display)==="none"?s("UNMOUNT"):s(c&&h!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=u}},[u,s]),e6(()=>{if(e){const l=d=>{const E=sS(n.current).includes(d.animationName);d.target===e&&E&&is.flushSync(()=>s("ANIMATION_END"))},c=d=>{d.target===e&&(r.current=sS(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),t(l)},[])}}function sS(u){return(u==null?void 0:u.animationName)||"none"}let g$=0;function lNe(){C.useEffect(()=>{var u,e;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(u=t[0])!==null&&u!==void 0?u:U3e()),document.body.insertAdjacentElement("beforeend",(e=t[1])!==null&&e!==void 0?e:U3e()),g$++,()=>{g$===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),g$--}},[])}function U3e(){const u=document.createElement("span");return u.setAttribute("data-radix-focus-guard",""),u.tabIndex=0,u.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",u}var cNe=x9e(),f$=function(){},eO=C.forwardRef(function(u,e){var t=C.useRef(null),n=C.useState({onScrollCapture:f$,onWheelCapture:f$,onTouchMoveCapture:f$}),i=n[0],r=n[1],a=u.forwardProps,o=u.children,s=u.className,l=u.removeScrollBar,c=u.enabled,d=u.shards,h=u.sideCar,E=u.noIsolation,m=u.inert,g=u.allowPinchZoom,f=u.as,p=f===void 0?"div":f,D=go(u,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=h,b=D9e([t,e]),k=Ke(Ke({},D),i);return C.createElement(C.Fragment,null,c&&C.createElement(x,{sideCar:cNe,removeScrollBar:l,shards:d,noIsolation:E,inert:m,setCallbacks:r,allowPinchZoom:!!g,lockRef:t}),a?C.cloneElement(C.Children.only(o),Ke(Ke({},k),{ref:b})):C.createElement(p,Ke({},k,{className:s,ref:b}),o))});eO.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eO.classNames={fullWidth:R2,zeroRight:P2};var gY=!1;if(typeof window<"u")try{var lS=Object.defineProperty({},"passive",{get:function(){return gY=!0,!0}});window.addEventListener("test",lS,lS),window.removeEventListener("test",lS,lS)}catch{gY=!1}var ID=gY?{passive:!1}:!1,mZt=function(u){return u.tagName==="TEXTAREA"},dNe=function(u,e){var t=window.getComputedStyle(u);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!mZt(u)&&t[e]==="visible")},gZt=function(u){return dNe(u,"overflowY")},fZt=function(u){return dNe(u,"overflowX")},q3e=function(u,e){var t=e;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var n=hNe(u,t);if(n){var i=ENe(u,t),r=i[1],a=i[2];if(r>a)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},pZt=function(u){var e=u.scrollTop,t=u.scrollHeight,n=u.clientHeight;return[e,t,n]},DZt=function(u){var e=u.scrollLeft,t=u.scrollWidth,n=u.clientWidth;return[e,t,n]},hNe=function(u,e){return u==="v"?gZt(e):fZt(e)},ENe=function(u,e){return u==="v"?pZt(e):DZt(e)},xZt=function(u,e){return u==="h"&&e==="rtl"?-1:1},vZt=function(u,e,t,n,i){var r=xZt(u,window.getComputedStyle(e).direction),a=r*n,o=t.target,s=e.contains(o),l=!1,c=a>0,d=0,h=0;do{var E=ENe(u,o),m=E[0],g=E[1],f=E[2],p=g-f-r*m;(m||p)&&hNe(u,o)&&(d+=p,h+=m),o=o.parentNode}while(!s&&o!==document.body||s&&(e.contains(o)||e===o));return(c&&(i&&d===0||!i&&a>d)||!c&&(i&&h===0||!i&&-a>h))&&(l=!0),l},cS=function(u){return"changedTouches"in u?[u.changedTouches[0].clientX,u.changedTouches[0].clientY]:[0,0]},J3e=function(u){return[u.deltaX,u.deltaY]},Z3e=function(u){return u&&"current"in u?u.current:u},CZt=function(u,e){return u[0]===e[0]&&u[1]===e[1]},bZt=function(u){return` .block-interactivity-`.concat(u,` {pointer-events: none;} .allow-interactivity-`).concat(u,` {pointer-events: all;} -`)},kZt=0,OD=[];function FZt(u){var e=C.useRef([]),t=C.useRef([0,0]),n=C.useRef(),i=C.useState(kZt++)[0],r=C.useState(function(){return Nue()})[0],a=C.useRef(u);C.useEffect(function(){a.current=u},[u]),C.useEffect(function(){if(u.inert){document.body.classList.add("block-interactivity-".concat(i));var g=Bl([u.lockRef.current],(u.shards||[]).map(Z3e),!0).filter(Boolean);return g.forEach(function(f){return f.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(i))})}}},[u.inert,u.lockRef.current,u.shards]);var o=C.useCallback(function(g,f){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var p=cS(g),D=t.current,x="deltaX"in g?g.deltaX:D[0]-p[0],b="deltaY"in g?g.deltaY:D[1]-p[1],k,A=g.target,F=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in g&&F==="h"&&A.type==="range")return!1;var S=q3e(F,A);if(!S)return!0;if(S?k=F:(k=F==="v"?"h":"v",S=q3e(F,A)),!S)return!1;if(!n.current&&"changedTouches"in g&&(x||b)&&(n.current=k),!k)return!0;var w=n.current||k;return vZt(w,f,g,w==="h"?x:b,!0)},[]),s=C.useCallback(function(g){var f=g;if(!(!OD.length||OD[OD.length-1]!==r)){var p="deltaY"in f?J3e(f):cS(f),D=e.current.filter(function(k){return k.name===f.type&&k.target===f.target&&CZt(k.delta,p)})[0];if(D&&D.should){f.cancelable&&f.preventDefault();return}if(!D){var x=(a.current.shards||[]).map(Z3e).filter(Boolean).filter(function(k){return k.contains(f.target)}),b=x.length>0?o(f,x[0]):!a.current.noIsolation;b&&f.cancelable&&f.preventDefault()}}},[]),l=C.useCallback(function(g,f,p,D){var x={name:g,delta:f,target:p,should:D};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=C.useCallback(function(g){t.current=cS(g),n.current=void 0},[]),d=C.useCallback(function(g){l(g.type,J3e(g),g.target,o(g,u.lockRef.current))},[]),h=C.useCallback(function(g){l(g.type,cS(g),g.target,o(g,u.lockRef.current))},[]);C.useEffect(function(){return OD.push(r),u.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,ID),document.addEventListener("touchmove",s,ID),document.addEventListener("touchstart",c,ID),function(){OD=OD.filter(function(g){return g!==r}),document.removeEventListener("wheel",s,ID),document.removeEventListener("touchmove",s,ID),document.removeEventListener("touchstart",c,ID)}},[]);var E=u.removeScrollBar,m=u.inert;return C.createElement(C.Fragment,null,m?C.createElement(r,{styles:bZt(i)}):null,E?C.createElement(k9e,{gapMode:"margin"}):null)}const yZt=C9e(cNe,FZt);var mNe=C.forwardRef(function(u,e){return C.createElement(eO,Ke({},u,{ref:e,sideCar:yZt}))});mNe.classNames=eO.classNames;const gNe=mNe,fNe="Dialog",[pNe,rqn]=eD(fNe),[AZt,xd]=pNe(fNe),_Zt=u=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:r,modal:a=!0}=u,o=C.useRef(null),s=C.useRef(null),[l=!1,c]=XI({prop:n,defaultProp:i,onChange:r});return C.createElement(AZt,{scope:e,triggerRef:o,contentRef:s,contentId:C3(),titleId:C3(),descriptionId:C3(),open:l,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(d=>!d),[c]),modal:a},t)},SZt="DialogTrigger",BZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(SZt,t),r=co(e,i.triggerRef);return C.createElement($o.button,vt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xne(i.open)},n,{ref:r,onClick:Gu(u.onClick,i.onOpenToggle)}))}),DNe="DialogPortal",[wZt,xNe]=pNe(DNe,{forceMount:void 0}),LZt=u=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=u,r=xd(DNe,e);return C.createElement(wZt,{scope:e,forceMount:t},C.Children.map(n,a=>C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},a))))},fY="DialogOverlay",zZt=C.forwardRef((u,e)=>{const t=xNe(fY,u.__scopeDialog),{forceMount:n=t.forceMount,...i}=u,r=xd(fY,u.__scopeDialog);return r.modal?C.createElement(Lg,{present:n||r.open},C.createElement(MZt,vt({},i,{ref:e}))):null}),MZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(fY,t);return C.createElement(gNe,{as:t6,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement($o.div,vt({"data-state":Xne(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),yy="DialogContent",TZt=C.forwardRef((u,e)=>{const t=xNe(yy,u.__scopeDialog),{forceMount:n=t.forceMount,...i}=u,r=xd(yy,u.__scopeDialog);return C.createElement(Lg,{present:n||r.open},r.modal?C.createElement(NZt,vt({},i,{ref:e})):C.createElement(PZt,vt({},i,{ref:e})))}),NZt=C.forwardRef((u,e)=>{const t=xd(yy,u.__scopeDialog),n=C.useRef(null),i=co(e,t.contentRef,n);return C.useEffect(()=>{const r=n.current;if(r)return HSe(r)},[]),C.createElement(vNe,vt({},u,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gu(u.onCloseAutoFocus,r=>{var a;r.preventDefault(),(a=t.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Gu(u.onPointerDownOutside,r=>{const a=r.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&r.preventDefault()}),onFocusOutside:Gu(u.onFocusOutside,r=>r.preventDefault())}))}),PZt=C.forwardRef((u,e)=>{const t=xd(yy,u.__scopeDialog),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(vNe,vt({},u,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var a;if((a=u.onCloseAutoFocus)===null||a===void 0||a.call(u,r),!r.defaultPrevented){var o;n.current||(o=t.triggerRef.current)===null||o===void 0||o.focus(),r.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:r=>{var a,o;(a=u.onInteractOutside)===null||a===void 0||a.call(u,r),r.defaultPrevented||(n.current=!0,r.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=r.target;((o=t.triggerRef.current)===null||o===void 0?void 0:o.contains(s))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&i.current&&r.preventDefault()}}))}),vNe=C.forwardRef((u,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:r,...a}=u,o=xd(yy,t),s=C.useRef(null),l=co(e,s);return lNe(),C.createElement(C.Fragment,null,C.createElement(oNe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:r},C.createElement(Yne,vt({role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Xne(o.open)},a,{ref:l,onDismiss:()=>o.onOpenChange(!1)}))),!1)}),RZt="DialogTitle",IZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(RZt,t);return C.createElement($o.h2,vt({id:i.titleId},n,{ref:e}))}),OZt="DialogDescription",jZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(OZt,t);return C.createElement($o.p,vt({id:i.descriptionId},n,{ref:e}))}),HZt="DialogClose",VZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(HZt,t);return C.createElement($o.button,vt({type:"button"},n,{ref:e,onClick:Gu(u.onClick,()=>i.onOpenChange(!1))}))});function Xne(u){return u?"open":"closed"}const $Zt=_Zt,KZt=BZt,WZt=LZt,GZt=zZt,UZt=TZt,qZt=IZt,JZt=jZt,ZZt=VZt,YZt=C.forwardRef((u,e)=>C.createElement($o.span,vt({},u,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...u.style}}))),CNe=YZt;function bNe(u){const e=u+"CollectionProvider",[t,n]=eD(e),[i,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),a=E=>{const{scope:m,children:g}=E,f=M.useRef(null),p=M.useRef(new Map).current;return M.createElement(i,{scope:m,itemMap:p,collectionRef:f},g)},o=u+"CollectionSlot",s=M.forwardRef((E,m)=>{const{scope:g,children:f}=E,p=r(o,g),D=co(m,p.collectionRef);return M.createElement(t6,{ref:D},f)}),l=u+"CollectionItemSlot",c="data-radix-collection-item",d=M.forwardRef((E,m)=>{const{scope:g,children:f,...p}=E,D=M.useRef(null),x=co(m,D),b=r(l,g);return M.useEffect(()=>(b.itemMap.set(D,{ref:D,...p}),()=>void b.itemMap.delete(D))),M.createElement(t6,{[c]:"",ref:x},f)});function h(E){const m=r(u+"CollectionConsumer",E);return M.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const p=Array.from(f.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((b,k)=>p.indexOf(b.ref.current)-p.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,n]}const QZt=C.createContext(void 0);function kNe(u){const e=C.useContext(QZt);return u||e||"ltr"}const XZt=u=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:u,fn(t){const{element:n,padding:i}=typeof u=="function"?u(t):u;return n&&e(n)?n.current!=null?fz({element:n.current,padding:i}).fn(t):{}:n?fz({element:n,padding:i}).fn(t):{}}}};var q8=typeof document<"u"?C.useLayoutEffect:C.useEffect;function NT(u,e){if(u===e)return!0;if(typeof u!=typeof e)return!1;if(typeof u=="function"&&u.toString()===e.toString())return!0;let t,n,i;if(u&&e&&typeof u=="object"){if(Array.isArray(u)){if(t=u.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!NT(u[n],e[n]))return!1;return!0}if(i=Object.keys(u),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const r=i[n];if(!(r==="_owner"&&u.$$typeof)&&!NT(u[r],e[r]))return!1}return!0}return u!==u&&e!==e}function FNe(u){return typeof window>"u"?1:(u.ownerDocument.defaultView||window).devicePixelRatio||1}function Y3e(u,e){const t=FNe(u);return Math.round(e*t)/t}function Q3e(u){const e=C.useRef(u);return q8(()=>{e.current=u}),e}function eYt(u){u===void 0&&(u={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:a}={},transform:o=!0,whileElementsMounted:s,open:l}=u,[c,d]=C.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[h,E]=C.useState(n);NT(h,n)||E(n);const[m,g]=C.useState(null),[f,p]=C.useState(null),D=C.useCallback(T=>{T!=A.current&&(A.current=T,g(T))},[g]),x=C.useCallback(T=>{T!==F.current&&(F.current=T,p(T))},[p]),b=r||m,k=a||f,A=C.useRef(null),F=C.useRef(null),S=C.useRef(c),w=Q3e(s),z=Q3e(i),N=C.useCallback(()=>{if(!A.current||!F.current)return;const T={placement:e,strategy:t,middleware:h};z.current&&(T.platform=z.current),e8e(A.current,F.current,T).then(R=>{const I={...R,isPositioned:!0};O.current&&!NT(S.current,I)&&(S.current=I,ns.flushSync(()=>{d(I)}))})},[h,e,t,z]);q8(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const O=C.useRef(!1);q8(()=>(O.current=!0,()=>{O.current=!1}),[]),q8(()=>{if(b&&(A.current=b),k&&(F.current=k),b&&k){if(w.current)return w.current(b,k,N);N()}},[b,k,N,w]);const y=C.useMemo(()=>({reference:A,floating:F,setReference:D,setFloating:x}),[D,x]),_=C.useMemo(()=>({reference:b,floating:k}),[b,k]),L=C.useMemo(()=>{const T={position:t,left:0,top:0};if(!_.floating)return T;const R=Y3e(_.floating,c.x),I=Y3e(_.floating,c.y);return o?{...T,transform:"translate("+R+"px, "+I+"px)",...FNe(_.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:R,top:I}},[t,o,_.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:N,refs:y,elements:_,floatingStyles:L}),[c,N,y,_,L])}function tYt(u){const[e,t]=C.useState(void 0);return e6(()=>{if(u){t({width:u.offsetWidth,height:u.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let a,o;if("borderBoxSize"in r){const s=r.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,o=l.blockSize}else a=u.offsetWidth,o=u.offsetHeight;t({width:a,height:o})});return n.observe(u,{box:"border-box"}),()=>n.unobserve(u)}else t(void 0)},[u]),e}const yNe="Popper",[ANe,tO]=eD(yNe),[uYt,_Ne]=ANe(yNe),nYt=u=>{const{__scopePopper:e,children:t}=u,[n,i]=C.useState(null);return C.createElement(uYt,{scope:e,anchor:n,onAnchorChange:i},t)},iYt="PopperAnchor",rYt=C.forwardRef((u,e)=>{const{__scopePopper:t,virtualRef:n,...i}=u,r=_Ne(iYt,t),a=C.useRef(null),o=co(e,a);return C.useEffect(()=>{r.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:C.createElement($o.div,vt({},i,{ref:o}))}),SNe="PopperContent",[aYt,aqn]=ANe(SNe),oYt=C.forwardRef((u,e)=>{var t,n,i,r,a,o,s,l;const{__scopePopper:c,side:d="bottom",sideOffset:h=0,align:E="center",alignOffset:m=0,arrowPadding:g=0,collisionBoundary:f=[],collisionPadding:p=0,sticky:D="partial",hideWhenDetached:x=!1,avoidCollisions:b=!0,onPlaced:k,...A}=u,F=_Ne(SNe,c),[S,w]=C.useState(null),z=co(e,Be=>w(Be)),[N,O]=C.useState(null),y=tYt(N),_=(t=y==null?void 0:y.width)!==null&&t!==void 0?t:0,L=(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,T=d+(E!=="center"?"-"+E:""),R=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(f)?f:[f],H=I.length>0,V={padding:R,boundary:I.filter(sYt),altBoundary:H},{refs:U,floatingStyles:J,placement:Y,isPositioned:X,middlewareData:re}=eYt({strategy:"fixed",placement:T,whileElementsMounted:XSe,elements:{reference:F.anchor},middleware:[ane({mainAxis:h+L,alignmentAxis:m}),b&&MI({mainAxis:!0,crossAxis:!1,limiter:D==="partial"?KSe():void 0,...V}),b&&rne({...V}),WSe({...V,apply:({elements:Be,rects:je,availableWidth:bt,availableHeight:qt})=>{const{width:ou,height:Vt}=je.reference,oe=Be.floating.style;oe.setProperty("--radix-popper-available-width",`${bt}px`),oe.setProperty("--radix-popper-available-height",`${qt}px`),oe.setProperty("--radix-popper-anchor-width",`${ou}px`),oe.setProperty("--radix-popper-anchor-height",`${Vt}px`)}}),N&&XZt({element:N,padding:g}),lYt({arrowWidth:_,arrowHeight:L}),x&&d_t({strategy:"referenceHidden"})]}),[ge,_e]=BNe(Y),Ve=j1(k);e6(()=>{X&&(Ve==null||Ve())},[X,Ve]);const Ue=(i=re.arrow)===null||i===void 0?void 0:i.x,qe=(r=re.arrow)===null||r===void 0?void 0:r.y,Se=((a=re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[de,he]=C.useState();return e6(()=>{S&&he(window.getComputedStyle(S).zIndex)},[S]),C.createElement("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(o=re.transformOrigin)===null||o===void 0?void 0:o.x,(s=re.transformOrigin)===null||s===void 0?void 0:s.y].join(" ")},dir:u.dir},C.createElement(aYt,{scope:c,placedSide:ge,onArrowChange:O,arrowX:Ue,arrowY:qe,shouldHideArrow:Se},C.createElement($o.div,vt({"data-side":ge,"data-align":_e},A,{ref:z,style:{...A.style,animation:X?void 0:"none",opacity:(l=re.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function sYt(u){return u!==null}const lYt=u=>({name:"transformOrigin",options:u,fn(e){var t,n,i,r,a;const{placement:o,rects:s,middlewareData:l}=e,d=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,h=d?0:u.arrowWidth,E=d?0:u.arrowHeight,[m,g]=BNe(o),f={start:"0%",center:"50%",end:"100%"}[g],p=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,D=((r=(a=l.arrow)===null||a===void 0?void 0:a.y)!==null&&r!==void 0?r:0)+E/2;let x="",b="";return m==="bottom"?(x=d?f:`${p}px`,b=`${-E}px`):m==="top"?(x=d?f:`${p}px`,b=`${s.floating.height+E}px`):m==="right"?(x=`${-E}px`,b=d?f:`${D}px`):m==="left"&&(x=`${s.floating.width+E}px`,b=d?f:`${D}px`),{data:{x,y:b}}}});function BNe(u){const[e,t="center"]=u.split("-");return[e,t]}const wNe=nYt,LNe=rYt,zNe=oYt,p$="rovingFocusGroup.onEntryFocus",cYt={bubbles:!1,cancelable:!0},eie="RovingFocusGroup",[pY,MNe,dYt]=bNe(eie),[hYt,TNe]=eD(eie,[dYt]),[EYt,mYt]=hYt(eie),gYt=C.forwardRef((u,e)=>C.createElement(pY.Provider,{scope:u.__scopeRovingFocusGroup},C.createElement(pY.Slot,{scope:u.__scopeRovingFocusGroup},C.createElement(fYt,vt({},u,{ref:e}))))),fYt=C.forwardRef((u,e)=>{const{__scopeRovingFocusGroup:t,orientation:n,loop:i=!1,dir:r,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:s,onEntryFocus:l,...c}=u,d=C.useRef(null),h=co(e,d),E=kNe(r),[m=null,g]=XI({prop:a,defaultProp:o,onChange:s}),[f,p]=C.useState(!1),D=j1(l),x=MNe(t),b=C.useRef(!1),[k,A]=C.useState(0);return C.useEffect(()=>{const F=d.current;if(F)return F.addEventListener(p$,D),()=>F.removeEventListener(p$,D)},[D]),C.createElement(EYt,{scope:t,orientation:n,dir:E,loop:i,currentTabStopId:m,onItemFocus:C.useCallback(F=>g(F),[g]),onItemShiftTab:C.useCallback(()=>p(!0),[]),onFocusableItemAdd:C.useCallback(()=>A(F=>F+1),[]),onFocusableItemRemove:C.useCallback(()=>A(F=>F-1),[])},C.createElement($o.div,vt({tabIndex:f||k===0?-1:0,"data-orientation":n},c,{ref:h,style:{outline:"none",...u.style},onMouseDown:Gu(u.onMouseDown,()=>{b.current=!0}),onFocus:Gu(u.onFocus,F=>{const S=!b.current;if(F.target===F.currentTarget&&S&&!f){const w=new CustomEvent(p$,cYt);if(F.currentTarget.dispatchEvent(w),!w.defaultPrevented){const z=x().filter(L=>L.focusable),N=z.find(L=>L.active),O=z.find(L=>L.id===m),_=[N,O,...z].filter(Boolean).map(L=>L.ref.current);NNe(_)}}b.current=!1}),onBlur:Gu(u.onBlur,()=>p(!1))})))}),pYt="RovingFocusGroupItem",DYt=C.forwardRef((u,e)=>{const{__scopeRovingFocusGroup:t,focusable:n=!0,active:i=!1,tabStopId:r,...a}=u,o=C3(),s=r||o,l=mYt(pYt,t),c=l.currentTabStopId===s,d=MNe(t),{onFocusableItemAdd:h,onFocusableItemRemove:E}=l;return C.useEffect(()=>{if(n)return h(),()=>E()},[n,h,E]),C.createElement(pY.ItemSlot,{scope:t,id:s,focusable:n,active:i},C.createElement($o.span,vt({tabIndex:c?0:-1,"data-orientation":l.orientation},a,{ref:e,onMouseDown:Gu(u.onMouseDown,m=>{n?l.onItemFocus(s):m.preventDefault()}),onFocus:Gu(u.onFocus,()=>l.onItemFocus(s)),onKeyDown:Gu(u.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=CYt(m,l.orientation,l.dir);if(g!==void 0){m.preventDefault();let p=d().filter(D=>D.focusable).map(D=>D.ref.current);if(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const D=p.indexOf(m.currentTarget);p=l.loop?bYt(p,D+1):p.slice(D+1)}setTimeout(()=>NNe(p))}})})))}),xYt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vYt(u,e){return e!=="rtl"?u:u==="ArrowLeft"?"ArrowRight":u==="ArrowRight"?"ArrowLeft":u}function CYt(u,e,t){const n=vYt(u.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return xYt[n]}function NNe(u){const e=document.activeElement;for(const t of u)if(t===e||(t.focus(),document.activeElement!==e))return}function bYt(u,e){return u.map((t,n)=>u[(e+n)%u.length])}const kYt=gYt,FYt=DYt,yYt=["Enter"," "],AYt=["ArrowDown","PageUp","Home"],PNe=["ArrowUp","PageDown","End"],_Yt=[...AYt,...PNe],uO="Menu",[DY,SYt,BYt]=bNe(uO),[tD,RNe]=eD(uO,[BYt,tO,TNe]),tie=tO(),INe=TNe(),[wYt,E7]=tD(uO),[LYt,uie]=tD(uO),zYt=u=>{const{__scopeMenu:e,open:t=!1,children:n,dir:i,onOpenChange:r,modal:a=!0}=u,o=tie(e),[s,l]=C.useState(null),c=C.useRef(!1),d=j1(r),h=kNe(i);return C.useEffect(()=>{const E=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),C.createElement(wNe,o,C.createElement(wYt,{scope:e,open:t,onOpenChange:d,content:s,onContentChange:l},C.createElement(LYt,{scope:e,onClose:C.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a},n)))},MYt=C.forwardRef((u,e)=>{const{__scopeMenu:t,...n}=u,i=tie(t);return C.createElement(LNe,vt({},i,n,{ref:e}))}),ONe="MenuPortal",[TYt,NYt]=tD(ONe,{forceMount:void 0}),PYt=u=>{const{__scopeMenu:e,forceMount:t,children:n,container:i}=u,r=E7(ONe,e);return C.createElement(TYt,{scope:e,forceMount:t},C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},n)))},Sm="MenuContent",[RYt,jNe]=tD(Sm),IYt=C.forwardRef((u,e)=>{const t=NYt(Sm,u.__scopeMenu),{forceMount:n=t.forceMount,...i}=u,r=E7(Sm,u.__scopeMenu),a=uie(Sm,u.__scopeMenu);return C.createElement(DY.Provider,{scope:u.__scopeMenu},C.createElement(Lg,{present:n||r.open},C.createElement(DY.Slot,{scope:u.__scopeMenu},a.modal?C.createElement(OYt,vt({},i,{ref:e})):C.createElement(jYt,vt({},i,{ref:e})))))}),OYt=C.forwardRef((u,e)=>{const t=E7(Sm,u.__scopeMenu),n=C.useRef(null),i=co(e,n);return C.useEffect(()=>{const r=n.current;if(r)return HSe(r)},[]),C.createElement(HNe,vt({},u,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:Gu(u.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),jYt=C.forwardRef((u,e)=>{const t=E7(Sm,u.__scopeMenu);return C.createElement(HNe,vt({},u,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),HNe=C.forwardRef((u,e)=>{const{__scopeMenu:t,loop:n=!1,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:E,disableOutsideScroll:m,...g}=u,f=E7(Sm,t),p=uie(Sm,t),D=tie(t),x=INe(t),b=SYt(t),[k,A]=C.useState(null),F=C.useRef(null),S=co(e,F,f.onContentChange),w=C.useRef(0),z=C.useRef(""),N=C.useRef(0),O=C.useRef(null),y=C.useRef("right"),_=C.useRef(0),L=m?gNe:C.Fragment,T=m?{as:t6,allowPinchZoom:!0}:void 0,R=H=>{var V,U;const J=z.current+H,Y=b().filter(Ue=>!Ue.disabled),X=document.activeElement,re=(V=Y.find(Ue=>Ue.ref.current===X))===null||V===void 0?void 0:V.textValue,ge=Y.map(Ue=>Ue.textValue),_e=JYt(ge,J,re),Ve=(U=Y.find(Ue=>Ue.textValue===_e))===null||U===void 0?void 0:U.ref.current;(function Ue(qe){z.current=qe,window.clearTimeout(w.current),qe!==""&&(w.current=window.setTimeout(()=>Ue(""),1e3))})(J),Ve&&setTimeout(()=>Ve.focus())};C.useEffect(()=>()=>window.clearTimeout(w.current),[]),lNe();const I=C.useCallback(H=>{var V,U;return y.current===((V=O.current)===null||V===void 0?void 0:V.side)&&YYt(H,(U=O.current)===null||U===void 0?void 0:U.area)},[]);return C.createElement(RYt,{scope:t,searchRef:z,onItemEnter:C.useCallback(H=>{I(H)&&H.preventDefault()},[I]),onItemLeave:C.useCallback(H=>{var V;I(H)||((V=F.current)===null||V===void 0||V.focus(),A(null))},[I]),onTriggerLeave:C.useCallback(H=>{I(H)&&H.preventDefault()},[I]),pointerGraceTimerRef:N,onPointerGraceIntentChange:C.useCallback(H=>{O.current=H},[])},C.createElement(L,T,C.createElement(oNe,{asChild:!0,trapped:i,onMountAutoFocus:Gu(r,H=>{var V;H.preventDefault(),(V=F.current)===null||V===void 0||V.focus()}),onUnmountAutoFocus:a},C.createElement(Yne,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:E},C.createElement(kYt,vt({asChild:!0},x,{dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:A,onEntryFocus:Gu(s,H=>{p.isUsingKeyboardRef.current||H.preventDefault()})}),C.createElement(zNe,vt({role:"menu","aria-orientation":"vertical","data-state":GYt(f.open),"data-radix-menu-content":"",dir:p.dir},D,g,{ref:S,style:{outline:"none",...g.style},onKeyDown:Gu(g.onKeyDown,H=>{const U=H.target.closest("[data-radix-menu-content]")===H.currentTarget,J=H.ctrlKey||H.altKey||H.metaKey,Y=H.key.length===1;U&&(H.key==="Tab"&&H.preventDefault(),!J&&Y&&R(H.key));const X=F.current;if(H.target!==X||!_Yt.includes(H.key))return;H.preventDefault();const ge=b().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);PNe.includes(H.key)&&ge.reverse(),UYt(ge)}),onBlur:Gu(u.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(w.current),z.current="")}),onPointerMove:Gu(u.onPointerMove,vY(H=>{const V=H.target,U=_.current!==H.clientX;if(H.currentTarget.contains(V)&&U){const J=H.clientX>_.current?"right":"left";y.current=J,_.current=H.clientX}}))})))))))}),xY="MenuItem",X3e="menu.itemSelect",HYt=C.forwardRef((u,e)=>{const{disabled:t=!1,onSelect:n,...i}=u,r=C.useRef(null),a=uie(xY,u.__scopeMenu),o=jNe(xY,u.__scopeMenu),s=co(e,r),l=C.useRef(!1),c=()=>{const d=r.current;if(!t&&d){const h=new CustomEvent(X3e,{bubbles:!0,cancelable:!0});d.addEventListener(X3e,E=>n==null?void 0:n(E),{once:!0}),rNe(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return C.createElement(VYt,vt({},i,{ref:s,disabled:t,onClick:Gu(u.onClick,c),onPointerDown:d=>{var h;(h=u.onPointerDown)===null||h===void 0||h.call(u,d),l.current=!0},onPointerUp:Gu(u.onPointerUp,d=>{var h;l.current||(h=d.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Gu(u.onKeyDown,d=>{const h=o.searchRef.current!=="";t||h&&d.key===" "||yYt.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),VYt=C.forwardRef((u,e)=>{const{__scopeMenu:t,disabled:n=!1,textValue:i,...r}=u,a=jNe(xY,t),o=INe(t),s=C.useRef(null),l=co(e,s),[c,d]=C.useState(!1),[h,E]=C.useState("");return C.useEffect(()=>{const m=s.current;if(m){var g;E(((g=m.textContent)!==null&&g!==void 0?g:"").trim())}},[r.children]),C.createElement(DY.ItemSlot,{scope:t,disabled:n,textValue:i??h},C.createElement(FYt,vt({asChild:!0},o,{focusable:!n}),C.createElement($o.div,vt({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},r,{ref:l,onPointerMove:Gu(u.onPointerMove,vY(m=>{n?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus())})),onPointerLeave:Gu(u.onPointerLeave,vY(m=>a.onItemLeave(m))),onFocus:Gu(u.onFocus,()=>d(!0)),onBlur:Gu(u.onBlur,()=>d(!1))}))))}),$Yt="MenuRadioGroup";tD($Yt,{value:void 0,onValueChange:()=>{}});const KYt="MenuItemIndicator";tD(KYt,{checked:!1});const WYt="MenuSub";tD(WYt);function GYt(u){return u?"open":"closed"}function UYt(u){const e=document.activeElement;for(const t of u)if(t===e||(t.focus(),document.activeElement!==e))return}function qYt(u,e){return u.map((t,n)=>u[(e+n)%u.length])}function JYt(u,e,t){const i=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,r=t?u.indexOf(t):-1;let a=qYt(u,Math.max(r,0));i.length===1&&(a=a.filter(l=>l!==t));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==t?s:void 0}function ZYt(u,e){const{x:t,y:n}=u;let i=!1;for(let r=0,a=e.length-1;rn!=c>n&&t<(l-o)*(n-s)/(c-s)+o&&(i=!i)}return i}function YYt(u,e){if(!e)return!1;const t={x:u.clientX,y:u.clientY};return ZYt(t,e)}function vY(u){return e=>e.pointerType==="mouse"?u(e):void 0}const QYt=zYt,XYt=MYt,eQt=PYt,tQt=IYt,uQt=HYt,VNe="DropdownMenu",[nQt,oqn]=eD(VNe,[RNe]),m7=RNe(),[iQt,$Ne]=nQt(VNe),rQt=u=>{const{__scopeDropdownMenu:e,children:t,dir:n,open:i,defaultOpen:r,onOpenChange:a,modal:o=!0}=u,s=m7(e),l=C.useRef(null),[c=!1,d]=XI({prop:i,defaultProp:r,onChange:a});return C.createElement(iQt,{scope:e,triggerId:C3(),triggerRef:l,contentId:C3(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(h=>!h),[d]),modal:o},C.createElement(QYt,vt({},s,{open:c,onOpenChange:d,dir:n,modal:o}),t))},aQt="DropdownMenuTrigger",oQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,disabled:n=!1,...i}=u,r=$Ne(aQt,t),a=m7(t);return C.createElement(XYt,vt({asChild:!0},a),C.createElement($o.button,vt({type:"button",id:r.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":r.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},i,{ref:Zne(e,r.triggerRef),onPointerDown:Gu(u.onPointerDown,o=>{!n&&o.button===0&&o.ctrlKey===!1&&(r.onOpenToggle(),r.open||o.preventDefault())}),onKeyDown:Gu(u.onKeyDown,o=>{n||(["Enter"," "].includes(o.key)&&r.onOpenToggle(),o.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})))}),sQt=u=>{const{__scopeDropdownMenu:e,...t}=u,n=m7(e);return C.createElement(eQt,vt({},n,t))},lQt="DropdownMenuContent",cQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,...n}=u,i=$Ne(lQt,t),r=m7(t),a=C.useRef(!1);return C.createElement(tQt,vt({id:i.contentId,"aria-labelledby":i.triggerId},r,n,{ref:e,onCloseAutoFocus:Gu(u.onCloseAutoFocus,o=>{var s;a.current||(s=i.triggerRef.current)===null||s===void 0||s.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:Gu(u.onInteractOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...u.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),dQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,...n}=u,i=m7(t);return C.createElement(uQt,vt({},i,n,{ref:e}))}),hQt=rQt,EQt=oQt,mQt=sQt,gQt=cQt,fQt=dQt;var Hn={};const pQt="Á",DQt="á",xQt="Ă",vQt="ă",CQt="∾",bQt="∿",kQt="∾̳",FQt="Â",yQt="â",AQt="´",_Qt="А",SQt="а",BQt="Æ",wQt="æ",LQt="⁡",zQt="𝔄",MQt="𝔞",TQt="À",NQt="à",PQt="ℵ",RQt="ℵ",IQt="Α",OQt="α",jQt="Ā",HQt="ā",VQt="⨿",$Qt="&",KQt="&",WQt="⩕",GQt="⩓",UQt="∧",qQt="⩜",JQt="⩘",ZQt="⩚",YQt="∠",QQt="⦤",XQt="∠",eXt="⦨",tXt="⦩",uXt="⦪",nXt="⦫",iXt="⦬",rXt="⦭",aXt="⦮",oXt="⦯",sXt="∡",lXt="∟",cXt="⊾",dXt="⦝",hXt="∢",EXt="Å",mXt="⍼",gXt="Ą",fXt="ą",pXt="𝔸",DXt="𝕒",xXt="⩯",vXt="≈",CXt="⩰",bXt="≊",kXt="≋",FXt="'",yXt="⁡",AXt="≈",_Xt="≊",SXt="Å",BXt="å",wXt="𝒜",LXt="𝒶",zXt="≔",MXt="*",TXt="≈",NXt="≍",PXt="Ã",RXt="ã",IXt="Ä",OXt="ä",jXt="∳",HXt="⨑",VXt="≌",$Xt="϶",KXt="‵",WXt="∽",GXt="⋍",UXt="∖",qXt="⫧",JXt="⊽",ZXt="⌅",YXt="⌆",QXt="⌅",XXt="⎵",eeu="⎶",teu="≌",ueu="Б",neu="б",ieu="„",reu="∵",aeu="∵",oeu="∵",seu="⦰",leu="϶",ceu="ℬ",deu="ℬ",heu="Β",Eeu="β",meu="ℶ",geu="≬",feu="𝔅",peu="𝔟",Deu="⋂",xeu="◯",veu="⋃",Ceu="⨀",beu="⨁",keu="⨂",Feu="⨆",yeu="★",Aeu="▽",_eu="△",Seu="⨄",Beu="⋁",weu="⋀",Leu="⤍",zeu="⧫",Meu="▪",Teu="▴",Neu="▾",Peu="◂",Reu="▸",Ieu="␣",Oeu="▒",jeu="░",Heu="▓",Veu="█",$eu="=⃥",Keu="≡⃥",Weu="⫭",Geu="⌐",Ueu="𝔹",qeu="𝕓",Jeu="⊥",Zeu="⊥",Yeu="⋈",Qeu="⧉",Xeu="┐",etu="╕",ttu="╖",utu="╗",ntu="┌",itu="╒",rtu="╓",atu="╔",otu="─",stu="═",ltu="┬",ctu="╤",dtu="╥",htu="╦",Etu="┴",mtu="╧",gtu="╨",ftu="╩",ptu="⊟",Dtu="⊞",xtu="⊠",vtu="┘",Ctu="╛",btu="╜",ktu="╝",Ftu="└",ytu="╘",Atu="╙",_tu="╚",Stu="│",Btu="║",wtu="┼",Ltu="╪",ztu="╫",Mtu="╬",Ttu="┤",Ntu="╡",Ptu="╢",Rtu="╣",Itu="├",Otu="╞",jtu="╟",Htu="╠",Vtu="‵",$tu="˘",Ktu="˘",Wtu="¦",Gtu="𝒷",Utu="ℬ",qtu="⁏",Jtu="∽",Ztu="⋍",Ytu="⧅",Qtu="\\",Xtu="⟈",euu="•",tuu="•",uuu="≎",nuu="⪮",iuu="≏",ruu="≎",auu="≏",ouu="Ć",suu="ć",luu="⩄",cuu="⩉",duu="⩋",huu="∩",Euu="⋒",muu="⩇",guu="⩀",fuu="ⅅ",puu="∩︀",Duu="⁁",xuu="ˇ",vuu="ℭ",Cuu="⩍",buu="Č",kuu="č",Fuu="Ç",yuu="ç",Auu="Ĉ",_uu="ĉ",Suu="∰",Buu="⩌",wuu="⩐",Luu="Ċ",zuu="ċ",Muu="¸",Tuu="¸",Nuu="⦲",Puu="¢",Ruu="·",Iuu="·",Ouu="𝔠",juu="ℭ",Huu="Ч",Vuu="ч",$uu="✓",Kuu="✓",Wuu="Χ",Guu="χ",Uuu="ˆ",quu="≗",Juu="↺",Zuu="↻",Yuu="⊛",Quu="⊚",Xuu="⊝",enu="⊙",tnu="®",unu="Ⓢ",nnu="⊖",inu="⊕",rnu="⊗",anu="○",onu="⧃",snu="≗",lnu="⨐",cnu="⫯",dnu="⧂",hnu="∲",Enu="”",mnu="’",gnu="♣",fnu="♣",pnu=":",Dnu="∷",xnu="⩴",vnu="≔",Cnu="≔",bnu=",",knu="@",Fnu="∁",ynu="∘",Anu="∁",_nu="ℂ",Snu="≅",Bnu="⩭",wnu="≡",Lnu="∮",znu="∯",Mnu="∮",Tnu="𝕔",Nnu="ℂ",Pnu="∐",Rnu="∐",Inu="©",Onu="©",jnu="℗",Hnu="∳",Vnu="↵",$nu="✗",Knu="⨯",Wnu="𝒞",Gnu="𝒸",Unu="⫏",qnu="⫑",Jnu="⫐",Znu="⫒",Ynu="⋯",Qnu="⤸",Xnu="⤵",eiu="⋞",tiu="⋟",uiu="↶",niu="⤽",iiu="⩈",riu="⩆",aiu="≍",oiu="∪",siu="⋓",liu="⩊",ciu="⊍",diu="⩅",hiu="∪︀",Eiu="↷",miu="⤼",giu="⋞",fiu="⋟",piu="⋎",Diu="⋏",xiu="¤",viu="↶",Ciu="↷",biu="⋎",kiu="⋏",Fiu="∲",yiu="∱",Aiu="⌭",_iu="†",Siu="‡",Biu="ℸ",wiu="↓",Liu="↡",ziu="⇓",Miu="‐",Tiu="⫤",Niu="⊣",Piu="⤏",Riu="˝",Iiu="Ď",Oiu="ď",jiu="Д",Hiu="д",Viu="‡",$iu="⇊",Kiu="ⅅ",Wiu="ⅆ",Giu="⤑",Uiu="⩷",qiu="°",Jiu="∇",Ziu="Δ",Yiu="δ",Qiu="⦱",Xiu="⥿",eru="𝔇",tru="𝔡",uru="⥥",nru="⇃",iru="⇂",rru="´",aru="˙",oru="˝",sru="`",lru="˜",cru="⋄",dru="⋄",hru="⋄",Eru="♦",mru="♦",gru="¨",fru="ⅆ",pru="ϝ",Dru="⋲",xru="÷",vru="÷",Cru="⋇",bru="⋇",kru="Ђ",Fru="ђ",yru="⌞",Aru="⌍",_ru="$",Sru="𝔻",Bru="𝕕",wru="¨",Lru="˙",zru="⃜",Mru="≐",Tru="≑",Nru="≐",Pru="∸",Rru="∔",Iru="⊡",Oru="⌆",jru="∯",Hru="¨",Vru="⇓",$ru="⇐",Kru="⇔",Wru="⫤",Gru="⟸",Uru="⟺",qru="⟹",Jru="⇒",Zru="⊨",Yru="⇑",Qru="⇕",Xru="∥",eau="⤓",tau="↓",uau="↓",nau="⇓",iau="⇵",rau="̑",aau="⇊",oau="⇃",sau="⇂",lau="⥐",cau="⥞",dau="⥖",hau="↽",Eau="⥟",mau="⥗",gau="⇁",fau="↧",pau="⊤",Dau="⤐",xau="⌟",vau="⌌",Cau="𝒟",bau="𝒹",kau="Ѕ",Fau="ѕ",yau="⧶",Aau="Đ",_au="đ",Sau="⋱",Bau="▿",wau="▾",Lau="⇵",zau="⥯",Mau="⦦",Tau="Џ",Nau="џ",Pau="⟿",Rau="É",Iau="é",Oau="⩮",jau="Ě",Hau="ě",Vau="Ê",$au="ê",Kau="≖",Wau="≕",Gau="Э",Uau="э",qau="⩷",Jau="Ė",Zau="ė",Yau="≑",Qau="ⅇ",Xau="≒",eou="𝔈",tou="𝔢",uou="⪚",nou="È",iou="è",rou="⪖",aou="⪘",oou="⪙",sou="∈",lou="⏧",cou="ℓ",dou="⪕",hou="⪗",Eou="Ē",mou="ē",gou="∅",fou="∅",pou="◻",Dou="∅",xou="▫",vou=" ",Cou=" ",bou=" ",kou="Ŋ",Fou="ŋ",you=" ",Aou="Ę",_ou="ę",Sou="𝔼",Bou="𝕖",wou="⋕",Lou="⧣",zou="⩱",Mou="ε",Tou="Ε",Nou="ε",Pou="ϵ",Rou="≖",Iou="≕",Oou="≂",jou="⪖",Hou="⪕",Vou="⩵",$ou="=",Kou="≂",Wou="≟",Gou="⇌",Uou="≡",qou="⩸",Jou="⧥",Zou="⥱",You="≓",Qou="ℯ",Xou="ℰ",esu="≐",tsu="⩳",usu="≂",nsu="Η",isu="η",rsu="Ð",asu="ð",osu="Ë",ssu="ë",lsu="€",csu="!",dsu="∃",hsu="∃",Esu="ℰ",msu="ⅇ",gsu="ⅇ",fsu="≒",psu="Ф",Dsu="ф",xsu="♀",vsu="ffi",Csu="ff",bsu="ffl",ksu="𝔉",Fsu="𝔣",ysu="fi",Asu="◼",_su="▪",Ssu="fj",Bsu="♭",wsu="fl",Lsu="▱",zsu="ƒ",Msu="𝔽",Tsu="𝕗",Nsu="∀",Psu="∀",Rsu="⋔",Isu="⫙",Osu="ℱ",jsu="⨍",Hsu="½",Vsu="⅓",$su="¼",Ksu="⅕",Wsu="⅙",Gsu="⅛",Usu="⅔",qsu="⅖",Jsu="¾",Zsu="⅗",Ysu="⅜",Qsu="⅘",Xsu="⅚",e0u="⅝",t0u="⅞",u0u="⁄",n0u="⌢",i0u="𝒻",r0u="ℱ",a0u="ǵ",o0u="Γ",s0u="γ",l0u="Ϝ",c0u="ϝ",d0u="⪆",h0u="Ğ",E0u="ğ",m0u="Ģ",g0u="Ĝ",f0u="ĝ",p0u="Г",D0u="г",x0u="Ġ",v0u="ġ",C0u="≥",b0u="≧",k0u="⪌",F0u="⋛",y0u="≥",A0u="≧",_0u="⩾",S0u="⪩",B0u="⩾",w0u="⪀",L0u="⪂",z0u="⪄",M0u="⋛︀",T0u="⪔",N0u="𝔊",P0u="𝔤",R0u="≫",I0u="⋙",O0u="⋙",j0u="ℷ",H0u="Ѓ",V0u="ѓ",$0u="⪥",K0u="≷",W0u="⪒",G0u="⪤",U0u="⪊",q0u="⪊",J0u="⪈",Z0u="≩",Y0u="⪈",Q0u="≩",X0u="⋧",elu="𝔾",tlu="𝕘",ulu="`",nlu="≥",ilu="⋛",rlu="≧",alu="⪢",olu="≷",slu="⩾",llu="≳",clu="𝒢",dlu="ℊ",hlu="≳",Elu="⪎",mlu="⪐",glu="⪧",flu="⩺",plu=">",Dlu=">",xlu="≫",vlu="⋗",Clu="⦕",blu="⩼",klu="⪆",Flu="⥸",ylu="⋗",Alu="⋛",_lu="⪌",Slu="≷",Blu="≳",wlu="≩︀",Llu="≩︀",zlu="ˇ",Mlu=" ",Tlu="½",Nlu="ℋ",Plu="Ъ",Rlu="ъ",Ilu="⥈",Olu="↔",jlu="⇔",Hlu="↭",Vlu="^",$lu="ℏ",Klu="Ĥ",Wlu="ĥ",Glu="♥",Ulu="♥",qlu="…",Jlu="⊹",Zlu="𝔥",Ylu="ℌ",Qlu="ℋ",Xlu="⤥",ecu="⤦",tcu="⇿",ucu="∻",ncu="↩",icu="↪",rcu="𝕙",acu="ℍ",ocu="―",scu="─",lcu="𝒽",ccu="ℋ",dcu="ℏ",hcu="Ħ",Ecu="ħ",mcu="≎",gcu="≏",fcu="⁃",pcu="‐",Dcu="Í",xcu="í",vcu="⁣",Ccu="Î",bcu="î",kcu="И",Fcu="и",ycu="İ",Acu="Е",_cu="е",Scu="¡",Bcu="⇔",wcu="𝔦",Lcu="ℑ",zcu="Ì",Mcu="ì",Tcu="ⅈ",Ncu="⨌",Pcu="∭",Rcu="⧜",Icu="℩",Ocu="IJ",jcu="ij",Hcu="Ī",Vcu="ī",$cu="ℑ",Kcu="ⅈ",Wcu="ℐ",Gcu="ℑ",Ucu="ı",qcu="ℑ",Jcu="⊷",Zcu="Ƶ",Ycu="⇒",Qcu="℅",Xcu="∞",edu="⧝",tdu="ı",udu="⊺",ndu="∫",idu="∬",rdu="ℤ",adu="∫",odu="⊺",sdu="⋂",ldu="⨗",cdu="⨼",ddu="⁣",hdu="⁢",Edu="Ё",mdu="ё",gdu="Į",fdu="į",pdu="𝕀",Ddu="𝕚",xdu="Ι",vdu="ι",Cdu="⨼",bdu="¿",kdu="𝒾",Fdu="ℐ",ydu="∈",Adu="⋵",_du="⋹",Sdu="⋴",Bdu="⋳",wdu="∈",Ldu="⁢",zdu="Ĩ",Mdu="ĩ",Tdu="І",Ndu="і",Pdu="Ï",Rdu="ï",Idu="Ĵ",Odu="ĵ",jdu="Й",Hdu="й",Vdu="𝔍",$du="𝔧",Kdu="ȷ",Wdu="𝕁",Gdu="𝕛",Udu="𝒥",qdu="𝒿",Jdu="Ј",Zdu="ј",Ydu="Є",Qdu="є",Xdu="Κ",e1u="κ",t1u="ϰ",u1u="Ķ",n1u="ķ",i1u="К",r1u="к",a1u="𝔎",o1u="𝔨",s1u="ĸ",l1u="Х",c1u="х",d1u="Ќ",h1u="ќ",E1u="𝕂",m1u="𝕜",g1u="𝒦",f1u="𝓀",p1u="⇚",D1u="Ĺ",x1u="ĺ",v1u="⦴",C1u="ℒ",b1u="Λ",k1u="λ",F1u="⟨",y1u="⟪",A1u="⦑",_1u="⟨",S1u="⪅",B1u="ℒ",w1u="«",L1u="⇤",z1u="⤟",M1u="←",T1u="↞",N1u="⇐",P1u="⤝",R1u="↩",I1u="↫",O1u="⤹",j1u="⥳",H1u="↢",V1u="⤙",$1u="⤛",K1u="⪫",W1u="⪭",G1u="⪭︀",U1u="⤌",q1u="⤎",J1u="❲",Z1u="{",Y1u="[",Q1u="⦋",X1u="⦏",ehu="⦍",thu="Ľ",uhu="ľ",nhu="Ļ",ihu="ļ",rhu="⌈",ahu="{",ohu="Л",shu="л",lhu="⤶",chu="“",dhu="„",hhu="⥧",Ehu="⥋",mhu="↲",ghu="≤",fhu="≦",phu="⟨",Dhu="⇤",xhu="←",vhu="←",Chu="⇐",bhu="⇆",khu="↢",Fhu="⌈",yhu="⟦",Ahu="⥡",_hu="⥙",Shu="⇃",Bhu="⌊",whu="↽",Lhu="↼",zhu="⇇",Mhu="↔",Thu="↔",Nhu="⇔",Phu="⇆",Rhu="⇋",Ihu="↭",Ohu="⥎",jhu="↤",Hhu="⊣",Vhu="⥚",$hu="⋋",Khu="⧏",Whu="⊲",Ghu="⊴",Uhu="⥑",qhu="⥠",Jhu="⥘",Zhu="↿",Yhu="⥒",Qhu="↼",Xhu="⪋",e4u="⋚",t4u="≤",u4u="≦",n4u="⩽",i4u="⪨",r4u="⩽",a4u="⩿",o4u="⪁",s4u="⪃",l4u="⋚︀",c4u="⪓",d4u="⪅",h4u="⋖",E4u="⋚",m4u="⪋",g4u="⋚",f4u="≦",p4u="≶",D4u="≶",x4u="⪡",v4u="≲",C4u="⩽",b4u="≲",k4u="⥼",F4u="⌊",y4u="𝔏",A4u="𝔩",_4u="≶",S4u="⪑",B4u="⥢",w4u="↽",L4u="↼",z4u="⥪",M4u="▄",T4u="Љ",N4u="љ",P4u="⇇",R4u="≪",I4u="⋘",O4u="⌞",j4u="⇚",H4u="⥫",V4u="◺",$4u="Ŀ",K4u="ŀ",W4u="⎰",G4u="⎰",U4u="⪉",q4u="⪉",J4u="⪇",Z4u="≨",Y4u="⪇",Q4u="≨",X4u="⋦",eEu="⟬",tEu="⇽",uEu="⟦",nEu="⟵",iEu="⟵",rEu="⟸",aEu="⟷",oEu="⟷",sEu="⟺",lEu="⟼",cEu="⟶",dEu="⟶",hEu="⟹",EEu="↫",mEu="↬",gEu="⦅",fEu="𝕃",pEu="𝕝",DEu="⨭",xEu="⨴",vEu="∗",CEu="_",bEu="↙",kEu="↘",FEu="◊",yEu="◊",AEu="⧫",_Eu="(",SEu="⦓",BEu="⇆",wEu="⌟",LEu="⇋",zEu="⥭",MEu="‎",TEu="⊿",NEu="‹",PEu="𝓁",REu="ℒ",IEu="↰",OEu="↰",jEu="≲",HEu="⪍",VEu="⪏",$Eu="[",KEu="‘",WEu="‚",GEu="Ł",UEu="ł",qEu="⪦",JEu="⩹",ZEu="<",YEu="<",QEu="≪",XEu="⋖",emu="⋋",tmu="⋉",umu="⥶",nmu="⩻",imu="◃",rmu="⊴",amu="◂",omu="⦖",smu="⥊",lmu="⥦",cmu="≨︀",dmu="≨︀",hmu="¯",Emu="♂",mmu="✠",gmu="✠",fmu="↦",pmu="↦",Dmu="↧",xmu="↤",vmu="↥",Cmu="▮",bmu="⨩",kmu="М",Fmu="м",ymu="—",Amu="∺",_mu="∡",Smu=" ",Bmu="ℳ",wmu="𝔐",Lmu="𝔪",zmu="℧",Mmu="µ",Tmu="*",Nmu="⫰",Pmu="∣",Rmu="·",Imu="⊟",Omu="−",jmu="∸",Hmu="⨪",Vmu="∓",$mu="⫛",Kmu="…",Wmu="∓",Gmu="⊧",Umu="𝕄",qmu="𝕞",Jmu="∓",Zmu="𝓂",Ymu="ℳ",Qmu="∾",Xmu="Μ",egu="μ",tgu="⊸",ugu="⊸",ngu="∇",igu="Ń",rgu="ń",agu="∠⃒",ogu="≉",sgu="⩰̸",lgu="≋̸",cgu="ʼn",dgu="≉",hgu="♮",Egu="ℕ",mgu="♮",ggu=" ",fgu="≎̸",pgu="≏̸",Dgu="⩃",xgu="Ň",vgu="ň",Cgu="Ņ",bgu="ņ",kgu="≇",Fgu="⩭̸",ygu="⩂",Agu="Н",_gu="н",Sgu="–",Bgu="⤤",wgu="↗",Lgu="⇗",zgu="↗",Mgu="≠",Tgu="≐̸",Ngu="​",Pgu="​",Rgu="​",Igu="​",Ogu="≢",jgu="⤨",Hgu="≂̸",Vgu="≫",$gu="≪",Kgu=` +`)},kZt=0,OD=[];function FZt(u){var e=C.useRef([]),t=C.useRef([0,0]),n=C.useRef(),i=C.useState(kZt++)[0],r=C.useState(function(){return Nue()})[0],a=C.useRef(u);C.useEffect(function(){a.current=u},[u]),C.useEffect(function(){if(u.inert){document.body.classList.add("block-interactivity-".concat(i));var g=Bl([u.lockRef.current],(u.shards||[]).map(Z3e),!0).filter(Boolean);return g.forEach(function(f){return f.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(i))})}}},[u.inert,u.lockRef.current,u.shards]);var o=C.useCallback(function(g,f){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var p=cS(g),D=t.current,x="deltaX"in g?g.deltaX:D[0]-p[0],b="deltaY"in g?g.deltaY:D[1]-p[1],k,A=g.target,F=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in g&&F==="h"&&A.type==="range")return!1;var S=q3e(F,A);if(!S)return!0;if(S?k=F:(k=F==="v"?"h":"v",S=q3e(F,A)),!S)return!1;if(!n.current&&"changedTouches"in g&&(x||b)&&(n.current=k),!k)return!0;var w=n.current||k;return vZt(w,f,g,w==="h"?x:b,!0)},[]),s=C.useCallback(function(g){var f=g;if(!(!OD.length||OD[OD.length-1]!==r)){var p="deltaY"in f?J3e(f):cS(f),D=e.current.filter(function(k){return k.name===f.type&&k.target===f.target&&CZt(k.delta,p)})[0];if(D&&D.should){f.cancelable&&f.preventDefault();return}if(!D){var x=(a.current.shards||[]).map(Z3e).filter(Boolean).filter(function(k){return k.contains(f.target)}),b=x.length>0?o(f,x[0]):!a.current.noIsolation;b&&f.cancelable&&f.preventDefault()}}},[]),l=C.useCallback(function(g,f,p,D){var x={name:g,delta:f,target:p,should:D};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=C.useCallback(function(g){t.current=cS(g),n.current=void 0},[]),d=C.useCallback(function(g){l(g.type,J3e(g),g.target,o(g,u.lockRef.current))},[]),h=C.useCallback(function(g){l(g.type,cS(g),g.target,o(g,u.lockRef.current))},[]);C.useEffect(function(){return OD.push(r),u.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",s,ID),document.addEventListener("touchmove",s,ID),document.addEventListener("touchstart",c,ID),function(){OD=OD.filter(function(g){return g!==r}),document.removeEventListener("wheel",s,ID),document.removeEventListener("touchmove",s,ID),document.removeEventListener("touchstart",c,ID)}},[]);var E=u.removeScrollBar,m=u.inert;return C.createElement(C.Fragment,null,m?C.createElement(r,{styles:bZt(i)}):null,E?C.createElement(k9e,{gapMode:"margin"}):null)}const yZt=C9e(cNe,FZt);var mNe=C.forwardRef(function(u,e){return C.createElement(eO,Ke({},u,{ref:e,sideCar:yZt}))});mNe.classNames=eO.classNames;const gNe=mNe,fNe="Dialog",[pNe,rqn]=eD(fNe),[AZt,xd]=pNe(fNe),_Zt=u=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:r,modal:a=!0}=u,o=C.useRef(null),s=C.useRef(null),[l=!1,c]=XI({prop:n,defaultProp:i,onChange:r});return C.createElement(AZt,{scope:e,triggerRef:o,contentRef:s,contentId:C3(),titleId:C3(),descriptionId:C3(),open:l,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(d=>!d),[c]),modal:a},t)},SZt="DialogTrigger",BZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(SZt,t),r=co(e,i.triggerRef);return C.createElement($o.button,vt({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xne(i.open)},n,{ref:r,onClick:Gu(u.onClick,i.onOpenToggle)}))}),DNe="DialogPortal",[wZt,xNe]=pNe(DNe,{forceMount:void 0}),LZt=u=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=u,r=xd(DNe,e);return C.createElement(wZt,{scope:e,forceMount:t},C.Children.map(n,a=>C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},a))))},fY="DialogOverlay",zZt=C.forwardRef((u,e)=>{const t=xNe(fY,u.__scopeDialog),{forceMount:n=t.forceMount,...i}=u,r=xd(fY,u.__scopeDialog);return r.modal?C.createElement(Lg,{present:n||r.open},C.createElement(MZt,vt({},i,{ref:e}))):null}),MZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(fY,t);return C.createElement(gNe,{as:t6,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement($o.div,vt({"data-state":Xne(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),yy="DialogContent",TZt=C.forwardRef((u,e)=>{const t=xNe(yy,u.__scopeDialog),{forceMount:n=t.forceMount,...i}=u,r=xd(yy,u.__scopeDialog);return C.createElement(Lg,{present:n||r.open},r.modal?C.createElement(NZt,vt({},i,{ref:e})):C.createElement(PZt,vt({},i,{ref:e})))}),NZt=C.forwardRef((u,e)=>{const t=xd(yy,u.__scopeDialog),n=C.useRef(null),i=co(e,t.contentRef,n);return C.useEffect(()=>{const r=n.current;if(r)return HSe(r)},[]),C.createElement(vNe,vt({},u,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gu(u.onCloseAutoFocus,r=>{var a;r.preventDefault(),(a=t.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Gu(u.onPointerDownOutside,r=>{const a=r.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&r.preventDefault()}),onFocusOutside:Gu(u.onFocusOutside,r=>r.preventDefault())}))}),PZt=C.forwardRef((u,e)=>{const t=xd(yy,u.__scopeDialog),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(vNe,vt({},u,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var a;if((a=u.onCloseAutoFocus)===null||a===void 0||a.call(u,r),!r.defaultPrevented){var o;n.current||(o=t.triggerRef.current)===null||o===void 0||o.focus(),r.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:r=>{var a,o;(a=u.onInteractOutside)===null||a===void 0||a.call(u,r),r.defaultPrevented||(n.current=!0,r.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=r.target;((o=t.triggerRef.current)===null||o===void 0?void 0:o.contains(s))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&i.current&&r.preventDefault()}}))}),vNe=C.forwardRef((u,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:r,...a}=u,o=xd(yy,t),s=C.useRef(null),l=co(e,s);return lNe(),C.createElement(C.Fragment,null,C.createElement(oNe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:r},C.createElement(Yne,vt({role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Xne(o.open)},a,{ref:l,onDismiss:()=>o.onOpenChange(!1)}))),!1)}),RZt="DialogTitle",IZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(RZt,t);return C.createElement($o.h2,vt({id:i.titleId},n,{ref:e}))}),OZt="DialogDescription",jZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(OZt,t);return C.createElement($o.p,vt({id:i.descriptionId},n,{ref:e}))}),HZt="DialogClose",VZt=C.forwardRef((u,e)=>{const{__scopeDialog:t,...n}=u,i=xd(HZt,t);return C.createElement($o.button,vt({type:"button"},n,{ref:e,onClick:Gu(u.onClick,()=>i.onOpenChange(!1))}))});function Xne(u){return u?"open":"closed"}const $Zt=_Zt,KZt=BZt,WZt=LZt,GZt=zZt,UZt=TZt,qZt=IZt,JZt=jZt,ZZt=VZt,YZt=C.forwardRef((u,e)=>C.createElement($o.span,vt({},u,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...u.style}}))),CNe=YZt;function bNe(u){const e=u+"CollectionProvider",[t,n]=eD(e),[i,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),a=E=>{const{scope:m,children:g}=E,f=M.useRef(null),p=M.useRef(new Map).current;return M.createElement(i,{scope:m,itemMap:p,collectionRef:f},g)},o=u+"CollectionSlot",s=M.forwardRef((E,m)=>{const{scope:g,children:f}=E,p=r(o,g),D=co(m,p.collectionRef);return M.createElement(t6,{ref:D},f)}),l=u+"CollectionItemSlot",c="data-radix-collection-item",d=M.forwardRef((E,m)=>{const{scope:g,children:f,...p}=E,D=M.useRef(null),x=co(m,D),b=r(l,g);return M.useEffect(()=>(b.itemMap.set(D,{ref:D,...p}),()=>void b.itemMap.delete(D))),M.createElement(t6,{[c]:"",ref:x},f)});function h(E){const m=r(u+"CollectionConsumer",E);return M.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const p=Array.from(f.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((b,k)=>p.indexOf(b.ref.current)-p.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:s,ItemSlot:d},h,n]}const QZt=C.createContext(void 0);function kNe(u){const e=C.useContext(QZt);return u||e||"ltr"}const XZt=u=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:u,fn(t){const{element:n,padding:i}=typeof u=="function"?u(t):u;return n&&e(n)?n.current!=null?fz({element:n.current,padding:i}).fn(t):{}:n?fz({element:n,padding:i}).fn(t):{}}}};var q8=typeof document<"u"?C.useLayoutEffect:C.useEffect;function NT(u,e){if(u===e)return!0;if(typeof u!=typeof e)return!1;if(typeof u=="function"&&u.toString()===e.toString())return!0;let t,n,i;if(u&&e&&typeof u=="object"){if(Array.isArray(u)){if(t=u.length,t!=e.length)return!1;for(n=t;n--!==0;)if(!NT(u[n],e[n]))return!1;return!0}if(i=Object.keys(u),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const r=i[n];if(!(r==="_owner"&&u.$$typeof)&&!NT(u[r],e[r]))return!1}return!0}return u!==u&&e!==e}function FNe(u){return typeof window>"u"?1:(u.ownerDocument.defaultView||window).devicePixelRatio||1}function Y3e(u,e){const t=FNe(u);return Math.round(e*t)/t}function Q3e(u){const e=C.useRef(u);return q8(()=>{e.current=u}),e}function eYt(u){u===void 0&&(u={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:r,floating:a}={},transform:o=!0,whileElementsMounted:s,open:l}=u,[c,d]=C.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[h,E]=C.useState(n);NT(h,n)||E(n);const[m,g]=C.useState(null),[f,p]=C.useState(null),D=C.useCallback(T=>{T!=A.current&&(A.current=T,g(T))},[g]),x=C.useCallback(T=>{T!==F.current&&(F.current=T,p(T))},[p]),b=r||m,k=a||f,A=C.useRef(null),F=C.useRef(null),S=C.useRef(c),w=Q3e(s),z=Q3e(i),N=C.useCallback(()=>{if(!A.current||!F.current)return;const T={placement:e,strategy:t,middleware:h};z.current&&(T.platform=z.current),e8e(A.current,F.current,T).then(R=>{const I={...R,isPositioned:!0};O.current&&!NT(S.current,I)&&(S.current=I,is.flushSync(()=>{d(I)}))})},[h,e,t,z]);q8(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[l]);const O=C.useRef(!1);q8(()=>(O.current=!0,()=>{O.current=!1}),[]),q8(()=>{if(b&&(A.current=b),k&&(F.current=k),b&&k){if(w.current)return w.current(b,k,N);N()}},[b,k,N,w]);const y=C.useMemo(()=>({reference:A,floating:F,setReference:D,setFloating:x}),[D,x]),_=C.useMemo(()=>({reference:b,floating:k}),[b,k]),L=C.useMemo(()=>{const T={position:t,left:0,top:0};if(!_.floating)return T;const R=Y3e(_.floating,c.x),I=Y3e(_.floating,c.y);return o?{...T,transform:"translate("+R+"px, "+I+"px)",...FNe(_.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:R,top:I}},[t,o,_.floating,c.x,c.y]);return C.useMemo(()=>({...c,update:N,refs:y,elements:_,floatingStyles:L}),[c,N,y,_,L])}function tYt(u){const[e,t]=C.useState(void 0);return e6(()=>{if(u){t({width:u.offsetWidth,height:u.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let a,o;if("borderBoxSize"in r){const s=r.borderBoxSize,l=Array.isArray(s)?s[0]:s;a=l.inlineSize,o=l.blockSize}else a=u.offsetWidth,o=u.offsetHeight;t({width:a,height:o})});return n.observe(u,{box:"border-box"}),()=>n.unobserve(u)}else t(void 0)},[u]),e}const yNe="Popper",[ANe,tO]=eD(yNe),[uYt,_Ne]=ANe(yNe),nYt=u=>{const{__scopePopper:e,children:t}=u,[n,i]=C.useState(null);return C.createElement(uYt,{scope:e,anchor:n,onAnchorChange:i},t)},iYt="PopperAnchor",rYt=C.forwardRef((u,e)=>{const{__scopePopper:t,virtualRef:n,...i}=u,r=_Ne(iYt,t),a=C.useRef(null),o=co(e,a);return C.useEffect(()=>{r.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:C.createElement($o.div,vt({},i,{ref:o}))}),SNe="PopperContent",[aYt,aqn]=ANe(SNe),oYt=C.forwardRef((u,e)=>{var t,n,i,r,a,o,s,l;const{__scopePopper:c,side:d="bottom",sideOffset:h=0,align:E="center",alignOffset:m=0,arrowPadding:g=0,collisionBoundary:f=[],collisionPadding:p=0,sticky:D="partial",hideWhenDetached:x=!1,avoidCollisions:b=!0,onPlaced:k,...A}=u,F=_Ne(SNe,c),[S,w]=C.useState(null),z=co(e,Be=>w(Be)),[N,O]=C.useState(null),y=tYt(N),_=(t=y==null?void 0:y.width)!==null&&t!==void 0?t:0,L=(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,T=d+(E!=="center"?"-"+E:""),R=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(f)?f:[f],H=I.length>0,V={padding:R,boundary:I.filter(sYt),altBoundary:H},{refs:U,floatingStyles:J,placement:Y,isPositioned:X,middlewareData:re}=eYt({strategy:"fixed",placement:T,whileElementsMounted:XSe,elements:{reference:F.anchor},middleware:[ane({mainAxis:h+L,alignmentAxis:m}),b&&MI({mainAxis:!0,crossAxis:!1,limiter:D==="partial"?KSe():void 0,...V}),b&&rne({...V}),WSe({...V,apply:({elements:Be,rects:je,availableWidth:bt,availableHeight:qt})=>{const{width:ou,height:Vt}=je.reference,oe=Be.floating.style;oe.setProperty("--radix-popper-available-width",`${bt}px`),oe.setProperty("--radix-popper-available-height",`${qt}px`),oe.setProperty("--radix-popper-anchor-width",`${ou}px`),oe.setProperty("--radix-popper-anchor-height",`${Vt}px`)}}),N&&XZt({element:N,padding:g}),lYt({arrowWidth:_,arrowHeight:L}),x&&d_t({strategy:"referenceHidden"})]}),[ge,_e]=BNe(Y),Ve=j1(k);e6(()=>{X&&(Ve==null||Ve())},[X,Ve]);const Ue=(i=re.arrow)===null||i===void 0?void 0:i.x,qe=(r=re.arrow)===null||r===void 0?void 0:r.y,Se=((a=re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[de,he]=C.useState();return e6(()=>{S&&he(window.getComputedStyle(S).zIndex)},[S]),C.createElement("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(o=re.transformOrigin)===null||o===void 0?void 0:o.x,(s=re.transformOrigin)===null||s===void 0?void 0:s.y].join(" ")},dir:u.dir},C.createElement(aYt,{scope:c,placedSide:ge,onArrowChange:O,arrowX:Ue,arrowY:qe,shouldHideArrow:Se},C.createElement($o.div,vt({"data-side":ge,"data-align":_e},A,{ref:z,style:{...A.style,animation:X?void 0:"none",opacity:(l=re.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function sYt(u){return u!==null}const lYt=u=>({name:"transformOrigin",options:u,fn(e){var t,n,i,r,a;const{placement:o,rects:s,middlewareData:l}=e,d=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,h=d?0:u.arrowWidth,E=d?0:u.arrowHeight,[m,g]=BNe(o),f={start:"0%",center:"50%",end:"100%"}[g],p=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,D=((r=(a=l.arrow)===null||a===void 0?void 0:a.y)!==null&&r!==void 0?r:0)+E/2;let x="",b="";return m==="bottom"?(x=d?f:`${p}px`,b=`${-E}px`):m==="top"?(x=d?f:`${p}px`,b=`${s.floating.height+E}px`):m==="right"?(x=`${-E}px`,b=d?f:`${D}px`):m==="left"&&(x=`${s.floating.width+E}px`,b=d?f:`${D}px`),{data:{x,y:b}}}});function BNe(u){const[e,t="center"]=u.split("-");return[e,t]}const wNe=nYt,LNe=rYt,zNe=oYt,p$="rovingFocusGroup.onEntryFocus",cYt={bubbles:!1,cancelable:!0},eie="RovingFocusGroup",[pY,MNe,dYt]=bNe(eie),[hYt,TNe]=eD(eie,[dYt]),[EYt,mYt]=hYt(eie),gYt=C.forwardRef((u,e)=>C.createElement(pY.Provider,{scope:u.__scopeRovingFocusGroup},C.createElement(pY.Slot,{scope:u.__scopeRovingFocusGroup},C.createElement(fYt,vt({},u,{ref:e}))))),fYt=C.forwardRef((u,e)=>{const{__scopeRovingFocusGroup:t,orientation:n,loop:i=!1,dir:r,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:s,onEntryFocus:l,...c}=u,d=C.useRef(null),h=co(e,d),E=kNe(r),[m=null,g]=XI({prop:a,defaultProp:o,onChange:s}),[f,p]=C.useState(!1),D=j1(l),x=MNe(t),b=C.useRef(!1),[k,A]=C.useState(0);return C.useEffect(()=>{const F=d.current;if(F)return F.addEventListener(p$,D),()=>F.removeEventListener(p$,D)},[D]),C.createElement(EYt,{scope:t,orientation:n,dir:E,loop:i,currentTabStopId:m,onItemFocus:C.useCallback(F=>g(F),[g]),onItemShiftTab:C.useCallback(()=>p(!0),[]),onFocusableItemAdd:C.useCallback(()=>A(F=>F+1),[]),onFocusableItemRemove:C.useCallback(()=>A(F=>F-1),[])},C.createElement($o.div,vt({tabIndex:f||k===0?-1:0,"data-orientation":n},c,{ref:h,style:{outline:"none",...u.style},onMouseDown:Gu(u.onMouseDown,()=>{b.current=!0}),onFocus:Gu(u.onFocus,F=>{const S=!b.current;if(F.target===F.currentTarget&&S&&!f){const w=new CustomEvent(p$,cYt);if(F.currentTarget.dispatchEvent(w),!w.defaultPrevented){const z=x().filter(L=>L.focusable),N=z.find(L=>L.active),O=z.find(L=>L.id===m),_=[N,O,...z].filter(Boolean).map(L=>L.ref.current);NNe(_)}}b.current=!1}),onBlur:Gu(u.onBlur,()=>p(!1))})))}),pYt="RovingFocusGroupItem",DYt=C.forwardRef((u,e)=>{const{__scopeRovingFocusGroup:t,focusable:n=!0,active:i=!1,tabStopId:r,...a}=u,o=C3(),s=r||o,l=mYt(pYt,t),c=l.currentTabStopId===s,d=MNe(t),{onFocusableItemAdd:h,onFocusableItemRemove:E}=l;return C.useEffect(()=>{if(n)return h(),()=>E()},[n,h,E]),C.createElement(pY.ItemSlot,{scope:t,id:s,focusable:n,active:i},C.createElement($o.span,vt({tabIndex:c?0:-1,"data-orientation":l.orientation},a,{ref:e,onMouseDown:Gu(u.onMouseDown,m=>{n?l.onItemFocus(s):m.preventDefault()}),onFocus:Gu(u.onFocus,()=>l.onItemFocus(s)),onKeyDown:Gu(u.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=CYt(m,l.orientation,l.dir);if(g!==void 0){m.preventDefault();let p=d().filter(D=>D.focusable).map(D=>D.ref.current);if(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const D=p.indexOf(m.currentTarget);p=l.loop?bYt(p,D+1):p.slice(D+1)}setTimeout(()=>NNe(p))}})})))}),xYt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vYt(u,e){return e!=="rtl"?u:u==="ArrowLeft"?"ArrowRight":u==="ArrowRight"?"ArrowLeft":u}function CYt(u,e,t){const n=vYt(u.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return xYt[n]}function NNe(u){const e=document.activeElement;for(const t of u)if(t===e||(t.focus(),document.activeElement!==e))return}function bYt(u,e){return u.map((t,n)=>u[(e+n)%u.length])}const kYt=gYt,FYt=DYt,yYt=["Enter"," "],AYt=["ArrowDown","PageUp","Home"],PNe=["ArrowUp","PageDown","End"],_Yt=[...AYt,...PNe],uO="Menu",[DY,SYt,BYt]=bNe(uO),[tD,RNe]=eD(uO,[BYt,tO,TNe]),tie=tO(),INe=TNe(),[wYt,E7]=tD(uO),[LYt,uie]=tD(uO),zYt=u=>{const{__scopeMenu:e,open:t=!1,children:n,dir:i,onOpenChange:r,modal:a=!0}=u,o=tie(e),[s,l]=C.useState(null),c=C.useRef(!1),d=j1(r),h=kNe(i);return C.useEffect(()=>{const E=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),C.createElement(wNe,o,C.createElement(wYt,{scope:e,open:t,onOpenChange:d,content:s,onContentChange:l},C.createElement(LYt,{scope:e,onClose:C.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a},n)))},MYt=C.forwardRef((u,e)=>{const{__scopeMenu:t,...n}=u,i=tie(t);return C.createElement(LNe,vt({},i,n,{ref:e}))}),ONe="MenuPortal",[TYt,NYt]=tD(ONe,{forceMount:void 0}),PYt=u=>{const{__scopeMenu:e,forceMount:t,children:n,container:i}=u,r=E7(ONe,e);return C.createElement(TYt,{scope:e,forceMount:t},C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},n)))},Sm="MenuContent",[RYt,jNe]=tD(Sm),IYt=C.forwardRef((u,e)=>{const t=NYt(Sm,u.__scopeMenu),{forceMount:n=t.forceMount,...i}=u,r=E7(Sm,u.__scopeMenu),a=uie(Sm,u.__scopeMenu);return C.createElement(DY.Provider,{scope:u.__scopeMenu},C.createElement(Lg,{present:n||r.open},C.createElement(DY.Slot,{scope:u.__scopeMenu},a.modal?C.createElement(OYt,vt({},i,{ref:e})):C.createElement(jYt,vt({},i,{ref:e})))))}),OYt=C.forwardRef((u,e)=>{const t=E7(Sm,u.__scopeMenu),n=C.useRef(null),i=co(e,n);return C.useEffect(()=>{const r=n.current;if(r)return HSe(r)},[]),C.createElement(HNe,vt({},u,{ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:Gu(u.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),jYt=C.forwardRef((u,e)=>{const t=E7(Sm,u.__scopeMenu);return C.createElement(HNe,vt({},u,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),HNe=C.forwardRef((u,e)=>{const{__scopeMenu:t,loop:n=!1,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:E,disableOutsideScroll:m,...g}=u,f=E7(Sm,t),p=uie(Sm,t),D=tie(t),x=INe(t),b=SYt(t),[k,A]=C.useState(null),F=C.useRef(null),S=co(e,F,f.onContentChange),w=C.useRef(0),z=C.useRef(""),N=C.useRef(0),O=C.useRef(null),y=C.useRef("right"),_=C.useRef(0),L=m?gNe:C.Fragment,T=m?{as:t6,allowPinchZoom:!0}:void 0,R=H=>{var V,U;const J=z.current+H,Y=b().filter(Ue=>!Ue.disabled),X=document.activeElement,re=(V=Y.find(Ue=>Ue.ref.current===X))===null||V===void 0?void 0:V.textValue,ge=Y.map(Ue=>Ue.textValue),_e=JYt(ge,J,re),Ve=(U=Y.find(Ue=>Ue.textValue===_e))===null||U===void 0?void 0:U.ref.current;(function Ue(qe){z.current=qe,window.clearTimeout(w.current),qe!==""&&(w.current=window.setTimeout(()=>Ue(""),1e3))})(J),Ve&&setTimeout(()=>Ve.focus())};C.useEffect(()=>()=>window.clearTimeout(w.current),[]),lNe();const I=C.useCallback(H=>{var V,U;return y.current===((V=O.current)===null||V===void 0?void 0:V.side)&&YYt(H,(U=O.current)===null||U===void 0?void 0:U.area)},[]);return C.createElement(RYt,{scope:t,searchRef:z,onItemEnter:C.useCallback(H=>{I(H)&&H.preventDefault()},[I]),onItemLeave:C.useCallback(H=>{var V;I(H)||((V=F.current)===null||V===void 0||V.focus(),A(null))},[I]),onTriggerLeave:C.useCallback(H=>{I(H)&&H.preventDefault()},[I]),pointerGraceTimerRef:N,onPointerGraceIntentChange:C.useCallback(H=>{O.current=H},[])},C.createElement(L,T,C.createElement(oNe,{asChild:!0,trapped:i,onMountAutoFocus:Gu(r,H=>{var V;H.preventDefault(),(V=F.current)===null||V===void 0||V.focus()}),onUnmountAutoFocus:a},C.createElement(Yne,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:E},C.createElement(kYt,vt({asChild:!0},x,{dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:A,onEntryFocus:Gu(s,H=>{p.isUsingKeyboardRef.current||H.preventDefault()})}),C.createElement(zNe,vt({role:"menu","aria-orientation":"vertical","data-state":GYt(f.open),"data-radix-menu-content":"",dir:p.dir},D,g,{ref:S,style:{outline:"none",...g.style},onKeyDown:Gu(g.onKeyDown,H=>{const U=H.target.closest("[data-radix-menu-content]")===H.currentTarget,J=H.ctrlKey||H.altKey||H.metaKey,Y=H.key.length===1;U&&(H.key==="Tab"&&H.preventDefault(),!J&&Y&&R(H.key));const X=F.current;if(H.target!==X||!_Yt.includes(H.key))return;H.preventDefault();const ge=b().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);PNe.includes(H.key)&&ge.reverse(),UYt(ge)}),onBlur:Gu(u.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(w.current),z.current="")}),onPointerMove:Gu(u.onPointerMove,vY(H=>{const V=H.target,U=_.current!==H.clientX;if(H.currentTarget.contains(V)&&U){const J=H.clientX>_.current?"right":"left";y.current=J,_.current=H.clientX}}))})))))))}),xY="MenuItem",X3e="menu.itemSelect",HYt=C.forwardRef((u,e)=>{const{disabled:t=!1,onSelect:n,...i}=u,r=C.useRef(null),a=uie(xY,u.__scopeMenu),o=jNe(xY,u.__scopeMenu),s=co(e,r),l=C.useRef(!1),c=()=>{const d=r.current;if(!t&&d){const h=new CustomEvent(X3e,{bubbles:!0,cancelable:!0});d.addEventListener(X3e,E=>n==null?void 0:n(E),{once:!0}),rNe(d,h),h.defaultPrevented?l.current=!1:a.onClose()}};return C.createElement(VYt,vt({},i,{ref:s,disabled:t,onClick:Gu(u.onClick,c),onPointerDown:d=>{var h;(h=u.onPointerDown)===null||h===void 0||h.call(u,d),l.current=!0},onPointerUp:Gu(u.onPointerUp,d=>{var h;l.current||(h=d.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Gu(u.onKeyDown,d=>{const h=o.searchRef.current!=="";t||h&&d.key===" "||yYt.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),VYt=C.forwardRef((u,e)=>{const{__scopeMenu:t,disabled:n=!1,textValue:i,...r}=u,a=jNe(xY,t),o=INe(t),s=C.useRef(null),l=co(e,s),[c,d]=C.useState(!1),[h,E]=C.useState("");return C.useEffect(()=>{const m=s.current;if(m){var g;E(((g=m.textContent)!==null&&g!==void 0?g:"").trim())}},[r.children]),C.createElement(DY.ItemSlot,{scope:t,disabled:n,textValue:i??h},C.createElement(FYt,vt({asChild:!0},o,{focusable:!n}),C.createElement($o.div,vt({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},r,{ref:l,onPointerMove:Gu(u.onPointerMove,vY(m=>{n?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus())})),onPointerLeave:Gu(u.onPointerLeave,vY(m=>a.onItemLeave(m))),onFocus:Gu(u.onFocus,()=>d(!0)),onBlur:Gu(u.onBlur,()=>d(!1))}))))}),$Yt="MenuRadioGroup";tD($Yt,{value:void 0,onValueChange:()=>{}});const KYt="MenuItemIndicator";tD(KYt,{checked:!1});const WYt="MenuSub";tD(WYt);function GYt(u){return u?"open":"closed"}function UYt(u){const e=document.activeElement;for(const t of u)if(t===e||(t.focus(),document.activeElement!==e))return}function qYt(u,e){return u.map((t,n)=>u[(e+n)%u.length])}function JYt(u,e,t){const i=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,r=t?u.indexOf(t):-1;let a=qYt(u,Math.max(r,0));i.length===1&&(a=a.filter(l=>l!==t));const s=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return s!==t?s:void 0}function ZYt(u,e){const{x:t,y:n}=u;let i=!1;for(let r=0,a=e.length-1;rn!=c>n&&t<(l-o)*(n-s)/(c-s)+o&&(i=!i)}return i}function YYt(u,e){if(!e)return!1;const t={x:u.clientX,y:u.clientY};return ZYt(t,e)}function vY(u){return e=>e.pointerType==="mouse"?u(e):void 0}const QYt=zYt,XYt=MYt,eQt=PYt,tQt=IYt,uQt=HYt,VNe="DropdownMenu",[nQt,oqn]=eD(VNe,[RNe]),m7=RNe(),[iQt,$Ne]=nQt(VNe),rQt=u=>{const{__scopeDropdownMenu:e,children:t,dir:n,open:i,defaultOpen:r,onOpenChange:a,modal:o=!0}=u,s=m7(e),l=C.useRef(null),[c=!1,d]=XI({prop:i,defaultProp:r,onChange:a});return C.createElement(iQt,{scope:e,triggerId:C3(),triggerRef:l,contentId:C3(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(h=>!h),[d]),modal:o},C.createElement(QYt,vt({},s,{open:c,onOpenChange:d,dir:n,modal:o}),t))},aQt="DropdownMenuTrigger",oQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,disabled:n=!1,...i}=u,r=$Ne(aQt,t),a=m7(t);return C.createElement(XYt,vt({asChild:!0},a),C.createElement($o.button,vt({type:"button",id:r.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":r.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},i,{ref:Zne(e,r.triggerRef),onPointerDown:Gu(u.onPointerDown,o=>{!n&&o.button===0&&o.ctrlKey===!1&&(r.onOpenToggle(),r.open||o.preventDefault())}),onKeyDown:Gu(u.onKeyDown,o=>{n||(["Enter"," "].includes(o.key)&&r.onOpenToggle(),o.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})))}),sQt=u=>{const{__scopeDropdownMenu:e,...t}=u,n=m7(e);return C.createElement(eQt,vt({},n,t))},lQt="DropdownMenuContent",cQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,...n}=u,i=$Ne(lQt,t),r=m7(t),a=C.useRef(!1);return C.createElement(tQt,vt({id:i.contentId,"aria-labelledby":i.triggerId},r,n,{ref:e,onCloseAutoFocus:Gu(u.onCloseAutoFocus,o=>{var s;a.current||(s=i.triggerRef.current)===null||s===void 0||s.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:Gu(u.onInteractOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...u.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),dQt=C.forwardRef((u,e)=>{const{__scopeDropdownMenu:t,...n}=u,i=m7(t);return C.createElement(uQt,vt({},i,n,{ref:e}))}),hQt=rQt,EQt=oQt,mQt=sQt,gQt=cQt,fQt=dQt;var Hn={};const pQt="Á",DQt="á",xQt="Ă",vQt="ă",CQt="∾",bQt="∿",kQt="∾̳",FQt="Â",yQt="â",AQt="´",_Qt="А",SQt="а",BQt="Æ",wQt="æ",LQt="⁡",zQt="𝔄",MQt="𝔞",TQt="À",NQt="à",PQt="ℵ",RQt="ℵ",IQt="Α",OQt="α",jQt="Ā",HQt="ā",VQt="⨿",$Qt="&",KQt="&",WQt="⩕",GQt="⩓",UQt="∧",qQt="⩜",JQt="⩘",ZQt="⩚",YQt="∠",QQt="⦤",XQt="∠",eXt="⦨",tXt="⦩",uXt="⦪",nXt="⦫",iXt="⦬",rXt="⦭",aXt="⦮",oXt="⦯",sXt="∡",lXt="∟",cXt="⊾",dXt="⦝",hXt="∢",EXt="Å",mXt="⍼",gXt="Ą",fXt="ą",pXt="𝔸",DXt="𝕒",xXt="⩯",vXt="≈",CXt="⩰",bXt="≊",kXt="≋",FXt="'",yXt="⁡",AXt="≈",_Xt="≊",SXt="Å",BXt="å",wXt="𝒜",LXt="𝒶",zXt="≔",MXt="*",TXt="≈",NXt="≍",PXt="Ã",RXt="ã",IXt="Ä",OXt="ä",jXt="∳",HXt="⨑",VXt="≌",$Xt="϶",KXt="‵",WXt="∽",GXt="⋍",UXt="∖",qXt="⫧",JXt="⊽",ZXt="⌅",YXt="⌆",QXt="⌅",XXt="⎵",eeu="⎶",teu="≌",ueu="Б",neu="б",ieu="„",reu="∵",aeu="∵",oeu="∵",seu="⦰",leu="϶",ceu="ℬ",deu="ℬ",heu="Β",Eeu="β",meu="ℶ",geu="≬",feu="𝔅",peu="𝔟",Deu="⋂",xeu="◯",veu="⋃",Ceu="⨀",beu="⨁",keu="⨂",Feu="⨆",yeu="★",Aeu="▽",_eu="△",Seu="⨄",Beu="⋁",weu="⋀",Leu="⤍",zeu="⧫",Meu="▪",Teu="▴",Neu="▾",Peu="◂",Reu="▸",Ieu="␣",Oeu="▒",jeu="░",Heu="▓",Veu="█",$eu="=⃥",Keu="≡⃥",Weu="⫭",Geu="⌐",Ueu="𝔹",qeu="𝕓",Jeu="⊥",Zeu="⊥",Yeu="⋈",Qeu="⧉",Xeu="┐",etu="╕",ttu="╖",utu="╗",ntu="┌",itu="╒",rtu="╓",atu="╔",otu="─",stu="═",ltu="┬",ctu="╤",dtu="╥",htu="╦",Etu="┴",mtu="╧",gtu="╨",ftu="╩",ptu="⊟",Dtu="⊞",xtu="⊠",vtu="┘",Ctu="╛",btu="╜",ktu="╝",Ftu="└",ytu="╘",Atu="╙",_tu="╚",Stu="│",Btu="║",wtu="┼",Ltu="╪",ztu="╫",Mtu="╬",Ttu="┤",Ntu="╡",Ptu="╢",Rtu="╣",Itu="├",Otu="╞",jtu="╟",Htu="╠",Vtu="‵",$tu="˘",Ktu="˘",Wtu="¦",Gtu="𝒷",Utu="ℬ",qtu="⁏",Jtu="∽",Ztu="⋍",Ytu="⧅",Qtu="\\",Xtu="⟈",euu="•",tuu="•",uuu="≎",nuu="⪮",iuu="≏",ruu="≎",auu="≏",ouu="Ć",suu="ć",luu="⩄",cuu="⩉",duu="⩋",huu="∩",Euu="⋒",muu="⩇",guu="⩀",fuu="ⅅ",puu="∩︀",Duu="⁁",xuu="ˇ",vuu="ℭ",Cuu="⩍",buu="Č",kuu="č",Fuu="Ç",yuu="ç",Auu="Ĉ",_uu="ĉ",Suu="∰",Buu="⩌",wuu="⩐",Luu="Ċ",zuu="ċ",Muu="¸",Tuu="¸",Nuu="⦲",Puu="¢",Ruu="·",Iuu="·",Ouu="𝔠",juu="ℭ",Huu="Ч",Vuu="ч",$uu="✓",Kuu="✓",Wuu="Χ",Guu="χ",Uuu="ˆ",quu="≗",Juu="↺",Zuu="↻",Yuu="⊛",Quu="⊚",Xuu="⊝",enu="⊙",tnu="®",unu="Ⓢ",nnu="⊖",inu="⊕",rnu="⊗",anu="○",onu="⧃",snu="≗",lnu="⨐",cnu="⫯",dnu="⧂",hnu="∲",Enu="”",mnu="’",gnu="♣",fnu="♣",pnu=":",Dnu="∷",xnu="⩴",vnu="≔",Cnu="≔",bnu=",",knu="@",Fnu="∁",ynu="∘",Anu="∁",_nu="ℂ",Snu="≅",Bnu="⩭",wnu="≡",Lnu="∮",znu="∯",Mnu="∮",Tnu="𝕔",Nnu="ℂ",Pnu="∐",Rnu="∐",Inu="©",Onu="©",jnu="℗",Hnu="∳",Vnu="↵",$nu="✗",Knu="⨯",Wnu="𝒞",Gnu="𝒸",Unu="⫏",qnu="⫑",Jnu="⫐",Znu="⫒",Ynu="⋯",Qnu="⤸",Xnu="⤵",eiu="⋞",tiu="⋟",uiu="↶",niu="⤽",iiu="⩈",riu="⩆",aiu="≍",oiu="∪",siu="⋓",liu="⩊",ciu="⊍",diu="⩅",hiu="∪︀",Eiu="↷",miu="⤼",giu="⋞",fiu="⋟",piu="⋎",Diu="⋏",xiu="¤",viu="↶",Ciu="↷",biu="⋎",kiu="⋏",Fiu="∲",yiu="∱",Aiu="⌭",_iu="†",Siu="‡",Biu="ℸ",wiu="↓",Liu="↡",ziu="⇓",Miu="‐",Tiu="⫤",Niu="⊣",Piu="⤏",Riu="˝",Iiu="Ď",Oiu="ď",jiu="Д",Hiu="д",Viu="‡",$iu="⇊",Kiu="ⅅ",Wiu="ⅆ",Giu="⤑",Uiu="⩷",qiu="°",Jiu="∇",Ziu="Δ",Yiu="δ",Qiu="⦱",Xiu="⥿",eru="𝔇",tru="𝔡",uru="⥥",nru="⇃",iru="⇂",rru="´",aru="˙",oru="˝",sru="`",lru="˜",cru="⋄",dru="⋄",hru="⋄",Eru="♦",mru="♦",gru="¨",fru="ⅆ",pru="ϝ",Dru="⋲",xru="÷",vru="÷",Cru="⋇",bru="⋇",kru="Ђ",Fru="ђ",yru="⌞",Aru="⌍",_ru="$",Sru="𝔻",Bru="𝕕",wru="¨",Lru="˙",zru="⃜",Mru="≐",Tru="≑",Nru="≐",Pru="∸",Rru="∔",Iru="⊡",Oru="⌆",jru="∯",Hru="¨",Vru="⇓",$ru="⇐",Kru="⇔",Wru="⫤",Gru="⟸",Uru="⟺",qru="⟹",Jru="⇒",Zru="⊨",Yru="⇑",Qru="⇕",Xru="∥",eau="⤓",tau="↓",uau="↓",nau="⇓",iau="⇵",rau="̑",aau="⇊",oau="⇃",sau="⇂",lau="⥐",cau="⥞",dau="⥖",hau="↽",Eau="⥟",mau="⥗",gau="⇁",fau="↧",pau="⊤",Dau="⤐",xau="⌟",vau="⌌",Cau="𝒟",bau="𝒹",kau="Ѕ",Fau="ѕ",yau="⧶",Aau="Đ",_au="đ",Sau="⋱",Bau="▿",wau="▾",Lau="⇵",zau="⥯",Mau="⦦",Tau="Џ",Nau="џ",Pau="⟿",Rau="É",Iau="é",Oau="⩮",jau="Ě",Hau="ě",Vau="Ê",$au="ê",Kau="≖",Wau="≕",Gau="Э",Uau="э",qau="⩷",Jau="Ė",Zau="ė",Yau="≑",Qau="ⅇ",Xau="≒",eou="𝔈",tou="𝔢",uou="⪚",nou="È",iou="è",rou="⪖",aou="⪘",oou="⪙",sou="∈",lou="⏧",cou="ℓ",dou="⪕",hou="⪗",Eou="Ē",mou="ē",gou="∅",fou="∅",pou="◻",Dou="∅",xou="▫",vou=" ",Cou=" ",bou=" ",kou="Ŋ",Fou="ŋ",you=" ",Aou="Ę",_ou="ę",Sou="𝔼",Bou="𝕖",wou="⋕",Lou="⧣",zou="⩱",Mou="ε",Tou="Ε",Nou="ε",Pou="ϵ",Rou="≖",Iou="≕",Oou="≂",jou="⪖",Hou="⪕",Vou="⩵",$ou="=",Kou="≂",Wou="≟",Gou="⇌",Uou="≡",qou="⩸",Jou="⧥",Zou="⥱",You="≓",Qou="ℯ",Xou="ℰ",esu="≐",tsu="⩳",usu="≂",nsu="Η",isu="η",rsu="Ð",asu="ð",osu="Ë",ssu="ë",lsu="€",csu="!",dsu="∃",hsu="∃",Esu="ℰ",msu="ⅇ",gsu="ⅇ",fsu="≒",psu="Ф",Dsu="ф",xsu="♀",vsu="ffi",Csu="ff",bsu="ffl",ksu="𝔉",Fsu="𝔣",ysu="fi",Asu="◼",_su="▪",Ssu="fj",Bsu="♭",wsu="fl",Lsu="▱",zsu="ƒ",Msu="𝔽",Tsu="𝕗",Nsu="∀",Psu="∀",Rsu="⋔",Isu="⫙",Osu="ℱ",jsu="⨍",Hsu="½",Vsu="⅓",$su="¼",Ksu="⅕",Wsu="⅙",Gsu="⅛",Usu="⅔",qsu="⅖",Jsu="¾",Zsu="⅗",Ysu="⅜",Qsu="⅘",Xsu="⅚",e0u="⅝",t0u="⅞",u0u="⁄",n0u="⌢",i0u="𝒻",r0u="ℱ",a0u="ǵ",o0u="Γ",s0u="γ",l0u="Ϝ",c0u="ϝ",d0u="⪆",h0u="Ğ",E0u="ğ",m0u="Ģ",g0u="Ĝ",f0u="ĝ",p0u="Г",D0u="г",x0u="Ġ",v0u="ġ",C0u="≥",b0u="≧",k0u="⪌",F0u="⋛",y0u="≥",A0u="≧",_0u="⩾",S0u="⪩",B0u="⩾",w0u="⪀",L0u="⪂",z0u="⪄",M0u="⋛︀",T0u="⪔",N0u="𝔊",P0u="𝔤",R0u="≫",I0u="⋙",O0u="⋙",j0u="ℷ",H0u="Ѓ",V0u="ѓ",$0u="⪥",K0u="≷",W0u="⪒",G0u="⪤",U0u="⪊",q0u="⪊",J0u="⪈",Z0u="≩",Y0u="⪈",Q0u="≩",X0u="⋧",elu="𝔾",tlu="𝕘",ulu="`",nlu="≥",ilu="⋛",rlu="≧",alu="⪢",olu="≷",slu="⩾",llu="≳",clu="𝒢",dlu="ℊ",hlu="≳",Elu="⪎",mlu="⪐",glu="⪧",flu="⩺",plu=">",Dlu=">",xlu="≫",vlu="⋗",Clu="⦕",blu="⩼",klu="⪆",Flu="⥸",ylu="⋗",Alu="⋛",_lu="⪌",Slu="≷",Blu="≳",wlu="≩︀",Llu="≩︀",zlu="ˇ",Mlu=" ",Tlu="½",Nlu="ℋ",Plu="Ъ",Rlu="ъ",Ilu="⥈",Olu="↔",jlu="⇔",Hlu="↭",Vlu="^",$lu="ℏ",Klu="Ĥ",Wlu="ĥ",Glu="♥",Ulu="♥",qlu="…",Jlu="⊹",Zlu="𝔥",Ylu="ℌ",Qlu="ℋ",Xlu="⤥",ecu="⤦",tcu="⇿",ucu="∻",ncu="↩",icu="↪",rcu="𝕙",acu="ℍ",ocu="―",scu="─",lcu="𝒽",ccu="ℋ",dcu="ℏ",hcu="Ħ",Ecu="ħ",mcu="≎",gcu="≏",fcu="⁃",pcu="‐",Dcu="Í",xcu="í",vcu="⁣",Ccu="Î",bcu="î",kcu="И",Fcu="и",ycu="İ",Acu="Е",_cu="е",Scu="¡",Bcu="⇔",wcu="𝔦",Lcu="ℑ",zcu="Ì",Mcu="ì",Tcu="ⅈ",Ncu="⨌",Pcu="∭",Rcu="⧜",Icu="℩",Ocu="IJ",jcu="ij",Hcu="Ī",Vcu="ī",$cu="ℑ",Kcu="ⅈ",Wcu="ℐ",Gcu="ℑ",Ucu="ı",qcu="ℑ",Jcu="⊷",Zcu="Ƶ",Ycu="⇒",Qcu="℅",Xcu="∞",edu="⧝",tdu="ı",udu="⊺",ndu="∫",idu="∬",rdu="ℤ",adu="∫",odu="⊺",sdu="⋂",ldu="⨗",cdu="⨼",ddu="⁣",hdu="⁢",Edu="Ё",mdu="ё",gdu="Į",fdu="į",pdu="𝕀",Ddu="𝕚",xdu="Ι",vdu="ι",Cdu="⨼",bdu="¿",kdu="𝒾",Fdu="ℐ",ydu="∈",Adu="⋵",_du="⋹",Sdu="⋴",Bdu="⋳",wdu="∈",Ldu="⁢",zdu="Ĩ",Mdu="ĩ",Tdu="І",Ndu="і",Pdu="Ï",Rdu="ï",Idu="Ĵ",Odu="ĵ",jdu="Й",Hdu="й",Vdu="𝔍",$du="𝔧",Kdu="ȷ",Wdu="𝕁",Gdu="𝕛",Udu="𝒥",qdu="𝒿",Jdu="Ј",Zdu="ј",Ydu="Є",Qdu="є",Xdu="Κ",e1u="κ",t1u="ϰ",u1u="Ķ",n1u="ķ",i1u="К",r1u="к",a1u="𝔎",o1u="𝔨",s1u="ĸ",l1u="Х",c1u="х",d1u="Ќ",h1u="ќ",E1u="𝕂",m1u="𝕜",g1u="𝒦",f1u="𝓀",p1u="⇚",D1u="Ĺ",x1u="ĺ",v1u="⦴",C1u="ℒ",b1u="Λ",k1u="λ",F1u="⟨",y1u="⟪",A1u="⦑",_1u="⟨",S1u="⪅",B1u="ℒ",w1u="«",L1u="⇤",z1u="⤟",M1u="←",T1u="↞",N1u="⇐",P1u="⤝",R1u="↩",I1u="↫",O1u="⤹",j1u="⥳",H1u="↢",V1u="⤙",$1u="⤛",K1u="⪫",W1u="⪭",G1u="⪭︀",U1u="⤌",q1u="⤎",J1u="❲",Z1u="{",Y1u="[",Q1u="⦋",X1u="⦏",ehu="⦍",thu="Ľ",uhu="ľ",nhu="Ļ",ihu="ļ",rhu="⌈",ahu="{",ohu="Л",shu="л",lhu="⤶",chu="“",dhu="„",hhu="⥧",Ehu="⥋",mhu="↲",ghu="≤",fhu="≦",phu="⟨",Dhu="⇤",xhu="←",vhu="←",Chu="⇐",bhu="⇆",khu="↢",Fhu="⌈",yhu="⟦",Ahu="⥡",_hu="⥙",Shu="⇃",Bhu="⌊",whu="↽",Lhu="↼",zhu="⇇",Mhu="↔",Thu="↔",Nhu="⇔",Phu="⇆",Rhu="⇋",Ihu="↭",Ohu="⥎",jhu="↤",Hhu="⊣",Vhu="⥚",$hu="⋋",Khu="⧏",Whu="⊲",Ghu="⊴",Uhu="⥑",qhu="⥠",Jhu="⥘",Zhu="↿",Yhu="⥒",Qhu="↼",Xhu="⪋",e4u="⋚",t4u="≤",u4u="≦",n4u="⩽",i4u="⪨",r4u="⩽",a4u="⩿",o4u="⪁",s4u="⪃",l4u="⋚︀",c4u="⪓",d4u="⪅",h4u="⋖",E4u="⋚",m4u="⪋",g4u="⋚",f4u="≦",p4u="≶",D4u="≶",x4u="⪡",v4u="≲",C4u="⩽",b4u="≲",k4u="⥼",F4u="⌊",y4u="𝔏",A4u="𝔩",_4u="≶",S4u="⪑",B4u="⥢",w4u="↽",L4u="↼",z4u="⥪",M4u="▄",T4u="Љ",N4u="љ",P4u="⇇",R4u="≪",I4u="⋘",O4u="⌞",j4u="⇚",H4u="⥫",V4u="◺",$4u="Ŀ",K4u="ŀ",W4u="⎰",G4u="⎰",U4u="⪉",q4u="⪉",J4u="⪇",Z4u="≨",Y4u="⪇",Q4u="≨",X4u="⋦",eEu="⟬",tEu="⇽",uEu="⟦",nEu="⟵",iEu="⟵",rEu="⟸",aEu="⟷",oEu="⟷",sEu="⟺",lEu="⟼",cEu="⟶",dEu="⟶",hEu="⟹",EEu="↫",mEu="↬",gEu="⦅",fEu="𝕃",pEu="𝕝",DEu="⨭",xEu="⨴",vEu="∗",CEu="_",bEu="↙",kEu="↘",FEu="◊",yEu="◊",AEu="⧫",_Eu="(",SEu="⦓",BEu="⇆",wEu="⌟",LEu="⇋",zEu="⥭",MEu="‎",TEu="⊿",NEu="‹",PEu="𝓁",REu="ℒ",IEu="↰",OEu="↰",jEu="≲",HEu="⪍",VEu="⪏",$Eu="[",KEu="‘",WEu="‚",GEu="Ł",UEu="ł",qEu="⪦",JEu="⩹",ZEu="<",YEu="<",QEu="≪",XEu="⋖",emu="⋋",tmu="⋉",umu="⥶",nmu="⩻",imu="◃",rmu="⊴",amu="◂",omu="⦖",smu="⥊",lmu="⥦",cmu="≨︀",dmu="≨︀",hmu="¯",Emu="♂",mmu="✠",gmu="✠",fmu="↦",pmu="↦",Dmu="↧",xmu="↤",vmu="↥",Cmu="▮",bmu="⨩",kmu="М",Fmu="м",ymu="—",Amu="∺",_mu="∡",Smu=" ",Bmu="ℳ",wmu="𝔐",Lmu="𝔪",zmu="℧",Mmu="µ",Tmu="*",Nmu="⫰",Pmu="∣",Rmu="·",Imu="⊟",Omu="−",jmu="∸",Hmu="⨪",Vmu="∓",$mu="⫛",Kmu="…",Wmu="∓",Gmu="⊧",Umu="𝕄",qmu="𝕞",Jmu="∓",Zmu="𝓂",Ymu="ℳ",Qmu="∾",Xmu="Μ",egu="μ",tgu="⊸",ugu="⊸",ngu="∇",igu="Ń",rgu="ń",agu="∠⃒",ogu="≉",sgu="⩰̸",lgu="≋̸",cgu="ʼn",dgu="≉",hgu="♮",Egu="ℕ",mgu="♮",ggu=" ",fgu="≎̸",pgu="≏̸",Dgu="⩃",xgu="Ň",vgu="ň",Cgu="Ņ",bgu="ņ",kgu="≇",Fgu="⩭̸",ygu="⩂",Agu="Н",_gu="н",Sgu="–",Bgu="⤤",wgu="↗",Lgu="⇗",zgu="↗",Mgu="≠",Tgu="≐̸",Ngu="​",Pgu="​",Rgu="​",Igu="​",Ogu="≢",jgu="⤨",Hgu="≂̸",Vgu="≫",$gu="≪",Kgu=` `,Wgu="∄",Ggu="∄",Ugu="𝔑",qgu="𝔫",Jgu="≧̸",Zgu="≱",Ygu="≱",Qgu="≧̸",Xgu="⩾̸",efu="⩾̸",tfu="⋙̸",ufu="≵",nfu="≫⃒",ifu="≯",rfu="≯",afu="≫̸",ofu="↮",sfu="⇎",lfu="⫲",cfu="∋",dfu="⋼",hfu="⋺",Efu="∋",mfu="Њ",gfu="њ",ffu="↚",pfu="⇍",Dfu="‥",xfu="≦̸",vfu="≰",Cfu="↚",bfu="⇍",kfu="↮",Ffu="⇎",yfu="≰",Afu="≦̸",_fu="⩽̸",Sfu="⩽̸",Bfu="≮",wfu="⋘̸",Lfu="≴",zfu="≪⃒",Mfu="≮",Tfu="⋪",Nfu="⋬",Pfu="≪̸",Rfu="∤",Ifu="⁠",Ofu=" ",jfu="𝕟",Hfu="ℕ",Vfu="⫬",$fu="¬",Kfu="≢",Wfu="≭",Gfu="∦",Ufu="∉",qfu="≠",Jfu="≂̸",Zfu="∄",Yfu="≯",Qfu="≱",Xfu="≧̸",e3u="≫̸",t3u="≹",u3u="⩾̸",n3u="≵",i3u="≎̸",r3u="≏̸",a3u="∉",o3u="⋵̸",s3u="⋹̸",l3u="∉",c3u="⋷",d3u="⋶",h3u="⧏̸",E3u="⋪",m3u="⋬",g3u="≮",f3u="≰",p3u="≸",D3u="≪̸",x3u="⩽̸",v3u="≴",C3u="⪢̸",b3u="⪡̸",k3u="∌",F3u="∌",y3u="⋾",A3u="⋽",_3u="⊀",S3u="⪯̸",B3u="⋠",w3u="∌",L3u="⧐̸",z3u="⋫",M3u="⋭",T3u="⊏̸",N3u="⋢",P3u="⊐̸",R3u="⋣",I3u="⊂⃒",O3u="⊈",j3u="⊁",H3u="⪰̸",V3u="⋡",$3u="≿̸",K3u="⊃⃒",W3u="⊉",G3u="≁",U3u="≄",q3u="≇",J3u="≉",Z3u="∤",Y3u="∦",Q3u="∦",X3u="⫽⃥",epu="∂̸",tpu="⨔",upu="⊀",npu="⋠",ipu="⊀",rpu="⪯̸",apu="⪯̸",opu="⤳̸",spu="↛",lpu="⇏",cpu="↝̸",dpu="↛",hpu="⇏",Epu="⋫",mpu="⋭",gpu="⊁",fpu="⋡",ppu="⪰̸",Dpu="𝒩",xpu="𝓃",vpu="∤",Cpu="∦",bpu="≁",kpu="≄",Fpu="≄",ypu="∤",Apu="∦",_pu="⋢",Spu="⋣",Bpu="⊄",wpu="⫅̸",Lpu="⊈",zpu="⊂⃒",Mpu="⊈",Tpu="⫅̸",Npu="⊁",Ppu="⪰̸",Rpu="⊅",Ipu="⫆̸",Opu="⊉",jpu="⊃⃒",Hpu="⊉",Vpu="⫆̸",$pu="≹",Kpu="Ñ",Wpu="ñ",Gpu="≸",Upu="⋪",qpu="⋬",Jpu="⋫",Zpu="⋭",Ypu="Ν",Qpu="ν",Xpu="#",eDu="№",tDu=" ",uDu="≍⃒",nDu="⊬",iDu="⊭",rDu="⊮",aDu="⊯",oDu="≥⃒",sDu=">⃒",lDu="⤄",cDu="⧞",dDu="⤂",hDu="≤⃒",EDu="<⃒",mDu="⊴⃒",gDu="⤃",fDu="⊵⃒",pDu="∼⃒",DDu="⤣",xDu="↖",vDu="⇖",CDu="↖",bDu="⤧",kDu="Ó",FDu="ó",yDu="⊛",ADu="Ô",_Du="ô",SDu="⊚",BDu="О",wDu="о",LDu="⊝",zDu="Ő",MDu="ő",TDu="⨸",NDu="⊙",PDu="⦼",RDu="Œ",IDu="œ",ODu="⦿",jDu="𝔒",HDu="𝔬",VDu="˛",$Du="Ò",KDu="ò",WDu="⧁",GDu="⦵",UDu="Ω",qDu="∮",JDu="↺",ZDu="⦾",YDu="⦻",QDu="‾",XDu="⧀",e5u="Ō",t5u="ō",u5u="Ω",n5u="ω",i5u="Ο",r5u="ο",a5u="⦶",o5u="⊖",s5u="𝕆",l5u="𝕠",c5u="⦷",d5u="“",h5u="‘",E5u="⦹",m5u="⊕",g5u="↻",f5u="⩔",p5u="∨",D5u="⩝",x5u="ℴ",v5u="ℴ",C5u="ª",b5u="º",k5u="⊶",F5u="⩖",y5u="⩗",A5u="⩛",_5u="Ⓢ",S5u="𝒪",B5u="ℴ",w5u="Ø",L5u="ø",z5u="⊘",M5u="Õ",T5u="õ",N5u="⨶",P5u="⨷",R5u="⊗",I5u="Ö",O5u="ö",j5u="⌽",H5u="‾",V5u="⏞",$5u="⎴",K5u="⏜",W5u="¶",G5u="∥",U5u="∥",q5u="⫳",J5u="⫽",Z5u="∂",Y5u="∂",Q5u="П",X5u="п",exu="%",txu=".",uxu="‰",nxu="⊥",ixu="‱",rxu="𝔓",axu="𝔭",oxu="Φ",sxu="φ",lxu="ϕ",cxu="ℳ",dxu="☎",hxu="Π",Exu="π",mxu="⋔",gxu="ϖ",fxu="ℏ",pxu="ℎ",Dxu="ℏ",xxu="⨣",vxu="⊞",Cxu="⨢",bxu="+",kxu="∔",Fxu="⨥",yxu="⩲",Axu="±",_xu="±",Sxu="⨦",Bxu="⨧",wxu="±",Lxu="ℌ",zxu="⨕",Mxu="𝕡",Txu="ℙ",Nxu="£",Pxu="⪷",Rxu="⪻",Ixu="≺",Oxu="≼",jxu="⪷",Hxu="≺",Vxu="≼",$xu="≺",Kxu="⪯",Wxu="≼",Gxu="≾",Uxu="⪯",qxu="⪹",Jxu="⪵",Zxu="⋨",Yxu="⪯",Qxu="⪳",Xxu="≾",evu="′",tvu="″",uvu="ℙ",nvu="⪹",ivu="⪵",rvu="⋨",avu="∏",ovu="∏",svu="⌮",lvu="⌒",cvu="⌓",dvu="∝",hvu="∝",Evu="∷",mvu="∝",gvu="≾",fvu="⊰",pvu="𝒫",Dvu="𝓅",xvu="Ψ",vvu="ψ",Cvu=" ",bvu="𝔔",kvu="𝔮",Fvu="⨌",yvu="𝕢",Avu="ℚ",_vu="⁗",Svu="𝒬",Bvu="𝓆",wvu="ℍ",Lvu="⨖",zvu="?",Mvu="≟",Tvu='"',Nvu='"',Pvu="⇛",Rvu="∽̱",Ivu="Ŕ",Ovu="ŕ",jvu="√",Hvu="⦳",Vvu="⟩",$vu="⟫",Kvu="⦒",Wvu="⦥",Gvu="⟩",Uvu="»",qvu="⥵",Jvu="⇥",Zvu="⤠",Yvu="⤳",Qvu="→",Xvu="↠",e6u="⇒",t6u="⤞",u6u="↪",n6u="↬",i6u="⥅",r6u="⥴",a6u="⤖",o6u="↣",s6u="↝",l6u="⤚",c6u="⤜",d6u="∶",h6u="ℚ",E6u="⤍",m6u="⤏",g6u="⤐",f6u="❳",p6u="}",D6u="]",x6u="⦌",v6u="⦎",C6u="⦐",b6u="Ř",k6u="ř",F6u="Ŗ",y6u="ŗ",A6u="⌉",_6u="}",S6u="Р",B6u="р",w6u="⤷",L6u="⥩",z6u="”",M6u="”",T6u="↳",N6u="ℜ",P6u="ℛ",R6u="ℜ",I6u="ℝ",O6u="ℜ",j6u="▭",H6u="®",V6u="®",$6u="∋",K6u="⇋",W6u="⥯",G6u="⥽",U6u="⌋",q6u="𝔯",J6u="ℜ",Z6u="⥤",Y6u="⇁",Q6u="⇀",X6u="⥬",eCu="Ρ",tCu="ρ",uCu="ϱ",nCu="⟩",iCu="⇥",rCu="→",aCu="→",oCu="⇒",sCu="⇄",lCu="↣",cCu="⌉",dCu="⟧",hCu="⥝",ECu="⥕",mCu="⇂",gCu="⌋",fCu="⇁",pCu="⇀",DCu="⇄",xCu="⇌",vCu="⇉",CCu="↝",bCu="↦",kCu="⊢",FCu="⥛",yCu="⋌",ACu="⧐",_Cu="⊳",SCu="⊵",BCu="⥏",wCu="⥜",LCu="⥔",zCu="↾",MCu="⥓",TCu="⇀",NCu="˚",PCu="≓",RCu="⇄",ICu="⇌",OCu="‏",jCu="⎱",HCu="⎱",VCu="⫮",$Cu="⟭",KCu="⇾",WCu="⟧",GCu="⦆",UCu="𝕣",qCu="ℝ",JCu="⨮",ZCu="⨵",YCu="⥰",QCu=")",XCu="⦔",ebu="⨒",tbu="⇉",ubu="⇛",nbu="›",ibu="𝓇",rbu="ℛ",abu="↱",obu="↱",sbu="]",lbu="’",cbu="’",dbu="⋌",hbu="⋊",Ebu="▹",mbu="⊵",gbu="▸",fbu="⧎",pbu="⧴",Dbu="⥨",xbu="℞",vbu="Ś",Cbu="ś",bbu="‚",kbu="⪸",Fbu="Š",ybu="š",Abu="⪼",_bu="≻",Sbu="≽",Bbu="⪰",wbu="⪴",Lbu="Ş",zbu="ş",Mbu="Ŝ",Tbu="ŝ",Nbu="⪺",Pbu="⪶",Rbu="⋩",Ibu="⨓",Obu="≿",jbu="С",Hbu="с",Vbu="⊡",$bu="⋅",Kbu="⩦",Wbu="⤥",Gbu="↘",Ubu="⇘",qbu="↘",Jbu="§",Zbu=";",Ybu="⤩",Qbu="∖",Xbu="∖",e2u="✶",t2u="𝔖",u2u="𝔰",n2u="⌢",i2u="♯",r2u="Щ",a2u="щ",o2u="Ш",s2u="ш",l2u="↓",c2u="←",d2u="∣",h2u="∥",E2u="→",m2u="↑",g2u="­",f2u="Σ",p2u="σ",D2u="ς",x2u="ς",v2u="∼",C2u="⩪",b2u="≃",k2u="≃",F2u="⪞",y2u="⪠",A2u="⪝",_2u="⪟",S2u="≆",B2u="⨤",w2u="⥲",L2u="←",z2u="∘",M2u="∖",T2u="⨳",N2u="⧤",P2u="∣",R2u="⌣",I2u="⪪",O2u="⪬",j2u="⪬︀",H2u="Ь",V2u="ь",$2u="⌿",K2u="⧄",W2u="/",G2u="𝕊",U2u="𝕤",q2u="♠",J2u="♠",Z2u="∥",Y2u="⊓",Q2u="⊓︀",X2u="⊔",eku="⊔︀",tku="√",uku="⊏",nku="⊑",iku="⊏",rku="⊑",aku="⊐",oku="⊒",sku="⊐",lku="⊒",cku="□",dku="□",hku="⊓",Eku="⊏",mku="⊑",gku="⊐",fku="⊒",pku="⊔",Dku="▪",xku="□",vku="▪",Cku="→",bku="𝒮",kku="𝓈",Fku="∖",yku="⌣",Aku="⋆",_ku="⋆",Sku="☆",Bku="★",wku="ϵ",Lku="ϕ",zku="¯",Mku="⊂",Tku="⋐",Nku="⪽",Pku="⫅",Rku="⊆",Iku="⫃",Oku="⫁",jku="⫋",Hku="⊊",Vku="⪿",$ku="⥹",Kku="⊂",Wku="⋐",Gku="⊆",Uku="⫅",qku="⊆",Jku="⊊",Zku="⫋",Yku="⫇",Qku="⫕",Xku="⫓",eFu="⪸",tFu="≻",uFu="≽",nFu="≻",iFu="⪰",rFu="≽",aFu="≿",oFu="⪰",sFu="⪺",lFu="⪶",cFu="⋩",dFu="≿",hFu="∋",EFu="∑",mFu="∑",gFu="♪",fFu="¹",pFu="²",DFu="³",xFu="⊃",vFu="⋑",CFu="⪾",bFu="⫘",kFu="⫆",FFu="⊇",yFu="⫄",AFu="⊃",_Fu="⊇",SFu="⟉",BFu="⫗",wFu="⥻",LFu="⫂",zFu="⫌",MFu="⊋",TFu="⫀",NFu="⊃",PFu="⋑",RFu="⊇",IFu="⫆",OFu="⊋",jFu="⫌",HFu="⫈",VFu="⫔",$Fu="⫖",KFu="⤦",WFu="↙",GFu="⇙",UFu="↙",qFu="⤪",JFu="ß",ZFu=" ",YFu="⌖",QFu="Τ",XFu="τ",eyu="⎴",tyu="Ť",uyu="ť",nyu="Ţ",iyu="ţ",ryu="Т",ayu="т",oyu="⃛",syu="⌕",lyu="𝔗",cyu="𝔱",dyu="∴",hyu="∴",Eyu="∴",myu="Θ",gyu="θ",fyu="ϑ",pyu="ϑ",Dyu="≈",xyu="∼",vyu="  ",Cyu=" ",byu=" ",kyu="≈",Fyu="∼",yyu="Þ",Ayu="þ",_yu="˜",Syu="∼",Byu="≃",wyu="≅",Lyu="≈",zyu="⨱",Myu="⊠",Tyu="×",Nyu="⨰",Pyu="∭",Ryu="⤨",Iyu="⌶",Oyu="⫱",jyu="⊤",Hyu="𝕋",Vyu="𝕥",$yu="⫚",Kyu="⤩",Wyu="‴",Gyu="™",Uyu="™",qyu="▵",Jyu="▿",Zyu="◃",Yyu="⊴",Qyu="≜",Xyu="▹",eAu="⊵",tAu="◬",uAu="≜",nAu="⨺",iAu="⃛",rAu="⨹",aAu="⧍",oAu="⨻",sAu="⏢",lAu="𝒯",cAu="𝓉",dAu="Ц",hAu="ц",EAu="Ћ",mAu="ћ",gAu="Ŧ",fAu="ŧ",pAu="≬",DAu="↞",xAu="↠",vAu="Ú",CAu="ú",bAu="↑",kAu="↟",FAu="⇑",yAu="⥉",AAu="Ў",_Au="ў",SAu="Ŭ",BAu="ŭ",wAu="Û",LAu="û",zAu="У",MAu="у",TAu="⇅",NAu="Ű",PAu="ű",RAu="⥮",IAu="⥾",OAu="𝔘",jAu="𝔲",HAu="Ù",VAu="ù",$Au="⥣",KAu="↿",WAu="↾",GAu="▀",UAu="⌜",qAu="⌜",JAu="⌏",ZAu="◸",YAu="Ū",QAu="ū",XAu="¨",e7u="_",t7u="⏟",u7u="⎵",n7u="⏝",i7u="⋃",r7u="⊎",a7u="Ų",o7u="ų",s7u="𝕌",l7u="𝕦",c7u="⤒",d7u="↑",h7u="↑",E7u="⇑",m7u="⇅",g7u="↕",f7u="↕",p7u="⇕",D7u="⥮",x7u="↿",v7u="↾",C7u="⊎",b7u="↖",k7u="↗",F7u="υ",y7u="ϒ",A7u="ϒ",_7u="Υ",S7u="υ",B7u="↥",w7u="⊥",L7u="⇈",z7u="⌝",M7u="⌝",T7u="⌎",N7u="Ů",P7u="ů",R7u="◹",I7u="𝒰",O7u="𝓊",j7u="⋰",H7u="Ũ",V7u="ũ",$7u="▵",K7u="▴",W7u="⇈",G7u="Ü",U7u="ü",q7u="⦧",J7u="⦜",Z7u="ϵ",Y7u="ϰ",Q7u="∅",X7u="ϕ",e9u="ϖ",t9u="∝",u9u="↕",n9u="⇕",i9u="ϱ",r9u="ς",a9u="⊊︀",o9u="⫋︀",s9u="⊋︀",l9u="⫌︀",c9u="ϑ",d9u="⊲",h9u="⊳",E9u="⫨",m9u="⫫",g9u="⫩",f9u="В",p9u="в",D9u="⊢",x9u="⊨",v9u="⊩",C9u="⊫",b9u="⫦",k9u="⊻",F9u="∨",y9u="⋁",A9u="≚",_9u="⋮",S9u="|",B9u="‖",w9u="|",L9u="‖",z9u="∣",M9u="|",T9u="❘",N9u="≀",P9u=" ",R9u="𝔙",I9u="𝔳",O9u="⊲",j9u="⊂⃒",H9u="⊃⃒",V9u="𝕍",$9u="𝕧",K9u="∝",W9u="⊳",G9u="𝒱",U9u="𝓋",q9u="⫋︀",J9u="⊊︀",Z9u="⫌︀",Y9u="⊋︀",Q9u="⊪",X9u="⦚",e_u="Ŵ",t_u="ŵ",u_u="⩟",n_u="∧",i_u="⋀",r_u="≙",a_u="℘",o_u="𝔚",s_u="𝔴",l_u="𝕎",c_u="𝕨",d_u="℘",h_u="≀",E_u="≀",m_u="𝒲",g_u="𝓌",f_u="⋂",p_u="◯",D_u="⋃",x_u="▽",v_u="𝔛",C_u="𝔵",b_u="⟷",k_u="⟺",F_u="Ξ",y_u="ξ",A_u="⟵",__u="⟸",S_u="⟼",B_u="⋻",w_u="⨀",L_u="𝕏",z_u="𝕩",M_u="⨁",T_u="⨂",N_u="⟶",P_u="⟹",R_u="𝒳",I_u="𝓍",O_u="⨆",j_u="⨄",H_u="△",V_u="⋁",$_u="⋀",K_u="Ý",W_u="ý",G_u="Я",U_u="я",q_u="Ŷ",J_u="ŷ",Z_u="Ы",Y_u="ы",Q_u="¥",X_u="𝔜",eSu="𝔶",tSu="Ї",uSu="ї",nSu="𝕐",iSu="𝕪",rSu="𝒴",aSu="𝓎",oSu="Ю",sSu="ю",lSu="ÿ",cSu="Ÿ",dSu="Ź",hSu="ź",ESu="Ž",mSu="ž",gSu="З",fSu="з",pSu="Ż",DSu="ż",xSu="ℨ",vSu="​",CSu="Ζ",bSu="ζ",kSu="𝔷",FSu="ℨ",ySu="Ж",ASu="ж",_Su="⇝",SSu="𝕫",BSu="ℤ",wSu="𝒵",LSu="𝓏",zSu="‍",MSu="‌",TSu={Aacute:pQt,aacute:DQt,Abreve:xQt,abreve:vQt,ac:CQt,acd:bQt,acE:kQt,Acirc:FQt,acirc:yQt,acute:AQt,Acy:_Qt,acy:SQt,AElig:BQt,aelig:wQt,af:LQt,Afr:zQt,afr:MQt,Agrave:TQt,agrave:NQt,alefsym:PQt,aleph:RQt,Alpha:IQt,alpha:OQt,Amacr:jQt,amacr:HQt,amalg:VQt,amp:$Qt,AMP:KQt,andand:WQt,And:GQt,and:UQt,andd:qQt,andslope:JQt,andv:ZQt,ang:YQt,ange:QQt,angle:XQt,angmsdaa:eXt,angmsdab:tXt,angmsdac:uXt,angmsdad:nXt,angmsdae:iXt,angmsdaf:rXt,angmsdag:aXt,angmsdah:oXt,angmsd:sXt,angrt:lXt,angrtvb:cXt,angrtvbd:dXt,angsph:hXt,angst:EXt,angzarr:mXt,Aogon:gXt,aogon:fXt,Aopf:pXt,aopf:DXt,apacir:xXt,ap:vXt,apE:CXt,ape:bXt,apid:kXt,apos:FXt,ApplyFunction:yXt,approx:AXt,approxeq:_Xt,Aring:SXt,aring:BXt,Ascr:wXt,ascr:LXt,Assign:zXt,ast:MXt,asymp:TXt,asympeq:NXt,Atilde:PXt,atilde:RXt,Auml:IXt,auml:OXt,awconint:jXt,awint:HXt,backcong:VXt,backepsilon:$Xt,backprime:KXt,backsim:WXt,backsimeq:GXt,Backslash:UXt,Barv:qXt,barvee:JXt,barwed:ZXt,Barwed:YXt,barwedge:QXt,bbrk:XXt,bbrktbrk:eeu,bcong:teu,Bcy:ueu,bcy:neu,bdquo:ieu,becaus:reu,because:aeu,Because:oeu,bemptyv:seu,bepsi:leu,bernou:ceu,Bernoullis:deu,Beta:heu,beta:Eeu,beth:meu,between:geu,Bfr:feu,bfr:peu,bigcap:Deu,bigcirc:xeu,bigcup:veu,bigodot:Ceu,bigoplus:beu,bigotimes:keu,bigsqcup:Feu,bigstar:yeu,bigtriangledown:Aeu,bigtriangleup:_eu,biguplus:Seu,bigvee:Beu,bigwedge:weu,bkarow:Leu,blacklozenge:zeu,blacksquare:Meu,blacktriangle:Teu,blacktriangledown:Neu,blacktriangleleft:Peu,blacktriangleright:Reu,blank:Ieu,blk12:Oeu,blk14:jeu,blk34:Heu,block:Veu,bne:$eu,bnequiv:Keu,bNot:Weu,bnot:Geu,Bopf:Ueu,bopf:qeu,bot:Jeu,bottom:Zeu,bowtie:Yeu,boxbox:Qeu,boxdl:Xeu,boxdL:etu,boxDl:ttu,boxDL:utu,boxdr:ntu,boxdR:itu,boxDr:rtu,boxDR:atu,boxh:otu,boxH:stu,boxhd:ltu,boxHd:ctu,boxhD:dtu,boxHD:htu,boxhu:Etu,boxHu:mtu,boxhU:gtu,boxHU:ftu,boxminus:ptu,boxplus:Dtu,boxtimes:xtu,boxul:vtu,boxuL:Ctu,boxUl:btu,boxUL:ktu,boxur:Ftu,boxuR:ytu,boxUr:Atu,boxUR:_tu,boxv:Stu,boxV:Btu,boxvh:wtu,boxvH:Ltu,boxVh:ztu,boxVH:Mtu,boxvl:Ttu,boxvL:Ntu,boxVl:Ptu,boxVL:Rtu,boxvr:Itu,boxvR:Otu,boxVr:jtu,boxVR:Htu,bprime:Vtu,breve:$tu,Breve:Ktu,brvbar:Wtu,bscr:Gtu,Bscr:Utu,bsemi:qtu,bsim:Jtu,bsime:Ztu,bsolb:Ytu,bsol:Qtu,bsolhsub:Xtu,bull:euu,bullet:tuu,bump:uuu,bumpE:nuu,bumpe:iuu,Bumpeq:ruu,bumpeq:auu,Cacute:ouu,cacute:suu,capand:luu,capbrcup:cuu,capcap:duu,cap:huu,Cap:Euu,capcup:muu,capdot:guu,CapitalDifferentialD:fuu,caps:puu,caret:Duu,caron:xuu,Cayleys:vuu,ccaps:Cuu,Ccaron:buu,ccaron:kuu,Ccedil:Fuu,ccedil:yuu,Ccirc:Auu,ccirc:_uu,Cconint:Suu,ccups:Buu,ccupssm:wuu,Cdot:Luu,cdot:zuu,cedil:Muu,Cedilla:Tuu,cemptyv:Nuu,cent:Puu,centerdot:Ruu,CenterDot:Iuu,cfr:Ouu,Cfr:juu,CHcy:Huu,chcy:Vuu,check:$uu,checkmark:Kuu,Chi:Wuu,chi:Guu,circ:Uuu,circeq:quu,circlearrowleft:Juu,circlearrowright:Zuu,circledast:Yuu,circledcirc:Quu,circleddash:Xuu,CircleDot:enu,circledR:tnu,circledS:unu,CircleMinus:nnu,CirclePlus:inu,CircleTimes:rnu,cir:anu,cirE:onu,cire:snu,cirfnint:lnu,cirmid:cnu,cirscir:dnu,ClockwiseContourIntegral:hnu,CloseCurlyDoubleQuote:Enu,CloseCurlyQuote:mnu,clubs:gnu,clubsuit:fnu,colon:pnu,Colon:Dnu,Colone:xnu,colone:vnu,coloneq:Cnu,comma:bnu,commat:knu,comp:Fnu,compfn:ynu,complement:Anu,complexes:_nu,cong:Snu,congdot:Bnu,Congruent:wnu,conint:Lnu,Conint:znu,ContourIntegral:Mnu,copf:Tnu,Copf:Nnu,coprod:Pnu,Coproduct:Rnu,copy:Inu,COPY:Onu,copysr:jnu,CounterClockwiseContourIntegral:Hnu,crarr:Vnu,cross:$nu,Cross:Knu,Cscr:Wnu,cscr:Gnu,csub:Unu,csube:qnu,csup:Jnu,csupe:Znu,ctdot:Ynu,cudarrl:Qnu,cudarrr:Xnu,cuepr:eiu,cuesc:tiu,cularr:uiu,cularrp:niu,cupbrcap:iiu,cupcap:riu,CupCap:aiu,cup:oiu,Cup:siu,cupcup:liu,cupdot:ciu,cupor:diu,cups:hiu,curarr:Eiu,curarrm:miu,curlyeqprec:giu,curlyeqsucc:fiu,curlyvee:piu,curlywedge:Diu,curren:xiu,curvearrowleft:viu,curvearrowright:Ciu,cuvee:biu,cuwed:kiu,cwconint:Fiu,cwint:yiu,cylcty:Aiu,dagger:_iu,Dagger:Siu,daleth:Biu,darr:wiu,Darr:Liu,dArr:ziu,dash:Miu,Dashv:Tiu,dashv:Niu,dbkarow:Piu,dblac:Riu,Dcaron:Iiu,dcaron:Oiu,Dcy:jiu,dcy:Hiu,ddagger:Viu,ddarr:$iu,DD:Kiu,dd:Wiu,DDotrahd:Giu,ddotseq:Uiu,deg:qiu,Del:Jiu,Delta:Ziu,delta:Yiu,demptyv:Qiu,dfisht:Xiu,Dfr:eru,dfr:tru,dHar:uru,dharl:nru,dharr:iru,DiacriticalAcute:rru,DiacriticalDot:aru,DiacriticalDoubleAcute:oru,DiacriticalGrave:sru,DiacriticalTilde:lru,diam:cru,diamond:dru,Diamond:hru,diamondsuit:Eru,diams:mru,die:gru,DifferentialD:fru,digamma:pru,disin:Dru,div:xru,divide:vru,divideontimes:Cru,divonx:bru,DJcy:kru,djcy:Fru,dlcorn:yru,dlcrop:Aru,dollar:_ru,Dopf:Sru,dopf:Bru,Dot:wru,dot:Lru,DotDot:zru,doteq:Mru,doteqdot:Tru,DotEqual:Nru,dotminus:Pru,dotplus:Rru,dotsquare:Iru,doublebarwedge:Oru,DoubleContourIntegral:jru,DoubleDot:Hru,DoubleDownArrow:Vru,DoubleLeftArrow:$ru,DoubleLeftRightArrow:Kru,DoubleLeftTee:Wru,DoubleLongLeftArrow:Gru,DoubleLongLeftRightArrow:Uru,DoubleLongRightArrow:qru,DoubleRightArrow:Jru,DoubleRightTee:Zru,DoubleUpArrow:Yru,DoubleUpDownArrow:Qru,DoubleVerticalBar:Xru,DownArrowBar:eau,downarrow:tau,DownArrow:uau,Downarrow:nau,DownArrowUpArrow:iau,DownBreve:rau,downdownarrows:aau,downharpoonleft:oau,downharpoonright:sau,DownLeftRightVector:lau,DownLeftTeeVector:cau,DownLeftVectorBar:dau,DownLeftVector:hau,DownRightTeeVector:Eau,DownRightVectorBar:mau,DownRightVector:gau,DownTeeArrow:fau,DownTee:pau,drbkarow:Dau,drcorn:xau,drcrop:vau,Dscr:Cau,dscr:bau,DScy:kau,dscy:Fau,dsol:yau,Dstrok:Aau,dstrok:_au,dtdot:Sau,dtri:Bau,dtrif:wau,duarr:Lau,duhar:zau,dwangle:Mau,DZcy:Tau,dzcy:Nau,dzigrarr:Pau,Eacute:Rau,eacute:Iau,easter:Oau,Ecaron:jau,ecaron:Hau,Ecirc:Vau,ecirc:$au,ecir:Kau,ecolon:Wau,Ecy:Gau,ecy:Uau,eDDot:qau,Edot:Jau,edot:Zau,eDot:Yau,ee:Qau,efDot:Xau,Efr:eou,efr:tou,eg:uou,Egrave:nou,egrave:iou,egs:rou,egsdot:aou,el:oou,Element:sou,elinters:lou,ell:cou,els:dou,elsdot:hou,Emacr:Eou,emacr:mou,empty:gou,emptyset:fou,EmptySmallSquare:pou,emptyv:Dou,EmptyVerySmallSquare:xou,emsp13:vou,emsp14:Cou,emsp:bou,ENG:kou,eng:Fou,ensp:you,Eogon:Aou,eogon:_ou,Eopf:Sou,eopf:Bou,epar:wou,eparsl:Lou,eplus:zou,epsi:Mou,Epsilon:Tou,epsilon:Nou,epsiv:Pou,eqcirc:Rou,eqcolon:Iou,eqsim:Oou,eqslantgtr:jou,eqslantless:Hou,Equal:Vou,equals:$ou,EqualTilde:Kou,equest:Wou,Equilibrium:Gou,equiv:Uou,equivDD:qou,eqvparsl:Jou,erarr:Zou,erDot:You,escr:Qou,Escr:Xou,esdot:esu,Esim:tsu,esim:usu,Eta:nsu,eta:isu,ETH:rsu,eth:asu,Euml:osu,euml:ssu,euro:lsu,excl:csu,exist:dsu,Exists:hsu,expectation:Esu,exponentiale:msu,ExponentialE:gsu,fallingdotseq:fsu,Fcy:psu,fcy:Dsu,female:xsu,ffilig:vsu,fflig:Csu,ffllig:bsu,Ffr:ksu,ffr:Fsu,filig:ysu,FilledSmallSquare:Asu,FilledVerySmallSquare:_su,fjlig:Ssu,flat:Bsu,fllig:wsu,fltns:Lsu,fnof:zsu,Fopf:Msu,fopf:Tsu,forall:Nsu,ForAll:Psu,fork:Rsu,forkv:Isu,Fouriertrf:Osu,fpartint:jsu,frac12:Hsu,frac13:Vsu,frac14:$su,frac15:Ksu,frac16:Wsu,frac18:Gsu,frac23:Usu,frac25:qsu,frac34:Jsu,frac35:Zsu,frac38:Ysu,frac45:Qsu,frac56:Xsu,frac58:e0u,frac78:t0u,frasl:u0u,frown:n0u,fscr:i0u,Fscr:r0u,gacute:a0u,Gamma:o0u,gamma:s0u,Gammad:l0u,gammad:c0u,gap:d0u,Gbreve:h0u,gbreve:E0u,Gcedil:m0u,Gcirc:g0u,gcirc:f0u,Gcy:p0u,gcy:D0u,Gdot:x0u,gdot:v0u,ge:C0u,gE:b0u,gEl:k0u,gel:F0u,geq:y0u,geqq:A0u,geqslant:_0u,gescc:S0u,ges:B0u,gesdot:w0u,gesdoto:L0u,gesdotol:z0u,gesl:M0u,gesles:T0u,Gfr:N0u,gfr:P0u,gg:R0u,Gg:I0u,ggg:O0u,gimel:j0u,GJcy:H0u,gjcy:V0u,gla:$0u,gl:K0u,glE:W0u,glj:G0u,gnap:U0u,gnapprox:q0u,gne:J0u,gnE:Z0u,gneq:Y0u,gneqq:Q0u,gnsim:X0u,Gopf:elu,gopf:tlu,grave:ulu,GreaterEqual:nlu,GreaterEqualLess:ilu,GreaterFullEqual:rlu,GreaterGreater:alu,GreaterLess:olu,GreaterSlantEqual:slu,GreaterTilde:llu,Gscr:clu,gscr:dlu,gsim:hlu,gsime:Elu,gsiml:mlu,gtcc:glu,gtcir:flu,gt:plu,GT:Dlu,Gt:xlu,gtdot:vlu,gtlPar:Clu,gtquest:blu,gtrapprox:klu,gtrarr:Flu,gtrdot:ylu,gtreqless:Alu,gtreqqless:_lu,gtrless:Slu,gtrsim:Blu,gvertneqq:wlu,gvnE:Llu,Hacek:zlu,hairsp:Mlu,half:Tlu,hamilt:Nlu,HARDcy:Plu,hardcy:Rlu,harrcir:Ilu,harr:Olu,hArr:jlu,harrw:Hlu,Hat:Vlu,hbar:$lu,Hcirc:Klu,hcirc:Wlu,hearts:Glu,heartsuit:Ulu,hellip:qlu,hercon:Jlu,hfr:Zlu,Hfr:Ylu,HilbertSpace:Qlu,hksearow:Xlu,hkswarow:ecu,hoarr:tcu,homtht:ucu,hookleftarrow:ncu,hookrightarrow:icu,hopf:rcu,Hopf:acu,horbar:ocu,HorizontalLine:scu,hscr:lcu,Hscr:ccu,hslash:dcu,Hstrok:hcu,hstrok:Ecu,HumpDownHump:mcu,HumpEqual:gcu,hybull:fcu,hyphen:pcu,Iacute:Dcu,iacute:xcu,ic:vcu,Icirc:Ccu,icirc:bcu,Icy:kcu,icy:Fcu,Idot:ycu,IEcy:Acu,iecy:_cu,iexcl:Scu,iff:Bcu,ifr:wcu,Ifr:Lcu,Igrave:zcu,igrave:Mcu,ii:Tcu,iiiint:Ncu,iiint:Pcu,iinfin:Rcu,iiota:Icu,IJlig:Ocu,ijlig:jcu,Imacr:Hcu,imacr:Vcu,image:$cu,ImaginaryI:Kcu,imagline:Wcu,imagpart:Gcu,imath:Ucu,Im:qcu,imof:Jcu,imped:Zcu,Implies:Ycu,incare:Qcu,in:"∈",infin:Xcu,infintie:edu,inodot:tdu,intcal:udu,int:ndu,Int:idu,integers:rdu,Integral:adu,intercal:odu,Intersection:sdu,intlarhk:ldu,intprod:cdu,InvisibleComma:ddu,InvisibleTimes:hdu,IOcy:Edu,iocy:mdu,Iogon:gdu,iogon:fdu,Iopf:pdu,iopf:Ddu,Iota:xdu,iota:vdu,iprod:Cdu,iquest:bdu,iscr:kdu,Iscr:Fdu,isin:ydu,isindot:Adu,isinE:_du,isins:Sdu,isinsv:Bdu,isinv:wdu,it:Ldu,Itilde:zdu,itilde:Mdu,Iukcy:Tdu,iukcy:Ndu,Iuml:Pdu,iuml:Rdu,Jcirc:Idu,jcirc:Odu,Jcy:jdu,jcy:Hdu,Jfr:Vdu,jfr:$du,jmath:Kdu,Jopf:Wdu,jopf:Gdu,Jscr:Udu,jscr:qdu,Jsercy:Jdu,jsercy:Zdu,Jukcy:Ydu,jukcy:Qdu,Kappa:Xdu,kappa:e1u,kappav:t1u,Kcedil:u1u,kcedil:n1u,Kcy:i1u,kcy:r1u,Kfr:a1u,kfr:o1u,kgreen:s1u,KHcy:l1u,khcy:c1u,KJcy:d1u,kjcy:h1u,Kopf:E1u,kopf:m1u,Kscr:g1u,kscr:f1u,lAarr:p1u,Lacute:D1u,lacute:x1u,laemptyv:v1u,lagran:C1u,Lambda:b1u,lambda:k1u,lang:F1u,Lang:y1u,langd:A1u,langle:_1u,lap:S1u,Laplacetrf:B1u,laquo:w1u,larrb:L1u,larrbfs:z1u,larr:M1u,Larr:T1u,lArr:N1u,larrfs:P1u,larrhk:R1u,larrlp:I1u,larrpl:O1u,larrsim:j1u,larrtl:H1u,latail:V1u,lAtail:$1u,lat:K1u,late:W1u,lates:G1u,lbarr:U1u,lBarr:q1u,lbbrk:J1u,lbrace:Z1u,lbrack:Y1u,lbrke:Q1u,lbrksld:X1u,lbrkslu:ehu,Lcaron:thu,lcaron:uhu,Lcedil:nhu,lcedil:ihu,lceil:rhu,lcub:ahu,Lcy:ohu,lcy:shu,ldca:lhu,ldquo:chu,ldquor:dhu,ldrdhar:hhu,ldrushar:Ehu,ldsh:mhu,le:ghu,lE:fhu,LeftAngleBracket:phu,LeftArrowBar:Dhu,leftarrow:xhu,LeftArrow:vhu,Leftarrow:Chu,LeftArrowRightArrow:bhu,leftarrowtail:khu,LeftCeiling:Fhu,LeftDoubleBracket:yhu,LeftDownTeeVector:Ahu,LeftDownVectorBar:_hu,LeftDownVector:Shu,LeftFloor:Bhu,leftharpoondown:whu,leftharpoonup:Lhu,leftleftarrows:zhu,leftrightarrow:Mhu,LeftRightArrow:Thu,Leftrightarrow:Nhu,leftrightarrows:Phu,leftrightharpoons:Rhu,leftrightsquigarrow:Ihu,LeftRightVector:Ohu,LeftTeeArrow:jhu,LeftTee:Hhu,LeftTeeVector:Vhu,leftthreetimes:$hu,LeftTriangleBar:Khu,LeftTriangle:Whu,LeftTriangleEqual:Ghu,LeftUpDownVector:Uhu,LeftUpTeeVector:qhu,LeftUpVectorBar:Jhu,LeftUpVector:Zhu,LeftVectorBar:Yhu,LeftVector:Qhu,lEg:Xhu,leg:e4u,leq:t4u,leqq:u4u,leqslant:n4u,lescc:i4u,les:r4u,lesdot:a4u,lesdoto:o4u,lesdotor:s4u,lesg:l4u,lesges:c4u,lessapprox:d4u,lessdot:h4u,lesseqgtr:E4u,lesseqqgtr:m4u,LessEqualGreater:g4u,LessFullEqual:f4u,LessGreater:p4u,lessgtr:D4u,LessLess:x4u,lesssim:v4u,LessSlantEqual:C4u,LessTilde:b4u,lfisht:k4u,lfloor:F4u,Lfr:y4u,lfr:A4u,lg:_4u,lgE:S4u,lHar:B4u,lhard:w4u,lharu:L4u,lharul:z4u,lhblk:M4u,LJcy:T4u,ljcy:N4u,llarr:P4u,ll:R4u,Ll:I4u,llcorner:O4u,Lleftarrow:j4u,llhard:H4u,lltri:V4u,Lmidot:$4u,lmidot:K4u,lmoustache:W4u,lmoust:G4u,lnap:U4u,lnapprox:q4u,lne:J4u,lnE:Z4u,lneq:Y4u,lneqq:Q4u,lnsim:X4u,loang:eEu,loarr:tEu,lobrk:uEu,longleftarrow:nEu,LongLeftArrow:iEu,Longleftarrow:rEu,longleftrightarrow:aEu,LongLeftRightArrow:oEu,Longleftrightarrow:sEu,longmapsto:lEu,longrightarrow:cEu,LongRightArrow:dEu,Longrightarrow:hEu,looparrowleft:EEu,looparrowright:mEu,lopar:gEu,Lopf:fEu,lopf:pEu,loplus:DEu,lotimes:xEu,lowast:vEu,lowbar:CEu,LowerLeftArrow:bEu,LowerRightArrow:kEu,loz:FEu,lozenge:yEu,lozf:AEu,lpar:_Eu,lparlt:SEu,lrarr:BEu,lrcorner:wEu,lrhar:LEu,lrhard:zEu,lrm:MEu,lrtri:TEu,lsaquo:NEu,lscr:PEu,Lscr:REu,lsh:IEu,Lsh:OEu,lsim:jEu,lsime:HEu,lsimg:VEu,lsqb:$Eu,lsquo:KEu,lsquor:WEu,Lstrok:GEu,lstrok:UEu,ltcc:qEu,ltcir:JEu,lt:ZEu,LT:YEu,Lt:QEu,ltdot:XEu,lthree:emu,ltimes:tmu,ltlarr:umu,ltquest:nmu,ltri:imu,ltrie:rmu,ltrif:amu,ltrPar:omu,lurdshar:smu,luruhar:lmu,lvertneqq:cmu,lvnE:dmu,macr:hmu,male:Emu,malt:mmu,maltese:gmu,Map:"⤅",map:fmu,mapsto:pmu,mapstodown:Dmu,mapstoleft:xmu,mapstoup:vmu,marker:Cmu,mcomma:bmu,Mcy:kmu,mcy:Fmu,mdash:ymu,mDDot:Amu,measuredangle:_mu,MediumSpace:Smu,Mellintrf:Bmu,Mfr:wmu,mfr:Lmu,mho:zmu,micro:Mmu,midast:Tmu,midcir:Nmu,mid:Pmu,middot:Rmu,minusb:Imu,minus:Omu,minusd:jmu,minusdu:Hmu,MinusPlus:Vmu,mlcp:$mu,mldr:Kmu,mnplus:Wmu,models:Gmu,Mopf:Umu,mopf:qmu,mp:Jmu,mscr:Zmu,Mscr:Ymu,mstpos:Qmu,Mu:Xmu,mu:egu,multimap:tgu,mumap:ugu,nabla:ngu,Nacute:igu,nacute:rgu,nang:agu,nap:ogu,napE:sgu,napid:lgu,napos:cgu,napprox:dgu,natural:hgu,naturals:Egu,natur:mgu,nbsp:ggu,nbump:fgu,nbumpe:pgu,ncap:Dgu,Ncaron:xgu,ncaron:vgu,Ncedil:Cgu,ncedil:bgu,ncong:kgu,ncongdot:Fgu,ncup:ygu,Ncy:Agu,ncy:_gu,ndash:Sgu,nearhk:Bgu,nearr:wgu,neArr:Lgu,nearrow:zgu,ne:Mgu,nedot:Tgu,NegativeMediumSpace:Ngu,NegativeThickSpace:Pgu,NegativeThinSpace:Rgu,NegativeVeryThinSpace:Igu,nequiv:Ogu,nesear:jgu,nesim:Hgu,NestedGreaterGreater:Vgu,NestedLessLess:$gu,NewLine:Kgu,nexist:Wgu,nexists:Ggu,Nfr:Ugu,nfr:qgu,ngE:Jgu,nge:Zgu,ngeq:Ygu,ngeqq:Qgu,ngeqslant:Xgu,nges:efu,nGg:tfu,ngsim:ufu,nGt:nfu,ngt:ifu,ngtr:rfu,nGtv:afu,nharr:ofu,nhArr:sfu,nhpar:lfu,ni:cfu,nis:dfu,nisd:hfu,niv:Efu,NJcy:mfu,njcy:gfu,nlarr:ffu,nlArr:pfu,nldr:Dfu,nlE:xfu,nle:vfu,nleftarrow:Cfu,nLeftarrow:bfu,nleftrightarrow:kfu,nLeftrightarrow:Ffu,nleq:yfu,nleqq:Afu,nleqslant:_fu,nles:Sfu,nless:Bfu,nLl:wfu,nlsim:Lfu,nLt:zfu,nlt:Mfu,nltri:Tfu,nltrie:Nfu,nLtv:Pfu,nmid:Rfu,NoBreak:Ifu,NonBreakingSpace:Ofu,nopf:jfu,Nopf:Hfu,Not:Vfu,not:$fu,NotCongruent:Kfu,NotCupCap:Wfu,NotDoubleVerticalBar:Gfu,NotElement:Ufu,NotEqual:qfu,NotEqualTilde:Jfu,NotExists:Zfu,NotGreater:Yfu,NotGreaterEqual:Qfu,NotGreaterFullEqual:Xfu,NotGreaterGreater:e3u,NotGreaterLess:t3u,NotGreaterSlantEqual:u3u,NotGreaterTilde:n3u,NotHumpDownHump:i3u,NotHumpEqual:r3u,notin:a3u,notindot:o3u,notinE:s3u,notinva:l3u,notinvb:c3u,notinvc:d3u,NotLeftTriangleBar:h3u,NotLeftTriangle:E3u,NotLeftTriangleEqual:m3u,NotLess:g3u,NotLessEqual:f3u,NotLessGreater:p3u,NotLessLess:D3u,NotLessSlantEqual:x3u,NotLessTilde:v3u,NotNestedGreaterGreater:C3u,NotNestedLessLess:b3u,notni:k3u,notniva:F3u,notnivb:y3u,notnivc:A3u,NotPrecedes:_3u,NotPrecedesEqual:S3u,NotPrecedesSlantEqual:B3u,NotReverseElement:w3u,NotRightTriangleBar:L3u,NotRightTriangle:z3u,NotRightTriangleEqual:M3u,NotSquareSubset:T3u,NotSquareSubsetEqual:N3u,NotSquareSuperset:P3u,NotSquareSupersetEqual:R3u,NotSubset:I3u,NotSubsetEqual:O3u,NotSucceeds:j3u,NotSucceedsEqual:H3u,NotSucceedsSlantEqual:V3u,NotSucceedsTilde:$3u,NotSuperset:K3u,NotSupersetEqual:W3u,NotTilde:G3u,NotTildeEqual:U3u,NotTildeFullEqual:q3u,NotTildeTilde:J3u,NotVerticalBar:Z3u,nparallel:Y3u,npar:Q3u,nparsl:X3u,npart:epu,npolint:tpu,npr:upu,nprcue:npu,nprec:ipu,npreceq:rpu,npre:apu,nrarrc:opu,nrarr:spu,nrArr:lpu,nrarrw:cpu,nrightarrow:dpu,nRightarrow:hpu,nrtri:Epu,nrtrie:mpu,nsc:gpu,nsccue:fpu,nsce:ppu,Nscr:Dpu,nscr:xpu,nshortmid:vpu,nshortparallel:Cpu,nsim:bpu,nsime:kpu,nsimeq:Fpu,nsmid:ypu,nspar:Apu,nsqsube:_pu,nsqsupe:Spu,nsub:Bpu,nsubE:wpu,nsube:Lpu,nsubset:zpu,nsubseteq:Mpu,nsubseteqq:Tpu,nsucc:Npu,nsucceq:Ppu,nsup:Rpu,nsupE:Ipu,nsupe:Opu,nsupset:jpu,nsupseteq:Hpu,nsupseteqq:Vpu,ntgl:$pu,Ntilde:Kpu,ntilde:Wpu,ntlg:Gpu,ntriangleleft:Upu,ntrianglelefteq:qpu,ntriangleright:Jpu,ntrianglerighteq:Zpu,Nu:Ypu,nu:Qpu,num:Xpu,numero:eDu,numsp:tDu,nvap:uDu,nvdash:nDu,nvDash:iDu,nVdash:rDu,nVDash:aDu,nvge:oDu,nvgt:sDu,nvHarr:lDu,nvinfin:cDu,nvlArr:dDu,nvle:hDu,nvlt:EDu,nvltrie:mDu,nvrArr:gDu,nvrtrie:fDu,nvsim:pDu,nwarhk:DDu,nwarr:xDu,nwArr:vDu,nwarrow:CDu,nwnear:bDu,Oacute:kDu,oacute:FDu,oast:yDu,Ocirc:ADu,ocirc:_Du,ocir:SDu,Ocy:BDu,ocy:wDu,odash:LDu,Odblac:zDu,odblac:MDu,odiv:TDu,odot:NDu,odsold:PDu,OElig:RDu,oelig:IDu,ofcir:ODu,Ofr:jDu,ofr:HDu,ogon:VDu,Ograve:$Du,ograve:KDu,ogt:WDu,ohbar:GDu,ohm:UDu,oint:qDu,olarr:JDu,olcir:ZDu,olcross:YDu,oline:QDu,olt:XDu,Omacr:e5u,omacr:t5u,Omega:u5u,omega:n5u,Omicron:i5u,omicron:r5u,omid:a5u,ominus:o5u,Oopf:s5u,oopf:l5u,opar:c5u,OpenCurlyDoubleQuote:d5u,OpenCurlyQuote:h5u,operp:E5u,oplus:m5u,orarr:g5u,Or:f5u,or:p5u,ord:D5u,order:x5u,orderof:v5u,ordf:C5u,ordm:b5u,origof:k5u,oror:F5u,orslope:y5u,orv:A5u,oS:_5u,Oscr:S5u,oscr:B5u,Oslash:w5u,oslash:L5u,osol:z5u,Otilde:M5u,otilde:T5u,otimesas:N5u,Otimes:P5u,otimes:R5u,Ouml:I5u,ouml:O5u,ovbar:j5u,OverBar:H5u,OverBrace:V5u,OverBracket:$5u,OverParenthesis:K5u,para:W5u,parallel:G5u,par:U5u,parsim:q5u,parsl:J5u,part:Z5u,PartialD:Y5u,Pcy:Q5u,pcy:X5u,percnt:exu,period:txu,permil:uxu,perp:nxu,pertenk:ixu,Pfr:rxu,pfr:axu,Phi:oxu,phi:sxu,phiv:lxu,phmmat:cxu,phone:dxu,Pi:hxu,pi:Exu,pitchfork:mxu,piv:gxu,planck:fxu,planckh:pxu,plankv:Dxu,plusacir:xxu,plusb:vxu,pluscir:Cxu,plus:bxu,plusdo:kxu,plusdu:Fxu,pluse:yxu,PlusMinus:Axu,plusmn:_xu,plussim:Sxu,plustwo:Bxu,pm:wxu,Poincareplane:Lxu,pointint:zxu,popf:Mxu,Popf:Txu,pound:Nxu,prap:Pxu,Pr:Rxu,pr:Ixu,prcue:Oxu,precapprox:jxu,prec:Hxu,preccurlyeq:Vxu,Precedes:$xu,PrecedesEqual:Kxu,PrecedesSlantEqual:Wxu,PrecedesTilde:Gxu,preceq:Uxu,precnapprox:qxu,precneqq:Jxu,precnsim:Zxu,pre:Yxu,prE:Qxu,precsim:Xxu,prime:evu,Prime:tvu,primes:uvu,prnap:nvu,prnE:ivu,prnsim:rvu,prod:avu,Product:ovu,profalar:svu,profline:lvu,profsurf:cvu,prop:dvu,Proportional:hvu,Proportion:Evu,propto:mvu,prsim:gvu,prurel:fvu,Pscr:pvu,pscr:Dvu,Psi:xvu,psi:vvu,puncsp:Cvu,Qfr:bvu,qfr:kvu,qint:Fvu,qopf:yvu,Qopf:Avu,qprime:_vu,Qscr:Svu,qscr:Bvu,quaternions:wvu,quatint:Lvu,quest:zvu,questeq:Mvu,quot:Tvu,QUOT:Nvu,rAarr:Pvu,race:Rvu,Racute:Ivu,racute:Ovu,radic:jvu,raemptyv:Hvu,rang:Vvu,Rang:$vu,rangd:Kvu,range:Wvu,rangle:Gvu,raquo:Uvu,rarrap:qvu,rarrb:Jvu,rarrbfs:Zvu,rarrc:Yvu,rarr:Qvu,Rarr:Xvu,rArr:e6u,rarrfs:t6u,rarrhk:u6u,rarrlp:n6u,rarrpl:i6u,rarrsim:r6u,Rarrtl:a6u,rarrtl:o6u,rarrw:s6u,ratail:l6u,rAtail:c6u,ratio:d6u,rationals:h6u,rbarr:E6u,rBarr:m6u,RBarr:g6u,rbbrk:f6u,rbrace:p6u,rbrack:D6u,rbrke:x6u,rbrksld:v6u,rbrkslu:C6u,Rcaron:b6u,rcaron:k6u,Rcedil:F6u,rcedil:y6u,rceil:A6u,rcub:_6u,Rcy:S6u,rcy:B6u,rdca:w6u,rdldhar:L6u,rdquo:z6u,rdquor:M6u,rdsh:T6u,real:N6u,realine:P6u,realpart:R6u,reals:I6u,Re:O6u,rect:j6u,reg:H6u,REG:V6u,ReverseElement:$6u,ReverseEquilibrium:K6u,ReverseUpEquilibrium:W6u,rfisht:G6u,rfloor:U6u,rfr:q6u,Rfr:J6u,rHar:Z6u,rhard:Y6u,rharu:Q6u,rharul:X6u,Rho:eCu,rho:tCu,rhov:uCu,RightAngleBracket:nCu,RightArrowBar:iCu,rightarrow:rCu,RightArrow:aCu,Rightarrow:oCu,RightArrowLeftArrow:sCu,rightarrowtail:lCu,RightCeiling:cCu,RightDoubleBracket:dCu,RightDownTeeVector:hCu,RightDownVectorBar:ECu,RightDownVector:mCu,RightFloor:gCu,rightharpoondown:fCu,rightharpoonup:pCu,rightleftarrows:DCu,rightleftharpoons:xCu,rightrightarrows:vCu,rightsquigarrow:CCu,RightTeeArrow:bCu,RightTee:kCu,RightTeeVector:FCu,rightthreetimes:yCu,RightTriangleBar:ACu,RightTriangle:_Cu,RightTriangleEqual:SCu,RightUpDownVector:BCu,RightUpTeeVector:wCu,RightUpVectorBar:LCu,RightUpVector:zCu,RightVectorBar:MCu,RightVector:TCu,ring:NCu,risingdotseq:PCu,rlarr:RCu,rlhar:ICu,rlm:OCu,rmoustache:jCu,rmoust:HCu,rnmid:VCu,roang:$Cu,roarr:KCu,robrk:WCu,ropar:GCu,ropf:UCu,Ropf:qCu,roplus:JCu,rotimes:ZCu,RoundImplies:YCu,rpar:QCu,rpargt:XCu,rppolint:ebu,rrarr:tbu,Rrightarrow:ubu,rsaquo:nbu,rscr:ibu,Rscr:rbu,rsh:abu,Rsh:obu,rsqb:sbu,rsquo:lbu,rsquor:cbu,rthree:dbu,rtimes:hbu,rtri:Ebu,rtrie:mbu,rtrif:gbu,rtriltri:fbu,RuleDelayed:pbu,ruluhar:Dbu,rx:xbu,Sacute:vbu,sacute:Cbu,sbquo:bbu,scap:kbu,Scaron:Fbu,scaron:ybu,Sc:Abu,sc:_bu,sccue:Sbu,sce:Bbu,scE:wbu,Scedil:Lbu,scedil:zbu,Scirc:Mbu,scirc:Tbu,scnap:Nbu,scnE:Pbu,scnsim:Rbu,scpolint:Ibu,scsim:Obu,Scy:jbu,scy:Hbu,sdotb:Vbu,sdot:$bu,sdote:Kbu,searhk:Wbu,searr:Gbu,seArr:Ubu,searrow:qbu,sect:Jbu,semi:Zbu,seswar:Ybu,setminus:Qbu,setmn:Xbu,sext:e2u,Sfr:t2u,sfr:u2u,sfrown:n2u,sharp:i2u,SHCHcy:r2u,shchcy:a2u,SHcy:o2u,shcy:s2u,ShortDownArrow:l2u,ShortLeftArrow:c2u,shortmid:d2u,shortparallel:h2u,ShortRightArrow:E2u,ShortUpArrow:m2u,shy:g2u,Sigma:f2u,sigma:p2u,sigmaf:D2u,sigmav:x2u,sim:v2u,simdot:C2u,sime:b2u,simeq:k2u,simg:F2u,simgE:y2u,siml:A2u,simlE:_2u,simne:S2u,simplus:B2u,simrarr:w2u,slarr:L2u,SmallCircle:z2u,smallsetminus:M2u,smashp:T2u,smeparsl:N2u,smid:P2u,smile:R2u,smt:I2u,smte:O2u,smtes:j2u,SOFTcy:H2u,softcy:V2u,solbar:$2u,solb:K2u,sol:W2u,Sopf:G2u,sopf:U2u,spades:q2u,spadesuit:J2u,spar:Z2u,sqcap:Y2u,sqcaps:Q2u,sqcup:X2u,sqcups:eku,Sqrt:tku,sqsub:uku,sqsube:nku,sqsubset:iku,sqsubseteq:rku,sqsup:aku,sqsupe:oku,sqsupset:sku,sqsupseteq:lku,square:cku,Square:dku,SquareIntersection:hku,SquareSubset:Eku,SquareSubsetEqual:mku,SquareSuperset:gku,SquareSupersetEqual:fku,SquareUnion:pku,squarf:Dku,squ:xku,squf:vku,srarr:Cku,Sscr:bku,sscr:kku,ssetmn:Fku,ssmile:yku,sstarf:Aku,Star:_ku,star:Sku,starf:Bku,straightepsilon:wku,straightphi:Lku,strns:zku,sub:Mku,Sub:Tku,subdot:Nku,subE:Pku,sube:Rku,subedot:Iku,submult:Oku,subnE:jku,subne:Hku,subplus:Vku,subrarr:$ku,subset:Kku,Subset:Wku,subseteq:Gku,subseteqq:Uku,SubsetEqual:qku,subsetneq:Jku,subsetneqq:Zku,subsim:Yku,subsub:Qku,subsup:Xku,succapprox:eFu,succ:tFu,succcurlyeq:uFu,Succeeds:nFu,SucceedsEqual:iFu,SucceedsSlantEqual:rFu,SucceedsTilde:aFu,succeq:oFu,succnapprox:sFu,succneqq:lFu,succnsim:cFu,succsim:dFu,SuchThat:hFu,sum:EFu,Sum:mFu,sung:gFu,sup1:fFu,sup2:pFu,sup3:DFu,sup:xFu,Sup:vFu,supdot:CFu,supdsub:bFu,supE:kFu,supe:FFu,supedot:yFu,Superset:AFu,SupersetEqual:_Fu,suphsol:SFu,suphsub:BFu,suplarr:wFu,supmult:LFu,supnE:zFu,supne:MFu,supplus:TFu,supset:NFu,Supset:PFu,supseteq:RFu,supseteqq:IFu,supsetneq:OFu,supsetneqq:jFu,supsim:HFu,supsub:VFu,supsup:$Fu,swarhk:KFu,swarr:WFu,swArr:GFu,swarrow:UFu,swnwar:qFu,szlig:JFu,Tab:ZFu,target:YFu,Tau:QFu,tau:XFu,tbrk:eyu,Tcaron:tyu,tcaron:uyu,Tcedil:nyu,tcedil:iyu,Tcy:ryu,tcy:ayu,tdot:oyu,telrec:syu,Tfr:lyu,tfr:cyu,there4:dyu,therefore:hyu,Therefore:Eyu,Theta:myu,theta:gyu,thetasym:fyu,thetav:pyu,thickapprox:Dyu,thicksim:xyu,ThickSpace:vyu,ThinSpace:Cyu,thinsp:byu,thkap:kyu,thksim:Fyu,THORN:yyu,thorn:Ayu,tilde:_yu,Tilde:Syu,TildeEqual:Byu,TildeFullEqual:wyu,TildeTilde:Lyu,timesbar:zyu,timesb:Myu,times:Tyu,timesd:Nyu,tint:Pyu,toea:Ryu,topbot:Iyu,topcir:Oyu,top:jyu,Topf:Hyu,topf:Vyu,topfork:$yu,tosa:Kyu,tprime:Wyu,trade:Gyu,TRADE:Uyu,triangle:qyu,triangledown:Jyu,triangleleft:Zyu,trianglelefteq:Yyu,triangleq:Qyu,triangleright:Xyu,trianglerighteq:eAu,tridot:tAu,trie:uAu,triminus:nAu,TripleDot:iAu,triplus:rAu,trisb:aAu,tritime:oAu,trpezium:sAu,Tscr:lAu,tscr:cAu,TScy:dAu,tscy:hAu,TSHcy:EAu,tshcy:mAu,Tstrok:gAu,tstrok:fAu,twixt:pAu,twoheadleftarrow:DAu,twoheadrightarrow:xAu,Uacute:vAu,uacute:CAu,uarr:bAu,Uarr:kAu,uArr:FAu,Uarrocir:yAu,Ubrcy:AAu,ubrcy:_Au,Ubreve:SAu,ubreve:BAu,Ucirc:wAu,ucirc:LAu,Ucy:zAu,ucy:MAu,udarr:TAu,Udblac:NAu,udblac:PAu,udhar:RAu,ufisht:IAu,Ufr:OAu,ufr:jAu,Ugrave:HAu,ugrave:VAu,uHar:$Au,uharl:KAu,uharr:WAu,uhblk:GAu,ulcorn:UAu,ulcorner:qAu,ulcrop:JAu,ultri:ZAu,Umacr:YAu,umacr:QAu,uml:XAu,UnderBar:e7u,UnderBrace:t7u,UnderBracket:u7u,UnderParenthesis:n7u,Union:i7u,UnionPlus:r7u,Uogon:a7u,uogon:o7u,Uopf:s7u,uopf:l7u,UpArrowBar:c7u,uparrow:d7u,UpArrow:h7u,Uparrow:E7u,UpArrowDownArrow:m7u,updownarrow:g7u,UpDownArrow:f7u,Updownarrow:p7u,UpEquilibrium:D7u,upharpoonleft:x7u,upharpoonright:v7u,uplus:C7u,UpperLeftArrow:b7u,UpperRightArrow:k7u,upsi:F7u,Upsi:y7u,upsih:A7u,Upsilon:_7u,upsilon:S7u,UpTeeArrow:B7u,UpTee:w7u,upuparrows:L7u,urcorn:z7u,urcorner:M7u,urcrop:T7u,Uring:N7u,uring:P7u,urtri:R7u,Uscr:I7u,uscr:O7u,utdot:j7u,Utilde:H7u,utilde:V7u,utri:$7u,utrif:K7u,uuarr:W7u,Uuml:G7u,uuml:U7u,uwangle:q7u,vangrt:J7u,varepsilon:Z7u,varkappa:Y7u,varnothing:Q7u,varphi:X7u,varpi:e9u,varpropto:t9u,varr:u9u,vArr:n9u,varrho:i9u,varsigma:r9u,varsubsetneq:a9u,varsubsetneqq:o9u,varsupsetneq:s9u,varsupsetneqq:l9u,vartheta:c9u,vartriangleleft:d9u,vartriangleright:h9u,vBar:E9u,Vbar:m9u,vBarv:g9u,Vcy:f9u,vcy:p9u,vdash:D9u,vDash:x9u,Vdash:v9u,VDash:C9u,Vdashl:b9u,veebar:k9u,vee:F9u,Vee:y9u,veeeq:A9u,vellip:_9u,verbar:S9u,Verbar:B9u,vert:w9u,Vert:L9u,VerticalBar:z9u,VerticalLine:M9u,VerticalSeparator:T9u,VerticalTilde:N9u,VeryThinSpace:P9u,Vfr:R9u,vfr:I9u,vltri:O9u,vnsub:j9u,vnsup:H9u,Vopf:V9u,vopf:$9u,vprop:K9u,vrtri:W9u,Vscr:G9u,vscr:U9u,vsubnE:q9u,vsubne:J9u,vsupnE:Z9u,vsupne:Y9u,Vvdash:Q9u,vzigzag:X9u,Wcirc:e_u,wcirc:t_u,wedbar:u_u,wedge:n_u,Wedge:i_u,wedgeq:r_u,weierp:a_u,Wfr:o_u,wfr:s_u,Wopf:l_u,wopf:c_u,wp:d_u,wr:h_u,wreath:E_u,Wscr:m_u,wscr:g_u,xcap:f_u,xcirc:p_u,xcup:D_u,xdtri:x_u,Xfr:v_u,xfr:C_u,xharr:b_u,xhArr:k_u,Xi:F_u,xi:y_u,xlarr:A_u,xlArr:__u,xmap:S_u,xnis:B_u,xodot:w_u,Xopf:L_u,xopf:z_u,xoplus:M_u,xotime:T_u,xrarr:N_u,xrArr:P_u,Xscr:R_u,xscr:I_u,xsqcup:O_u,xuplus:j_u,xutri:H_u,xvee:V_u,xwedge:$_u,Yacute:K_u,yacute:W_u,YAcy:G_u,yacy:U_u,Ycirc:q_u,ycirc:J_u,Ycy:Z_u,ycy:Y_u,yen:Q_u,Yfr:X_u,yfr:eSu,YIcy:tSu,yicy:uSu,Yopf:nSu,yopf:iSu,Yscr:rSu,yscr:aSu,YUcy:oSu,yucy:sSu,yuml:lSu,Yuml:cSu,Zacute:dSu,zacute:hSu,Zcaron:ESu,zcaron:mSu,Zcy:gSu,zcy:fSu,Zdot:pSu,zdot:DSu,zeetrf:xSu,ZeroWidthSpace:vSu,Zeta:CSu,zeta:bSu,zfr:kSu,Zfr:FSu,ZHcy:ySu,zhcy:ASu,zigrarr:_Su,zopf:SSu,Zopf:BSu,Zscr:wSu,zscr:LSu,zwj:zSu,zwnj:MSu};var KNe=TSu,nie=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,V6={},epe={};function NSu(u){var e,t,n=epe[u];if(n)return n;for(n=epe[u]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e"u"&&(t=!0),o=NSu(e),n=0,i=u.length;n=55296&&r<=57343){if(r>=55296&&r<=56319&&n+1=56320&&a<=57343)){s+=encodeURIComponent(u[n]+u[n+1]),n++;continue}s+="%EF%BF%BD";continue}s+=encodeURIComponent(u[n])}return s}nO.defaultChars=";/?:@&=+$,-_.!~*'()#";nO.componentChars="-_.!~*'()";var PSu=nO,tpe={};function RSu(u){var e,t,n=tpe[u];if(n)return n;for(n=tpe[u]=[],e=0;e<128;e++)t=String.fromCharCode(e),n.push(t);for(e=0;e=55296&&c<=57343?d+="���":d+=String.fromCharCode(c),i+=6;continue}if((a&248)===240&&i+91114111?d+="����":(c-=65536,d+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),i+=9;continue}d+="�"}return d})}iO.defaultChars=";/?:@&=+$,#";iO.componentChars="";var ISu=iO,OSu=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t};function PT(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var jSu=/^([a-z0-9.+-]+:)/i,HSu=/:[0-9]*$/,VSu=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,$Su=["<",">",'"',"`"," ","\r",` `," "],KSu=["{","}","|","\\","^","`"].concat($Su),WSu=["'"].concat(KSu),upe=["%","/","?",";","#"].concat(WSu),npe=["/","?","#"],GSu=255,ipe=/^[+a-z0-9A-Z_-]{0,63}$/,USu=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rpe={javascript:!0,"javascript:":!0},ape={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function qSu(u,e){if(u&&u instanceof PT)return u;var t=new PT;return t.parse(u,e),t}PT.prototype.parse=function(u,e){var t,n,i,r,a,o=u;if(o=o.trim(),!e&&u.split("#").length===1){var s=VSu.exec(o);if(s)return this.pathname=s[1],s[2]&&(this.search=s[2]),this}var l=jSu.exec(o);if(l&&(l=l[0],i=l.toLowerCase(),this.protocol=l,o=o.substr(l.length)),(e||l||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=o.substr(0,2)==="//",a&&!(l&&rpe[l])&&(o=o.substr(2),this.slashes=!0)),!rpe[l]&&(a||l&&!ape[l])){var c=-1;for(t=0;t127?p+="x":p+=f[D];if(!p.match(ipe)){var b=g.slice(0,t),k=g.slice(t+1),A=f.match(USu);A&&(b.push(A[1]),k.unshift(A[2])),k.length&&(o=k.join(".")+o),this.hostname=b.join(".");break}}}}this.hostname.length>GSu&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var F=o.indexOf("#");F!==-1&&(this.hash=o.substr(F),o=o.slice(0,F));var S=o.indexOf("?");return S!==-1&&(this.search=o.substr(S),o=o.slice(0,S)),o&&(this.pathname=o),ape[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this};PT.prototype.parseHost=function(u){var e=HSu.exec(u);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),u=u.substr(0,u.length-e.length)),u&&(this.hostname=u)};var JSu=qSu;V6.encode=PSu;V6.decode=ISu;V6.format=OSu;V6.parse=JSu;var Xg={},D$,ope;function WNe(){return ope||(ope=1,D$=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),D$}var x$,spe;function GNe(){return spe||(spe=1,x$=/[\0-\x1F\x7F-\x9F]/),x$}var v$,lpe;function ZSu(){return lpe||(lpe=1,v$=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),v$}var C$,cpe;function UNe(){return cpe||(cpe=1,C$=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),C$}var dpe;function YSu(){return dpe||(dpe=1,Xg.Any=WNe(),Xg.Cc=GNe(),Xg.Cf=ZSu(),Xg.P=nie,Xg.Z=UNe()),Xg}(function(u){function e(_){return Object.prototype.toString.call(_)}function t(_){return e(_)==="[object String]"}var n=Object.prototype.hasOwnProperty;function i(_,L){return n.call(_,L)}function r(_){var L=Array.prototype.slice.call(arguments,1);return L.forEach(function(T){if(T){if(typeof T!="object")throw new TypeError(T+"must be object");Object.keys(T).forEach(function(R){_[R]=T[R]})}}),_}function a(_,L,T){return[].concat(_.slice(0,L),T,_.slice(L+1))}function o(_){return!(_>=55296&&_<=57343||_>=64976&&_<=65007||(_&65535)===65535||(_&65535)===65534||_>=0&&_<=8||_===11||_>=14&&_<=31||_>=127&&_<=159||_>1114111)}function s(_){if(_>65535){_-=65536;var L=55296+(_>>10),T=56320+(_&1023);return String.fromCharCode(L,T)}return String.fromCharCode(_)}var l=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=/&([a-z#][a-z0-9]{1,31});/gi,d=new RegExp(l.source+"|"+c.source,"gi"),h=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,E=KNe;function m(_,L){var T=0;return i(E,L)?E[L]:L.charCodeAt(0)===35&&h.test(L)&&(T=L[1].toLowerCase()==="x"?parseInt(L.slice(2),16):parseInt(L.slice(1),10),o(T))?s(T):_}function g(_){return _.indexOf("\\")<0?_:_.replace(l,"$1")}function f(_){return _.indexOf("\\")<0&&_.indexOf("&")<0?_:_.replace(d,function(L,T,R){return T||m(L,R)})}var p=/[&<>"]/,D=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""};function b(_){return x[_]}function k(_){return p.test(_)?_.replace(D,b):_}var A=/[.?*+^$[\]\\(){}|-]/g;function F(_){return _.replace(A,"\\$&")}function S(_){switch(_){case 9:case 32:return!0}return!1}function w(_){if(_>=8192&&_<=8202)return!0;switch(_){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var z=nie;function N(_){return z.test(_)}function O(_){switch(_){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function y(_){return _=_.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(_=_.replace(/ẞ/g,"ß")),_.toLowerCase().toUpperCase()}u.lib={},u.lib.mdurl=V6,u.lib.ucmicro=YSu(),u.assign=r,u.isString=t,u.has=i,u.unescapeMd=g,u.unescapeAll=f,u.isValidEntityCode=o,u.fromCodePoint=s,u.escapeHtml=k,u.arrayReplaceAt=a,u.isSpace=S,u.isWhiteSpace=w,u.isMdAsciiPunct=O,u.isPunctChar=N,u.escapeRE=F,u.normalizeReference=y})(Hn);var rO={},QSu=function(e,t,n){var i,r,a,o,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,i=1;e.pos32))return s;if(i===41){if(r===0)break;r--}t++}return o===t||r!==0||(s.str=hpe(e.slice(o,t)),s.lines=a,s.pos=t,s.ok=!0),s},e8u=Hn.unescapeAll,t8u=function(e,t,n){var i,r,a=0,o=t,s={ok:!1,pos:0,lines:0,str:""};if(t>=n||(r=e.charCodeAt(t),r!==34&&r!==39&&r!==40))return s;for(t++,r===40&&(r=41);t"+xp(u[e].content)+""};Y1.code_block=function(u,e,t,n,i){var r=u[e];return""+xp(u[e].content)+` `};Y1.fence=function(u,e,t,n,i){var r=u[e],a=r.info?n8u(r.info).trim():"",o="",s="",l,c,d,h,E;return a&&(d=a.split(/(\s+)/g),o=d[0],s=d.slice(2).join("")),t.highlight?l=t.highlight(r.content,o,s)||xp(r.content):l=xp(r.content),l.indexOf("c.body))}}catch(l){i={error:l}}finally{try{s&&!s. `:">",r)};$6.prototype.renderInline=function(u,e,t){for(var n,i="",r=this.rules,a=0,o=u.length;a\s]/i.test(u)}function h8u(u){return/^<\/a\s*>/i.test(u)}var E8u=function(e){var t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D=e.tokens,x;if(e.md.options.linkify){for(n=0,i=D.length;n=0;t--){if(o=r[t],o.type==="link_close"){for(t--;r[t].level!==o.level&&r[t].type!=="link_open";)t--;continue}if(o.type==="html_inline"&&(d8u(o.content)&&m>0&&m--,h8u(o.content)&&m++),!(m>0)&&o.type==="text"&&e.md.linkify.test(o.content)){for(c=o.content,x=e.md.linkify.match(c),s=[],E=o.level,h=0,l=0;lh&&(a=new e.Token("text","",0),a.content=c.slice(h,d),a.level=E,s.push(a)),a=new e.Token("link_open","a",1),a.attrs=[["href",f]],a.level=E++,a.markup="linkify",a.info="auto",s.push(a),a=new e.Token("text","",0),a.content=p,a.level=E,s.push(a),a=new e.Token("link_close","a",-1),a.level=--E,a.markup="linkify",a.info="auto",s.push(a),h=x[l].lastIndex);h=0;e--)t=u[e],t.type==="text"&&!n&&(t.content=t.content.replace(g8u,p8u)),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}function x8u(u){var e,t,n=0;for(e=u.length-1;e>=0;e--)t=u[e],t.type==="text"&&!n&&qNe.test(t.content)&&(t.content=t.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}var v8u=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(m8u.test(e.tokens[t].content)&&D8u(e.tokens[t].children),qNe.test(e.tokens[t].content)&&x8u(e.tokens[t].children))},Epe=Hn.isWhiteSpace,mpe=Hn.isPunctChar,gpe=Hn.isMdAsciiPunct,C8u=/['"]/,fpe=/['"]/g,ppe="’";function dS(u,e,t){return u.substr(0,e)+t+u.substr(e+1)}function b8u(u,e){var t,n,i,r,a,o,s,l,c,d,h,E,m,g,f,p,D,x,b,k,A;for(b=[],t=0;t=0&&!(b[D].level<=s);D--);if(b.length=D+1,n.type==="text"){i=n.content,a=0,o=i.length;e:for(;a=0)c=i.charCodeAt(r.index-1);else for(D=t-1;D>=0&&!(u[D].type==="softbreak"||u[D].type==="hardbreak");D--)if(u[D].content){c=u[D].content.charCodeAt(u[D].content.length-1);break}if(d=32,a=48&&c<=57&&(p=f=!1),f&&p&&(f=h,p=E),!f&&!p){x&&(n.content=dS(n.content,r.index,ppe));continue}if(p){for(D=b.length-1;D>=0&&(l=b[D],!(b[D].level=0;t--)e.tokens[t].type!=="inline"||!C8u.test(e.tokens[t].content)||b8u(e.tokens[t].children,e)};function K6(u,e,t){this.type=u,this.tag=e,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}K6.prototype.attrIndex=function(e){var t,n,i;if(!this.attrs)return-1;for(t=this.attrs,n=0,i=t.length;n=0&&(n=this.attrs[t][1]),n};K6.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};var rie=K6,F8u=rie;function JNe(u,e,t){this.src=u,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}JNe.prototype.Token=F8u;var y8u=JNe,A8u=iie,b$=[["normalize",o8u],["block",s8u],["inline",l8u],["linkify",E8u],["replacements",v8u],["smartquotes",k8u]];function aie(){this.ruler=new A8u;for(var u=0;un||(c=t+1,e.sCount[c]=4||(o=e.bMarks[c]+e.tShift[c],o>=e.eMarks[c])||(k=e.src.charCodeAt(o++),k!==124&&k!==45&&k!==58)||o>=e.eMarks[c]||(A=e.src.charCodeAt(o++),A!==124&&A!==45&&A!==58&&!k$(A))||k===45&&k$(A))return!1;for(;o=4||(d=Dpe(a),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),h=d.length,h===0||h!==m.length))return!1;if(i)return!0;for(D=e.parentType,e.parentType="table",b=e.md.block.ruler.getRules("blockquote"),E=e.push("table_open","table",1),E.map=f=[t,0],E=e.push("thead_open","thead",1),E.map=[t,t+1],E=e.push("tr_open","tr",1),E.map=[t,t+1],s=0;s=4)break;for(d=Dpe(a),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),c===t+2&&(E=e.push("tbody_open","tbody",1),E.map=p=[t+2,0]),E=e.push("tr_open","tr",1),E.map=[c,c+1],s=0;s=4){i++,r=i;continue}break}return e.line=r,a=e.push("code_block","code",0),a.content=e.getLines(t,r,4+e.blkIndent,!1)+` -`,a.map=[t,e.line],!0},w8u=function(e,t,n,i){var r,a,o,s,l,c,d,h=!1,E=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||E+3>m||(r=e.src.charCodeAt(E),r!==126&&r!==96)||(l=E,E=e.skipChars(E,r),a=E-l,a<3)||(d=e.src.slice(l,E),o=e.src.slice(E,m),r===96&&o.indexOf(String.fromCharCode(r))>=0))return!1;if(i)return!0;for(s=t;s++,!(s>=n||(E=l=e.bMarks[s]+e.tShift[s],m=e.eMarks[s],E=4)&&(E=e.skipChars(E,r),!(E-l=4||e.src.charCodeAt(z++)!==62)return!1;if(i)return!0;for(s=E=e.sCount[t]+1,e.src.charCodeAt(z)===32?(z++,s++,E++,r=!1,b=!0):e.src.charCodeAt(z)===9?(b=!0,(e.bsCount[t]+E)%4===3?(z++,s++,E++,r=!1):r=!0):b=!1,m=[e.bMarks[t]],e.bMarks[t]=z;z=N,D=[e.sCount[t]],e.sCount[t]=E-s,x=[e.tShift[t]],e.tShift[t]=z-e.bMarks[t],A=e.md.block.ruler.getRules("blockquote"),p=e.parentType,e.parentType="blockquote",h=t+1;h=N));h++){if(e.src.charCodeAt(z++)===62&&!S){for(s=E=e.sCount[h]+1,e.src.charCodeAt(z)===32?(z++,s++,E++,r=!1,b=!0):e.src.charCodeAt(z)===9?(b=!0,(e.bsCount[h]+E)%4===3?(z++,s++,E++,r=!1):r=!0):b=!1,m.push(e.bMarks[h]),e.bMarks[h]=z;z=N,g.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(b?1:0),D.push(e.sCount[h]),e.sCount[h]=E-s,x.push(e.tShift[h]),e.tShift[h]=z-e.bMarks[h];continue}if(c)break;for(k=!1,o=0,l=A.length;o",F.map=d=[t,0],e.md.block.tokenize(e,t,h),F=e.push("blockquote_close","blockquote",-1),F.markup=">",e.lineMax=w,e.parentType=p,d[1]=e.line,o=0;o=4||(r=e.src.charCodeAt(l++),r!==42&&r!==45&&r!==95))return!1;for(a=1;l=r||(t=u.src.charCodeAt(i++),t<48||t>57))return-1;for(;;){if(i>=r)return-1;if(t=u.src.charCodeAt(i++),t>=48&&t<=57){if(i-n>=10)return-1;continue}if(t===41||t===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(R=!0),(N=Cpe(e,t))>=0){if(d=!0,y=e.bMarks[t]+e.tShift[t],p=Number(e.src.slice(y,N-1)),R&&p!==1)return!1}else if((N=vpe(e,t))>=0)d=!1;else return!1;if(R&&e.skipSpaces(N)>=e.eMarks[t])return!1;if(f=e.src.charCodeAt(N-1),i)return!0;for(g=e.tokens.length,d?(T=e.push("ordered_list_open","ol",1),p!==1&&(T.attrs=[["start",p]])):T=e.push("bullet_list_open","ul",1),T.map=m=[t,0],T.markup=String.fromCharCode(f),x=t,O=!1,L=e.md.block.ruler.getRules("list"),A=e.parentType,e.parentType="list";x=D?l=1:l=b-c,l>4&&(l=1),s=c+l,T=e.push("list_item_open","li",1),T.markup=String.fromCharCode(f),T.map=h=[t,0],d&&(T.info=e.src.slice(y,N-1)),w=e.tight,S=e.tShift[t],F=e.sCount[t],k=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=a-e.bMarks[t],e.sCount[t]=b,a>=D&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),(!e.tight||O)&&(I=!1),O=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[t]=S,e.sCount[t]=F,e.tight=w,T=e.push("list_item_close","li",-1),T.markup=String.fromCharCode(f),x=t=e.line,h[1]=x,a=e.bMarks[t],x>=n||e.sCount[x]=4)break;for(_=!1,o=0,E=L.length;o=4||e.src.charCodeAt(A)!==91)return!1;for(;++A3)&&!(e.sCount[S]<0)){for(D=!1,c=0,d=x.length;c"u"&&(e.env.references={}),typeof e.env.references[h]>"u"&&(e.env.references[h]={title:b,href:l}),e.parentType=m,e.line=t+k+1),!0)},I8u=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],aO={},O8u="[a-zA-Z_:][a-zA-Z0-9:._-]*",j8u="[^\"'=<>`\\x00-\\x20]+",H8u="'[^']*'",V8u='"[^"]*"',$8u="(?:"+j8u+"|"+H8u+"|"+V8u+")",K8u="(?:\\s+"+O8u+"(?:\\s*=\\s*"+$8u+")?)",YNe="<[A-Za-z][A-Za-z0-9\\-]*"+K8u+"*\\s*\\/?>",QNe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",W8u="|",G8u="<[?][\\s\\S]*?[?]>",U8u="]*>",q8u="",J8u=new RegExp("^(?:"+YNe+"|"+QNe+"|"+W8u+"|"+G8u+"|"+U8u+"|"+q8u+")"),Z8u=new RegExp("^(?:"+YNe+"|"+QNe+")");aO.HTML_TAG_RE=J8u;aO.HTML_OPEN_CLOSE_TAG_RE=Z8u;var Y8u=I8u,Q8u=aO.HTML_OPEN_CLOSE_TAG_RE,jD=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Q8u.source+"\\s*$"),/^$/,!1]],X8u=function(e,t,n,i){var r,a,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(l)!==60)return!1;for(s=e.src.slice(l,c),r=0;r=4||(r=e.src.charCodeAt(l),r!==35||l>=c))return!1;for(a=1,r=e.src.charCodeAt(++l);r===35&&l6||ll&&bpe(e.src.charCodeAt(o-1))&&(c=o),e.line=t+1,s=e.push("heading_open","h"+String(a),1),s.markup="########".slice(0,a),s.map=[t,e.line],s=e.push("inline","",0),s.content=e.src.slice(l,c).trim(),s.map=[t,e.line],s.children=[],s=e.push("heading_close","h"+String(a),-1),s.markup="########".slice(0,a)),!0)},tBu=function(e,t,n){var i,r,a,o,s,l,c,d,h,E=t+1,m,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(m=e.parentType,e.parentType="paragraph";E3)){if(e.sCount[E]>=e.blkIndent&&(l=e.bMarks[E]+e.tShift[E],c=e.eMarks[E],l=c)))){d=h===61?1:2;break}if(!(e.sCount[E]<0)){for(r=!1,a=0,o=g.length;a3)&&!(e.sCount[l]<0)){for(i=!1,r=0,a=c.length;r0&&this.level++,this.tokens.push(n),n};Q1.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Q1.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!oO(this.src.charCodeAt(--e)))return e+1;return e};Q1.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e};Q1.prototype.getLines=function(e,t,n,i){var r,a,o,s,l,c,d,h=e;if(e>=t)return"";for(c=new Array(t-e),r=0;hn?c[r]=new Array(a-n+1).join(" ")+this.src.slice(s,l):c[r]=this.src.slice(s,l)}return c.join("")};Q1.prototype.Token=XNe;var nBu=Q1,iBu=iie,ES=[["table",S8u,["paragraph","reference"]],["code",B8u],["fence",w8u,["paragraph","reference","blockquote","list"]],["blockquote",L8u,["paragraph","reference","blockquote","list"]],["hr",M8u,["paragraph","reference","blockquote","list"]],["list",N8u,["paragraph","reference","blockquote"]],["reference",R8u],["html_block",X8u,["paragraph","reference","blockquote"]],["heading",eBu,["paragraph","reference","blockquote"]],["lheading",tBu],["paragraph",uBu]];function sO(){this.ruler=new iBu;for(var u=0;u=t||u.sCount[o]=l){u.line=t;break}for(i=0;i=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){for(r=n-1;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(a++;a?@[]^_`{|}~-".split("").forEach(function(u){oie[u.charCodeAt(0)]=1});var dBu=function(e,t){var n,i=e.pos,r=e.posMax;if(e.src.charCodeAt(i)!==92)return!1;if(i++,i=0;t--)n=e[t],!(n.marker!==95&&n.marker!==42)&&n.end!==-1&&(i=e[n.end],o=t>0&&e[t-1].end===n.end+1&&e[t-1].marker===n.marker&&e[t-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),r=u.tokens[n.token],r.type=o?"strong_open":"em_open",r.tag=o?"strong":"em",r.nesting=1,r.markup=o?a+a:a,r.content="",r=u.tokens[i.token],r.type=o?"strong_close":"em_close",r.tag=o?"strong":"em",r.nesting=-1,r.markup=o?a+a:a,r.content="",o&&(u.tokens[e[t-1].token].content="",u.tokens[e[n.end+1].token].content="",t--))}cO.postProcess=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(ype(e,e.delimiters),t=0;t=g)return!1;if(f=s,l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),l.ok){for(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?s=l.pos:h="",f=s;s=g||e.src.charCodeAt(s)!==41)&&(p=!0),s++}if(p){if(typeof e.env.references>"u")return!1;if(s=0?r=e.src.slice(f,s++):s=a+1):s=a+1,r||(r=e.src.slice(o,a)),c=e.env.references[EBu(r)],!c)return e.pos=m,!1;h=c.href,E=c.title}return t||(e.pos=o,e.posMax=a,d=e.push("link_open","a",1),d.attrs=n=[["href",h]],E&&n.push(["title",E]),e.md.inline.tokenize(e),d=e.push("link_close","a",-1)),e.pos=s,e.posMax=g,!0},gBu=Hn.normalizeReference,A$=Hn.isSpace,fBu=function(e,t){var n,i,r,a,o,s,l,c,d,h,E,m,g,f="",p=e.pos,D=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(s=e.pos+2,o=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),o<0))return!1;if(l=o+1,l=D)return!1;for(g=l,d=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),d.ok&&(f=e.md.normalizeLink(d.str),e.md.validateLink(f)?l=d.pos:f=""),g=l;l=D||e.src.charCodeAt(l)!==41)return e.pos=p,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l=0?a=e.src.slice(g,l++):l=o+1):l=o+1,a||(a=e.src.slice(s,o)),c=e.env.references[gBu(a)],!c)return e.pos=p,!1;f=c.href,h=c.title}return t||(r=e.src.slice(s,o),e.md.inline.parse(r,e.md,e.env,m=[]),E=e.push("image","img",0),E.attrs=n=[["src",f],["alt",""]],E.children=m,E.content=r,h&&n.push(["title",h])),e.pos=l,e.posMax=D,!0},pBu=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,DBu=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,xBu=function(e,t){var n,i,r,a,o,s,l=e.pos;if(e.src.charCodeAt(l)!==60)return!1;for(o=e.pos,s=e.posMax;;){if(++l>=s||(a=e.src.charCodeAt(l),a===60))return!1;if(a===62)break}return n=e.src.slice(o+1,l),DBu.test(n)?(i=e.md.normalizeLink(n),e.md.validateLink(i)?(t||(r=e.push("link_open","a",1),r.attrs=[["href",i]],r.markup="autolink",r.info="auto",r=e.push("text","",0),r.content=e.md.normalizeLinkText(n),r=e.push("link_close","a",-1),r.markup="autolink",r.info="auto"),e.pos+=n.length+2,!0):!1):pBu.test(n)?(i=e.md.normalizeLink("mailto:"+n),e.md.validateLink(i)?(t||(r=e.push("link_open","a",1),r.attrs=[["href",i]],r.markup="autolink",r.info="auto",r=e.push("text","",0),r.content=e.md.normalizeLinkText(n),r=e.push("link_close","a",-1),r.markup="autolink",r.info="auto"),e.pos+=n.length+2,!0):!1):!1},vBu=aO.HTML_TAG_RE;function CBu(u){var e=u|32;return e>=97&&e<=122}var bBu=function(e,t){var n,i,r,a,o=e.pos;return!e.md.options.html||(r=e.posMax,e.src.charCodeAt(o)!==60||o+2>=r)||(n=e.src.charCodeAt(o+1),n!==33&&n!==63&&n!==47&&!CBu(n))||(i=e.src.slice(o).match(vBu),!i)?!1:(t||(a=e.push("html_inline","",0),a.content=e.src.slice(o,o+i[0].length)),e.pos+=i[0].length,!0)},Ape=KNe,kBu=Hn.has,FBu=Hn.isValidEntityCode,_pe=Hn.fromCodePoint,yBu=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ABu=/^&([a-z][a-z0-9]{1,31});/i,_Bu=function(e,t){var n,i,r,a=e.pos,o=e.posMax;if(e.src.charCodeAt(a)!==38)return!1;if(a+1a;n-=m[n]+1)if(r=e[n],r.marker===i.marker&&r.open&&r.end<0&&(s=!1,(r.close||i.open)&&(r.length+i.length)%3===0&&(r.length%3!==0||i.length%3!==0)&&(s=!0),!s)){l=n>0&&!e[n-1].open?m[n-1]+1:0,m[t]=t-n+l,m[n]=l,i.open=!1,r.end=t,r.close=!1,o=-1,E=-2;break}o!==-1&&(c[i.marker][(i.open?3:0)+(i.length||0)%3]=o)}}}var SBu=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(Spe(e,e.delimiters),t=0;t0&&i++,r[t].type==="text"&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};g7.prototype.scanDelims=function(u,e){var t=u,n,i,r,a,o,s,l,c,d,h=!0,E=!0,m=this.posMax,g=this.src.charCodeAt(u);for(n=u>0?this.src.charCodeAt(u-1):32;t=r)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};f7.prototype.parse=function(u,e,t,n){var i,r,a,o=new this.State(u,e,t,n);for(this.tokenize(o),r=this.ruler2.getRules(""),a=r.length,i=0;i|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}),B$}function CY(u){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function dO(u){return Object.prototype.toString.call(u)}function MBu(u){return dO(u)==="[object String]"}function TBu(u){return dO(u)==="[object Object]"}function NBu(u){return dO(u)==="[object RegExp]"}function Tpe(u){return dO(u)==="[object Function]"}function PBu(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ePe={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function RBu(u){return Object.keys(u||{}).reduce(function(e,t){return e||ePe.hasOwnProperty(t)},!1)}var IBu={"http:":{validate:function(u,e,t){var n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){var n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){var n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},OBu="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",jBu="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function HBu(u){u.__index__=-1,u.__text_cache__=""}function VBu(u){return function(e,t){var n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function Npe(){return function(u,e){e.normalize(u)}}function RT(u){var e=u.re=zBu()(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(OBu),t.push(e.src_xn),e.src_tlds=t.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");var i=[];u.__compiled__={};function r(o,s){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+s)}Object.keys(u.__schemas__).forEach(function(o){var s=u.__schemas__[o];if(s!==null){var l={validate:null,link:null};if(u.__compiled__[o]=l,TBu(s)){NBu(s.validate)?l.validate=VBu(s.validate):Tpe(s.validate)?l.validate=s.validate:r(o,s),Tpe(s.normalize)?l.normalize=s.normalize:s.normalize?r(o,s):l.normalize=Npe();return}if(MBu(s)){i.push(o);return}r(o,s)}}),i.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:Npe()};var a=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map(PBu).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),HBu(u)}function $Bu(u,e){var t=u.__index__,n=u.__last_index__,i=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function Ppe(u,e){var t=new $Bu(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function Ol(u,e){if(!(this instanceof Ol))return new Ol(u,e);e||RBu(u)&&(e=u,u={}),this.__opts__=CY({},ePe,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=CY({},IBu,u),this.__compiled__={},this.__tlds__=jBu,this.__tlds_replaced__=!1,this.re={},RT(this)}Ol.prototype.add=function(e,t){return this.__schemas__[e]=t,RT(this),this};Ol.prototype.set=function(e){return this.__opts__=CY(this.__opts__,e),this};Ol.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,i,r,a,o,s,l,c;if(this.re.schema_test.test(e)){for(s=this.re.schema_search,s.lastIndex=0;(t=s.exec(e))!==null;)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=e.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,o=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=o))),this.__index__>=0};Ol.prototype.pretest=function(e){return this.re.pretest.test(e)};Ol.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0};Ol.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(Ppe(this,t)),t=this.__last_index__);for(var i=t?e.slice(t):e;this.test(i);)n.push(Ppe(this,t)),i=i.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null};Ol.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,i,r){return n!==r[i-1]}).reverse(),RT(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,RT(this),this)};Ol.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};Ol.prototype.onCompile=function(){};var KBu=Ol,IT={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */IT.exports;(function(u,e){(function(t){var n=e&&!e.nodeType&&e,i=u&&!u.nodeType&&u,r=typeof bl=="object"&&bl;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,s=36,l=1,c=26,d=38,h=700,E=72,m=128,g="-",f=/^xn--/,p=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=s-l,k=Math.floor,A=String.fromCharCode,F;function S(V){throw new RangeError(x[V])}function w(V,U){for(var J=V.length,Y=[];J--;)Y[J]=U(V[J]);return Y}function z(V,U){var J=V.split("@"),Y="";J.length>1&&(Y=J[0]+"@",V=J[1]),V=V.replace(D,".");var X=V.split("."),re=w(X,U).join(".");return Y+re}function N(V){for(var U=[],J=0,Y=V.length,X,re;J=55296&&X<=56319&&J65535&&(U-=65536,J+=A(U>>>10&1023|55296),U=56320|U&1023),J+=A(U),J}).join("")}function y(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:s}function _(V,U){return V+22+75*(V<26)-((U!=0)<<5)}function L(V,U,J){var Y=0;for(V=J?k(V/h):V>>1,V+=k(V/U);V>b*c>>1;Y+=s)V=k(V/b);return k(Y+(b+1)*V/(V+d))}function T(V){var U=[],J=V.length,Y,X=0,re=m,ge=E,_e,Ve,Ue,qe,Se,de,he,Be,je;for(_e=V.lastIndexOf(g),_e<0&&(_e=0),Ve=0;Ve<_e;++Ve)V.charCodeAt(Ve)>=128&&S("not-basic"),U.push(V.charCodeAt(Ve));for(Ue=_e>0?_e+1:0;Ue=J&&S("invalid-input"),he=y(V.charCodeAt(Ue++)),(he>=s||he>k((o-X)/Se))&&S("overflow"),X+=he*Se,Be=de<=ge?l:de>=ge+c?c:de-ge,!(hek(o/je)&&S("overflow"),Se*=je;Y=U.length+1,ge=L(X-qe,Y,qe==0),k(X/Y)>o-re&&S("overflow"),re+=k(X/Y),X%=Y,U.splice(X++,0,re)}return O(U)}function R(V){var U,J,Y,X,re,ge,_e,Ve,Ue,qe,Se,de=[],he,Be,je,bt;for(V=N(V),he=V.length,U=m,J=0,re=E,ge=0;ge=U&&Se<_e&&(_e=Se);for(Be=Y+1,_e-U>k((o-J)/Be)&&S("overflow"),J+=(_e-U)*Be,U=_e,ge=0;geo&&S("overflow"),Se==U){for(Ve=J,Ue=s;qe=Ue<=re?l:Ue>=re+c?c:Ue-re,!(Ve=0))try{e.hostname=tPe.toASCII(e.hostname)}catch{}return Xf.encode(Xf.format(e))}function awu(u){var e=Xf.parse(u,!0);if(e.hostname&&(!e.protocol||uPe.indexOf(e.protocol)>=0))try{e.hostname=tPe.toUnicode(e.hostname)}catch{}return Xf.decode(Xf.format(e),Xf.decode.defaultChars+"%")}function jl(u,e){if(!(this instanceof jl))return new jl(u,e);e||H2.isString(u)||(e=u||{},u="default"),this.inline=new XBu,this.block=new QBu,this.core=new YBu,this.renderer=new ZBu,this.linkify=new ewu,this.validateLink=iwu,this.normalizeLink=rwu,this.normalizeLinkText=awu,this.utils=H2,this.helpers=H2.assign({},JBu),this.options={},this.configure(u),e&&this.set(e)}jl.prototype.set=function(u){return H2.assign(this.options,u),this};jl.prototype.configure=function(u){var e=this,t;if(H2.isString(u)&&(t=u,u=twu[t],!u))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(n){u.components[n].rules&&e[n].ruler.enableOnly(u.components[n].rules),u.components[n].rules2&&e[n].ruler2.enableOnly(u.components[n].rules2)}),this};jl.prototype.enable=function(u,e){var t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(i){t=t.concat(this[i].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));var n=u.filter(function(i){return t.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};jl.prototype.disable=function(u,e){var t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(i){t=t.concat(this[i].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));var n=u.filter(function(i){return t.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};jl.prototype.use=function(u){var e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};jl.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");var t=new this.core.State(u,this,e);return this.core.process(t),t.tokens};jl.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};jl.prototype.parseInline=function(u,e){var t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};jl.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var owu=jl,swu=owu;const lwu=Hl(swu);var cwu="production",nPe=typeof process>"u"||process.env===void 0?cwu:"production",dh=function(u){return{isEnabled:function(e){return u.some(function(t){return!!e[t]})}}},Ay={measureLayout:dh(["layout","layoutId","drag"]),animation:dh(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:dh(["exit"]),drag:dh(["drag","dragControls"]),focus:dh(["whileFocus"]),hover:dh(["whileHover","onHoverStart","onHoverEnd"]),tap:dh(["whileTap","onTap","onTapStart","onTapCancel"]),pan:dh(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:dh(["whileInView","onViewportEnter","onViewportLeave"])};function dwu(u){for(var e in u)u[e]!==null&&(e==="projectionNodeConstructor"?Ay.projectionNodeConstructor=u[e]:Ay[e].Component=u[e])}var hwu=function(){},OT=function(){},iPe=C.createContext({strict:!1}),rPe=Object.keys(Ay),Ewu=rPe.length;function mwu(u,e,t){var n=[],i=C.useContext(iPe);if(!e)return null;nPe!=="production"&&t&&i.strict;for(var r=0;r"u")return e;var t=new Map;return new Proxy(e,{get:function(n,i){return t.has(i)||t.set(i,e(i)),t.get(i)}})}var zwu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function lie(u){return typeof u!="string"||u.includes("-")?!1:!!(zwu.indexOf(u)>-1||/[A-Z]/.test(u))}var jT={};function Mwu(u){Object.assign(jT,u)}var FY=["","X","Y","Z"],Twu=["translate","scale","rotate","skew"],_y=["transformPerspective","x","y","z"];Twu.forEach(function(u){return FY.forEach(function(e){return _y.push(u+e)})});function Nwu(u,e){return _y.indexOf(u)-_y.indexOf(e)}var Pwu=new Set(_y);function p7(u){return Pwu.has(u)}var Rwu=new Set(["originX","originY","originZ"]);function hPe(u){return Rwu.has(u)}function EPe(u,e){var t=e.layout,n=e.layoutId;return p7(u)||hPe(u)||(t||n!==void 0)&&(!!jT[u]||u==="opacity")}var H1=function(u){return!!(u!==null&&typeof u=="object"&&u.getVelocity)},Iwu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Owu(u,e,t,n){var i=u.transform,r=u.transformKeys,a=e.enableHardwareAcceleration,o=a===void 0?!0:a,s=e.allowTransformNone,l=s===void 0?!0:s,c="";r.sort(Nwu);for(var d=!1,h=r.length,E=0;Et=>Math.max(Math.min(t,e),u),$2=u=>u%1?Number(u.toFixed(5)):u,Sy=/(-)?([\d]*\.?[\d])+/g,yY=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Vwu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function D7(u){return typeof u=="string"}const uD={test:u=>typeof u=="number",parse:parseFloat,transform:u=>u},K2=Object.assign(Object.assign({},uD),{transform:gPe(0,1)}),mS=Object.assign(Object.assign({},uD),{default:1}),x7=u=>({test:e=>D7(e)&&e.endsWith(u)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${u}`}),aE=x7("deg"),C1=x7("%"),Eu=x7("px"),$wu=x7("vh"),Kwu=x7("vw"),Ipe=Object.assign(Object.assign({},C1),{parse:u=>C1.parse(u)/100,transform:u=>C1.transform(u*100)}),cie=(u,e)=>t=>!!(D7(t)&&Vwu.test(t)&&t.startsWith(u)||e&&Object.prototype.hasOwnProperty.call(t,e)),fPe=(u,e,t)=>n=>{if(!D7(n))return n;const[i,r,a,o]=n.match(Sy);return{[u]:parseFloat(i),[e]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},e3={test:cie("hsl","hue"),parse:fPe("hue","saturation","lightness"),transform:({hue:u,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(u)+", "+C1.transform($2(e))+", "+C1.transform($2(t))+", "+$2(K2.transform(n))+")"},Wwu=gPe(0,255),w$=Object.assign(Object.assign({},uD),{transform:u=>Math.round(Wwu(u))}),KE={test:cie("rgb","red"),parse:fPe("red","green","blue"),transform:({red:u,green:e,blue:t,alpha:n=1})=>"rgba("+w$.transform(u)+", "+w$.transform(e)+", "+w$.transform(t)+", "+$2(K2.transform(n))+")"};function Gwu(u){let e="",t="",n="",i="";return u.length>5?(e=u.substr(1,2),t=u.substr(3,2),n=u.substr(5,2),i=u.substr(7,2)):(e=u.substr(1,1),t=u.substr(2,1),n=u.substr(3,1),i=u.substr(4,1),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const AY={test:cie("#"),parse:Gwu,transform:KE.transform},Jo={test:u=>KE.test(u)||AY.test(u)||e3.test(u),parse:u=>KE.test(u)?KE.parse(u):e3.test(u)?e3.parse(u):AY.parse(u),transform:u=>D7(u)?u:u.hasOwnProperty("red")?KE.transform(u):e3.transform(u)},pPe="${c}",DPe="${n}";function Uwu(u){var e,t,n,i;return isNaN(u)&&D7(u)&&((t=(e=u.match(Sy))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((i=(n=u.match(yY))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function xPe(u){typeof u=="number"&&(u=`${u}`);const e=[];let t=0;const n=u.match(yY);n&&(t=n.length,u=u.replace(yY,pPe),e.push(...n.map(Jo.parse)));const i=u.match(Sy);return i&&(u=u.replace(Sy,DPe),e.push(...i.map(uD.parse))),{values:e,numColors:t,tokenised:u}}function vPe(u){return xPe(u).values}function CPe(u){const{values:e,numColors:t,tokenised:n}=xPe(u),i=e.length;return r=>{let a=n;for(let o=0;otypeof u=="number"?0:u;function Jwu(u){const e=vPe(u);return CPe(u)(e.map(qwu))}const v4={test:Uwu,parse:vPe,createTransformer:CPe,getAnimatableNone:Jwu},Zwu=new Set(["brightness","contrast","saturate","opacity"]);function Ywu(u){let[e,t]=u.slice(0,-1).split("(");if(e==="drop-shadow")return u;const[n]=t.match(Sy)||[];if(!n)return u;const i=t.replace(n,"");let r=Zwu.has(e)?1:0;return n!==t&&(r*=100),e+"("+r+i+")"}const Qwu=/([a-z-]*)\(.*?\)/g,_Y=Object.assign(Object.assign({},v4),{getAnimatableNone:u=>{const e=u.match(Qwu);return e?e.map(Ywu).join(" "):u}});var Ope=Ke(Ke({},uD),{transform:Math.round}),bPe={borderWidth:Eu,borderTopWidth:Eu,borderRightWidth:Eu,borderBottomWidth:Eu,borderLeftWidth:Eu,borderRadius:Eu,radius:Eu,borderTopLeftRadius:Eu,borderTopRightRadius:Eu,borderBottomRightRadius:Eu,borderBottomLeftRadius:Eu,width:Eu,maxWidth:Eu,height:Eu,maxHeight:Eu,size:Eu,top:Eu,right:Eu,bottom:Eu,left:Eu,padding:Eu,paddingTop:Eu,paddingRight:Eu,paddingBottom:Eu,paddingLeft:Eu,margin:Eu,marginTop:Eu,marginRight:Eu,marginBottom:Eu,marginLeft:Eu,rotate:aE,rotateX:aE,rotateY:aE,rotateZ:aE,scale:mS,scaleX:mS,scaleY:mS,scaleZ:mS,skew:aE,skewX:aE,skewY:aE,distance:Eu,translateX:Eu,translateY:Eu,translateZ:Eu,x:Eu,y:Eu,z:Eu,perspective:Eu,transformPerspective:Eu,opacity:K2,originX:Ipe,originY:Ipe,originZ:Eu,zIndex:Ope,fillOpacity:K2,strokeOpacity:K2,numOctaves:Ope};function die(u,e,t,n){var i,r=u.style,a=u.vars,o=u.transform,s=u.transformKeys,l=u.transformOrigin;s.length=0;var c=!1,d=!1,h=!0;for(var E in e){var m=e[E];if(mPe(E)){a[E]=m;continue}var g=bPe[E],f=Hwu(m,g);if(p7(E)){if(c=!0,o[E]=f,s.push(E),!h)continue;m!==((i=g.default)!==null&&i!==void 0?i:0)&&(h=!1)}else hPe(E)?(l[E]=f,d=!0):r[E]=f}c?r.transform=Owu(u,t,h,n):n?r.transform=n({},""):!e.transform&&r.transform&&(r.transform="none"),d&&(r.transformOrigin=jwu(l))}var hie=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function kPe(u,e,t){for(var n in e)!H1(e[n])&&!EPe(n,t)&&(u[n]=e[n])}function Xwu(u,e,t){var n=u.transformTemplate;return C.useMemo(function(){var i=hie();die(i,e,{enableHardwareAcceleration:!t},n);var r=i.vars,a=i.style;return Ke(Ke({},r),a)},[e])}function eLu(u,e,t){var n=u.style||{},i={};return kPe(i,n,u),Object.assign(i,Xwu(u,e,t)),u.transformValues&&(i=u.transformValues(i)),i}function tLu(u,e,t){var n={},i=eLu(u,e,t);return u.drag&&u.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=u.drag===!0?"none":"pan-".concat(u.drag==="x"?"y":"x")),n.style=i,n}var uLu=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function HT(u){return uLu.has(u)}var FPe=function(u){return!HT(u)};function nLu(u){u&&(FPe=function(e){return e.startsWith("on")?!HT(e):u(e)})}try{nLu(require("@emotion/is-prop-valid").default)}catch{}function iLu(u,e,t){var n={};for(var i in u)(FPe(i)||t===!0&&HT(i)||!e&&!HT(i)||u.draggable&&i.startsWith("onDrag"))&&(n[i]=u[i]);return n}function jpe(u,e,t){return typeof u=="string"?u:Eu.transform(e+t*u)}function rLu(u,e,t){var n=jpe(e,u.x,u.width),i=jpe(t,u.y,u.height);return"".concat(n," ").concat(i)}var aLu={offset:"stroke-dashoffset",array:"stroke-dasharray"},oLu={offset:"strokeDashoffset",array:"strokeDasharray"};function sLu(u,e,t,n,i){t===void 0&&(t=1),n===void 0&&(n=0),i===void 0&&(i=!0),u.pathLength=1;var r=i?aLu:oLu;u[r.offset]=Eu.transform(-n);var a=Eu.transform(e),o=Eu.transform(t);u[r.array]="".concat(a," ").concat(o)}function Eie(u,e,t,n){var i=e.attrX,r=e.attrY,a=e.originX,o=e.originY,s=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,d=e.pathOffset,h=d===void 0?0:d,E=go(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);die(u,E,t,n),u.attrs=u.style,u.style={};var m=u.attrs,g=u.style,f=u.dimensions;m.transform&&(f&&(g.transform=m.transform),delete m.transform),f&&(a!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=rLu(f,a!==void 0?a:.5,o!==void 0?o:.5)),i!==void 0&&(m.x=i),r!==void 0&&(m.y=r),s!==void 0&&sLu(m,s,c,h,!1)}var yPe=function(){return Ke(Ke({},hie()),{attrs:{}})};function lLu(u,e){var t=C.useMemo(function(){var i=yPe();return Eie(i,e,{enableHardwareAcceleration:!1},u.transformTemplate),Ke(Ke({},i.attrs),{style:Ke({},i.style)})},[e]);if(u.style){var n={};kPe(n,u.style,u),t.style=Ke(Ke({},n),t.style)}return t}function cLu(u){u===void 0&&(u=!1);var e=function(t,n,i,r,a,o){var s=a.latestValues,l=lie(t)?lLu:tLu,c=l(n,s,o),d=iLu(n,typeof t=="string",u),h=Ke(Ke(Ke({},d),c),{ref:r});return i&&(h["data-projection-id"]=i),C.createElement(t,h)};return e}var dLu=/([a-z])([A-Z])/g,hLu="$1-$2",APe=function(u){return u.replace(dLu,hLu).toLowerCase()};function _Pe(u,e,t,n){var i=e.style,r=e.vars;Object.assign(u.style,i,n&&n.getProjectionStyles(t));for(var a in r)u.style.setProperty(a,r[a])}var SPe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function BPe(u,e,t,n){_Pe(u,e,void 0,n);for(var i in e.attrs)u.setAttribute(SPe.has(i)?i:APe(i),e.attrs[i])}function mie(u){var e=u.style,t={};for(var n in e)(H1(e[n])||EPe(n,u))&&(t[n]=e[n]);return t}function wPe(u){var e=mie(u);for(var t in u)if(H1(u[t])){var n=t==="x"||t==="y"?"attr"+t.toUpperCase():t;e[n]=u[t]}return e}function gie(u){return typeof u=="object"&&typeof u.start=="function"}var By=function(u){return Array.isArray(u)},ELu=function(u){return!!(u&&typeof u=="object"&&u.mix&&u.toValue)},LPe=function(u){return By(u)?u[u.length-1]||0:u};function J8(u){var e=H1(u)?u.get():u;return ELu(e)?e.toValue():e}function Hpe(u,e,t,n){var i=u.scrapeMotionValuesFromProps,r=u.createRenderState,a=u.onMount,o={latestValues:mLu(e,t,n,i),renderState:r()};return a&&(o.mount=function(s){return a(e,s,o)}),o}var zPe=function(u){return function(e,t){var n=C.useContext(EO),i=C.useContext(mO);return t?Hpe(u,e,n,i):zg(function(){return Hpe(u,e,n,i)})}};function mLu(u,e,t,n){var i={},r=(t==null?void 0:t.initial)===!1,a=n(u);for(var o in a)i[o]=J8(a[o]);var s=u.initial,l=u.animate,c=fO(u),d=lPe(u);e&&d&&!c&&u.inherit!==!1&&(s??(s=e.initial),l??(l=e.animate));var h=r||s===!1,E=h?l:s;if(E&&typeof E!="boolean"&&!gie(E)){var m=Array.isArray(E)?E:[E];m.forEach(function(g){var f=sPe(u,g);if(f){var p=f.transitionEnd;f.transition;var D=go(f,["transitionEnd","transition"]);for(var x in D){var b=D[x];if(Array.isArray(b)){var k=h?b.length-1:0;b=b[k]}b!==null&&(i[x]=b)}for(var x in p)i[x]=p[x]}})}return i}var gLu={useVisualState:zPe({scrapeMotionValuesFromProps:wPe,createRenderState:yPe,onMount:function(u,e,t){var n=t.renderState,i=t.latestValues;try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Eie(n,i,{enableHardwareAcceleration:!1},u.transformTemplate),BPe(e,n)}})},fLu={useVisualState:zPe({scrapeMotionValuesFromProps:mie,createRenderState:hie})};function pLu(u,e,t,n,i){var r=e.forwardMotionProps,a=r===void 0?!1:r,o=lie(u)?gLu:fLu;return Ke(Ke({},o),{preloadedFeatures:t,useRender:cLu(a),createVisualElement:n,projectionNodeConstructor:i,Component:u})}var Bi;(function(u){u.Animate="animate",u.Hover="whileHover",u.Tap="whileTap",u.Drag="whileDrag",u.Focus="whileFocus",u.InView="whileInView",u.Exit="exit"})(Bi||(Bi={}));function pO(u,e,t,n){return n===void 0&&(n={passive:!0}),u.addEventListener(e,t,n),function(){return u.removeEventListener(e,t)}}function SY(u,e,t,n){C.useEffect(function(){var i=u.current;if(t&&i)return pO(i,e,t,n)},[u,e,t,n])}function DLu(u){var e=u.whileFocus,t=u.visualElement,n=function(){var r;(r=t.animationState)===null||r===void 0||r.setActive(Bi.Focus,!0)},i=function(){var r;(r=t.animationState)===null||r===void 0||r.setActive(Bi.Focus,!1)};SY(t,"focus",e?n:void 0),SY(t,"blur",e?i:void 0)}function MPe(u){return typeof PointerEvent<"u"&&u instanceof PointerEvent?u.pointerType==="mouse":u instanceof MouseEvent}function TPe(u){var e=!!u.touches;return e}function xLu(u){return function(e){var t=e instanceof MouseEvent,n=!t||t&&e.button===0;n&&u(e)}}var vLu={pageX:0,pageY:0};function CLu(u,e){e===void 0&&(e="page");var t=u.touches[0]||u.changedTouches[0],n=t||vLu;return{x:n[e+"X"],y:n[e+"Y"]}}function bLu(u,e){return e===void 0&&(e="page"),{x:u[e+"X"],y:u[e+"Y"]}}function fie(u,e){return e===void 0&&(e="page"),{point:TPe(u)?CLu(u,e):bLu(u,e)}}var NPe=function(u,e){e===void 0&&(e=!1);var t=function(n){return u(n,fie(n))};return e?xLu(t):t},kLu=function(){return W6&&window.onpointerdown===null},FLu=function(){return W6&&window.ontouchstart===null},yLu=function(){return W6&&window.onmousedown===null},ALu={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},_Lu={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function PPe(u){return kLu()?u:FLu()?_Lu[u]:yLu()?ALu[u]:u}function Ox(u,e,t,n){return pO(u,PPe(e),NPe(t,e==="pointerdown"),n)}function VT(u,e,t,n){return SY(u,PPe(e),t&&NPe(t,e==="pointerdown"),n)}function RPe(u){var e=null;return function(){var t=function(){e=null};return e===null?(e=u,t):!1}}var Vpe=RPe("dragHorizontal"),$pe=RPe("dragVertical");function IPe(u){var e=!1;if(u==="y")e=$pe();else if(u==="x")e=Vpe();else{var t=Vpe(),n=$pe();t&&n?e=function(){t(),n()}:(t&&t(),n&&n())}return e}function OPe(){var u=IPe(!0);return u?(u(),!1):!0}function Kpe(u,e,t){return function(n,i){var r;!MPe(n)||OPe()||((r=u.animationState)===null||r===void 0||r.setActive(Bi.Hover,e),t==null||t(n,i))}}function SLu(u){var e=u.onHoverStart,t=u.onHoverEnd,n=u.whileHover,i=u.visualElement;VT(i,"pointerenter",e||n?Kpe(i,!0,e):void 0,{passive:!e}),VT(i,"pointerleave",t||n?Kpe(i,!1,t):void 0,{passive:!t})}var jPe=function(u,e){return e?u===e?!0:jPe(u,e.parentElement):!1};function HPe(u){return C.useEffect(function(){return function(){return u()}},[])}const $T=(u,e,t)=>Math.min(Math.max(t,u),e),L$=.001,BLu=.01,Wpe=10,wLu=.05,LLu=1;function zLu({duration:u=800,bounce:e=.25,velocity:t=0,mass:n=1}){let i,r;hwu(u<=Wpe*1e3);let a=1-e;a=$T(wLu,LLu,a),u=$T(BLu,Wpe,u/1e3),a<1?(i=l=>{const c=l*a,d=c*u,h=c-t,E=BY(l,a),m=Math.exp(-d);return L$-h/E*m},r=l=>{const d=l*a*u,h=d*t+t,E=Math.pow(a,2)*Math.pow(l,2)*u,m=Math.exp(-d),g=BY(Math.pow(l,2),a);return(-i(l)+L$>0?-1:1)*((h-E)*m)/g}):(i=l=>{const c=Math.exp(-l*u),d=(l-t)*u+1;return-L$+c*d},r=l=>{const c=Math.exp(-l*u),d=(t-l)*(u*u);return c*d});const o=5/u,s=TLu(i,r,o);if(u=u*1e3,isNaN(s))return{stiffness:100,damping:10,duration:u};{const l=Math.pow(s,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:u}}}const MLu=12;function TLu(u,e,t){let n=t;for(let i=1;iu[t]!==void 0)}function RLu(u){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},u);if(!Gpe(u,PLu)&&Gpe(u,NLu)){const t=zLu(u);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function pie(u){var{from:e=0,to:t=1,restSpeed:n=2,restDelta:i}=u,r=go(u,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:o,damping:s,mass:l,velocity:c,duration:d,isResolvedFromDuration:h}=RLu(r),E=Upe,m=Upe;function g(){const f=c?-(c/1e3):0,p=t-e,D=s/(2*Math.sqrt(o*l)),x=Math.sqrt(o/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(t-e)/100,.4)),D<1){const b=BY(x,D);E=k=>{const A=Math.exp(-D*x*k);return t-A*((f+D*x*p)/b*Math.sin(b*k)+p*Math.cos(b*k))},m=k=>{const A=Math.exp(-D*x*k);return D*x*A*(Math.sin(b*k)*(f+D*x*p)/b+p*Math.cos(b*k))-A*(Math.cos(b*k)*(f+D*x*p)-b*p*Math.sin(b*k))}}else if(D===1)E=b=>t-Math.exp(-x*b)*(p+(f+x*p)*b);else{const b=x*Math.sqrt(D*D-1);E=k=>{const A=Math.exp(-D*x*k),F=Math.min(b*k,300);return t-A*((f+D*x*p)*Math.sinh(F)+b*p*Math.cosh(F))/b}}}return g(),{next:f=>{const p=E(f);if(h)a.done=f>=d;else{const D=m(f)*1e3,x=Math.abs(D)<=n,b=Math.abs(t-p)<=i;a.done=x&&b}return a.value=a.done?t:p,a},flipTarget:()=>{c=-c,[e,t]=[t,e],g()}}}pie.needsInterpolation=(u,e)=>typeof u=="string"||typeof e=="string";const Upe=u=>0,wy=(u,e,t)=>{const n=e-u;return n===0?1:(t-u)/n},ir=(u,e,t)=>-t*u+t*e+u;function z$(u,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?u+(e-u)*6*t:t<1/2?e:t<2/3?u+(e-u)*(2/3-t)*6:u}function qpe({hue:u,saturation:e,lightness:t,alpha:n}){u/=360,e/=100,t/=100;let i=0,r=0,a=0;if(!e)i=r=a=t;else{const o=t<.5?t*(1+e):t+e-t*e,s=2*t-o;i=z$(s,o,u+1/3),r=z$(s,o,u),a=z$(s,o,u-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}const ILu=(u,e,t)=>{const n=u*u,i=e*e;return Math.sqrt(Math.max(0,t*(i-n)+n))},OLu=[AY,KE,e3],Jpe=u=>OLu.find(e=>e.test(u)),VPe=(u,e)=>{let t=Jpe(u),n=Jpe(e),i=t.parse(u),r=n.parse(e);t===e3&&(i=qpe(i),t=KE),n===e3&&(r=qpe(r),n=KE);const a=Object.assign({},i);return o=>{for(const s in a)s!=="alpha"&&(a[s]=ILu(i[s],r[s],o));return a.alpha=ir(i.alpha,r.alpha,o),t.transform(a)}},wY=u=>typeof u=="number",jLu=(u,e)=>t=>e(u(t)),DO=(...u)=>u.reduce(jLu);function $Pe(u,e){return wY(u)?t=>ir(u,e,t):Jo.test(u)?VPe(u,e):WPe(u,e)}const KPe=(u,e)=>{const t=[...u],n=t.length,i=u.map((r,a)=>$Pe(r,e[a]));return r=>{for(let a=0;a{const t=Object.assign(Object.assign({},u),e),n={};for(const i in t)u[i]!==void 0&&e[i]!==void 0&&(n[i]=$Pe(u[i],e[i]));return i=>{for(const r in n)t[r]=n[r](i);return t}};function Zpe(u){const e=v4.parse(u),t=e.length;let n=0,i=0,r=0;for(let a=0;a{const t=v4.createTransformer(e),n=Zpe(u),i=Zpe(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?DO(KPe(n.parsed,i.parsed),t):a=>`${a>0?e:u}`},VLu=(u,e)=>t=>ir(u,e,t);function $Lu(u){if(typeof u=="number")return VLu;if(typeof u=="string")return Jo.test(u)?VPe:WPe;if(Array.isArray(u))return KPe;if(typeof u=="object")return HLu}function KLu(u,e,t){const n=[],i=t||$Lu(u[0]),r=u.length-1;for(let a=0;at(wy(u,e,n))}function GLu(u,e){const t=u.length,n=t-1;return i=>{let r=0,a=!1;if(i<=u[0]?a=!0:i>=u[n]&&(r=n-1,a=!0),!a){let s=1;for(;si||s===n);s++);r=s-1}const o=wy(u[r],u[r+1],i);return e[r](o)}}function Die(u,e,{clamp:t=!0,ease:n,mixer:i}={}){const r=u.length;OT(r===e.length),OT(!n||!Array.isArray(n)||n.length===r-1),u[0]>u[r-1]&&(u=[].concat(u),e=[].concat(e),u.reverse(),e.reverse());const a=KLu(e,n,i),o=r===2?WLu(u,a):GLu(u,a);return t?s=>o($T(u[0],u[r-1],s)):o}const xO=u=>e=>1-u(1-e),xie=u=>e=>e<=.5?u(2*e)/2:(2-u(2*(1-e)))/2,ULu=u=>e=>Math.pow(e,u),GPe=u=>e=>e*e*((u+1)*e-u),qLu=u=>{const e=GPe(u);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},UPe=1.525,JLu=4/11,ZLu=8/11,YLu=9/10,vie=u=>u,Cie=ULu(2),QLu=xO(Cie),qPe=xie(Cie),JPe=u=>1-Math.sin(Math.acos(u)),bie=xO(JPe),XLu=xie(bie),kie=GPe(UPe),ezu=xO(kie),tzu=xie(kie),uzu=qLu(UPe),nzu=4356/361,izu=35442/1805,rzu=16061/1805,KT=u=>{if(u===1||u===0)return u;const e=u*u;return uu<.5?.5*(1-KT(1-u*2)):.5*KT(u*2-1)+.5;function szu(u,e){return u.map(()=>e||qPe).splice(0,u.length-1)}function lzu(u){const e=u.length;return u.map((t,n)=>n!==0?n/(e-1):0)}function czu(u,e){return u.map(t=>t*e)}function Z8({from:u=0,to:e=1,ease:t,offset:n,duration:i=300}){const r={done:!1,value:u},a=Array.isArray(e)?e:[u,e],o=czu(n&&n.length===a.length?n:lzu(a),i);function s(){return Die(o,a,{ease:Array.isArray(t)?t:szu(a,t)})}let l=s();return{next:c=>(r.value=l(c),r.done=c>=i,r),flipTarget:()=>{a.reverse(),l=s()}}}function dzu({velocity:u=0,from:e=0,power:t=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:r}){const a={done:!1,value:e};let o=t*u;const s=e+o,l=r===void 0?s:r(s);return l!==s&&(o=l-e),{next:c=>{const d=-o*Math.exp(-c/n);return a.done=!(d>i||d<-i),a.value=a.done?l:l+d,a},flipTarget:()=>{}}}const Ype={keyframes:Z8,spring:pie,decay:dzu};function hzu(u){if(Array.isArray(u.to))return Z8;if(Ype[u.type])return Ype[u.type];const e=new Set(Object.keys(u));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Z8:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?pie:Z8}const ZPe=1/60*1e3,Ezu=typeof performance<"u"?()=>performance.now():()=>Date.now(),YPe=typeof window<"u"?u=>window.requestAnimationFrame(u):u=>setTimeout(()=>u(Ezu()),ZPe);function mzu(u){let e=[],t=[],n=0,i=!1,r=!1;const a=new WeakSet,o={schedule:(s,l=!1,c=!1)=>{const d=c&&i,h=d?e:t;return l&&a.add(s),h.indexOf(s)===-1&&(h.push(s),d&&i&&(n=e.length)),s},cancel:s=>{const l=t.indexOf(s);l!==-1&&t.splice(l,1),a.delete(s)},process:s=>{if(i){r=!0;return}if(i=!0,[e,t]=[t,e],t.length=0,n=e.length,n)for(let l=0;l(u[e]=mzu(()=>Ly=!0),u),{}),Jc=v7.reduce((u,e)=>{const t=vO[e];return u[e]=(n,i=!1,r=!1)=>(Ly||pzu(),t.schedule(n,i,r)),u},{}),u6=v7.reduce((u,e)=>(u[e]=vO[e].cancel,u),{}),M$=v7.reduce((u,e)=>(u[e]=()=>vO[e].process(jx),u),{}),fzu=u=>vO[u].process(jx),QPe=u=>{Ly=!1,jx.delta=LY?ZPe:Math.max(Math.min(u-jx.timestamp,gzu),1),jx.timestamp=u,zY=!0,v7.forEach(fzu),zY=!1,Ly&&(LY=!1,YPe(QPe))},pzu=()=>{Ly=!0,LY=!0,zY||YPe(QPe)},WT=()=>jx;function XPe(u,e,t=0){return u-e-t}function Dzu(u,e,t=0,n=!0){return n?XPe(e+-u,e,t):e-(u-e)+t}function xzu(u,e,t,n){return n?u>=e+t:u<=-t}const vzu=u=>{const e=({delta:t})=>u(t);return{start:()=>Jc.update(e,!0),stop:()=>u6.update(e)}};function eRe(u){var e,t,{from:n,autoplay:i=!0,driver:r=vzu,elapsed:a=0,repeat:o=0,repeatType:s="loop",repeatDelay:l=0,onPlay:c,onStop:d,onComplete:h,onRepeat:E,onUpdate:m}=u,g=go(u,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:f}=g,p,D=0,x=g.duration,b,k=!1,A=!0,F;const S=hzu(g);!((t=(e=S).needsInterpolation)===null||t===void 0)&&t.call(e,n,f)&&(F=Die([0,100],[n,f],{clamp:!1}),n=0,f=100);const w=S(Object.assign(Object.assign({},g),{from:n,to:f}));function z(){D++,s==="reverse"?(A=D%2===0,a=Dzu(a,x,l,A)):(a=XPe(a,x,l),s==="mirror"&&w.flipTarget()),k=!1,E&&E()}function N(){p.stop(),h&&h()}function O(_){if(A||(_=-_),a+=_,!k){const L=w.next(Math.max(0,a));b=L.value,F&&(b=F(b)),k=A?L.done:a<=0}m==null||m(b),k&&(D===0&&(x??(x=a)),D{d==null||d(),p.stop()}}}function tRe(u,e){return e?u*(1e3/e):0}function Czu({from:u=0,velocity:e=0,min:t,max:n,power:i=.8,timeConstant:r=750,bounceStiffness:a=500,bounceDamping:o=10,restDelta:s=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:h,onStop:E}){let m;function g(x){return t!==void 0&&xn}function f(x){return t===void 0?n:n===void 0||Math.abs(t-x){var k;d==null||d(b),(k=x.onUpdate)===null||k===void 0||k.call(x,b)},onComplete:h,onStop:E}))}function D(x){p(Object.assign({type:"spring",stiffness:a,damping:o,restDelta:s},x))}if(g(u))D({from:u,velocity:e,to:f(u)});else{let x=i*e+u;typeof l<"u"&&(x=l(x));const b=f(x),k=b===t?-1:1;let A,F;const S=w=>{A=F,F=w,e=tRe(w-A,WT().delta),(k===1&&w>b||k===-1&&wm==null?void 0:m.stop()}}const MY=u=>u.hasOwnProperty("x")&&u.hasOwnProperty("y"),Qpe=u=>MY(u)&&u.hasOwnProperty("z"),gS=(u,e)=>Math.abs(u-e);function uRe(u,e){if(wY(u)&&wY(e))return gS(u,e);if(MY(u)&&MY(e)){const t=gS(u.x,e.x),n=gS(u.y,e.y),i=Qpe(u)&&Qpe(e)?gS(u.z,e.z):0;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2)+Math.pow(i,2))}}const nRe=(u,e)=>1-3*e+3*u,iRe=(u,e)=>3*e-6*u,rRe=u=>3*u,GT=(u,e,t)=>((nRe(e,t)*u+iRe(e,t))*u+rRe(e))*u,aRe=(u,e,t)=>3*nRe(e,t)*u*u+2*iRe(e,t)*u+rRe(e),bzu=1e-7,kzu=10;function Fzu(u,e,t,n,i){let r,a,o=0;do a=e+(t-e)/2,r=GT(a,n,i)-u,r>0?t=a:e=a;while(Math.abs(r)>bzu&&++o=Azu?_zu(a,d,u,t):h===0?d:Fzu(a,o,o+fS,u,t)}return a=>a===0||a===1?a:GT(r(a),e,n)}function Bzu(u){var e=u.onTap,t=u.onTapStart,n=u.onTapCancel,i=u.whileTap,r=u.visualElement,a=e||t||n||i,o=C.useRef(!1),s=C.useRef(null),l={passive:!(t||e||n||m)};function c(){var g;(g=s.current)===null||g===void 0||g.call(s),s.current=null}function d(){var g;return c(),o.current=!1,(g=r.animationState)===null||g===void 0||g.setActive(Bi.Tap,!1),!OPe()}function h(g,f){d()&&(jPe(r.getInstance(),g.target)?e==null||e(g,f):n==null||n(g,f))}function E(g,f){d()&&(n==null||n(g,f))}function m(g,f){var p;c(),!o.current&&(o.current=!0,s.current=DO(Ox(window,"pointerup",h,l),Ox(window,"pointercancel",E,l)),(p=r.animationState)===null||p===void 0||p.setActive(Bi.Tap,!0),t==null||t(g,f))}VT(r,"pointerdown",a?m:void 0,l),HPe(c)}var Xpe=new Set;function wzu(u,e,t){u||Xpe.has(e)||(console.warn(e),t&&console.warn(t),Xpe.add(e))}var TY=new WeakMap,T$=new WeakMap,Lzu=function(u){var e;(e=TY.get(u.target))===null||e===void 0||e(u)},zzu=function(u){u.forEach(Lzu)};function Mzu(u){var e=u.root,t=go(u,["root"]),n=e||document;T$.has(n)||T$.set(n,{});var i=T$.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(zzu,Ke({root:e},t))),i[r]}function Tzu(u,e,t){var n=Mzu(e);return TY.set(u,t),n.observe(u),function(){TY.delete(u),n.unobserve(u)}}function Nzu(u){var e=u.visualElement,t=u.whileInView,n=u.onViewportEnter,i=u.onViewportLeave,r=u.viewport,a=r===void 0?{}:r,o=C.useRef({hasEnteredView:!1,isInView:!1}),s=!!(t||n||i);a.once&&o.current.hasEnteredView&&(s=!1);var l=typeof IntersectionObserver>"u"?Izu:Rzu;l(s,o.current,e,a)}var Pzu={some:0,all:1};function Rzu(u,e,t,n){var i=n.root,r=n.margin,a=n.amount,o=a===void 0?"some":a,s=n.once;C.useEffect(function(){if(u){var l={root:i==null?void 0:i.current,rootMargin:r,threshold:typeof o=="number"?o:Pzu[o]},c=function(d){var h,E=d.isIntersecting;if(e.isInView!==E&&(e.isInView=E,!(s&&!E&&e.hasEnteredView))){E&&(e.hasEnteredView=!0),(h=t.animationState)===null||h===void 0||h.setActive(Bi.InView,E);var m=t.getProps(),g=E?m.onViewportEnter:m.onViewportLeave;g==null||g(d)}};return Tzu(t.getInstance(),l,c)}},[u,i,r,o])}function Izu(u,e,t,n){var i=n.fallback,r=i===void 0?!0:i;C.useEffect(function(){!u||!r||(nPe!=="production"&&wzu(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;e.hasEnteredView=!0;var o=t.getProps().onViewportEnter;o==null||o(null),(a=t.animationState)===null||a===void 0||a.setActive(Bi.InView,!0)}))},[u])}var WE=function(u){return function(e){return u(e),null}},Ozu={inView:WE(Nzu),tap:WE(Bzu),focus:WE(DLu),hover:WE(SLu)},jzu=0,Hzu=function(){return jzu++},Vzu=function(){return zg(Hzu)};function oRe(){var u=C.useContext(mO);if(u===null)return[!0,null];var e=u.isPresent,t=u.onExitComplete,n=u.register,i=Vzu();C.useEffect(function(){return n(i)},[]);var r=function(){return t==null?void 0:t(i)};return!e&&t?[!1,r]:[!0]}function sRe(u,e){if(!Array.isArray(e))return!1;var t=e.length;if(t!==u.length)return!1;for(var n=0;n-1&&u.splice(t,1)}function uMu(u,e,t){var n=Zi(u),i=n.slice(0),r=e<0?i.length+e:e;if(r>=0&&rD&&N,T=Array.isArray(z)?z:[z],R=T.reduce(r,{});O===!1&&(R={});var I=w.prevResolvedValues,H=I===void 0?{}:I,V=Ke(Ke({},H),R),U=function(re){L=!0,f.delete(re),w.needsAnimating[re]=!0};for(var J in V){var Y=R[J],X=H[J];p.hasOwnProperty(J)||(Y!==X?By(Y)&&By(X)?!sRe(Y,X)||_?U(J):w.protectedKeys[J]=!0:Y!==void 0?U(J):f.add(J):Y!==void 0&&f.has(J)?U(J):w.protectedKeys[J]=!0)}w.prevProp=z,w.prevResolvedValues=R,w.isActive&&(p=Ke(Ke({},p),R)),i&&u.blockInitialAnimation&&(L=!1),L&&!y&&g.push.apply(g,Bl([],Zi(T.map(function(re){return{animation:re,options:Ke({type:S},c)}})),!1))},b=0;b=3;if(!(!E&&!m)){var g=h.point,f=WT().timestamp;i.history.push(Ke(Ke({},g),{timestamp:f}));var p=i.handlers,D=p.onStart,x=p.onMove;E||(D&&D(i.lastMoveEvent,h),i.startEvent=i.lastMoveEvent),x&&x(i.lastMoveEvent,h)}}},this.handlePointerMove=function(h,E){if(i.lastMoveEvent=h,i.lastMoveEventInfo=P$(E,i.transformPagePoint),MPe(h)&&h.buttons===0){i.handlePointerUp(h,E);return}Jc.update(i.updatePoint,!0)},this.handlePointerUp=function(h,E){i.end();var m=i.handlers,g=m.onEnd,f=m.onSessionEnd,p=R$(P$(E,i.transformPagePoint),i.history);i.startEvent&&g&&g(h,p),f&&f(h,p)},!(TPe(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=a;var o=fie(e),s=P$(o,this.transformPagePoint),l=s.point,c=WT().timestamp;this.history=[Ke(Ke({},l),{timestamp:c})];var d=t.onSessionStart;d&&d(e,R$(s,this.history)),this.removeListeners=DO(Ox(window,"pointermove",this.handlePointerMove),Ox(window,"pointerup",this.handlePointerUp),Ox(window,"pointercancel",this.handlePointerUp))}}return u.prototype.updateHandlers=function(e){this.handlers=e},u.prototype.end=function(){this.removeListeners&&this.removeListeners(),u6.update(this.updatePoint)},u}();function P$(u,e){return e?{point:e(u.point)}:u}function rDe(u,e){return{x:u.x-e.x,y:u.y-e.y}}function R$(u,e){var t=u.point;return{point:t,delta:rDe(t,ERe(e)),offset:rDe(t,FMu(e)),velocity:yMu(e,.1)}}function FMu(u){return u[0]}function ERe(u){return u[u.length-1]}function yMu(u,e){if(u.length<2)return{x:0,y:0};for(var t=u.length-1,n=null,i=ERe(u);t>=0&&(n=u[t],!(i.timestamp-n.timestamp>UT(e)));)t--;if(!n)return{x:0,y:0};var r=(i.timestamp-n.timestamp)/1e3;if(r===0)return{x:0,y:0};var a={x:(i.x-n.x)/r,y:(i.y-n.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function C4(u){return u.max-u.min}function aDe(u,e,t){return e===void 0&&(e=0),t===void 0&&(t=.01),uRe(u,e)i&&(u=t?ir(i,u,t.max):Math.min(u,i)),u}function cDe(u,e,t){return{min:e!==void 0?u.min+e:void 0,max:t!==void 0?u.max+t-(u.max-u.min):void 0}}function SMu(u,e){var t=e.top,n=e.left,i=e.bottom,r=e.right;return{x:cDe(u.x,n,r),y:cDe(u.y,t,i)}}function dDe(u,e){var t,n=e.min-u.min,i=e.max-u.max;return e.max-e.minn?t=wy(e.min,e.max-n,u.min):n>i&&(t=wy(u.min,u.max-i,e.min)),$T(0,1,t)}function LMu(u,e){var t={};return e.min!==void 0&&(t.min=e.min-u.min),e.max!==void 0&&(t.max=e.max-u.min),t}var PY=.35;function zMu(u){return u===void 0&&(u=PY),u===!1?u=0:u===!0&&(u=PY),{x:hDe(u,"left","right"),y:hDe(u,"top","bottom")}}function hDe(u,e,t){return{min:EDe(u,e),max:EDe(u,t)}}function EDe(u,e){var t;return typeof u=="number"?u:(t=u[e])!==null&&t!==void 0?t:0}var mDe=function(){return{translate:0,scale:1,origin:0,originPoint:0}},q2=function(){return{x:mDe(),y:mDe()}},gDe=function(){return{min:0,max:0}},bo=function(){return{x:gDe(),y:gDe()}};function Md(u){return[u("x"),u("y")]}function mRe(u){var e=u.top,t=u.left,n=u.right,i=u.bottom;return{x:{min:t,max:n},y:{min:e,max:i}}}function MMu(u){var e=u.x,t=u.y;return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TMu(u,e){if(!e)return u;var t=e({x:u.left,y:u.top}),n=e({x:u.right,y:u.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function I$(u){return u===void 0||u===1}function gRe(u){var e=u.scale,t=u.scaleX,n=u.scaleY;return!I$(e)||!I$(t)||!I$(n)}function oE(u){return gRe(u)||fDe(u.x)||fDe(u.y)||u.z||u.rotate||u.rotateX||u.rotateY}function fDe(u){return u&&u!=="0%"}function qT(u,e,t){var n=u-t,i=e*n;return t+i}function pDe(u,e,t,n,i){return i!==void 0&&(u=qT(u,i,n)),qT(u,t,n)+e}function RY(u,e,t,n,i){e===void 0&&(e=0),t===void 0&&(t=1),u.min=pDe(u.min,e,t,n,i),u.max=pDe(u.max,e,t,n,i)}function fRe(u,e){var t=e.x,n=e.y;RY(u.x,t.translate,t.scale,t.originPoint),RY(u.y,n.translate,n.scale,n.originPoint)}function NMu(u,e,t,n){var i,r;n===void 0&&(n=!1);var a=t.length;if(a){e.x=e.y=1;for(var o,s,l=0;le?t="y":Math.abs(u.x)>e&&(t="x"),t}function VMu(u){var e=u.dragControls,t=u.visualElement,n=zg(function(){return new jMu(t)});C.useEffect(function(){return e&&e.subscribe(n)},[n,e]),C.useEffect(function(){return n.addListeners()},[n])}function $Mu(u){var e=u.onPan,t=u.onPanStart,n=u.onPanEnd,i=u.onPanSessionStart,r=u.visualElement,a=e||t||n||i,o=C.useRef(null),s=C.useContext(hO).transformPagePoint,l={onSessionStart:i,onStart:t,onMove:e,onEnd:function(d,h){o.current=null,n&&n(d,h)}};C.useEffect(function(){o.current!==null&&o.current.updateHandlers(l)});function c(d){o.current=new hRe(d,l,{transformPagePoint:s})}VT(r,"pointerdown",a&&c),HPe(function(){return o.current&&o.current.end()})}var KMu={pan:WE($Mu),drag:WE(VMu)},xS=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function WMu(){var u=xS.map(function(){return new W2}),e={},t={clearAllListeners:function(){return u.forEach(function(n){return n.clear()})},updatePropListeners:function(n){xS.forEach(function(i){var r,a="on"+i,o=n[a];(r=e[i])===null||r===void 0||r.call(e),o&&(e[i]=t[a](o))})}};return u.forEach(function(n,i){t["on"+xS[i]]=function(r){return n.add(r)},t["notify"+xS[i]]=function(){for(var r=[],a=0;a=0?window.pageYOffset:null,l=tTu(e,u,o);return r.length&&r.forEach(function(c){var d=Zi(c,2),h=d[0],E=d[1];u.getValue(h).set(E)}),u.syncRender(),s!==null&&window.scrollTo({top:s}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function nTu(u,e,t,n){return YMu(e)?uTu(u,e,t,n):{target:e,transitionEnd:n}}var iTu=function(u,e,t,n){var i=JMu(u,e,n);return e=i.target,n=i.transitionEnd,nTu(u,e,t,n)};function rTu(u){return window.getComputedStyle(u)}var kRe={treeType:"dom",readValueFromInstance:function(u,e){if(p7(e)){var t=Fie(e);return t&&t.default||0}else{var n=rTu(u);return(mPe(e)?n.getPropertyValue(e):n[e])||0}},sortNodePosition:function(u,e){return u.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(u,e){var t;return(t=u.style)===null||t===void 0?void 0:t[e]},measureViewportBox:function(u,e){var t=e.transformPagePoint;return pRe(u,t)},resetTransform:function(u,e,t){var n=t.transformTemplate;e.style.transform=n?n({},""):"none",u.scheduleRender()},restoreTransform:function(u,e){u.style.transform=e.style.transform},removeValueFromRenderState:function(u,e){var t=e.vars,n=e.style;delete t[u],delete n[u]},makeTargetAnimatable:function(u,e,t,n){var i=t.transformValues;n===void 0&&(n=!0);var r=e.transition,a=e.transitionEnd,o=go(e,["transition","transitionEnd"]),s=hMu(o,r||{},u);if(i&&(a&&(a=i(a)),o&&(o=i(o)),s&&(s=i(s))),n){cMu(u,o,s);var l=iTu(u,o,s,a);a=l.transitionEnd,o=l.target}return Ke({transition:r,transitionEnd:a},o)},scrapeMotionValuesFromProps:mie,build:function(u,e,t,n,i){u.isVisible!==void 0&&(e.style.visibility=u.isVisible?"visible":"hidden"),die(e,t,n,i.transformTemplate)},render:_Pe},aTu=DRe(kRe),oTu=DRe(Ke(Ke({},kRe),{getBaseTarget:function(u,e){return u[e]},readValueFromInstance:function(u,e){var t;return p7(e)?((t=Fie(e))===null||t===void 0?void 0:t.default)||0:(e=SPe.has(e)?e:APe(e),u.getAttribute(e))},scrapeMotionValuesFromProps:wPe,build:function(u,e,t,n,i){Eie(e,t,n,i.transformTemplate)},render:BPe})),sTu=function(u,e){return lie(u)?oTu(e,{enableHardwareAcceleration:!1}):aTu(e,{enableHardwareAcceleration:!0})};function FDe(u,e){return e.max===e.min?0:u/(e.max-e.min)*100}var tb={correct:function(u,e){if(!e.target)return u;if(typeof u=="string")if(Eu.test(u))u=parseFloat(u);else return u;var t=FDe(u,e.target.x),n=FDe(u,e.target.y);return"".concat(t,"% ").concat(n,"%")}},yDe="_$css",lTu={correct:function(u,e){var t=e.treeScale,n=e.projectionDelta,i=u,r=u.includes("var("),a=[];r&&(u=u.replace(vRe,function(g){return a.push(g),yDe}));var o=v4.parse(u);if(o.length>5)return i;var s=v4.createTransformer(u),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=d;var h=ir(c,d,.5);typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h);var E=s(o);if(r){var m=0;E=E.replace(yDe,function(){var g=a[m];return m++,g})}return E}},cTu=function(u){p9e(e,u);function e(){return u!==null&&u.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var t=this,n=this.props,i=n.visualElement,r=n.layoutGroup,a=n.switchLayoutGroup,o=n.layoutId,s=i.projection;Mwu(hTu),s&&(r!=null&&r.group&&r.group.add(s),a!=null&&a.register&&o&&a.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",function(){t.safeToRemove()}),s.setOptions(Ke(Ke({},s.options),{onExitComplete:function(){return t.safeToRemove()}}))),V2.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var n=this,i=this.props,r=i.layoutDependency,a=i.visualElement,o=i.drag,s=i.isPresent,l=a.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==r||r===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Jc.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||n.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,n=t.visualElement,i=t.layoutGroup,r=t.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(a),r!=null&&r.deregister&&r.deregister(a))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;t==null||t()},e.prototype.render=function(){return null},e}(M.Component);function dTu(u){var e=Zi(oRe(),2),t=e[0],n=e[1],i=C.useContext(cPe);return M.createElement(cTu,Ke({},u,{layoutGroup:i,switchLayoutGroup:C.useContext(dPe),isPresent:t,safeToRemove:n}))}var hTu={borderRadius:Ke(Ke({},tb),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:tb,borderTopRightRadius:tb,borderBottomLeftRadius:tb,borderBottomRightRadius:tb,boxShadow:lTu},ETu={measureLayout:dTu};function mTu(u,e,t){t===void 0&&(t={});var n=H1(u)?u:vp(u);return _ie("",n,e,t),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var FRe=["TopLeft","TopRight","BottomLeft","BottomRight"],gTu=FRe.length,ADe=function(u){return typeof u=="string"?parseFloat(u):u},_De=function(u){return typeof u=="number"||Eu.test(u)};function fTu(u,e,t,n,i,r){var a,o,s,l;i?(u.opacity=ir(0,(a=t.opacity)!==null&&a!==void 0?a:1,pTu(n)),u.opacityExit=ir((o=e.opacity)!==null&&o!==void 0?o:1,0,DTu(n))):r&&(u.opacity=ir((s=e.opacity)!==null&&s!==void 0?s:1,(l=t.opacity)!==null&&l!==void 0?l:1,n));for(var c=0;ce?1:t(wy(u,e,n))}}function BDe(u,e){u.min=e.min,u.max=e.max}function nc(u,e){BDe(u.x,e.x),BDe(u.y,e.y)}function wDe(u,e,t,n,i){return u-=e,u=qT(u,1/t,n),i!==void 0&&(u=qT(u,1/i,n)),u}function xTu(u,e,t,n,i,r,a){if(e===void 0&&(e=0),t===void 0&&(t=1),n===void 0&&(n=.5),r===void 0&&(r=u),a===void 0&&(a=u),C1.test(e)){e=parseFloat(e);var o=ir(a.min,a.max,e/100);e=o-a.min}if(typeof e=="number"){var s=ir(r.min,r.max,n);u===r&&(s-=e),u.min=wDe(u.min,e,t,s,i),u.max=wDe(u.max,e,t,s,i)}}function LDe(u,e,t,n,i){var r=Zi(t,3),a=r[0],o=r[1],s=r[2];xTu(u,e[a],e[o],e[s],e.scale,n,i)}var vTu=["x","scaleX","originX"],CTu=["y","scaleY","originY"];function zDe(u,e,t,n){LDe(u.x,e,vTu,t==null?void 0:t.x,n==null?void 0:n.x),LDe(u.y,e,CTu,t==null?void 0:t.y,n==null?void 0:n.y)}function MDe(u){return u.translate===0&&u.scale===1}function ARe(u){return MDe(u.x)&&MDe(u.y)}function _Re(u,e){return u.x.min===e.x.min&&u.x.max===e.x.max&&u.y.min===e.y.min&&u.y.max===e.y.max}var bTu=function(){function u(){this.members=[]}return u.prototype.add=function(e){Sie(this.members,e),e.scheduleRender()},u.prototype.remove=function(e){if(Bie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},u.prototype.relegate=function(e){var t=this.members.findIndex(function(a){return e===a});if(t===0)return!1;for(var n,i=t;i>=0;i--){var r=this.members[i];if(r.isPresent!==!1){n=r;break}}return n?(this.promote(n),!0):!1},u.prototype.promote=function(e,t){var n,i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues,e.snapshot.isShared=!0),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);var r=e.options.crossfade;r===!1&&i.hide()}},u.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var t,n,i,r,a;(n=(t=e.options).onExitComplete)===null||n===void 0||n.call(t),(a=(i=e.resumingFrom)===null||i===void 0?void 0:(r=i.options).onExitComplete)===null||a===void 0||a.call(r)})},u.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},u.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},u}(),kTu="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function TDe(u,e,t){var n=u.x.translate/e.x,i=u.y.translate/e.y,r="translate3d(".concat(n,"px, ").concat(i,"px, 0) ");if(r+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),t){var a=t.rotate,o=t.rotateX,s=t.rotateY;a&&(r+="rotate(".concat(a,"deg) ")),o&&(r+="rotateX(".concat(o,"deg) ")),s&&(r+="rotateY(".concat(s,"deg) "))}var l=u.x.scale*e.x,c=u.y.scale*e.y;return r+="scale(".concat(l,", ").concat(c,")"),r===kTu?"none":r}var FTu=function(u,e){return u.depth-e.depth},yTu=function(){function u(){this.children=[],this.isDirty=!1}return u.prototype.add=function(e){Sie(this.children,e),this.isDirty=!0},u.prototype.remove=function(e){Bie(this.children,e),this.isDirty=!0},u.prototype.forEach=function(e){this.isDirty&&this.children.sort(FTu),this.isDirty=!1,this.children.forEach(e)},u}(),NDe=1e3;function SRe(u){var e=u.attachResizeListener,t=u.defaultParent,n=u.measureScroll,i=u.checkIsScrollRoot,r=u.resetTransform;return function(){function a(o,s,l){var c=this;s===void 0&&(s={}),l===void 0&&(l=t==null?void 0:t()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(LTu),c.nodes.forEach(zTu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=o,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?Bl(Bl([],Zi(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(var d=0;d=0;n--)if(u.path[n].instance){t=u.path[n];break}var i=t&&t!==u.root?t.instance:document,r=i.querySelector('[data-projection-id="'.concat(e,'"]'));r&&u.mount(r,!0)}function ODe(u){u.min=Math.round(u.min),u.max=Math.round(u.max)}function jDe(u){ODe(u.x),ODe(u.y)}var OTu=SRe({attachResizeListener:function(u,e){return pO(u,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),O$={current:void 0},jTu=SRe({measureScroll:function(u){return{x:u.scrollLeft,y:u.scrollTop}},defaultParent:function(){if(!O$.current){var u=new OTu(0,{});u.mount(window),u.setOptions({layoutScroll:!0}),O$.current=u}return O$.current},resetTransform:function(u,e){u.style.transform=e??"none"},checkIsScrollRoot:function(u){return window.getComputedStyle(u).position==="fixed"}}),HTu=Ke(Ke(Ke(Ke({},kMu),Ozu),KMu),ETu),BRe=Lwu(function(u,e){return pLu(u,e,HTu,sTu,jTu)}),wRe=C.createContext(null);function VTu(u,e,t,n){if(!n)return u;var i=u.findIndex(function(c){return c.value===e});if(i===-1)return u;var r=n>0?1:-1,a=u[i+r];if(!a)return u;var o=u[i],s=a.layout,l=ir(s.min,s.max,.5);return r===1&&o.layout.max+t>l||r===-1&&o.layout.min+t{const{__scopeTooltip:e,delayDuration:t=uNu,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:r}=u,[a,o]=C.useState(!0),s=C.useRef(!1),l=C.useRef(0);return C.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),C.createElement(nNu,{scope:e,isOpenDelayed:a,delayDuration:t,onOpen:C.useCallback(()=>{window.clearTimeout(l.current),o(!1)},[]),onClose:C.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o(!0),n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:C.useCallback(c=>{s.current=c},[]),disableHoverableContent:i},r)},Mie="Tooltip",[rNu,C7]=CO(Mie),aNu=u=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:a,delayDuration:o}=u,s=zie(Mie,u.__scopeTooltip),l=Lie(e),[c,d]=C.useState(null),h=C3(),E=C.useRef(0),m=a??s.disableHoverableContent,g=o??s.delayDuration,f=C.useRef(!1),[p=!1,D]=XI({prop:n,defaultProp:i,onChange:F=>{F?(s.onOpen(),document.dispatchEvent(new CustomEvent(jY))):s.onClose(),r==null||r(F)}}),x=C.useMemo(()=>p?f.current?"delayed-open":"instant-open":"closed",[p]),b=C.useCallback(()=>{window.clearTimeout(E.current),f.current=!1,D(!0)},[D]),k=C.useCallback(()=>{window.clearTimeout(E.current),D(!1)},[D]),A=C.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{f.current=!0,D(!0)},g)},[g,D]);return C.useEffect(()=>()=>window.clearTimeout(E.current),[]),C.createElement(wNe,l,C.createElement(rNu,{scope:e,contentId:h,open:p,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:C.useCallback(()=>{s.isOpenDelayed?A():b()},[s.isOpenDelayed,A,b]),onTriggerLeave:C.useCallback(()=>{m?k():window.clearTimeout(E.current)},[k,m]),onOpen:b,onClose:k,disableHoverableContent:m},t))},$De="TooltipTrigger",oNu=C.forwardRef((u,e)=>{const{__scopeTooltip:t,...n}=u,i=C7($De,t),r=zie($De,t),a=Lie(t),o=C.useRef(null),s=co(e,o,i.onTriggerChange),l=C.useRef(!1),c=C.useRef(!1),d=C.useCallback(()=>l.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),C.createElement(LNe,vt({asChild:!0},a),C.createElement($o.button,vt({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},n,{ref:s,onPointerMove:Gu(u.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Gu(u.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Gu(u.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Gu(u.onFocus,()=>{l.current||i.onOpen()}),onBlur:Gu(u.onBlur,i.onClose),onClick:Gu(u.onClick,i.onClose)})))}),MRe="TooltipPortal",[sNu,lNu]=CO(MRe,{forceMount:void 0}),cNu=u=>{const{__scopeTooltip:e,forceMount:t,children:n,container:i}=u,r=C7(MRe,e);return C.createElement(sNu,{scope:e,forceMount:t},C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},n)))},zy="TooltipContent",dNu=C.forwardRef((u,e)=>{const t=lNu(zy,u.__scopeTooltip),{forceMount:n=t.forceMount,side:i="top",...r}=u,a=C7(zy,u.__scopeTooltip);return C.createElement(Lg,{present:n||a.open},a.disableHoverableContent?C.createElement(TRe,vt({side:i},r,{ref:e})):C.createElement(hNu,vt({side:i},r,{ref:e})))}),hNu=C.forwardRef((u,e)=>{const t=C7(zy,u.__scopeTooltip),n=zie(zy,u.__scopeTooltip),i=C.useRef(null),r=co(e,i),[a,o]=C.useState(null),{trigger:s,onClose:l}=t,c=i.current,{onPointerInTransitChange:d}=n,h=C.useCallback(()=>{o(null),d(!1)},[d]),E=C.useCallback((m,g)=>{const f=m.currentTarget,p={x:m.clientX,y:m.clientY},D=mNu(p,f.getBoundingClientRect()),x=gNu(p,D),b=fNu(g.getBoundingClientRect()),k=DNu([...x,...b]);o(k),d(!0)},[d]);return C.useEffect(()=>()=>h(),[h]),C.useEffect(()=>{if(s&&c){const m=f=>E(f,c),g=f=>E(f,s);return s.addEventListener("pointerleave",m),c.addEventListener("pointerleave",g),()=>{s.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",g)}}},[s,c,E,h]),C.useEffect(()=>{if(a){const m=g=>{const f=g.target,p={x:g.clientX,y:g.clientY},D=(s==null?void 0:s.contains(f))||(c==null?void 0:c.contains(f)),x=!pNu(p,a);D?h():x&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[s,c,a,l,h]),C.createElement(TRe,vt({},u,{ref:r}))}),[ENu,lqn]=CO(Mie,{isInside:!1}),TRe=C.forwardRef((u,e)=>{const{__scopeTooltip:t,children:n,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:a,...o}=u,s=C7(zy,t),l=Lie(t),{onClose:c}=s;return C.useEffect(()=>(document.addEventListener(jY,c),()=>document.removeEventListener(jY,c)),[c]),C.useEffect(()=>{if(s.trigger){const d=h=>{const E=h.target;E!=null&&E.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),C.createElement(Yne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c},C.createElement(zNe,vt({"data-state":s.stateAttribute},l,o,{ref:e,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),C.createElement(iNe,null,n),C.createElement(ENu,{scope:t,isInside:!0},C.createElement(CNe,{id:s.contentId,role:"tooltip"},i||n))))});function mNu(u,e){const t=Math.abs(e.top-u.y),n=Math.abs(e.bottom-u.y),i=Math.abs(e.right-u.x),r=Math.abs(e.left-u.x);switch(Math.min(t,n,i,r)){case r:return"left";case i:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function gNu(u,e,t=5){const n=[];switch(e){case"top":n.push({x:u.x-t,y:u.y+t},{x:u.x+t,y:u.y+t});break;case"bottom":n.push({x:u.x-t,y:u.y-t},{x:u.x+t,y:u.y-t});break;case"left":n.push({x:u.x+t,y:u.y-t},{x:u.x+t,y:u.y+t});break;case"right":n.push({x:u.x-t,y:u.y-t},{x:u.x-t,y:u.y+t});break}return n}function fNu(u){const{top:e,right:t,bottom:n,left:i}=u;return[{x:i,y:e},{x:t,y:e},{x:t,y:n},{x:i,y:n}]}function pNu(u,e){const{x:t,y:n}=u;let i=!1;for(let r=0,a=e.length-1;rn!=c>n&&t<(l-o)*(n-s)/(c-s)+o&&(i=!i)}return i}function DNu(u){const e=u.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),xNu(e)}function xNu(u){if(u.length<=1)return u.slice();const e=[];for(let n=0;n=2;){const r=e[e.length-1],a=e[e.length-2];if((r.x-a.x)*(i.y-a.y)>=(r.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let n=u.length-1;n>=0;n--){const i=u[n];for(;t.length>=2;){const r=t[t.length-1],a=t[t.length-2];if((r.x-a.x)*(i.y-a.y)>=(r.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const vNu=iNu,CNu=aNu,bNu=oNu,kNu=cNu,FNu=dNu;var yNu=Object.defineProperty,ANu=(u,e,t)=>e in u?yNu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,j$=(u,e,t)=>(ANu(u,typeof e!="symbol"?e+"":e,t),t);let _Nu=class{constructor(){j$(this,"current",this.detect()),j$(this,"handoffState","pending"),j$(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},b3=new _Nu,z0=(u,e)=>{b3.isServer?C.useEffect(u,e):C.useLayoutEffect(u,e)};function b7(u){let e=C.useRef(u);return z0(()=>{e.current=u},[u]),e}function Tie(u,e){let[t,n]=C.useState(u),i=b7(u);return z0(()=>n(i.current),[i,n,...e]),t}function SNu(u){typeof queueMicrotask=="function"?queueMicrotask(u):Promise.resolve().then(u).catch(e=>setTimeout(()=>{throw e}))}function JT(){let u=[],e={addEventListener(t,n,i,r){return t.addEventListener(n,i,r),e.add(()=>t.removeEventListener(n,i,r))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return SNu(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,i){let r=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:i}),this.add(()=>{Object.assign(t.style,{[n]:r})})},group(t){let n=JT();return t(n),this.add(()=>n.dispose())},add(t){return u.push(t),()=>{let n=u.indexOf(t);if(n>=0)for(let i of u.splice(n,1))i()}},dispose(){for(let t of u.splice(0))t()}};return e}function Nie(){let[u]=C.useState(JT);return C.useEffect(()=>()=>u.dispose(),[u]),u}let pi=function(u){let e=b7(u);return M.useCallback((...t)=>e.current(...t),[e])};function BNu(){let u=typeof document>"u";return"useSyncExternalStore"in wm?(e=>e.useSyncExternalStore)(wm)(()=>()=>{},()=>!1,()=>!u):!1}function wNu(){let u=BNu(),[e,t]=C.useState(b3.isHandoffComplete);return e&&b3.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{e!==!0&&t(!0)},[e]),C.useEffect(()=>b3.handoff(),[]),u?!1:e}var KDe;let k7=(KDe=M.useId)!=null?KDe:function(){let u=wNu(),[e,t]=M.useState(u?()=>b3.nextId():null);return z0(()=>{e===null&&t(b3.nextId())},[e]),e!=null?""+e:void 0};function o4(u,e,...t){if(u in e){let i=e[u];return typeof i=="function"?i(...t):i}let n=new Error(`Tried to handle "${u}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,o4),n}function Pie(u){return b3.isServer?null:u instanceof Node?u.ownerDocument:u!=null&&u.hasOwnProperty("current")&&u.current instanceof Node?u.current.ownerDocument:document}let WDe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(u=>`${u}:not([tabindex='-1'])`).join(",");var LNu=(u=>(u[u.First=1]="First",u[u.Previous=2]="Previous",u[u.Next=4]="Next",u[u.Last=8]="Last",u[u.WrapAround=16]="WrapAround",u[u.NoScroll=32]="NoScroll",u))(LNu||{}),zNu=(u=>(u[u.Error=0]="Error",u[u.Overflow=1]="Overflow",u[u.Success=2]="Success",u[u.Underflow=3]="Underflow",u))(zNu||{}),MNu=(u=>(u[u.Previous=-1]="Previous",u[u.Next=1]="Next",u))(MNu||{}),NRe=(u=>(u[u.Strict=0]="Strict",u[u.Loose=1]="Loose",u))(NRe||{});function TNu(u,e=0){var t;return u===((t=Pie(u))==null?void 0:t.body)?!1:o4(e,{0(){return u.matches(WDe)},1(){let n=u;for(;n!==null;){if(n.matches(WDe))return!0;n=n.parentElement}return!1}})}var NNu=(u=>(u[u.Keyboard=0]="Keyboard",u[u.Mouse=1]="Mouse",u))(NNu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",u=>{u.metaKey||u.altKey||u.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",u=>{u.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:u.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function PNu(u,e=t=>t){return u.slice().sort((t,n)=>{let i=e(t),r=e(n);if(i===null||r===null)return 0;let a=i.compareDocumentPosition(r);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vS(u,e,t){let n=b7(e);C.useEffect(()=>{function i(r){n.current(r)}return document.addEventListener(u,i,t),()=>document.removeEventListener(u,i,t)},[u,t])}function RNu(u,e,t){let n=b7(e);C.useEffect(()=>{function i(r){n.current(r)}return window.addEventListener(u,i,t),()=>window.removeEventListener(u,i,t)},[u,t])}function INu(u,e,t=!0){let n=C.useRef(!1);C.useEffect(()=>{requestAnimationFrame(()=>{n.current=t})},[t]);function i(a,o){if(!n.current||a.defaultPrevented)return;let s=o(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let l=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(u);for(let c of l){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||a.composed&&a.composedPath().includes(d))return}return!TNu(s,NRe.Loose)&&s.tabIndex!==-1&&a.preventDefault(),e(a,s)}let r=C.useRef(null);vS("pointerdown",a=>{var o,s;n.current&&(r.current=((s=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:s[0])||a.target)},!0),vS("mousedown",a=>{var o,s;n.current&&(r.current=((s=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:s[0])||a.target)},!0),vS("click",a=>{r.current&&(i(a,()=>r.current),r.current=null)},!0),vS("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),RNu("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function GDe(u){var e;if(u.type)return u.type;let t=(e=u.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function ONu(u,e){let[t,n]=C.useState(()=>GDe(u));return z0(()=>{n(GDe(u))},[u.type,u.as]),z0(()=>{t||e.current&&e.current instanceof HTMLButtonElement&&!e.current.hasAttribute("type")&&n("button")},[t,e]),t}let jNu=Symbol();function F7(...u){let e=C.useRef(u);C.useEffect(()=>{e.current=u},[u]);let t=pi(n=>{for(let i of e.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return u.every(n=>n==null||(n==null?void 0:n[jNu]))?void 0:t}function HNu({container:u,accept:e,walk:t,enabled:n=!0}){let i=C.useRef(e),r=C.useRef(t);C.useEffect(()=>{i.current=e,r.current=t},[e,t]),z0(()=>{if(!u||!n)return;let a=Pie(u);if(!a)return;let o=i.current,s=r.current,l=Object.assign(d=>o(d),{acceptNode:o}),c=a.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,l,!1);for(;c.nextNode();)s(c.currentNode)},[u,n,i,r])}function VNu(u){throw new Error("Unexpected object: "+u)}var Ja=(u=>(u[u.First=0]="First",u[u.Previous=1]="Previous",u[u.Next=2]="Next",u[u.Last=3]="Last",u[u.Specific=4]="Specific",u[u.Nothing=5]="Nothing",u))(Ja||{});function $Nu(u,e){let t=e.resolveItems();if(t.length<=0)return null;let n=e.resolveActiveIndex(),i=n??-1,r=(()=>{switch(u.focus){case 0:return t.findIndex(a=>!e.resolveDisabled(a));case 1:{let a=t.slice().reverse().findIndex((o,s,l)=>i!==-1&&l.length-s-1>=i?!1:!e.resolveDisabled(o));return a===-1?a:t.length-1-a}case 2:return t.findIndex((a,o)=>o<=i?!1:!e.resolveDisabled(a));case 3:{let a=t.slice().reverse().findIndex(o=>!e.resolveDisabled(o));return a===-1?a:t.length-1-a}case 4:return t.findIndex(a=>e.resolveId(a)===u.id);case 5:return null;default:VNu(u)}})();return r===-1?n:r}function UDe(...u){return Array.from(new Set(u.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}var HY=(u=>(u[u.None=0]="None",u[u.RenderStrategy=1]="RenderStrategy",u[u.Static=2]="Static",u))(HY||{}),KNu=(u=>(u[u.Unmount=0]="Unmount",u[u.Hidden=1]="Hidden",u))(KNu||{});function nD({ourProps:u,theirProps:e,slot:t,defaultTag:n,features:i,visible:r=!0,name:a}){let o=PRe(e,u);if(r)return CS(o,t,n,a);let s=i??0;if(s&2){let{static:l=!1,...c}=o;if(l)return CS(c,t,n,a)}if(s&1){let{unmount:l=!0,...c}=o;return o4(l?0:1,{0(){return null},1(){return CS({...c,hidden:!0,style:{display:"none"}},t,n,a)}})}return CS(o,t,n,a)}function CS(u,e={},t,n){let{as:i=t,children:r,refName:a="ref",...o}=H$(u,["unmount","static"]),s=u.ref!==void 0?{[a]:u.ref}:{},l=typeof r=="function"?r(e):r;"className"in o&&o.className&&typeof o.className=="function"&&(o.className=o.className(e));let c={};if(e){let d=!1,h=[];for(let[E,m]of Object.entries(e))typeof m=="boolean"&&(d=!0),m===!0&&h.push(E);d&&(c["data-headlessui-state"]=h.join(" "))}if(i===C.Fragment&&Object.keys(VY(o)).length>0){if(!C.isValidElement(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(o).map(m=>` - ${m}`).join(` +`,a.map=[t,e.line],!0},w8u=function(e,t,n,i){var r,a,o,s,l,c,d,h=!1,E=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||E+3>m||(r=e.src.charCodeAt(E),r!==126&&r!==96)||(l=E,E=e.skipChars(E,r),a=E-l,a<3)||(d=e.src.slice(l,E),o=e.src.slice(E,m),r===96&&o.indexOf(String.fromCharCode(r))>=0))return!1;if(i)return!0;for(s=t;s++,!(s>=n||(E=l=e.bMarks[s]+e.tShift[s],m=e.eMarks[s],E=4)&&(E=e.skipChars(E,r),!(E-l=4||e.src.charCodeAt(z++)!==62)return!1;if(i)return!0;for(s=E=e.sCount[t]+1,e.src.charCodeAt(z)===32?(z++,s++,E++,r=!1,b=!0):e.src.charCodeAt(z)===9?(b=!0,(e.bsCount[t]+E)%4===3?(z++,s++,E++,r=!1):r=!0):b=!1,m=[e.bMarks[t]],e.bMarks[t]=z;z=N,D=[e.sCount[t]],e.sCount[t]=E-s,x=[e.tShift[t]],e.tShift[t]=z-e.bMarks[t],A=e.md.block.ruler.getRules("blockquote"),p=e.parentType,e.parentType="blockquote",h=t+1;h=N));h++){if(e.src.charCodeAt(z++)===62&&!S){for(s=E=e.sCount[h]+1,e.src.charCodeAt(z)===32?(z++,s++,E++,r=!1,b=!0):e.src.charCodeAt(z)===9?(b=!0,(e.bsCount[h]+E)%4===3?(z++,s++,E++,r=!1):r=!0):b=!1,m.push(e.bMarks[h]),e.bMarks[h]=z;z=N,g.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(b?1:0),D.push(e.sCount[h]),e.sCount[h]=E-s,x.push(e.tShift[h]),e.tShift[h]=z-e.bMarks[h];continue}if(c)break;for(k=!1,o=0,l=A.length;o",F.map=d=[t,0],e.md.block.tokenize(e,t,h),F=e.push("blockquote_close","blockquote",-1),F.markup=">",e.lineMax=w,e.parentType=p,d[1]=e.line,o=0;o=4||(r=e.src.charCodeAt(l++),r!==42&&r!==45&&r!==95))return!1;for(a=1;l=r||(t=u.src.charCodeAt(i++),t<48||t>57))return-1;for(;;){if(i>=r)return-1;if(t=u.src.charCodeAt(i++),t>=48&&t<=57){if(i-n>=10)return-1;continue}if(t===41||t===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]=e.blkIndent&&(R=!0),(N=Cpe(e,t))>=0){if(d=!0,y=e.bMarks[t]+e.tShift[t],p=Number(e.src.slice(y,N-1)),R&&p!==1)return!1}else if((N=vpe(e,t))>=0)d=!1;else return!1;if(R&&e.skipSpaces(N)>=e.eMarks[t])return!1;if(f=e.src.charCodeAt(N-1),i)return!0;for(g=e.tokens.length,d?(T=e.push("ordered_list_open","ol",1),p!==1&&(T.attrs=[["start",p]])):T=e.push("bullet_list_open","ul",1),T.map=m=[t,0],T.markup=String.fromCharCode(f),x=t,O=!1,L=e.md.block.ruler.getRules("list"),A=e.parentType,e.parentType="list";x=D?l=1:l=b-c,l>4&&(l=1),s=c+l,T=e.push("list_item_open","li",1),T.markup=String.fromCharCode(f),T.map=h=[t,0],d&&(T.info=e.src.slice(y,N-1)),w=e.tight,S=e.tShift[t],F=e.sCount[t],k=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=s,e.tight=!0,e.tShift[t]=a-e.bMarks[t],e.sCount[t]=b,a>=D&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),(!e.tight||O)&&(I=!1),O=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=k,e.tShift[t]=S,e.sCount[t]=F,e.tight=w,T=e.push("list_item_close","li",-1),T.markup=String.fromCharCode(f),x=t=e.line,h[1]=x,a=e.bMarks[t],x>=n||e.sCount[x]=4)break;for(_=!1,o=0,E=L.length;o=4||e.src.charCodeAt(A)!==91)return!1;for(;++A3)&&!(e.sCount[S]<0)){for(D=!1,c=0,d=x.length;c"u"&&(e.env.references={}),typeof e.env.references[h]>"u"&&(e.env.references[h]={title:b,href:l}),e.parentType=m,e.line=t+k+1),!0)},I8u=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],aO={},O8u="[a-zA-Z_:][a-zA-Z0-9:._-]*",j8u="[^\"'=<>`\\x00-\\x20]+",H8u="'[^']*'",V8u='"[^"]*"',$8u="(?:"+j8u+"|"+H8u+"|"+V8u+")",K8u="(?:\\s+"+O8u+"(?:\\s*=\\s*"+$8u+")?)",YNe="<[A-Za-z][A-Za-z0-9\\-]*"+K8u+"*\\s*\\/?>",QNe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",W8u="|",G8u="<[?][\\s\\S]*?[?]>",U8u="]*>",q8u="",J8u=new RegExp("^(?:"+YNe+"|"+QNe+"|"+W8u+"|"+G8u+"|"+U8u+"|"+q8u+")"),Z8u=new RegExp("^(?:"+YNe+"|"+QNe+")");aO.HTML_TAG_RE=J8u;aO.HTML_OPEN_CLOSE_TAG_RE=Z8u;var Y8u=I8u,Q8u=aO.HTML_OPEN_CLOSE_TAG_RE,jD=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Q8u.source+"\\s*$"),/^$/,!1]],X8u=function(e,t,n,i){var r,a,o,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(l)!==60)return!1;for(s=e.src.slice(l,c),r=0;r=4||(r=e.src.charCodeAt(l),r!==35||l>=c))return!1;for(a=1,r=e.src.charCodeAt(++l);r===35&&l6||ll&&bpe(e.src.charCodeAt(o-1))&&(c=o),e.line=t+1,s=e.push("heading_open","h"+String(a),1),s.markup="########".slice(0,a),s.map=[t,e.line],s=e.push("inline","",0),s.content=e.src.slice(l,c).trim(),s.map=[t,e.line],s.children=[],s=e.push("heading_close","h"+String(a),-1),s.markup="########".slice(0,a)),!0)},tBu=function(e,t,n){var i,r,a,o,s,l,c,d,h,E=t+1,m,g=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(m=e.parentType,e.parentType="paragraph";E3)){if(e.sCount[E]>=e.blkIndent&&(l=e.bMarks[E]+e.tShift[E],c=e.eMarks[E],l=c)))){d=h===61?1:2;break}if(!(e.sCount[E]<0)){for(r=!1,a=0,o=g.length;a3)&&!(e.sCount[l]<0)){for(i=!1,r=0,a=c.length;r0&&this.level++,this.tokens.push(n),n};Q1.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Q1.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!oO(this.src.charCodeAt(--e)))return e+1;return e};Q1.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e};Q1.prototype.getLines=function(e,t,n,i){var r,a,o,s,l,c,d,h=e;if(e>=t)return"";for(c=new Array(t-e),r=0;hn?c[r]=new Array(a-n+1).join(" ")+this.src.slice(s,l):c[r]=this.src.slice(s,l)}return c.join("")};Q1.prototype.Token=XNe;var nBu=Q1,iBu=iie,ES=[["table",S8u,["paragraph","reference"]],["code",B8u],["fence",w8u,["paragraph","reference","blockquote","list"]],["blockquote",L8u,["paragraph","reference","blockquote","list"]],["hr",M8u,["paragraph","reference","blockquote","list"]],["list",N8u,["paragraph","reference","blockquote"]],["reference",R8u],["html_block",X8u,["paragraph","reference","blockquote"]],["heading",eBu,["paragraph","reference","blockquote"]],["lheading",tBu],["paragraph",uBu]];function sO(){this.ruler=new iBu;for(var u=0;u=t||u.sCount[o]=l){u.line=t;break}for(i=0;i=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){for(r=n-1;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(a++;a?@[]^_`{|}~-".split("").forEach(function(u){oie[u.charCodeAt(0)]=1});var dBu=function(e,t){var n,i=e.pos,r=e.posMax;if(e.src.charCodeAt(i)!==92)return!1;if(i++,i=0;t--)n=e[t],!(n.marker!==95&&n.marker!==42)&&n.end!==-1&&(i=e[n.end],o=t>0&&e[t-1].end===n.end+1&&e[t-1].marker===n.marker&&e[t-1].token===n.token-1&&e[n.end+1].token===i.token+1,a=String.fromCharCode(n.marker),r=u.tokens[n.token],r.type=o?"strong_open":"em_open",r.tag=o?"strong":"em",r.nesting=1,r.markup=o?a+a:a,r.content="",r=u.tokens[i.token],r.type=o?"strong_close":"em_close",r.tag=o?"strong":"em",r.nesting=-1,r.markup=o?a+a:a,r.content="",o&&(u.tokens[e[t-1].token].content="",u.tokens[e[n.end+1].token].content="",t--))}cO.postProcess=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(ype(e,e.delimiters),t=0;t=g)return!1;if(f=s,l=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),l.ok){for(h=e.md.normalizeLink(l.str),e.md.validateLink(h)?s=l.pos:h="",f=s;s=g||e.src.charCodeAt(s)!==41)&&(p=!0),s++}if(p){if(typeof e.env.references>"u")return!1;if(s=0?r=e.src.slice(f,s++):s=a+1):s=a+1,r||(r=e.src.slice(o,a)),c=e.env.references[EBu(r)],!c)return e.pos=m,!1;h=c.href,E=c.title}return t||(e.pos=o,e.posMax=a,d=e.push("link_open","a",1),d.attrs=n=[["href",h]],E&&n.push(["title",E]),e.md.inline.tokenize(e),d=e.push("link_close","a",-1)),e.pos=s,e.posMax=g,!0},gBu=Hn.normalizeReference,A$=Hn.isSpace,fBu=function(e,t){var n,i,r,a,o,s,l,c,d,h,E,m,g,f="",p=e.pos,D=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(s=e.pos+2,o=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),o<0))return!1;if(l=o+1,l=D)return!1;for(g=l,d=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),d.ok&&(f=e.md.normalizeLink(d.str),e.md.validateLink(f)?l=d.pos:f=""),g=l;l=D||e.src.charCodeAt(l)!==41)return e.pos=p,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l=0?a=e.src.slice(g,l++):l=o+1):l=o+1,a||(a=e.src.slice(s,o)),c=e.env.references[gBu(a)],!c)return e.pos=p,!1;f=c.href,h=c.title}return t||(r=e.src.slice(s,o),e.md.inline.parse(r,e.md,e.env,m=[]),E=e.push("image","img",0),E.attrs=n=[["src",f],["alt",""]],E.children=m,E.content=r,h&&n.push(["title",h])),e.pos=l,e.posMax=D,!0},pBu=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,DBu=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,xBu=function(e,t){var n,i,r,a,o,s,l=e.pos;if(e.src.charCodeAt(l)!==60)return!1;for(o=e.pos,s=e.posMax;;){if(++l>=s||(a=e.src.charCodeAt(l),a===60))return!1;if(a===62)break}return n=e.src.slice(o+1,l),DBu.test(n)?(i=e.md.normalizeLink(n),e.md.validateLink(i)?(t||(r=e.push("link_open","a",1),r.attrs=[["href",i]],r.markup="autolink",r.info="auto",r=e.push("text","",0),r.content=e.md.normalizeLinkText(n),r=e.push("link_close","a",-1),r.markup="autolink",r.info="auto"),e.pos+=n.length+2,!0):!1):pBu.test(n)?(i=e.md.normalizeLink("mailto:"+n),e.md.validateLink(i)?(t||(r=e.push("link_open","a",1),r.attrs=[["href",i]],r.markup="autolink",r.info="auto",r=e.push("text","",0),r.content=e.md.normalizeLinkText(n),r=e.push("link_close","a",-1),r.markup="autolink",r.info="auto"),e.pos+=n.length+2,!0):!1):!1},vBu=aO.HTML_TAG_RE;function CBu(u){var e=u|32;return e>=97&&e<=122}var bBu=function(e,t){var n,i,r,a,o=e.pos;return!e.md.options.html||(r=e.posMax,e.src.charCodeAt(o)!==60||o+2>=r)||(n=e.src.charCodeAt(o+1),n!==33&&n!==63&&n!==47&&!CBu(n))||(i=e.src.slice(o).match(vBu),!i)?!1:(t||(a=e.push("html_inline","",0),a.content=e.src.slice(o,o+i[0].length)),e.pos+=i[0].length,!0)},Ape=KNe,kBu=Hn.has,FBu=Hn.isValidEntityCode,_pe=Hn.fromCodePoint,yBu=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ABu=/^&([a-z][a-z0-9]{1,31});/i,_Bu=function(e,t){var n,i,r,a=e.pos,o=e.posMax;if(e.src.charCodeAt(a)!==38)return!1;if(a+1a;n-=m[n]+1)if(r=e[n],r.marker===i.marker&&r.open&&r.end<0&&(s=!1,(r.close||i.open)&&(r.length+i.length)%3===0&&(r.length%3!==0||i.length%3!==0)&&(s=!0),!s)){l=n>0&&!e[n-1].open?m[n-1]+1:0,m[t]=t-n+l,m[n]=l,i.open=!1,r.end=t,r.close=!1,o=-1,E=-2;break}o!==-1&&(c[i.marker][(i.open?3:0)+(i.length||0)%3]=o)}}}var SBu=function(e){var t,n=e.tokens_meta,i=e.tokens_meta.length;for(Spe(e,e.delimiters),t=0;t0&&i++,r[t].type==="text"&&t+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};g7.prototype.scanDelims=function(u,e){var t=u,n,i,r,a,o,s,l,c,d,h=!0,E=!0,m=this.posMax,g=this.src.charCodeAt(u);for(n=u>0?this.src.charCodeAt(u-1):32;t=r)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};f7.prototype.parse=function(u,e,t,n){var i,r,a,o=new this.State(u,e,t,n);for(this.tokenize(o),r=this.ruler2.getRules(""),a=r.length,i=0;i|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}),B$}function CY(u){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function dO(u){return Object.prototype.toString.call(u)}function MBu(u){return dO(u)==="[object String]"}function TBu(u){return dO(u)==="[object Object]"}function NBu(u){return dO(u)==="[object RegExp]"}function Tpe(u){return dO(u)==="[object Function]"}function PBu(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var ePe={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function RBu(u){return Object.keys(u||{}).reduce(function(e,t){return e||ePe.hasOwnProperty(t)},!1)}var IBu={"http:":{validate:function(u,e,t){var n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){var n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){var n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},OBu="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",jBu="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function HBu(u){u.__index__=-1,u.__text_cache__=""}function VBu(u){return function(e,t){var n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function Npe(){return function(u,e){e.normalize(u)}}function RT(u){var e=u.re=zBu()(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(OBu),t.push(e.src_xn),e.src_tlds=t.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");var i=[];u.__compiled__={};function r(o,s){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+s)}Object.keys(u.__schemas__).forEach(function(o){var s=u.__schemas__[o];if(s!==null){var l={validate:null,link:null};if(u.__compiled__[o]=l,TBu(s)){NBu(s.validate)?l.validate=VBu(s.validate):Tpe(s.validate)?l.validate=s.validate:r(o,s),Tpe(s.normalize)?l.normalize=s.normalize:s.normalize?r(o,s):l.normalize=Npe();return}if(MBu(s)){i.push(o);return}r(o,s)}}),i.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:Npe()};var a=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map(PBu).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+a+")","ig"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),HBu(u)}function $Bu(u,e){var t=u.__index__,n=u.__last_index__,i=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=i,this.text=i,this.url=i}function Ppe(u,e){var t=new $Bu(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function Ol(u,e){if(!(this instanceof Ol))return new Ol(u,e);e||RBu(u)&&(e=u,u={}),this.__opts__=CY({},ePe,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=CY({},IBu,u),this.__compiled__={},this.__tlds__=jBu,this.__tlds_replaced__=!1,this.re={},RT(this)}Ol.prototype.add=function(e,t){return this.__schemas__[e]=t,RT(this),this};Ol.prototype.set=function(e){return this.__opts__=CY(this.__opts__,e),this};Ol.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,i,r,a,o,s,l,c;if(this.re.schema_test.test(e)){for(s=this.re.schema_search,s.lastIndex=0;(t=s.exec(e))!==null;)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=e.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,o=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=o))),this.__index__>=0};Ol.prototype.pretest=function(e){return this.re.pretest.test(e)};Ol.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0};Ol.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(Ppe(this,t)),t=this.__last_index__);for(var i=t?e.slice(t):e;this.test(i);)n.push(Ppe(this,t)),i=i.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null};Ol.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,i,r){return n!==r[i-1]}).reverse(),RT(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,RT(this),this)};Ol.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};Ol.prototype.onCompile=function(){};var KBu=Ol,IT={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */IT.exports;(function(u,e){(function(t){var n=e&&!e.nodeType&&e,i=u&&!u.nodeType&&u,r=typeof bl=="object"&&bl;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,s=36,l=1,c=26,d=38,h=700,E=72,m=128,g="-",f=/^xn--/,p=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=s-l,k=Math.floor,A=String.fromCharCode,F;function S(V){throw new RangeError(x[V])}function w(V,U){for(var J=V.length,Y=[];J--;)Y[J]=U(V[J]);return Y}function z(V,U){var J=V.split("@"),Y="";J.length>1&&(Y=J[0]+"@",V=J[1]),V=V.replace(D,".");var X=V.split("."),re=w(X,U).join(".");return Y+re}function N(V){for(var U=[],J=0,Y=V.length,X,re;J=55296&&X<=56319&&J65535&&(U-=65536,J+=A(U>>>10&1023|55296),U=56320|U&1023),J+=A(U),J}).join("")}function y(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:s}function _(V,U){return V+22+75*(V<26)-((U!=0)<<5)}function L(V,U,J){var Y=0;for(V=J?k(V/h):V>>1,V+=k(V/U);V>b*c>>1;Y+=s)V=k(V/b);return k(Y+(b+1)*V/(V+d))}function T(V){var U=[],J=V.length,Y,X=0,re=m,ge=E,_e,Ve,Ue,qe,Se,de,he,Be,je;for(_e=V.lastIndexOf(g),_e<0&&(_e=0),Ve=0;Ve<_e;++Ve)V.charCodeAt(Ve)>=128&&S("not-basic"),U.push(V.charCodeAt(Ve));for(Ue=_e>0?_e+1:0;Ue=J&&S("invalid-input"),he=y(V.charCodeAt(Ue++)),(he>=s||he>k((o-X)/Se))&&S("overflow"),X+=he*Se,Be=de<=ge?l:de>=ge+c?c:de-ge,!(hek(o/je)&&S("overflow"),Se*=je;Y=U.length+1,ge=L(X-qe,Y,qe==0),k(X/Y)>o-re&&S("overflow"),re+=k(X/Y),X%=Y,U.splice(X++,0,re)}return O(U)}function R(V){var U,J,Y,X,re,ge,_e,Ve,Ue,qe,Se,de=[],he,Be,je,bt;for(V=N(V),he=V.length,U=m,J=0,re=E,ge=0;ge=U&&Se<_e&&(_e=Se);for(Be=Y+1,_e-U>k((o-J)/Be)&&S("overflow"),J+=(_e-U)*Be,U=_e,ge=0;geo&&S("overflow"),Se==U){for(Ve=J,Ue=s;qe=Ue<=re?l:Ue>=re+c?c:Ue-re,!(Ve=0))try{e.hostname=tPe.toASCII(e.hostname)}catch{}return Xf.encode(Xf.format(e))}function awu(u){var e=Xf.parse(u,!0);if(e.hostname&&(!e.protocol||uPe.indexOf(e.protocol)>=0))try{e.hostname=tPe.toUnicode(e.hostname)}catch{}return Xf.decode(Xf.format(e),Xf.decode.defaultChars+"%")}function jl(u,e){if(!(this instanceof jl))return new jl(u,e);e||H2.isString(u)||(e=u||{},u="default"),this.inline=new XBu,this.block=new QBu,this.core=new YBu,this.renderer=new ZBu,this.linkify=new ewu,this.validateLink=iwu,this.normalizeLink=rwu,this.normalizeLinkText=awu,this.utils=H2,this.helpers=H2.assign({},JBu),this.options={},this.configure(u),e&&this.set(e)}jl.prototype.set=function(u){return H2.assign(this.options,u),this};jl.prototype.configure=function(u){var e=this,t;if(H2.isString(u)&&(t=u,u=twu[t],!u))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(n){u.components[n].rules&&e[n].ruler.enableOnly(u.components[n].rules),u.components[n].rules2&&e[n].ruler2.enableOnly(u.components[n].rules2)}),this};jl.prototype.enable=function(u,e){var t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(i){t=t.concat(this[i].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));var n=u.filter(function(i){return t.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};jl.prototype.disable=function(u,e){var t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(i){t=t.concat(this[i].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));var n=u.filter(function(i){return t.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};jl.prototype.use=function(u){var e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};jl.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");var t=new this.core.State(u,this,e);return this.core.process(t),t.tokens};jl.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};jl.prototype.parseInline=function(u,e){var t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};jl.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var owu=jl,swu=owu;const lwu=Hl(swu);var cwu="production",nPe=typeof process>"u"||process.env===void 0?cwu:"production",dh=function(u){return{isEnabled:function(e){return u.some(function(t){return!!e[t]})}}},Ay={measureLayout:dh(["layout","layoutId","drag"]),animation:dh(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:dh(["exit"]),drag:dh(["drag","dragControls"]),focus:dh(["whileFocus"]),hover:dh(["whileHover","onHoverStart","onHoverEnd"]),tap:dh(["whileTap","onTap","onTapStart","onTapCancel"]),pan:dh(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:dh(["whileInView","onViewportEnter","onViewportLeave"])};function dwu(u){for(var e in u)u[e]!==null&&(e==="projectionNodeConstructor"?Ay.projectionNodeConstructor=u[e]:Ay[e].Component=u[e])}var hwu=function(){},OT=function(){},iPe=C.createContext({strict:!1}),rPe=Object.keys(Ay),Ewu=rPe.length;function mwu(u,e,t){var n=[],i=C.useContext(iPe);if(!e)return null;nPe!=="production"&&t&&i.strict;for(var r=0;r"u")return e;var t=new Map;return new Proxy(e,{get:function(n,i){return t.has(i)||t.set(i,e(i)),t.get(i)}})}var zwu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function lie(u){return typeof u!="string"||u.includes("-")?!1:!!(zwu.indexOf(u)>-1||/[A-Z]/.test(u))}var jT={};function Mwu(u){Object.assign(jT,u)}var FY=["","X","Y","Z"],Twu=["translate","scale","rotate","skew"],_y=["transformPerspective","x","y","z"];Twu.forEach(function(u){return FY.forEach(function(e){return _y.push(u+e)})});function Nwu(u,e){return _y.indexOf(u)-_y.indexOf(e)}var Pwu=new Set(_y);function p7(u){return Pwu.has(u)}var Rwu=new Set(["originX","originY","originZ"]);function hPe(u){return Rwu.has(u)}function EPe(u,e){var t=e.layout,n=e.layoutId;return p7(u)||hPe(u)||(t||n!==void 0)&&(!!jT[u]||u==="opacity")}var H1=function(u){return!!(u!==null&&typeof u=="object"&&u.getVelocity)},Iwu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Owu(u,e,t,n){var i=u.transform,r=u.transformKeys,a=e.enableHardwareAcceleration,o=a===void 0?!0:a,s=e.allowTransformNone,l=s===void 0?!0:s,c="";r.sort(Nwu);for(var d=!1,h=r.length,E=0;Et=>Math.max(Math.min(t,e),u),$2=u=>u%1?Number(u.toFixed(5)):u,Sy=/(-)?([\d]*\.?[\d])+/g,yY=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Vwu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function D7(u){return typeof u=="string"}const uD={test:u=>typeof u=="number",parse:parseFloat,transform:u=>u},K2=Object.assign(Object.assign({},uD),{transform:gPe(0,1)}),mS=Object.assign(Object.assign({},uD),{default:1}),x7=u=>({test:e=>D7(e)&&e.endsWith(u)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${u}`}),aE=x7("deg"),C1=x7("%"),Eu=x7("px"),$wu=x7("vh"),Kwu=x7("vw"),Ipe=Object.assign(Object.assign({},C1),{parse:u=>C1.parse(u)/100,transform:u=>C1.transform(u*100)}),cie=(u,e)=>t=>!!(D7(t)&&Vwu.test(t)&&t.startsWith(u)||e&&Object.prototype.hasOwnProperty.call(t,e)),fPe=(u,e,t)=>n=>{if(!D7(n))return n;const[i,r,a,o]=n.match(Sy);return{[u]:parseFloat(i),[e]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},e3={test:cie("hsl","hue"),parse:fPe("hue","saturation","lightness"),transform:({hue:u,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(u)+", "+C1.transform($2(e))+", "+C1.transform($2(t))+", "+$2(K2.transform(n))+")"},Wwu=gPe(0,255),w$=Object.assign(Object.assign({},uD),{transform:u=>Math.round(Wwu(u))}),KE={test:cie("rgb","red"),parse:fPe("red","green","blue"),transform:({red:u,green:e,blue:t,alpha:n=1})=>"rgba("+w$.transform(u)+", "+w$.transform(e)+", "+w$.transform(t)+", "+$2(K2.transform(n))+")"};function Gwu(u){let e="",t="",n="",i="";return u.length>5?(e=u.substr(1,2),t=u.substr(3,2),n=u.substr(5,2),i=u.substr(7,2)):(e=u.substr(1,1),t=u.substr(2,1),n=u.substr(3,1),i=u.substr(4,1),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const AY={test:cie("#"),parse:Gwu,transform:KE.transform},Zo={test:u=>KE.test(u)||AY.test(u)||e3.test(u),parse:u=>KE.test(u)?KE.parse(u):e3.test(u)?e3.parse(u):AY.parse(u),transform:u=>D7(u)?u:u.hasOwnProperty("red")?KE.transform(u):e3.transform(u)},pPe="${c}",DPe="${n}";function Uwu(u){var e,t,n,i;return isNaN(u)&&D7(u)&&((t=(e=u.match(Sy))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((i=(n=u.match(yY))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function xPe(u){typeof u=="number"&&(u=`${u}`);const e=[];let t=0;const n=u.match(yY);n&&(t=n.length,u=u.replace(yY,pPe),e.push(...n.map(Zo.parse)));const i=u.match(Sy);return i&&(u=u.replace(Sy,DPe),e.push(...i.map(uD.parse))),{values:e,numColors:t,tokenised:u}}function vPe(u){return xPe(u).values}function CPe(u){const{values:e,numColors:t,tokenised:n}=xPe(u),i=e.length;return r=>{let a=n;for(let o=0;otypeof u=="number"?0:u;function Jwu(u){const e=vPe(u);return CPe(u)(e.map(qwu))}const v4={test:Uwu,parse:vPe,createTransformer:CPe,getAnimatableNone:Jwu},Zwu=new Set(["brightness","contrast","saturate","opacity"]);function Ywu(u){let[e,t]=u.slice(0,-1).split("(");if(e==="drop-shadow")return u;const[n]=t.match(Sy)||[];if(!n)return u;const i=t.replace(n,"");let r=Zwu.has(e)?1:0;return n!==t&&(r*=100),e+"("+r+i+")"}const Qwu=/([a-z-]*)\(.*?\)/g,_Y=Object.assign(Object.assign({},v4),{getAnimatableNone:u=>{const e=u.match(Qwu);return e?e.map(Ywu).join(" "):u}});var Ope=Ke(Ke({},uD),{transform:Math.round}),bPe={borderWidth:Eu,borderTopWidth:Eu,borderRightWidth:Eu,borderBottomWidth:Eu,borderLeftWidth:Eu,borderRadius:Eu,radius:Eu,borderTopLeftRadius:Eu,borderTopRightRadius:Eu,borderBottomRightRadius:Eu,borderBottomLeftRadius:Eu,width:Eu,maxWidth:Eu,height:Eu,maxHeight:Eu,size:Eu,top:Eu,right:Eu,bottom:Eu,left:Eu,padding:Eu,paddingTop:Eu,paddingRight:Eu,paddingBottom:Eu,paddingLeft:Eu,margin:Eu,marginTop:Eu,marginRight:Eu,marginBottom:Eu,marginLeft:Eu,rotate:aE,rotateX:aE,rotateY:aE,rotateZ:aE,scale:mS,scaleX:mS,scaleY:mS,scaleZ:mS,skew:aE,skewX:aE,skewY:aE,distance:Eu,translateX:Eu,translateY:Eu,translateZ:Eu,x:Eu,y:Eu,z:Eu,perspective:Eu,transformPerspective:Eu,opacity:K2,originX:Ipe,originY:Ipe,originZ:Eu,zIndex:Ope,fillOpacity:K2,strokeOpacity:K2,numOctaves:Ope};function die(u,e,t,n){var i,r=u.style,a=u.vars,o=u.transform,s=u.transformKeys,l=u.transformOrigin;s.length=0;var c=!1,d=!1,h=!0;for(var E in e){var m=e[E];if(mPe(E)){a[E]=m;continue}var g=bPe[E],f=Hwu(m,g);if(p7(E)){if(c=!0,o[E]=f,s.push(E),!h)continue;m!==((i=g.default)!==null&&i!==void 0?i:0)&&(h=!1)}else hPe(E)?(l[E]=f,d=!0):r[E]=f}c?r.transform=Owu(u,t,h,n):n?r.transform=n({},""):!e.transform&&r.transform&&(r.transform="none"),d&&(r.transformOrigin=jwu(l))}var hie=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function kPe(u,e,t){for(var n in e)!H1(e[n])&&!EPe(n,t)&&(u[n]=e[n])}function Xwu(u,e,t){var n=u.transformTemplate;return C.useMemo(function(){var i=hie();die(i,e,{enableHardwareAcceleration:!t},n);var r=i.vars,a=i.style;return Ke(Ke({},r),a)},[e])}function eLu(u,e,t){var n=u.style||{},i={};return kPe(i,n,u),Object.assign(i,Xwu(u,e,t)),u.transformValues&&(i=u.transformValues(i)),i}function tLu(u,e,t){var n={},i=eLu(u,e,t);return u.drag&&u.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=u.drag===!0?"none":"pan-".concat(u.drag==="x"?"y":"x")),n.style=i,n}var uLu=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function HT(u){return uLu.has(u)}var FPe=function(u){return!HT(u)};function nLu(u){u&&(FPe=function(e){return e.startsWith("on")?!HT(e):u(e)})}try{nLu(require("@emotion/is-prop-valid").default)}catch{}function iLu(u,e,t){var n={};for(var i in u)(FPe(i)||t===!0&&HT(i)||!e&&!HT(i)||u.draggable&&i.startsWith("onDrag"))&&(n[i]=u[i]);return n}function jpe(u,e,t){return typeof u=="string"?u:Eu.transform(e+t*u)}function rLu(u,e,t){var n=jpe(e,u.x,u.width),i=jpe(t,u.y,u.height);return"".concat(n," ").concat(i)}var aLu={offset:"stroke-dashoffset",array:"stroke-dasharray"},oLu={offset:"strokeDashoffset",array:"strokeDasharray"};function sLu(u,e,t,n,i){t===void 0&&(t=1),n===void 0&&(n=0),i===void 0&&(i=!0),u.pathLength=1;var r=i?aLu:oLu;u[r.offset]=Eu.transform(-n);var a=Eu.transform(e),o=Eu.transform(t);u[r.array]="".concat(a," ").concat(o)}function Eie(u,e,t,n){var i=e.attrX,r=e.attrY,a=e.originX,o=e.originY,s=e.pathLength,l=e.pathSpacing,c=l===void 0?1:l,d=e.pathOffset,h=d===void 0?0:d,E=go(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);die(u,E,t,n),u.attrs=u.style,u.style={};var m=u.attrs,g=u.style,f=u.dimensions;m.transform&&(f&&(g.transform=m.transform),delete m.transform),f&&(a!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=rLu(f,a!==void 0?a:.5,o!==void 0?o:.5)),i!==void 0&&(m.x=i),r!==void 0&&(m.y=r),s!==void 0&&sLu(m,s,c,h,!1)}var yPe=function(){return Ke(Ke({},hie()),{attrs:{}})};function lLu(u,e){var t=C.useMemo(function(){var i=yPe();return Eie(i,e,{enableHardwareAcceleration:!1},u.transformTemplate),Ke(Ke({},i.attrs),{style:Ke({},i.style)})},[e]);if(u.style){var n={};kPe(n,u.style,u),t.style=Ke(Ke({},n),t.style)}return t}function cLu(u){u===void 0&&(u=!1);var e=function(t,n,i,r,a,o){var s=a.latestValues,l=lie(t)?lLu:tLu,c=l(n,s,o),d=iLu(n,typeof t=="string",u),h=Ke(Ke(Ke({},d),c),{ref:r});return i&&(h["data-projection-id"]=i),C.createElement(t,h)};return e}var dLu=/([a-z])([A-Z])/g,hLu="$1-$2",APe=function(u){return u.replace(dLu,hLu).toLowerCase()};function _Pe(u,e,t,n){var i=e.style,r=e.vars;Object.assign(u.style,i,n&&n.getProjectionStyles(t));for(var a in r)u.style.setProperty(a,r[a])}var SPe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function BPe(u,e,t,n){_Pe(u,e,void 0,n);for(var i in e.attrs)u.setAttribute(SPe.has(i)?i:APe(i),e.attrs[i])}function mie(u){var e=u.style,t={};for(var n in e)(H1(e[n])||EPe(n,u))&&(t[n]=e[n]);return t}function wPe(u){var e=mie(u);for(var t in u)if(H1(u[t])){var n=t==="x"||t==="y"?"attr"+t.toUpperCase():t;e[n]=u[t]}return e}function gie(u){return typeof u=="object"&&typeof u.start=="function"}var By=function(u){return Array.isArray(u)},ELu=function(u){return!!(u&&typeof u=="object"&&u.mix&&u.toValue)},LPe=function(u){return By(u)?u[u.length-1]||0:u};function J8(u){var e=H1(u)?u.get():u;return ELu(e)?e.toValue():e}function Hpe(u,e,t,n){var i=u.scrapeMotionValuesFromProps,r=u.createRenderState,a=u.onMount,o={latestValues:mLu(e,t,n,i),renderState:r()};return a&&(o.mount=function(s){return a(e,s,o)}),o}var zPe=function(u){return function(e,t){var n=C.useContext(EO),i=C.useContext(mO);return t?Hpe(u,e,n,i):zg(function(){return Hpe(u,e,n,i)})}};function mLu(u,e,t,n){var i={},r=(t==null?void 0:t.initial)===!1,a=n(u);for(var o in a)i[o]=J8(a[o]);var s=u.initial,l=u.animate,c=fO(u),d=lPe(u);e&&d&&!c&&u.inherit!==!1&&(s??(s=e.initial),l??(l=e.animate));var h=r||s===!1,E=h?l:s;if(E&&typeof E!="boolean"&&!gie(E)){var m=Array.isArray(E)?E:[E];m.forEach(function(g){var f=sPe(u,g);if(f){var p=f.transitionEnd;f.transition;var D=go(f,["transitionEnd","transition"]);for(var x in D){var b=D[x];if(Array.isArray(b)){var k=h?b.length-1:0;b=b[k]}b!==null&&(i[x]=b)}for(var x in p)i[x]=p[x]}})}return i}var gLu={useVisualState:zPe({scrapeMotionValuesFromProps:wPe,createRenderState:yPe,onMount:function(u,e,t){var n=t.renderState,i=t.latestValues;try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Eie(n,i,{enableHardwareAcceleration:!1},u.transformTemplate),BPe(e,n)}})},fLu={useVisualState:zPe({scrapeMotionValuesFromProps:mie,createRenderState:hie})};function pLu(u,e,t,n,i){var r=e.forwardMotionProps,a=r===void 0?!1:r,o=lie(u)?gLu:fLu;return Ke(Ke({},o),{preloadedFeatures:t,useRender:cLu(a),createVisualElement:n,projectionNodeConstructor:i,Component:u})}var Bi;(function(u){u.Animate="animate",u.Hover="whileHover",u.Tap="whileTap",u.Drag="whileDrag",u.Focus="whileFocus",u.InView="whileInView",u.Exit="exit"})(Bi||(Bi={}));function pO(u,e,t,n){return n===void 0&&(n={passive:!0}),u.addEventListener(e,t,n),function(){return u.removeEventListener(e,t)}}function SY(u,e,t,n){C.useEffect(function(){var i=u.current;if(t&&i)return pO(i,e,t,n)},[u,e,t,n])}function DLu(u){var e=u.whileFocus,t=u.visualElement,n=function(){var r;(r=t.animationState)===null||r===void 0||r.setActive(Bi.Focus,!0)},i=function(){var r;(r=t.animationState)===null||r===void 0||r.setActive(Bi.Focus,!1)};SY(t,"focus",e?n:void 0),SY(t,"blur",e?i:void 0)}function MPe(u){return typeof PointerEvent<"u"&&u instanceof PointerEvent?u.pointerType==="mouse":u instanceof MouseEvent}function TPe(u){var e=!!u.touches;return e}function xLu(u){return function(e){var t=e instanceof MouseEvent,n=!t||t&&e.button===0;n&&u(e)}}var vLu={pageX:0,pageY:0};function CLu(u,e){e===void 0&&(e="page");var t=u.touches[0]||u.changedTouches[0],n=t||vLu;return{x:n[e+"X"],y:n[e+"Y"]}}function bLu(u,e){return e===void 0&&(e="page"),{x:u[e+"X"],y:u[e+"Y"]}}function fie(u,e){return e===void 0&&(e="page"),{point:TPe(u)?CLu(u,e):bLu(u,e)}}var NPe=function(u,e){e===void 0&&(e=!1);var t=function(n){return u(n,fie(n))};return e?xLu(t):t},kLu=function(){return W6&&window.onpointerdown===null},FLu=function(){return W6&&window.ontouchstart===null},yLu=function(){return W6&&window.onmousedown===null},ALu={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},_Lu={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function PPe(u){return kLu()?u:FLu()?_Lu[u]:yLu()?ALu[u]:u}function Ox(u,e,t,n){return pO(u,PPe(e),NPe(t,e==="pointerdown"),n)}function VT(u,e,t,n){return SY(u,PPe(e),t&&NPe(t,e==="pointerdown"),n)}function RPe(u){var e=null;return function(){var t=function(){e=null};return e===null?(e=u,t):!1}}var Vpe=RPe("dragHorizontal"),$pe=RPe("dragVertical");function IPe(u){var e=!1;if(u==="y")e=$pe();else if(u==="x")e=Vpe();else{var t=Vpe(),n=$pe();t&&n?e=function(){t(),n()}:(t&&t(),n&&n())}return e}function OPe(){var u=IPe(!0);return u?(u(),!1):!0}function Kpe(u,e,t){return function(n,i){var r;!MPe(n)||OPe()||((r=u.animationState)===null||r===void 0||r.setActive(Bi.Hover,e),t==null||t(n,i))}}function SLu(u){var e=u.onHoverStart,t=u.onHoverEnd,n=u.whileHover,i=u.visualElement;VT(i,"pointerenter",e||n?Kpe(i,!0,e):void 0,{passive:!e}),VT(i,"pointerleave",t||n?Kpe(i,!1,t):void 0,{passive:!t})}var jPe=function(u,e){return e?u===e?!0:jPe(u,e.parentElement):!1};function HPe(u){return C.useEffect(function(){return function(){return u()}},[])}const $T=(u,e,t)=>Math.min(Math.max(t,u),e),L$=.001,BLu=.01,Wpe=10,wLu=.05,LLu=1;function zLu({duration:u=800,bounce:e=.25,velocity:t=0,mass:n=1}){let i,r;hwu(u<=Wpe*1e3);let a=1-e;a=$T(wLu,LLu,a),u=$T(BLu,Wpe,u/1e3),a<1?(i=l=>{const c=l*a,d=c*u,h=c-t,E=BY(l,a),m=Math.exp(-d);return L$-h/E*m},r=l=>{const d=l*a*u,h=d*t+t,E=Math.pow(a,2)*Math.pow(l,2)*u,m=Math.exp(-d),g=BY(Math.pow(l,2),a);return(-i(l)+L$>0?-1:1)*((h-E)*m)/g}):(i=l=>{const c=Math.exp(-l*u),d=(l-t)*u+1;return-L$+c*d},r=l=>{const c=Math.exp(-l*u),d=(t-l)*(u*u);return c*d});const o=5/u,s=TLu(i,r,o);if(u=u*1e3,isNaN(s))return{stiffness:100,damping:10,duration:u};{const l=Math.pow(s,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:u}}}const MLu=12;function TLu(u,e,t){let n=t;for(let i=1;iu[t]!==void 0)}function RLu(u){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},u);if(!Gpe(u,PLu)&&Gpe(u,NLu)){const t=zLu(u);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function pie(u){var{from:e=0,to:t=1,restSpeed:n=2,restDelta:i}=u,r=go(u,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:o,damping:s,mass:l,velocity:c,duration:d,isResolvedFromDuration:h}=RLu(r),E=Upe,m=Upe;function g(){const f=c?-(c/1e3):0,p=t-e,D=s/(2*Math.sqrt(o*l)),x=Math.sqrt(o/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(t-e)/100,.4)),D<1){const b=BY(x,D);E=k=>{const A=Math.exp(-D*x*k);return t-A*((f+D*x*p)/b*Math.sin(b*k)+p*Math.cos(b*k))},m=k=>{const A=Math.exp(-D*x*k);return D*x*A*(Math.sin(b*k)*(f+D*x*p)/b+p*Math.cos(b*k))-A*(Math.cos(b*k)*(f+D*x*p)-b*p*Math.sin(b*k))}}else if(D===1)E=b=>t-Math.exp(-x*b)*(p+(f+x*p)*b);else{const b=x*Math.sqrt(D*D-1);E=k=>{const A=Math.exp(-D*x*k),F=Math.min(b*k,300);return t-A*((f+D*x*p)*Math.sinh(F)+b*p*Math.cosh(F))/b}}}return g(),{next:f=>{const p=E(f);if(h)a.done=f>=d;else{const D=m(f)*1e3,x=Math.abs(D)<=n,b=Math.abs(t-p)<=i;a.done=x&&b}return a.value=a.done?t:p,a},flipTarget:()=>{c=-c,[e,t]=[t,e],g()}}}pie.needsInterpolation=(u,e)=>typeof u=="string"||typeof e=="string";const Upe=u=>0,wy=(u,e,t)=>{const n=e-u;return n===0?1:(t-u)/n},ir=(u,e,t)=>-t*u+t*e+u;function z$(u,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?u+(e-u)*6*t:t<1/2?e:t<2/3?u+(e-u)*(2/3-t)*6:u}function qpe({hue:u,saturation:e,lightness:t,alpha:n}){u/=360,e/=100,t/=100;let i=0,r=0,a=0;if(!e)i=r=a=t;else{const o=t<.5?t*(1+e):t+e-t*e,s=2*t-o;i=z$(s,o,u+1/3),r=z$(s,o,u),a=z$(s,o,u-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}const ILu=(u,e,t)=>{const n=u*u,i=e*e;return Math.sqrt(Math.max(0,t*(i-n)+n))},OLu=[AY,KE,e3],Jpe=u=>OLu.find(e=>e.test(u)),VPe=(u,e)=>{let t=Jpe(u),n=Jpe(e),i=t.parse(u),r=n.parse(e);t===e3&&(i=qpe(i),t=KE),n===e3&&(r=qpe(r),n=KE);const a=Object.assign({},i);return o=>{for(const s in a)s!=="alpha"&&(a[s]=ILu(i[s],r[s],o));return a.alpha=ir(i.alpha,r.alpha,o),t.transform(a)}},wY=u=>typeof u=="number",jLu=(u,e)=>t=>e(u(t)),DO=(...u)=>u.reduce(jLu);function $Pe(u,e){return wY(u)?t=>ir(u,e,t):Zo.test(u)?VPe(u,e):WPe(u,e)}const KPe=(u,e)=>{const t=[...u],n=t.length,i=u.map((r,a)=>$Pe(r,e[a]));return r=>{for(let a=0;a{const t=Object.assign(Object.assign({},u),e),n={};for(const i in t)u[i]!==void 0&&e[i]!==void 0&&(n[i]=$Pe(u[i],e[i]));return i=>{for(const r in n)t[r]=n[r](i);return t}};function Zpe(u){const e=v4.parse(u),t=e.length;let n=0,i=0,r=0;for(let a=0;a{const t=v4.createTransformer(e),n=Zpe(u),i=Zpe(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?DO(KPe(n.parsed,i.parsed),t):a=>`${a>0?e:u}`},VLu=(u,e)=>t=>ir(u,e,t);function $Lu(u){if(typeof u=="number")return VLu;if(typeof u=="string")return Zo.test(u)?VPe:WPe;if(Array.isArray(u))return KPe;if(typeof u=="object")return HLu}function KLu(u,e,t){const n=[],i=t||$Lu(u[0]),r=u.length-1;for(let a=0;at(wy(u,e,n))}function GLu(u,e){const t=u.length,n=t-1;return i=>{let r=0,a=!1;if(i<=u[0]?a=!0:i>=u[n]&&(r=n-1,a=!0),!a){let s=1;for(;si||s===n);s++);r=s-1}const o=wy(u[r],u[r+1],i);return e[r](o)}}function Die(u,e,{clamp:t=!0,ease:n,mixer:i}={}){const r=u.length;OT(r===e.length),OT(!n||!Array.isArray(n)||n.length===r-1),u[0]>u[r-1]&&(u=[].concat(u),e=[].concat(e),u.reverse(),e.reverse());const a=KLu(e,n,i),o=r===2?WLu(u,a):GLu(u,a);return t?s=>o($T(u[0],u[r-1],s)):o}const xO=u=>e=>1-u(1-e),xie=u=>e=>e<=.5?u(2*e)/2:(2-u(2*(1-e)))/2,ULu=u=>e=>Math.pow(e,u),GPe=u=>e=>e*e*((u+1)*e-u),qLu=u=>{const e=GPe(u);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},UPe=1.525,JLu=4/11,ZLu=8/11,YLu=9/10,vie=u=>u,Cie=ULu(2),QLu=xO(Cie),qPe=xie(Cie),JPe=u=>1-Math.sin(Math.acos(u)),bie=xO(JPe),XLu=xie(bie),kie=GPe(UPe),ezu=xO(kie),tzu=xie(kie),uzu=qLu(UPe),nzu=4356/361,izu=35442/1805,rzu=16061/1805,KT=u=>{if(u===1||u===0)return u;const e=u*u;return uu<.5?.5*(1-KT(1-u*2)):.5*KT(u*2-1)+.5;function szu(u,e){return u.map(()=>e||qPe).splice(0,u.length-1)}function lzu(u){const e=u.length;return u.map((t,n)=>n!==0?n/(e-1):0)}function czu(u,e){return u.map(t=>t*e)}function Z8({from:u=0,to:e=1,ease:t,offset:n,duration:i=300}){const r={done:!1,value:u},a=Array.isArray(e)?e:[u,e],o=czu(n&&n.length===a.length?n:lzu(a),i);function s(){return Die(o,a,{ease:Array.isArray(t)?t:szu(a,t)})}let l=s();return{next:c=>(r.value=l(c),r.done=c>=i,r),flipTarget:()=>{a.reverse(),l=s()}}}function dzu({velocity:u=0,from:e=0,power:t=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:r}){const a={done:!1,value:e};let o=t*u;const s=e+o,l=r===void 0?s:r(s);return l!==s&&(o=l-e),{next:c=>{const d=-o*Math.exp(-c/n);return a.done=!(d>i||d<-i),a.value=a.done?l:l+d,a},flipTarget:()=>{}}}const Ype={keyframes:Z8,spring:pie,decay:dzu};function hzu(u){if(Array.isArray(u.to))return Z8;if(Ype[u.type])return Ype[u.type];const e=new Set(Object.keys(u));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Z8:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?pie:Z8}const ZPe=1/60*1e3,Ezu=typeof performance<"u"?()=>performance.now():()=>Date.now(),YPe=typeof window<"u"?u=>window.requestAnimationFrame(u):u=>setTimeout(()=>u(Ezu()),ZPe);function mzu(u){let e=[],t=[],n=0,i=!1,r=!1;const a=new WeakSet,o={schedule:(s,l=!1,c=!1)=>{const d=c&&i,h=d?e:t;return l&&a.add(s),h.indexOf(s)===-1&&(h.push(s),d&&i&&(n=e.length)),s},cancel:s=>{const l=t.indexOf(s);l!==-1&&t.splice(l,1),a.delete(s)},process:s=>{if(i){r=!0;return}if(i=!0,[e,t]=[t,e],t.length=0,n=e.length,n)for(let l=0;l(u[e]=mzu(()=>Ly=!0),u),{}),Jc=v7.reduce((u,e)=>{const t=vO[e];return u[e]=(n,i=!1,r=!1)=>(Ly||pzu(),t.schedule(n,i,r)),u},{}),u6=v7.reduce((u,e)=>(u[e]=vO[e].cancel,u),{}),M$=v7.reduce((u,e)=>(u[e]=()=>vO[e].process(jx),u),{}),fzu=u=>vO[u].process(jx),QPe=u=>{Ly=!1,jx.delta=LY?ZPe:Math.max(Math.min(u-jx.timestamp,gzu),1),jx.timestamp=u,zY=!0,v7.forEach(fzu),zY=!1,Ly&&(LY=!1,YPe(QPe))},pzu=()=>{Ly=!0,LY=!0,zY||YPe(QPe)},WT=()=>jx;function XPe(u,e,t=0){return u-e-t}function Dzu(u,e,t=0,n=!0){return n?XPe(e+-u,e,t):e-(u-e)+t}function xzu(u,e,t,n){return n?u>=e+t:u<=-t}const vzu=u=>{const e=({delta:t})=>u(t);return{start:()=>Jc.update(e,!0),stop:()=>u6.update(e)}};function eRe(u){var e,t,{from:n,autoplay:i=!0,driver:r=vzu,elapsed:a=0,repeat:o=0,repeatType:s="loop",repeatDelay:l=0,onPlay:c,onStop:d,onComplete:h,onRepeat:E,onUpdate:m}=u,g=go(u,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:f}=g,p,D=0,x=g.duration,b,k=!1,A=!0,F;const S=hzu(g);!((t=(e=S).needsInterpolation)===null||t===void 0)&&t.call(e,n,f)&&(F=Die([0,100],[n,f],{clamp:!1}),n=0,f=100);const w=S(Object.assign(Object.assign({},g),{from:n,to:f}));function z(){D++,s==="reverse"?(A=D%2===0,a=Dzu(a,x,l,A)):(a=XPe(a,x,l),s==="mirror"&&w.flipTarget()),k=!1,E&&E()}function N(){p.stop(),h&&h()}function O(_){if(A||(_=-_),a+=_,!k){const L=w.next(Math.max(0,a));b=L.value,F&&(b=F(b)),k=A?L.done:a<=0}m==null||m(b),k&&(D===0&&(x??(x=a)),D{d==null||d(),p.stop()}}}function tRe(u,e){return e?u*(1e3/e):0}function Czu({from:u=0,velocity:e=0,min:t,max:n,power:i=.8,timeConstant:r=750,bounceStiffness:a=500,bounceDamping:o=10,restDelta:s=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:h,onStop:E}){let m;function g(x){return t!==void 0&&xn}function f(x){return t===void 0?n:n===void 0||Math.abs(t-x){var k;d==null||d(b),(k=x.onUpdate)===null||k===void 0||k.call(x,b)},onComplete:h,onStop:E}))}function D(x){p(Object.assign({type:"spring",stiffness:a,damping:o,restDelta:s},x))}if(g(u))D({from:u,velocity:e,to:f(u)});else{let x=i*e+u;typeof l<"u"&&(x=l(x));const b=f(x),k=b===t?-1:1;let A,F;const S=w=>{A=F,F=w,e=tRe(w-A,WT().delta),(k===1&&w>b||k===-1&&wm==null?void 0:m.stop()}}const MY=u=>u.hasOwnProperty("x")&&u.hasOwnProperty("y"),Qpe=u=>MY(u)&&u.hasOwnProperty("z"),gS=(u,e)=>Math.abs(u-e);function uRe(u,e){if(wY(u)&&wY(e))return gS(u,e);if(MY(u)&&MY(e)){const t=gS(u.x,e.x),n=gS(u.y,e.y),i=Qpe(u)&&Qpe(e)?gS(u.z,e.z):0;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2)+Math.pow(i,2))}}const nRe=(u,e)=>1-3*e+3*u,iRe=(u,e)=>3*e-6*u,rRe=u=>3*u,GT=(u,e,t)=>((nRe(e,t)*u+iRe(e,t))*u+rRe(e))*u,aRe=(u,e,t)=>3*nRe(e,t)*u*u+2*iRe(e,t)*u+rRe(e),bzu=1e-7,kzu=10;function Fzu(u,e,t,n,i){let r,a,o=0;do a=e+(t-e)/2,r=GT(a,n,i)-u,r>0?t=a:e=a;while(Math.abs(r)>bzu&&++o=Azu?_zu(a,d,u,t):h===0?d:Fzu(a,o,o+fS,u,t)}return a=>a===0||a===1?a:GT(r(a),e,n)}function Bzu(u){var e=u.onTap,t=u.onTapStart,n=u.onTapCancel,i=u.whileTap,r=u.visualElement,a=e||t||n||i,o=C.useRef(!1),s=C.useRef(null),l={passive:!(t||e||n||m)};function c(){var g;(g=s.current)===null||g===void 0||g.call(s),s.current=null}function d(){var g;return c(),o.current=!1,(g=r.animationState)===null||g===void 0||g.setActive(Bi.Tap,!1),!OPe()}function h(g,f){d()&&(jPe(r.getInstance(),g.target)?e==null||e(g,f):n==null||n(g,f))}function E(g,f){d()&&(n==null||n(g,f))}function m(g,f){var p;c(),!o.current&&(o.current=!0,s.current=DO(Ox(window,"pointerup",h,l),Ox(window,"pointercancel",E,l)),(p=r.animationState)===null||p===void 0||p.setActive(Bi.Tap,!0),t==null||t(g,f))}VT(r,"pointerdown",a?m:void 0,l),HPe(c)}var Xpe=new Set;function wzu(u,e,t){u||Xpe.has(e)||(console.warn(e),t&&console.warn(t),Xpe.add(e))}var TY=new WeakMap,T$=new WeakMap,Lzu=function(u){var e;(e=TY.get(u.target))===null||e===void 0||e(u)},zzu=function(u){u.forEach(Lzu)};function Mzu(u){var e=u.root,t=go(u,["root"]),n=e||document;T$.has(n)||T$.set(n,{});var i=T$.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(zzu,Ke({root:e},t))),i[r]}function Tzu(u,e,t){var n=Mzu(e);return TY.set(u,t),n.observe(u),function(){TY.delete(u),n.unobserve(u)}}function Nzu(u){var e=u.visualElement,t=u.whileInView,n=u.onViewportEnter,i=u.onViewportLeave,r=u.viewport,a=r===void 0?{}:r,o=C.useRef({hasEnteredView:!1,isInView:!1}),s=!!(t||n||i);a.once&&o.current.hasEnteredView&&(s=!1);var l=typeof IntersectionObserver>"u"?Izu:Rzu;l(s,o.current,e,a)}var Pzu={some:0,all:1};function Rzu(u,e,t,n){var i=n.root,r=n.margin,a=n.amount,o=a===void 0?"some":a,s=n.once;C.useEffect(function(){if(u){var l={root:i==null?void 0:i.current,rootMargin:r,threshold:typeof o=="number"?o:Pzu[o]},c=function(d){var h,E=d.isIntersecting;if(e.isInView!==E&&(e.isInView=E,!(s&&!E&&e.hasEnteredView))){E&&(e.hasEnteredView=!0),(h=t.animationState)===null||h===void 0||h.setActive(Bi.InView,E);var m=t.getProps(),g=E?m.onViewportEnter:m.onViewportLeave;g==null||g(d)}};return Tzu(t.getInstance(),l,c)}},[u,i,r,o])}function Izu(u,e,t,n){var i=n.fallback,r=i===void 0?!0:i;C.useEffect(function(){!u||!r||(nPe!=="production"&&wzu(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;e.hasEnteredView=!0;var o=t.getProps().onViewportEnter;o==null||o(null),(a=t.animationState)===null||a===void 0||a.setActive(Bi.InView,!0)}))},[u])}var WE=function(u){return function(e){return u(e),null}},Ozu={inView:WE(Nzu),tap:WE(Bzu),focus:WE(DLu),hover:WE(SLu)},jzu=0,Hzu=function(){return jzu++},Vzu=function(){return zg(Hzu)};function oRe(){var u=C.useContext(mO);if(u===null)return[!0,null];var e=u.isPresent,t=u.onExitComplete,n=u.register,i=Vzu();C.useEffect(function(){return n(i)},[]);var r=function(){return t==null?void 0:t(i)};return!e&&t?[!1,r]:[!0]}function sRe(u,e){if(!Array.isArray(e))return!1;var t=e.length;if(t!==u.length)return!1;for(var n=0;n-1&&u.splice(t,1)}function uMu(u,e,t){var n=Zi(u),i=n.slice(0),r=e<0?i.length+e:e;if(r>=0&&rD&&N,T=Array.isArray(z)?z:[z],R=T.reduce(r,{});O===!1&&(R={});var I=w.prevResolvedValues,H=I===void 0?{}:I,V=Ke(Ke({},H),R),U=function(re){L=!0,f.delete(re),w.needsAnimating[re]=!0};for(var J in V){var Y=R[J],X=H[J];p.hasOwnProperty(J)||(Y!==X?By(Y)&&By(X)?!sRe(Y,X)||_?U(J):w.protectedKeys[J]=!0:Y!==void 0?U(J):f.add(J):Y!==void 0&&f.has(J)?U(J):w.protectedKeys[J]=!0)}w.prevProp=z,w.prevResolvedValues=R,w.isActive&&(p=Ke(Ke({},p),R)),i&&u.blockInitialAnimation&&(L=!1),L&&!y&&g.push.apply(g,Bl([],Zi(T.map(function(re){return{animation:re,options:Ke({type:S},c)}})),!1))},b=0;b=3;if(!(!E&&!m)){var g=h.point,f=WT().timestamp;i.history.push(Ke(Ke({},g),{timestamp:f}));var p=i.handlers,D=p.onStart,x=p.onMove;E||(D&&D(i.lastMoveEvent,h),i.startEvent=i.lastMoveEvent),x&&x(i.lastMoveEvent,h)}}},this.handlePointerMove=function(h,E){if(i.lastMoveEvent=h,i.lastMoveEventInfo=P$(E,i.transformPagePoint),MPe(h)&&h.buttons===0){i.handlePointerUp(h,E);return}Jc.update(i.updatePoint,!0)},this.handlePointerUp=function(h,E){i.end();var m=i.handlers,g=m.onEnd,f=m.onSessionEnd,p=R$(P$(E,i.transformPagePoint),i.history);i.startEvent&&g&&g(h,p),f&&f(h,p)},!(TPe(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=a;var o=fie(e),s=P$(o,this.transformPagePoint),l=s.point,c=WT().timestamp;this.history=[Ke(Ke({},l),{timestamp:c})];var d=t.onSessionStart;d&&d(e,R$(s,this.history)),this.removeListeners=DO(Ox(window,"pointermove",this.handlePointerMove),Ox(window,"pointerup",this.handlePointerUp),Ox(window,"pointercancel",this.handlePointerUp))}}return u.prototype.updateHandlers=function(e){this.handlers=e},u.prototype.end=function(){this.removeListeners&&this.removeListeners(),u6.update(this.updatePoint)},u}();function P$(u,e){return e?{point:e(u.point)}:u}function rDe(u,e){return{x:u.x-e.x,y:u.y-e.y}}function R$(u,e){var t=u.point;return{point:t,delta:rDe(t,ERe(e)),offset:rDe(t,FMu(e)),velocity:yMu(e,.1)}}function FMu(u){return u[0]}function ERe(u){return u[u.length-1]}function yMu(u,e){if(u.length<2)return{x:0,y:0};for(var t=u.length-1,n=null,i=ERe(u);t>=0&&(n=u[t],!(i.timestamp-n.timestamp>UT(e)));)t--;if(!n)return{x:0,y:0};var r=(i.timestamp-n.timestamp)/1e3;if(r===0)return{x:0,y:0};var a={x:(i.x-n.x)/r,y:(i.y-n.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function C4(u){return u.max-u.min}function aDe(u,e,t){return e===void 0&&(e=0),t===void 0&&(t=.01),uRe(u,e)i&&(u=t?ir(i,u,t.max):Math.min(u,i)),u}function cDe(u,e,t){return{min:e!==void 0?u.min+e:void 0,max:t!==void 0?u.max+t-(u.max-u.min):void 0}}function SMu(u,e){var t=e.top,n=e.left,i=e.bottom,r=e.right;return{x:cDe(u.x,n,r),y:cDe(u.y,t,i)}}function dDe(u,e){var t,n=e.min-u.min,i=e.max-u.max;return e.max-e.minn?t=wy(e.min,e.max-n,u.min):n>i&&(t=wy(u.min,u.max-i,e.min)),$T(0,1,t)}function LMu(u,e){var t={};return e.min!==void 0&&(t.min=e.min-u.min),e.max!==void 0&&(t.max=e.max-u.min),t}var PY=.35;function zMu(u){return u===void 0&&(u=PY),u===!1?u=0:u===!0&&(u=PY),{x:hDe(u,"left","right"),y:hDe(u,"top","bottom")}}function hDe(u,e,t){return{min:EDe(u,e),max:EDe(u,t)}}function EDe(u,e){var t;return typeof u=="number"?u:(t=u[e])!==null&&t!==void 0?t:0}var mDe=function(){return{translate:0,scale:1,origin:0,originPoint:0}},q2=function(){return{x:mDe(),y:mDe()}},gDe=function(){return{min:0,max:0}},bo=function(){return{x:gDe(),y:gDe()}};function Md(u){return[u("x"),u("y")]}function mRe(u){var e=u.top,t=u.left,n=u.right,i=u.bottom;return{x:{min:t,max:n},y:{min:e,max:i}}}function MMu(u){var e=u.x,t=u.y;return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TMu(u,e){if(!e)return u;var t=e({x:u.left,y:u.top}),n=e({x:u.right,y:u.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function I$(u){return u===void 0||u===1}function gRe(u){var e=u.scale,t=u.scaleX,n=u.scaleY;return!I$(e)||!I$(t)||!I$(n)}function oE(u){return gRe(u)||fDe(u.x)||fDe(u.y)||u.z||u.rotate||u.rotateX||u.rotateY}function fDe(u){return u&&u!=="0%"}function qT(u,e,t){var n=u-t,i=e*n;return t+i}function pDe(u,e,t,n,i){return i!==void 0&&(u=qT(u,i,n)),qT(u,t,n)+e}function RY(u,e,t,n,i){e===void 0&&(e=0),t===void 0&&(t=1),u.min=pDe(u.min,e,t,n,i),u.max=pDe(u.max,e,t,n,i)}function fRe(u,e){var t=e.x,n=e.y;RY(u.x,t.translate,t.scale,t.originPoint),RY(u.y,n.translate,n.scale,n.originPoint)}function NMu(u,e,t,n){var i,r;n===void 0&&(n=!1);var a=t.length;if(a){e.x=e.y=1;for(var o,s,l=0;le?t="y":Math.abs(u.x)>e&&(t="x"),t}function VMu(u){var e=u.dragControls,t=u.visualElement,n=zg(function(){return new jMu(t)});C.useEffect(function(){return e&&e.subscribe(n)},[n,e]),C.useEffect(function(){return n.addListeners()},[n])}function $Mu(u){var e=u.onPan,t=u.onPanStart,n=u.onPanEnd,i=u.onPanSessionStart,r=u.visualElement,a=e||t||n||i,o=C.useRef(null),s=C.useContext(hO).transformPagePoint,l={onSessionStart:i,onStart:t,onMove:e,onEnd:function(d,h){o.current=null,n&&n(d,h)}};C.useEffect(function(){o.current!==null&&o.current.updateHandlers(l)});function c(d){o.current=new hRe(d,l,{transformPagePoint:s})}VT(r,"pointerdown",a&&c),HPe(function(){return o.current&&o.current.end()})}var KMu={pan:WE($Mu),drag:WE(VMu)},xS=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function WMu(){var u=xS.map(function(){return new W2}),e={},t={clearAllListeners:function(){return u.forEach(function(n){return n.clear()})},updatePropListeners:function(n){xS.forEach(function(i){var r,a="on"+i,o=n[a];(r=e[i])===null||r===void 0||r.call(e),o&&(e[i]=t[a](o))})}};return u.forEach(function(n,i){t["on"+xS[i]]=function(r){return n.add(r)},t["notify"+xS[i]]=function(){for(var r=[],a=0;a=0?window.pageYOffset:null,l=tTu(e,u,o);return r.length&&r.forEach(function(c){var d=Zi(c,2),h=d[0],E=d[1];u.getValue(h).set(E)}),u.syncRender(),s!==null&&window.scrollTo({top:s}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function nTu(u,e,t,n){return YMu(e)?uTu(u,e,t,n):{target:e,transitionEnd:n}}var iTu=function(u,e,t,n){var i=JMu(u,e,n);return e=i.target,n=i.transitionEnd,nTu(u,e,t,n)};function rTu(u){return window.getComputedStyle(u)}var kRe={treeType:"dom",readValueFromInstance:function(u,e){if(p7(e)){var t=Fie(e);return t&&t.default||0}else{var n=rTu(u);return(mPe(e)?n.getPropertyValue(e):n[e])||0}},sortNodePosition:function(u,e){return u.compareDocumentPosition(e)&2?1:-1},getBaseTarget:function(u,e){var t;return(t=u.style)===null||t===void 0?void 0:t[e]},measureViewportBox:function(u,e){var t=e.transformPagePoint;return pRe(u,t)},resetTransform:function(u,e,t){var n=t.transformTemplate;e.style.transform=n?n({},""):"none",u.scheduleRender()},restoreTransform:function(u,e){u.style.transform=e.style.transform},removeValueFromRenderState:function(u,e){var t=e.vars,n=e.style;delete t[u],delete n[u]},makeTargetAnimatable:function(u,e,t,n){var i=t.transformValues;n===void 0&&(n=!0);var r=e.transition,a=e.transitionEnd,o=go(e,["transition","transitionEnd"]),s=hMu(o,r||{},u);if(i&&(a&&(a=i(a)),o&&(o=i(o)),s&&(s=i(s))),n){cMu(u,o,s);var l=iTu(u,o,s,a);a=l.transitionEnd,o=l.target}return Ke({transition:r,transitionEnd:a},o)},scrapeMotionValuesFromProps:mie,build:function(u,e,t,n,i){u.isVisible!==void 0&&(e.style.visibility=u.isVisible?"visible":"hidden"),die(e,t,n,i.transformTemplate)},render:_Pe},aTu=DRe(kRe),oTu=DRe(Ke(Ke({},kRe),{getBaseTarget:function(u,e){return u[e]},readValueFromInstance:function(u,e){var t;return p7(e)?((t=Fie(e))===null||t===void 0?void 0:t.default)||0:(e=SPe.has(e)?e:APe(e),u.getAttribute(e))},scrapeMotionValuesFromProps:wPe,build:function(u,e,t,n,i){Eie(e,t,n,i.transformTemplate)},render:BPe})),sTu=function(u,e){return lie(u)?oTu(e,{enableHardwareAcceleration:!1}):aTu(e,{enableHardwareAcceleration:!0})};function FDe(u,e){return e.max===e.min?0:u/(e.max-e.min)*100}var tb={correct:function(u,e){if(!e.target)return u;if(typeof u=="string")if(Eu.test(u))u=parseFloat(u);else return u;var t=FDe(u,e.target.x),n=FDe(u,e.target.y);return"".concat(t,"% ").concat(n,"%")}},yDe="_$css",lTu={correct:function(u,e){var t=e.treeScale,n=e.projectionDelta,i=u,r=u.includes("var("),a=[];r&&(u=u.replace(vRe,function(g){return a.push(g),yDe}));var o=v4.parse(u);if(o.length>5)return i;var s=v4.createTransformer(u),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=d;var h=ir(c,d,.5);typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h);var E=s(o);if(r){var m=0;E=E.replace(yDe,function(){var g=a[m];return m++,g})}return E}},cTu=function(u){p9e(e,u);function e(){return u!==null&&u.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){var t=this,n=this.props,i=n.visualElement,r=n.layoutGroup,a=n.switchLayoutGroup,o=n.layoutId,s=i.projection;Mwu(hTu),s&&(r!=null&&r.group&&r.group.add(s),a!=null&&a.register&&o&&a.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",function(){t.safeToRemove()}),s.setOptions(Ke(Ke({},s.options),{onExitComplete:function(){return t.safeToRemove()}}))),V2.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var n=this,i=this.props,r=i.layoutDependency,a=i.visualElement,o=i.drag,s=i.isPresent,l=a.projection;return l&&(l.isPresent=s,o||t.layoutDependency!==r||r===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Jc.postRender(function(){var c;!((c=l.getStack())===null||c===void 0)&&c.members.length||n.safeToRemove()}))),null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,n=t.visualElement,i=t.layoutGroup,r=t.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(a),r!=null&&r.deregister&&r.deregister(a))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;t==null||t()},e.prototype.render=function(){return null},e}(M.Component);function dTu(u){var e=Zi(oRe(),2),t=e[0],n=e[1],i=C.useContext(cPe);return M.createElement(cTu,Ke({},u,{layoutGroup:i,switchLayoutGroup:C.useContext(dPe),isPresent:t,safeToRemove:n}))}var hTu={borderRadius:Ke(Ke({},tb),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:tb,borderTopRightRadius:tb,borderBottomLeftRadius:tb,borderBottomRightRadius:tb,boxShadow:lTu},ETu={measureLayout:dTu};function mTu(u,e,t){t===void 0&&(t={});var n=H1(u)?u:vp(u);return _ie("",n,e,t),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var FRe=["TopLeft","TopRight","BottomLeft","BottomRight"],gTu=FRe.length,ADe=function(u){return typeof u=="string"?parseFloat(u):u},_De=function(u){return typeof u=="number"||Eu.test(u)};function fTu(u,e,t,n,i,r){var a,o,s,l;i?(u.opacity=ir(0,(a=t.opacity)!==null&&a!==void 0?a:1,pTu(n)),u.opacityExit=ir((o=e.opacity)!==null&&o!==void 0?o:1,0,DTu(n))):r&&(u.opacity=ir((s=e.opacity)!==null&&s!==void 0?s:1,(l=t.opacity)!==null&&l!==void 0?l:1,n));for(var c=0;ce?1:t(wy(u,e,n))}}function BDe(u,e){u.min=e.min,u.max=e.max}function nc(u,e){BDe(u.x,e.x),BDe(u.y,e.y)}function wDe(u,e,t,n,i){return u-=e,u=qT(u,1/t,n),i!==void 0&&(u=qT(u,1/i,n)),u}function xTu(u,e,t,n,i,r,a){if(e===void 0&&(e=0),t===void 0&&(t=1),n===void 0&&(n=.5),r===void 0&&(r=u),a===void 0&&(a=u),C1.test(e)){e=parseFloat(e);var o=ir(a.min,a.max,e/100);e=o-a.min}if(typeof e=="number"){var s=ir(r.min,r.max,n);u===r&&(s-=e),u.min=wDe(u.min,e,t,s,i),u.max=wDe(u.max,e,t,s,i)}}function LDe(u,e,t,n,i){var r=Zi(t,3),a=r[0],o=r[1],s=r[2];xTu(u,e[a],e[o],e[s],e.scale,n,i)}var vTu=["x","scaleX","originX"],CTu=["y","scaleY","originY"];function zDe(u,e,t,n){LDe(u.x,e,vTu,t==null?void 0:t.x,n==null?void 0:n.x),LDe(u.y,e,CTu,t==null?void 0:t.y,n==null?void 0:n.y)}function MDe(u){return u.translate===0&&u.scale===1}function ARe(u){return MDe(u.x)&&MDe(u.y)}function _Re(u,e){return u.x.min===e.x.min&&u.x.max===e.x.max&&u.y.min===e.y.min&&u.y.max===e.y.max}var bTu=function(){function u(){this.members=[]}return u.prototype.add=function(e){Sie(this.members,e),e.scheduleRender()},u.prototype.remove=function(e){if(Bie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},u.prototype.relegate=function(e){var t=this.members.findIndex(function(a){return e===a});if(t===0)return!1;for(var n,i=t;i>=0;i--){var r=this.members[i];if(r.isPresent!==!1){n=r;break}}return n?(this.promote(n),!0):!1},u.prototype.promote=function(e,t){var n,i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues,e.snapshot.isShared=!0),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);var r=e.options.crossfade;r===!1&&i.hide()}},u.prototype.exitAnimationComplete=function(){this.members.forEach(function(e){var t,n,i,r,a;(n=(t=e.options).onExitComplete)===null||n===void 0||n.call(t),(a=(i=e.resumingFrom)===null||i===void 0?void 0:(r=i.options).onExitComplete)===null||a===void 0||a.call(r)})},u.prototype.scheduleRender=function(){this.members.forEach(function(e){e.instance&&e.scheduleRender(!1)})},u.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},u}(),kTu="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function TDe(u,e,t){var n=u.x.translate/e.x,i=u.y.translate/e.y,r="translate3d(".concat(n,"px, ").concat(i,"px, 0) ");if(r+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),t){var a=t.rotate,o=t.rotateX,s=t.rotateY;a&&(r+="rotate(".concat(a,"deg) ")),o&&(r+="rotateX(".concat(o,"deg) ")),s&&(r+="rotateY(".concat(s,"deg) "))}var l=u.x.scale*e.x,c=u.y.scale*e.y;return r+="scale(".concat(l,", ").concat(c,")"),r===kTu?"none":r}var FTu=function(u,e){return u.depth-e.depth},yTu=function(){function u(){this.children=[],this.isDirty=!1}return u.prototype.add=function(e){Sie(this.children,e),this.isDirty=!0},u.prototype.remove=function(e){Bie(this.children,e),this.isDirty=!0},u.prototype.forEach=function(e){this.isDirty&&this.children.sort(FTu),this.isDirty=!1,this.children.forEach(e)},u}(),NDe=1e3;function SRe(u){var e=u.attachResizeListener,t=u.defaultParent,n=u.measureScroll,i=u.checkIsScrollRoot,r=u.resetTransform;return function(){function a(o,s,l){var c=this;s===void 0&&(s={}),l===void 0&&(l=t==null?void 0:t()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(LTu),c.nodes.forEach(zTu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=o,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?Bl(Bl([],Zi(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(var d=0;d=0;n--)if(u.path[n].instance){t=u.path[n];break}var i=t&&t!==u.root?t.instance:document,r=i.querySelector('[data-projection-id="'.concat(e,'"]'));r&&u.mount(r,!0)}function ODe(u){u.min=Math.round(u.min),u.max=Math.round(u.max)}function jDe(u){ODe(u.x),ODe(u.y)}var OTu=SRe({attachResizeListener:function(u,e){return pO(u,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),O$={current:void 0},jTu=SRe({measureScroll:function(u){return{x:u.scrollLeft,y:u.scrollTop}},defaultParent:function(){if(!O$.current){var u=new OTu(0,{});u.mount(window),u.setOptions({layoutScroll:!0}),O$.current=u}return O$.current},resetTransform:function(u,e){u.style.transform=e??"none"},checkIsScrollRoot:function(u){return window.getComputedStyle(u).position==="fixed"}}),HTu=Ke(Ke(Ke(Ke({},kMu),Ozu),KMu),ETu),BRe=Lwu(function(u,e){return pLu(u,e,HTu,sTu,jTu)}),wRe=C.createContext(null);function VTu(u,e,t,n){if(!n)return u;var i=u.findIndex(function(c){return c.value===e});if(i===-1)return u;var r=n>0?1:-1,a=u[i+r];if(!a)return u;var o=u[i],s=a.layout,l=ir(s.min,s.max,.5);return r===1&&o.layout.max+t>l||r===-1&&o.layout.min+t{const{__scopeTooltip:e,delayDuration:t=uNu,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:r}=u,[a,o]=C.useState(!0),s=C.useRef(!1),l=C.useRef(0);return C.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),C.createElement(nNu,{scope:e,isOpenDelayed:a,delayDuration:t,onOpen:C.useCallback(()=>{window.clearTimeout(l.current),o(!1)},[]),onClose:C.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o(!0),n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:C.useCallback(c=>{s.current=c},[]),disableHoverableContent:i},r)},Mie="Tooltip",[rNu,C7]=CO(Mie),aNu=u=>{const{__scopeTooltip:e,children:t,open:n,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:a,delayDuration:o}=u,s=zie(Mie,u.__scopeTooltip),l=Lie(e),[c,d]=C.useState(null),h=C3(),E=C.useRef(0),m=a??s.disableHoverableContent,g=o??s.delayDuration,f=C.useRef(!1),[p=!1,D]=XI({prop:n,defaultProp:i,onChange:F=>{F?(s.onOpen(),document.dispatchEvent(new CustomEvent(jY))):s.onClose(),r==null||r(F)}}),x=C.useMemo(()=>p?f.current?"delayed-open":"instant-open":"closed",[p]),b=C.useCallback(()=>{window.clearTimeout(E.current),f.current=!1,D(!0)},[D]),k=C.useCallback(()=>{window.clearTimeout(E.current),D(!1)},[D]),A=C.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{f.current=!0,D(!0)},g)},[g,D]);return C.useEffect(()=>()=>window.clearTimeout(E.current),[]),C.createElement(wNe,l,C.createElement(rNu,{scope:e,contentId:h,open:p,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:C.useCallback(()=>{s.isOpenDelayed?A():b()},[s.isOpenDelayed,A,b]),onTriggerLeave:C.useCallback(()=>{m?k():window.clearTimeout(E.current)},[k,m]),onOpen:b,onClose:k,disableHoverableContent:m},t))},$De="TooltipTrigger",oNu=C.forwardRef((u,e)=>{const{__scopeTooltip:t,...n}=u,i=C7($De,t),r=zie($De,t),a=Lie(t),o=C.useRef(null),s=co(e,o,i.onTriggerChange),l=C.useRef(!1),c=C.useRef(!1),d=C.useCallback(()=>l.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),C.createElement(LNe,vt({asChild:!0},a),C.createElement($o.button,vt({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},n,{ref:s,onPointerMove:Gu(u.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Gu(u.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Gu(u.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Gu(u.onFocus,()=>{l.current||i.onOpen()}),onBlur:Gu(u.onBlur,i.onClose),onClick:Gu(u.onClick,i.onClose)})))}),MRe="TooltipPortal",[sNu,lNu]=CO(MRe,{forceMount:void 0}),cNu=u=>{const{__scopeTooltip:e,forceMount:t,children:n,container:i}=u,r=C7(MRe,e);return C.createElement(sNu,{scope:e,forceMount:t},C.createElement(Lg,{present:t||r.open},C.createElement(Qne,{asChild:!0,container:i},n)))},zy="TooltipContent",dNu=C.forwardRef((u,e)=>{const t=lNu(zy,u.__scopeTooltip),{forceMount:n=t.forceMount,side:i="top",...r}=u,a=C7(zy,u.__scopeTooltip);return C.createElement(Lg,{present:n||a.open},a.disableHoverableContent?C.createElement(TRe,vt({side:i},r,{ref:e})):C.createElement(hNu,vt({side:i},r,{ref:e})))}),hNu=C.forwardRef((u,e)=>{const t=C7(zy,u.__scopeTooltip),n=zie(zy,u.__scopeTooltip),i=C.useRef(null),r=co(e,i),[a,o]=C.useState(null),{trigger:s,onClose:l}=t,c=i.current,{onPointerInTransitChange:d}=n,h=C.useCallback(()=>{o(null),d(!1)},[d]),E=C.useCallback((m,g)=>{const f=m.currentTarget,p={x:m.clientX,y:m.clientY},D=mNu(p,f.getBoundingClientRect()),x=gNu(p,D),b=fNu(g.getBoundingClientRect()),k=DNu([...x,...b]);o(k),d(!0)},[d]);return C.useEffect(()=>()=>h(),[h]),C.useEffect(()=>{if(s&&c){const m=f=>E(f,c),g=f=>E(f,s);return s.addEventListener("pointerleave",m),c.addEventListener("pointerleave",g),()=>{s.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",g)}}},[s,c,E,h]),C.useEffect(()=>{if(a){const m=g=>{const f=g.target,p={x:g.clientX,y:g.clientY},D=(s==null?void 0:s.contains(f))||(c==null?void 0:c.contains(f)),x=!pNu(p,a);D?h():x&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[s,c,a,l,h]),C.createElement(TRe,vt({},u,{ref:r}))}),[ENu,lqn]=CO(Mie,{isInside:!1}),TRe=C.forwardRef((u,e)=>{const{__scopeTooltip:t,children:n,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:a,...o}=u,s=C7(zy,t),l=Lie(t),{onClose:c}=s;return C.useEffect(()=>(document.addEventListener(jY,c),()=>document.removeEventListener(jY,c)),[c]),C.useEffect(()=>{if(s.trigger){const d=h=>{const E=h.target;E!=null&&E.contains(s.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[s.trigger,c]),C.createElement(Yne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c},C.createElement(zNe,vt({"data-state":s.stateAttribute},l,o,{ref:e,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),C.createElement(iNe,null,n),C.createElement(ENu,{scope:t,isInside:!0},C.createElement(CNe,{id:s.contentId,role:"tooltip"},i||n))))});function mNu(u,e){const t=Math.abs(e.top-u.y),n=Math.abs(e.bottom-u.y),i=Math.abs(e.right-u.x),r=Math.abs(e.left-u.x);switch(Math.min(t,n,i,r)){case r:return"left";case i:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function gNu(u,e,t=5){const n=[];switch(e){case"top":n.push({x:u.x-t,y:u.y+t},{x:u.x+t,y:u.y+t});break;case"bottom":n.push({x:u.x-t,y:u.y-t},{x:u.x+t,y:u.y-t});break;case"left":n.push({x:u.x+t,y:u.y-t},{x:u.x+t,y:u.y+t});break;case"right":n.push({x:u.x-t,y:u.y-t},{x:u.x-t,y:u.y+t});break}return n}function fNu(u){const{top:e,right:t,bottom:n,left:i}=u;return[{x:i,y:e},{x:t,y:e},{x:t,y:n},{x:i,y:n}]}function pNu(u,e){const{x:t,y:n}=u;let i=!1;for(let r=0,a=e.length-1;rn!=c>n&&t<(l-o)*(n-s)/(c-s)+o&&(i=!i)}return i}function DNu(u){const e=u.slice();return e.sort((t,n)=>t.xn.x?1:t.yn.y?1:0),xNu(e)}function xNu(u){if(u.length<=1)return u.slice();const e=[];for(let n=0;n=2;){const r=e[e.length-1],a=e[e.length-2];if((r.x-a.x)*(i.y-a.y)>=(r.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let n=u.length-1;n>=0;n--){const i=u[n];for(;t.length>=2;){const r=t[t.length-1],a=t[t.length-2];if((r.x-a.x)*(i.y-a.y)>=(r.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const vNu=iNu,CNu=aNu,bNu=oNu,kNu=cNu,FNu=dNu;var yNu=Object.defineProperty,ANu=(u,e,t)=>e in u?yNu(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,j$=(u,e,t)=>(ANu(u,typeof e!="symbol"?e+"":e,t),t);let _Nu=class{constructor(){j$(this,"current",this.detect()),j$(this,"handoffState","pending"),j$(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},b3=new _Nu,M0=(u,e)=>{b3.isServer?C.useEffect(u,e):C.useLayoutEffect(u,e)};function b7(u){let e=C.useRef(u);return M0(()=>{e.current=u},[u]),e}function Tie(u,e){let[t,n]=C.useState(u),i=b7(u);return M0(()=>n(i.current),[i,n,...e]),t}function SNu(u){typeof queueMicrotask=="function"?queueMicrotask(u):Promise.resolve().then(u).catch(e=>setTimeout(()=>{throw e}))}function JT(){let u=[],e={addEventListener(t,n,i,r){return t.addEventListener(n,i,r),e.add(()=>t.removeEventListener(n,i,r))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return SNu(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,i){let r=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:i}),this.add(()=>{Object.assign(t.style,{[n]:r})})},group(t){let n=JT();return t(n),this.add(()=>n.dispose())},add(t){return u.push(t),()=>{let n=u.indexOf(t);if(n>=0)for(let i of u.splice(n,1))i()}},dispose(){for(let t of u.splice(0))t()}};return e}function Nie(){let[u]=C.useState(JT);return C.useEffect(()=>()=>u.dispose(),[u]),u}let pi=function(u){let e=b7(u);return M.useCallback((...t)=>e.current(...t),[e])};function BNu(){let u=typeof document>"u";return"useSyncExternalStore"in wm?(e=>e.useSyncExternalStore)(wm)(()=>()=>{},()=>!1,()=>!u):!1}function wNu(){let u=BNu(),[e,t]=C.useState(b3.isHandoffComplete);return e&&b3.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{e!==!0&&t(!0)},[e]),C.useEffect(()=>b3.handoff(),[]),u?!1:e}var KDe;let k7=(KDe=M.useId)!=null?KDe:function(){let u=wNu(),[e,t]=M.useState(u?()=>b3.nextId():null);return M0(()=>{e===null&&t(b3.nextId())},[e]),e!=null?""+e:void 0};function o4(u,e,...t){if(u in e){let i=e[u];return typeof i=="function"?i(...t):i}let n=new Error(`Tried to handle "${u}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,o4),n}function Pie(u){return b3.isServer?null:u instanceof Node?u.ownerDocument:u!=null&&u.hasOwnProperty("current")&&u.current instanceof Node?u.current.ownerDocument:document}let WDe=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(u=>`${u}:not([tabindex='-1'])`).join(",");var LNu=(u=>(u[u.First=1]="First",u[u.Previous=2]="Previous",u[u.Next=4]="Next",u[u.Last=8]="Last",u[u.WrapAround=16]="WrapAround",u[u.NoScroll=32]="NoScroll",u))(LNu||{}),zNu=(u=>(u[u.Error=0]="Error",u[u.Overflow=1]="Overflow",u[u.Success=2]="Success",u[u.Underflow=3]="Underflow",u))(zNu||{}),MNu=(u=>(u[u.Previous=-1]="Previous",u[u.Next=1]="Next",u))(MNu||{}),NRe=(u=>(u[u.Strict=0]="Strict",u[u.Loose=1]="Loose",u))(NRe||{});function TNu(u,e=0){var t;return u===((t=Pie(u))==null?void 0:t.body)?!1:o4(e,{0(){return u.matches(WDe)},1(){let n=u;for(;n!==null;){if(n.matches(WDe))return!0;n=n.parentElement}return!1}})}var NNu=(u=>(u[u.Keyboard=0]="Keyboard",u[u.Mouse=1]="Mouse",u))(NNu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",u=>{u.metaKey||u.altKey||u.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",u=>{u.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:u.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function PNu(u,e=t=>t){return u.slice().sort((t,n)=>{let i=e(t),r=e(n);if(i===null||r===null)return 0;let a=i.compareDocumentPosition(r);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vS(u,e,t){let n=b7(e);C.useEffect(()=>{function i(r){n.current(r)}return document.addEventListener(u,i,t),()=>document.removeEventListener(u,i,t)},[u,t])}function RNu(u,e,t){let n=b7(e);C.useEffect(()=>{function i(r){n.current(r)}return window.addEventListener(u,i,t),()=>window.removeEventListener(u,i,t)},[u,t])}function INu(u,e,t=!0){let n=C.useRef(!1);C.useEffect(()=>{requestAnimationFrame(()=>{n.current=t})},[t]);function i(a,o){if(!n.current||a.defaultPrevented)return;let s=o(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let l=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(u);for(let c of l){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||a.composed&&a.composedPath().includes(d))return}return!TNu(s,NRe.Loose)&&s.tabIndex!==-1&&a.preventDefault(),e(a,s)}let r=C.useRef(null);vS("pointerdown",a=>{var o,s;n.current&&(r.current=((s=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:s[0])||a.target)},!0),vS("mousedown",a=>{var o,s;n.current&&(r.current=((s=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:s[0])||a.target)},!0),vS("click",a=>{r.current&&(i(a,()=>r.current),r.current=null)},!0),vS("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),RNu("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function GDe(u){var e;if(u.type)return u.type;let t=(e=u.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function ONu(u,e){let[t,n]=C.useState(()=>GDe(u));return M0(()=>{n(GDe(u))},[u.type,u.as]),M0(()=>{t||e.current&&e.current instanceof HTMLButtonElement&&!e.current.hasAttribute("type")&&n("button")},[t,e]),t}let jNu=Symbol();function F7(...u){let e=C.useRef(u);C.useEffect(()=>{e.current=u},[u]);let t=pi(n=>{for(let i of e.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return u.every(n=>n==null||(n==null?void 0:n[jNu]))?void 0:t}function HNu({container:u,accept:e,walk:t,enabled:n=!0}){let i=C.useRef(e),r=C.useRef(t);C.useEffect(()=>{i.current=e,r.current=t},[e,t]),M0(()=>{if(!u||!n)return;let a=Pie(u);if(!a)return;let o=i.current,s=r.current,l=Object.assign(d=>o(d),{acceptNode:o}),c=a.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,l,!1);for(;c.nextNode();)s(c.currentNode)},[u,n,i,r])}function VNu(u){throw new Error("Unexpected object: "+u)}var Ja=(u=>(u[u.First=0]="First",u[u.Previous=1]="Previous",u[u.Next=2]="Next",u[u.Last=3]="Last",u[u.Specific=4]="Specific",u[u.Nothing=5]="Nothing",u))(Ja||{});function $Nu(u,e){let t=e.resolveItems();if(t.length<=0)return null;let n=e.resolveActiveIndex(),i=n??-1,r=(()=>{switch(u.focus){case 0:return t.findIndex(a=>!e.resolveDisabled(a));case 1:{let a=t.slice().reverse().findIndex((o,s,l)=>i!==-1&&l.length-s-1>=i?!1:!e.resolveDisabled(o));return a===-1?a:t.length-1-a}case 2:return t.findIndex((a,o)=>o<=i?!1:!e.resolveDisabled(a));case 3:{let a=t.slice().reverse().findIndex(o=>!e.resolveDisabled(o));return a===-1?a:t.length-1-a}case 4:return t.findIndex(a=>e.resolveId(a)===u.id);case 5:return null;default:VNu(u)}})();return r===-1?n:r}function UDe(...u){return Array.from(new Set(u.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}var HY=(u=>(u[u.None=0]="None",u[u.RenderStrategy=1]="RenderStrategy",u[u.Static=2]="Static",u))(HY||{}),KNu=(u=>(u[u.Unmount=0]="Unmount",u[u.Hidden=1]="Hidden",u))(KNu||{});function nD({ourProps:u,theirProps:e,slot:t,defaultTag:n,features:i,visible:r=!0,name:a}){let o=PRe(e,u);if(r)return CS(o,t,n,a);let s=i??0;if(s&2){let{static:l=!1,...c}=o;if(l)return CS(c,t,n,a)}if(s&1){let{unmount:l=!0,...c}=o;return o4(l?0:1,{0(){return null},1(){return CS({...c,hidden:!0,style:{display:"none"}},t,n,a)}})}return CS(o,t,n,a)}function CS(u,e={},t,n){let{as:i=t,children:r,refName:a="ref",...o}=H$(u,["unmount","static"]),s=u.ref!==void 0?{[a]:u.ref}:{},l=typeof r=="function"?r(e):r;"className"in o&&o.className&&typeof o.className=="function"&&(o.className=o.className(e));let c={};if(e){let d=!1,h=[];for(let[E,m]of Object.entries(e))typeof m=="boolean"&&(d=!0),m===!0&&h.push(E);d&&(c["data-headlessui-state"]=h.join(" "))}if(i===C.Fragment&&Object.keys(VY(o)).length>0){if(!C.isValidElement(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(o).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` -`));let d=l.props,h=typeof(d==null?void 0:d.className)=="function"?(...m)=>UDe(d==null?void 0:d.className(...m),o.className):UDe(d==null?void 0:d.className,o.className),E=h?{className:h}:{};return C.cloneElement(l,Object.assign({},PRe(l.props,VY(H$(o,["ref"]))),c,s,WNu(l.ref,s.ref),E))}return C.createElement(i,Object.assign({},H$(o,["ref"]),i!==C.Fragment&&s,i!==C.Fragment&&c),l)}function WNu(...u){return{ref:u.every(e=>e==null)?void 0:e=>{for(let t of u)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function PRe(...u){if(u.length===0)return{};if(u.length===1)return u[0];let e={},t={};for(let n of u)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(n[i])):e[i]=n[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(n=>[n,void 0])));for(let n in t)Object.assign(e,{[n](i,...r){let a=t[n];for(let o of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...r)}}});return e}function iD(u){var e;return Object.assign(C.forwardRef(u),{displayName:(e=u.displayName)!=null?e:u.name})}function VY(u){let e=Object.assign({},u);for(let t in e)e[t]===void 0&&delete e[t];return e}function H$(u,e=[]){let t=Object.assign({},u);for(let n of e)n in t&&delete t[n];return t}function GNu(u){let e=u.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let n=(e==null?void 0:e.getAttribute("disabled"))==="";return n&&UNu(t)?!1:n}function UNu(u){if(!u)return!1;let e=u.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}function RRe(u={},e=null,t=[]){for(let[n,i]of Object.entries(u))ORe(t,IRe(e,n),i);return t}function IRe(u,e){return u?u+"["+e+"]":e}function ORe(u,e,t){if(Array.isArray(t))for(let[n,i]of t.entries())ORe(u,IRe(e,n.toString()),i);else t instanceof Date?u.push([e,t.toISOString()]):typeof t=="boolean"?u.push([e,t?"1":"0"]):typeof t=="string"?u.push([e,t]):typeof t=="number"?u.push([e,`${t}`]):t==null?u.push([e,""]):RRe(t,e,u)}let qNu="div";var jRe=(u=>(u[u.None=1]="None",u[u.Focusable=2]="Focusable",u[u.Hidden=4]="Hidden",u))(jRe||{});function JNu(u,e){let{features:t=1,...n}=u,i={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return nD({ourProps:i,theirProps:n,slot:{},defaultTag:qNu,name:"Hidden"})}let ZNu=iD(JNu),Rie=C.createContext(null);Rie.displayName="OpenClosedContext";var My=(u=>(u[u.Open=1]="Open",u[u.Closed=2]="Closed",u[u.Closing=4]="Closing",u[u.Opening=8]="Opening",u))(My||{});function YNu(){return C.useContext(Rie)}function QNu({value:u,children:e}){return M.createElement(Rie.Provider,{value:u},e)}var d0=(u=>(u.Space=" ",u.Enter="Enter",u.Escape="Escape",u.Backspace="Backspace",u.Delete="Delete",u.ArrowLeft="ArrowLeft",u.ArrowUp="ArrowUp",u.ArrowRight="ArrowRight",u.ArrowDown="ArrowDown",u.Home="Home",u.End="End",u.PageUp="PageUp",u.PageDown="PageDown",u.Tab="Tab",u))(d0||{});function XNu(u,e,t){let[n,i]=C.useState(t),r=u!==void 0,a=C.useRef(r),o=C.useRef(!1),s=C.useRef(!1);return r&&!a.current&&!o.current?(o.current=!0,a.current=r,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!r&&a.current&&!s.current&&(s.current=!0,a.current=r,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[r?u:n,pi(l=>(r||i(l),e==null?void 0:e(l)))]}function qDe(u,e){let t=C.useRef([]),n=pi(u);C.useEffect(()=>{let i=[...t.current];for(let[r,a]of e.entries())if(t.current[r]!==a){let o=n(e,i);return t.current=e,o}},[n,...e])}function JDe(u){return[u.screenX,u.screenY]}function ePu(){let u=C.useRef([-1,-1]);return{wasMoved(e){let t=JDe(e);return u.current[0]===t[0]&&u.current[1]===t[1]?!1:(u.current=t,!0)},update(e){u.current=JDe(e)}}}function tPu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function uPu(){return/Android/gi.test(window.navigator.userAgent)}function nPu(){return tPu()||uPu()}function iPu(...u){return C.useMemo(()=>Pie(...u),[...u])}var rPu=(u=>(u[u.Open=0]="Open",u[u.Closed=1]="Closed",u))(rPu||{}),aPu=(u=>(u[u.Single=0]="Single",u[u.Multi=1]="Multi",u))(aPu||{}),oPu=(u=>(u[u.Pointer=0]="Pointer",u[u.Other=1]="Other",u))(oPu||{}),sPu=(u=>(u[u.OpenCombobox=0]="OpenCombobox",u[u.CloseCombobox=1]="CloseCombobox",u[u.GoToOption=2]="GoToOption",u[u.RegisterOption=3]="RegisterOption",u[u.UnregisterOption=4]="UnregisterOption",u[u.RegisterLabel=5]="RegisterLabel",u))(sPu||{});function V$(u,e=t=>t){let t=u.activeOptionIndex!==null?u.options[u.activeOptionIndex]:null,n=PNu(e(u.options.slice()),r=>r.dataRef.current.domRef.current),i=t?n.indexOf(t):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let lPu={1(u){var e;return(e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===1?u:{...u,activeOptionIndex:null,comboboxState:1}},0(u){var e;if((e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===0)return u;let t=u.activeOptionIndex;if(u.dataRef.current){let{isSelected:n}=u.dataRef.current,i=u.options.findIndex(r=>n(r.dataRef.current.value));i!==-1&&(t=i)}return{...u,comboboxState:0,activeOptionIndex:t}},2(u,e){var t,n,i,r;if((t=u.dataRef.current)!=null&&t.disabled||(n=u.dataRef.current)!=null&&n.optionsRef.current&&!((i=u.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&u.comboboxState===1)return u;let a=V$(u);if(a.activeOptionIndex===null){let s=a.options.findIndex(l=>!l.dataRef.current.disabled);s!==-1&&(a.activeOptionIndex=s)}let o=$Nu(e,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...u,...a,activeOptionIndex:o,activationTrigger:(r=e.trigger)!=null?r:1}},3:(u,e)=>{var t,n;let i={id:e.id,dataRef:e.dataRef},r=V$(u,o=>[...o,i]);u.activeOptionIndex===null&&(t=u.dataRef.current)!=null&&t.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(i));let a={...u,...r,activationTrigger:1};return(n=u.dataRef.current)!=null&&n.__demoMode&&u.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(u,e)=>{let t=V$(u,n=>{let i=n.findIndex(r=>r.id===e.id);return i!==-1&&n.splice(i,1),n});return{...u,...t,activationTrigger:1}},5:(u,e)=>({...u,labelId:e.id})},Iie=C.createContext(null);Iie.displayName="ComboboxActionsContext";function y7(u){let e=C.useContext(Iie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,y7),t}return e}let Oie=C.createContext(null);Oie.displayName="ComboboxDataContext";function G6(u){let e=C.useContext(Oie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,G6),t}return e}function cPu(u,e){return o4(e.type,lPu,u,e)}let dPu=C.Fragment;function hPu(u,e){let{value:t,defaultValue:n,onChange:i,form:r,name:a,by:o=(X,re)=>X===re,disabled:s=!1,__demoMode:l=!1,nullable:c=!1,multiple:d=!1,...h}=u,[E=d?[]:void 0,m]=XNu(t,i,n),[g,f]=C.useReducer(cPu,{dataRef:C.createRef(),comboboxState:l?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),p=C.useRef(!1),D=C.useRef({static:!1,hold:!1}),x=C.useRef(null),b=C.useRef(null),k=C.useRef(null),A=C.useRef(null),F=pi(typeof o=="string"?(X,re)=>{let ge=o;return(X==null?void 0:X[ge])===(re==null?void 0:re[ge])}:o),S=C.useCallback(X=>o4(w.mode,{1:()=>E.some(re=>F(re,X)),0:()=>F(E,X)}),[E]),w=C.useMemo(()=>({...g,optionsPropsRef:D,labelRef:x,inputRef:b,buttonRef:k,optionsRef:A,value:E,defaultValue:n,disabled:s,mode:d?1:0,get activeOptionIndex(){if(p.current&&g.activeOptionIndex===null&&g.options.length>0){let X=g.options.findIndex(re=>!re.dataRef.current.disabled);if(X!==-1)return X}return g.activeOptionIndex},compare:F,isSelected:S,nullable:c,__demoMode:l}),[E,n,s,d,c,l,g]),z=C.useRef(w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null);C.useEffect(()=>{let X=w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null;z.current!==X&&(z.current=X)}),z0(()=>{g.dataRef.current=w},[w]),INu([w.buttonRef,w.inputRef,w.optionsRef],()=>V.closeCombobox(),w.comboboxState===0);let N=C.useMemo(()=>({open:w.comboboxState===0,disabled:s,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.options[w.activeOptionIndex].dataRef.current.value,value:E}),[w,s,E]),O=pi(X=>{let re=w.options.find(ge=>ge.id===X);re&&H(re.dataRef.current.value)}),y=pi(()=>{if(w.activeOptionIndex!==null){let{dataRef:X,id:re}=w.options[w.activeOptionIndex];H(X.current.value),V.goToOption(Ja.Specific,re)}}),_=pi(()=>{f({type:0}),p.current=!0}),L=pi(()=>{f({type:1}),p.current=!1}),T=pi((X,re,ge)=>(p.current=!1,X===Ja.Specific?f({type:2,focus:Ja.Specific,id:re,trigger:ge}):f({type:2,focus:X,trigger:ge}))),R=pi((X,re)=>(f({type:3,id:X,dataRef:re}),()=>{var ge;((ge=z.current)==null?void 0:ge.id)===X&&(p.current=!0),f({type:4,id:X})})),I=pi(X=>(f({type:5,id:X}),()=>f({type:5,id:null}))),H=pi(X=>o4(w.mode,{0(){return m==null?void 0:m(X)},1(){let re=w.value.slice(),ge=re.findIndex(_e=>F(_e,X));return ge===-1?re.push(X):re.splice(ge,1),m==null?void 0:m(re)}})),V=C.useMemo(()=>({onChange:H,registerOption:R,registerLabel:I,goToOption:T,closeCombobox:L,openCombobox:_,selectActiveOption:y,selectOption:O}),[]),U=e===null?{}:{ref:e},J=C.useRef(null),Y=Nie();return C.useEffect(()=>{J.current&&n!==void 0&&Y.addEventListener(J.current,"reset",()=>{m==null||m(n)})},[J,m]),M.createElement(Iie.Provider,{value:V},M.createElement(Oie.Provider,{value:w},M.createElement(QNu,{value:o4(w.comboboxState,{0:My.Open,1:My.Closed})},a!=null&&E!=null&&RRe({[a]:E}).map(([X,re],ge)=>M.createElement(ZNu,{features:jRe.Hidden,ref:ge===0?_e=>{var Ve;J.current=(Ve=_e==null?void 0:_e.closest("form"))!=null?Ve:null}:void 0,...VY({key:X,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,name:X,value:re})})),nD({ourProps:U,theirProps:h,slot:N,defaultTag:dPu,name:"Combobox"}))))}let EPu="input";function mPu(u,e){var t,n,i,r;let a=k7(),{id:o=`headlessui-combobox-input-${a}`,onChange:s,displayValue:l,type:c="text",...d}=u,h=G6("Combobox.Input"),E=y7("Combobox.Input"),m=F7(h.inputRef,e),g=iPu(h.inputRef),f=C.useRef(!1),p=Nie(),D=pi(()=>{E.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),E.goToOption(Ja.Nothing)}),x=function(){var y;return typeof l=="function"&&h.value!==void 0?(y=l(h.value))!=null?y:"":typeof h.value=="string"?h.value:""}();qDe(([y,_],[L,T])=>{if(f.current)return;let R=h.inputRef.current;R&&((T===0&&_===1||y!==L)&&(R.value=y),requestAnimationFrame(()=>{if(f.current||!R||(g==null?void 0:g.activeElement)!==R)return;let{selectionStart:I,selectionEnd:H}=R;Math.abs((H??0)-(I??0))===0&&I===0&&R.setSelectionRange(R.value.length,R.value.length)}))},[x,h.comboboxState,g]),qDe(([y],[_])=>{if(y===0&&_===1){if(f.current)return;let L=h.inputRef.current;if(!L)return;let T=L.value,{selectionStart:R,selectionEnd:I,selectionDirection:H}=L;L.value="",L.value=T,H!==null?L.setSelectionRange(R,I,H):L.setSelectionRange(R,I)}},[h.comboboxState]);let b=C.useRef(!1),k=pi(()=>{b.current=!0}),A=pi(()=>{p.nextFrame(()=>{b.current=!1})}),F=pi(y=>{switch(f.current=!0,y.key){case d0.Enter:if(f.current=!1,h.comboboxState!==0||b.current)return;if(y.preventDefault(),y.stopPropagation(),h.activeOptionIndex===null){E.closeCombobox();return}E.selectActiveOption(),h.mode===0&&E.closeCombobox();break;case d0.ArrowDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Next)},1:()=>{E.openCombobox()}});case d0.ArrowUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Previous)},1:()=>{E.openCombobox(),p.nextFrame(()=>{h.value||E.goToOption(Ja.Last)})}});case d0.Home:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case d0.PageUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case d0.End:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case d0.PageDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case d0.Escape:return f.current=!1,h.comboboxState!==0?void 0:(y.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&y.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&D(),E.closeCombobox());case d0.Tab:if(f.current=!1,h.comboboxState!==0)return;h.mode===0&&E.selectActiveOption(),E.closeCombobox();break}}),S=pi(y=>{s==null||s(y),h.nullable&&h.mode===0&&y.target.value===""&&D(),E.openCombobox()}),w=pi(()=>{f.current=!1}),z=Tie(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),N=C.useMemo(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),O={ref:m,id:o,role:"combobox",type:c,"aria-controls":(t=h.optionsRef.current)==null?void 0:t.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null||(n=h.options[h.activeOptionIndex])==null?void 0:n.id,"aria-labelledby":z,"aria-autocomplete":"list",defaultValue:(r=(i=u.defaultValue)!=null?i:h.defaultValue!==void 0?l==null?void 0:l(h.defaultValue):null)!=null?r:h.defaultValue,disabled:h.disabled,onCompositionStart:k,onCompositionEnd:A,onKeyDown:F,onChange:S,onBlur:w};return nD({ourProps:O,theirProps:d,slot:N,defaultTag:EPu,name:"Combobox.Input"})}let gPu="button";function fPu(u,e){var t;let n=G6("Combobox.Button"),i=y7("Combobox.Button"),r=F7(n.buttonRef,e),a=k7(),{id:o=`headlessui-combobox-button-${a}`,...s}=u,l=Nie(),c=pi(g=>{switch(g.key){case d0.ArrowDown:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&i.openCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case d0.ArrowUp:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&(i.openCombobox(),l.nextFrame(()=>{n.value||i.goToOption(Ja.Last)})),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case d0.Escape:return n.comboboxState!==0?void 0:(g.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&g.stopPropagation(),i.closeCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}));default:return}}),d=pi(g=>{if(GNu(g.currentTarget))return g.preventDefault();n.comboboxState===0?i.closeCombobox():(g.preventDefault(),i.openCombobox()),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})})}),h=Tie(()=>{if(n.labelId)return[n.labelId,o].join(" ")},[n.labelId,o]),E=C.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),m={ref:r,id:o,type:ONu(u,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=n.optionsRef.current)==null?void 0:t.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":h,disabled:n.disabled,onClick:d,onKeyDown:c};return nD({ourProps:m,theirProps:s,slot:E,defaultTag:gPu,name:"Combobox.Button"})}let pPu="label";function DPu(u,e){let t=k7(),{id:n=`headlessui-combobox-label-${t}`,...i}=u,r=G6("Combobox.Label"),a=y7("Combobox.Label"),o=F7(r.labelRef,e);z0(()=>a.registerLabel(n),[n]);let s=pi(()=>{var c;return(c=r.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),l=C.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled}),[r]);return nD({ourProps:{ref:o,id:n,onClick:s},theirProps:i,slot:l,defaultTag:pPu,name:"Combobox.Label"})}let xPu="ul",vPu=HY.RenderStrategy|HY.Static;function CPu(u,e){let t=k7(),{id:n=`headlessui-combobox-options-${t}`,hold:i=!1,...r}=u,a=G6("Combobox.Options"),o=F7(a.optionsRef,e),s=YNu(),l=(()=>s!==null?(s&My.Open)===My.Open:a.comboboxState===0)();z0(()=>{var E;a.optionsPropsRef.current.static=(E=u.static)!=null?E:!1},[a.optionsPropsRef,u.static]),z0(()=>{a.optionsPropsRef.current.hold=i},[a.optionsPropsRef,i]),HNu({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(E){return E.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let c=Tie(()=>{var E,m;return(m=a.labelId)!=null?m:(E=a.buttonRef.current)==null?void 0:E.id},[a.labelId,a.buttonRef.current]),d=C.useMemo(()=>({open:a.comboboxState===0}),[a]),h={"aria-labelledby":c,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:o};return nD({ourProps:h,theirProps:r,slot:d,defaultTag:xPu,features:vPu,visible:l,name:"Combobox.Options"})}let bPu="li";function kPu(u,e){var t,n;let i=k7(),{id:r=`headlessui-combobox-option-${i}`,disabled:a=!1,value:o,...s}=u,l=G6("Combobox.Option"),c=y7("Combobox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,h=l.isSelected(o),E=C.useRef(null),m=b7({disabled:a,value:o,domRef:E,textValue:(n=(t=E.current)==null?void 0:t.textContent)==null?void 0:n.toLowerCase()}),g=F7(e,E),f=pi(()=>c.selectOption(r));z0(()=>c.registerOption(r,m),[m,r]);let p=C.useRef(!l.__demoMode);z0(()=>{if(!l.__demoMode)return;let w=JT();return w.requestAnimationFrame(()=>{p.current=!0}),w.dispose},[]),z0(()=>{if(l.comboboxState!==0||!d||!p.current||l.activationTrigger===0)return;let w=JT();return w.requestAnimationFrame(()=>{var z,N;(N=(z=E.current)==null?void 0:z.scrollIntoView)==null||N.call(z,{block:"nearest"})}),w.dispose},[E,d,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let D=pi(w=>{if(a)return w.preventDefault();f(),l.mode===0&&c.closeCombobox(),nPu()||requestAnimationFrame(()=>{var z;return(z=l.inputRef.current)==null?void 0:z.focus()})}),x=pi(()=>{if(a)return c.goToOption(Ja.Nothing);c.goToOption(Ja.Specific,r)}),b=ePu(),k=pi(w=>b.update(w)),A=pi(w=>{b.wasMoved(w)&&(a||d||c.goToOption(Ja.Specific,r,0))}),F=pi(w=>{b.wasMoved(w)&&(a||d&&(l.optionsPropsRef.current.hold||c.goToOption(Ja.Nothing)))}),S=C.useMemo(()=>({active:d,selected:h,disabled:a}),[d,h,a]);return nD({ourProps:{id:r,ref:g,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:D,onFocus:x,onPointerEnter:k,onMouseEnter:k,onPointerMove:A,onMouseMove:A,onPointerLeave:F,onMouseLeave:F},theirProps:s,slot:S,defaultTag:bPu,name:"Combobox.Option"})}let FPu=iD(hPu),yPu=iD(fPu),APu=iD(mPu),_Pu=iD(DPu),SPu=iD(CPu),BPu=iD(kPu),HD=Object.assign(FPu,{Input:APu,Button:yPu,Label:_Pu,Options:SPu,Option:BPu});var wPu=Object.defineProperty,Fe=(u,e)=>wPu(u,"name",{value:e,configurable:!0});function Mg(u){const e=C.createContext(null);return e.displayName=u,e}Fe(Mg,"createNullableContext");function Tg(u){function e(t){var n;const i=C.useContext(u);if(i===null&&t!=null&&t.nonNull)throw new Error(`Tried to use \`${((n=t.caller)==null?void 0:n.name)||e.caller.name}\` without the necessary context. Make sure to render the \`${u.displayName}Provider\` component higher up the tree.`);return i}return Fe(e,"useGivenContext"),Object.defineProperty(e,"name",{value:`use${u.displayName}`}),e}Fe(Tg,"createContextHook");const HRe=Mg("StorageContext");function VRe(u){const e=C.useRef(!0),[t,n]=C.useState(new nY(u.storage));return C.useEffect(()=>{e.current?e.current=!1:n(new nY(u.storage))},[u.storage]),B.jsx(HRe.Provider,{value:t,children:u.children})}Fe(VRe,"StorageContextProvider");const Ng=Tg(HRe),LPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),zPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),MPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),TPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),NPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),PPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),C.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),RPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),IPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),OPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),jPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),HPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),VPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),$Pu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),KPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),WPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),GPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),C.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),UPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),qPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),C.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),JPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),ZPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),C.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),YPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),QPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),XPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),C.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),eRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),C.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),tRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),uRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),nRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),iRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),rRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),aRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":e,...t},u===void 0?C.createElement("title",{id:e},"trash icon"):u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),oRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),sRu=Bn(LPu),lRu=Bn(zPu),cRu=Bn(MPu),dRu=Bn(TPu),jie=Bn(NPu),hRu=Bn(PPu),ERu=Bn(RPu),mRu=Bn(IPu),gRu=Bn(OPu),fRu=Bn(jPu),pRu=Bn(HPu,"filled docs icon"),DRu=Bn(VPu),xRu=Bn($Pu),vRu=Bn(KPu),CRu=Bn(WPu),bRu=Bn(GPu),kRu=Bn(UPu),FRu=Bn(qPu),yRu=Bn(JPu),ARu=Bn(ZPu),_Ru=Bn(YPu),SRu=Bn(QPu),BRu=Bn(XPu),wRu=Bn(eRu),LRu=Bn(tRu),zRu=Bn(uRu),MRu=Bn(nRu,"filled star icon"),TRu=Bn(iRu),NRu=Bn(rRu),PRu=Bn(aRu,"trash icon"),bS=Bn(oRu);function Bn(u,e=u.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return u.defaultProps={title:e},u}Fe(Bn,"generateIcon");const la=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)}));la.displayName="UnStyledButton";const Ac=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[u.state],u.className)}));Ac.displayName="Button";const $Y=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-button-group",u.className)}));$Y.displayName="ButtonGroup";const A7=Fe((u,e)=>Object.entries(e).reduce((t,[n,i])=>(t[n]=i,t),u),"createComponentGroup"),$Re=C.forwardRef((u,e)=>B.jsx(ZZt,{asChild:!0,children:B.jsxs(la,{...u,ref:e,type:"button",className:Ha("graphiql-dialog-close",u.className),children:[B.jsx(CNe,{children:"Close dialog"}),B.jsx(jie,{})]})}));$Re.displayName="Dialog.Close";function KRe({children:u,...e}){return B.jsx($Zt,{...e,children:B.jsxs(WZt,{children:[B.jsx(GZt,{className:"graphiql-dialog-overlay"}),B.jsx(UZt,{className:"graphiql-dialog",children:u})]})})}Fe(KRe,"DialogRoot");const VD=A7(KRe,{Close:$Re,Title:qZt,Trigger:KZt,Description:JZt}),WRe=C.forwardRef((u,e)=>B.jsx(EQt,{asChild:!0,children:B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)})}));WRe.displayName="DropdownMenuButton";function GRe({children:u,align:e="start",sideOffset:t=5,className:n,...i}){return B.jsx(mQt,{children:B.jsx(gQt,{align:e,sideOffset:t,className:Ha("graphiql-dropdown-content",n),...i,children:u})})}Fe(GRe,"Content");const RRu=Fe(({className:u,children:e,...t})=>B.jsx(fQt,{className:Ha("graphiql-dropdown-item",u),...t,children:e}),"Item"),GE=A7(hQt,{Button:WRe,Item:RRu,Content:GRe}),ZT=new lwu({breaks:!0,linkify:!0}),V1=C.forwardRef(({children:u,onlyShowFirstChild:e,type:t,...n},i)=>B.jsx("div",{...n,ref:i,className:Ha(`graphiql-markdown-${t}`,e&&"graphiql-markdown-preview",n.className),dangerouslySetInnerHTML:{__html:ZT.render(u)}}));V1.displayName="MarkdownContent";const Hie=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-spinner",u.className)}));Hie.displayName="Spinner";function URe({children:u,align:e="start",side:t="bottom",sideOffset:n=5,label:i}){return B.jsxs(CNu,{children:[B.jsx(bNu,{asChild:!0,children:u}),B.jsx(kNu,{children:B.jsx(FNu,{className:"graphiql-tooltip",align:e,side:t,sideOffset:n,children:i})})]})}Fe(URe,"TooltipRoot");const Ao=A7(URe,{Provider:vNu}),qRe=C.forwardRef(({isActive:u,value:e,children:t,className:n,...i},r)=>B.jsx(zRe.Item,{...i,ref:r,value:e,"aria-selected":u?"true":void 0,role:"tab",className:Ha("graphiql-tab",u&&"graphiql-tab-active",n),children:t}));qRe.displayName="Tab";const JRe=C.forwardRef((u,e)=>B.jsx(la,{...u,ref:e,type:"button",className:Ha("graphiql-tab-button",u.className),children:u.children}));JRe.displayName="Tab.Button";const ZRe=C.forwardRef((u,e)=>B.jsx(Ao,{label:"Close Tab",children:B.jsx(la,{"aria-label":"Close Tab",...u,ref:e,type:"button",className:Ha("graphiql-tab-close",u.className),children:B.jsx(jie,{})})}));ZRe.displayName="Tab.Close";const $$=A7(qRe,{Button:JRe,Close:ZRe}),YRe=C.forwardRef(({values:u,onReorder:e,children:t,className:n,...i},r)=>B.jsx(zRe.Group,{...i,ref:r,values:u,onReorder:e,axis:"x",role:"tablist",className:Ha("graphiql-tabs",n),children:t}));YRe.displayName="Tabs";const QRe=Mg("HistoryContext");function XRe(u){var e;const t=Ng(),n=C.useRef(new Oqt(t||new nY(null),u.maxHistoryLength||IRu)),[i,r]=C.useState(((e=n.current)==null?void 0:e.queries)||[]),a=C.useCallback(h=>{var E;(E=n.current)==null||E.updateHistory(h),r(n.current.queries)},[]),o=C.useCallback((h,E)=>{n.current.editLabel(h,E),r(n.current.queries)},[]),s=C.useCallback(h=>{n.current.toggleFavorite(h),r(n.current.queries)},[]),l=C.useCallback(h=>h,[]),c=C.useCallback((h,E=!1)=>{n.current.deleteHistory(h,E),r(n.current.queries)},[]),d=C.useMemo(()=>({addToHistory:a,editLabel:o,items:i,toggleFavorite:s,setActive:l,deleteFromHistory:c}),[a,o,i,s,l,c]);return B.jsx(QRe.Provider,{value:d,children:u.children})}Fe(XRe,"HistoryContextProvider");const bO=Tg(QRe),IRu=20;function eIe(){const{items:u,deleteFromHistory:e}=bO({nonNull:!0});let t=u.slice().map((o,s)=>({...o,index:s})).reverse();const n=t.filter(o=>o.favorite);n.length&&(t=t.filter(o=>!o.favorite));const[i,r]=C.useState(null);C.useEffect(()=>{i&&setTimeout(()=>{r(null)},2e3)},[i]);const a=C.useCallback(()=>{try{for(const o of t)e(o,!0);r("success")}catch{r("error")}},[e,t]);return B.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[B.jsxs("div",{className:"graphiql-history-header",children:["History",(i||t.length>0)&&B.jsx(Ac,{type:"button",state:i||void 0,disabled:!t.length,onClick:a,children:{success:"Cleared",error:"Failed to Clear"}[i]||"Clear"})]}),!!n.length&&B.jsx("ul",{className:"graphiql-history-items",children:n.map(o=>B.jsx(Ty,{item:o},o.index))}),!!n.length&&!!t.length&&B.jsx("div",{className:"graphiql-history-item-spacer"}),!!t.length&&B.jsx("ul",{className:"graphiql-history-items",children:t.map(o=>B.jsx(Ty,{item:o},o.index))})]})}Fe(eIe,"History");function Ty(u){const{editLabel:e,toggleFavorite:t,deleteFromHistory:n,setActive:i}=bO({nonNull:!0,caller:Ty}),{headerEditor:r,queryEditor:a,variableEditor:o}=Ko({nonNull:!0,caller:Ty}),s=C.useRef(null),l=C.useRef(null),[c,d]=C.useState(!1);C.useEffect(()=>{var x;c&&((x=s.current)==null||x.focus())},[c]);const h=u.item.label||u.item.operationName||tIe(u.item.query),E=C.useCallback(()=>{var x;d(!1);const{index:b,...k}=u.item;e({...k,label:(x=s.current)==null?void 0:x.value},b)},[e,u.item]),m=C.useCallback(()=>{d(!1)},[]),g=C.useCallback(x=>{x.stopPropagation(),d(!0)},[]),f=C.useCallback(()=>{const{query:x,variables:b,headers:k}=u.item;a==null||a.setValue(x??""),o==null||o.setValue(b??""),r==null||r.setValue(k??""),i(u.item)},[r,u.item,a,i,o]),p=C.useCallback(x=>{x.stopPropagation(),n(u.item)},[u.item,n]),D=C.useCallback(x=>{x.stopPropagation(),t(u.item)},[u.item,t]);return B.jsx("li",{className:Ha("graphiql-history-item",c&&"editable"),children:c?B.jsxs(B.Fragment,{children:[B.jsx("input",{type:"text",defaultValue:u.item.label,ref:s,onKeyDown:x=>{x.key==="Esc"?d(!1):x.key==="Enter"&&(d(!1),e({...u.item,label:x.currentTarget.value}))},placeholder:"Type a label"}),B.jsx(la,{type:"button",ref:l,onClick:E,children:"Save"}),B.jsx(la,{type:"button",ref:l,onClick:m,children:B.jsx(jie,{})})]}):B.jsxs(B.Fragment,{children:[B.jsx(Ao,{label:"Set active",children:B.jsx(la,{type:"button",className:"graphiql-history-item-label",onClick:f,"aria-label":"Set active",children:h})}),B.jsx(Ao,{label:"Edit label",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:g,"aria-label":"Edit label",children:B.jsx(ARu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:u.item.favorite?"Remove favorite":"Add favorite",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:D,"aria-label":u.item.favorite?"Remove favorite":"Add favorite",children:u.item.favorite?B.jsx(MRu,{"aria-hidden":"true"}):B.jsx(TRu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:"Delete from history",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:p,"aria-label":"Delete from history",children:B.jsx(PRu,{"aria-hidden":"true"})})})]})})}Fe(Ty,"HistoryItem");function tIe(u){return u==null?void 0:u.split(` +`));let d=l.props,h=typeof(d==null?void 0:d.className)=="function"?(...m)=>UDe(d==null?void 0:d.className(...m),o.className):UDe(d==null?void 0:d.className,o.className),E=h?{className:h}:{};return C.cloneElement(l,Object.assign({},PRe(l.props,VY(H$(o,["ref"]))),c,s,WNu(l.ref,s.ref),E))}return C.createElement(i,Object.assign({},H$(o,["ref"]),i!==C.Fragment&&s,i!==C.Fragment&&c),l)}function WNu(...u){return{ref:u.every(e=>e==null)?void 0:e=>{for(let t of u)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function PRe(...u){if(u.length===0)return{};if(u.length===1)return u[0];let e={},t={};for(let n of u)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(n[i])):e[i]=n[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(n=>[n,void 0])));for(let n in t)Object.assign(e,{[n](i,...r){let a=t[n];for(let o of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...r)}}});return e}function iD(u){var e;return Object.assign(C.forwardRef(u),{displayName:(e=u.displayName)!=null?e:u.name})}function VY(u){let e=Object.assign({},u);for(let t in e)e[t]===void 0&&delete e[t];return e}function H$(u,e=[]){let t=Object.assign({},u);for(let n of e)n in t&&delete t[n];return t}function GNu(u){let e=u.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let n=(e==null?void 0:e.getAttribute("disabled"))==="";return n&&UNu(t)?!1:n}function UNu(u){if(!u)return!1;let e=u.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}function RRe(u={},e=null,t=[]){for(let[n,i]of Object.entries(u))ORe(t,IRe(e,n),i);return t}function IRe(u,e){return u?u+"["+e+"]":e}function ORe(u,e,t){if(Array.isArray(t))for(let[n,i]of t.entries())ORe(u,IRe(e,n.toString()),i);else t instanceof Date?u.push([e,t.toISOString()]):typeof t=="boolean"?u.push([e,t?"1":"0"]):typeof t=="string"?u.push([e,t]):typeof t=="number"?u.push([e,`${t}`]):t==null?u.push([e,""]):RRe(t,e,u)}let qNu="div";var jRe=(u=>(u[u.None=1]="None",u[u.Focusable=2]="Focusable",u[u.Hidden=4]="Hidden",u))(jRe||{});function JNu(u,e){let{features:t=1,...n}=u,i={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return nD({ourProps:i,theirProps:n,slot:{},defaultTag:qNu,name:"Hidden"})}let ZNu=iD(JNu),Rie=C.createContext(null);Rie.displayName="OpenClosedContext";var My=(u=>(u[u.Open=1]="Open",u[u.Closed=2]="Closed",u[u.Closing=4]="Closing",u[u.Opening=8]="Opening",u))(My||{});function YNu(){return C.useContext(Rie)}function QNu({value:u,children:e}){return M.createElement(Rie.Provider,{value:u},e)}var h0=(u=>(u.Space=" ",u.Enter="Enter",u.Escape="Escape",u.Backspace="Backspace",u.Delete="Delete",u.ArrowLeft="ArrowLeft",u.ArrowUp="ArrowUp",u.ArrowRight="ArrowRight",u.ArrowDown="ArrowDown",u.Home="Home",u.End="End",u.PageUp="PageUp",u.PageDown="PageDown",u.Tab="Tab",u))(h0||{});function XNu(u,e,t){let[n,i]=C.useState(t),r=u!==void 0,a=C.useRef(r),o=C.useRef(!1),s=C.useRef(!1);return r&&!a.current&&!o.current?(o.current=!0,a.current=r,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!r&&a.current&&!s.current&&(s.current=!0,a.current=r,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[r?u:n,pi(l=>(r||i(l),e==null?void 0:e(l)))]}function qDe(u,e){let t=C.useRef([]),n=pi(u);C.useEffect(()=>{let i=[...t.current];for(let[r,a]of e.entries())if(t.current[r]!==a){let o=n(e,i);return t.current=e,o}},[n,...e])}function JDe(u){return[u.screenX,u.screenY]}function ePu(){let u=C.useRef([-1,-1]);return{wasMoved(e){let t=JDe(e);return u.current[0]===t[0]&&u.current[1]===t[1]?!1:(u.current=t,!0)},update(e){u.current=JDe(e)}}}function tPu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function uPu(){return/Android/gi.test(window.navigator.userAgent)}function nPu(){return tPu()||uPu()}function iPu(...u){return C.useMemo(()=>Pie(...u),[...u])}var rPu=(u=>(u[u.Open=0]="Open",u[u.Closed=1]="Closed",u))(rPu||{}),aPu=(u=>(u[u.Single=0]="Single",u[u.Multi=1]="Multi",u))(aPu||{}),oPu=(u=>(u[u.Pointer=0]="Pointer",u[u.Other=1]="Other",u))(oPu||{}),sPu=(u=>(u[u.OpenCombobox=0]="OpenCombobox",u[u.CloseCombobox=1]="CloseCombobox",u[u.GoToOption=2]="GoToOption",u[u.RegisterOption=3]="RegisterOption",u[u.UnregisterOption=4]="UnregisterOption",u[u.RegisterLabel=5]="RegisterLabel",u))(sPu||{});function V$(u,e=t=>t){let t=u.activeOptionIndex!==null?u.options[u.activeOptionIndex]:null,n=PNu(e(u.options.slice()),r=>r.dataRef.current.domRef.current),i=t?n.indexOf(t):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let lPu={1(u){var e;return(e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===1?u:{...u,activeOptionIndex:null,comboboxState:1}},0(u){var e;if((e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===0)return u;let t=u.activeOptionIndex;if(u.dataRef.current){let{isSelected:n}=u.dataRef.current,i=u.options.findIndex(r=>n(r.dataRef.current.value));i!==-1&&(t=i)}return{...u,comboboxState:0,activeOptionIndex:t}},2(u,e){var t,n,i,r;if((t=u.dataRef.current)!=null&&t.disabled||(n=u.dataRef.current)!=null&&n.optionsRef.current&&!((i=u.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&u.comboboxState===1)return u;let a=V$(u);if(a.activeOptionIndex===null){let s=a.options.findIndex(l=>!l.dataRef.current.disabled);s!==-1&&(a.activeOptionIndex=s)}let o=$Nu(e,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...u,...a,activeOptionIndex:o,activationTrigger:(r=e.trigger)!=null?r:1}},3:(u,e)=>{var t,n;let i={id:e.id,dataRef:e.dataRef},r=V$(u,o=>[...o,i]);u.activeOptionIndex===null&&(t=u.dataRef.current)!=null&&t.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(i));let a={...u,...r,activationTrigger:1};return(n=u.dataRef.current)!=null&&n.__demoMode&&u.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(u,e)=>{let t=V$(u,n=>{let i=n.findIndex(r=>r.id===e.id);return i!==-1&&n.splice(i,1),n});return{...u,...t,activationTrigger:1}},5:(u,e)=>({...u,labelId:e.id})},Iie=C.createContext(null);Iie.displayName="ComboboxActionsContext";function y7(u){let e=C.useContext(Iie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,y7),t}return e}let Oie=C.createContext(null);Oie.displayName="ComboboxDataContext";function G6(u){let e=C.useContext(Oie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,G6),t}return e}function cPu(u,e){return o4(e.type,lPu,u,e)}let dPu=C.Fragment;function hPu(u,e){let{value:t,defaultValue:n,onChange:i,form:r,name:a,by:o=(X,re)=>X===re,disabled:s=!1,__demoMode:l=!1,nullable:c=!1,multiple:d=!1,...h}=u,[E=d?[]:void 0,m]=XNu(t,i,n),[g,f]=C.useReducer(cPu,{dataRef:C.createRef(),comboboxState:l?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),p=C.useRef(!1),D=C.useRef({static:!1,hold:!1}),x=C.useRef(null),b=C.useRef(null),k=C.useRef(null),A=C.useRef(null),F=pi(typeof o=="string"?(X,re)=>{let ge=o;return(X==null?void 0:X[ge])===(re==null?void 0:re[ge])}:o),S=C.useCallback(X=>o4(w.mode,{1:()=>E.some(re=>F(re,X)),0:()=>F(E,X)}),[E]),w=C.useMemo(()=>({...g,optionsPropsRef:D,labelRef:x,inputRef:b,buttonRef:k,optionsRef:A,value:E,defaultValue:n,disabled:s,mode:d?1:0,get activeOptionIndex(){if(p.current&&g.activeOptionIndex===null&&g.options.length>0){let X=g.options.findIndex(re=>!re.dataRef.current.disabled);if(X!==-1)return X}return g.activeOptionIndex},compare:F,isSelected:S,nullable:c,__demoMode:l}),[E,n,s,d,c,l,g]),z=C.useRef(w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null);C.useEffect(()=>{let X=w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null;z.current!==X&&(z.current=X)}),M0(()=>{g.dataRef.current=w},[w]),INu([w.buttonRef,w.inputRef,w.optionsRef],()=>V.closeCombobox(),w.comboboxState===0);let N=C.useMemo(()=>({open:w.comboboxState===0,disabled:s,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.options[w.activeOptionIndex].dataRef.current.value,value:E}),[w,s,E]),O=pi(X=>{let re=w.options.find(ge=>ge.id===X);re&&H(re.dataRef.current.value)}),y=pi(()=>{if(w.activeOptionIndex!==null){let{dataRef:X,id:re}=w.options[w.activeOptionIndex];H(X.current.value),V.goToOption(Ja.Specific,re)}}),_=pi(()=>{f({type:0}),p.current=!0}),L=pi(()=>{f({type:1}),p.current=!1}),T=pi((X,re,ge)=>(p.current=!1,X===Ja.Specific?f({type:2,focus:Ja.Specific,id:re,trigger:ge}):f({type:2,focus:X,trigger:ge}))),R=pi((X,re)=>(f({type:3,id:X,dataRef:re}),()=>{var ge;((ge=z.current)==null?void 0:ge.id)===X&&(p.current=!0),f({type:4,id:X})})),I=pi(X=>(f({type:5,id:X}),()=>f({type:5,id:null}))),H=pi(X=>o4(w.mode,{0(){return m==null?void 0:m(X)},1(){let re=w.value.slice(),ge=re.findIndex(_e=>F(_e,X));return ge===-1?re.push(X):re.splice(ge,1),m==null?void 0:m(re)}})),V=C.useMemo(()=>({onChange:H,registerOption:R,registerLabel:I,goToOption:T,closeCombobox:L,openCombobox:_,selectActiveOption:y,selectOption:O}),[]),U=e===null?{}:{ref:e},J=C.useRef(null),Y=Nie();return C.useEffect(()=>{J.current&&n!==void 0&&Y.addEventListener(J.current,"reset",()=>{m==null||m(n)})},[J,m]),M.createElement(Iie.Provider,{value:V},M.createElement(Oie.Provider,{value:w},M.createElement(QNu,{value:o4(w.comboboxState,{0:My.Open,1:My.Closed})},a!=null&&E!=null&&RRe({[a]:E}).map(([X,re],ge)=>M.createElement(ZNu,{features:jRe.Hidden,ref:ge===0?_e=>{var Ve;J.current=(Ve=_e==null?void 0:_e.closest("form"))!=null?Ve:null}:void 0,...VY({key:X,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,name:X,value:re})})),nD({ourProps:U,theirProps:h,slot:N,defaultTag:dPu,name:"Combobox"}))))}let EPu="input";function mPu(u,e){var t,n,i,r;let a=k7(),{id:o=`headlessui-combobox-input-${a}`,onChange:s,displayValue:l,type:c="text",...d}=u,h=G6("Combobox.Input"),E=y7("Combobox.Input"),m=F7(h.inputRef,e),g=iPu(h.inputRef),f=C.useRef(!1),p=Nie(),D=pi(()=>{E.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),E.goToOption(Ja.Nothing)}),x=function(){var y;return typeof l=="function"&&h.value!==void 0?(y=l(h.value))!=null?y:"":typeof h.value=="string"?h.value:""}();qDe(([y,_],[L,T])=>{if(f.current)return;let R=h.inputRef.current;R&&((T===0&&_===1||y!==L)&&(R.value=y),requestAnimationFrame(()=>{if(f.current||!R||(g==null?void 0:g.activeElement)!==R)return;let{selectionStart:I,selectionEnd:H}=R;Math.abs((H??0)-(I??0))===0&&I===0&&R.setSelectionRange(R.value.length,R.value.length)}))},[x,h.comboboxState,g]),qDe(([y],[_])=>{if(y===0&&_===1){if(f.current)return;let L=h.inputRef.current;if(!L)return;let T=L.value,{selectionStart:R,selectionEnd:I,selectionDirection:H}=L;L.value="",L.value=T,H!==null?L.setSelectionRange(R,I,H):L.setSelectionRange(R,I)}},[h.comboboxState]);let b=C.useRef(!1),k=pi(()=>{b.current=!0}),A=pi(()=>{p.nextFrame(()=>{b.current=!1})}),F=pi(y=>{switch(f.current=!0,y.key){case h0.Enter:if(f.current=!1,h.comboboxState!==0||b.current)return;if(y.preventDefault(),y.stopPropagation(),h.activeOptionIndex===null){E.closeCombobox();return}E.selectActiveOption(),h.mode===0&&E.closeCombobox();break;case h0.ArrowDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Next)},1:()=>{E.openCombobox()}});case h0.ArrowUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Previous)},1:()=>{E.openCombobox(),p.nextFrame(()=>{h.value||E.goToOption(Ja.Last)})}});case h0.Home:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case h0.PageUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case h0.End:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case h0.PageDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case h0.Escape:return f.current=!1,h.comboboxState!==0?void 0:(y.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&y.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&D(),E.closeCombobox());case h0.Tab:if(f.current=!1,h.comboboxState!==0)return;h.mode===0&&E.selectActiveOption(),E.closeCombobox();break}}),S=pi(y=>{s==null||s(y),h.nullable&&h.mode===0&&y.target.value===""&&D(),E.openCombobox()}),w=pi(()=>{f.current=!1}),z=Tie(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),N=C.useMemo(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),O={ref:m,id:o,role:"combobox",type:c,"aria-controls":(t=h.optionsRef.current)==null?void 0:t.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null||(n=h.options[h.activeOptionIndex])==null?void 0:n.id,"aria-labelledby":z,"aria-autocomplete":"list",defaultValue:(r=(i=u.defaultValue)!=null?i:h.defaultValue!==void 0?l==null?void 0:l(h.defaultValue):null)!=null?r:h.defaultValue,disabled:h.disabled,onCompositionStart:k,onCompositionEnd:A,onKeyDown:F,onChange:S,onBlur:w};return nD({ourProps:O,theirProps:d,slot:N,defaultTag:EPu,name:"Combobox.Input"})}let gPu="button";function fPu(u,e){var t;let n=G6("Combobox.Button"),i=y7("Combobox.Button"),r=F7(n.buttonRef,e),a=k7(),{id:o=`headlessui-combobox-button-${a}`,...s}=u,l=Nie(),c=pi(g=>{switch(g.key){case h0.ArrowDown:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&i.openCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case h0.ArrowUp:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&(i.openCombobox(),l.nextFrame(()=>{n.value||i.goToOption(Ja.Last)})),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case h0.Escape:return n.comboboxState!==0?void 0:(g.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&g.stopPropagation(),i.closeCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}));default:return}}),d=pi(g=>{if(GNu(g.currentTarget))return g.preventDefault();n.comboboxState===0?i.closeCombobox():(g.preventDefault(),i.openCombobox()),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})})}),h=Tie(()=>{if(n.labelId)return[n.labelId,o].join(" ")},[n.labelId,o]),E=C.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),m={ref:r,id:o,type:ONu(u,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=n.optionsRef.current)==null?void 0:t.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":h,disabled:n.disabled,onClick:d,onKeyDown:c};return nD({ourProps:m,theirProps:s,slot:E,defaultTag:gPu,name:"Combobox.Button"})}let pPu="label";function DPu(u,e){let t=k7(),{id:n=`headlessui-combobox-label-${t}`,...i}=u,r=G6("Combobox.Label"),a=y7("Combobox.Label"),o=F7(r.labelRef,e);M0(()=>a.registerLabel(n),[n]);let s=pi(()=>{var c;return(c=r.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),l=C.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled}),[r]);return nD({ourProps:{ref:o,id:n,onClick:s},theirProps:i,slot:l,defaultTag:pPu,name:"Combobox.Label"})}let xPu="ul",vPu=HY.RenderStrategy|HY.Static;function CPu(u,e){let t=k7(),{id:n=`headlessui-combobox-options-${t}`,hold:i=!1,...r}=u,a=G6("Combobox.Options"),o=F7(a.optionsRef,e),s=YNu(),l=(()=>s!==null?(s&My.Open)===My.Open:a.comboboxState===0)();M0(()=>{var E;a.optionsPropsRef.current.static=(E=u.static)!=null?E:!1},[a.optionsPropsRef,u.static]),M0(()=>{a.optionsPropsRef.current.hold=i},[a.optionsPropsRef,i]),HNu({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(E){return E.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let c=Tie(()=>{var E,m;return(m=a.labelId)!=null?m:(E=a.buttonRef.current)==null?void 0:E.id},[a.labelId,a.buttonRef.current]),d=C.useMemo(()=>({open:a.comboboxState===0}),[a]),h={"aria-labelledby":c,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:o};return nD({ourProps:h,theirProps:r,slot:d,defaultTag:xPu,features:vPu,visible:l,name:"Combobox.Options"})}let bPu="li";function kPu(u,e){var t,n;let i=k7(),{id:r=`headlessui-combobox-option-${i}`,disabled:a=!1,value:o,...s}=u,l=G6("Combobox.Option"),c=y7("Combobox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,h=l.isSelected(o),E=C.useRef(null),m=b7({disabled:a,value:o,domRef:E,textValue:(n=(t=E.current)==null?void 0:t.textContent)==null?void 0:n.toLowerCase()}),g=F7(e,E),f=pi(()=>c.selectOption(r));M0(()=>c.registerOption(r,m),[m,r]);let p=C.useRef(!l.__demoMode);M0(()=>{if(!l.__demoMode)return;let w=JT();return w.requestAnimationFrame(()=>{p.current=!0}),w.dispose},[]),M0(()=>{if(l.comboboxState!==0||!d||!p.current||l.activationTrigger===0)return;let w=JT();return w.requestAnimationFrame(()=>{var z,N;(N=(z=E.current)==null?void 0:z.scrollIntoView)==null||N.call(z,{block:"nearest"})}),w.dispose},[E,d,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let D=pi(w=>{if(a)return w.preventDefault();f(),l.mode===0&&c.closeCombobox(),nPu()||requestAnimationFrame(()=>{var z;return(z=l.inputRef.current)==null?void 0:z.focus()})}),x=pi(()=>{if(a)return c.goToOption(Ja.Nothing);c.goToOption(Ja.Specific,r)}),b=ePu(),k=pi(w=>b.update(w)),A=pi(w=>{b.wasMoved(w)&&(a||d||c.goToOption(Ja.Specific,r,0))}),F=pi(w=>{b.wasMoved(w)&&(a||d&&(l.optionsPropsRef.current.hold||c.goToOption(Ja.Nothing)))}),S=C.useMemo(()=>({active:d,selected:h,disabled:a}),[d,h,a]);return nD({ourProps:{id:r,ref:g,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:D,onFocus:x,onPointerEnter:k,onMouseEnter:k,onPointerMove:A,onMouseMove:A,onPointerLeave:F,onMouseLeave:F},theirProps:s,slot:S,defaultTag:bPu,name:"Combobox.Option"})}let FPu=iD(hPu),yPu=iD(fPu),APu=iD(mPu),_Pu=iD(DPu),SPu=iD(CPu),BPu=iD(kPu),HD=Object.assign(FPu,{Input:APu,Button:yPu,Label:_Pu,Options:SPu,Option:BPu});var wPu=Object.defineProperty,Fe=(u,e)=>wPu(u,"name",{value:e,configurable:!0});function Mg(u){const e=C.createContext(null);return e.displayName=u,e}Fe(Mg,"createNullableContext");function Tg(u){function e(t){var n;const i=C.useContext(u);if(i===null&&t!=null&&t.nonNull)throw new Error(`Tried to use \`${((n=t.caller)==null?void 0:n.name)||e.caller.name}\` without the necessary context. Make sure to render the \`${u.displayName}Provider\` component higher up the tree.`);return i}return Fe(e,"useGivenContext"),Object.defineProperty(e,"name",{value:`use${u.displayName}`}),e}Fe(Tg,"createContextHook");const HRe=Mg("StorageContext");function VRe(u){const e=C.useRef(!0),[t,n]=C.useState(new nY(u.storage));return C.useEffect(()=>{e.current?e.current=!1:n(new nY(u.storage))},[u.storage]),B.jsx(HRe.Provider,{value:t,children:u.children})}Fe(VRe,"StorageContextProvider");const Ng=Tg(HRe),LPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),zPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),MPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),TPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),NPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),PPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),C.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),RPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),IPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),OPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),jPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),HPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),VPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),$Pu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),KPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),WPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),GPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),C.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),UPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),qPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),C.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),JPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),ZPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),C.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),YPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),QPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),XPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),C.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),eRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),C.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),tRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),uRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),nRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),iRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),rRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),aRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":e,...t},u===void 0?C.createElement("title",{id:e},"trash icon"):u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),oRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),sRu=Bn(LPu),lRu=Bn(zPu),cRu=Bn(MPu),dRu=Bn(TPu),jie=Bn(NPu),hRu=Bn(PPu),ERu=Bn(RPu),mRu=Bn(IPu),gRu=Bn(OPu),fRu=Bn(jPu),pRu=Bn(HPu,"filled docs icon"),DRu=Bn(VPu),xRu=Bn($Pu),vRu=Bn(KPu),CRu=Bn(WPu),bRu=Bn(GPu),kRu=Bn(UPu),FRu=Bn(qPu),yRu=Bn(JPu),ARu=Bn(ZPu),_Ru=Bn(YPu),SRu=Bn(QPu),BRu=Bn(XPu),wRu=Bn(eRu),LRu=Bn(tRu),zRu=Bn(uRu),MRu=Bn(nRu,"filled star icon"),TRu=Bn(iRu),NRu=Bn(rRu),PRu=Bn(aRu,"trash icon"),bS=Bn(oRu);function Bn(u,e=u.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return u.defaultProps={title:e},u}Fe(Bn,"generateIcon");const la=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)}));la.displayName="UnStyledButton";const Ac=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[u.state],u.className)}));Ac.displayName="Button";const $Y=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-button-group",u.className)}));$Y.displayName="ButtonGroup";const A7=Fe((u,e)=>Object.entries(e).reduce((t,[n,i])=>(t[n]=i,t),u),"createComponentGroup"),$Re=C.forwardRef((u,e)=>B.jsx(ZZt,{asChild:!0,children:B.jsxs(la,{...u,ref:e,type:"button",className:Ha("graphiql-dialog-close",u.className),children:[B.jsx(CNe,{children:"Close dialog"}),B.jsx(jie,{})]})}));$Re.displayName="Dialog.Close";function KRe({children:u,...e}){return B.jsx($Zt,{...e,children:B.jsxs(WZt,{children:[B.jsx(GZt,{className:"graphiql-dialog-overlay"}),B.jsx(UZt,{className:"graphiql-dialog",children:u})]})})}Fe(KRe,"DialogRoot");const VD=A7(KRe,{Close:$Re,Title:qZt,Trigger:KZt,Description:JZt}),WRe=C.forwardRef((u,e)=>B.jsx(EQt,{asChild:!0,children:B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)})}));WRe.displayName="DropdownMenuButton";function GRe({children:u,align:e="start",sideOffset:t=5,className:n,...i}){return B.jsx(mQt,{children:B.jsx(gQt,{align:e,sideOffset:t,className:Ha("graphiql-dropdown-content",n),...i,children:u})})}Fe(GRe,"Content");const RRu=Fe(({className:u,children:e,...t})=>B.jsx(fQt,{className:Ha("graphiql-dropdown-item",u),...t,children:e}),"Item"),GE=A7(hQt,{Button:WRe,Item:RRu,Content:GRe}),ZT=new lwu({breaks:!0,linkify:!0}),V1=C.forwardRef(({children:u,onlyShowFirstChild:e,type:t,...n},i)=>B.jsx("div",{...n,ref:i,className:Ha(`graphiql-markdown-${t}`,e&&"graphiql-markdown-preview",n.className),dangerouslySetInnerHTML:{__html:ZT.render(u)}}));V1.displayName="MarkdownContent";const Hie=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-spinner",u.className)}));Hie.displayName="Spinner";function URe({children:u,align:e="start",side:t="bottom",sideOffset:n=5,label:i}){return B.jsxs(CNu,{children:[B.jsx(bNu,{asChild:!0,children:u}),B.jsx(kNu,{children:B.jsx(FNu,{className:"graphiql-tooltip",align:e,side:t,sideOffset:n,children:i})})]})}Fe(URe,"TooltipRoot");const Ao=A7(URe,{Provider:vNu}),qRe=C.forwardRef(({isActive:u,value:e,children:t,className:n,...i},r)=>B.jsx(zRe.Item,{...i,ref:r,value:e,"aria-selected":u?"true":void 0,role:"tab",className:Ha("graphiql-tab",u&&"graphiql-tab-active",n),children:t}));qRe.displayName="Tab";const JRe=C.forwardRef((u,e)=>B.jsx(la,{...u,ref:e,type:"button",className:Ha("graphiql-tab-button",u.className),children:u.children}));JRe.displayName="Tab.Button";const ZRe=C.forwardRef((u,e)=>B.jsx(Ao,{label:"Close Tab",children:B.jsx(la,{"aria-label":"Close Tab",...u,ref:e,type:"button",className:Ha("graphiql-tab-close",u.className),children:B.jsx(jie,{})})}));ZRe.displayName="Tab.Close";const $$=A7(qRe,{Button:JRe,Close:ZRe}),YRe=C.forwardRef(({values:u,onReorder:e,children:t,className:n,...i},r)=>B.jsx(zRe.Group,{...i,ref:r,values:u,onReorder:e,axis:"x",role:"tablist",className:Ha("graphiql-tabs",n),children:t}));YRe.displayName="Tabs";const QRe=Mg("HistoryContext");function XRe(u){var e;const t=Ng(),n=C.useRef(new Oqt(t||new nY(null),u.maxHistoryLength||IRu)),[i,r]=C.useState(((e=n.current)==null?void 0:e.queries)||[]),a=C.useCallback(h=>{var E;(E=n.current)==null||E.updateHistory(h),r(n.current.queries)},[]),o=C.useCallback((h,E)=>{n.current.editLabel(h,E),r(n.current.queries)},[]),s=C.useCallback(h=>{n.current.toggleFavorite(h),r(n.current.queries)},[]),l=C.useCallback(h=>h,[]),c=C.useCallback((h,E=!1)=>{n.current.deleteHistory(h,E),r(n.current.queries)},[]),d=C.useMemo(()=>({addToHistory:a,editLabel:o,items:i,toggleFavorite:s,setActive:l,deleteFromHistory:c}),[a,o,i,s,l,c]);return B.jsx(QRe.Provider,{value:d,children:u.children})}Fe(XRe,"HistoryContextProvider");const bO=Tg(QRe),IRu=20;function eIe(){const{items:u,deleteFromHistory:e}=bO({nonNull:!0});let t=u.slice().map((o,s)=>({...o,index:s})).reverse();const n=t.filter(o=>o.favorite);n.length&&(t=t.filter(o=>!o.favorite));const[i,r]=C.useState(null);C.useEffect(()=>{i&&setTimeout(()=>{r(null)},2e3)},[i]);const a=C.useCallback(()=>{try{for(const o of t)e(o,!0);r("success")}catch{r("error")}},[e,t]);return B.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[B.jsxs("div",{className:"graphiql-history-header",children:["History",(i||t.length>0)&&B.jsx(Ac,{type:"button",state:i||void 0,disabled:!t.length,onClick:a,children:{success:"Cleared",error:"Failed to Clear"}[i]||"Clear"})]}),!!n.length&&B.jsx("ul",{className:"graphiql-history-items",children:n.map(o=>B.jsx(Ty,{item:o},o.index))}),!!n.length&&!!t.length&&B.jsx("div",{className:"graphiql-history-item-spacer"}),!!t.length&&B.jsx("ul",{className:"graphiql-history-items",children:t.map(o=>B.jsx(Ty,{item:o},o.index))})]})}Fe(eIe,"History");function Ty(u){const{editLabel:e,toggleFavorite:t,deleteFromHistory:n,setActive:i}=bO({nonNull:!0,caller:Ty}),{headerEditor:r,queryEditor:a,variableEditor:o}=Ko({nonNull:!0,caller:Ty}),s=C.useRef(null),l=C.useRef(null),[c,d]=C.useState(!1);C.useEffect(()=>{var x;c&&((x=s.current)==null||x.focus())},[c]);const h=u.item.label||u.item.operationName||tIe(u.item.query),E=C.useCallback(()=>{var x;d(!1);const{index:b,...k}=u.item;e({...k,label:(x=s.current)==null?void 0:x.value},b)},[e,u.item]),m=C.useCallback(()=>{d(!1)},[]),g=C.useCallback(x=>{x.stopPropagation(),d(!0)},[]),f=C.useCallback(()=>{const{query:x,variables:b,headers:k}=u.item;a==null||a.setValue(x??""),o==null||o.setValue(b??""),r==null||r.setValue(k??""),i(u.item)},[r,u.item,a,i,o]),p=C.useCallback(x=>{x.stopPropagation(),n(u.item)},[u.item,n]),D=C.useCallback(x=>{x.stopPropagation(),t(u.item)},[u.item,t]);return B.jsx("li",{className:Ha("graphiql-history-item",c&&"editable"),children:c?B.jsxs(B.Fragment,{children:[B.jsx("input",{type:"text",defaultValue:u.item.label,ref:s,onKeyDown:x=>{x.key==="Esc"?d(!1):x.key==="Enter"&&(d(!1),e({...u.item,label:x.currentTarget.value}))},placeholder:"Type a label"}),B.jsx(la,{type:"button",ref:l,onClick:E,children:"Save"}),B.jsx(la,{type:"button",ref:l,onClick:m,children:B.jsx(jie,{})})]}):B.jsxs(B.Fragment,{children:[B.jsx(Ao,{label:"Set active",children:B.jsx(la,{type:"button",className:"graphiql-history-item-label",onClick:f,"aria-label":"Set active",children:h})}),B.jsx(Ao,{label:"Edit label",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:g,"aria-label":"Edit label",children:B.jsx(ARu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:u.item.favorite?"Remove favorite":"Add favorite",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:D,"aria-label":u.item.favorite?"Remove favorite":"Add favorite",children:u.item.favorite?B.jsx(MRu,{"aria-hidden":"true"}):B.jsx(TRu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:"Delete from history",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:p,"aria-label":"Delete from history",children:B.jsx(PRu,{"aria-hidden":"true"})})})]})})}Fe(Ty,"HistoryItem");function tIe(u){return u==null?void 0:u.split(` `).map(e=>e.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}Fe(tIe,"formatQuery");const uIe=Mg("ExecutionContext");function YT({fetcher:u,getDefaultFieldNames:e,children:t,operationName:n}){if(!u)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:i,headerEditor:r,queryEditor:a,responseEditor:o,variableEditor:s,updateActiveTabValues:l}=Ko({nonNull:!0,caller:YT}),c=bO(),d=tN({getDefaultFieldNames:e,caller:YT}),[h,E]=C.useState(!1),[m,g]=C.useState(null),f=C.useRef(0),p=C.useCallback(()=>{m==null||m.unsubscribe(),E(!1),g(null)},[m]),D=C.useCallback(async()=>{if(!a||!o)return;if(m){p();return}const k=Fe(y=>{o.setValue(y),l({response:y})},"setResponse");f.current+=1;const A=f.current;let F=d()||a.getValue();const S=s==null?void 0:s.getValue();let w;try{w=KY({json:S,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(y){k(y instanceof Error?y.message:`${y}`);return}const z=r==null?void 0:r.getValue();let N;try{N=KY({json:z,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(y){k(y instanceof Error?y.message:`${y}`);return}if(i){const y=a.documentAST?bJt(a.documentAST,i):[];y.length>0&&(F+=` -`+y.map(_=>t0(_)).join(` -`))}k(""),E(!0);const O=n??a.operationName??void 0;c==null||c.addToHistory({query:F,variables:S,headers:z,operationName:O});try{let y={data:{}};const _=Fe(R=>{if(A!==f.current)return;let I=Array.isArray(R)?R:!1;if(!I&&typeof R=="object"&&R!==null&&"hasNext"in R&&(I=[R]),I){const H={data:y.data},V=[...(y==null?void 0:y.errors)||[],...I.flatMap(U=>U.errors).filter(Boolean)];V.length&&(H.errors=V);for(const U of I){const{path:J,data:Y,errors:X,...re}=U;if(J){if(!Y)throw new Error(`Expected part to contain a data property, but got ${U}`);OJt(H.data,J,Y,{merge:!0})}else Y&&(H.data=Y);y={...H,...re}}E(!1),k(uY(y))}else{const H=uY(R);E(!1),k(H)}},"handleResponse"),L=u({query:F,variables:w,operationName:O},{headers:N??void 0,documentAST:a.documentAST??void 0}),T=await Promise.resolve(L);if($Te(T))g(T.subscribe({next(R){_(R)},error(R){E(!1),R&&k(vy(R)),g(null)},complete(){E(!1),g(null)}}));else if(KTe(T)){g({unsubscribe:()=>{var R,I;return(I=(R=T[Symbol.asyncIterator]()).return)==null?void 0:I.call(R)}});for await(const R of T)_(R);E(!1),g(null)}else _(T)}catch(y){E(!1),k(vy(y)),g(null)}},[d,i,u,r,c,n,a,o,p,m,l,s]),x=!!m,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return B.jsx(uIe.Provider,{value:b,children:t})}Fe(YT,"ExecutionContextProvider");const _7=Tg(uIe);function KY({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Fe(KY,"tryParseJsonObject");const kO="graphiql",FO="sublime";let nIe=!1;typeof window=="object"&&(nIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const yO={[nIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function U6(u,e){const t=await Te(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Te(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Te(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Te(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Te(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Fe(U6,"importCodeMirror");const ORu=Fe(u=>u?t0(u):"","printDefault");function Vie({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=U5(u.defaultValue,u.type);return e?B.jsxs(B.Fragment,{children:[" = ",B.jsx("span",{className:"graphiql-doc-explorer-default-value",children:ORu(e)})]}):null}Fe(Vie,"DefaultValue");const iIe=Mg("SchemaContext");function $ie(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ko({nonNull:!0,caller:$ie}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(UZ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=rIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:m,onSchemaChange:g,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(UZ(u.schema)||u.schema===null)return;const k=++l.current,A=u.schema;async function F(){if(A)return A;const S=aIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const w=S.headers?{headers:S.headers}:{},z=Tfe(m({query:d,operationName:h},w));if(!Mfe(z)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let N=await z;if(typeof N!="object"||N===null||!("data"in N)){const y=Tfe(m({query:E,operationName:h},w));if(!Mfe(y))throw new Error("Fetcher did not return a Promise for introspection.");N=await y}if(a(!1),N!=null&&N.data&&"__schema"in N.data)return N.data;const O=typeof N=="string"?N:uY(N);s(O)}Fe(F,"fetchIntrospectionData"),F().then(S=>{if(!(k!==l.current||!S))try{const w=MWt(S);i(w),g==null||g(w)}catch(w){s(vy(w))}}).catch(S=>{k===l.current&&(s(vy(S)),a(!1))})},[m,h,d,E,g,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(A){A.ctrlKey&&A.key==="R"&&D()}return Fe(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:lTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return B.jsx(iIe.Provider,{value:b,children:p})}Fe($ie,"SchemaContextProvider");const X1=Tg(iIe);function rIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=zWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Fe(rIe,"useIntrospectionQuery");function aIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Fe(aIe,"parseHeaderString");const kS={name:"Docs"},oIe=Mg("ExplorerContext");function Kie(u){const{schema:e,validationErrors:t}=X1({nonNull:!0,caller:Kie}),[n,i]=C.useState([kS]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[kS])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[kS];let d=null;for(const h of l)if(h!==kS)if(h.def)if(Rne(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(qi(d)||jo(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(wg(d)||V0(d)||Ji(d)||Il(d))break;{const E=d;if(E.args.find(m=>m.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return B.jsx(oIe.Provider,{value:s,children:u.children})}Fe(Kie,"ExplorerContextProvider");const Pg=Tg(oIe);function Ny(u,e){return Mr(u)?B.jsxs(B.Fragment,{children:[Ny(u.ofType,e),"!"]}):Es(u)?B.jsxs(B.Fragment,{children:["[",Ny(u.ofType,e),"]"]}):e(u)}Fe(Ny,"renderType");function Rc(u){const{push:e}=Pg({nonNull:!0,caller:Rc});return u.type?Ny(u.type,t=>B.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Fe(Rc,"TypeLink");function Py({arg:u,showDefaultValue:e,inline:t}){const n=B.jsxs("span",{children:[B.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",B.jsx(Rc,{type:u.type}),e!==!1&&B.jsx(Vie,{field:u})]});return t?n:B.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Fe(Py,"Argument");function Wie(u){return u.children?B.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Fe(Wie,"DeprecationReason");function sIe({directive:u}){return B.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Fe(sIe,"Directive");function $0(u){const e=jRu[u.title];return B.jsxs("div",{children:[B.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[B.jsx(e,{}),u.title]}),B.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Fe($0,"ExplorerSection");const jRu={Arguments:sRu,"Deprecated Arguments":ERu,"Deprecated Enum Values":mRu,"Deprecated Fields":gRu,Directives:fRu,"Enum Values":xRu,Fields:vRu,Implements:bRu,Implementations:bS,"Possible Types":bS,"Root Types":LRu,Type:bS,"All Schema Types":bS};function lIe(u){return B.jsxs(B.Fragment,{children:[u.field.description?B.jsx(V1,{type:"description",children:u.field.description}):null,B.jsx(Wie,{preview:!1,children:u.field.deprecationReason}),B.jsx($0,{title:"Type",children:B.jsx(Rc,{type:u.field.type})}),B.jsx(cIe,{field:u.field}),B.jsx(dIe,{field:u.field})]})}Fe(lIe,"FieldDocumentation");function cIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx($0,{title:"Arguments",children:i.map(a=>B.jsx(Py,{arg:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx($0,{title:"Deprecated Arguments",children:r.map(a=>B.jsx(Py,{arg:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Fe(cIe,"Arguments");function dIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:B.jsx($0,{title:"Directives",children:t.map(n=>B.jsx("div",{children:B.jsx(sIe,{directive:n})},n.name.value))})}Fe(dIe,"Directives");function hIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return B.jsxs(B.Fragment,{children:[B.jsx(V1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),B.jsxs($0,{title:"Root Types",children:[r?B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",B.jsx(Rc,{type:r})]}):null,a&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",B.jsx(Rc,{type:a})]}),o&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",B.jsx(Rc,{type:o})]})]}),B.jsx($0,{title:"All Schema Types",children:s&&B.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:B.jsx("div",{children:B.jsx(Rc,{type:c})},c.name))})})]})}Fe(hIe,"SchemaDocumentation");function Cp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Fe(Cp,"debounce");function Gie(){const{explorerNavStack:u,push:e}=Pg({nonNull:!0,caller:Gie}),t=C.useRef(null),n=QT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>Cp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(m){var g;m.metaKey&&m.key==="k"&&((g=t.current)==null||g.focus())}return Fe(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||qi(l.def)||Ji(l.def)||jo(l.def)?B.jsxs(HD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[B.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[B.jsx(FRu,{}),B.jsx(HD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&B.jsxs(HD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?B.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(WY,{field:E.field,argument:E.argument})},`within-${m}`)),a.within.length>0&&a.types.length+a.fields.length>0?B.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(XT,{type:E.type})},`type-${m}`)),a.fields.map((E,m)=>B.jsxs(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:[B.jsx(XT,{type:E.type}),".",B.jsx(WY,{field:E.field,argument:E.argument})]},`field-${m}`))]})]}):null}Fe(Gie,"Search");function QT(u){const{explorerNavStack:e}=Pg({nonNull:!0,caller:u||QT}),{schema:t}=X1({nonNull:!0,caller:u||QT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&Q8(l,i)&&r.types.push({type:c}),!qi(c)&&!Ji(c)&&!jo(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let m;if(!Q8(h,i))if("args"in E){if(m=E.args.filter(g=>Q8(g.name,i)),m.length===0)continue}else continue;r[a===c?"within":"fields"].push(...m?m.map(g=>({type:c,field:E,argument:g})):[{type:c,field:E}])}}return r},[n.def,t])}Fe(QT,"useSearchResults");function Q8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Fe(Q8,"isMatch");function XT(u){return B.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Fe(XT,"Type");function WY({field:u,argument:e}){return B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",Ny(e.type,t=>B.jsx(XT,{type:t})),")"]}):null]})}Fe(WY,"Field$1");function EIe(u){const{push:e}=Pg({nonNull:!0});return B.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Fe(EIe,"FieldLink");function mIe(u){return Rne(u.type)?B.jsxs(B.Fragment,{children:[u.type.description?B.jsx(V1,{type:"description",children:u.type.description}):null,B.jsx(gIe,{type:u.type}),B.jsx(fIe,{type:u.type}),B.jsx(pIe,{type:u.type}),B.jsx(DIe,{type:u.type})]}):null}Fe(mIe,"TypeDocumentation");function gIe({type:u}){return qi(u)&&u.getInterfaces().length>0?B.jsx($0,{title:"Implements",children:u.getInterfaces().map(e=>B.jsx("div",{children:B.jsx(Rc,{type:e})},e.name))}):null}Fe(gIe,"ImplementsInterfaces");function fIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!qi(u)&&!Ji(u)&&!jo(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return B.jsxs(B.Fragment,{children:[r.length>0?B.jsx($0,{title:"Fields",children:r.map(o=>B.jsx(GY,{field:o},o.name))}):null,a.length>0?e||r.length===0?B.jsx($0,{title:"Deprecated Fields",children:a.map(o=>B.jsx(GY,{field:o},o.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Fe(fIe,"Fields");function GY({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsxs("div",{children:[B.jsx(EIe,{field:u}),e.length>0?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{children:e.map(t=>e.length===1?B.jsx(Py,{arg:t,inline:!0},t.name):B.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:B.jsx(Py,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",B.jsx(Rc,{type:u.type}),B.jsx(Vie,{field:u})]}),u.description?B.jsx(V1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,B.jsx(Wie,{children:u.deprecationReason})]})}Fe(GY,"Field");function pIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!V0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx($0,{title:"Enum Values",children:i.map(a=>B.jsx(UY,{value:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx($0,{title:"Deprecated Enum Values",children:r.map(a=>B.jsx(UY,{value:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Fe(pIe,"EnumValues");function UY({value:u}){return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsx(V1,{type:"deprecation",children:u.deprecationReason}):null]})}Fe(UY,"EnumValue");function DIe({type:u}){const{schema:e}=X1({nonNull:!0});return!e||!_m(u)?null:B.jsx($0,{title:Ji(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>B.jsx("div",{children:B.jsx(Rc,{type:t})},t.name))})}Fe(DIe,"PossibleTypes");function eN(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=X1({nonNull:!0,caller:eN}),{explorerNavStack:i,pop:r}=Pg({nonNull:!0,caller:eN}),a=i.at(-1);let o=null;u?o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=B.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=B.jsx(Hie,{}):t?i.length===1?o=B.jsx(hIe,{schema:t}):Nne(a.def)?o=B.jsx(mIe,{type:a.def}):a.def&&(o=B.jsx(lIe,{field:a.def})):o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),B.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&B.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[B.jsx(cRu,{}),s]}),B.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),B.jsx(Gie,{},a.name)]}),B.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Fe(eN,"DocExplorer");const Ry={title:"Documentation Explorer",icon:Fe(function(){const u=AO();return(u==null?void 0:u.visiblePlugin)===Ry?B.jsx(pRu,{}):B.jsx(DRu,{})},"Icon"),content:eN},ZDe={title:"History",icon:CRu,content:eIe},xIe=Mg("PluginContext");function vIe(u){const e=Ng(),t=Pg(),n=bO(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],m={};i&&(E.push(Ry),m[Ry.title]=!0),r&&(E.push(ZDe),m[ZDe.title]=!0);for(const g of u.plugins||[]){if(typeof g.title!="string"||!g.title)throw new Error("All GraphiQL plugins must have a unique title");if(m[g.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${g.title}'`);E.push(g),m[g.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(YDe);return a.find(g=>g.title===E)||(E&&(e==null||e.set(YDe,"")),u.visiblePlugin&&a.find(g=>(typeof u.visiblePlugin=="string"?g.title:g)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const m=E&&a.find(g=>(typeof E=="string"?g.title:g)===E)||null;s(g=>m===g?g:(l==null||l(m),m))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return B.jsx(xIe.Provider,{value:h,children:c})}Fe(vIe,"PluginContextProvider");const AO=Tg(xIe),YDe="visiblePlugin";function CIe(u,e,t,n,i,r){U6([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,m,g,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),m=document.createElement("div"),m.className="CodeMirror-hint-information-description",s.append(m),g=document.createElement("div"),g.className="CodeMirror-hint-information-deprecation",s.append(g);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",g.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",g.append(f);const A=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,F=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Fe(()=>{s&&(s.style.paddingTop=x.scrollTop+A+"px",s.style.maxHeight=x.scrollTop+F+"px")},"handleScroll");x.addEventListener("scroll",S);let w;x.addEventListener("DOMNodeRemoved",w=Fe(z=>{z.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",w),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,m=null,g=null,f=null,w=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Fe(b=>{Mr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):Es(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";m&&(p.description?(m.style.display="block",m.innerHTML=ZT.render(p.description)):(m.style.display="none",m.innerHTML="")),g&&f&&(p.deprecationReason?(g.style.display="block",f.innerHTML=ZT.render(p.deprecationReason)):(g.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(Ry),n.push({name:l.name,def:l}),r==null||r(l))}Fe(a,"onClickHintInformation")}Fe(CIe,"onHasCompletion");function $b(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Fe($b,"useSynchronizeValue");function S7(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Fe(S7,"useSynchronizeOption");function Uie(u,e,t,n,i){const{updateActiveTabValues:r}=Ko({nonNull:!0,caller:i}),a=Ng();C.useEffect(()=>{if(!u)return;const o=Cp(500,c=>{!a||t===null||a.set(t,c)}),s=Cp(100,c=>{r({[n]:c})}),l=Fe((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Fe(Uie,"useChangeHandler");function qie(u,e,t){const{schema:n}=X1({nonNull:!0,caller:t}),i=Pg(),r=AO();C.useEffect(()=>{if(!u)return;const a=Fe((o,s)=>{CIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Fe(qie,"useCompletion");function Ic(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Fe(Ic,"useKeyMap");function _O({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ko({nonNull:!0,caller:u||_O});return C.useCallback(()=>{if(!t)return;const n=t.getValue();WJt(n),e==null||e(n)},[t,e])}Fe(_O,"useCopyQuery");function bp({caller:u}={}){const{queryEditor:e}=Ko({nonNull:!0,caller:u||bp}),{schema:t}=X1({nonNull:!0,caller:bp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(t0(Nqt(n,t)))},[e,t])}Fe(bp,"useMergeQuery");function q6({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ko({nonNull:!0,caller:u||q6});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=t0(Bg(i));r!==i&&e.setValue(r)}},[e,n,t])}Fe(q6,"usePrettifyEditors");function tN({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=X1({nonNull:!0,caller:e||tN}),{queryEditor:n}=Ko({nonNull:!0,caller:e||tN});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=Bqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)h{let E=!0;return U6([Te(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(m=>m.j)]).then(m=>{if(!E)return;const g=h.current;if(!g)return;const f=m(g,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:g})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:g})},"Alt-Space"(){f.showHint({completeSingle:!1,container:g})},"Shift-Space"(){f.showHint({completeSingle:!1,container:g})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,A=x.startsWith("Key"),F=!k&&x.startsWith("Digit");(A||F||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),S7(a,"keyMap",e),Uie(a,t,s?X8:null,"headers",Z5),Ic(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(a,["Shift-Ctrl-P"],d),Ic(a,["Shift-Ctrl-M"],c),h}Fe(Z5,"useHeaderEditor");const X8="headers",HRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),VRu=new RegExp("["+HRu.join("")+"]","g");function bIe(u){return u.replace(VRu," ")}Fe(bIe,"normalizeWhitespace");function pE({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=X1({nonNull:!0,caller:a||pE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:m,updateActiveTabValues:g}=Ko({nonNull:!0,caller:a||pE}),f=_7(),p=Ng(),D=Pg(),x=AO(),b=_O({caller:a||pE,onCopyQuery:n}),k=bp({caller:a||pE}),A=q6({caller:a||pE}),F=C.useRef(null),S=C.useRef(),w=C.useRef(()=>{});C.useEffect(()=>{w.current=O=>{if(!(!D||!x)){switch(x.setVisiblePlugin(Ry),O.kind){case"Type":{D.push({name:O.type.name,def:O.type});break}case"Field":{D.push({name:O.field.name,def:O.field});break}case"Argument":{O.field&&D.push({name:O.field.name,def:O.field});break}case"EnumValue":{O.type&&D.push({name:O.type.name,def:O.type});break}}t==null||t(O)}}},[D,t,x]),C.useEffect(()=>{let O=!0;return U6([Te(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(y=>y.c),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(y=>y.s),Te(()=>import("./hint.es-37fdb462.js"),["./hint.es-37fdb462.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./lint.es2-0fdd8b3c.js"),["./lint.es2-0fdd8b3c.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./info.es-3d43dc0b.js"),["./info.es-3d43dc0b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-2d405eca.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Te(()=>import("./jump.es-8a00e13d.js"),["./jump.es-8a00e13d.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-2d405eca.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./mode.es-a1c28541.js"),["./mode.es-a1c28541.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(y=>{if(!O)return;S.current=y;const _=F.current;if(!_)return;const L=y(_,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:_,externalFragments:void 0},info:{schema:void 0,renderDescription:R=>ZT.render(R),onClick(R){w.current(R)}},jump:{schema:void 0,onClick(R){w.current(R)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...yO,"Cmd-S"(){},"Ctrl-S"(){}}});L.addKeyMap({"Cmd-Space"(){L.showHint({completeSingle:!0,container:_})},"Ctrl-Space"(){L.showHint({completeSingle:!0,container:_})},"Alt-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Alt-Space"(){L.showHint({completeSingle:!0,container:_})}}),L.on("keyup",(R,I)=>{$Ru.test(I.key)&&R.execCommand("autocomplete")});let T=!1;L.on("startCompletion",()=>{T=!0}),L.on("endCompletion",()=>{T=!1}),L.on("keydown",(R,I)=>{I.key==="Escape"&&T&&I.stopPropagation()}),L.on("beforeChange",(R,I)=>{var H;if(I.origin==="paste"){const V=I.text.map(bIe);(H=I.update)==null||H.call(I,I.from,I.to,V)}}),L.documentAST=null,L.operationName=null,L.operations=null,L.variableToType=null,h(L)}),()=>{O=!1}},[u,l,r,h]),S7(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function O(_){var L;const T=yJt(o,_.getValue()),R=Pqt(_.operations??void 0,_.operationName??void 0,T==null?void 0:T.operations);return _.documentAST=(T==null?void 0:T.documentAST)??null,_.operationName=R??null,_.operations=(T==null?void 0:T.operations)??null,m&&(m.state.lint.linterOptions.variableToType=T==null?void 0:T.variableToType,m.options.lint.variableToType=T==null?void 0:T.variableToType,m.options.hintOptions.variableToType=T==null?void 0:T.variableToType,(L=S.current)==null||L.signal(m,"change",m)),T?{...T,operationName:R}:null}Fe(O,"getAndUpdateOperationFacts");const y=Cp(100,_=>{const L=_.getValue();p==null||p.set(AIe,L);const T=_.operationName,R=O(_);(R==null?void 0:R.operationName)!==void 0&&(p==null||p.set(KRu,R.operationName)),i==null||i(L,R==null?void 0:R.documentAST),R!=null&&R.operationName&&T!==R.operationName&&d(R.operationName),g({query:L,operationName:(R==null?void 0:R.operationName)??null})});return O(c),c.on("change",y),()=>c.off("change",y)},[i,c,o,d,p,m,g]),kIe(c,o??null,S),FIe(c,E??null,S),yIe(c,s,S),qie(c,t||null,pE);const z=f==null?void 0:f.run,N=C.useCallback(()=>{var O;if(!z||!c||!c.operations||!c.hasFocus()){z==null||z();return}const y=c.indexFromPos(c.getCursor());let _;for(const L of c.operations)L.loc&&L.loc.start<=y&&L.loc.end>=y&&(_=(O=L.name)==null?void 0:O.value);_&&_!==c.operationName&&d(_),z()},[c,z,d]);return Ic(c,["Cmd-Enter","Ctrl-Enter"],N),Ic(c,["Shift-Ctrl-C"],b),Ic(c,["Shift-Ctrl-P","Shift-Ctrl-F"],A),Ic(c,["Shift-Ctrl-M"],k),F}Fe(pE,"useQueryEditor");function kIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(kIe,"useSynchronizeSchema");function FIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(FIe,"useSynchronizeValidationRules");function yIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Fe(yIe,"useSynchronizeExternalFragments");const $Ru=/^[a-zA-Z0-9_@(]$/,AIe="query",KRu="operationName";function _Ie({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(Oy);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(SIe(l)){const d=Iy({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?SO(i):null;l.tabs.push({id:Qie(),hash:d,title:E||Xie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(Zie)}}}Fe(_Ie,"getDefaultTabState");function SIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&wIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(BIe)}Fe(SIe,"isTabsState");function BIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&qY(u,"id")&&qY(u,"title")&&u5(u,"query")&&u5(u,"variables")&&u5(u,"headers")&&u5(u,"operationName")&&u5(u,"response")}Fe(BIe,"isTabState");function wIe(u,e){return e in u&&typeof u[e]=="number"}Fe(wIe,"hasNumberKey");function qY(u,e){return e in u&&typeof u[e]=="string"}Fe(qY,"hasStringKey");function u5(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Fe(u5,"hasStringOrNullKey");function LIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return Yie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Fe(LIe,"useSynchronizeActiveTabValues");function Jie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Fe(Jie,"serializeTabState");function zIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>Cp(500,n=>{u==null||u.set(Oy,n)}),[u]);return C.useCallback(n=>{t(Jie(n,e))},[e,t])}Fe(zIe,"useStoreTabs");function MIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Fe(MIe,"useSetEditorValues");function Zie({query:u=null,variables:e=null,headers:t=null}={}){return{id:Qie(),hash:Iy({query:u,variables:e,headers:t}),title:u&&SO(u)||Xie,query:u,variables:e,headers:t,operationName:null,response:null}}Fe(Zie,"createTab");function Yie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:Iy(i),title:i.operationName||(i.query?SO(i.query):void 0)||Xie}})}}Fe(Yie,"setPropertiesInActiveTab");function Qie(){const u=Fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Fe(Qie,"guid");function Iy(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Fe(Iy,"hashFromTabContents");function SO(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Fe(SO,"fuzzyExtractOperationName");function TIe(u){const e=u==null?void 0:u.get(Oy);if(e){const t=JSON.parse(e);u==null||u.set(Oy,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Fe(TIe,"clearHeadersFromTabs");const Xie="",Oy="tabState";function Mf({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ko({nonNull:!0,caller:r||Mf}),l=_7(),c=bp({caller:r||Mf}),d=q6({caller:r||Mf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let m=!0;return U6([Te(()=>import("./hint.es2-e6bfba5e.js"),["./hint.es2-e6bfba5e.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./lint.es3-772416c3.js"),["./lint.es3-772416c3.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Te(()=>import("./mode.es2-69ebd2a9.js"),["./mode.es2-69ebd2a9.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(g=>{if(!m)return;E.current=g;const f=h.current;if(!f)return;const p=g(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:A}=x,F=b.startsWith("Key"),S=!A&&b.startsWith("Digit");(F||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{m=!1}},[u,a,i,s]),S7(o,"keyMap",e),Uie(o,n,NIe,"variables",Mf),qie(o,t||null,Mf),Ic(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(o,["Shift-Ctrl-P"],d),Ic(o,["Shift-Ctrl-M"],c),h}Fe(Mf,"useVariableEditor");const NIe="variables",PIe=Mg("EditorContext");function RIe(u){const e=Ng(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const R=(e==null?void 0:e.get(K$))!==null;return u.shouldPersistHeaders!==!1&&R?(e==null?void 0:e.get(K$))==="true":!!u.shouldPersistHeaders});$b(t,u.headers),$b(i,u.query),$b(a,u.response),$b(s,u.variables);const h=zIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const R=u.query??(e==null?void 0:e.get(AIe))??null,I=u.variables??(e==null?void 0:e.get(NIe))??null,H=u.headers??(e==null?void 0:e.get(X8))??null,V=u.response??"",U=_Ie({query:R,variables:I,headers:H,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||WRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(U),{query:R??(U.activeTabIndex===0?U.tabs[0].query:null)??"",variables:I??"",headers:H??u.defaultHeaders??"",response:V,tabState:U}}),[m,g]=C.useState(E.tabState),f=C.useCallback(R=>{if(R){e==null||e.set(X8,(t==null?void 0:t.getValue())??"");const I=Jie(m,!0);e==null||e.set(Oy,I)}else e==null||e.set(X8,""),TIe(e);d(R),e==null||e.set(K$,R.toString())},[e,m,t]),p=C.useRef();C.useEffect(()=>{const R=!!u.shouldPersistHeaders;(p==null?void 0:p.current)!==R&&(f(R),p.current=R)},[u.shouldPersistHeaders,f]);const D=LIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=MIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:A}=u,F=C.useCallback(()=>{g(R=>{const I=D(R),H={tabs:[...I.tabs,Zie({headers:k})],activeTabIndex:I.tabs.length};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[k,b,x,h,D]),S=C.useCallback(R=>{g(I=>{const H={...I,activeTabIndex:R};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),w=C.useCallback(R=>{g(I=>{const H=I.tabs[I.activeTabIndex],V={tabs:R,activeTabIndex:R.indexOf(H)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),z=C.useCallback(R=>{g(I=>{const H={tabs:I.tabs.filter((V,U)=>R!==U),activeTabIndex:Math.max(I.activeTabIndex-1,0)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),N=C.useCallback(R=>{g(I=>{const H=Yie(I,R);return h(H),b==null||b(H),H})},[b,h]),{onEditOperationName:O}=u,y=C.useCallback(R=>{i&&(i.operationName=R,N({operationName:R}),O==null||O(R))},[O,i,N]),_=C.useMemo(()=>{const R=new Map;if(Array.isArray(u.externalFragments))for(const I of u.externalFragments)R.set(I.name.value,I);else if(typeof u.externalFragments=="string")ad(Bg(u.externalFragments,{}),{FragmentDefinition(I){R.set(I.name.value,I)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return R},[u.externalFragments]),L=C.useMemo(()=>u.validationRules||[],[u.validationRules]),T=C.useMemo(()=>({...m,addTab:F,changeTab:S,moveTab:w,closeTab:z,updateActiveTabValues:N,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:y,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:_,validationRules:L,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[m,F,S,w,z,N,t,i,a,s,y,E,_,L,c,f]);return B.jsx(PIe.Provider,{value:T,children:A})}Fe(RIe,"EditorContextProvider");const Ko=Tg(PIe),K$="shouldPersistHeaders",WRu=`# Welcome to GraphiQL +`+y.map(_=>u0(_)).join(` +`))}k(""),E(!0);const O=n??a.operationName??void 0;c==null||c.addToHistory({query:F,variables:S,headers:z,operationName:O});try{let y={data:{}};const _=Fe(R=>{if(A!==f.current)return;let I=Array.isArray(R)?R:!1;if(!I&&typeof R=="object"&&R!==null&&"hasNext"in R&&(I=[R]),I){const H={data:y.data},V=[...(y==null?void 0:y.errors)||[],...I.flatMap(U=>U.errors).filter(Boolean)];V.length&&(H.errors=V);for(const U of I){const{path:J,data:Y,errors:X,...re}=U;if(J){if(!Y)throw new Error(`Expected part to contain a data property, but got ${U}`);OJt(H.data,J,Y,{merge:!0})}else Y&&(H.data=Y);y={...H,...re}}E(!1),k(uY(y))}else{const H=uY(R);E(!1),k(H)}},"handleResponse"),L=u({query:F,variables:w,operationName:O},{headers:N??void 0,documentAST:a.documentAST??void 0}),T=await Promise.resolve(L);if($Te(T))g(T.subscribe({next(R){_(R)},error(R){E(!1),R&&k(vy(R)),g(null)},complete(){E(!1),g(null)}}));else if(KTe(T)){g({unsubscribe:()=>{var R,I;return(I=(R=T[Symbol.asyncIterator]()).return)==null?void 0:I.call(R)}});for await(const R of T)_(R);E(!1),g(null)}else _(T)}catch(y){E(!1),k(vy(y)),g(null)}},[d,i,u,r,c,n,a,o,p,m,l,s]),x=!!m,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return B.jsx(uIe.Provider,{value:b,children:t})}Fe(YT,"ExecutionContextProvider");const _7=Tg(uIe);function KY({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Fe(KY,"tryParseJsonObject");const kO="graphiql",FO="sublime";let nIe=!1;typeof window=="object"&&(nIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const yO={[nIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function U6(u,e){const t=await Te(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Te(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Te(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Te(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Te(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Fe(U6,"importCodeMirror");const ORu=Fe(u=>u?u0(u):"","printDefault");function Vie({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=U5(u.defaultValue,u.type);return e?B.jsxs(B.Fragment,{children:[" = ",B.jsx("span",{className:"graphiql-doc-explorer-default-value",children:ORu(e)})]}):null}Fe(Vie,"DefaultValue");const iIe=Mg("SchemaContext");function $ie(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ko({nonNull:!0,caller:$ie}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(UZ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=rIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:m,onSchemaChange:g,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(UZ(u.schema)||u.schema===null)return;const k=++l.current,A=u.schema;async function F(){if(A)return A;const S=aIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const w=S.headers?{headers:S.headers}:{},z=Tfe(m({query:d,operationName:h},w));if(!Mfe(z)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let N=await z;if(typeof N!="object"||N===null||!("data"in N)){const y=Tfe(m({query:E,operationName:h},w));if(!Mfe(y))throw new Error("Fetcher did not return a Promise for introspection.");N=await y}if(a(!1),N!=null&&N.data&&"__schema"in N.data)return N.data;const O=typeof N=="string"?N:uY(N);s(O)}Fe(F,"fetchIntrospectionData"),F().then(S=>{if(!(k!==l.current||!S))try{const w=MWt(S);i(w),g==null||g(w)}catch(w){s(vy(w))}}).catch(S=>{k===l.current&&(s(vy(S)),a(!1))})},[m,h,d,E,g,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(A){A.ctrlKey&&A.key==="R"&&D()}return Fe(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:lTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return B.jsx(iIe.Provider,{value:b,children:p})}Fe($ie,"SchemaContextProvider");const X1=Tg(iIe);function rIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=zWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Fe(rIe,"useIntrospectionQuery");function aIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Fe(aIe,"parseHeaderString");const kS={name:"Docs"},oIe=Mg("ExplorerContext");function Kie(u){const{schema:e,validationErrors:t}=X1({nonNull:!0,caller:Kie}),[n,i]=C.useState([kS]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[kS])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[kS];let d=null;for(const h of l)if(h!==kS)if(h.def)if(Rne(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(qi(d)||jo(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(wg(d)||$0(d)||Ji(d)||Il(d))break;{const E=d;if(E.args.find(m=>m.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return B.jsx(oIe.Provider,{value:s,children:u.children})}Fe(Kie,"ExplorerContextProvider");const Pg=Tg(oIe);function Ny(u,e){return Mr(u)?B.jsxs(B.Fragment,{children:[Ny(u.ofType,e),"!"]}):ms(u)?B.jsxs(B.Fragment,{children:["[",Ny(u.ofType,e),"]"]}):e(u)}Fe(Ny,"renderType");function Rc(u){const{push:e}=Pg({nonNull:!0,caller:Rc});return u.type?Ny(u.type,t=>B.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Fe(Rc,"TypeLink");function Py({arg:u,showDefaultValue:e,inline:t}){const n=B.jsxs("span",{children:[B.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",B.jsx(Rc,{type:u.type}),e!==!1&&B.jsx(Vie,{field:u})]});return t?n:B.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Fe(Py,"Argument");function Wie(u){return u.children?B.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Fe(Wie,"DeprecationReason");function sIe({directive:u}){return B.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Fe(sIe,"Directive");function K0(u){const e=jRu[u.title];return B.jsxs("div",{children:[B.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[B.jsx(e,{}),u.title]}),B.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Fe(K0,"ExplorerSection");const jRu={Arguments:sRu,"Deprecated Arguments":ERu,"Deprecated Enum Values":mRu,"Deprecated Fields":gRu,Directives:fRu,"Enum Values":xRu,Fields:vRu,Implements:bRu,Implementations:bS,"Possible Types":bS,"Root Types":LRu,Type:bS,"All Schema Types":bS};function lIe(u){return B.jsxs(B.Fragment,{children:[u.field.description?B.jsx(V1,{type:"description",children:u.field.description}):null,B.jsx(Wie,{preview:!1,children:u.field.deprecationReason}),B.jsx(K0,{title:"Type",children:B.jsx(Rc,{type:u.field.type})}),B.jsx(cIe,{field:u.field}),B.jsx(dIe,{field:u.field})]})}Fe(lIe,"FieldDocumentation");function cIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Arguments",children:i.map(a=>B.jsx(Py,{arg:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Arguments",children:r.map(a=>B.jsx(Py,{arg:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Fe(cIe,"Arguments");function dIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:B.jsx(K0,{title:"Directives",children:t.map(n=>B.jsx("div",{children:B.jsx(sIe,{directive:n})},n.name.value))})}Fe(dIe,"Directives");function hIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return B.jsxs(B.Fragment,{children:[B.jsx(V1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),B.jsxs(K0,{title:"Root Types",children:[r?B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",B.jsx(Rc,{type:r})]}):null,a&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",B.jsx(Rc,{type:a})]}),o&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",B.jsx(Rc,{type:o})]})]}),B.jsx(K0,{title:"All Schema Types",children:s&&B.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:B.jsx("div",{children:B.jsx(Rc,{type:c})},c.name))})})]})}Fe(hIe,"SchemaDocumentation");function Cp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Fe(Cp,"debounce");function Gie(){const{explorerNavStack:u,push:e}=Pg({nonNull:!0,caller:Gie}),t=C.useRef(null),n=QT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>Cp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(m){var g;m.metaKey&&m.key==="k"&&((g=t.current)==null||g.focus())}return Fe(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||qi(l.def)||Ji(l.def)||jo(l.def)?B.jsxs(HD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[B.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[B.jsx(FRu,{}),B.jsx(HD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&B.jsxs(HD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?B.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(WY,{field:E.field,argument:E.argument})},`within-${m}`)),a.within.length>0&&a.types.length+a.fields.length>0?B.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(XT,{type:E.type})},`type-${m}`)),a.fields.map((E,m)=>B.jsxs(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:[B.jsx(XT,{type:E.type}),".",B.jsx(WY,{field:E.field,argument:E.argument})]},`field-${m}`))]})]}):null}Fe(Gie,"Search");function QT(u){const{explorerNavStack:e}=Pg({nonNull:!0,caller:u||QT}),{schema:t}=X1({nonNull:!0,caller:u||QT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&Q8(l,i)&&r.types.push({type:c}),!qi(c)&&!Ji(c)&&!jo(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let m;if(!Q8(h,i))if("args"in E){if(m=E.args.filter(g=>Q8(g.name,i)),m.length===0)continue}else continue;r[a===c?"within":"fields"].push(...m?m.map(g=>({type:c,field:E,argument:g})):[{type:c,field:E}])}}return r},[n.def,t])}Fe(QT,"useSearchResults");function Q8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Fe(Q8,"isMatch");function XT(u){return B.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Fe(XT,"Type");function WY({field:u,argument:e}){return B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",Ny(e.type,t=>B.jsx(XT,{type:t})),")"]}):null]})}Fe(WY,"Field$1");function EIe(u){const{push:e}=Pg({nonNull:!0});return B.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Fe(EIe,"FieldLink");function mIe(u){return Rne(u.type)?B.jsxs(B.Fragment,{children:[u.type.description?B.jsx(V1,{type:"description",children:u.type.description}):null,B.jsx(gIe,{type:u.type}),B.jsx(fIe,{type:u.type}),B.jsx(pIe,{type:u.type}),B.jsx(DIe,{type:u.type})]}):null}Fe(mIe,"TypeDocumentation");function gIe({type:u}){return qi(u)&&u.getInterfaces().length>0?B.jsx(K0,{title:"Implements",children:u.getInterfaces().map(e=>B.jsx("div",{children:B.jsx(Rc,{type:e})},e.name))}):null}Fe(gIe,"ImplementsInterfaces");function fIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!qi(u)&&!Ji(u)&&!jo(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return B.jsxs(B.Fragment,{children:[r.length>0?B.jsx(K0,{title:"Fields",children:r.map(o=>B.jsx(GY,{field:o},o.name))}):null,a.length>0?e||r.length===0?B.jsx(K0,{title:"Deprecated Fields",children:a.map(o=>B.jsx(GY,{field:o},o.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Fe(fIe,"Fields");function GY({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsxs("div",{children:[B.jsx(EIe,{field:u}),e.length>0?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{children:e.map(t=>e.length===1?B.jsx(Py,{arg:t,inline:!0},t.name):B.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:B.jsx(Py,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",B.jsx(Rc,{type:u.type}),B.jsx(Vie,{field:u})]}),u.description?B.jsx(V1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,B.jsx(Wie,{children:u.deprecationReason})]})}Fe(GY,"Field");function pIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!$0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Enum Values",children:i.map(a=>B.jsx(UY,{value:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Enum Values",children:r.map(a=>B.jsx(UY,{value:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Fe(pIe,"EnumValues");function UY({value:u}){return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsx(V1,{type:"deprecation",children:u.deprecationReason}):null]})}Fe(UY,"EnumValue");function DIe({type:u}){const{schema:e}=X1({nonNull:!0});return!e||!_m(u)?null:B.jsx(K0,{title:Ji(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>B.jsx("div",{children:B.jsx(Rc,{type:t})},t.name))})}Fe(DIe,"PossibleTypes");function eN(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=X1({nonNull:!0,caller:eN}),{explorerNavStack:i,pop:r}=Pg({nonNull:!0,caller:eN}),a=i.at(-1);let o=null;u?o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=B.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=B.jsx(Hie,{}):t?i.length===1?o=B.jsx(hIe,{schema:t}):Nne(a.def)?o=B.jsx(mIe,{type:a.def}):a.def&&(o=B.jsx(lIe,{field:a.def})):o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),B.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&B.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[B.jsx(cRu,{}),s]}),B.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),B.jsx(Gie,{},a.name)]}),B.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Fe(eN,"DocExplorer");const Ry={title:"Documentation Explorer",icon:Fe(function(){const u=AO();return(u==null?void 0:u.visiblePlugin)===Ry?B.jsx(pRu,{}):B.jsx(DRu,{})},"Icon"),content:eN},ZDe={title:"History",icon:CRu,content:eIe},xIe=Mg("PluginContext");function vIe(u){const e=Ng(),t=Pg(),n=bO(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],m={};i&&(E.push(Ry),m[Ry.title]=!0),r&&(E.push(ZDe),m[ZDe.title]=!0);for(const g of u.plugins||[]){if(typeof g.title!="string"||!g.title)throw new Error("All GraphiQL plugins must have a unique title");if(m[g.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${g.title}'`);E.push(g),m[g.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(YDe);return a.find(g=>g.title===E)||(E&&(e==null||e.set(YDe,"")),u.visiblePlugin&&a.find(g=>(typeof u.visiblePlugin=="string"?g.title:g)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const m=E&&a.find(g=>(typeof E=="string"?g.title:g)===E)||null;s(g=>m===g?g:(l==null||l(m),m))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return B.jsx(xIe.Provider,{value:h,children:c})}Fe(vIe,"PluginContextProvider");const AO=Tg(xIe),YDe="visiblePlugin";function CIe(u,e,t,n,i,r){U6([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,m,g,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),m=document.createElement("div"),m.className="CodeMirror-hint-information-description",s.append(m),g=document.createElement("div"),g.className="CodeMirror-hint-information-deprecation",s.append(g);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",g.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",g.append(f);const A=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,F=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Fe(()=>{s&&(s.style.paddingTop=x.scrollTop+A+"px",s.style.maxHeight=x.scrollTop+F+"px")},"handleScroll");x.addEventListener("scroll",S);let w;x.addEventListener("DOMNodeRemoved",w=Fe(z=>{z.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",w),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,m=null,g=null,f=null,w=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Fe(b=>{Mr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):ms(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";m&&(p.description?(m.style.display="block",m.innerHTML=ZT.render(p.description)):(m.style.display="none",m.innerHTML="")),g&&f&&(p.deprecationReason?(g.style.display="block",f.innerHTML=ZT.render(p.deprecationReason)):(g.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(Ry),n.push({name:l.name,def:l}),r==null||r(l))}Fe(a,"onClickHintInformation")}Fe(CIe,"onHasCompletion");function $b(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Fe($b,"useSynchronizeValue");function S7(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Fe(S7,"useSynchronizeOption");function Uie(u,e,t,n,i){const{updateActiveTabValues:r}=Ko({nonNull:!0,caller:i}),a=Ng();C.useEffect(()=>{if(!u)return;const o=Cp(500,c=>{!a||t===null||a.set(t,c)}),s=Cp(100,c=>{r({[n]:c})}),l=Fe((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Fe(Uie,"useChangeHandler");function qie(u,e,t){const{schema:n}=X1({nonNull:!0,caller:t}),i=Pg(),r=AO();C.useEffect(()=>{if(!u)return;const a=Fe((o,s)=>{CIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Fe(qie,"useCompletion");function Ic(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Fe(Ic,"useKeyMap");function _O({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ko({nonNull:!0,caller:u||_O});return C.useCallback(()=>{if(!t)return;const n=t.getValue();WJt(n),e==null||e(n)},[t,e])}Fe(_O,"useCopyQuery");function bp({caller:u}={}){const{queryEditor:e}=Ko({nonNull:!0,caller:u||bp}),{schema:t}=X1({nonNull:!0,caller:bp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(u0(Nqt(n,t)))},[e,t])}Fe(bp,"useMergeQuery");function q6({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ko({nonNull:!0,caller:u||q6});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=u0(Bg(i));r!==i&&e.setValue(r)}},[e,n,t])}Fe(q6,"usePrettifyEditors");function tN({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=X1({nonNull:!0,caller:e||tN}),{queryEditor:n}=Ko({nonNull:!0,caller:e||tN});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=Bqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)h{let E=!0;return U6([Te(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(m=>m.j)]).then(m=>{if(!E)return;const g=h.current;if(!g)return;const f=m(g,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:g})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:g})},"Alt-Space"(){f.showHint({completeSingle:!1,container:g})},"Shift-Space"(){f.showHint({completeSingle:!1,container:g})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,A=x.startsWith("Key"),F=!k&&x.startsWith("Digit");(A||F||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),S7(a,"keyMap",e),Uie(a,t,s?X8:null,"headers",Z5),Ic(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(a,["Shift-Ctrl-P"],d),Ic(a,["Shift-Ctrl-M"],c),h}Fe(Z5,"useHeaderEditor");const X8="headers",HRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),VRu=new RegExp("["+HRu.join("")+"]","g");function bIe(u){return u.replace(VRu," ")}Fe(bIe,"normalizeWhitespace");function pE({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=X1({nonNull:!0,caller:a||pE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:m,updateActiveTabValues:g}=Ko({nonNull:!0,caller:a||pE}),f=_7(),p=Ng(),D=Pg(),x=AO(),b=_O({caller:a||pE,onCopyQuery:n}),k=bp({caller:a||pE}),A=q6({caller:a||pE}),F=C.useRef(null),S=C.useRef(),w=C.useRef(()=>{});C.useEffect(()=>{w.current=O=>{if(!(!D||!x)){switch(x.setVisiblePlugin(Ry),O.kind){case"Type":{D.push({name:O.type.name,def:O.type});break}case"Field":{D.push({name:O.field.name,def:O.field});break}case"Argument":{O.field&&D.push({name:O.field.name,def:O.field});break}case"EnumValue":{O.type&&D.push({name:O.type.name,def:O.type});break}}t==null||t(O)}}},[D,t,x]),C.useEffect(()=>{let O=!0;return U6([Te(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(y=>y.c),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(y=>y.s),Te(()=>import("./hint.es-96364e2e.js"),["./hint.es-96364e2e.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./lint.es2-0a1cb552.js"),["./lint.es2-0a1cb552.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./info.es-4f84d003.js"),["./info.es-4f84d003.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-5f2e28e7.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Te(()=>import("./jump.es-3da96504.js"),["./jump.es-3da96504.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-5f2e28e7.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./mode.es-8d6b92d4.js"),["./mode.es-8d6b92d4.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(y=>{if(!O)return;S.current=y;const _=F.current;if(!_)return;const L=y(_,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:_,externalFragments:void 0},info:{schema:void 0,renderDescription:R=>ZT.render(R),onClick(R){w.current(R)}},jump:{schema:void 0,onClick(R){w.current(R)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...yO,"Cmd-S"(){},"Ctrl-S"(){}}});L.addKeyMap({"Cmd-Space"(){L.showHint({completeSingle:!0,container:_})},"Ctrl-Space"(){L.showHint({completeSingle:!0,container:_})},"Alt-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Alt-Space"(){L.showHint({completeSingle:!0,container:_})}}),L.on("keyup",(R,I)=>{$Ru.test(I.key)&&R.execCommand("autocomplete")});let T=!1;L.on("startCompletion",()=>{T=!0}),L.on("endCompletion",()=>{T=!1}),L.on("keydown",(R,I)=>{I.key==="Escape"&&T&&I.stopPropagation()}),L.on("beforeChange",(R,I)=>{var H;if(I.origin==="paste"){const V=I.text.map(bIe);(H=I.update)==null||H.call(I,I.from,I.to,V)}}),L.documentAST=null,L.operationName=null,L.operations=null,L.variableToType=null,h(L)}),()=>{O=!1}},[u,l,r,h]),S7(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function O(_){var L;const T=yJt(o,_.getValue()),R=Pqt(_.operations??void 0,_.operationName??void 0,T==null?void 0:T.operations);return _.documentAST=(T==null?void 0:T.documentAST)??null,_.operationName=R??null,_.operations=(T==null?void 0:T.operations)??null,m&&(m.state.lint.linterOptions.variableToType=T==null?void 0:T.variableToType,m.options.lint.variableToType=T==null?void 0:T.variableToType,m.options.hintOptions.variableToType=T==null?void 0:T.variableToType,(L=S.current)==null||L.signal(m,"change",m)),T?{...T,operationName:R}:null}Fe(O,"getAndUpdateOperationFacts");const y=Cp(100,_=>{const L=_.getValue();p==null||p.set(AIe,L);const T=_.operationName,R=O(_);(R==null?void 0:R.operationName)!==void 0&&(p==null||p.set(KRu,R.operationName)),i==null||i(L,R==null?void 0:R.documentAST),R!=null&&R.operationName&&T!==R.operationName&&d(R.operationName),g({query:L,operationName:(R==null?void 0:R.operationName)??null})});return O(c),c.on("change",y),()=>c.off("change",y)},[i,c,o,d,p,m,g]),kIe(c,o??null,S),FIe(c,E??null,S),yIe(c,s,S),qie(c,t||null,pE);const z=f==null?void 0:f.run,N=C.useCallback(()=>{var O;if(!z||!c||!c.operations||!c.hasFocus()){z==null||z();return}const y=c.indexFromPos(c.getCursor());let _;for(const L of c.operations)L.loc&&L.loc.start<=y&&L.loc.end>=y&&(_=(O=L.name)==null?void 0:O.value);_&&_!==c.operationName&&d(_),z()},[c,z,d]);return Ic(c,["Cmd-Enter","Ctrl-Enter"],N),Ic(c,["Shift-Ctrl-C"],b),Ic(c,["Shift-Ctrl-P","Shift-Ctrl-F"],A),Ic(c,["Shift-Ctrl-M"],k),F}Fe(pE,"useQueryEditor");function kIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(kIe,"useSynchronizeSchema");function FIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(FIe,"useSynchronizeValidationRules");function yIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Fe(yIe,"useSynchronizeExternalFragments");const $Ru=/^[a-zA-Z0-9_@(]$/,AIe="query",KRu="operationName";function _Ie({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(Oy);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(SIe(l)){const d=Iy({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?SO(i):null;l.tabs.push({id:Qie(),hash:d,title:E||Xie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(Zie)}}}Fe(_Ie,"getDefaultTabState");function SIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&wIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(BIe)}Fe(SIe,"isTabsState");function BIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&qY(u,"id")&&qY(u,"title")&&u5(u,"query")&&u5(u,"variables")&&u5(u,"headers")&&u5(u,"operationName")&&u5(u,"response")}Fe(BIe,"isTabState");function wIe(u,e){return e in u&&typeof u[e]=="number"}Fe(wIe,"hasNumberKey");function qY(u,e){return e in u&&typeof u[e]=="string"}Fe(qY,"hasStringKey");function u5(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Fe(u5,"hasStringOrNullKey");function LIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return Yie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Fe(LIe,"useSynchronizeActiveTabValues");function Jie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Fe(Jie,"serializeTabState");function zIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>Cp(500,n=>{u==null||u.set(Oy,n)}),[u]);return C.useCallback(n=>{t(Jie(n,e))},[e,t])}Fe(zIe,"useStoreTabs");function MIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Fe(MIe,"useSetEditorValues");function Zie({query:u=null,variables:e=null,headers:t=null}={}){return{id:Qie(),hash:Iy({query:u,variables:e,headers:t}),title:u&&SO(u)||Xie,query:u,variables:e,headers:t,operationName:null,response:null}}Fe(Zie,"createTab");function Yie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:Iy(i),title:i.operationName||(i.query?SO(i.query):void 0)||Xie}})}}Fe(Yie,"setPropertiesInActiveTab");function Qie(){const u=Fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Fe(Qie,"guid");function Iy(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Fe(Iy,"hashFromTabContents");function SO(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Fe(SO,"fuzzyExtractOperationName");function TIe(u){const e=u==null?void 0:u.get(Oy);if(e){const t=JSON.parse(e);u==null||u.set(Oy,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Fe(TIe,"clearHeadersFromTabs");const Xie="",Oy="tabState";function Mf({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ko({nonNull:!0,caller:r||Mf}),l=_7(),c=bp({caller:r||Mf}),d=q6({caller:r||Mf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let m=!0;return U6([Te(()=>import("./hint.es2-f357329b.js"),["./hint.es2-f357329b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./lint.es3-437bc8f0.js"),["./lint.es3-437bc8f0.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Te(()=>import("./mode.es2-9a0e7fa4.js"),["./mode.es2-9a0e7fa4.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(g=>{if(!m)return;E.current=g;const f=h.current;if(!f)return;const p=g(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:A}=x,F=b.startsWith("Key"),S=!A&&b.startsWith("Digit");(F||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{m=!1}},[u,a,i,s]),S7(o,"keyMap",e),Uie(o,n,NIe,"variables",Mf),qie(o,t||null,Mf),Ic(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(o,["Shift-Ctrl-P"],d),Ic(o,["Shift-Ctrl-M"],c),h}Fe(Mf,"useVariableEditor");const NIe="variables",PIe=Mg("EditorContext");function RIe(u){const e=Ng(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const R=(e==null?void 0:e.get(K$))!==null;return u.shouldPersistHeaders!==!1&&R?(e==null?void 0:e.get(K$))==="true":!!u.shouldPersistHeaders});$b(t,u.headers),$b(i,u.query),$b(a,u.response),$b(s,u.variables);const h=zIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const R=u.query??(e==null?void 0:e.get(AIe))??null,I=u.variables??(e==null?void 0:e.get(NIe))??null,H=u.headers??(e==null?void 0:e.get(X8))??null,V=u.response??"",U=_Ie({query:R,variables:I,headers:H,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||WRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(U),{query:R??(U.activeTabIndex===0?U.tabs[0].query:null)??"",variables:I??"",headers:H??u.defaultHeaders??"",response:V,tabState:U}}),[m,g]=C.useState(E.tabState),f=C.useCallback(R=>{if(R){e==null||e.set(X8,(t==null?void 0:t.getValue())??"");const I=Jie(m,!0);e==null||e.set(Oy,I)}else e==null||e.set(X8,""),TIe(e);d(R),e==null||e.set(K$,R.toString())},[e,m,t]),p=C.useRef();C.useEffect(()=>{const R=!!u.shouldPersistHeaders;(p==null?void 0:p.current)!==R&&(f(R),p.current=R)},[u.shouldPersistHeaders,f]);const D=LIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=MIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:A}=u,F=C.useCallback(()=>{g(R=>{const I=D(R),H={tabs:[...I.tabs,Zie({headers:k})],activeTabIndex:I.tabs.length};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[k,b,x,h,D]),S=C.useCallback(R=>{g(I=>{const H={...I,activeTabIndex:R};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),w=C.useCallback(R=>{g(I=>{const H=I.tabs[I.activeTabIndex],V={tabs:R,activeTabIndex:R.indexOf(H)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),z=C.useCallback(R=>{g(I=>{const H={tabs:I.tabs.filter((V,U)=>R!==U),activeTabIndex:Math.max(I.activeTabIndex-1,0)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),N=C.useCallback(R=>{g(I=>{const H=Yie(I,R);return h(H),b==null||b(H),H})},[b,h]),{onEditOperationName:O}=u,y=C.useCallback(R=>{i&&(i.operationName=R,N({operationName:R}),O==null||O(R))},[O,i,N]),_=C.useMemo(()=>{const R=new Map;if(Array.isArray(u.externalFragments))for(const I of u.externalFragments)R.set(I.name.value,I);else if(typeof u.externalFragments=="string")ad(Bg(u.externalFragments,{}),{FragmentDefinition(I){R.set(I.name.value,I)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return R},[u.externalFragments]),L=C.useMemo(()=>u.validationRules||[],[u.validationRules]),T=C.useMemo(()=>({...m,addTab:F,changeTab:S,moveTab:w,closeTab:z,updateActiveTabValues:N,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:y,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:_,validationRules:L,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[m,F,S,w,z,N,t,i,a,s,y,E,_,L,c,f]);return B.jsx(PIe.Provider,{value:T,children:A})}Fe(RIe,"EditorContextProvider");const Ko=Tg(PIe),K$="shouldPersistHeaders",WRu=`# Welcome to GraphiQL # # GraphiQL is an in-browser tool for writing, validating, and # testing GraphQL queries. @@ -1094,7 +1094,7 @@ ${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. # Auto Complete: Ctrl-Space (or just start typing) # -`;function uN({isHidden:u,...e}){const{headerEditor:t}=Ko({nonNull:!0,caller:uN}),n=Z5(e,uN);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(uN,"HeaderEditor");function nN(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=ere(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?B.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return B.jsxs("div",{children:[B.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Fe(nN,"ImagePreview");nN.shouldRender=Fe(function(u){const e=ere(u);return e?IIe(e):!1},"shouldRender");function ere(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Fe(ere,"tokenToURL");function IIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Fe(IIe,"isImageURL");function tre(u){const e=pE(u,tre);return B.jsx("div",{className:"graphiql-editor",ref:e})}Fe(tre,"QueryEditor");function iN({responseTooltip:u,editorTheme:e=kO,keyMap:t=FO}={},n){const{fetchError:i,validationErrors:r}=X1({nonNull:!0,caller:n||iN}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ko({nonNull:!0,caller:n||iN}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return U6([Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Te(()=>import("./mode.es3-666bdda0.js"),["./mode.es3-666bdda0.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Te(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(B.jsx(k,{pos:x,token:f})),nN.shouldRender(f)&&b.push(B.jsx(nN,{token:f},"image-preview")),b.length?(zx.render(b,E),E):(zx.unmountComponentAtNode(E),null)});const m=l.current;if(!m)return;const g=h(m,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:yO});s(g)}),()=>{d=!1}},[e,a,s]),S7(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(vy(r)))},[o,i,r]),l}Fe(iN,"useResponseEditor");function ure(u){const e=iN(u,ure);return B.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Fe(ure,"ResponseEditor");function rN({isHidden:u,...e}){const{variableEditor:t}=Ko({nonNull:!0,caller:rN}),n=Mf(e,rN);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(rN,"VariableEditor");function OIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w,visiblePlugin:z}){return B.jsx(VRe,{storage:F,children:B.jsx(XRe,{maxHistoryLength:d,children:B.jsx(RIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:m,query:D,response:x,shouldPersistHeaders:A,validationRules:S,variables:w,children:B.jsx($ie,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:B.jsx(YT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:B.jsx(Kie,{children:B.jsx(vIe,{onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,children:u})})})})})})})}Fe(OIe,"GraphiQLProvider");function jIe(){const u=Ng(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(W$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(W$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(W$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Fe(jIe,"useTheme");const W$="theme";function eB({defaultSizeRelation:u=GRu,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=Ng(),s=C.useMemo(()=>Cp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===FS||t==="first"?"first":D===yS||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),m=C.useRef(null),g=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||g.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===FS||D===yS?g.current:D),m.current&&(m.current.style.display="flex",m.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==FS&&b!==yS&&(h.current.style.flex=b||g.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!m.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",A=e==="horizontal"?"left":"top",F=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function w(N){N.preventDefault();const O=N[k]-D.getBoundingClientRect()[A];function y(L){if(L.buttons===0)return _();const T=L[k]-b.getBoundingClientRect()[A]-O,R=b.getBoundingClientRect()[F]-L[k]+O-D[S];if(T{D.removeEventListener("mousedown",w),D.removeEventListener("dblclick",z)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:m}),[l,c])}Fe(eB,"useDragResize");const GRu=1,FS="hide-first",yS="hide-second",tB=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return B.jsx(Ao,{label:u,children:B.jsx(la,{...t,ref:n,type:"button",className:Ha("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});tB.displayName="ToolbarButton";function aN(){const{queryEditor:u,setOperationName:e}=Ko({nonNull:!0,caller:aN}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=_7({nonNull:!0,caller:aN}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?B.jsx(NRu,{}):B.jsx(_Ru,{}),"aria-label":c};return s&&!l?B.jsxs(GE,{children:[B.jsx(Ao,{label:c,children:B.jsx(GE.Button,{...d})}),B.jsx(GE.Content,{children:o.map((h,E)=>{const m=h.name?h.name.value:``;return B.jsx(GE.Item,{onSelect:()=>{var g;const f=(g=h.name)==null?void 0:g.value;u&&f&&f!==u.operationName&&e(f),r()},children:m},`${m}-${E}`)})})]}):B.jsx(Ao,{label:c,children:B.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Fe(aN,"ExecuteButton");const URu=Fe(({button:u,children:e,label:t,...n})=>B.jsxs(GE,{...n,children:[B.jsx(Ao,{label:t,children:B.jsx(GE.Button,{className:Ha("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),B.jsx(GE.Content,{children:e})]}),"ToolbarMenuRoot");A7(URu,{Item:GE.Item});var JY=globalThis&&globalThis.__assign||function(){return JY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},JRu=parseInt(M.version.slice(0,2),10);if(JRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` +`;function uN({isHidden:u,...e}){const{headerEditor:t}=Ko({nonNull:!0,caller:uN}),n=Z5(e,uN);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(uN,"HeaderEditor");function nN(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=ere(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?B.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return B.jsxs("div",{children:[B.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Fe(nN,"ImagePreview");nN.shouldRender=Fe(function(u){const e=ere(u);return e?IIe(e):!1},"shouldRender");function ere(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Fe(ere,"tokenToURL");function IIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Fe(IIe,"isImageURL");function tre(u){const e=pE(u,tre);return B.jsx("div",{className:"graphiql-editor",ref:e})}Fe(tre,"QueryEditor");function iN({responseTooltip:u,editorTheme:e=kO,keyMap:t=FO}={},n){const{fetchError:i,validationErrors:r}=X1({nonNull:!0,caller:n||iN}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ko({nonNull:!0,caller:n||iN}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return U6([Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Te(()=>import("./mode.es3-91b27d8c.js"),["./mode.es3-91b27d8c.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Te(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(B.jsx(k,{pos:x,token:f})),nN.shouldRender(f)&&b.push(B.jsx(nN,{token:f},"image-preview")),b.length?(zx.render(b,E),E):(zx.unmountComponentAtNode(E),null)});const m=l.current;if(!m)return;const g=h(m,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:yO});s(g)}),()=>{d=!1}},[e,a,s]),S7(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(vy(r)))},[o,i,r]),l}Fe(iN,"useResponseEditor");function ure(u){const e=iN(u,ure);return B.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Fe(ure,"ResponseEditor");function rN({isHidden:u,...e}){const{variableEditor:t}=Ko({nonNull:!0,caller:rN}),n=Mf(e,rN);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(rN,"VariableEditor");function OIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w,visiblePlugin:z}){return B.jsx(VRe,{storage:F,children:B.jsx(XRe,{maxHistoryLength:d,children:B.jsx(RIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:m,query:D,response:x,shouldPersistHeaders:A,validationRules:S,variables:w,children:B.jsx($ie,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:B.jsx(YT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:B.jsx(Kie,{children:B.jsx(vIe,{onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,children:u})})})})})})})}Fe(OIe,"GraphiQLProvider");function jIe(){const u=Ng(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(W$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(W$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(W$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Fe(jIe,"useTheme");const W$="theme";function eB({defaultSizeRelation:u=GRu,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=Ng(),s=C.useMemo(()=>Cp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===FS||t==="first"?"first":D===yS||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),m=C.useRef(null),g=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||g.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===FS||D===yS?g.current:D),m.current&&(m.current.style.display="flex",m.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==FS&&b!==yS&&(h.current.style.flex=b||g.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!m.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",A=e==="horizontal"?"left":"top",F=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function w(N){N.preventDefault();const O=N[k]-D.getBoundingClientRect()[A];function y(L){if(L.buttons===0)return _();const T=L[k]-b.getBoundingClientRect()[A]-O,R=b.getBoundingClientRect()[F]-L[k]+O-D[S];if(T{D.removeEventListener("mousedown",w),D.removeEventListener("dblclick",z)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:m}),[l,c])}Fe(eB,"useDragResize");const GRu=1,FS="hide-first",yS="hide-second",tB=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return B.jsx(Ao,{label:u,children:B.jsx(la,{...t,ref:n,type:"button",className:Ha("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});tB.displayName="ToolbarButton";function aN(){const{queryEditor:u,setOperationName:e}=Ko({nonNull:!0,caller:aN}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=_7({nonNull:!0,caller:aN}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?B.jsx(NRu,{}):B.jsx(_Ru,{}),"aria-label":c};return s&&!l?B.jsxs(GE,{children:[B.jsx(Ao,{label:c,children:B.jsx(GE.Button,{...d})}),B.jsx(GE.Content,{children:o.map((h,E)=>{const m=h.name?h.name.value:``;return B.jsx(GE.Item,{onSelect:()=>{var g;const f=(g=h.name)==null?void 0:g.value;u&&f&&f!==u.operationName&&e(f),r()},children:m},`${m}-${E}`)})})]}):B.jsx(Ao,{label:c,children:B.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Fe(aN,"ExecuteButton");const URu=Fe(({button:u,children:e,label:t,...n})=>B.jsxs(GE,{...n,children:[B.jsx(Ao,{label:t,children:B.jsx(GE.Button,{className:Ha("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),B.jsx(GE.Content,{children:e})]}),"ToolbarMenuRoot");A7(URu,{Item:GE.Item});var JY=globalThis&&globalThis.__assign||function(){return JY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},JRu=parseInt(M.version.slice(0,2),10);if(JRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` `));function UE(u){var e,t=u.dangerouslyAssumeSchemaIsValid,n=u.defaultQuery,i=u.defaultTabs,r=u.externalFragments,a=u.fetcher,o=u.getDefaultFieldNames,s=u.headers,l=u.inputValueDeprecation,c=u.introspectionQueryName,d=u.maxHistoryLength,h=u.onEditOperationName,E=u.onSchemaChange,m=u.onTabChange,g=u.onTogglePluginVisibility,f=u.operationName,p=u.plugins,D=u.query,x=u.response,b=u.schema,k=u.schemaDescription,A=u.shouldPersistHeaders,F=u.storage,S=u.validationRules,w=u.variables,z=u.visiblePlugin,N=u.defaultHeaders,O=qRu(u,["dangerouslyAssumeSchemaIsValid","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders"]);if(typeof a!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");return M.createElement(OIe,{getDefaultFieldNames:o,dangerouslyAssumeSchemaIsValid:t,defaultQuery:n,defaultHeaders:N,defaultTabs:i,externalFragments:r,fetcher:a,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,operationName:f,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w},M.createElement(ZRu,JY({showPersistHeadersSettings:A!==!1,disableTabs:(e=O.disableTabs)!==null&&e!==void 0?e:!1},O)))}UE.Logo=HIe;UE.Toolbar=VIe;UE.Footer=$Ie;function ZRu(u){var e,t,n,i,r=(e=u.isHeadersEditorEnabled)!==null&&e!==void 0?e:!0,a=Ko({nonNull:!0}),o=_7({nonNull:!0}),s=X1({nonNull:!0}),l=Ng(),c=AO(),d=_O({onCopyQuery:u.onCopyQuery}),h=bp(),E=q6(),m=jIe(),g=m.theme,f=m.setTheme,p=(t=c==null?void 0:c.visiblePlugin)===null||t===void 0?void 0:t.content,D=eB({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:c!=null&&c.visiblePlugin?void 0:"first",onHiddenElementChange:function(de){de==="first"&&(c==null||c.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),x=eB({direction:"horizontal",storageKey:"editorFlex"}),b=eB({defaultSizeRelation:3,direction:"vertical",initiallyHidden:function(){if(!(u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"))return typeof u.defaultEditorToolsVisibility=="boolean"?u.defaultEditorToolsVisibility?void 0:"second":a.initialVariables||a.initialHeaders?void 0:"second"}(),sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"}),k=uB(C.useState(function(){return u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"?u.defaultEditorToolsVisibility:!a.initialVariables&&a.initialHeaders&&r?"headers":"variables"}),2),A=k[0],F=k[1],S=uB(C.useState(null),2),w=S[0],z=S[1],N=uB(C.useState(null),2),O=N[0],y=N[1],_=M.Children.toArray(u.children),L=_.find(function(de){return U$(de,UE.Logo)})||M.createElement(UE.Logo,null),T=_.find(function(de){return U$(de,UE.Toolbar)})||M.createElement(M.Fragment,null,M.createElement(tB,{onClick:E,label:"Prettify query (Shift-Ctrl-P)"},M.createElement(BRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(tB,{onClick:h,label:"Merge fragments into query (Shift-Ctrl-M)"},M.createElement(yRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(tB,{onClick:d,label:"Copy query (Shift-Ctrl-C)"},M.createElement(hRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),((n=u.toolbar)===null||n===void 0?void 0:n.additionalContent)&&u.toolbar.additionalContent,((i=u.toolbar)===null||i===void 0?void 0:i.additionalComponent)&&M.createElement(u.toolbar.additionalComponent,null)),R=_.find(function(de){return U$(de,UE.Footer)}),I=C.useCallback(function(){D.hiddenElement==="first"&&D.setHiddenElement(null)},[D]),H=C.useCallback(function(){try{l==null||l.clear(),y("success")}catch{y("error")}},[l]),V=C.useCallback(function(de){a.setShouldPersistHeaders(de.currentTarget.dataset.value==="true")},[a]),U=C.useCallback(function(de){var he=de.currentTarget.dataset.theme;f(he||null)},[f]),J=a.addTab,Y=s.introspect,X=a.moveTab,re=C.useCallback(function(de){z(de.currentTarget.dataset.value)},[]),ge=C.useCallback(function(de){var he=c,Be=Number(de.currentTarget.dataset.index),je=he.plugins.find(function(qt,ou){return Be===ou}),bt=je===he.visiblePlugin;bt?(he.setVisiblePlugin(null),D.setHiddenElement("first")):(he.setVisiblePlugin(je),D.setHiddenElement(null))},[c,D]),_e=C.useCallback(function(de){b.hiddenElement==="second"&&b.setHiddenElement(null),F(de.currentTarget.dataset.name)},[b]),Ve=C.useCallback(function(){b.setHiddenElement(b.hiddenElement==="second"?null:"second")},[b]),Ue=C.useCallback(function(de){de||z(null)},[]),qe=C.useCallback(function(de){de||(z(null),y(null))},[]),Se=M.createElement(Ao,{label:"Add tab"},M.createElement(la,{type:"button",className:"graphiql-tab-add",onClick:J,"aria-label":"Add tab"},M.createElement(SRu,{"aria-hidden":"true"})));return M.createElement(Ao.Provider,null,M.createElement("div",{"data-testid":"graphiql-container",className:"graphiql-container"},M.createElement("div",{className:"graphiql-sidebar"},M.createElement("div",{className:"graphiql-sidebar-section"},c==null?void 0:c.plugins.map(function(de,he){var Be=de===c.visiblePlugin,je="".concat(Be?"Hide":"Show"," ").concat(de.title),bt=de.icon;return M.createElement(Ao,{key:de.title,label:je},M.createElement(la,{type:"button",className:Be?"active":"",onClick:ge,"data-index":he,"aria-label":je},M.createElement(bt,{"aria-hidden":"true"})))})),M.createElement("div",{className:"graphiql-sidebar-section"},M.createElement(Ao,{label:"Re-fetch GraphQL schema"},M.createElement(la,{type:"button",disabled:s.isFetching,onClick:Y,"aria-label":"Re-fetch GraphQL schema"},M.createElement(wRu,{className:s.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),M.createElement(Ao,{label:"Open short keys dialog"},M.createElement(la,{type:"button","data-value":"short-keys",onClick:re,"aria-label":"Open short keys dialog"},M.createElement(kRu,{"aria-hidden":"true"}))),M.createElement(Ao,{label:"Open settings dialog"},M.createElement(la,{type:"button","data-value":"settings",onClick:re,"aria-label":"Open settings dialog"},M.createElement(zRu,{"aria-hidden":"true"}))))),M.createElement("div",{className:"graphiql-main"},M.createElement("div",{ref:D.firstRef,style:{minWidth:"200px"}},M.createElement("div",{className:"graphiql-plugin"},p?M.createElement(p,null):null)),(c==null?void 0:c.visiblePlugin)&&M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:D.dragBarRef}),M.createElement("div",{ref:D.secondRef,className:"graphiql-sessions"},M.createElement("div",{className:"graphiql-session-header"},u.disableTabs?null:M.createElement(YRe,{values:a.tabs,onReorder:X,"aria-label":"Select active operation"},a.tabs.length>1&&M.createElement(M.Fragment,null,a.tabs.map(function(de,he){return M.createElement($$,{key:de.id,value:de,isActive:he===a.activeTabIndex},M.createElement($$.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(he),onClick:function(){o.stop(),a.changeTab(he)}},de.title),M.createElement($$.Close,{onClick:function(){a.activeTabIndex===he&&o.stop(),a.closeTab(he)}}))}),Se)),M.createElement("div",{className:"graphiql-session-header-right"},a.tabs.length===1&&Se,L)),M.createElement("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":"graphiql-session-tab-".concat(a.activeTabIndex)},M.createElement("div",{ref:x.firstRef},M.createElement("div",{className:"graphiql-editors".concat(a.tabs.length===1?" full-height":"")},M.createElement("div",{ref:b.firstRef},M.createElement("section",{className:"graphiql-query-editor","aria-label":"Query Editor"},M.createElement(tre,{editorTheme:u.editorTheme,keyMap:u.keyMap,onClickReference:I,onCopyQuery:u.onCopyQuery,onEdit:u.onEditQuery,readOnly:u.readOnly}),M.createElement("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands"},M.createElement(aN,null),T))),M.createElement("div",{ref:b.dragBarRef},M.createElement("div",{className:"graphiql-editor-tools"},M.createElement(la,{type:"button",className:A==="variables"&&b.hiddenElement!=="second"?"active":"",onClick:_e,"data-name":"variables"},"Variables"),r&&M.createElement(la,{type:"button",className:A==="headers"&&b.hiddenElement!=="second"?"active":"",onClick:_e,"data-name":"headers"},"Headers"),M.createElement(Ao,{label:b.hiddenElement==="second"?"Show editor tools":"Hide editor tools"},M.createElement(la,{type:"button",onClick:Ve,"aria-label":b.hiddenElement==="second"?"Show editor tools":"Hide editor tools",className:"graphiql-toggle-editor-tools"},b.hiddenElement==="second"?M.createElement(dRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}):M.createElement(lRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),M.createElement("div",{ref:b.secondRef},M.createElement("section",{className:"graphiql-editor-tool","aria-label":A==="variables"?"Variables":"Headers"},M.createElement(rN,{editorTheme:u.editorTheme,isHidden:A!=="variables",keyMap:u.keyMap,onEdit:u.onEditVariables,onClickReference:I,readOnly:u.readOnly}),r&&M.createElement(uN,{editorTheme:u.editorTheme,isHidden:A!=="headers",keyMap:u.keyMap,onEdit:u.onEditHeaders,readOnly:u.readOnly}))))),M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:x.dragBarRef}),M.createElement("div",{ref:x.secondRef},M.createElement("div",{className:"graphiql-response"},o.isFetching?M.createElement(Hie,null):null,M.createElement(ure,{editorTheme:u.editorTheme,responseTooltip:u.responseTooltip,keyMap:u.keyMap}),R))))),M.createElement(VD,{open:w==="short-keys",onOpenChange:Ue},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(VD.Title,{className:"graphiql-dialog-title"},"Short Keys"),M.createElement(VD.Close,null)),M.createElement("div",{className:"graphiql-dialog-section"},M.createElement(QRu,{keyMap:u.keyMap||"sublime"}))),M.createElement(VD,{open:w==="settings",onOpenChange:qe},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(VD.Title,{className:"graphiql-dialog-title"},"Settings"),M.createElement(VD.Close,null)),u.showPersistHeadersSettings?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Persist headers"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Save headers upon reloading."," ",M.createElement("span",{className:"graphiql-warning-text"},"Only enable if you trust this device."))),M.createElement($Y,null,M.createElement(Ac,{type:"button",id:"enable-persist-headers",className:a.shouldPersistHeaders?"active":"","data-value":"true",onClick:V},"On"),M.createElement(Ac,{type:"button",id:"disable-persist-headers",className:a.shouldPersistHeaders?"":"active",onClick:V},"Off"))):null,M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Theme"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Adjust how the interface looks like.")),M.createElement($Y,null,M.createElement(Ac,{type:"button",className:g===null?"active":"",onClick:U},"System"),M.createElement(Ac,{type:"button",className:g==="light"?"active":"","data-theme":"light",onClick:U},"Light"),M.createElement(Ac,{type:"button",className:g==="dark"?"active":"","data-theme":"dark",onClick:U},"Dark"))),l?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Clear storage"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Remove all locally stored data and start fresh.")),M.createElement(Ac,{type:"button",state:O||void 0,disabled:O==="success",onClick:H},{success:"Cleared data",error:"Failed"}[O]||"Clear data")):null)))}var G$=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",YRu=Object.entries({"Search in editor":[G$,"F"],"Search in documentation":[G$,"K"],"Execute query":[G$,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function QRu(u){var e=u.keyMap;return M.createElement("div",null,M.createElement("table",{className:"graphiql-table"},M.createElement("thead",null,M.createElement("tr",null,M.createElement("th",null,"Short Key"),M.createElement("th",null,"Function"))),M.createElement("tbody",null,YRu.map(function(t){var n=uB(t,2),i=n[0],r=n[1];return M.createElement("tr",{key:i},M.createElement("td",null,r.map(function(a,o,s){return M.createElement(C.Fragment,{key:a},M.createElement("code",{className:"graphiql-key"},a),o!==s.length-1&&" + ")})),M.createElement("td",null,i))}))),M.createElement("p",null,"The editors use"," ",M.createElement("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer"},"CodeMirror Key Maps")," ","that add more short keys. This instance of Graph",M.createElement("em",null,"i"),"QL uses"," ",M.createElement("code",null,e),"."))}function HIe(u){return M.createElement("div",{className:"graphiql-logo"},u.children||M.createElement("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer"},"Graph",M.createElement("em",null,"i"),"QL"))}HIe.displayName="GraphiQLLogo";function VIe(u){return M.createElement(M.Fragment,null,u.children)}VIe.displayName="GraphiQLToolbar";function $Ie(u){return M.createElement("div",{className:"graphiql-footer"},u.children)}$Ie.displayName="GraphiQLFooter";function U$(u,e){var t;return!((t=u==null?void 0:u.type)===null||t===void 0)&&t.displayName&&u.type.displayName===e.displayName?!0:u.type===e}/** * @remix-run/router v1.14.2 * @@ -1122,11 +1122,11 @@ ${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function QY(){return QY=Object.assign?Object.assign.bind():function(u){for(var e=1;e=0)&&(t[i]=u[i]);return t}function UIu(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function qIu(u,e){return u.button===0&&(!e||e==="_self")&&!UIu(u)}const JIu=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ZIu="startTransition",n5e=wm[ZIu];function YIu(u){let{basename:e,children:t,future:n,window:i}=u,r=C.useRef();r.current==null&&(r.current=XRu({window:i,v5Compat:!0}));let a=r.current,[o,s]=C.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},c=C.useCallback(d=>{l&&n5e?n5e(()=>s(d)):s(d)},[s,l]);return C.useLayoutEffect(()=>a.listen(c),[a,c]),C.createElement(KIu,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,future:n})}const QIu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XIu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XY=C.forwardRef(function(e,t){let{onClick:n,relative:i,reloadDocument:r,replace:a,state:o,target:s,to:l,preventScrollReset:c,unstable_viewTransition:d}=e,h=GIu(e,JIu),{basename:E}=C.useContext(aD),m,g=!1;if(typeof l=="string"&&XIu.test(l)&&(m=l,QIu))try{let x=new URL(window.location.href),b=l.startsWith("//")?new URL(x.protocol+l):new URL(l),k=nre(b.pathname,E);b.origin===x.origin&&k!=null?l=k+b.search+b.hash:g=!0}catch{}let f=AIu(l,{relative:i}),p=eOu(l,{replace:a,state:o,target:s,preventScrollReset:c,relative:i,unstable_viewTransition:d});function D(x){n&&n(x),x.defaultPrevented||p(x)}return C.createElement("a",QY({},h,{href:m||f,onClick:g||r?n:D,ref:t,target:s}))});var i5e;(function(u){u.UseScrollRestoration="useScrollRestoration",u.UseSubmit="useSubmit",u.UseSubmitFetcher="useSubmitFetcher",u.UseFetcher="useFetcher",u.useViewTransitionState="useViewTransitionState"})(i5e||(i5e={}));var r5e;(function(u){u.UseFetcher="useFetcher",u.UseFetchers="useFetchers",u.UseScrollRestoration="useScrollRestoration"})(r5e||(r5e={}));function eOu(u,e){let{target:t,replace:n,state:i,preventScrollReset:r,relative:a,unstable_viewTransition:o}=e===void 0?{}:e,s=YIe(),l=LO(),c=QIe(u,{relative:a});return C.useCallback(d=>{if(qIu(d,t)){d.preventDefault();let h=n!==void 0?n:oN(l)===oN(c);s(u,{replace:h,state:i,preventScrollReset:r,relative:a,unstable_viewTransition:o})}},[l,s,c,n,i,t,u,r,a,o])}const zO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J6(u){const e=Object.prototype.toString.call(u);return e==="[object Window]"||e==="[object global]"}function rre(u){return"nodeType"in u}function bs(u){var e,t;return u?J6(u)?u:rre(u)&&(e=(t=u.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function are(u){const{Document:e}=bs(u);return u instanceof e}function w7(u){return J6(u)?!1:u instanceof bs(u).HTMLElement}function tOu(u){return u instanceof bs(u).SVGElement}function Z6(u){return u?J6(u)?u.document:rre(u)?are(u)?u:w7(u)?u.ownerDocument:document:document:document}const sd=zO?C.useLayoutEffect:C.useEffect;function MO(u){const e=C.useRef(u);return sd(()=>{e.current=u}),C.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i{u.current=setInterval(n,i)},[]),t=C.useCallback(()=>{u.current!==null&&(clearInterval(u.current),u.current=null)},[]);return[e,t]}function Vy(u,e){e===void 0&&(e=[u]);const t=C.useRef(u);return sd(()=>{t.current!==u&&(t.current=u)},e),t}function L7(u,e){const t=C.useRef();return C.useMemo(()=>{const n=u(t.current);return t.current=n,n},[...e])}function lN(u){const e=MO(u),t=C.useRef(null),n=C.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,n]}function cN(u){const e=C.useRef();return C.useEffect(()=>{e.current=u},[u]),e.current}let J$={};function z7(u,e){return C.useMemo(()=>{if(e)return e;const t=J$[u]==null?0:J$[u]+1;return J$[u]=t,u+"-"+t},[u,e])}function tOe(u){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const o=Object.entries(a);for(const[s,l]of o){const c=r[s];c!=null&&(r[s]=c+u*l)}return r},{...e})}}const Hx=tOe(1),dN=tOe(-1);function nOu(u){return"clientX"in u&&"clientY"in u}function ore(u){if(!u)return!1;const{KeyboardEvent:e}=bs(u.target);return e&&u instanceof e}function iOu(u){if(!u)return!1;const{TouchEvent:e}=bs(u.target);return e&&u instanceof e}function hN(u){if(iOu(u)){if(u.touches&&u.touches.length){const{clientX:e,clientY:t}=u.touches[0];return{x:e,y:t}}else if(u.changedTouches&&u.changedTouches.length){const{clientX:e,clientY:t}=u.changedTouches[0];return{x:e,y:t}}}return nOu(u)?{x:u.clientX,y:u.clientY}:null}const $y=Object.freeze({Translate:{toString(u){if(!u)return;const{x:e,y:t}=u;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(u){if(!u)return;const{scaleX:e,scaleY:t}=u;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(u){if(u)return[$y.Translate.toString(u),$y.Scale.toString(u)].join(" ")}},Transition:{toString(u){let{property:e,duration:t,easing:n}=u;return e+" "+t+"ms "+n}}}),a5e="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rOu(u){return u.matches(a5e)?u:u.querySelector(a5e)}const aOu={display:"none"};function oOu(u){let{id:e,value:t}=u;return M.createElement("div",{id:e,style:aOu},t)}const sOu={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function lOu(u){let{id:e,announcement:t}=u;return M.createElement("div",{id:e,style:sOu,role:"status","aria-live":"assertive","aria-atomic":!0},t)}function cOu(){const[u,e]=C.useState("");return{announce:C.useCallback(n=>{n!=null&&e(n)},[]),announcement:u}}const uOe=C.createContext(null);function dOu(u){const e=C.useContext(uOe);C.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of ");return e(u)},[u,e])}function hOu(){const[u]=C.useState(()=>new Set),e=C.useCallback(n=>(u.add(n),()=>u.delete(n)),[u]);return[C.useCallback(n=>{let{type:i,event:r}=n;u.forEach(a=>{var o;return(o=a[i])==null?void 0:o.call(a,r)})},[u]),e]}const EOu={draggable:` + */function QY(){return QY=Object.assign?Object.assign.bind():function(u){for(var e=1;e=0)&&(t[i]=u[i]);return t}function UIu(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function qIu(u,e){return u.button===0&&(!e||e==="_self")&&!UIu(u)}const JIu=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ZIu="startTransition",n5e=wm[ZIu];function YIu(u){let{basename:e,children:t,future:n,window:i}=u,r=C.useRef();r.current==null&&(r.current=XRu({window:i,v5Compat:!0}));let a=r.current,[o,s]=C.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},c=C.useCallback(d=>{l&&n5e?n5e(()=>s(d)):s(d)},[s,l]);return C.useLayoutEffect(()=>a.listen(c),[a,c]),C.createElement(KIu,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,future:n})}const QIu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XIu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XY=C.forwardRef(function(e,t){let{onClick:n,relative:i,reloadDocument:r,replace:a,state:o,target:s,to:l,preventScrollReset:c,unstable_viewTransition:d}=e,h=GIu(e,JIu),{basename:E}=C.useContext(aD),m,g=!1;if(typeof l=="string"&&XIu.test(l)&&(m=l,QIu))try{let x=new URL(window.location.href),b=l.startsWith("//")?new URL(x.protocol+l):new URL(l),k=nre(b.pathname,E);b.origin===x.origin&&k!=null?l=k+b.search+b.hash:g=!0}catch{}let f=AIu(l,{relative:i}),p=eOu(l,{replace:a,state:o,target:s,preventScrollReset:c,relative:i,unstable_viewTransition:d});function D(x){n&&n(x),x.defaultPrevented||p(x)}return C.createElement("a",QY({},h,{href:m||f,onClick:g||r?n:D,ref:t,target:s}))});var i5e;(function(u){u.UseScrollRestoration="useScrollRestoration",u.UseSubmit="useSubmit",u.UseSubmitFetcher="useSubmitFetcher",u.UseFetcher="useFetcher",u.useViewTransitionState="useViewTransitionState"})(i5e||(i5e={}));var r5e;(function(u){u.UseFetcher="useFetcher",u.UseFetchers="useFetchers",u.UseScrollRestoration="useScrollRestoration"})(r5e||(r5e={}));function eOu(u,e){let{target:t,replace:n,state:i,preventScrollReset:r,relative:a,unstable_viewTransition:o}=e===void 0?{}:e,s=YIe(),l=LO(),c=QIe(u,{relative:a});return C.useCallback(d=>{if(qIu(d,t)){d.preventDefault();let h=n!==void 0?n:oN(l)===oN(c);s(u,{replace:h,state:i,preventScrollReset:r,relative:a,unstable_viewTransition:o})}},[l,s,c,n,i,t,u,r,a,o])}const zO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J6(u){const e=Object.prototype.toString.call(u);return e==="[object Window]"||e==="[object global]"}function rre(u){return"nodeType"in u}function ks(u){var e,t;return u?J6(u)?u:rre(u)&&(e=(t=u.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function are(u){const{Document:e}=ks(u);return u instanceof e}function w7(u){return J6(u)?!1:u instanceof ks(u).HTMLElement}function tOu(u){return u instanceof ks(u).SVGElement}function Z6(u){return u?J6(u)?u.document:rre(u)?are(u)?u:w7(u)?u.ownerDocument:document:document:document}const sd=zO?C.useLayoutEffect:C.useEffect;function MO(u){const e=C.useRef(u);return sd(()=>{e.current=u}),C.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i{u.current=setInterval(n,i)},[]),t=C.useCallback(()=>{u.current!==null&&(clearInterval(u.current),u.current=null)},[]);return[e,t]}function Vy(u,e){e===void 0&&(e=[u]);const t=C.useRef(u);return sd(()=>{t.current!==u&&(t.current=u)},e),t}function L7(u,e){const t=C.useRef();return C.useMemo(()=>{const n=u(t.current);return t.current=n,n},[...e])}function lN(u){const e=MO(u),t=C.useRef(null),n=C.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,n]}function cN(u){const e=C.useRef();return C.useEffect(()=>{e.current=u},[u]),e.current}let J$={};function z7(u,e){return C.useMemo(()=>{if(e)return e;const t=J$[u]==null?0:J$[u]+1;return J$[u]=t,u+"-"+t},[u,e])}function tOe(u){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{const o=Object.entries(a);for(const[s,l]of o){const c=r[s];c!=null&&(r[s]=c+u*l)}return r},{...e})}}const Hx=tOe(1),dN=tOe(-1);function nOu(u){return"clientX"in u&&"clientY"in u}function ore(u){if(!u)return!1;const{KeyboardEvent:e}=ks(u.target);return e&&u instanceof e}function iOu(u){if(!u)return!1;const{TouchEvent:e}=ks(u.target);return e&&u instanceof e}function hN(u){if(iOu(u)){if(u.touches&&u.touches.length){const{clientX:e,clientY:t}=u.touches[0];return{x:e,y:t}}else if(u.changedTouches&&u.changedTouches.length){const{clientX:e,clientY:t}=u.changedTouches[0];return{x:e,y:t}}}return nOu(u)?{x:u.clientX,y:u.clientY}:null}const $y=Object.freeze({Translate:{toString(u){if(!u)return;const{x:e,y:t}=u;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(u){if(!u)return;const{scaleX:e,scaleY:t}=u;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(u){if(u)return[$y.Translate.toString(u),$y.Scale.toString(u)].join(" ")}},Transition:{toString(u){let{property:e,duration:t,easing:n}=u;return e+" "+t+"ms "+n}}}),a5e="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rOu(u){return u.matches(a5e)?u:u.querySelector(a5e)}const aOu={display:"none"};function oOu(u){let{id:e,value:t}=u;return M.createElement("div",{id:e,style:aOu},t)}const sOu={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function lOu(u){let{id:e,announcement:t}=u;return M.createElement("div",{id:e,style:sOu,role:"status","aria-live":"assertive","aria-atomic":!0},t)}function cOu(){const[u,e]=C.useState("");return{announce:C.useCallback(n=>{n!=null&&e(n)},[]),announcement:u}}const uOe=C.createContext(null);function dOu(u){const e=C.useContext(uOe);C.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of ");return e(u)},[u,e])}function hOu(){const[u]=C.useState(()=>new Set),e=C.useCallback(n=>(u.add(n),()=>u.delete(n)),[u]);return[C.useCallback(n=>{let{type:i,event:r}=n;u.forEach(a=>{var o;return(o=a[i])==null?void 0:o.call(a,r)})},[u]),e]}const EOu={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},mOu={onDragStart(u){let{active:e}=u;return"Picked up draggable item "+e.id+"."},onDragOver(u){let{active:e,over:t}=u;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(u){let{active:e,over:t}=u;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(u){let{active:e}=u;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function gOu(u){let{announcements:e=mOu,container:t,hiddenTextDescribedById:n,screenReaderInstructions:i=EOu}=u;const{announce:r,announcement:a}=cOu(),o=z7("DndLiveRegion"),[s,l]=C.useState(!1);if(C.useEffect(()=>{l(!0)},[]),dOu(C.useMemo(()=>({onDragStart(d){let{active:h}=d;r(e.onDragStart({active:h}))},onDragMove(d){let{active:h,over:E}=d;e.onDragMove&&r(e.onDragMove({active:h,over:E}))},onDragOver(d){let{active:h,over:E}=d;r(e.onDragOver({active:h,over:E}))},onDragEnd(d){let{active:h,over:E}=d;r(e.onDragEnd({active:h,over:E}))},onDragCancel(d){let{active:h,over:E}=d;r(e.onDragCancel({active:h,over:E}))}}),[r,e])),!s)return null;const c=M.createElement(M.Fragment,null,M.createElement(oOu,{id:n,value:i.draggable}),M.createElement(lOu,{id:o,announcement:a}));return t?ns.createPortal(c,t):c}var ha;(function(u){u.DragStart="dragStart",u.DragMove="dragMove",u.DragEnd="dragEnd",u.DragCancel="dragCancel",u.DragOver="dragOver",u.RegisterDroppable="registerDroppable",u.SetDroppableDisabled="setDroppableDisabled",u.UnregisterDroppable="unregisterDroppable"})(ha||(ha={}));function EN(){}const ld=Object.freeze({x:0,y:0});function fOu(u,e){return Math.sqrt(Math.pow(u.x-e.x,2)+Math.pow(u.y-e.y,2))}function pOu(u,e){const t=hN(u);if(!t)return"0 0";const n={x:(t.x-e.left)/e.width*100,y:(t.y-e.top)/e.height*100};return n.x+"% "+n.y+"%"}function DOu(u,e){let{data:{value:t}}=u,{data:{value:n}}=e;return t-n}function xOu(u,e){let{data:{value:t}}=u,{data:{value:n}}=e;return n-t}function vOu(u,e){if(!u||u.length===0)return null;const[t]=u;return e?t[e]:t}function o5e(u,e,t){return e===void 0&&(e=u.left),t===void 0&&(t=u.top),{x:e+u.width*.5,y:t+u.height*.5}}const COu=u=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=u;const i=o5e(e,e.left,e.top),r=[];for(const a of n){const{id:o}=a,s=t.get(o);if(s){const l=fOu(o5e(s),i);r.push({id:o,data:{droppableContainer:a,value:l}})}}return r.sort(DOu)};function bOu(u,e){const t=Math.max(e.top,u.top),n=Math.max(e.left,u.left),i=Math.min(e.left+e.width,u.left+u.width),r=Math.min(e.top+e.height,u.top+u.height),a=i-n,o=r-t;if(n{let{collisionRect:e,droppableRects:t,droppableContainers:n}=u;const i=[];for(const r of n){const{id:a}=r,o=t.get(a);if(o){const s=bOu(o,e);s>0&&i.push({id:a,data:{droppableContainer:r,value:s}})}}return i.sort(xOu)};function FOu(u,e,t){return{...u,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function nOe(u,e){return u&&e?{x:u.left-e.left,y:u.top-e.top}:ld}function yOu(u){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r({...a,top:a.top+u*o.y,bottom:a.bottom+u*o.y,left:a.left+u*o.x,right:a.right+u*o.x}),{...t})}}const AOu=yOu(1);function iOe(u){if(u.startsWith("matrix3d(")){const e=u.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(u.startsWith("matrix(")){const e=u.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function _Ou(u,e,t){const n=iOe(e);if(!n)return u;const{scaleX:i,scaleY:r,x:a,y:o}=n,s=u.left-a-(1-i)*parseFloat(t),l=u.top-o-(1-r)*parseFloat(t.slice(t.indexOf(" ")+1)),c=i?u.width/i:u.width,d=r?u.height/r:u.height;return{width:c,height:d,top:l,right:s+c,bottom:l+d,left:s}}const SOu={ignoreTransform:!1};function M7(u,e){e===void 0&&(e=SOu);let t=u.getBoundingClientRect();if(e.ignoreTransform){const{transform:l,transformOrigin:c}=bs(u).getComputedStyle(u);l&&(t=_Ou(t,l,c))}const{top:n,left:i,width:r,height:a,bottom:o,right:s}=t;return{top:n,left:i,width:r,height:a,bottom:o,right:s}}function s5e(u){return M7(u,{ignoreTransform:!0})}function BOu(u){const e=u.innerWidth,t=u.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function wOu(u,e){return e===void 0&&(e=bs(u).getComputedStyle(u)),e.position==="fixed"}function LOu(u,e){e===void 0&&(e=bs(u).getComputedStyle(u));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const r=e[i];return typeof r=="string"?t.test(r):!1})}function sre(u,e){const t=[];function n(i){if(e!=null&&t.length>=e||!i)return t;if(are(i)&&i.scrollingElement!=null&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!w7(i)||tOu(i)||t.includes(i))return t;const r=bs(u).getComputedStyle(i);return i!==u&&LOu(i,r)&&t.push(i),wOu(i,r)?t:n(i.parentNode)}return u?n(u):t}function rOe(u){const[e]=sre(u,1);return e??null}function Z$(u){return!zO||!u?null:J6(u)?u:rre(u)?are(u)||u===Z6(u).scrollingElement?window:w7(u)?u:null:null}function aOe(u){return J6(u)?u.scrollX:u.scrollLeft}function oOe(u){return J6(u)?u.scrollY:u.scrollTop}function eQ(u){return{x:aOe(u),y:oOe(u)}}var za;(function(u){u[u.Forward=1]="Forward",u[u.Backward=-1]="Backward"})(za||(za={}));function sOe(u){return!zO||!u?!1:u===document.scrollingElement}function lOe(u){const e={x:0,y:0},t=sOe(u)?{height:window.innerHeight,width:window.innerWidth}:{height:u.clientHeight,width:u.clientWidth},n={x:u.scrollWidth-t.width,y:u.scrollHeight-t.height},i=u.scrollTop<=e.y,r=u.scrollLeft<=e.x,a=u.scrollTop>=n.y,o=u.scrollLeft>=n.x;return{isTop:i,isLeft:r,isBottom:a,isRight:o,maxScroll:n,minScroll:e}}const zOu={x:.2,y:.2};function MOu(u,e,t,n,i){let{top:r,left:a,right:o,bottom:s}=t;n===void 0&&(n=10),i===void 0&&(i=zOu);const{isTop:l,isBottom:c,isLeft:d,isRight:h}=lOe(u),E={x:0,y:0},m={x:0,y:0},g={height:e.height*i.y,width:e.width*i.x};return!l&&r<=e.top+g.height?(E.y=za.Backward,m.y=n*Math.abs((e.top+g.height-r)/g.height)):!c&&s>=e.bottom-g.height&&(E.y=za.Forward,m.y=n*Math.abs((e.bottom-g.height-s)/g.height)),!h&&o>=e.right-g.width?(E.x=za.Forward,m.x=n*Math.abs((e.right-g.width-o)/g.width)):!d&&a<=e.left+g.width&&(E.x=za.Backward,m.x=n*Math.abs((e.left+g.width-a)/g.width)),{direction:E,speed:m}}function TOu(u){if(u===document.scrollingElement){const{innerWidth:r,innerHeight:a}=window;return{top:0,left:0,right:r,bottom:a,width:r,height:a}}const{top:e,left:t,right:n,bottom:i}=u.getBoundingClientRect();return{top:e,left:t,right:n,bottom:i,width:u.clientWidth,height:u.clientHeight}}function cOe(u){return u.reduce((e,t)=>Hx(e,eQ(t)),ld)}function NOu(u){return u.reduce((e,t)=>e+aOe(t),0)}function POu(u){return u.reduce((e,t)=>e+oOe(t),0)}function dOe(u,e){if(e===void 0&&(e=M7),!u)return;const{top:t,left:n,bottom:i,right:r}=e(u);rOe(u)&&(i<=0||r<=0||t>=window.innerHeight||n>=window.innerWidth)&&u.scrollIntoView({block:"center",inline:"center"})}const ROu=[["x",["left","right"],NOu],["y",["top","bottom"],POu]];class lre{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=sre(t),i=cOe(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[r,a,o]of ROu)for(const s of a)Object.defineProperty(this,s,{get:()=>{const l=o(n),c=i[r]-l;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class J2{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var i;(i=this.target)==null||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function IOu(u){const{EventTarget:e}=bs(u);return u instanceof e?u:Z6(u)}function Y$(u,e){const t=Math.abs(u.x),n=Math.abs(u.y);return typeof e=="number"?Math.sqrt(t**2+n**2)>e:"x"in e&&"y"in e?t>e.x&&n>e.y:"x"in e?t>e.x:"y"in e?n>e.y:!1}var ol;(function(u){u.Click="click",u.DragStart="dragstart",u.Keydown="keydown",u.ContextMenu="contextmenu",u.Resize="resize",u.SelectionChange="selectionchange",u.VisibilityChange="visibilitychange"})(ol||(ol={}));function l5e(u){u.preventDefault()}function OOu(u){u.stopPropagation()}var Gn;(function(u){u.Space="Space",u.Down="ArrowDown",u.Right="ArrowRight",u.Left="ArrowLeft",u.Up="ArrowUp",u.Esc="Escape",u.Enter="Enter"})(Gn||(Gn={}));const hOe={start:[Gn.Space,Gn.Enter],cancel:[Gn.Esc],end:[Gn.Space,Gn.Enter]},jOu=(u,e)=>{let{currentCoordinates:t}=e;switch(u.code){case Gn.Right:return{...t,x:t.x+25};case Gn.Left:return{...t,x:t.x-25};case Gn.Down:return{...t,y:t.y+25};case Gn.Up:return{...t,y:t.y-25}}};class EOe{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new J2(Z6(t)),this.windowListeners=new J2(bs(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ol.Resize,this.handleCancel),this.windowListeners.add(ol.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ol.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&dOe(n),t(ld)}handleKeyDown(e){if(ore(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=hOe,coordinateGetter:a=jOu,scrollBehavior:o="smooth"}=i,{code:s}=e;if(r.end.includes(s)){this.handleEnd(e);return}if(r.cancel.includes(s)){this.handleCancel(e);return}const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:ld;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(e,{active:t,context:n.current,currentCoordinates:c});if(d){const h=dN(d,c),E={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const f=e.code,{isTop:p,isRight:D,isLeft:x,isBottom:b,maxScroll:k,minScroll:A}=lOe(g),F=TOu(g),S={x:Math.min(f===Gn.Right?F.right-F.width/2:F.right,Math.max(f===Gn.Right?F.left:F.left+F.width/2,d.x)),y:Math.min(f===Gn.Down?F.bottom-F.height/2:F.bottom,Math.max(f===Gn.Down?F.top:F.top+F.height/2,d.y))},w=f===Gn.Right&&!D||f===Gn.Left&&!x,z=f===Gn.Down&&!b||f===Gn.Up&&!p;if(w&&S.x!==d.x){const N=g.scrollLeft+h.x,O=f===Gn.Right&&N<=k.x||f===Gn.Left&&N>=A.x;if(O&&!h.y){g.scrollTo({left:N,behavior:o});return}O?E.x=g.scrollLeft-N:E.x=f===Gn.Right?g.scrollLeft-k.x:g.scrollLeft-A.x,E.x&&g.scrollBy({left:-E.x,behavior:o});break}else if(z&&S.y!==d.y){const N=g.scrollTop+h.y,O=f===Gn.Down&&N<=k.y||f===Gn.Up&&N>=A.y;if(O&&!h.x){g.scrollTo({top:N,behavior:o});return}O?E.y=g.scrollTop-N:E.y=f===Gn.Down?g.scrollTop-k.y:g.scrollTop-A.y,E.y&&g.scrollBy({top:-E.y,behavior:o});break}}this.handleMove(e,Hx(dN(d,this.referenceCoordinates),E))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EOe.activators=[{eventName:"onKeyDown",handler:(u,e,t)=>{let{keyboardCodes:n=hOe,onActivation:i}=e,{active:r}=t;const{code:a}=u.nativeEvent;if(n.start.includes(a)){const o=r.activatorNode.current;return o&&u.target!==o?!1:(u.preventDefault(),i==null||i({event:u.nativeEvent}),!0)}return!1}}];function c5e(u){return!!(u&&"distance"in u)}function d5e(u){return!!(u&&"delay"in u)}class cre{constructor(e,t,n){var i;n===void 0&&(n=IOu(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:a}=r;this.props=e,this.events=t,this.document=Z6(a),this.documentListeners=new J2(this.document),this.listeners=new J2(n),this.windowListeners=new J2(bs(a)),this.initialCoordinates=(i=hN(r))!=null?i:ld,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ol.Resize,this.handleCancel),this.windowListeners.add(ol.DragStart,l5e),this.windowListeners.add(ol.VisibilityChange,this.handleCancel),this.windowListeners.add(ol.ContextMenu,l5e),this.documentListeners.add(ol.Keydown,this.handleKeydown),t){if(c5e(t))return;if(d5e(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ol.Click,OOu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ol.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:a,options:{activationConstraint:o}}=r;if(!i)return;const s=(t=hN(e))!=null?t:ld,l=dN(i,s);if(!n&&o){if(d5e(o))return Y$(l,o.tolerance)?this.handleCancel():void 0;if(c5e(o))return o.tolerance!=null&&Y$(l,o.tolerance)?this.handleCancel():Y$(l,o.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Gn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const HOu={move:{name:"pointermove"},end:{name:"pointerup"}};class mOe extends cre{constructor(e){const{event:t}=e,n=Z6(t.target);super(e,HOu,n)}}mOe.activators=[{eventName:"onPointerDown",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;return!t.isPrimary||t.button!==0?!1:(n==null||n({event:t}),!0)}}];const VOu={move:{name:"mousemove"},end:{name:"mouseup"}};var tQ;(function(u){u[u.RightClick=2]="RightClick"})(tQ||(tQ={}));class $Ou extends cre{constructor(e){super(e,VOu,Z6(e.event.target))}}$Ou.activators=[{eventName:"onMouseDown",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;return t.button===tQ.RightClick?!1:(n==null||n({event:t}),!0)}}];const Q$={move:{name:"touchmove"},end:{name:"touchend"}};class KOu extends cre{constructor(e){super(e,Q$)}static setup(){return window.addEventListener(Q$.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Q$.move.name,e)};function e(){}}}KOu.activators=[{eventName:"onTouchStart",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;const{touches:i}=t;return i.length>1?!1:(n==null||n({event:t}),!0)}}];var Z2;(function(u){u[u.Pointer=0]="Pointer",u[u.DraggableRect=1]="DraggableRect"})(Z2||(Z2={}));var mN;(function(u){u[u.TreeOrder=0]="TreeOrder",u[u.ReversedTreeOrder=1]="ReversedTreeOrder"})(mN||(mN={}));function WOu(u){let{acceleration:e,activator:t=Z2.Pointer,canScroll:n,draggingRect:i,enabled:r,interval:a=5,order:o=mN.TreeOrder,pointerCoordinates:s,scrollableAncestors:l,scrollableAncestorRects:c,delta:d,threshold:h}=u;const E=UOu({delta:d,disabled:!r}),[m,g]=uOu(),f=C.useRef({x:0,y:0}),p=C.useRef({x:0,y:0}),D=C.useMemo(()=>{switch(t){case Z2.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Z2.DraggableRect:return i}},[t,i,s]),x=C.useRef(null),b=C.useCallback(()=>{const A=x.current;if(!A)return;const F=f.current.x*p.current.x,S=f.current.y*p.current.y;A.scrollBy(F,S)},[]),k=C.useMemo(()=>o===mN.TreeOrder?[...l].reverse():l,[o,l]);C.useEffect(()=>{if(!r||!l.length||!D){g();return}for(const A of k){if((n==null?void 0:n(A))===!1)continue;const F=l.indexOf(A),S=c[F];if(!S)continue;const{direction:w,speed:z}=MOu(A,S,D,e,h);for(const N of["x","y"])E[N][w[N]]||(z[N]=0,w[N]=0);if(z.x>0||z.y>0){g(),x.current=A,m(b,a),f.current=z,p.current=w;return}}f.current={x:0,y:0},p.current={x:0,y:0},g()},[e,b,n,g,r,a,JSON.stringify(D),JSON.stringify(E),m,l,k,c,JSON.stringify(h)])}const GOu={x:{[za.Backward]:!1,[za.Forward]:!1},y:{[za.Backward]:!1,[za.Forward]:!1}};function UOu(u){let{delta:e,disabled:t}=u;const n=cN(e);return L7(i=>{if(t||!n||!i)return GOu;const r={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[za.Backward]:i.x[za.Backward]||r.x===-1,[za.Forward]:i.x[za.Forward]||r.x===1},y:{[za.Backward]:i.y[za.Backward]||r.y===-1,[za.Forward]:i.y[za.Forward]||r.y===1}}},[t,e,n])}function qOu(u,e){const t=e!==null?u.get(e):void 0,n=t?t.node.current:null;return L7(i=>{var r;return e===null?null:(r=n??i)!=null?r:null},[n,e])}function JOu(u,e){return C.useMemo(()=>u.reduce((t,n)=>{const{sensor:i}=n,r=i.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,n)}));return[...t,...r]},[]),[u,e])}var Ky;(function(u){u[u.Always=0]="Always",u[u.BeforeDragging=1]="BeforeDragging",u[u.WhileDragging=2]="WhileDragging"})(Ky||(Ky={}));var uQ;(function(u){u.Optimized="optimized"})(uQ||(uQ={}));const h5e=new Map;function ZOu(u,e){let{dragging:t,dependencies:n,config:i}=e;const[r,a]=C.useState(null),{frequency:o,measure:s,strategy:l}=i,c=C.useRef(u),d=f(),h=Vy(d),E=C.useCallback(function(p){p===void 0&&(p=[]),!h.current&&a(D=>D===null?p:D.concat(p.filter(x=>!D.includes(x))))},[h]),m=C.useRef(null),g=L7(p=>{if(d&&!t)return h5e;if(!p||p===h5e||c.current!==u||r!=null){const D=new Map;for(let x of u){if(!x)continue;if(r&&r.length>0&&!r.includes(x.id)&&x.rect.current){D.set(x.id,x.rect.current);continue}const b=x.node.current,k=b?new lre(s(b),b):null;x.rect.current=k,k&&D.set(x.id,k)}return D}return p},[u,r,t,d,s]);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{d||E()},[t,d]),C.useEffect(()=>{r&&r.length>0&&a(null)},[JSON.stringify(r)]),C.useEffect(()=>{d||typeof o!="number"||m.current!==null||(m.current=setTimeout(()=>{E(),m.current=null},o))},[o,d,E,...n]),{droppableRects:g,measureDroppableContainers:E,measuringScheduled:r!=null};function f(){switch(l){case Ky.Always:return!1;case Ky.BeforeDragging:return t;default:return!t}}}function dre(u,e){return L7(t=>u?t||(typeof e=="function"?e(u):u):null,[e,u])}function YOu(u,e){return dre(u,e)}function QOu(u){let{callback:e,disabled:t}=u;const n=MO(e),i=C.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:r}=window;return new r(n)},[n,t]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function TO(u){let{callback:e,disabled:t}=u;const n=MO(e),i=C.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:r}=window;return new r(n)},[t]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function XOu(u){return new lre(M7(u),u)}function E5e(u,e,t){e===void 0&&(e=XOu);const[n,i]=C.useReducer(o,null),r=QOu({callback(s){if(u)for(const l of s){const{type:c,target:d}=l;if(c==="childList"&&d instanceof HTMLElement&&d.contains(u)){i();break}}}}),a=TO({callback:i});return sd(()=>{i(),u?(a==null||a.observe(u),r==null||r.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),r==null||r.disconnect())},[u]),n;function o(s){if(!u)return null;if(u.isConnected===!1){var l;return(l=s??t)!=null?l:null}const c=e(u);return JSON.stringify(s)===JSON.stringify(c)?s:c}}function eju(u){const e=dre(u);return nOe(u,e)}const m5e=[];function tju(u){const e=C.useRef(u),t=L7(n=>u?n&&n!==m5e&&u&&e.current&&u.parentNode===e.current.parentNode?n:sre(u):m5e,[u]);return C.useEffect(()=>{e.current=u},[u]),t}function uju(u){const[e,t]=C.useState(null),n=C.useRef(u),i=C.useCallback(r=>{const a=Z$(r.target);a&&t(o=>o?(o.set(a,eQ(a)),new Map(o)):null)},[]);return C.useEffect(()=>{const r=n.current;if(u!==r){a(r);const o=u.map(s=>{const l=Z$(s);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,eQ(l)]):null}).filter(s=>s!=null);t(o.length?new Map(o):null),n.current=u}return()=>{a(u),a(r)};function a(o){o.forEach(s=>{const l=Z$(s);l==null||l.removeEventListener("scroll",i)})}},[i,u]),C.useMemo(()=>u.length?e?Array.from(e.values()).reduce((r,a)=>Hx(r,a),ld):cOe(u):ld,[u,e])}function g5e(u,e){e===void 0&&(e=[]);const t=C.useRef(null);return C.useEffect(()=>{t.current=null},e),C.useEffect(()=>{const n=u!==ld;n&&!t.current&&(t.current=u),!n&&t.current&&(t.current=null)},[u]),t.current?dN(u,t.current):ld}function nju(u){C.useEffect(()=>{if(!zO)return;const e=u.map(t=>{let{sensor:n}=t;return n.setup==null?void 0:n.setup()});return()=>{for(const t of e)t==null||t()}},u.map(e=>{let{sensor:t}=e;return t}))}function iju(u,e){return C.useMemo(()=>u.reduce((t,n)=>{let{eventName:i,handler:r}=n;return t[i]=a=>{r(a,e)},t},{}),[u,e])}function gOe(u){return C.useMemo(()=>u?BOu(u):null,[u])}const X$=[];function rju(u,e){e===void 0&&(e=M7);const[t]=u,n=gOe(t?bs(t):null),[i,r]=C.useReducer(o,X$),a=TO({callback:r});return u.length>0&&i===X$&&r(),sd(()=>{u.length?u.forEach(s=>a==null?void 0:a.observe(s)):(a==null||a.disconnect(),r())},[u]),i;function o(){return u.length?u.map(s=>sOe(s)?n:new lre(e(s),s)):X$}}function fOe(u){if(!u)return null;if(u.children.length>1)return u;const e=u.children[0];return w7(e)?e:u}function aju(u){let{measure:e}=u;const[t,n]=C.useState(null),i=C.useCallback(l=>{for(const{target:c}of l)if(w7(c)){n(d=>{const h=e(c);return d?{...d,width:h.width,height:h.height}:h});break}},[e]),r=TO({callback:i}),a=C.useCallback(l=>{const c=fOe(l);r==null||r.disconnect(),c&&(r==null||r.observe(c)),n(c?e(c):null)},[e,r]),[o,s]=lN(a);return C.useMemo(()=>({nodeRef:o,rect:t,setRef:s}),[t,o,s])}const oju=[{sensor:mOe,options:{}},{sensor:EOe,options:{}}],sju={current:{}},nB={draggable:{measure:s5e},droppable:{measure:s5e,strategy:Ky.WhileDragging,frequency:uQ.Optimized},dragOverlay:{measure:M7}};class Y2 extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}}const lju={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Y2,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:EN},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:nB,measureDroppableContainers:EN,windowRect:null,measuringScheduled:!1},pOe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:EN,draggableNodes:new Map,over:null,measureDroppableContainers:EN},T7=C.createContext(pOe),DOe=C.createContext(lju);function cju(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Y2}}}function dju(u,e){switch(e.type){case ha.DragStart:return{...u,draggable:{...u.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case ha.DragMove:return u.draggable.active?{...u,draggable:{...u.draggable,translate:{x:e.coordinates.x-u.draggable.initialCoordinates.x,y:e.coordinates.y-u.draggable.initialCoordinates.y}}}:u;case ha.DragEnd:case ha.DragCancel:return{...u,draggable:{...u.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ha.RegisterDroppable:{const{element:t}=e,{id:n}=t,i=new Y2(u.droppable.containers);return i.set(n,t),{...u,droppable:{...u.droppable,containers:i}}}case ha.SetDroppableDisabled:{const{id:t,key:n,disabled:i}=e,r=u.droppable.containers.get(t);if(!r||n!==r.key)return u;const a=new Y2(u.droppable.containers);return a.set(t,{...r,disabled:i}),{...u,droppable:{...u.droppable,containers:a}}}case ha.UnregisterDroppable:{const{id:t,key:n}=e,i=u.droppable.containers.get(t);if(!i||n!==i.key)return u;const r=new Y2(u.droppable.containers);return r.delete(t),{...u,droppable:{...u.droppable,containers:r}}}default:return u}}function hju(u){let{disabled:e}=u;const{active:t,activatorEvent:n,draggableNodes:i}=C.useContext(T7),r=cN(n),a=cN(t==null?void 0:t.id);return C.useEffect(()=>{if(!e&&!n&&r&&a!=null){if(!ore(r)||document.activeElement===r.target)return;const o=i.get(a);if(!o)return;const{activatorNode:s,node:l}=o;if(!s.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[s.current,l.current]){if(!c)continue;const d=rOu(c);if(d){d.focus();break}}})}},[n,e,i,a,r]),null}function xOe(u,e){let{transform:t,...n}=e;return u!=null&&u.length?u.reduce((i,r)=>r({transform:i,...n}),t):t}function Eju(u){return C.useMemo(()=>({draggable:{...nB.draggable,...u==null?void 0:u.draggable},droppable:{...nB.droppable,...u==null?void 0:u.droppable},dragOverlay:{...nB.dragOverlay,...u==null?void 0:u.dragOverlay}}),[u==null?void 0:u.draggable,u==null?void 0:u.droppable,u==null?void 0:u.dragOverlay])}function mju(u){let{activeNode:e,measure:t,initialRect:n,config:i=!0}=u;const r=C.useRef(!1),{x:a,y:o}=typeof i=="boolean"?{x:i,y:i}:i;sd(()=>{if(!a&&!o||!e){r.current=!1;return}if(r.current||!n)return;const l=e==null?void 0:e.node.current;if(!l||l.isConnected===!1)return;const c=t(l),d=nOe(c,n);if(a||(d.x=0),o||(d.y=0),r.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=rOe(l);h&&h.scrollBy({top:d.y,left:d.x})}},[e,a,o,n,t])}const NO=C.createContext({...ld,scaleX:1,scaleY:1});var DE;(function(u){u[u.Uninitialized=0]="Uninitialized",u[u.Initializing=1]="Initializing",u[u.Initialized=2]="Initialized"})(DE||(DE={}));const iB=C.memo(function(e){var t,n,i,r;let{id:a,accessibility:o,autoScroll:s=!0,children:l,sensors:c=oju,collisionDetection:d=kOu,measuring:h,modifiers:E,...m}=e;const g=C.useReducer(dju,void 0,cju),[f,p]=g,[D,x]=hOu(),[b,k]=C.useState(DE.Uninitialized),A=b===DE.Initialized,{draggable:{active:F,nodes:S,translate:w},droppable:{containers:z}}=f,N=F?S.get(F):null,O=C.useRef({initial:null,translated:null}),y=C.useMemo(()=>{var Vu;return F!=null?{id:F,data:(Vu=N==null?void 0:N.data)!=null?Vu:sju,rect:O}:null},[F,N]),_=C.useRef(null),[L,T]=C.useState(null),[R,I]=C.useState(null),H=Vy(m,Object.values(m)),V=z7("DndDescribedBy",a),U=C.useMemo(()=>z.getEnabled(),[z]),J=Eju(h),{droppableRects:Y,measureDroppableContainers:X,measuringScheduled:re}=ZOu(U,{dragging:A,dependencies:[w.x,w.y],config:J.droppable}),ge=qOu(S,F),_e=C.useMemo(()=>R?hN(R):null,[R]),Ve=Ln(),Ue=YOu(ge,J.draggable.measure);mju({activeNode:F?S.get(F):null,config:Ve.layoutShiftCompensation,initialRect:Ue,measure:J.draggable.measure});const qe=E5e(ge,J.draggable.measure,Ue),Se=E5e(ge?ge.parentElement:null),de=C.useRef({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=z.getNodeFor((t=de.current.over)==null?void 0:t.id),Be=aju({measure:J.dragOverlay.measure}),je=(n=Be.nodeRef.current)!=null?n:ge,bt=A?(i=Be.rect)!=null?i:qe:null,qt=!!(Be.nodeRef.current&&Be.rect),ou=eju(qt?null:qe),Vt=gOe(je?bs(je):null),oe=tju(A?he??ge:null),se=rju(oe),ie=xOe(E,{transform:{x:w.x-ou.x,y:w.y-ou.y,scaleX:1,scaleY:1},activatorEvent:R,active:y,activeNodeRect:qe,containerNodeRect:Se,draggingNodeRect:bt,over:de.current.over,overlayNodeRect:Be.rect,scrollableAncestors:oe,scrollableAncestorRects:se,windowRect:Vt}),$=_e?Hx(_e,w):null,Z=uju(oe),ue=g5e(Z),te=g5e(Z,[qe]),fe=Hx(ie,ue),Le=bt?AOu(bt,ie):null,Je=y&&Le?d({active:y,collisionRect:Le,droppableRects:Y,droppableContainers:U,pointerCoordinates:$}):null,it=vOu(Je,"id"),[ct,xt]=C.useState(null),Jt=qt?ie:Hx(ie,te),Ze=FOu(Jt,(r=ct==null?void 0:ct.rect)!=null?r:null,qe),Ie=C.useCallback((Vu,un)=>{let{sensor:zn,options:bn}=un;if(_.current==null)return;const $u=S.get(_.current);if(!$u)return;const wu=Vu.nativeEvent,Ou=new zn({active:_.current,activeNode:$u,event:wu,options:bn,context:de,onStart($i){const Vn=_.current;if(Vn==null)return;const Ni=S.get(Vn);if(!Ni)return;const{onDragStart:ka}=H.current,fo={active:{id:Vn,data:Ni.data,rect:O}};ns.unstable_batchedUpdates(()=>{ka==null||ka(fo),k(DE.Initializing),p({type:ha.DragStart,initialCoordinates:$i,active:Vn}),D({type:"onDragStart",event:fo})})},onMove($i){p({type:ha.DragMove,coordinates:$i})},onEnd:ki(ha.DragEnd),onCancel:ki(ha.DragCancel)});ns.unstable_batchedUpdates(()=>{T(Ou),I(Vu.nativeEvent)});function ki($i){return async function(){const{active:Ni,collisions:ka,over:fo,scrollAdjustedTranslate:eh}=de.current;let Va=null;if(Ni&&eh){const{cancelDrop:Hr}=H.current;Va={activatorEvent:wu,active:Ni,collisions:ka,delta:eh,over:fo},$i===ha.DragEnd&&typeof Hr=="function"&&await Promise.resolve(Hr(Va))&&($i=ha.DragCancel)}_.current=null,ns.unstable_batchedUpdates(()=>{p({type:$i}),k(DE.Uninitialized),xt(null),T(null),I(null);const Hr=$i===ha.DragEnd?"onDragEnd":"onDragCancel";if(Va){const Cd=H.current[Hr];Cd==null||Cd(Va),D({type:Hr,event:Va})}})}}},[S]),Tu=C.useCallback((Vu,un)=>(zn,bn)=>{const $u=zn.nativeEvent,wu=S.get(bn);if(_.current!==null||!wu||$u.dndKit||$u.defaultPrevented)return;const Ou={active:wu};Vu(zn,un.options,Ou)===!0&&($u.dndKit={capturedBy:un.sensor},_.current=bn,Ie(zn,un))},[S,Ie]),gu=JOu(c,Tu);nju(c),sd(()=>{qe&&b===DE.Initializing&&k(DE.Initialized)},[qe,b]),C.useEffect(()=>{const{onDragMove:Vu}=H.current,{active:un,activatorEvent:zn,collisions:bn,over:$u}=de.current;if(!un||!zn)return;const wu={active:un,activatorEvent:zn,collisions:bn,delta:{x:fe.x,y:fe.y},over:$u};ns.unstable_batchedUpdates(()=>{Vu==null||Vu(wu),D({type:"onDragMove",event:wu})})},[fe.x,fe.y]),C.useEffect(()=>{const{active:Vu,activatorEvent:un,collisions:zn,droppableContainers:bn,scrollAdjustedTranslate:$u}=de.current;if(!Vu||_.current==null||!un||!$u)return;const{onDragOver:wu}=H.current,Ou=bn.get(it),ki=Ou&&Ou.rect.current?{id:Ou.id,rect:Ou.rect.current,data:Ou.data,disabled:Ou.disabled}:null,$i={active:Vu,activatorEvent:un,collisions:zn,delta:{x:$u.x,y:$u.y},over:ki};ns.unstable_batchedUpdates(()=>{xt(ki),wu==null||wu($i),D({type:"onDragOver",event:$i})})},[it]),sd(()=>{de.current={activatorEvent:R,active:y,activeNode:ge,collisionRect:Le,collisions:Je,droppableRects:Y,draggableNodes:S,draggingNode:je,draggingNodeRect:bt,droppableContainers:z,over:ct,scrollableAncestors:oe,scrollAdjustedTranslate:fe},O.current={initial:bt,translated:Le}},[y,ge,Je,Le,S,je,bt,Y,z,ct,oe,fe]),WOu({...Ve,delta:w,draggingRect:Le,pointerCoordinates:$,scrollableAncestors:oe,scrollableAncestorRects:se});const fn=C.useMemo(()=>({active:y,activeNode:ge,activeNodeRect:qe,activatorEvent:R,collisions:Je,containerNodeRect:Se,dragOverlay:Be,draggableNodes:S,droppableContainers:z,droppableRects:Y,over:ct,measureDroppableContainers:X,scrollableAncestors:oe,scrollableAncestorRects:se,measuringConfiguration:J,measuringScheduled:re,windowRect:Vt}),[y,ge,qe,R,Je,Se,Be,S,z,Y,ct,X,oe,se,J,re,Vt]),Wt=C.useMemo(()=>({activatorEvent:R,activators:gu,active:y,activeNodeRect:qe,ariaDescribedById:{draggable:V},dispatch:p,draggableNodes:S,over:ct,measureDroppableContainers:X}),[R,gu,y,qe,p,V,S,ct,X]);return M.createElement(uOe.Provider,{value:x},M.createElement(T7.Provider,{value:Wt},M.createElement(DOe.Provider,{value:fn},M.createElement(NO.Provider,{value:Ze},l)),M.createElement(hju,{disabled:(o==null?void 0:o.restoreFocus)===!1})),M.createElement(gOu,{...o,hiddenTextDescribedById:V}));function Ln(){const Vu=(L==null?void 0:L.autoScrollEnabled)===!1,un=typeof s=="object"?s.enabled===!1:s===!1,zn=A&&!Vu&&!un;return typeof s=="object"?{...s,enabled:zn}:{enabled:zn}}}),gju=C.createContext(null),f5e="button",fju="Droppable";function vOe(u){let{id:e,data:t,disabled:n=!1,attributes:i}=u;const r=z7(fju),{activators:a,activatorEvent:o,active:s,activeNodeRect:l,ariaDescribedById:c,draggableNodes:d,over:h}=C.useContext(T7),{role:E=f5e,roleDescription:m="draggable",tabIndex:g=0}=i??{},f=(s==null?void 0:s.id)===e,p=C.useContext(f?NO:gju),[D,x]=lN(),[b,k]=lN(),A=iju(a,e),F=Vy(t);sd(()=>(d.set(e,{id:e,key:r,node:D,activatorNode:b,data:F}),()=>{const w=d.get(e);w&&w.key===r&&d.delete(e)}),[d,e]);const S=C.useMemo(()=>({role:E,tabIndex:g,"aria-disabled":n,"aria-pressed":f&&E===f5e?!0:void 0,"aria-roledescription":m,"aria-describedby":c.draggable}),[n,E,g,f,m,c.draggable]);return{active:s,activatorEvent:o,activeNodeRect:l,attributes:S,isDragging:f,listeners:n?void 0:A,node:D,over:h,setNodeRef:x,setActivatorNodeRef:k,transform:p}}function COe(){return C.useContext(DOe)}const pju="Droppable",Dju={timeout:25};function xju(u){let{data:e,disabled:t=!1,id:n,resizeObserverConfig:i}=u;const r=z7(pju),{active:a,dispatch:o,over:s,measureDroppableContainers:l}=C.useContext(T7),c=C.useRef({disabled:t}),d=C.useRef(!1),h=C.useRef(null),E=C.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:f}={...Dju,...i},p=Vy(g??n),D=C.useCallback(()=>{if(!d.current){d.current=!0;return}E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{l(Array.isArray(p.current)?p.current:[p.current]),E.current=null},f)},[f]),x=TO({callback:D,disabled:m||!a}),b=C.useCallback((S,w)=>{x&&(w&&(x.unobserve(w),d.current=!1),S&&x.observe(S))},[x]),[k,A]=lN(b),F=Vy(e);return C.useEffect(()=>{!x||!k.current||(x.disconnect(),d.current=!1,x.observe(k.current))},[k,x]),sd(()=>(o({type:ha.RegisterDroppable,element:{id:n,key:r,disabled:t,node:k,rect:h,data:F}}),()=>o({type:ha.UnregisterDroppable,key:r,id:n})),[n]),C.useEffect(()=>{t!==c.current.disabled&&(o({type:ha.SetDroppableDisabled,id:n,key:r,disabled:t}),c.current.disabled=t)},[n,r,t,o]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===n,node:k,over:s,setNodeRef:A}}function vju(u){let{animation:e,children:t}=u;const[n,i]=C.useState(null),[r,a]=C.useState(null),o=cN(t);return!t&&!n&&o&&i(o),sd(()=>{if(!r)return;const s=n==null?void 0:n.key,l=n==null?void 0:n.props.id;if(s==null||l==null){i(null);return}Promise.resolve(e(l,r)).then(()=>{i(null)})},[e,n,r]),M.createElement(M.Fragment,null,t,n?C.cloneElement(n,{ref:a}):null)}const Cju={x:0,y:0,scaleX:1,scaleY:1};function bju(u){let{children:e}=u;return M.createElement(T7.Provider,{value:pOe},M.createElement(NO.Provider,{value:Cju},e))}const kju={position:"fixed",touchAction:"none"},Fju=u=>ore(u)?"transform 250ms ease":void 0,yju=C.forwardRef((u,e)=>{let{as:t,activatorEvent:n,adjustScale:i,children:r,className:a,rect:o,style:s,transform:l,transition:c=Fju}=u;if(!o)return null;const d=i?l:{...l,scaleX:1,scaleY:1},h={...kju,width:o.width,height:o.height,top:o.top,left:o.left,transform:$y.Transform.toString(d),transformOrigin:i&&n?pOu(n,o):void 0,transition:typeof c=="function"?c(n):c,...s};return M.createElement(t,{className:a,style:h,ref:e},r)}),Aju=u=>e=>{let{active:t,dragOverlay:n}=e;const i={},{styles:r,className:a}=u;if(r!=null&&r.active)for(const[o,s]of Object.entries(r.active))s!==void 0&&(i[o]=t.node.style.getPropertyValue(o),t.node.style.setProperty(o,s));if(r!=null&&r.dragOverlay)for(const[o,s]of Object.entries(r.dragOverlay))s!==void 0&&n.node.style.setProperty(o,s);return a!=null&&a.active&&t.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,l]of Object.entries(i))t.node.style.setProperty(s,l);a!=null&&a.active&&t.node.classList.remove(a.active)}},_ju=u=>{let{transform:{initial:e,final:t}}=u;return[{transform:$y.Transform.toString(e)},{transform:$y.Transform.toString(t)}]},Sju={duration:250,easing:"ease",keyframes:_ju,sideEffects:Aju({styles:{active:{opacity:"0"}}})};function Bju(u){let{config:e,draggableNodes:t,droppableContainers:n,measuringConfiguration:i}=u;return MO((r,a)=>{if(e===null)return;const o=t.get(r);if(!o)return;const s=o.node.current;if(!s)return;const l=fOe(a);if(!l)return;const{transform:c}=bs(a).getComputedStyle(a),d=iOe(c);if(!d)return;const h=typeof e=="function"?e:wju(e);return dOe(s,i.draggable.measure),h({active:{id:r,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:t,dragOverlay:{node:a,rect:i.dragOverlay.measure(l)},droppableContainers:n,measuringConfiguration:i,transform:d})})}function wju(u){const{duration:e,easing:t,sideEffects:n,keyframes:i}={...Sju,...u};return r=>{let{active:a,dragOverlay:o,transform:s,...l}=r;if(!e)return;const c={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},d={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/o.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/o.rect.height:1},h={x:s.x-c.x,y:s.y-c.y,...d},E=i({...l,active:a,dragOverlay:o,transform:{initial:s,final:h}}),[m]=E,g=E[E.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const f=n==null?void 0:n({active:a,dragOverlay:o,...l}),p=o.node.animate(E,{duration:e,easing:t,fill:"forwards"});return new Promise(D=>{p.onfinish=()=>{f==null||f(),D()}})}}let p5e=0;function Lju(u){return C.useMemo(()=>{if(u!=null)return p5e++,p5e},[u])}const bOe=M.memo(u=>{let{adjustScale:e=!1,children:t,dropAnimation:n,style:i,transition:r,modifiers:a,wrapperElement:o="div",className:s,zIndex:l=999}=u;const{activatorEvent:c,active:d,activeNodeRect:h,containerNodeRect:E,draggableNodes:m,droppableContainers:g,dragOverlay:f,over:p,measuringConfiguration:D,scrollableAncestors:x,scrollableAncestorRects:b,windowRect:k}=COe(),A=C.useContext(NO),F=Lju(d==null?void 0:d.id),S=xOe(a,{activatorEvent:c,active:d,activeNodeRect:h,containerNodeRect:E,draggingNodeRect:f.rect,over:p,overlayNodeRect:f.rect,scrollableAncestors:x,scrollableAncestorRects:b,transform:A,windowRect:k}),w=dre(h),z=Bju({config:n,draggableNodes:m,droppableContainers:g,measuringConfiguration:D}),N=w?f.setRef:void 0;return M.createElement(bju,null,M.createElement(vju,{animation:z},d&&F?M.createElement(yju,{key:F,id:d.id,ref:N,as:o,activatorEvent:c,adjustScale:e,className:s,transition:r,rect:w,style:{zIndex:l,...i},transform:S},t):null))});function kOe(u,e,t){const n={...u};return e.top+u.y<=t.top?n.y=t.top-e.top:e.bottom+u.y>=t.top+t.height&&(n.y=t.top+t.height-e.bottom),e.left+u.x<=t.left?n.x=t.left-e.left:e.right+u.x>=t.left+t.width&&(n.x=t.left+t.width-e.right),n}const D5e=u=>{let{containerNodeRect:e,draggingNodeRect:t,transform:n}=u;return!t||!e?n:kOe(n,t,e)},zju=u=>{let{draggingNodeRect:e,transform:t,scrollableAncestorRects:n}=u;const i=n[0];return!e||!i?t:kOe(t,e,i)};function FOe(u,e,t){const n=u.slice();return n.splice(t<0?n.length+t:t,0,n.splice(e,1)[0]),n}function Mju(u,e){return u.reduce((t,n,i)=>{const r=e.get(n);return r&&(t[i]=r),t},Array(u.length))}function Tju(u,e){if(u===e)return!0;if(u.length!==e.length)return!1;for(let t=0;t{let{rects:e,activeIndex:t,overIndex:n,index:i}=u;const r=FOe(e,n,t),a=e[i],o=r[i];return!o||!a?null:{x:o.left-a.left,y:o.top-a.top,scaleX:o.width/a.width,scaleY:o.height/a.height}},x5e=u=>{let{activeIndex:e,index:t,rects:n,overIndex:i}=u,r,a;return t===e&&(r=n[t],a=n[i]),t===i&&(r=n[t],a=n[e]),!a||!r?null:{x:a.left-r.left,y:a.top-r.top,scaleX:a.width/r.width,scaleY:a.height/r.height}},AOe="Sortable",Pju=M.createContext({activeIndex:-1,containerId:AOe,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yOe,disabled:{draggable:!1,droppable:!1}});function v5e(u){let{children:e,id:t,items:n,strategy:i=yOe,disabled:r=!1}=u;const{active:a,dragOverlay:o,droppableRects:s,over:l,measureDroppableContainers:c}=COe(),d=z7(AOe,t),h=o.rect!==null,E=C.useMemo(()=>n.map(A=>typeof A=="object"&&"id"in A?A.id:A),[n]),m=a!=null,g=a?E.indexOf(a.id):-1,f=l?E.indexOf(l.id):-1,p=C.useRef(E),D=!Tju(E,p.current),x=f!==-1&&g===-1||D,b=Nju(r);sd(()=>{D&&m&&c(E)},[D,E,m,c]),C.useEffect(()=>{p.current=E},[E]);const k=C.useMemo(()=>({activeIndex:g,containerId:d,disabled:b,disableTransforms:x,items:E,overIndex:f,useDragOverlay:h,sortedRects:Mju(E,s),strategy:i}),[g,d,b.draggable,b.droppable,x,E,f,s,h,i]);return M.createElement(Pju.Provider,{value:k},e)}Gn.Down,Gn.Right,Gn.Up,Gn.Left;var Rju=[{name:"Aegean Airlines",iataCode:"A3"},{name:"Aeroflot",iataCode:"SU"},{name:"Aerolineas Argentinas",iataCode:"AR"},{name:"Aeromexico",iataCode:"AM"},{name:"Air Algerie",iataCode:"AH"},{name:"Air Arabia",iataCode:"G9"},{name:"Air Canada",iataCode:"AC"},{name:"Air China",iataCode:"CA"},{name:"Air Europa",iataCode:"UX"},{name:"Air France-KLM",iataCode:"AF"},{name:"Air India",iataCode:"AI"},{name:"Air Mauritius",iataCode:"MK"},{name:"Air New Zealand",iataCode:"NZ"},{name:"Air Niugini",iataCode:"PX"},{name:"Air Tahiti",iataCode:"VT"},{name:"Air Tahiti Nui",iataCode:"TN"},{name:"Air Transat",iataCode:"TS"},{name:"AirAsia X",iataCode:"D7"},{name:"AirAsia",iataCode:"AK"},{name:"Aircalin",iataCode:"SB"},{name:"Alaska Airlines",iataCode:"AS"},{name:"Alitalia",iataCode:"AZ"},{name:"All Nippon Airways",iataCode:"NH"},{name:"Allegiant Air",iataCode:"G4"},{name:"American Airlines",iataCode:"AA"},{name:"Asiana Airlines",iataCode:"OZ"},{name:"Avianca",iataCode:"AV"},{name:"Azul Linhas Aereas Brasileiras",iataCode:"AD"},{name:"Azur Air",iataCode:"ZF"},{name:"Beijing Capital Airlines",iataCode:"JD"},{name:"Boliviana de Aviacion",iataCode:"OB"},{name:"British Airways",iataCode:"BA"},{name:"Cathay Pacific",iataCode:"CX"},{name:"Cebu Pacific Air",iataCode:"5J"},{name:"China Airlines",iataCode:"CI"},{name:"China Eastern Airlines",iataCode:"MU"},{name:"China Southern Airlines",iataCode:"CZ"},{name:"Condor",iataCode:"DE"},{name:"Copa Airlines",iataCode:"CM"},{name:"Delta Air Lines",iataCode:"DL"},{name:"Easyfly",iataCode:"VE"},{name:"EasyJet",iataCode:"U2"},{name:"EcoJet",iataCode:"8J"},{name:"Egyptair",iataCode:"MS"},{name:"El Al",iataCode:"LY"},{name:"Emirates Airlines",iataCode:"EK"},{name:"Ethiopian Airlines",iataCode:"ET"},{name:"Etihad Airways",iataCode:"EY"},{name:"EVA Air",iataCode:"BR"},{name:"Fiji Airways",iataCode:"FJ"},{name:"Finnair",iataCode:"AY"},{name:"Flybondi",iataCode:"FO"},{name:"Flydubai",iataCode:"FZ"},{name:"FlySafair",iataCode:"FA"},{name:"Frontier Airlines",iataCode:"F9"},{name:"Garuda Indonesia",iataCode:"GA"},{name:"Go First",iataCode:"G8"},{name:"Gol Linhas Aereas Inteligentes",iataCode:"G3"},{name:"Hainan Airlines",iataCode:"HU"},{name:"Hawaiian Airlines",iataCode:"HA"},{name:"IndiGo Airlines",iataCode:"6E"},{name:"Japan Airlines",iataCode:"JL"},{name:"Jeju Air",iataCode:"7C"},{name:"Jet2",iataCode:"LS"},{name:"JetBlue Airways",iataCode:"B6"},{name:"JetSMART",iataCode:"JA"},{name:"Juneyao Airlines",iataCode:"HO"},{name:"Kenya Airways",iataCode:"KQ"},{name:"Korean Air",iataCode:"KE"},{name:"Kulula.com",iataCode:"MN"},{name:"LATAM Airlines",iataCode:"LA"},{name:"Lion Air",iataCode:"JT"},{name:"LOT Polish Airlines",iataCode:"LO"},{name:"Lufthansa",iataCode:"LH"},{name:"Libyan Airlines",iataCode:"LN"},{name:"Linea Aerea Amaszonas",iataCode:"Z8"},{name:"Malaysia Airlines",iataCode:"MH"},{name:"Nordwind Airlines",iataCode:"N4"},{name:"Norwegian Air Shuttle",iataCode:"DY"},{name:"Oman Air",iataCode:"WY"},{name:"Pakistan International Airlines",iataCode:"PK"},{name:"Pegasus Airlines",iataCode:"PC"},{name:"Philippine Airlines",iataCode:"PR"},{name:"Qantas Group",iataCode:"QF"},{name:"Qatar Airways",iataCode:"QR"},{name:"Republic Airways",iataCode:"YX"},{name:"Royal Air Maroc",iataCode:"AT"},{name:"Ryanair",iataCode:"FR"},{name:"S7 Airlines",iataCode:"S7"},{name:"SAS",iataCode:"SK"},{name:"Satena",iataCode:"9R"},{name:"Saudia",iataCode:"SV"},{name:"Shandong Airlines",iataCode:"SC"},{name:"Sichuan Airlines",iataCode:"3U"},{name:"Singapore Airlines",iataCode:"SQ"},{name:"Sky Airline",iataCode:"H2"},{name:"SkyWest Airlines",iataCode:"OO"},{name:"South African Airways",iataCode:"SA"},{name:"Southwest Airlines",iataCode:"WN"},{name:"SpiceJet",iataCode:"SG"},{name:"Spirit Airlines",iataCode:"NK"},{name:"Spring Airlines",iataCode:"9S"},{name:"SriLankan Airlines",iataCode:"UL"},{name:"Star Peru",iataCode:"2I"},{name:"Sun Country Airlines",iataCode:"SY"},{name:"SunExpress",iataCode:"XQ"},{name:"TAP Air Portugal",iataCode:"TP"},{name:"Thai AirAsia",iataCode:"FD"},{name:"Thai Airways",iataCode:"TG"},{name:"TUI Airways",iataCode:"BY"},{name:"Tunisair",iataCode:"TU"},{name:"Turkish Airlines",iataCode:"TK"},{name:"Ukraine International",iataCode:"PS"},{name:"United Airlines",iataCode:"UA"},{name:"Ural Airlines",iataCode:"U6"},{name:"VietJet Air",iataCode:"VJ"},{name:"Vietnam Airlines",iataCode:"VN"},{name:"Virgin Atlantic Airways",iataCode:"VS"},{name:"Virgin Australia",iataCode:"VA"},{name:"VivaAerobus",iataCode:"VB"},{name:"VOEPASS Linhas Aereas",iataCode:"2Z"},{name:"Volaris",iataCode:"Y4"},{name:"WestJet",iataCode:"WS"},{name:"Wingo",iataCode:"P5"},{name:"Wizz Air",iataCode:"W6"}],Iju=[{name:"Aerospatiale/BAC Concorde",iataTypeCode:"SSC"},{name:"Airbus A300",iataTypeCode:"AB3"},{name:"Airbus A310",iataTypeCode:"310"},{name:"Airbus A310-200",iataTypeCode:"312"},{name:"Airbus A310-300",iataTypeCode:"313"},{name:"Airbus A318",iataTypeCode:"318"},{name:"Airbus A319",iataTypeCode:"319"},{name:"Airbus A319neo",iataTypeCode:"31N"},{name:"Airbus A320",iataTypeCode:"320"},{name:"Airbus A320neo",iataTypeCode:"32N"},{name:"Airbus A321",iataTypeCode:"321"},{name:"Airbus A321neo",iataTypeCode:"32Q"},{name:"Airbus A330",iataTypeCode:"330"},{name:"Airbus A330-200",iataTypeCode:"332"},{name:"Airbus A330-300",iataTypeCode:"333"},{name:"Airbus A330-800neo",iataTypeCode:"338"},{name:"Airbus A330-900neo",iataTypeCode:"339"},{name:"Airbus A340",iataTypeCode:"340"},{name:"Airbus A340-200",iataTypeCode:"342"},{name:"Airbus A340-300",iataTypeCode:"343"},{name:"Airbus A340-500",iataTypeCode:"345"},{name:"Airbus A340-600",iataTypeCode:"346"},{name:"Airbus A350",iataTypeCode:"350"},{name:"Airbus A350-900",iataTypeCode:"359"},{name:"Airbus A350-1000",iataTypeCode:"351"},{name:"Airbus A380",iataTypeCode:"380"},{name:"Airbus A380-800",iataTypeCode:"388"},{name:"Antonov An-12",iataTypeCode:"ANF"},{name:"Antonov An-24",iataTypeCode:"AN4"},{name:"Antonov An-26",iataTypeCode:"A26"},{name:"Antonov An-28",iataTypeCode:"A28"},{name:"Antonov An-30",iataTypeCode:"A30"},{name:"Antonov An-32",iataTypeCode:"A32"},{name:"Antonov An-72",iataTypeCode:"AN7"},{name:"Antonov An-124 Ruslan",iataTypeCode:"A4F"},{name:"Antonov An-140",iataTypeCode:"A40"},{name:"Antonov An-148",iataTypeCode:"A81"},{name:"Antonov An-158",iataTypeCode:"A58"},{name:"Antonov An-225 Mriya",iataTypeCode:"A5F"},{name:"Boeing 707",iataTypeCode:"703"},{name:"Boeing 717",iataTypeCode:"717"},{name:"Boeing 720B",iataTypeCode:"B72"},{name:"Boeing 727",iataTypeCode:"727"},{name:"Boeing 727-100",iataTypeCode:"721"},{name:"Boeing 727-200",iataTypeCode:"722"},{name:"Boeing 737 MAX 7",iataTypeCode:"7M7"},{name:"Boeing 737 MAX 8",iataTypeCode:"7M8"},{name:"Boeing 737 MAX 9",iataTypeCode:"7M9"},{name:"Boeing 737 MAX 10",iataTypeCode:"7MJ"},{name:"Boeing 737",iataTypeCode:"737"},{name:"Boeing 737-100",iataTypeCode:"731"},{name:"Boeing 737-200",iataTypeCode:"732"},{name:"Boeing 737-300",iataTypeCode:"733"},{name:"Boeing 737-400",iataTypeCode:"734"},{name:"Boeing 737-500",iataTypeCode:"735"},{name:"Boeing 737-600",iataTypeCode:"736"},{name:"Boeing 737-700",iataTypeCode:"73G"},{name:"Boeing 737-800",iataTypeCode:"738"},{name:"Boeing 737-900",iataTypeCode:"739"},{name:"Boeing 747",iataTypeCode:"747"},{name:"Boeing 747-100",iataTypeCode:"741"},{name:"Boeing 747-200",iataTypeCode:"742"},{name:"Boeing 747-300",iataTypeCode:"743"},{name:"Boeing 747-400",iataTypeCode:"744"},{name:"Boeing 747-400D",iataTypeCode:"74J"},{name:"Boeing 747-8",iataTypeCode:"748"},{name:"Boeing 747SP",iataTypeCode:"74L"},{name:"Boeing 747SR",iataTypeCode:"74R"},{name:"Boeing 757",iataTypeCode:"757"},{name:"Boeing 757-200",iataTypeCode:"752"},{name:"Boeing 757-300",iataTypeCode:"753"},{name:"Boeing 767",iataTypeCode:"767"},{name:"Boeing 767-200",iataTypeCode:"762"},{name:"Boeing 767-300",iataTypeCode:"763"},{name:"Boeing 767-400",iataTypeCode:"764"},{name:"Boeing 777",iataTypeCode:"777"},{name:"Boeing 777-200",iataTypeCode:"772"},{name:"Boeing 777-200LR",iataTypeCode:"77L"},{name:"Boeing 777-300",iataTypeCode:"773"},{name:"Boeing 777-300ER",iataTypeCode:"77W"},{name:"Boeing 787",iataTypeCode:"787"},{name:"Boeing 787-8",iataTypeCode:"788"},{name:"Boeing 787-9",iataTypeCode:"789"},{name:"Boeing 787-10",iataTypeCode:"781"},{name:"Canadair Challenger",iataTypeCode:"CCJ"},{name:"Canadair CL-44",iataTypeCode:"CL4"},{name:"Canadair Regional Jet 100",iataTypeCode:"CR1"},{name:"Canadair Regional Jet 200",iataTypeCode:"CR2"},{name:"Canadair Regional Jet 700",iataTypeCode:"CR7"},{name:"Canadair Regional Jet 705",iataTypeCode:"CRA"},{name:"Canadair Regional Jet 900",iataTypeCode:"CR9"},{name:"Canadair Regional Jet 1000",iataTypeCode:"CRK"},{name:"De Havilland Canada DHC-2 Beaver",iataTypeCode:"DHP"},{name:"De Havilland Canada DHC-2 Turbo-Beaver",iataTypeCode:"DHR"},{name:"De Havilland Canada DHC-3 Otter",iataTypeCode:"DHL"},{name:"De Havilland Canada DHC-4 Caribou",iataTypeCode:"DHC"},{name:"De Havilland Canada DHC-6 Twin Otter",iataTypeCode:"DHT"},{name:"De Havilland Canada DHC-7 Dash 7",iataTypeCode:"DH7"},{name:"De Havilland Canada DHC-8-100 Dash 8 / 8Q",iataTypeCode:"DH1"},{name:"De Havilland Canada DHC-8-200 Dash 8 / 8Q",iataTypeCode:"DH2"},{name:"De Havilland Canada DHC-8-300 Dash 8 / 8Q",iataTypeCode:"DH3"},{name:"De Havilland Canada DHC-8-400 Dash 8Q",iataTypeCode:"DH4"},{name:"De Havilland DH.104 Dove",iataTypeCode:"DHD"},{name:"De Havilland DH.114 Heron",iataTypeCode:"DHH"},{name:"Douglas DC-3",iataTypeCode:"D3F"},{name:"Douglas DC-6",iataTypeCode:"D6F"},{name:"Douglas DC-8-50",iataTypeCode:"D8T"},{name:"Douglas DC-8-62",iataTypeCode:"D8L"},{name:"Douglas DC-8-72",iataTypeCode:"D8Q"},{name:"Douglas DC-9-10",iataTypeCode:"D91"},{name:"Douglas DC-9-20",iataTypeCode:"D92"},{name:"Douglas DC-9-30",iataTypeCode:"D93"},{name:"Douglas DC-9-40",iataTypeCode:"D94"},{name:"Douglas DC-9-50",iataTypeCode:"D95"},{name:"Douglas DC-10",iataTypeCode:"D10"},{name:"Douglas DC-10-10",iataTypeCode:"D1X"},{name:"Douglas DC-10-30",iataTypeCode:"D1Y"},{name:"Embraer 170",iataTypeCode:"E70"},{name:"Embraer 175",iataTypeCode:"E75"},{name:"Embraer 190",iataTypeCode:"E90"},{name:"Embraer 195",iataTypeCode:"E95"},{name:"Embraer E190-E2",iataTypeCode:"290"},{name:"Embraer E195-E2",iataTypeCode:"295"},{name:"Embraer EMB.110 Bandeirante",iataTypeCode:"EMB"},{name:"Embraer EMB.120 Brasilia",iataTypeCode:"EM2"},{name:"Embraer Legacy 600",iataTypeCode:"ER3"},{name:"Embraer Phenom 100",iataTypeCode:"EP1"},{name:"Embraer Phenom 300",iataTypeCode:"EP3"},{name:"Embraer RJ135",iataTypeCode:"ER3"},{name:"Embraer RJ140",iataTypeCode:"ERD"},{name:"Embraer RJ145 Amazon",iataTypeCode:"ER4"},{name:"Ilyushin IL18",iataTypeCode:"IL8"},{name:"Ilyushin IL62",iataTypeCode:"IL6"},{name:"Ilyushin IL76",iataTypeCode:"IL7"},{name:"Ilyushin IL86",iataTypeCode:"ILW"},{name:"Ilyushin IL96-300",iataTypeCode:"I93"},{name:"Ilyushin IL114",iataTypeCode:"I14"},{name:"Lockheed L-182 / 282 / 382 (L-100) Hercules",iataTypeCode:"LOH"},{name:"Lockheed L-188 Electra",iataTypeCode:"LOE"},{name:"Lockheed L-1011 Tristar",iataTypeCode:"L10"},{name:"Lockheed L-1049 Super Constellation",iataTypeCode:"L49"},{name:"McDonnell Douglas MD11",iataTypeCode:"M11"},{name:"McDonnell Douglas MD80",iataTypeCode:"M80"},{name:"McDonnell Douglas MD81",iataTypeCode:"M81"},{name:"McDonnell Douglas MD82",iataTypeCode:"M82"},{name:"McDonnell Douglas MD83",iataTypeCode:"M83"},{name:"McDonnell Douglas MD87",iataTypeCode:"M87"},{name:"McDonnell Douglas MD88",iataTypeCode:"M88"},{name:"McDonnell Douglas MD90",iataTypeCode:"M90"},{name:"Sukhoi Superjet 100-95",iataTypeCode:"SU9"},{name:"Tupolev Tu-134",iataTypeCode:"TU3"},{name:"Tupolev Tu-154",iataTypeCode:"TU5"},{name:"Tupolev Tu-204",iataTypeCode:"T20"},{name:"Yakovlev Yak-40",iataTypeCode:"YK4"},{name:"Yakovlev Yak-42",iataTypeCode:"YK2"}],Oju=[{name:"Adelaide International Airport",iataCode:"ADL"},{name:"Adolfo Suarez Madrid-Barajas Airport",iataCode:"MAD"},{name:"Aeroparque Jorge Newbery Airport",iataCode:"AEP"},{name:"Afonso Pena International Airport",iataCode:"CWB"},{name:"Alfonso Bonilla Aragon International Airport",iataCode:"CLO"},{name:"Amsterdam Airport Schiphol",iataCode:"AMS"},{name:"Arturo Merino Benitez International Airport",iataCode:"SCL"},{name:"Auckland International Airport",iataCode:"AKL"},{name:"Beijing Capital International Airport",iataCode:"PEK"},{name:"Belem Val de Cans International Airport",iataCode:"BEL"},{name:"Belo Horizonte Tancredo Neves International Airport",iataCode:"CNF"},{name:"Berlin-Tegel Airport",iataCode:"TXL"},{name:"Bole International Airport",iataCode:"ADD"},{name:"Brasilia-Presidente Juscelino Kubitschek International Airport",iataCode:"BSB"},{name:"Brisbane International Airport",iataCode:"BNE"},{name:"Brussels Airport",iataCode:"BRU"},{name:"Cairns Airport",iataCode:"CNS"},{name:"Cairo International Airport",iataCode:"CAI"},{name:"Canberra Airport",iataCode:"CBR"},{name:"Capetown International Airport",iataCode:"CPT"},{name:"Charles de Gaulle International Airport",iataCode:"CDG"},{name:"Charlotte Douglas International Airport",iataCode:"CLT"},{name:"Chengdu Shuangliu International Airport",iataCode:"CTU"},{name:"Chhatrapati Shivaji International Airport",iataCode:"BOM"},{name:"Chicago O'Hare International Airport",iataCode:"ORD"},{name:"Chongqing Jiangbei International Airport",iataCode:"CKG"},{name:"Christchurch International Airport",iataCode:"CHC"},{name:"Copenhagen Kastrup Airport",iataCode:"CPH"},{name:"Dallas Fort Worth International Airport",iataCode:"DFW"},{name:"Daniel K. Inouye International Airport",iataCode:"HNL"},{name:"Denver International Airport",iataCode:"DEN"},{name:"Don Mueang International Airport",iataCode:"DMK"},{name:"Dubai International Airport",iataCode:"DXB"},{name:"Dublin Airport",iataCode:"DUB"},{name:"Dusseldorf Airport",iataCode:"DUS"},{name:"El Dorado International Airport",iataCode:"BOG"},{name:"Eleftherios Venizelos International Airport",iataCode:"ATH"},{name:"Faa'a International Airport",iataCode:"PPT"},{name:"Fort Lauderdale Hollywood International Airport",iataCode:"FLL"},{name:"Fortaleza Pinto Martins International Airport",iataCode:"FOR"},{name:"Frankfurt am Main Airport",iataCode:"FRA"},{name:"George Bush Intercontinental Houston Airport",iataCode:"IAH"},{name:"Gold Coast Airport",iataCode:"OOL"},{name:"Guarulhos - Governador Andre Franco Montoro International Airport",iataCode:"GRU"},{name:"Hartsfield-Jackson Atlanta International Airport",iataCode:"ATL"},{name:"Helsinki Vantaa Airport",iataCode:"HEL"},{name:"Hobart International Airport",iataCode:"HBA"},{name:"Hong Kong International Airport",iataCode:"HKG"},{name:"Houari Boumediene Airport",iataCode:"ALG"},{name:"Hurgada International Airport",iataCode:"HRG"},{name:"Incheon International Airport",iataCode:"ICN"},{name:"Indira Gandhi International Airport",iataCode:"DEL"},{name:"Istanbul Airport",iataCode:"IST"},{name:"Jacksons International Airport",iataCode:"POM"},{name:"Jeju International Airport",iataCode:"CJU"},{name:"John F Kennedy International Airport",iataCode:"JFK"},{name:"Jorge Chavez International Airport",iataCode:"LIM"},{name:"Jose Maria Cordova International Airport",iataCode:"MDE"},{name:"Josep Tarradellas Barcelona-El Prat Airport",iataCode:"BCN"},{name:"Kahului Airport",iataCode:"OGG"},{name:"King Abdulaziz International Airport",iataCode:"JED"},{name:"Kuala Lumpur International Airport",iataCode:"KUL"},{name:"Kunming Changshui International Airport",iataCode:"KMG"},{name:"La Tontouta International Airport",iataCode:"NOU"},{name:"Leonardo da Vinci-Fiumicino Airport",iataCode:"FCO"},{name:"London Heathrow Airport",iataCode:"LHR"},{name:"Los Angeles International Airport",iataCode:"LAX"},{name:"McCarran International Airport",iataCode:"LAS"},{name:"Melbourne International Airport",iataCode:"MEL"},{name:"Mexico City International Airport",iataCode:"MEX"},{name:"Miami International Airport",iataCode:"MIA"},{name:"Ministro Pistarini International Airport",iataCode:"EZE"},{name:"Minneapolis-St Paul International/Wold-Chamberlain Airport",iataCode:"MSP"},{name:"Mohammed V International Airport",iataCode:"CMN"},{name:"Moscow Domodedovo Airport",iataCode:"DME"},{name:"Munich Airport",iataCode:"MUC"},{name:"Murtala Muhammed International Airport",iataCode:"LOS"},{name:"Nadi International Airport",iataCode:"NAN"},{name:"Nairobi Jomo Kenyatta International Airport",iataCode:"NBO"},{name:"Narita International Airport",iataCode:"NRT"},{name:"Newark Liberty International Airport",iataCode:"EWR"},{name:"Ninoy Aquino International Airport",iataCode:"MNL"},{name:"Noumea Magenta Airport",iataCode:"GEA"},{name:"O. R. Tambo International Airport",iataCode:"JNB"},{name:"Orlando International Airport",iataCode:"MCO"},{name:"Oslo Lufthavn",iataCode:"OSL"},{name:"Perth Airport",iataCode:"PER"},{name:"Phoenix Sky Harbor International Airport",iataCode:"PHX"},{name:"Recife Guararapes-Gilberto Freyre International Airport",iataCode:"REC"},{name:"Rio de Janeiro Galeao International Airport",iataCode:"GIG"},{name:"Salgado Filho International Airport",iataCode:"POA"},{name:"Salvador Deputado Luis Eduardo Magalhaes International Airport",iataCode:"SSA"},{name:"San Francisco International Airport",iataCode:"SFO"},{name:"Santos Dumont Airport",iataCode:"SDU"},{name:"Sao Paulo-Congonhas Airport",iataCode:"CGH"},{name:"Seattle Tacoma International Airport",iataCode:"SEA"},{name:"Shanghai Hongqiao International Airport",iataCode:"SHA"},{name:"Shanghai Pudong International Airport",iataCode:"PVG"},{name:"Shenzhen Bao'an International Airport",iataCode:"SZX"},{name:"Sheremetyevo International Airport",iataCode:"SVO"},{name:"Singapore Changi Airport",iataCode:"SIN"},{name:"Soekarno-Hatta International Airport",iataCode:"CGK"},{name:'Stockholm-Arlanda Airport"',iataCode:"ARN"},{name:"Suvarnabhumi Airport",iataCode:"BKK"},{name:"Sydney Kingsford Smith International Airport",iataCode:"SYD"},{name:"Taiwan Taoyuan International Airport",iataCode:"TPE"},{name:"Tan Son Nhat International Airport",iataCode:"SGN"},{name:"Tokyo Haneda International Airport",iataCode:"HND"},{name:"Toronto Pearson International Airport",iataCode:"YYZ"},{name:"Tunis Carthage International Airport",iataCode:"TUN"},{name:"Vancouver International Airport",iataCode:"YVR"},{name:"Vienna International Airport",iataCode:"VIE"},{name:"Viracopos International Airport",iataCode:"VCP"},{name:"Vnukovo International Airport",iataCode:"VKO"},{name:"Wellington International Airport",iataCode:"WLG"},{name:"Xi'an Xianyang International Airport",iataCode:"XIY"},{name:"Zhukovsky International Airport",iataCode:"ZIA"},{name:"Zurich Airport",iataCode:"ZRH"}],jju={airline:Rju,airplane:Iju,airport:Oju},Hju=jju,Vju=["Giant panda","Spectacled bear","Sun bear","Sloth bear","American black bear","Asian black bear","Brown bear","Polar bear"],$ju=["Red-throated Loon","Arctic Loon","Pacific Loon","Common Loon","Yellow-billed Loon","Least Grebe","Pied-billed Grebe","Horned Grebe","Red-necked Grebe","Eared Grebe","Western Grebe","Clark's Grebe","Yellow-nosed Albatross","Shy Albatross","Black-browed Albatross","Wandering Albatross","Laysan Albatross","Black-footed Albatross","Short-tailed Albatross","Northern Fulmar","Herald Petrel","Murphy's Petrel","Mottled Petrel","Black-capped Petrel","Cook's Petrel","Stejneger's Petrel","White-chinned Petrel","Streaked Shearwater","Cory's Shearwater","Pink-footed Shearwater","Flesh-footed Shearwater","Greater Shearwater","Wedge-tailed Shearwater","Buller's Shearwater","Sooty Shearwater","Short-tailed Shearwater","Manx Shearwater","Black-vented Shearwater","Audubon's Shearwater","Little Shearwater","Wilson's Storm-Petrel","White-faced Storm-Petrel","European Storm-Petrel","Fork-tailed Storm-Petrel","Leach's Storm-Petrel","Ashy Storm-Petrel","Band-rumped Storm-Petrel","Wedge-rumped Storm-Petrel","Black Storm-Petrel","Least Storm-Petrel","White-tailed Tropicbird","Red-billed Tropicbird","Red-tailed Tropicbird","Masked Booby","Blue-footed Booby","Brown Booby","Red-footed Booby","Northern Gannet","American White Pelican","Brown Pelican","Brandt's Cormorant","Neotropic Cormorant","Double-crested Cormorant","Great Cormorant","Red-faced Cormorant","Pelagic Cormorant","Anhinga","Magnificent Frigatebird","Great Frigatebird","Lesser Frigatebird","American Bittern","Yellow Bittern","Least Bittern","Great Blue Heron","Great Egret","Chinese Egret","Little Egret","Western Reef-Heron","Snowy Egret","Little Blue Heron","Tricolored Heron","Reddish Egret","Cattle Egret","Green Heron","Black-crowned Night-Heron","Yellow-crowned Night-Heron","White Ibis","Scarlet Ibis","Glossy Ibis","White-faced Ibis","Roseate Spoonbill","Jabiru","Wood Stork","Black Vulture","Turkey Vulture","California Condor","Greater Flamingo","Black-bellied Whistling-Duck","Fulvous Whistling-Duck","Bean Goose","Pink-footed Goose","Greater White-fronted Goose","Lesser White-fronted Goose","Emperor Goose","Snow Goose","Ross's Goose","Canada Goose","Brant","Barnacle Goose","Mute Swan","Trumpeter Swan","Tundra Swan","Whooper Swan","Muscovy Duck","Wood Duck","Gadwall","Falcated Duck","Eurasian Wigeon","American Wigeon","American Black Duck","Mallard","Mottled Duck","Spot-billed Duck","Blue-winged Teal","Cinnamon Teal","Northern Shoveler","White-cheeked Pintail","Northern Pintail","Garganey","Baikal Teal","Green-winged Teal","Canvasback","Redhead","Common Pochard","Ring-necked Duck","Tufted Duck","Greater Scaup","Lesser Scaup","Steller's Eider","Spectacled Eider","King Eider","Common Eider","Harlequin Duck","Labrador Duck","Surf Scoter","White-winged Scoter","Black Scoter","Oldsquaw","Bufflehead","Common Goldeneye","Barrow's Goldeneye","Smew","Hooded Merganser","Common Merganser","Red-breasted Merganser","Masked Duck","Ruddy Duck","Osprey","Hook-billed Kite","Swallow-tailed Kite","White-tailed Kite","Snail Kite","Mississippi Kite","Bald Eagle","White-tailed Eagle","Steller's Sea-Eagle","Northern Harrier","Sharp-shinned Hawk","Cooper's Hawk","Northern Goshawk","Crane Hawk","Gray Hawk","Common Black-Hawk","Harris's Hawk","Roadside Hawk","Red-shouldered Hawk","Broad-winged Hawk","Short-tailed Hawk","Swainson's Hawk","White-tailed Hawk","Zone-tailed Hawk","Red-tailed Hawk","Ferruginous Hawk","Rough-legged Hawk","Golden Eagle","Collared Forest-Falcon","Crested Caracara","Eurasian Kestrel","American Kestrel","Merlin","Eurasian Hobby","Aplomado Falcon","Gyrfalcon","Peregrine Falcon","Prairie Falcon","Plain Chachalaca","Chukar","Himalayan Snowcock","Gray Partridge","Ring-necked Pheasant","Ruffed Grouse","Sage Grouse","Spruce Grouse","Willow Ptarmigan","Rock Ptarmigan","White-tailed Ptarmigan","Blue Grouse","Sharp-tailed Grouse","Greater Prairie-chicken","Lesser Prairie-chicken","Wild Turkey","Mountain Quail","Scaled Quail","California Quail","Gambel's Quail","Northern Bobwhite","Montezuma Quail","Yellow Rail","Black Rail","Corn Crake","Clapper Rail","King Rail","Virginia Rail","Sora","Paint-billed Crake","Spotted Rail","Purple Gallinule","Azure Gallinule","Common Moorhen","Eurasian Coot","American Coot","Limpkin","Sandhill Crane","Common Crane","Whooping Crane","Double-striped Thick-knee","Northern Lapwing","Black-bellied Plover","European Golden-Plover","American Golden-Plover","Pacific Golden-Plover","Mongolian Plover","Collared Plover","Snowy Plover","Wilson's Plover","Common Ringed Plover","Semipalmated Plover","Piping Plover","Little Ringed Plover","Killdeer","Mountain Plover","Eurasian Dotterel","Eurasian Oystercatcher","American Oystercatcher","Black Oystercatcher","Black-winged Stilt","Black-necked Stilt","American Avocet","Northern Jacana","Common Greenshank","Greater Yellowlegs","Lesser Yellowlegs","Marsh Sandpiper","Spotted Redshank","Wood Sandpiper","Green Sandpiper","Solitary Sandpiper","Willet","Wandering Tattler","Gray-tailed Tattler","Common Sandpiper","Spotted Sandpiper","Terek Sandpiper","Upland Sandpiper","Little Curlew","Eskimo Curlew","Whimbrel","Bristle-thighed Curlew","Far Eastern Curlew","Slender-billed Curlew","Eurasian Curlew","Long-billed Curlew","Black-tailed Godwit","Hudsonian Godwit","Bar-tailed Godwit","Marbled Godwit","Ruddy Turnstone","Black Turnstone","Surfbird","Great Knot","Red Knot","Sanderling","Semipalmated Sandpiper","Western Sandpiper","Red-necked Stint","Little Stint","Temminck's Stint","Long-toed Stint","Least Sandpiper","White-rumped Sandpiper","Baird's Sandpiper","Pectoral Sandpiper","Sharp-tailed Sandpiper","Purple Sandpiper","Rock Sandpiper","Dunlin","Curlew Sandpiper","Stilt Sandpiper","Spoonbill Sandpiper","Broad-billed Sandpiper","Buff-breasted Sandpiper","Ruff","Short-billed Dowitcher","Long-billed Dowitcher","Jack Snipe","Common Snipe","Pin-tailed Snipe","Eurasian Woodcock","American Woodcock","Wilson's Phalarope","Red-necked Phalarope","Red Phalarope","Oriental Pratincole","Great Skua","South Polar Skua","Pomarine Jaeger","Parasitic Jaeger","Long-tailed Jaeger","Laughing Gull","Franklin's Gull","Little Gull","Black-headed Gull","Bonaparte's Gull","Heermann's Gull","Band-tailed Gull","Black-tailed Gull","Mew Gull","Ring-billed Gull","California Gull","Herring Gull","Yellow-legged Gull","Thayer's Gull","Iceland Gull","Lesser Black-backed Gull","Slaty-backed Gull","Yellow-footed Gull","Western Gull","Glaucous-winged Gull","Glaucous Gull","Great Black-backed Gull","Sabine's Gull","Black-legged Kittiwake","Red-legged Kittiwake","Ross's Gull","Ivory Gull","Gull-billed Tern","Caspian Tern","Royal Tern","Elegant Tern","Sandwich Tern","Roseate Tern","Common Tern","Arctic Tern","Forster's Tern","Least Tern","Aleutian Tern","Bridled Tern","Sooty Tern","Large-billed Tern","White-winged Tern","Whiskered Tern","Black Tern","Brown Noddy","Black Noddy","Black Skimmer","Dovekie","Common Murre","Thick-billed Murre","Razorbill","Great Auk","Black Guillemot","Pigeon Guillemot","Long-billed Murrelet","Marbled Murrelet","Kittlitz's Murrelet","Xantus's Murrelet","Craveri's Murrelet","Ancient Murrelet","Cassin's Auklet","Parakeet Auklet","Least Auklet","Whiskered Auklet","Crested Auklet","Rhinoceros Auklet","Atlantic Puffin","Horned Puffin","Tufted Puffin","Rock Dove","Scaly-naped Pigeon","White-crowned Pigeon","Red-billed Pigeon","Band-tailed Pigeon","Oriental Turtle-Dove","European Turtle-Dove","Eurasian Collared-Dove","Spotted Dove","White-winged Dove","Zenaida Dove","Mourning Dove","Passenger Pigeon","Inca Dove","Common Ground-Dove","Ruddy Ground-Dove","White-tipped Dove","Key West Quail-Dove","Ruddy Quail-Dove","Budgerigar","Monk Parakeet","Carolina Parakeet","Thick-billed Parrot","White-winged Parakeet","Red-crowned Parrot","Common Cuckoo","Oriental Cuckoo","Black-billed Cuckoo","Yellow-billed Cuckoo","Mangrove Cuckoo","Greater Roadrunner","Smooth-billed Ani","Groove-billed Ani","Barn Owl","Flammulated Owl","Oriental Scops-Owl","Western Screech-Owl","Eastern Screech-Owl","Whiskered Screech-Owl","Great Horned Owl","Snowy Owl","Northern Hawk Owl","Northern Pygmy-Owl","Ferruginous Pygmy-Owl","Elf Owl","Burrowing Owl","Mottled Owl","Spotted Owl","Barred Owl","Great Gray Owl","Long-eared Owl","Short-eared Owl","Boreal Owl","Northern Saw-whet Owl","Lesser Nighthawk","Common Nighthawk","Antillean Nighthawk","Common Pauraque","Common Poorwill","Chuck-will's-widow","Buff-collared Nightjar","Whip-poor-will","Jungle Nightjar","Black Swift","White-collared Swift","Chimney Swift","Vaux's Swift","White-throated Needletail","Common Swift","Fork-tailed Swift","White-throated Swift","Antillean Palm Swift","Green Violet-ear","Green-breasted Mango","Broad-billed Hummingbird","White-eared Hummingbird","Xantus's Hummingbird","Berylline Hummingbird","Buff-bellied Hummingbird","Cinnamon Hummingbird","Violet-crowned Hummingbird","Blue-throated Hummingbird","Magnificent Hummingbird","Plain-capped Starthroat","Bahama Woodstar","Lucifer Hummingbird","Ruby-throated Hummingbird","Black-chinned Hummingbird","Anna's Hummingbird","Costa's Hummingbird","Calliope Hummingbird","Bumblebee Hummingbird","Broad-tailed Hummingbird","Rufous Hummingbird","Allen's Hummingbird","Elegant Trogon","Eared Trogon","Hoopoe","Ringed Kingfisher","Belted Kingfisher","Green Kingfisher","Eurasian Wryneck","Lewis's Woodpecker","Red-headed Woodpecker","Acorn Woodpecker","Gila Woodpecker","Golden-fronted Woodpecker","Red-bellied Woodpecker","Williamson's Sapsucker","Yellow-bellied Sapsucker","Red-naped Sapsucker","Red-breasted Sapsucker","Great Spotted Woodpecker","Ladder-backed Woodpecker","Nuttall's Woodpecker","Downy Woodpecker","Hairy Woodpecker","Strickland's Woodpecker","Red-cockaded Woodpecker","White-headed Woodpecker","Three-toed Woodpecker","Black-backed Woodpecker","Northern Flicker","Gilded Flicker","Pileated Woodpecker","Ivory-billed Woodpecker","Northern Beardless-Tyrannulet","Greenish Elaenia","Caribbean Elaenia","Tufted Flycatcher","Olive-sided Flycatcher","Greater Pewee","Western Wood-Pewee","Eastern Wood-Pewee","Yellow-bellied Flycatcher","Acadian Flycatcher","Alder Flycatcher","Willow Flycatcher","Least Flycatcher","Hammond's Flycatcher","Dusky Flycatcher","Gray Flycatcher","Pacific-slope Flycatcher","Cordilleran Flycatcher","Buff-breasted Flycatcher","Black Phoebe","Eastern Phoebe","Say's Phoebe","Vermilion Flycatcher","Dusky-capped Flycatcher","Ash-throated Flycatcher","Nutting's Flycatcher","Great Crested Flycatcher","Brown-crested Flycatcher","La Sagra's Flycatcher","Great Kiskadee","Sulphur-bellied Flycatcher","Variegated Flycatcher","Tropical Kingbird","Couch's Kingbird","Cassin's Kingbird","Thick-billed Kingbird","Western Kingbird","Eastern Kingbird","Gray Kingbird","Loggerhead Kingbird","Scissor-tailed Flycatcher","Fork-tailed Flycatcher","Rose-throated Becard","Masked Tityra","Brown Shrike","Loggerhead Shrike","Northern Shrike","White-eyed Vireo","Thick-billed Vireo","Bell's Vireo","Black-capped Vireo","Gray Vireo","Yellow-throated Vireo","Plumbeous Vireo","Cassin's Vireo","Blue-headed Vireo","Hutton's Vireo","Warbling Vireo","Philadelphia Vireo","Red-eyed Vireo","Yellow-green Vireo","Black-whiskered Vireo","Yucatan Vireo","Gray Jay","Steller's Jay","Blue Jay","Green Jay","Brown Jay","Florida Scrub-Jay","Island Scrub-Jay","Western Scrub-Jay","Mexican Jay","Pinyon Jay","Clark's Nutcracker","Black-billed Magpie","Yellow-billed Magpie","Eurasian Jackdaw","American Crow","Northwestern Crow","Tamaulipas Crow","Fish Crow","Chihuahuan Raven","Common Raven","Sky Lark","Horned Lark","Purple Martin","Cuban Martin","Gray-breasted Martin","Southern Martin","Brown-chested Martin","Tree Swallow","Violet-green Swallow","Bahama Swallow","Northern Rough-winged Swallow","Bank Swallow","Cliff Swallow","Cave Swallow","Barn Swallow","Common House-Martin","Carolina Chickadee","Black-capped Chickadee","Mountain Chickadee","Mexican Chickadee","Chestnut-backed Chickadee","Boreal Chickadee","Gray-headed Chickadee","Bridled Titmouse","Oak Titmouse","Juniper Titmouse","Tufted Titmouse","Verdin","Bushtit","Red-breasted Nuthatch","White-breasted Nuthatch","Pygmy Nuthatch","Brown-headed Nuthatch","Brown Creeper","Cactus Wren","Rock Wren","Canyon Wren","Carolina Wren","Bewick's Wren","House Wren","Winter Wren","Sedge Wren","Marsh Wren","American Dipper","Red-whiskered Bulbul","Golden-crowned Kinglet","Ruby-crowned Kinglet","Middendorff's Grasshopper-Warbler","Lanceolated Warbler","Wood Warbler","Dusky Warbler","Arctic Warbler","Blue-gray Gnatcatcher","California Gnatcatcher","Black-tailed Gnatcatcher","Black-capped Gnatcatcher","Narcissus Flycatcher","Mugimaki Flycatcher","Red-breasted Flycatcher","Siberian Flycatcher","Gray-spotted Flycatcher","Asian Brown Flycatcher","Siberian Rubythroat","Bluethroat","Siberian Blue Robin","Red-flanked Bluetail","Northern Wheatear","Stonechat","Eastern Bluebird","Western Bluebird","Mountain Bluebird","Townsend's Solitaire","Veery","Gray-cheeked Thrush","Bicknell's Thrush","Swainson's Thrush","Hermit Thrush","Wood Thrush","Eurasian Blackbird","Eyebrowed Thrush","Dusky Thrush","Fieldfare","Redwing","Clay-colored Robin","White-throated Robin","Rufous-backed Robin","American Robin","Varied Thrush","Aztec Thrush","Wrentit","Gray Catbird","Black Catbird","Northern Mockingbird","Bahama Mockingbird","Sage Thrasher","Brown Thrasher","Long-billed Thrasher","Bendire's Thrasher","Curve-billed Thrasher","California Thrasher","Crissal Thrasher","Le Conte's Thrasher","Blue Mockingbird","European Starling","Crested Myna","Siberian Accentor","Yellow Wagtail","Citrine Wagtail","Gray Wagtail","White Wagtail","Black-backed Wagtail","Tree Pipit","Olive-backed Pipit","Pechora Pipit","Red-throated Pipit","American Pipit","Sprague's Pipit","Bohemian Waxwing","Cedar Waxwing","Gray Silky-flycatcher","Phainopepla","Olive Warbler","Bachman's Warbler","Blue-winged Warbler","Golden-winged Warbler","Tennessee Warbler","Orange-crowned Warbler","Nashville Warbler","Virginia's Warbler","Colima Warbler","Lucy's Warbler","Crescent-chested Warbler","Northern Parula","Tropical Parula","Yellow Warbler","Chestnut-sided Warbler","Magnolia Warbler","Cape May Warbler","Black-throated Blue Warbler","Yellow-rumped Warbler","Black-throated Gray Warbler","Golden-cheeked Warbler","Black-throated Green Warbler","Townsend's Warbler","Hermit Warbler","Blackburnian Warbler","Yellow-throated Warbler","Grace's Warbler","Pine Warbler","Kirtland's Warbler","Prairie Warbler","Palm Warbler","Bay-breasted Warbler","Blackpoll Warbler","Cerulean Warbler","Black-and-white Warbler","American Redstart","Prothonotary Warbler","Worm-eating Warbler","Swainson's Warbler","Ovenbird","Northern Waterthrush","Louisiana Waterthrush","Kentucky Warbler","Connecticut Warbler","Mourning Warbler","MacGillivray's Warbler","Common Yellowthroat","Gray-crowned Yellowthroat","Hooded Warbler","Wilson's Warbler","Canada Warbler","Red-faced Warbler","Painted Redstart","Slate-throated Redstart","Fan-tailed Warbler","Golden-crowned Warbler","Rufous-capped Warbler","Yellow-breasted Chat","Bananaquit","Hepatic Tanager","Summer Tanager","Scarlet Tanager","Western Tanager","Flame-colored Tanager","Stripe-headed Tanager","White-collared Seedeater","Yellow-faced Grassquit","Black-faced Grassquit","Olive Sparrow","Green-tailed Towhee","Spotted Towhee","Eastern Towhee","Canyon Towhee","California Towhee","Abert's Towhee","Rufous-winged Sparrow","Cassin's Sparrow","Bachman's Sparrow","Botteri's Sparrow","Rufous-crowned Sparrow","Five-striped Sparrow","American Tree Sparrow","Chipping Sparrow","Clay-colored Sparrow","Brewer's Sparrow","Field Sparrow","Worthen's Sparrow","Black-chinned Sparrow","Vesper Sparrow","Lark Sparrow","Black-throated Sparrow","Sage Sparrow","Lark Bunting","Savannah Sparrow","Grasshopper Sparrow","Baird's Sparrow","Henslow's Sparrow","Le Conte's Sparrow","Nelson's Sharp-tailed Sparrow","Saltmarsh Sharp-tailed Sparrow","Seaside Sparrow","Fox Sparrow","Song Sparrow","Lincoln's Sparrow","Swamp Sparrow","White-throated Sparrow","Harris's Sparrow","White-crowned Sparrow","Golden-crowned Sparrow","Dark-eyed Junco","Yellow-eyed Junco","McCown's Longspur","Lapland Longspur","Smith's Longspur","Chestnut-collared Longspur","Pine Bunting","Little Bunting","Rustic Bunting","Yellow-breasted Bunting","Gray Bunting","Pallas's Bunting","Reed Bunting","Snow Bunting","McKay's Bunting","Crimson-collared Grosbeak","Northern Cardinal","Pyrrhuloxia","Yellow Grosbeak","Rose-breasted Grosbeak","Black-headed Grosbeak","Blue Bunting","Blue Grosbeak","Lazuli Bunting","Indigo Bunting","Varied Bunting","Painted Bunting","Dickcissel","Bobolink","Red-winged Blackbird","Tricolored Blackbird","Tawny-shouldered Blackbird","Eastern Meadowlark","Western Meadowlark","Yellow-headed Blackbird","Rusty Blackbird","Brewer's Blackbird","Common Grackle","Boat-tailed Grackle","Great-tailed Grackle","Shiny Cowbird","Bronzed Cowbird","Brown-headed Cowbird","Black-vented Oriole","Orchard Oriole","Hooded Oriole","Streak-backed Oriole","Spot-breasted Oriole","Altamira Oriole","Audubon's Oriole","Baltimore Oriole","Bullock's Oriole","Scott's Oriole","Common Chaffinch","Brambling","Gray-crowned Rosy-Finch","Black Rosy-Finch","Brown-capped Rosy-Finch","Pine Grosbeak","Common Rosefinch","Purple Finch","Cassin's Finch","House Finch","Red Crossbill","White-winged Crossbill","Common Redpoll","Hoary Redpoll","Eurasian Siskin","Pine Siskin","Lesser Goldfinch","Lawrence's Goldfinch","American Goldfinch","Oriental Greenfinch","Eurasian Bullfinch","Evening Grosbeak","Hawfinch","House Sparrow","Eurasian Tree Sparrow"],Kju=["Abyssinian","American Bobtail","American Curl","American Shorthair","American Wirehair","Balinese","Bengal","Birman","Bombay","British Shorthair","Burmese","Chartreux","Chausie","Cornish Rex","Devon Rex","Donskoy","Egyptian Mau","Exotic Shorthair","Havana","Highlander","Himalayan","Japanese Bobtail","Korat","Kurilian Bobtail","LaPerm","Maine Coon","Manx","Minskin","Munchkin","Nebelung","Norwegian Forest Cat","Ocicat","Ojos Azules","Oriental","Persian","Peterbald","Pixiebob","Ragdoll","Russian Blue","Savannah","Scottish Fold","Selkirk Rex","Serengeti","Siberian","Siamese","Singapura","Snowshoe","Sokoke","Somali","Sphynx","Thai","Tonkinese","Toyger","Turkish Angora","Turkish Van"],Wju=["Blue Whale","Fin Whale","Sei Whale","Sperm Whale","Bryde’s whale","Omura’s whale","Humpback whale","Long-Beaked Common Dolphin","Short-Beaked Common Dolphin","Bottlenose Dolphin","Indo-Pacific Bottlenose Dolphin","Northern Rightwhale Dolphin","Southern Rightwhale Dolphin","Tucuxi","Costero","Indo-Pacific Hump-backed Dolphin","Chinese White Dolphin","Atlantic Humpbacked Dolphin","Atlantic Spotted Dolphin","Clymene Dolphin","Pantropical Spotted Dolphin","Spinner Dolphin","Striped Dolphin","Rough-Toothed Dolphin","Chilean Dolphin","Commerson’s Dolphin","Heaviside’s Dolphin","Hector’s Dolphin","Risso’s Dolphin","Fraser’s Dolphin","Atlantic White-Sided Dolphin","Dusky Dolphin","Hourglass Dolphin","Pacific White-Sided Dolphin","Peale’s Dolphin","White-Beaked Dolphin","Australian Snubfin Dolphin","Irrawaddy Dolphin","Melon-headed Whale","Killer Whale (Orca)","Pygmy Killer Whale","False Killer Whale","Long-finned Pilot Whale","Short-finned Pilot Whale","Guiana Dolphin","Burrunan Dolphin","Australian humpback Dolphin","Amazon River Dolphin","Chinese River Dolphin","Ganges River Dolphin","La Plata Dolphin","Southern Bottlenose Whale","Longman's Beaked Whale","Arnoux's Beaked Whale"],Gju=["Aberdeen Angus","Abergele","Abigar","Abondance","Abyssinian Shorthorned Zebu","Aceh","Achham","Adamawa","Adaptaur","Afar","Africangus","Afrikaner","Agerolese","Alambadi","Alatau","Albanian","Albera","Alderney","Alentejana","Aleutian wild cattle","Aliad Dinka","Alistana-Sanabresa","Allmogekor","Alur","American","American Angus","American Beef Friesian","American Brown Swiss","American Milking Devon","American White Park","Amerifax","Amrit Mahal","Amsterdam Island cattle","Anatolian Black","Andalusian Black","Andalusian Blond","Andalusian Grey","Angeln","Angoni","Ankina","Ankole","Ankole-Watusi","Aracena","Arado","Argentine Criollo","Argentine Friesian","Armorican","Arouquesa","Arsi","Asturian Mountain","Asturian Valley","Aubrac","Aulie-Ata","Aure et Saint-Girons","Australian Braford","Australian Brangus","Australian Charbray","Australian Friesian Sahiwal","Australian Lowline","Australian Milking Zebu","Australian Shorthorn","Austrian Simmental","Austrian Yellow","Avétonou","Avileña-Negra Ibérica","Aweil Dinka","Ayrshire","Azaouak","Azebuado","Azerbaijan Zebu","Azores","Bedit","Breed","Bachaur cattle","Baherie cattle","Bakosi cattle","Balancer","Baoule","Bargur cattle","Barrosã","Barzona","Bazadaise","Beef Freisian","Beefalo","Beefmaker","Beefmaster","Begayt","Belgian Blue","Belgian Red","Belgian Red Pied","Belgian White-and-Red","Belmont Red","Belted Galloway","Bernese","Berrenda cattle","Betizu","Bianca Modenese","Blaarkop","Black Angus","Black Baldy","Black Hereford","Blanca Cacereña","Blanco Orejinegro BON","Blonde d'Aquitaine","Blue Albion","Blue Grey","Bohuskulla","Bonsmara","Boran","Boškarin","Braford","Brahman","Brahmousin","Brangus","Braunvieh","Brava","British White","British Friesian","Brown Carpathian","Brown Caucasian","Brown Swiss","Bue Lingo","Burlina","Buša cattle","Butana cattle","Bushuyev","Cedit","Cachena","Caldelana","Camargue","Campbell Island cattle","Canadian Speckle Park","Canadienne","Canaria","Canchim","Caracu","Cárdena Andaluza","Carinthian Blondvieh","Carora","Charbray","Charolais","Chateaubriand","Chiangus","Chianina","Chillingham cattle","Chinese Black Pied","Cholistani","Coloursided White Back","Commercial","Corriente","Corsican cattle","Costeño con Cuernos","Crioulo Lageano","Dedit","Dajal","Dangi cattle","Danish Black-Pied","Danish Jersey","Danish Red","Deep Red cattle","Deoni","Devon","Dexter cattle","Dhanni","Doayo cattle","Doela","Drakensberger","Dølafe","Droughtmaster","Dulong'","Dutch Belted","Dutch Friesian","Dwarf Lulu","Eedit","East Anatolian Red","Eastern Finncattle","Eastern Red Polled","Enderby Island cattle","English Longhorn","Ennstaler Bergscheck","Estonian Holstein","Estonian Native","Estonian Red cattle","Évolène cattle","Fedit","Fēng Cattle","Finnish Ayrshire","Finncattle","Finnish Holstein-Friesian","Fjäll","Fleckvieh","Florida Cracker cattle","Fogera","French Simmental","Fribourgeoise","Friesian Red and White","Fulani Sudanese","Gedit","Galician Blond","Galloway cattle","Gangatiri","Gaolao","Garvonesa","Gascon cattle","Gelbvieh","Georgian Mountain cattle","German Angus","German Black Pied cattle","German Black Pied Dairy","German Red Pied","Gir","Glan cattle","Gloucester","Gobra","Greek Shorthorn","Greek Steppe","Greyman cattle","Gudali","Guernsey cattle","Guzerá","Hedit","Hallikar4","Hanwoo","Hariana cattle","Hartón del Valle","Harzer Rotvieh","Hays Converter","Heck cattle","Hereford","Herens","Hybridmaster","Highland cattle","Hinterwald","Holando-Argentino","Holstein Friesian cattle","Horro","Huáng Cattle","Hungarian Grey","Iedit","Iberian cattle","Icelandic","Illawarra cattle","Improved Red and White","Indo-Brazilian","Irish Moiled","Israeli Holstein","Israeli Red","Istoben cattle","Istrian cattle","Jedit","Jamaica Black","Jamaica Hope","Jamaica Red","Japanese Brown","Jarmelista","Javari cattle","Jersey cattle","Jutland cattle","Kedit","Kabin Buri cattle","Kalmyk cattle","Kangayam","Kankrej","Kamphaeng Saen cattle","Karan Swiss","Kasaragod Dwarf cattle","Kathiawadi","Kazakh Whiteheaded","Kenana cattle","Kenkatha cattle","Kerry cattle","Kherigarh","Khillari cattle","Kholomogory","Korat Wagyu","Kostroma cattle","Krishna Valley cattle","Kuri","Kurgan cattle","Ledit","La Reina cattle","Lakenvelder cattle","Lampurger","Latvian Blue","Latvian Brown","Latvian Danish Red","Lebedyn","Levantina","Limia cattle","Limousin","Limpurger","Lincoln Red","Lineback","Lithuanian Black-and-White","Lithuanian Light Grey","Lithuanian Red","Lithuanian White-Backed","Lohani cattle","Lourdais","Lucerna cattle","Luing","Medit","Madagascar Zebu","Madura","Maine-Anjou","Malnad Gidda","Malvi","Mandalong Special","Mantequera Leonesa","Maramureş Brown","Marchigiana","Maremmana","Marinhoa","Maronesa","Masai","Mashona","Menorquina","Mertolenga","Meuse-Rhine-Issel","Mewati","Milking Shorthorn","Minhota","Mirandesa","Mirkadim","Mocăniţă","Mollie","Monchina","Mongolian","Montbéliarde","Morucha","Muturu","Murboden","Murnau-Werdenfels","Murray Grey","Nedit","Nagori","N'Dama","Negra Andaluza","Nelore","Nguni","Nimari","Normande","North Bengal Grey","Northern Finncattle","Northern Shorthorn","Norwegian Red","Oedit]","Ongole","Original Simmental","Pedit","Pajuna","Palmera","Pantaneiro","Parda Alpina","Parthenaise","Pasiega","Pembroke","Philippine Native","Pie Rouge des Plaines","Piedmontese cattle","Pineywoods","Pinzgauer","Pirenaica","Podolac","Podolica","Polish Black-and-White","Polish Red","Polled Hereford","Poll Shorthorn","Polled Shorthorn","Ponwar","Preta","Punganur","Pulikulam","Pustertaler Sprinzen","Qedit","Qinchaun","Queensland Miniature Boran","Redit","Ramo Grande","Randall","Raramuri Criollo","Rathi","Rätisches Grauvieh","Raya","Red Angus","Red Brangus","Red Chittagong","Red Fulani","Red Gorbatov","Red Holstein","Red Kandhari","Red Mingrelian","Red Poll","Red Polled Østland","Red Sindhi","Retinta","Riggit Galloway","Ringamåla","Rohjan","Romagnola","Romanian Bălţata","Romanian Steppe Gray","Romosinuano","Russian Black Pied","RX3","Sedit","Sahiwal","Salers","Salorn","Sanga","Sanhe","Santa Cruz","Santa Gertrudis","Sayaguesa","Schwyz","Selembu","Senepol","Serbian Pied","Serbian Steppe","Sheko","Shetland","Shorthorn","Siboney de Cuba","Simbrah","Simford","Simmental","Siri","South Devon","Spanish Fighting Bull","Speckle Park","Square Meater","Sussex","Swedish Friesian","Swedish Polled","Swedish Red Pied","Swedish Red Polled","Swedish Red-and-White","Tedit","Tabapuã","Tarentaise","Tasmanian Grey","Tauros","Telemark","Texas Longhorn","Texon","Thai Black","Thai Fighting Bull","Thai Friesian","Thai Milking Zebu","Tharparkar","Tswana","Tudanca","Tuli","Tulim","Turkish Grey Steppe","Tux-Zillertal","Tyrol Grey","Uedit","Umblachery","Ukrainian Grey","Vedit","Valdostana Castana","Valdostana Pezzata Nera","Valdostana Pezzata Rossa","Väneko","Vaynol","Vechur8","Vestland Fjord","Vestland Red Polled","Vianesa","Volinian Beef","Vorderwald","Vosgienne","Wedit","Wagyu","Waguli","Wangus","Welsh Black","Western Finncattle","White Cáceres","White Fulani","White Lamphun","White Park","Whitebred Shorthorn","Xedit","Xingjiang Brown","Yedit","Yakutian","Yanbian","Yanhuang","Yurino","Zedit","Żubroń","Zebu"],Uju=["Alligator mississippiensis","Chinese Alligator","Black Caiman","Broad-snouted Caiman","Spectacled Caiman","Yacare Caiman","Cuvier’s Dwarf Caiman","Schneider’s Smooth-fronted Caiman","African Slender-snouted Crocodile","American Crocodile","Australian Freshwater Crocodile","Cuban Crocodile","Dwarf Crocodile","Morelet’s Crocodile","Mugger Crocodile","New Guinea Freshwater Crocodile","Nile Crocodile","West African Crocodile","Orinoco Crocodile","Philippine Crocodile","Saltwater Crocodile","Siamese Crocodile","Gharial","Tomistoma"],qju=["Affenpinscher","Afghan Hound","Aidi","Airedale Terrier","Akbash","Akita","Alano Español","Alapaha Blue Blood Bulldog","Alaskan Husky","Alaskan Klee Kai","Alaskan Malamute","Alopekis","Alpine Dachsbracke","American Bulldog","American Bully","American Cocker Spaniel","American English Coonhound","American Foxhound","American Hairless Terrier","American Pit Bull Terrier","American Staffordshire Terrier","American Water Spaniel","Andalusian Hound","Anglo-Français de Petite Vénerie","Appenzeller Sennenhund","Ariegeois","Armant","Armenian Gampr dog","Artois Hound","Australian Cattle Dog","Australian Kelpie","Australian Shepherd","Australian Stumpy Tail Cattle Dog","Australian Terrier","Austrian Black and Tan Hound","Austrian Pinscher","Azawakh","Bakharwal dog","Banjara Hound","Barbado da Terceira","Barbet","Basenji","Basque Shepherd Dog","Basset Artésien Normand","Basset Bleu de Gascogne","Basset Fauve de Bretagne","Basset Hound","Bavarian Mountain Hound","Beagle","Beagle-Harrier","Belgian Shepherd","Bearded Collie","Beauceron","Bedlington Terrier","Bergamasco Shepherd","Berger Picard","Bernese Mountain Dog","Bhotia","Bichon Frisé","Billy","Black and Tan Coonhound","Black Norwegian Elkhound","Black Russian Terrier","Black Mouth Cur","Bloodhound","Blue Lacy","Blue Picardy Spaniel","Bluetick Coonhound","Boerboel","Bohemian Shepherd","Bolognese","Border Collie","Border Terrier","Borzoi","Bosnian Coarse-haired Hound","Boston Terrier","Bouvier des Ardennes","Bouvier des Flandres","Boxer","Boykin Spaniel","Bracco Italiano","Braque d'Auvergne","Braque de l'Ariège","Braque du Bourbonnais","Braque Francais","Braque Saint-Germain","Briard","Briquet Griffon Vendéen","Brittany","Broholmer","Bruno Jura Hound","Brussels Griffon","Bucovina Shepherd Dog","Bull Arab","Bull Terrier","Bulldog","Bullmastiff","Bully Kutta","Burgos Pointer","Cairn Terrier","Campeiro Bulldog","Canaan Dog","Canadian Eskimo Dog","Cane Corso","Cane di Oropa","Cane Paratore","Cantabrian Water Dog","Can de Chira","Cão da Serra de Aires","Cão de Castro Laboreiro","Cão de Gado Transmontano","Cão Fila de São Miguel","Cardigan Welsh Corgi","Carea Castellano Manchego","Carolina Dog","Carpathian Shepherd Dog","Catahoula Leopard Dog","Catalan Sheepdog","Caucasian Shepherd Dog","Cavalier King Charles Spaniel","Central Asian Shepherd Dog","Cesky Fousek","Cesky Terrier","Chesapeake Bay Retriever","Chien Français Blanc et Noir","Chien Français Blanc et Orange","Chien Français Tricolore","Chihuahua","Chilean Terrier","Chinese Chongqing Dog","Chinese Crested Dog","Chinook","Chippiparai","Chongqing dog","Chortai","Chow Chow","Cimarrón Uruguayo","Cirneco dell'Etna","Clumber Spaniel","Colombian fino hound","Coton de Tulear","Cretan Hound","Croatian Sheepdog","Curly-Coated Retriever","Cursinu","Czechoslovakian Wolfdog","Dachshund","Dalmatian","Dandie Dinmont Terrier","Danish-Swedish Farmdog","Denmark Feist","Dingo","Doberman Pinscher","Dogo Argentino","Dogo Guatemalteco","Dogo Sardesco","Dogue Brasileiro","Dogue de Bordeaux","Drentse Patrijshond","Drever","Dunker","Dutch Shepherd","Dutch Smoushond","East Siberian Laika","East European Shepherd","English Cocker Spaniel","English Foxhound","English Mastiff","English Setter","English Shepherd","English Springer Spaniel","English Toy Terrier","Entlebucher Mountain Dog","Estonian Hound","Estrela Mountain Dog","Eurasier","Field Spaniel","Fila Brasileiro","Finnish Hound","Finnish Lapphund","Finnish Spitz","Flat-Coated Retriever","French Bulldog","French Spaniel","Galgo Español","Galician Shepherd Dog","Garafian Shepherd","Gascon Saintongeois","Georgian Shepherd","German Hound","German Longhaired Pointer","German Pinscher","German Roughhaired Pointer","German Shepherd Dog","German Shorthaired Pointer","German Spaniel","German Spitz","German Wirehaired Pointer","Giant Schnauzer","Glen of Imaal Terrier","Golden Retriever","Gończy Polski","Gordon Setter","Grand Anglo-Français Blanc et Noir","Grand Anglo-Français Blanc et Orange","Grand Anglo-Français Tricolore","Grand Basset Griffon Vendéen","Grand Bleu de Gascogne","Grand Griffon Vendéen","Great Dane","Greater Swiss Mountain Dog","Greek Harehound","Greek Shepherd","Greenland Dog","Greyhound","Griffon Bleu de Gascogne","Griffon Fauve de Bretagne","Griffon Nivernais","Gull Dong","Gull Terrier","Hällefors Elkhound","Hamiltonstövare","Hanover Hound","Harrier","Havanese","Hierran Wolfdog","Hokkaido","Hovawart","Huntaway","Hygen Hound","Ibizan Hound","Icelandic Sheepdog","Indian pariah dog","Indian Spitz","Irish Red and White Setter","Irish Setter","Irish Terrier","Irish Water Spaniel","Irish Wolfhound","Istrian Coarse-haired Hound","Istrian Shorthaired Hound","Italian Greyhound","Jack Russell Terrier","Jagdterrier","Japanese Chin","Japanese Spitz","Japanese Terrier","Jindo","Jonangi","Kai Ken","Kaikadi","Kangal Shepherd Dog","Kanni","Karakachan dog","Karelian Bear Dog","Kars","Karst Shepherd","Keeshond","Kerry Beagle","Kerry Blue Terrier","King Charles Spaniel","King Shepherd","Kintamani","Kishu","Kokoni","Kombai","Komondor","Kooikerhondje","Koolie","Koyun dog","Kromfohrländer","Kuchi","Kuvasz","Labrador Retriever","Lagotto Romagnolo","Lakeland Terrier","Lancashire Heeler","Landseer","Lapponian Herder","Large Münsterländer","Leonberger","Levriero Sardo","Lhasa Apso","Lithuanian Hound","Löwchen","Lupo Italiano","Mackenzie River Husky","Magyar agár","Mahratta Greyhound","Maltese","Manchester Terrier","Maremmano-Abruzzese Sheepdog","McNab dog","Miniature American Shepherd","Miniature Bull Terrier","Miniature Fox Terrier","Miniature Pinscher","Miniature Schnauzer","Molossus of Epirus","Montenegrin Mountain Hound","Mountain Cur","Mountain Feist","Mucuchies","Mudhol Hound","Mudi","Neapolitan Mastiff","New Guinea Singing Dog","New Zealand Heading Dog","Newfoundland","Norfolk Terrier","Norrbottenspets","Northern Inuit Dog","Norwegian Buhund","Norwegian Elkhound","Norwegian Lundehund","Norwich Terrier","Nova Scotia Duck Tolling Retriever","Old Croatian Sighthound","Old Danish Pointer","Old English Sheepdog","Old English Terrier","Olde English Bulldogge","Otterhound","Pachon Navarro","Pampas Deerhound","Paisley Terrier","Papillon","Parson Russell Terrier","Pastore della Lessinia e del Lagorai","Patagonian Sheepdog","Patterdale Terrier","Pekingese","Pembroke Welsh Corgi","Perro Majorero","Perro de Pastor Mallorquin","Perro de Presa Canario","Perro de Presa Mallorquin","Peruvian Inca Orchid","Petit Basset Griffon Vendéen","Petit Bleu de Gascogne","Phalène","Pharaoh Hound","Phu Quoc Ridgeback","Picardy Spaniel","Plummer Terrier","Plott Hound","Podenco Canario","Podenco Valenciano","Pointer","Poitevin","Polish Greyhound","Polish Hound","Polish Lowland Sheepdog","Polish Tatra Sheepdog","Pomeranian","Pont-Audemer Spaniel","Poodle","Porcelaine","Portuguese Podengo","Portuguese Pointer","Portuguese Water Dog","Posavac Hound","Pražský Krysařík","Pshdar Dog","Pudelpointer","Pug","Puli","Pumi","Pungsan Dog","Pyrenean Mastiff","Pyrenean Mountain Dog","Pyrenean Sheepdog","Rafeiro do Alentejo","Rajapalayam","Rampur Greyhound","Rat Terrier","Ratonero Bodeguero Andaluz","Ratonero Mallorquin","Ratonero Murciano de Huerta","Ratonero Valenciano","Redbone Coonhound","Rhodesian Ridgeback","Romanian Mioritic Shepherd Dog","Romanian Raven Shepherd Dog","Rottweiler","Rough Collie","Russian Spaniel","Russian Toy","Russo-European Laika","Saarloos Wolfdog","Sabueso Español","Saint Bernard","Saint Hubert Jura Hound","Saint-Usuge Spaniel","Saluki","Samoyed","Sapsali","Sarabi dog","Šarplaninac","Schapendoes","Schillerstövare","Schipperke","Schweizer Laufhund","Schweizerischer Niederlaufhund","Scottish Deerhound","Scottish Terrier","Sealyham Terrier","Segugio dell'Appennino","Segugio Italiano","Segugio Maremmano","Seppala Siberian Sleddog","Serbian Hound","Serbian Tricolour Hound","Serrano Bulldog","Shar Pei","Shetland Sheepdog","Shiba Inu","Shih Tzu","Shikoku","Shiloh Shepherd","Siberian Husky","Silken Windhound","Silky Terrier","Sinhala Hound","Skye Terrier","Sloughi","Slovakian Wirehaired Pointer","Slovenský Cuvac","Slovenský Kopov","Smalandstövare","Small Greek domestic dog","Small Münsterländer","Smooth Collie","Smooth Fox Terrier","Soft-Coated Wheaten Terrier","South Russian Ovcharka","Spanish Mastiff","Spanish Water Dog","Spinone Italiano","Sporting Lucas Terrier","Sardinian Shepherd Dog","Stabyhoun","Staffordshire Bull Terrier","Standard Schnauzer","Stephens Stock","Styrian Coarse-haired Hound","Sussex Spaniel","Swedish Elkhound","Swedish Lapphund","Swedish Vallhund","Swedish White Elkhound","Taigan","Taiwan Dog","Tamaskan Dog","Teddy Roosevelt Terrier","Telomian","Tenterfield Terrier","Terrier Brasileiro","Thai Bangkaew Dog","Thai Ridgeback","Tibetan Mastiff","Tibetan Spaniel","Tibetan Terrier","Tornjak","Tosa","Toy Fox Terrier","Toy Manchester Terrier","Transylvanian Hound","Treeing Cur","Treeing Feist","Treeing Tennessee Brindle","Treeing Walker Coonhound","Trigg Hound","Tyrolean Hound","Vikhan","Villano de Las Encartaciones","Villanuco de Las Encartaciones","Vizsla","Volpino Italiano","Weimaraner","Welsh Sheepdog","Welsh Springer Spaniel","Welsh Terrier","West Highland White Terrier","West Siberian Laika","Westphalian Dachsbracke","Wetterhoun","Whippet","White Shepherd","White Swiss Shepherd Dog","Wire Fox Terrier","Wirehaired Pointing Griffon","Wirehaired Vizsla","Xiasi Dog","Xoloitzcuintli","Yakutian Laika","Yorkshire Terrier"],Jju=["Grass carp","Peruvian anchoveta","Silver carp","Common carp","Asari","Japanese littleneck","Filipino Venus","Japanese cockle","Alaska pollock","Nile tilapia","Whiteleg shrimp","Bighead carp","Skipjack tuna","Catla","Crucian carp","Atlantic salmon","Atlantic herring","Chub mackerel","Rohu","Yellowfin tuna","Japanese anchovy","Largehead hairtail","Atlantic cod","European pilchard","Capelin","Jumbo flying squid","Milkfish","Atlantic mackerel","Rainbow trout","Araucanian herring","Wuchang bream","Gulf menhaden","Indian oil sardine","Black carp","European anchovy","Northern snakehead","Pacific cod","Pacific saury","Pacific herring","Bigeye tuna","Chilean jack mackerel","Yellow croaker","Haddock","Gazami crab","Amur catfish","Japanese common catfish","European sprat","Pink salmon","Mrigal carp","Channel catfish","Blood cockle","Blue whiting","Hilsa shad","Daggertooth pike conger","California pilchard","Cape horse mackerel","Pacific anchoveta","Japanese flying squid","Pollock","Chinese softshell turtle","Kawakawa","Indian mackerel","Asian swamp eel","Argentine hake","Short mackerel","Southern rough shrimp","Southern African anchovy","Pond loach","Iridescent shark","Mandarin fish","Chinese perch","Nile perch","Round sardinella","Japanese pilchard","Bombay-duck","Yellowhead catfish","Korean bullhead","Narrow-barred Spanish mackerel","Albacore","Madeiran sardinella","Bonga shad","Silver cyprinid","Longtail tuna","Atlantic menhaden","North Pacific hake","Atlantic horse mackerel","Japanese jack mackerel","Pacific thread herring","Bigeye scad","Yellowstripe scad","Chum salmon","Blue swimming crab","Pacific sand lance","Pacific sandlance","Goldstripe sardinella"],Zju=["American Albino","Abaco Barb","Abtenauer","Abyssinian","Aegidienberger","Akhal-Teke","Albanian Horse","Altai Horse","Altèr Real","American Cream Draft","American Indian Horse","American Paint Horse","American Quarter Horse","American Saddlebred","American Warmblood","Andalusian Horse","Andravida Horse","Anglo-Arabian","Anglo-Arabo-Sardo","Anglo-Kabarda","Appaloosa","AraAppaloosa","Arabian Horse","Ardennes Horse","Arenberg-Nordkirchen","Argentine Criollo","Asian wild Horse","Assateague Horse","Asturcón","Augeron","Australian Brumby","Australian Draught Horse","Australian Stock Horse","Austrian Warmblood","Auvergne Horse","Auxois","Azerbaijan Horse","Azteca Horse","Baise Horse","Bale","Balearic Horse","Balikun Horse","Baluchi Horse","Banker Horse","Barb Horse","Bardigiano","Bashkir Curly","Basque Mountain Horse","Bavarian Warmblood","Belgian Half-blood","Belgian Horse","Belgian Warmblood ","Bhutia Horse","Black Forest Horse","Blazer Horse","Boerperd","Borana","Boulonnais Horse","Brabant","Brandenburger","Brazilian Sport Horse","Breton Horse","Brumby","Budyonny Horse","Burguete Horse","Burmese Horse","Byelorussian Harness Horse","Calabrese Horse","Camargue Horse","Camarillo White Horse","Campeiro","Campolina","Canadian Horse","Canadian Pacer","Carolina Marsh Tacky","Carthusian Horse","Caspian Horse","Castilian Horse","Castillonnais","Catria Horse","Cavallo Romano della Maremma Laziale","Cerbat Mustang","Chickasaw Horse","Chilean Corralero","Choctaw Horse","Cleveland Bay","Clydesdale Horse","Cob","Coldblood Trotter","Colonial Spanish Horse","Colorado Ranger","Comtois Horse","Corsican Horse","Costa Rican Saddle Horse","Cretan Horse","Criollo Horse","Croatian Coldblood","Cuban Criollo","Cumberland Island Horse","Curly Horse","Czech Warmblood","Daliboz","Danish Warmblood","Danube Delta Horse","Dole Gudbrandsdal","Don","Dongola Horse","Draft Trotter","Dutch Harness Horse","Dutch Heavy Draft","Dutch Warmblood","Dzungarian Horse","East Bulgarian","East Friesian Horse","Estonian Draft","Estonian Horse","Falabella","Faroese","Finnhorse","Fjord Horse","Fleuve","Florida Cracker Horse","Foutanké","Frederiksborg Horse","Freiberger","French Trotter","Friesian Cross","Friesian Horse","Friesian Sporthorse","Furioso-North Star","Galiceño","Galician Pony","Gelderland Horse","Georgian Grande Horse","German Warmblood","Giara Horse","Gidran","Groningen Horse","Gypsy Horse","Hackney Horse","Haflinger","Hanoverian Horse","Heck Horse","Heihe Horse","Henson Horse","Hequ Horse","Hirzai","Hispano-Bretón","Holsteiner Horse","Horro","Hungarian Warmblood","Icelandic Horse","Iomud","Irish Draught","Irish Sport Horse sometimes called Irish Hunter","Italian Heavy Draft","Italian Trotter","Jaca Navarra","Jeju Horse","Jutland Horse","Kabarda Horse","Kafa","Kaimanawa Horses","Kalmyk Horse","Karabair","Karabakh Horse","Karachai Horse","Karossier","Kathiawari","Kazakh Horse","Kentucky Mountain Saddle Horse","Kiger Mustang","Kinsky Horse","Kisber Felver","Kiso Horse","Kladruber","Knabstrupper","Konik","Kundudo","Kustanair","Kyrgyz Horse","Latvian Horse","Lipizzan","Lithuanian Heavy Draught","Lokai","Losino Horse","Lusitano","Lyngshest","M'Bayar","M'Par","Mallorquín","Malopolski","Mangalarga","Mangalarga Marchador","Maremmano","Marismeño Horse","Marsh Tacky","Marwari Horse","Mecklenburger","Međimurje Horse","Menorquín","Mérens Horse","Messara Horse","Metis Trotter","Mezőhegyesi Sport Horse","Miniature Horse","Misaki Horse","Missouri Fox Trotter","Monchina","Mongolian Horse","Mongolian Wild Horse","Monterufolino","Morab","Morgan Horse","Mountain Pleasure Horse","Moyle Horse","Murakoz Horse","Murgese","Mustang Horse","Namib Desert Horse","Nangchen Horse","National Show Horse","Nez Perce Horse","Nivernais Horse","Nokota Horse","Noma","Nonius Horse","Nooitgedachter","Nordlandshest","Noriker Horse","Norman Cob","North American Single-Footer Horse","North Swedish Horse","Norwegian Coldblood Trotter","Norwegian Fjord","Novokirghiz","Oberlander Horse","Ogaden","Oldenburg Horse","Orlov trotter","Ostfriesen","Paint","Pampa Horse","Paso Fino","Pentro Horse","Percheron","Persano Horse","Peruvian Paso","Pintabian","Pleven Horse","Poitevin Horse","Posavac Horse","Pottok","Pryor Mountain Mustang","Przewalski's Horse","Pura Raza Española","Purosangue Orientale","Qatgani","Quarab","Quarter Horse","Racking Horse","Retuerta Horse","Rhenish German Coldblood","Rhinelander Horse","Riwoche Horse","Rocky Mountain Horse","Romanian Sporthorse","Rottaler","Russian Don","Russian Heavy Draft","Russian Trotter","Saddlebred","Salerno Horse","Samolaco Horse","San Fratello Horse","Sarcidano Horse","Sardinian Anglo-Arab","Schleswig Coldblood","Schwarzwälder Kaltblut","Selale","Sella Italiano","Selle Français","Shagya Arabian","Shan Horse","Shire Horse","Siciliano Indigeno","Silesian Horse","Sokolsky Horse","Sorraia","South German Coldblood","Soviet Heavy Draft","Spanish Anglo-Arab","Spanish Barb","Spanish Jennet Horse","Spanish Mustang","Spanish Tarpan","Spanish-Norman Horse","Spiti Horse","Spotted Saddle Horse","Standardbred Horse","Suffolk Punch","Swedish Ardennes","Swedish coldblood trotter","Swedish Warmblood","Swiss Warmblood","Taishū Horse","Takhi","Tawleed","Tchernomor","Tennessee Walking Horse","Tersk Horse","Thoroughbred","Tiger Horse","Tinker Horse","Tolfetano","Tori Horse","Trait Du Nord","Trakehner","Tsushima","Tuigpaard","Ukrainian Riding Horse","Unmol Horse","Uzunyayla","Ventasso Horse","Virginia Highlander","Vlaamperd","Vladimir Heavy Draft","Vyatka","Waler","Waler Horse","Walkaloosa","Warlander","Warmblood","Welsh Cob","Westphalian Horse","Wielkopolski","Württemberger","Xilingol Horse","Yakutian Horse","Yili Horse","Yonaguni Horse","Zaniskari","Žemaitukas","Zhemaichu","Zweibrücker"],Yju=["Acacia-ants","Acorn-plum gall","Aerial yellowjacket","Africanized honey bee","Allegheny mound ant","Almond stone wasp","Ant","Arboreal ant","Argentine ant","Asian paper wasp","Baldfaced hornet","Bee","Bigheaded ant","Black and yellow mud dauber","Black carpenter ant","Black imported fire ant","Blue horntail woodwasp","Blue orchard bee","Braconid wasp","Bumble bee","Carpenter ant","Carpenter wasp","Chalcid wasp","Cicada killer","Citrus blackfly parasitoid","Common paper wasp","Crazy ant","Cuckoo wasp","Cynipid gall wasp","Eastern Carpenter bee","Eastern yellowjacket","Elm sawfly","Encyrtid wasp","Erythrina gall wasp","Eulophid wasp","European hornet","European imported fire ant","False honey ant","Fire ant","Forest bachac","Forest yellowjacket","German yellowjacket","Ghost ant","Giant ichneumon wasp","Giant resin bee","Giant wood wasp","Golden northern bumble bee","Golden paper wasp","Gouty oak gall","Grass Carrying Wasp","Great black wasp","Great golden digger wasp","Hackberry nipple gall parasitoid","Honey bee","Horned oak gall","Horse guard wasp","Hunting wasp","Ichneumonid wasp","Keyhole wasp","Knopper gall","Large garden bumble bee","Large oak-apple gall","Leafcutting bee","Little fire ant","Little yellow ant","Long-horned bees","Long-legged ant","Macao paper wasp","Mallow bee","Marble gall","Mossyrose gall wasp","Mud-daubers","Multiflora rose seed chalcid","Oak apple gall wasp","Oak rough bulletgall wasp","Oak saucer gall","Oak shoot sawfly","Odorous house ant","Orange-tailed bumble bee","Orangetailed potter wasp","Oriental chestnut gall wasp","Paper wasp","Pavement ant","Pigeon tremex","Pip gall wasp","Prairie yellowjacket","Pteromalid wasp","Pyramid ant","Raspberry Horntail","Red ant","Red carpenter ant","Red harvester ant","Red imported fire ant","Red wasp","Red wood ant","Red-tailed wasp","Reddish carpenter ant","Rough harvester ant","Sawfly parasitic wasp","Scale parasitoid","Silky ant","Sirex woodwasp","Siricid woodwasp","Smaller yellow ant","Southeastern blueberry bee","Southern fire ant","Southern yellowjacket","Sphecid wasp","Stony gall","Sweat bee","Texas leafcutting ant","Tiphiid wasp","Torymid wasp","Tramp ant","Valentine ant","Velvet ant","Vespid wasp","Weevil parasitoid","Western harvester ant","Western paper wasp","Western thatching ant","Western yellowjacket","White-horned horntail","Willow shoot sawfly","Woodwasp","Wool sower gall maker","Yellow and black potter wasp","Yellow Crazy Ant","Yellow-horned horntail"],Qju=["Asiatic Lion","Barbary Lion","West African Lion","Northeast Congo Lion","Masai Lion","Transvaal lion","Cape lion"],Xju=["American","American Chinchilla","American Fuzzy Lop","American Sable","Argente Brun","Belgian Hare","Beveren","Blanc de Hotot","Britannia Petite","Californian","Champagne D’Argent","Checkered Giant","Cinnamon","Crème D’Argent","Dutch","Dwarf Hotot","English Angora","English Lop","English Spot","Flemish Giant","Florida White","French Angora","French Lop","Giant Angora","Giant Chinchilla","Harlequin","Havana","Himalayan","Holland Lop","Jersey Wooly","Lilac","Lionhead","Mini Lop","Mini Rex","Mini Satin","Netherland Dwarf","New Zealand","Palomino","Polish","Rex","Rhinelander","Satin","Satin Angora","Silver","Silver Fox","Silver Marten","Standard Chinchilla","Tan","Thrianta"],eHu=["Abrocoma","Abrocoma schistacea","Aconaemys","Aconaemys porteri","African brush-tailed porcupine","Andean mountain cavy","Argentine tuco-tuco","Ashy chinchilla rat","Asiatic brush-tailed porcupine","Atherurus","Azara's agouti","Azara's tuco-tuco","Bahia porcupine","Bathyergus","Bathyergus janetta","Bathyergus suillus","Bennett's chinchilla rat","Bicolored-spined porcupine","Black agouti","Black dwarf porcupine","Black-rumped agouti","Black-tailed hairy dwarf porcupine","Bolivian chinchilla rat","Bolivian tuco-tuco","Bonetto's tuco-tuco","Brandt's yellow-toothed cavy","Brazilian guinea pig","Brazilian porcupine","Brazilian tuco-tuco","Bridge's degu","Brown hairy dwarf porcupine","Budin's chinchilla rat, A. budini","Cape porcupine","Catamarca tuco-tuco","Cavia","Central American agouti","Chacoan tuco-tuco","Chilean rock rat","Chinchilla","Coendou","Coiban agouti","Colburn's tuco-tuco","Collared tuco-tuco","Common degu","Common yellow-toothed cavy","Conover's tuco-tuco","Coruro","Crested agouti","Crested porcupine","Cryptomys","Cryptomys bocagei","Cryptomys damarensis","Cryptomys foxi","Cryptomys hottentotus","Cryptomys mechowi","Cryptomys ochraceocinereus","Cryptomys zechi","Ctenomys","Cuniculus","Cuscomys","Cuscomys ashanika","Dactylomys","Dactylomys boliviensis","Dactylomys dactylinus","Dactylomys peruanus","Dasyprocta","Domestic guinea pig","Emily's tuco-tuco","Erethizon","Famatina chinchilla rat","Frosted hairy dwarf porcupine","Fukomys","Fukomys amatus","Fukomys anselli","Fukomys bocagei","Fukomys damarensis","Fukomys darlingi","Fukomys foxi","Fukomys ilariae","Fukomys kafuensis","Fukomys mechowii","Fukomys micklemi","Fukomys occlusus","Fukomys ochraceocinereus","Fukomys whytei","Fukomys zechi","Furtive tuco-tuco","Galea","Georychus","Georychus capensis","Golden viscacha-rat","Goya tuco-tuco","Greater guinea pig","Green acouchi","Haig's tuco-tuco","Heliophobius","Heliophobius argenteocinereus","Heterocephalus","Heterocephalus glaber","Highland tuco-tuco","Hystrix","Indian porcupine","Isla Mocha degu","Kalinowski agouti","Kannabateomys","Kannabateomys amblyonyx","Lagidium","Lagostomus","Lewis' tuco-tuco","Long-tailed chinchilla","Long-tailed porcupine","Los Chalchaleros' viscacha-rat","Lowland paca","Magellanic tuco-tuco","Malayan porcupine","Maule tuco-tuco","Mendoza tuco-tuco","Mexican agouti","Mexican hairy dwarf porcupine","Microcavia","Montane guinea pig","Moon-toothed degu","Mottled tuco-tuco","Mountain degu","Mountain paca","Mountain viscacha-rat","Myoprocta","Natterer's tuco-tuco","North American porcupine","Northern viscacha","Octodon","Octodontomys","Octomys","Olallamys","Olallamys albicauda","Olallamys edax","Orinoco agouti","Paraguaian hairy dwarf porcupine","Pearson's tuco-tuco","Peruvian tuco-tuco","Philippine porcupine","Pipanacoctomys","Plains viscacha","Plains viscacha-rat","Porteous' tuco-tuco","Punta de Vacas chinchilla rat","Red acouchi","Red-rumped agouti","Reddish tuco-tuco","Rio Negro tuco-tuco","Robust tuco-tuco","Roosmalen's dwarf porcupine","Rothschild's porcupine","Ruatan Island agouti","Sage's rock rat","Salinoctomys","Salta tuco-tuco","San Luis tuco-tuco","Santa Catarina's guinea pig","Shiny guinea pig","Shipton's mountain cavy","Short-tailed chinchilla","Silky tuco-tuco","Social tuco-tuco","Southern mountain cavy","Southern tuco-tuco","Southern viscacha","Spalacopus","Spix's yellow-toothed cavy","Steinbach's tuco-tuco","Streaked dwarf porcupine","Strong tuco-tuco","Stump-tailed porcupine","Sumatran porcupine","Sunda porcupine","Talas tuco-tuco","Tawny tuco-tuco","Thick-spined porcupine","Tiny tuco-tuco","Trichys","Tucuman tuco-tuco","Tympanoctomys","Uspallata chinchilla rat","White-toothed tuco-tuco","Wolffsohn's viscacha"],tHu=["Viper Adder","Common adder","Death Adder","Desert death adder","Horned adder","Long-nosed adder","Many-horned adder","Mountain adder","Mud adder","Namaqua dwarf adder","Nightingale adder","Peringuey's adder","Puff adder","African puff adder","Rhombic night adder","Sand adder","Dwarf sand adder","Namib dwarf sand adder","Water adder","Aesculapian snake","Anaconda","Bolivian anaconda","De Schauensee's anaconda","Green anaconda","Yellow anaconda","Arafura file snake","Asp","European asp","Egyptian asp","African beaked snake","Ball Python","Bird snake","Black-headed snake","Mexican black kingsnake","Black rat snake","Black snake","Red-bellied black snake","Blind snake","Brahminy blind snake","Texas blind snake","Western blind snake","Boa","Abaco Island boa","Amazon tree boa","Boa constrictor","Cuban boa","Dumeril's boa","Dwarf boa","Emerald tree boa","Hogg Island boa","Jamaican boa","Madagascar ground boa","Madagascar tree boa","Puerto Rican boa","Rainbow boa","Red-tailed boa","Rosy boa","Rubber boa","Sand boa","Tree boa","Boiga","Boomslang","Brown snake","Eastern brown snake","Bull snake","Bushmaster","Dwarf beaked snake","Rufous beaked snake","Canebrake","Cantil","Cascabel","Cat-eyed snake","Banded cat-eyed snake","Green cat-eyed snake","Cat snake","Andaman cat snake","Beddome's cat snake","Dog-toothed cat snake","Forsten's cat snake","Gold-ringed cat snake","Gray cat snake","Many-spotted cat snake","Tawny cat snake","Chicken snake","Coachwhip snake","Cobra","Andaman cobra","Arabian cobra","Asian cobra","Banded water cobra","Black-necked cobra","Black-necked spitting cobra","Black tree cobra","Burrowing cobra","Cape cobra","Caspian cobra","Congo water cobra","Common cobra","Eastern water cobra","Egyptian cobra","Equatorial spitting cobra","False cobra","False water cobra","Forest cobra","Gold tree cobra","Indian cobra","Indochinese spitting cobra","Javan spitting cobra","King cobra","Mandalay cobra","Mozambique spitting cobra","North Philippine cobra","Nubian spitting cobra","Philippine cobra","Red spitting cobra","Rinkhals cobra","Shield-nosed cobra","Sinai desert cobra","Southern Indonesian spitting cobra","Southern Philippine cobra","Southwestern black spitting cobra","Snouted cobra","Spectacled cobra","Spitting cobra","Storm water cobra","Thai cobra","Taiwan cobra","Zebra spitting cobra","Collett's snake","Congo snake","Copperhead","American copperhead","Australian copperhead","Coral snake","Arizona coral snake","Beddome's coral snake","Brazilian coral snake","Cape coral snake","Harlequin coral snake","High Woods coral snake","Malayan long-glanded coral snake","Texas Coral Snake","Western coral snake","Corn snake","South eastern corn snake","Cottonmouth","Crowned snake","Cuban wood snake","Eastern hognose snake","Egg-eater","Eastern coral snake","Fer-de-lance","Fierce snake","Fishing snake","Flying snake","Golden tree snake","Indian flying snake","Moluccan flying snake","Ornate flying snake","Paradise flying snake","Twin-Barred tree snake","Banded Flying Snake","Fox snake, three species of Pantherophis","Forest flame snake","Garter snake","Checkered garter snake","Common garter snake","San Francisco garter snake","Texas garter snake","Cape gopher snake","Grass snake","Green snake","Rough green snake","Smooth green snake","Ground snake","Common ground snake","Three-lined ground snake","Western ground snake","Habu","Hognose snake","Blonde hognose snake","Dusty hognose snake","Jan's hognose snake","Giant Malagasy hognose snake","Mexican hognose snake","South American hognose snake","Hundred pacer","Ikaheka snake","Indigo snake","Jamaican Tree Snake","Keelback","Asian keelback","Assam keelback","Black-striped keelback","Buff striped keelback","Burmese keelback","Checkered keelback","Common keelback","Hill keelback","Himalayan keelback","Khasi Hills keelback","Modest keelback","Nicobar Island keelback","Nilgiri keelback","Orange-collared keelback","Red-necked keelback","Sikkim keelback","Speckle-bellied keelback","White-lipped keelback","Wynaad keelback","Yunnan keelback","King brown","King snake","California kingsnake","Desert kingsnake","Grey-banded kingsnake","North eastern king snake","Prairie kingsnake","Scarlet kingsnake","Speckled kingsnake","Krait","Banded krait","Blue krait","Black krait","Burmese krait","Ceylon krait","Indian krait","Lesser black krait","Malayan krait","Many-banded krait","Northeastern hill krait","Red-headed krait","Sind krait","Large shield snake","Lancehead","Common lancehead","Lora","Grey Lora","Lyre snake","Baja California lyresnake","Central American lyre snake","Texas lyre snake","Eastern lyre snake","Machete savane","Mamba","Black mamba","Green mamba","Eastern green mamba","Western green mamba","Mamushi","Mangrove snake","Milk snake","Moccasin snake","Montpellier snake","Mud snake","Eastern mud snake","Western mud snake","Mussurana","Night snake","Cat-eyed night snake","Texas night snake","Nichell snake","Narrowhead Garter Snake","Nose-horned viper","Rhinoceros viper","Vipera ammodytes","Parrot snake","Mexican parrot snake","Patchnose snake","Perrotet's shieldtail snake","Pine snake","Pipe snake","Asian pipe snake","Dwarf pipe snake","Red-tailed pipe snake","Python","African rock python","Amethystine python","Angolan python","Australian scrub python","Ball python","Bismarck ringed python","Black headed python","Blood python","Boelen python","Borneo short-tailed python","Bredl's python","Brown water python","Burmese python","Calabar python","Western carpet python","Centralian carpet python","Coastal carpet python","Inland carpet python","Jungle carpet python","New Guinea carpet python","Northwestern carpet python","Southwestern carpet python","Children's python","Dauan Island water python","Desert woma python","Diamond python","Flinders python","Green tree python","Halmahera python","Indian python","Indonesian water python","Macklot's python","Mollucan python","Oenpelli python","Olive python","Papuan python","Pygmy python","Red blood python","Reticulated python","Kayaudi dwarf reticulated python","Selayer reticulated python","Rough-scaled python","Royal python","Savu python","Spotted python","Stimson's python","Sumatran short-tailed python","Tanimbar python","Timor python","Wetar Island python","White-lipped python","Brown white-lipped python","Northern white-lipped python","Southern white-lipped python","Woma python","Western woma python","Queen snake","Racer","Bimini racer","Buttermilk racer","Eastern racer","Eastern yellowbelly sad racer","Mexican racer","Southern black racer","Tan racer","West Indian racer","Raddysnake","Southwestern blackhead snake","Rat snake","Baird's rat snake","Beauty rat snake","Great Plains rat snake","Green rat snake","Japanese forest rat snake","Japanese rat snake","King rat snake","Mandarin rat snake","Persian rat snake","Red-backed rat snake","Twin-spotted rat snake","Yellow-striped rat snake","Manchurian Black Water Snake","Rattlesnake","Arizona black rattlesnake","Aruba rattlesnake","Chihuahuan ridge-nosed rattlesnake","Coronado Island rattlesnake","Durango rock rattlesnake","Dusky pigmy rattlesnake","Eastern diamondback rattlesnake","Grand Canyon rattlesnake","Great Basin rattlesnake","Hopi rattlesnake","Lance-headed rattlesnake","Long-tailed rattlesnake","Massasauga rattlesnake","Mexican green rattlesnake","Mexican west coast rattlesnake","Midget faded rattlesnake","Mojave rattlesnake","Northern black-tailed rattlesnake","Oaxacan small-headed rattlesnake","Rattler","Red diamond rattlesnake","Southern Pacific rattlesnake","Southwestern speckled rattlesnake","Tancitaran dusky rattlesnake","Tiger rattlesnake","Timber rattlesnake","Tropical rattlesnake","Twin-spotted rattlesnake","Uracoan rattlesnake","Western diamondback rattlesnake","Ribbon snake","Rinkhals","River jack","Sea snake","Annulated sea snake","Beaked sea snake","Dubois's sea snake","Hardwicke's sea snake","Hook Nosed Sea Snake","Olive sea snake","Pelagic sea snake","Stoke's sea snake","Yellow-banded sea snake","Yellow-bellied sea snake","Yellow-lipped sea snake","Shield-tailed snake","Sidewinder","Colorado desert sidewinder","Mojave desert sidewinder","Sonoran sidewinder","Small-eyed snake","Smooth snake","Brazilian smooth snake","European smooth snake","Stiletto snake","Striped snake","Japanese striped snake","Sunbeam snake","Taipan","Central ranges taipan","Coastal taipan","Inland taipan","Paupan taipan","Tentacled snake","Tic polonga","Tiger snake","Chappell Island tiger snake","Common tiger snake","Down's tiger snake","Eastern tiger snake","King Island tiger snake","Krefft's tiger snake","Peninsula tiger snake","Tasmanian tiger snake","Western tiger snake","Tigre snake","Tree snake","Blanding's tree snake","Blunt-headed tree snake","Brown tree snake","Long-nosed tree snake","Many-banded tree snake","Northern tree snake","Trinket snake","Black-banded trinket snake","Twig snake","African twig snake","Twin Headed King Snake","Titanboa","Urutu","Vine snake","Asian Vine Snake, Whip Snake","American Vine Snake","Mexican vine snake","Viper","Asp viper","Bamboo viper","Bluntnose viper","Brazilian mud Viper","Burrowing viper","Bush viper","Great Lakes bush viper","Hairy bush viper","Nitsche's bush viper","Rough-scaled bush viper","Spiny bush viper","Carpet viper","Crossed viper","Cyclades blunt-nosed viper","Eyelash viper","False horned viper","Fea's viper","Fifty pacer","Gaboon viper","Hognosed viper","Horned desert viper","Horned viper","Jumping viper","Kaznakov's viper","Leaf-nosed viper","Leaf viper","Levant viper","Long-nosed viper","McMahon's viper","Mole viper","Palestine viper","Pallas' viper","Palm viper","Amazonian palm viper","Black-speckled palm-pitviper","Eyelash palm-pitviper","Green palm viper","Mexican palm-pitviper","Guatemalan palm viper","Honduran palm viper","Siamese palm viper","Side-striped palm-pitviper","Yellow-lined palm viper","Pit viper","Banded pitviper","Bamboo pitviper","Barbour's pit viper","Black-tailed horned pit viper","Bornean pitviper","Brongersma's pitviper","Brown spotted pitviper[4]","Cantor's pitviper","Elegant pitviper","Eyelash pit viper","Fan-Si-Pan horned pitviper","Flat-nosed pitviper","Godman's pit viper","Green tree pit viper","Habu pit viper","Hagen's pitviper","Horseshoe pitviper","Jerdon's pitviper","Kanburian pit viper","Kaulback's lance-headed pitviper","Kham Plateau pitviper","Large-eyed pitviper","Malabar rock pitviper","Malayan pit viper","Mangrove pit viper","Mangshan pitviper","Motuo bamboo pitviper","Nicobar bamboo pitviper","Philippine pitviper","Pointed-scaled pit viper[5]","Red-tailed bamboo pitviper","Schultze's pitviper","Stejneger's bamboo pitviper","Sri Lankan pit viper","Temple pit viper","Tibetan bamboo pitviper","Tiger pit viper","Undulated pit viper","Wagler's pit viper","Wirot's pit viper","Portuguese viper","Saw-scaled viper","Schlegel's viper","Sedge viper","Sharp-nosed viper","Snorkel viper","Temple viper","Tree viper","Chinese tree viper","Guatemalan tree viper","Hutton's tree viper","Indian tree viper","Large-scaled tree viper","Malcolm's tree viper","Nitsche's tree viper","Pope's tree viper","Rough-scaled tree viper","Rungwe tree viper","Sumatran tree viper","White-lipped tree viper","Ursini's viper","Western hog-nosed viper","Wart snake","Water moccasin","Water snake","Bocourt's water snake","Northern water snake","Whip snake","Long-nosed whip snake","Wolf snake","African wolf snake","Barred wolf snake","Worm snake","Common worm snake","Longnosed worm snake","Wutu","Yarara","Zebra snake"],uHu=["dog","cat","snake","bear","lion","cetacean","insect","crocodilia","cow","bird","fish","rabbit","horse"],nHu={bear:Vju,bird:$ju,cat:Kju,cetacean:Wju,cow:Gju,crocodilia:Uju,dog:qju,fish:Jju,horse:Zju,insect:Yju,lion:Qju,rabbit:Xju,rodent:eHu,snake:tHu,type:uHu},iHu=nHu,rHu=["{{person.name}}","{{company.name}}"],aHu=["Redhold","Treeflex","Trippledex","Kanlam","Bigtax","Daltfresh","Toughjoyfax","Mat Lam Tam","Otcom","Tres-Zap","Y-Solowarm","Tresom","Voltsillam","Biodex","Greenlam","Viva","Matsoft","Temp","Zoolab","Subin","Rank","Job","Stringtough","Tin","It","Home Ing","Zamit","Sonsing","Konklab","Alpha","Latlux","Voyatouch","Alphazap","Holdlamis","Zaam-Dox","Sub-Ex","Quo Lux","Bamity","Ventosanzap","Lotstring","Hatity","Tempsoft","Overhold","Fixflex","Konklux","Zontrax","Tampflex","Span","Namfix","Transcof","Stim","Fix San","Sonair","Stronghold","Fintone","Y-find","Opela","Lotlux","Ronstring","Zathin","Duobam","Keylex"],oHu=["0.#.#","0.##","#.##","#.#","#.#.#"],sHu={author:rHu,name:aHu,version:oHu},lHu=sHu,cHu=["###-###-####","(###) ###-####","1-###-###-####","###.###.####"],dHu={formats:cHu},hHu=dHu,EHu=["red","green","blue","yellow","purple","mint green","teal","white","black","orange","pink","grey","maroon","violet","turquoise","tan","sky blue","salmon","plum","orchid","olive","magenta","lime","ivory","indigo","gold","fuchsia","cyan","azure","lavender","silver"],mHu={human:EHu},gHu=mHu,fHu=["Books","Movies","Music","Games","Electronics","Computers","Home","Garden","Tools","Grocery","Health","Beauty","Toys","Kids","Baby","Clothing","Shoes","Jewelery","Sports","Outdoors","Automotive","Industrial"],pHu=["Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support","The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive","New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016","The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality","The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design","The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J","The Football Is Good For Training And Recreational Purposes","Carbonite web goalkeeper gloves are ergonomically designed to give easy fit","Boston's most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles","New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart","The beautiful range of Apple Naturalé that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients","Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals"],DHu={adjective:["Small","Ergonomic","Electronic","Rustic","Intelligent","Gorgeous","Incredible","Elegant","Fantastic","Practical","Modern","Recycled","Sleek","Bespoke","Awesome","Generic","Handcrafted","Handmade","Oriental","Licensed","Luxurious","Refined","Unbranded","Tasty"],material:["Steel","Bronze","Wooden","Concrete","Plastic","Cotton","Granite","Rubber","Metal","Soft","Fresh","Frozen"],product:["Chair","Car","Computer","Keyboard","Mouse","Bike","Ball","Gloves","Pants","Shirt","Table","Shoes","Hat","Towels","Soap","Tuna","Chicken","Fish","Cheese","Bacon","Pizza","Salad","Sausages","Chips"]},xHu={department:fHu,product_description:pHu,product_name:DHu},vHu=xHu,CHu=["Adaptive","Advanced","Ameliorated","Assimilated","Automated","Balanced","Business-focused","Centralized","Cloned","Compatible","Configurable","Cross-group","Cross-platform","Customer-focused","Customizable","Decentralized","De-engineered","Devolved","Digitized","Distributed","Diverse","Down-sized","Enhanced","Enterprise-wide","Ergonomic","Exclusive","Expanded","Extended","Face to face","Focused","Front-line","Fully-configurable","Function-based","Fundamental","Future-proofed","Grass-roots","Horizontal","Implemented","Innovative","Integrated","Intuitive","Inverse","Managed","Mandatory","Monitored","Multi-channelled","Multi-lateral","Multi-layered","Multi-tiered","Networked","Object-based","Open-architected","Open-source","Operative","Optimized","Optional","Organic","Organized","Persevering","Persistent","Phased","Polarised","Pre-emptive","Proactive","Profit-focused","Profound","Programmable","Progressive","Public-key","Quality-focused","Reactive","Realigned","Re-contextualized","Re-engineered","Reduced","Reverse-engineered","Right-sized","Robust","Seamless","Secured","Self-enabling","Sharable","Stand-alone","Streamlined","Switchable","Synchronised","Synergistic","Synergized","Team-oriented","Total","Triple-buffered","Universal","Up-sized","Upgradable","User-centric","User-friendly","Versatile","Virtual","Visionary","Vision-oriented"],bHu=["clicks-and-mortar","value-added","vertical","proactive","robust","revolutionary","scalable","leading-edge","innovative","intuitive","strategic","e-business","mission-critical","sticky","one-to-one","24/7","end-to-end","global","B2B","B2C","granular","frictionless","virtual","viral","dynamic","24/365","best-of-breed","killer","magnetic","bleeding-edge","web-enabled","interactive","dot-com","sexy","back-end","real-time","efficient","front-end","distributed","seamless","extensible","turn-key","world-class","open-source","cross-platform","cross-media","synergistic","bricks-and-clicks","out-of-the-box","enterprise","integrated","impactful","wireless","transparent","next-generation","cutting-edge","user-centric","visionary","customized","ubiquitous","plug-and-play","collaborative","compelling","holistic","rich"],kHu=["synergies","paradigms","markets","partnerships","infrastructures","platforms","initiatives","channels","eyeballs","communities","ROI","solutions","action-items","portals","niches","technologies","content","supply-chains","convergence","relationships","architectures","interfaces","e-markets","e-commerce","systems","bandwidth","models","mindshare","deliverables","users","schemas","networks","applications","metrics","e-business","functionalities","experiences","web services","methodologies","blockchains","lifetime value"],FHu=["implement","utilize","integrate","streamline","optimize","evolve","transform","embrace","enable","orchestrate","leverage","reinvent","aggregate","architect","enhance","incentivize","morph","empower","envisioneer","monetize","harness","facilitate","seize","disintermediate","synergize","strategize","deploy","brand","grow","target","syndicate","synthesize","deliver","mesh","incubate","engage","maximize","benchmark","expedite","reintermediate","whiteboard","visualize","repurpose","innovate","scale","unleash","drive","extend","engineer","revolutionize","generate","exploit","transition","e-enable","iterate","cultivate","matrix","productize","redefine","recontextualize"],yHu=["24 hour","24/7","3rd generation","4th generation","5th generation","6th generation","actuating","analyzing","asymmetric","asynchronous","attitude-oriented","background","bandwidth-monitored","bi-directional","bifurcated","bottom-line","clear-thinking","client-driven","client-server","coherent","cohesive","composite","context-sensitive","contextually-based","content-based","dedicated","demand-driven","didactic","directional","discrete","disintermediate","dynamic","eco-centric","empowering","encompassing","even-keeled","executive","explicit","exuding","fault-tolerant","foreground","fresh-thinking","full-range","global","grid-enabled","heuristic","high-level","holistic","homogeneous","human-resource","hybrid","impactful","incremental","intangible","interactive","intermediate","leading edge","local","logistical","maximized","methodical","mission-critical","mobile","modular","motivating","multimedia","multi-state","multi-tasking","national","needs-based","neutral","next generation","non-volatile","object-oriented","optimal","optimizing","radical","real-time","reciprocal","regional","responsive","scalable","secondary","solution-oriented","stable","static","systematic","systemic","system-worthy","tangible","tertiary","transitional","uniform","upward-trending","user-facing","value-added","web-enabled","well-modulated","zero administration","zero defect","zero tolerance"],AHu=["{{person.last_name}} {{company.suffix}}","{{person.last_name}} - {{person.last_name}}","{{person.last_name}}, {{person.last_name}} and {{person.last_name}}"],_Hu=["ability","access","adapter","algorithm","alliance","analyzer","application","approach","architecture","archive","artificial intelligence","array","attitude","benchmark","budgetary management","capability","capacity","challenge","circuit","collaboration","complexity","concept","conglomeration","contingency","core","customer loyalty","database","data-warehouse","definition","emulation","encoding","encryption","extranet","firmware","flexibility","focus group","forecast","frame","framework","function","functionalities","Graphic Interface","groupware","Graphical User Interface","hardware","help-desk","hierarchy","hub","implementation","info-mediaries","infrastructure","initiative","installation","instruction set","interface","internet solution","intranet","knowledge user","knowledge base","local area network","leverage","matrices","matrix","methodology","middleware","migration","model","moderator","monitoring","moratorium","neural-net","open architecture","open system","orchestration","paradigm","parallelism","policy","portal","pricing structure","process improvement","product","productivity","project","projection","protocol","secured line","service-desk","software","solution","standardization","strategy","structure","success","superstructure","support","synergy","system engine","task-force","throughput","time-frame","toolset","utilisation","website","workforce"],SHu=["Inc","and Sons","LLC","Group"],BHu={adjective:CHu,buzz_adjective:bHu,buzz_noun:kHu,buzz_verb:FHu,descriptor:yHu,name_pattern:AHu,noun:_Hu,suffix:SHu},wHu=BHu,LHu=["id","title","name","email","phone","token","group","category","password","comment","avatar","status","createdAt","updatedAt"],zHu={column:LHu},MHu=zHu,THu={wide:["January","February","March","April","May","June","July","August","September","October","November","December"],abbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},NHu={wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},PHu={month:THu,weekday:NHu},RHu=PHu,IHu=["Checking","Savings","Money Market","Investment","Home Loan","Credit Card","Auto Loan","Personal Loan"],OHu=["34##-######-####L","37##-######-####L"],jHu=["30[0-5]#-######-###L","36##-######-###L","54##-####-####-###L"],HHu=["6011-####-####-###L","65##-####-####-###L","64[4-9]#-####-####-###L","6011-62##-####-####-###L","65##-62##-####-####-###L","64[4-9]#-62##-####-####-###L"],VHu=["3528-####-####-###L","3529-####-####-###L","35[3-8]#-####-####-###L"],$Hu=["5018-#{4}-#{4}-#{3}L","5020-#{4}-#{4}-#{3}L","5038-#{4}-#{4}-#{3}L","5893-#{4}-#{4}-#{3}L","6304-#{4}-#{4}-#{3}L","6759-#{4}-#{4}-#{3}L","676[1-3]-####-####-###L","5018#{11,15}L","5020#{11,15}L","5038#{11,15}L","5893#{11,15}L","6304#{11,15}L","6759#{11,15}L","676[1-3]#{11,15}L"],KHu=["5[1-5]##-####-####-###L","2[221-720]-####-####-###L"],WHu=["4###########L","4###-####-####-###L"],GHu={american_express:OHu,diners_club:jHu,discover:HHu,jcb:VHu,maestro:$Hu,mastercard:KHu,visa:WHu},UHu=GHu,qHu=[{name:"UAE Dirham",code:"AED",symbol:""},{name:"Afghani",code:"AFN",symbol:"؋"},{name:"Lek",code:"ALL",symbol:"Lek"},{name:"Armenian Dram",code:"AMD",symbol:""},{name:"Netherlands Antillian Guilder",code:"ANG",symbol:"ƒ"},{name:"Kwanza",code:"AOA",symbol:""},{name:"Argentine Peso",code:"ARS",symbol:"$"},{name:"Australian Dollar",code:"AUD",symbol:"$"},{name:"Aruban Guilder",code:"AWG",symbol:"ƒ"},{name:"Azerbaijanian Manat",code:"AZN",symbol:"ман"},{name:"Convertible Marks",code:"BAM",symbol:"KM"},{name:"Barbados Dollar",code:"BBD",symbol:"$"},{name:"Taka",code:"BDT",symbol:""},{name:"Bulgarian Lev",code:"BGN",symbol:"лв"},{name:"Bahraini Dinar",code:"BHD",symbol:""},{name:"Burundi Franc",code:"BIF",symbol:""},{name:"Bermudian Dollar (customarily known as Bermuda Dollar)",code:"BMD",symbol:"$"},{name:"Brunei Dollar",code:"BND",symbol:"$"},{name:"Boliviano boliviano",code:"BOB",symbol:"Bs"},{name:"Brazilian Real",code:"BRL",symbol:"R$"},{name:"Bahamian Dollar",code:"BSD",symbol:"$"},{name:"Pula",code:"BWP",symbol:"P"},{name:"Belarusian Ruble",code:"BYN",symbol:"Rbl"},{name:"Belize Dollar",code:"BZD",symbol:"BZ$"},{name:"Canadian Dollar",code:"CAD",symbol:"$"},{name:"Congolese Franc",code:"CDF",symbol:""},{name:"Swiss Franc",code:"CHF",symbol:"CHF"},{name:"Chilean Peso",code:"CLP",symbol:"$"},{name:"Yuan Renminbi",code:"CNY",symbol:"¥"},{name:"Colombian Peso",code:"COP",symbol:"$"},{name:"Costa Rican Colon",code:"CRC",symbol:"₡"},{name:"Cuban Peso",code:"CUP",symbol:"₱"},{name:"Cape Verde Escudo",code:"CVE",symbol:""},{name:"Czech Koruna",code:"CZK",symbol:"Kč"},{name:"Djibouti Franc",code:"DJF",symbol:""},{name:"Danish Krone",code:"DKK",symbol:"kr"},{name:"Dominican Peso",code:"DOP",symbol:"RD$"},{name:"Algerian Dinar",code:"DZD",symbol:""},{name:"Egyptian Pound",code:"EGP",symbol:"£"},{name:"Nakfa",code:"ERN",symbol:""},{name:"Ethiopian Birr",code:"ETB",symbol:""},{name:"Euro",code:"EUR",symbol:"€"},{name:"Fiji Dollar",code:"FJD",symbol:"$"},{name:"Falkland Islands Pound",code:"FKP",symbol:"£"},{name:"Pound Sterling",code:"GBP",symbol:"£"},{name:"Lari",code:"GEL",symbol:""},{name:"Cedi",code:"GHS",symbol:""},{name:"Gibraltar Pound",code:"GIP",symbol:"£"},{name:"Dalasi",code:"GMD",symbol:""},{name:"Guinea Franc",code:"GNF",symbol:""},{name:"Quetzal",code:"GTQ",symbol:"Q"},{name:"Guyana Dollar",code:"GYD",symbol:"$"},{name:"Hong Kong Dollar",code:"HKD",symbol:"$"},{name:"Lempira",code:"HNL",symbol:"L"},{name:"Gourde",code:"HTG",symbol:""},{name:"Forint",code:"HUF",symbol:"Ft"},{name:"Rupiah",code:"IDR",symbol:"Rp"},{name:"New Israeli Sheqel",code:"ILS",symbol:"₪"},{name:"Bhutanese Ngultrum",code:"BTN",symbol:"Nu"},{name:"Indian Rupee",code:"INR",symbol:"₹"},{name:"Iraqi Dinar",code:"IQD",symbol:""},{name:"Iranian Rial",code:"IRR",symbol:"﷼"},{name:"Iceland Krona",code:"ISK",symbol:"kr"},{name:"Jamaican Dollar",code:"JMD",symbol:"J$"},{name:"Jordanian Dinar",code:"JOD",symbol:""},{name:"Yen",code:"JPY",symbol:"¥"},{name:"Kenyan Shilling",code:"KES",symbol:""},{name:"Som",code:"KGS",symbol:"лв"},{name:"Riel",code:"KHR",symbol:"៛"},{name:"Comoro Franc",code:"KMF",symbol:""},{name:"North Korean Won",code:"KPW",symbol:"₩"},{name:"Won",code:"KRW",symbol:"₩"},{name:"Kuwaiti Dinar",code:"KWD",symbol:""},{name:"Cayman Islands Dollar",code:"KYD",symbol:"$"},{name:"Tenge",code:"KZT",symbol:"лв"},{name:"Kip",code:"LAK",symbol:"₭"},{name:"Lebanese Pound",code:"LBP",symbol:"£"},{name:"Sri Lanka Rupee",code:"LKR",symbol:"₨"},{name:"Liberian Dollar",code:"LRD",symbol:"$"},{name:"Libyan Dinar",code:"LYD",symbol:""},{name:"Moroccan Dirham",code:"MAD",symbol:""},{name:"Moldovan Leu",code:"MDL",symbol:""},{name:"Malagasy Ariary",code:"MGA",symbol:""},{name:"Denar",code:"MKD",symbol:"ден"},{name:"Kyat",code:"MMK",symbol:""},{name:"Tugrik",code:"MNT",symbol:"₮"},{name:"Pataca",code:"MOP",symbol:""},{name:"Ouguiya",code:"MRU",symbol:""},{name:"Mauritius Rupee",code:"MUR",symbol:"₨"},{name:"Rufiyaa",code:"MVR",symbol:""},{name:"Kwacha",code:"MWK",symbol:""},{name:"Mexican Peso",code:"MXN",symbol:"$"},{name:"Malaysian Ringgit",code:"MYR",symbol:"RM"},{name:"Metical",code:"MZN",symbol:"MT"},{name:"Naira",code:"NGN",symbol:"₦"},{name:"Cordoba Oro",code:"NIO",symbol:"C$"},{name:"Norwegian Krone",code:"NOK",symbol:"kr"},{name:"Nepalese Rupee",code:"NPR",symbol:"₨"},{name:"New Zealand Dollar",code:"NZD",symbol:"$"},{name:"Rial Omani",code:"OMR",symbol:"﷼"},{name:"Balboa",code:"PAB",symbol:"B/."},{name:"Nuevo Sol",code:"PEN",symbol:"S/."},{name:"Kina",code:"PGK",symbol:""},{name:"Philippine Peso",code:"PHP",symbol:"Php"},{name:"Pakistan Rupee",code:"PKR",symbol:"₨"},{name:"Zloty",code:"PLN",symbol:"zł"},{name:"Guarani",code:"PYG",symbol:"Gs"},{name:"Qatari Rial",code:"QAR",symbol:"﷼"},{name:"New Leu",code:"RON",symbol:"lei"},{name:"Serbian Dinar",code:"RSD",symbol:"Дин."},{name:"Russian Ruble",code:"RUB",symbol:"руб"},{name:"Rwanda Franc",code:"RWF",symbol:""},{name:"Saudi Riyal",code:"SAR",symbol:"﷼"},{name:"Solomon Islands Dollar",code:"SBD",symbol:"$"},{name:"Seychelles Rupee",code:"SCR",symbol:"₨"},{name:"Sudanese Pound",code:"SDG",symbol:""},{name:"Swedish Krona",code:"SEK",symbol:"kr"},{name:"Singapore Dollar",code:"SGD",symbol:"$"},{name:"Saint Helena Pound",code:"SHP",symbol:"£"},{name:"Leone",code:"SLE",symbol:""},{name:"Somali Shilling",code:"SOS",symbol:"S"},{name:"Surinam Dollar",code:"SRD",symbol:"$"},{name:"South Sudanese pound",code:"SSP",symbol:""},{name:"Dobra",code:"STN",symbol:"Db"},{name:"Syrian Pound",code:"SYP",symbol:"£"},{name:"Lilangeni",code:"SZL",symbol:""},{name:"Baht",code:"THB",symbol:"฿"},{name:"Somoni",code:"TJS",symbol:""},{name:"Manat",code:"TMT",symbol:""},{name:"Tunisian Dinar",code:"TND",symbol:""},{name:"Pa'anga",code:"TOP",symbol:""},{name:"Turkish Lira",code:"TRY",symbol:"₺"},{name:"Trinidad and Tobago Dollar",code:"TTD",symbol:"TT$"},{name:"New Taiwan Dollar",code:"TWD",symbol:"NT$"},{name:"Tanzanian Shilling",code:"TZS",symbol:""},{name:"Hryvnia",code:"UAH",symbol:"₴"},{name:"Uganda Shilling",code:"UGX",symbol:""},{name:"US Dollar",code:"USD",symbol:"$"},{name:"Peso Uruguayo",code:"UYU",symbol:"$U"},{name:"Uzbekistan Sum",code:"UZS",symbol:"лв"},{name:"Venezuelan bolívar",code:"VES",symbol:"Bs"},{name:"Dong",code:"VND",symbol:"₫"},{name:"Vatu",code:"VUV",symbol:""},{name:"Tala",code:"WST",symbol:""},{name:"CFA Franc BEAC",code:"XAF",symbol:""},{name:"East Caribbean Dollar",code:"XCD",symbol:"$"},{name:"CFA Franc BCEAO",code:"XOF",symbol:""},{name:"CFP Franc",code:"XPF",symbol:""},{name:"Yemeni Rial",code:"YER",symbol:"﷼"},{name:"Rand",code:"ZAR",symbol:"R"},{name:"Lesotho Loti",code:"LSL",symbol:""},{name:"Namibia Dollar",code:"NAD",symbol:"N$"},{name:"Zambian Kwacha",code:"ZMW",symbol:"K"},{name:"Zimbabwe Dollar",code:"ZWL",symbol:""}],JHu=["deposit","withdrawal","payment","invoice"],ZHu={account_type:IHu,credit_card:UHu,currency:qHu,transaction_type:JHu},YHu=ZHu,QHu=["auxiliary","primary","back-end","digital","open-source","virtual","cross-platform","redundant","online","haptic","multi-byte","bluetooth","wireless","1080p","neural","optical","solid state","mobile"],XHu=["backing up","bypassing","hacking","overriding","compressing","copying","navigating","indexing","connecting","generating","quantifying","calculating","synthesizing","transmitting","programming","parsing"],eVu=["driver","protocol","bandwidth","panel","microchip","program","port","card","array","interface","system","sensor","firewall","hard drive","pixel","alarm","feed","monitor","application","transmitter","bus","circuit","capacitor","matrix"],tVu=["If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!","We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!","Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!","You can't {{verb}} the {{noun}} without {{ingverb}} the {{adjective}} {{abbreviation}} {{noun}}!","Use the {{adjective}} {{abbreviation}} {{noun}}, then you can {{verb}} the {{adjective}} {{noun}}!","The {{abbreviation}} {{noun}} is down, {{verb}} the {{adjective}} {{noun}} so we can {{verb}} the {{abbreviation}} {{noun}}!","{{ingverb}} the {{noun}} won't do anything, we need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!","I'll {{verb}} the {{adjective}} {{abbreviation}} {{noun}}, that should {{noun}} the {{abbreviation}} {{noun}}!"],uVu=["back up","bypass","hack","override","compress","copy","navigate","index","connect","generate","quantify","calculate","synthesize","input","transmit","program","reboot","parse"],nVu={adjective:QHu,ingverb:XHu,noun:eVu,phrase:tVu,verb:uVu},iVu=nVu,rVu=["com","biz","info","name","net","org"],aVu=["example.org","example.com","example.net"],oVu=["gmail.com","yahoo.com","hotmail.com"],sVu={domain_suffix:rVu,example_email:aVu,free_email:oVu},lVu=sVu,cVu=["#####","####","###"],dVu=["Abilene","Akron","Alafaya","Alameda","Albany","Albuquerque","Alexandria","Alhambra","Aliso Viejo","Allen","Allentown","Aloha","Alpharetta","Altadena","Altamonte Springs","Altoona","Amarillo","Ames","Anaheim","Anchorage","Anderson","Ankeny","Ann Arbor","Annandale","Antelope","Antioch","Apex","Apopka","Apple Valley","Appleton","Arcadia","Arden-Arcade","Arecibo","Arlington","Arlington Heights","Arvada","Ashburn","Asheville","Aspen Hill","Atascocita","Athens-Clarke County","Atlanta","Attleboro","Auburn","Augusta-Richmond County","Aurora","Austin","Avondale","Azusa","Bakersfield","Baldwin Park","Baltimore","Barnstable Town","Bartlett","Baton Rouge","Battle Creek","Bayamon","Bayonne","Baytown","Beaumont","Beavercreek","Beaverton","Bedford","Bel Air South","Bell Gardens","Belleville","Bellevue","Bellflower","Bellingham","Bend","Bentonville","Berkeley","Berwyn","Bethesda","Bethlehem","Billings","Biloxi","Binghamton","Birmingham","Bismarck","Blacksburg","Blaine","Bloomington","Blue Springs","Boca Raton","Boise City","Bolingbrook","Bonita Springs","Bossier City","Boston","Bothell","Boulder","Bountiful","Bowie","Bowling Green","Boynton Beach","Bozeman","Bradenton","Brandon","Brentwood","Bridgeport","Bristol","Brockton","Broken Arrow","Brookhaven","Brookline","Brooklyn Park","Broomfield","Brownsville","Bryan","Buckeye","Buena Park","Buffalo","Buffalo Grove","Burbank","Burien","Burke","Burleson","Burlington","Burnsville","Caguas","Caldwell","Camarillo","Cambridge","Camden","Canton","Cape Coral","Carlsbad","Carmel","Carmichael","Carolina","Carrollton","Carson","Carson City","Cary","Casa Grande","Casas Adobes","Casper","Castle Rock","Castro Valley","Catalina Foothills","Cathedral City","Catonsville","Cedar Hill","Cedar Park","Cedar Rapids","Centennial","Centreville","Ceres","Cerritos","Champaign","Chandler","Chapel Hill","Charleston","Charlotte","Charlottesville","Chattanooga","Cheektowaga","Chesapeake","Chesterfield","Cheyenne","Chicago","Chico","Chicopee","Chino","Chino Hills","Chula Vista","Cicero","Cincinnati","Citrus Heights","Clarksville","Clearwater","Cleveland","Cleveland Heights","Clifton","Clovis","Coachella","Coconut Creek","Coeur d'Alene","College Station","Collierville","Colorado Springs","Colton","Columbia","Columbus","Commerce City","Compton","Concord","Conroe","Conway","Coon Rapids","Coral Gables","Coral Springs","Corona","Corpus Christi","Corvallis","Costa Mesa","Council Bluffs","Country Club","Covina","Cranston","Cupertino","Cutler Bay","Cuyahoga Falls","Cypress","Dale City","Dallas","Daly City","Danbury","Danville","Davenport","Davie","Davis","Dayton","Daytona Beach","DeKalb","DeSoto","Dearborn","Dearborn Heights","Decatur","Deerfield Beach","Delano","Delray Beach","Deltona","Denton","Denver","Des Moines","Des Plaines","Detroit","Diamond Bar","Doral","Dothan","Downers Grove","Downey","Draper","Dublin","Dubuque","Duluth","Dundalk","Dunwoody","Durham","Eagan","East Hartford","East Honolulu","East Lansing","East Los Angeles","East Orange","East Providence","Eastvale","Eau Claire","Eden Prairie","Edina","Edinburg","Edmond","El Cajon","El Centro","El Dorado Hills","El Monte","El Paso","Elgin","Elizabeth","Elk Grove","Elkhart","Ellicott City","Elmhurst","Elyria","Encinitas","Enid","Enterprise","Erie","Escondido","Euclid","Eugene","Euless","Evanston","Evansville","Everett","Fairfield","Fall River","Fargo","Farmington","Farmington Hills","Fayetteville","Federal Way","Findlay","Fishers","Flagstaff","Flint","Florence-Graham","Florin","Florissant","Flower Mound","Folsom","Fond du Lac","Fontana","Fort Collins","Fort Lauderdale","Fort Myers","Fort Pierce","Fort Smith","Fort Wayne","Fort Worth","Fountain Valley","Fountainebleau","Framingham","Franklin","Frederick","Freeport","Fremont","Fresno","Frisco","Fullerton","Gainesville","Gaithersburg","Galveston","Garden Grove","Gardena","Garland","Gary","Gastonia","Georgetown","Germantown","Gilbert","Gilroy","Glen Burnie","Glendale","Glendora","Glenview","Goodyear","Grand Forks","Grand Island","Grand Junction","Grand Prairie","Grand Rapids","Grapevine","Great Falls","Greeley","Green Bay","Greensboro","Greenville","Greenwood","Gresham","Guaynabo","Gulfport","Hacienda Heights","Hackensack","Haltom City","Hamilton","Hammond","Hampton","Hanford","Harlingen","Harrisburg","Harrisonburg","Hartford","Hattiesburg","Haverhill","Hawthorne","Hayward","Hemet","Hempstead","Henderson","Hendersonville","Hesperia","Hialeah","Hicksville","High Point","Highland","Highlands Ranch","Hillsboro","Hilo","Hoboken","Hoffman Estates","Hollywood","Homestead","Honolulu","Hoover","Houston","Huntersville","Huntington","Huntington Beach","Huntington Park","Huntsville","Hutchinson","Idaho Falls","Independence","Indianapolis","Indio","Inglewood","Iowa City","Irondequoit","Irvine","Irving","Jackson","Jacksonville","Janesville","Jefferson City","Jeffersonville","Jersey City","Johns Creek","Johnson City","Joliet","Jonesboro","Joplin","Jupiter","Jurupa Valley","Kalamazoo","Kannapolis","Kansas City","Kearny","Keller","Kendale Lakes","Kendall","Kenner","Kennewick","Kenosha","Kent","Kentwood","Kettering","Killeen","Kingsport","Kirkland","Kissimmee","Knoxville","Kokomo","La Crosse","La Habra","La Mesa","La Mirada","Lacey","Lafayette","Laguna Niguel","Lake Charles","Lake Elsinore","Lake Forest","Lake Havasu City","Lake Ridge","Lakeland","Lakeville","Lakewood","Lancaster","Lansing","Laredo","Largo","Las Cruces","Las Vegas","Lauderhill","Lawrence","Lawton","Layton","League City","Lee's Summit","Leesburg","Lehi","Lehigh Acres","Lenexa","Levittown","Lewisville","Lexington-Fayette","Lincoln","Linden","Little Rock","Littleton","Livermore","Livonia","Lodi","Logan","Lombard","Lompoc","Long Beach","Longmont","Longview","Lorain","Los Angeles","Louisville/Jefferson County","Loveland","Lowell","Lubbock","Lynchburg","Lynn","Lynwood","Macon-Bibb County","Madera","Madison","Malden","Manchester","Manhattan","Mansfield","Manteca","Maple Grove","Margate","Maricopa","Marietta","Marysville","Mayaguez","McAllen","McKinney","McLean","Medford","Melbourne","Memphis","Menifee","Mentor","Merced","Meriden","Meridian","Mesa","Mesquite","Metairie","Methuen Town","Miami","Miami Beach","Miami Gardens","Middletown","Midland","Midwest City","Milford","Millcreek","Milpitas","Milwaukee","Minneapolis","Minnetonka","Minot","Miramar","Mishawaka","Mission","Mission Viejo","Missoula","Missouri City","Mobile","Modesto","Moline","Monroe","Montebello","Monterey Park","Montgomery","Moore","Moreno Valley","Morgan Hill","Mount Pleasant","Mount Prospect","Mount Vernon","Mountain View","Muncie","Murfreesboro","Murray","Murrieta","Nampa","Napa","Naperville","Nashua","Nashville-Davidson","National City","New Bedford","New Braunfels","New Britain","New Brunswick","New Haven","New Orleans","New Rochelle","New York","Newark","Newport Beach","Newport News","Newton","Niagara Falls","Noblesville","Norfolk","Normal","Norman","North Bethesda","North Charleston","North Highlands","North Las Vegas","North Lauderdale","North Little Rock","North Miami","North Miami Beach","North Port","North Richland Hills","Norwalk","Novato","Novi","O'Fallon","Oak Lawn","Oak Park","Oakland","Oakland Park","Ocala","Oceanside","Odessa","Ogden","Oklahoma City","Olathe","Olympia","Omaha","Ontario","Orange","Orem","Orland Park","Orlando","Oro Valley","Oshkosh","Overland Park","Owensboro","Oxnard","Palatine","Palm Bay","Palm Beach Gardens","Palm Coast","Palm Desert","Palm Harbor","Palm Springs","Palmdale","Palo Alto","Paradise","Paramount","Parker","Parma","Pasadena","Pasco","Passaic","Paterson","Pawtucket","Peabody","Pearl City","Pearland","Pembroke Pines","Pensacola","Peoria","Perris","Perth Amboy","Petaluma","Pflugerville","Pharr","Philadelphia","Phoenix","Pico Rivera","Pine Bluff","Pine Hills","Pinellas Park","Pittsburg","Pittsburgh","Pittsfield","Placentia","Plainfield","Plano","Plantation","Pleasanton","Plymouth","Pocatello","Poinciana","Pomona","Pompano Beach","Ponce","Pontiac","Port Arthur","Port Charlotte","Port Orange","Port St. Lucie","Portage","Porterville","Portland","Portsmouth","Potomac","Poway","Providence","Provo","Pueblo","Quincy","Racine","Raleigh","Rancho Cordova","Rancho Cucamonga","Rancho Palos Verdes","Rancho Santa Margarita","Rapid City","Reading","Redding","Redlands","Redmond","Redondo Beach","Redwood City","Reno","Renton","Reston","Revere","Rialto","Richardson","Richland","Richmond","Rio Rancho","Riverside","Riverton","Riverview","Roanoke","Rochester","Rochester Hills","Rock Hill","Rockford","Rocklin","Rockville","Rockwall","Rocky Mount","Rogers","Rohnert Park","Rosemead","Roseville","Roswell","Round Rock","Rowland Heights","Rowlett","Royal Oak","Sacramento","Saginaw","Salem","Salina","Salinas","Salt Lake City","Sammamish","San Angelo","San Antonio","San Bernardino","San Bruno","San Buenaventura (Ventura)","San Clemente","San Diego","San Francisco","San Jacinto","San Jose","San Juan","San Leandro","San Luis Obispo","San Marcos","San Mateo","San Rafael","San Ramon","San Tan Valley","Sandy","Sandy Springs","Sanford","Santa Ana","Santa Barbara","Santa Clara","Santa Clarita","Santa Cruz","Santa Fe","Santa Maria","Santa Monica","Santa Rosa","Santee","Sarasota","Savannah","Sayreville","Schaumburg","Schenectady","Scottsdale","Scranton","Seattle","Severn","Shawnee","Sheboygan","Shoreline","Shreveport","Sierra Vista","Silver Spring","Simi Valley","Sioux City","Sioux Falls","Skokie","Smyrna","Somerville","South Bend","South Gate","South Hill","South Jordan","South San Francisco","South Valley","South Whittier","Southaven","Southfield","Sparks","Spokane","Spokane Valley","Spring","Spring Hill","Spring Valley","Springdale","Springfield","St. Charles","St. Clair Shores","St. Cloud","St. George","St. Joseph","St. Louis","St. Louis Park","St. Paul","St. Peters","St. Petersburg","Stamford","State College","Sterling Heights","Stillwater","Stockton","Stratford","Strongsville","Suffolk","Sugar Land","Summerville","Sunnyvale","Sunrise","Sunrise Manor","Surprise","Syracuse","Tacoma","Tallahassee","Tamarac","Tamiami","Tampa","Taunton","Taylor","Taylorsville","Temecula","Tempe","Temple","Terre Haute","Texas City","The Hammocks","The Villages","The Woodlands","Thornton","Thousand Oaks","Tigard","Tinley Park","Titusville","Toledo","Toms River","Tonawanda","Topeka","Torrance","Town 'n' Country","Towson","Tracy","Trenton","Troy","Trujillo Alto","Tuckahoe","Tucson","Tulare","Tulsa","Turlock","Tuscaloosa","Tustin","Twin Falls","Tyler","Union City","University","Upland","Urbana","Urbandale","Utica","Vacaville","Valdosta","Vallejo","Vancouver","Victoria","Victorville","Vineland","Virginia Beach","Visalia","Vista","Waco","Waipahu","Waldorf","Walnut Creek","Waltham","Warner Robins","Warren","Warwick","Washington","Waterbury","Waterloo","Watsonville","Waukegan","Waukesha","Wauwatosa","Wellington","Wesley Chapel","West Allis","West Babylon","West Covina","West Des Moines","West Hartford","West Haven","West Jordan","West Lafayette","West New York","West Palm Beach","West Sacramento","West Seneca","West Valley City","Westfield","Westland","Westminster","Weston","Weymouth Town","Wheaton","White Plains","Whittier","Wichita","Wichita Falls","Wilmington","Wilson","Winston-Salem","Woodbury","Woodland","Worcester","Wylie","Wyoming","Yakima","Yonkers","Yorba Linda","York","Youngstown","Yuba City","Yucaipa","Yuma"],hVu=["{{location.city_prefix}} {{person.first_name}}{{location.city_suffix}}","{{location.city_prefix}} {{person.first_name}}","{{person.first_name}}{{location.city_suffix}}","{{person.last_name}}{{location.city_suffix}}","{{location.city_name}}"],EVu=["North","East","West","South","New","Lake","Port","Fort"],mVu=["town","ton","land","ville","berg","burgh","boro","borough","bury","view","port","mouth","stad","stead","furt","chester","cester","fort","field","haven","side","shire","worth"],gVu=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory (Chagos Archipelago)","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Cook Islands","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Curacao","Cyprus","Czechia","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Faroe Islands","Falkland Islands (Malvinas)","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Democratic People's Republic of Korea","Republic of Korea","Kuwait","Kyrgyz Republic","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Barthelemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard & Jan Mayen Islands","Sweden","Switzerland","Syrian Arab Republic","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States of America","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands, British","Virgin Islands, U.S.","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"],fVu=["Adams County","Calhoun County","Carroll County","Clark County","Clay County","Crawford County","Douglas County","Fayette County","Franklin County","Grant County","Greene County","Hamilton County","Hancock County","Henry County","Jackson County","Jefferson County","Johnson County","Lake County","Lawrence County","Lee County","Lincoln County","Logan County","Madison County","Marion County","Marshall County","Monroe County","Montgomery County","Morgan County","Perry County","Pike County","Polk County","Scott County","Union County","Warren County","Washington County","Wayne County","Avon","Bedfordshire","Berkshire","Borders","Buckinghamshire","Cambridgeshire","Central","Cheshire","Cleveland","Clwyd","Cornwall","County Antrim","County Armagh","County Down","County Fermanagh","County Londonderry","County Tyrone","Cumbria","Derbyshire","Devon","Dorset","Dumfries and Galloway","Durham","Dyfed","East Sussex","Essex","Fife","Gloucestershire","Grampian","Greater Manchester","Gwent","Gwynedd County","Hampshire","Herefordshire","Hertfordshire","Highlands and Islands","Humberside","Isle of Wight","Kent","Lancashire","Leicestershire","Lincolnshire","Lothian","Merseyside","Mid Glamorgan","Norfolk","North Yorkshire","Northamptonshire","Northumberland","Nottinghamshire","Oxfordshire","Powys","Rutland","Shropshire","Somerset","South Glamorgan","South Yorkshire","Staffordshire","Strathclyde","Suffolk","Surrey","Tayside","Tyne and Wear","Warwickshire","West Glamorgan","West Midlands","West Sussex","West Yorkshire","Wiltshire","Worcestershire"],pVu=["United States of America"],DVu=["North","East","South","West","Northeast","Northwest","Southeast","Southwest"],xVu=["N","E","S","W","NE","NW","SE","SW"],vVu=["#####","#####-####"],CVu=["Apt. ###","Suite ###"],bVu=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"],kVu=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],FVu={normal:"{{location.buildingNumber}} {{location.street}}",full:"{{location.buildingNumber}} {{location.street}} {{location.secondaryAddress}}"},yVu=["10th Street","11th Street","12th Street","13th Street","14th Street","15th Street","16th Street","1st Avenue","1st Street","2nd Avenue","2nd Street","3rd Avenue","3rd Street","4th Avenue","4th Street","5th Avenue","5th Street","6th Avenue","6th Street","7th Avenue","7th Street","8th Avenue","8th Street","9th Street","A Street","Abbey Road","Adams Avenue","Adams Street","Airport Road","Albany Road","Albert Road","Albion Street","Alexandra Road","Alfred Street","Alma Street","Ash Close","Ash Grove","Ash Road","Ash Street","Aspen Close","Atlantic Avenue","Avenue Road","Back Lane","Baker Street","Balmoral Road","Barn Close","Barton Road","Bath Road","Bath Street","Bay Street","Beach Road","Bedford Road","Beech Close","Beech Drive","Beech Grove","Beech Road","Beechwood Avenue","Bell Lane","Belmont Road","Birch Avenue","Birch Close","Birch Grove","Birch Road","Blind Lane","Bluebell Close","Boundary Road","Bramble Close","Bramley Close","Bridge Road","Bridge Street","Broad Lane","Broad Street","Broadway","Broadway Avenue","Broadway Street","Brook Lane","Brook Road","Brook Street","Brookside","Buckingham Road","Cambridge Street","Canal Street","Castle Close","Castle Lane","Castle Road","Castle Street","Cavendish Road","Cedar Avenue","Cedar Close","Cedar Grove","Cedar Road","Cedar Street","Cemetery Road","Center Avenue","Center Road","Center Street","Central Avenue","Central Street","Chapel Close","Chapel Hill","Chapel Road","Chapel Street","Charles Street","Cherry Close","Cherry Street","Cherry Tree Close","Chester Road","Chestnut Close","Chestnut Drive","Chestnut Grove","Chestnut Street","Church Avenue","Church Close","Church Hill","Church Lane","Church Path","Church Road","Church Street","Church View","Church Walk","Claremont Road","Clarence Road","Clarence Street","Clarendon Road","Clark Street","Clay Lane","Cleveland Street","Cliff Road","Clifton Road","Clinton Street","College Avenue","College Street","Columbia Avenue","Commerce Street","Commercial Road","Commercial Street","Common Lane","Coronation Avenue","Coronation Road","County Line Road","County Road","Court Street","Cow Lane","Crescent Road","Cromwell Road","Cross Lane","Cross Street","Crown Street","Cumberland Street","Dale Street","Dark Lane","Davis Street","Depot Street","Derby Road","Derwent Close","Devonshire Road","Division Street","Douglas Road","Duke Street","E 10th Street","E 11th Street","E 12th Street","E 14th Street","E 1st Street","E 2nd Street","E 3rd Street","E 4th Avenue","E 4th Street","E 5th Street","E 6th Avenue","E 6th Street","E 7th Street","E 8th Street","E 9th Street","E Bridge Street","E Broad Street","E Broadway","E Broadway Street","E Cedar Street","E Center Street","E Central Avenue","E Church Street","E Elm Street","E Franklin Street","E Front Street","E Grand Avenue","E High Street","E Jackson Street","E Jefferson Street","E Main","E Main Street","E Maple Street","E Market Street","E North Street","E Oak Street","E Park Avenue","E Pine Street","E River Road","E South Street","E State Street","E Union Street","E Walnut Street","E Washington Avenue","E Washington Street","E Water Street","East Avenue","East Road","East Street","Edward Street","Elm Close","Elm Grove","Elm Road","Elm Street","Euclid Avenue","Fairfield Road","Farm Close","Ferry Road","Field Close","Field Lane","First Avenue","First Street","Fore Street","Forest Avenue","Forest Road","Fourth Avenue","Franklin Avenue","Franklin Road","Franklin Street","Front Street","Frontage Road","Garden Close","Garden Street","George Street","Gladstone Road","Glebe Close","Gloucester Road","Gordon Road","Gordon Street","Grand Avenue","Grange Avenue","Grange Close","Grange Road","Grant Street","Green Close","Green Lane","Green Street","Greenville Road","Greenway","Greenwood Road","Grove Lane","Grove Road","Grove Street","Hall Lane","Hall Street","Harrison Avenue","Harrison Street","Hawthorn Avenue","Hawthorn Close","Hazel Close","Hazel Grove","Heath Road","Heather Close","Henry Street","Heron Close","Hickory Street","High Road","High Street","Highfield Avenue","Highfield Close","Highfield Road","Highland Avenue","Hill Road","Hill Street","Hillside","Hillside Avenue","Hillside Close","Hillside Road","Holly Close","Honeysuckle Close","Howard Road","Howard Street","Jackson Avenue","Jackson Street","James Street","Jefferson Avenue","Jefferson Street","Johnson Street","Jubilee Close","Juniper Close","Kent Road","Kestrel Close","King Street","King's Road","Kingfisher Close","Kings Highway","Kingsway","Laburnum Grove","Lafayette Street","Lake Avenue","Lake Drive","Lake Road","Lake Street","Lancaster Road","Lansdowne Road","Larch Close","Laurel Close","Lawrence Street","Lee Street","Liberty Street","Lime Grove","Lincoln Avenue","Lincoln Highway","Lincoln Road","Lincoln Street","Locust Street","Lodge Close","Lodge Lane","London Road","Long Lane","Low Road","Madison Avenue","Madison Street","Main","Main Avenue","Main Road","Main Street","Main Street E","Main Street N","Main Street S","Main Street W","Manchester Road","Manor Close","Manor Drive","Manor Gardens","Manor Road","Manor Way","Maple Avenue","Maple Close","Maple Drive","Maple Road","Maple Street","Market Place","Market Square","Market Street","Marlborough Road","Marsh Lane","Martin Luther King Boulevard","Martin Luther King Drive","Martin Luther King Jr Boulevard","Mary Street","Mayfield Road","Meadow Close","Meadow Drive","Meadow Lane","Meadow View","Meadow Way","Memorial Drive","Middle Street","Mill Close","Mill Lane","Mill Road","Mill Street","Milton Road","Milton Street","Monroe Street","Moor Lane","Moss Lane","Mount Pleasant","Mount Street","Mulberry Street","N 1st Street","N 2nd Street","N 3rd Street","N 4th Street","N 5th Street","N 6th Street","N 7th Street","N 8th Street","N 9th Street","N Bridge Street","N Broad Street","N Broadway","N Broadway Street","N Cedar Street","N Center Street","N Central Avenue","N Chestnut Street","N Church Street","N College Street","N Court Street","N Division Street","N East Street","N Elm Street","N Franklin Street","N Front Street","N Harrison Street","N High Street","N Jackson Street","N Jefferson Street","N Lincoln Street","N Locust Street","N Main","N Main Avenue","N Main Street","N Maple Street","N Market Street","N Monroe Street","N Oak Street","N Park Street","N Pearl Street","N Pine Street","N Poplar Street","N Railroad Street","N State Street","N Union Street","N Walnut Street","N Washington Avenue","N Washington Street","N Water Street","Nelson Road","Nelson Street","New Lane","New Road","New Street","Newton Road","Nightingale Close","Norfolk Road","North Avenue","North Lane","North Road","North Street","Northfield Road","Oak Avenue","Oak Drive","Oak Lane","Oak Road","Oak Street","Oakfield Road","Oaklands","Old Lane","Old Military Road","Old Road","Old State Road","Orchard Drive","Orchard Lane","Orchard Road","Orchard Street","Oxford Road","Oxford Street","Park Avenue","Park Crescent","Park Drive","Park Lane","Park Place","Park Road","Park Street","Park View","Parkside","Pearl Street","Pennsylvania Avenue","Pine Close","Pine Grove","Pine Street","Pinfold Lane","Pleasant Street","Poplar Avenue","Poplar Close","Poplar Road","Poplar Street","Post Road","Pound Lane","Princes Street","Princess Street","Priory Close","Priory Road","Prospect Avenue","Prospect Place","Prospect Road","Prospect Street","Quarry Lane","Quarry Road","Queen's Road","Railroad Avenue","Railroad Street","Railway Street","Rectory Close","Rectory Lane","Richmond Close","Richmond Road","Ridge Road","River Road","River Street","Riverside","Riverside Avenue","Riverside Drive","Roman Road","Roman Way","Rowan Close","Russell Street","S 10th Street","S 14th Street","S 1st Avenue","S 1st Street","S 2nd Street","S 3rd Street","S 4th Street","S 5th Street","S 6th Street","S 7th Street","S 8th Street","S 9th Street","S Bridge Street","S Broad Street","S Broadway","S Broadway Street","S Center Street","S Central Avenue","S Chestnut Street","S Church Street","S College Street","S Division Street","S East Street","S Elm Street","S Franklin Street","S Front Street","S Grand Avenue","S High Street","S Jackson Street","S Jefferson Street","S Lincoln Street","S Main","S Main Avenue","S Main Street","S Maple Street","S Market Street","S Mill Street","S Monroe Street","S Oak Street","S Park Street","S Pine Street","S Railroad Street","S State Street","S Union Street","S Walnut Street","S Washington Avenue","S Washington Street","S Water Street","S West Street","Salisbury Road","Sandringham Road","Sandy Lane","School Close","School Lane","School Road","School Street","Second Avenue","Silver Street","Skyline Drive","Smith Street","Somerset Road","South Avenue","South Drive","South Road","South Street","South View","Spring Gardens","Spring Street","Springfield Close","Springfield Road","Spruce Street","St Andrew's Road","St Andrews Close","St George's Road","St John's Road","St Mary's Close","St Mary's Road","Stanley Road","Stanley Street","State Avenue","State Line Road","State Road","State Street","Station Road","Station Street","Stoney Lane","Sycamore Avenue","Sycamore Close","Sycamore Drive","Sycamore Street","Talbot Road","Tennyson Road","The Avenue","The Beeches","The Causeway","The Chase","The Coppice","The Copse","The Crescent","The Croft","The Dell","The Drive","The Fairway","The Glebe","The Grange","The Green","The Grove","The Hawthorns","The Lane","The Laurels","The Limes","The Maltings","The Meadows","The Mews","The Mount","The Oaks","The Orchard","The Oval","The Paddock","The Paddocks","The Poplars","The Ridgeway","The Ridings","The Rise","The Sidings","The Spinney","The Square","The Willows","The Woodlands","Third Avenue","Third Street","Tower Road","Trinity Road","Tudor Close","Union Avenue","Union Street","University Avenue","University Drive","Valley Road","Veterans Memorial Drive","Veterans Memorial Highway","Vicarage Close","Vicarage Lane","Vicarage Road","Victoria Place","Victoria Road","Victoria Street","Vine Street","W 10th Street","W 11th Street","W 12th Street","W 14th Street","W 1st Street","W 2nd Street","W 3rd Street","W 4th Avenue","W 4th Street","W 5th Street","W 6th Avenue","W 6th Street","W 7th Street","W 8th Street","W 9th Street","W Bridge Street","W Broad Street","W Broadway","W Broadway Avenue","W Broadway Street","W Center Street","W Central Avenue","W Chestnut Street","W Church Street","W Division Street","W Elm Street","W Franklin Street","W Front Street","W Grand Avenue","W High Street","W Jackson Street","W Jefferson Street","W Lake Street","W Main","W Main Street","W Maple Street","W Market Street","W Monroe Street","W North Street","W Oak Street","W Park Street","W Pine Street","W River Road","W South Street","W State Street","W Union Street","W Walnut Street","W Washington Avenue","W Washington Street","Walnut Close","Walnut Street","Warren Close","Warren Road","Washington Avenue","Washington Boulevard","Washington Road","Washington Street","Water Lane","Water Street","Waterloo Road","Waterside","Watery Lane","Waverley Road","Well Lane","Wellington Road","Wellington Street","West Avenue","West End","West Lane","West Road","West Street","West View","Western Avenue","Western Road","Westfield Road","Westgate","William Street","Willow Close","Willow Drive","Willow Grove","Willow Road","Willow Street","Windermere Road","Windmill Close","Windmill Lane","Windsor Avenue","Windsor Close","Windsor Drive","Wood Lane","Wood Street","Woodland Close","Woodland Road","Woodlands","Woodlands Avenue","Woodlands Close","Woodlands Road","Woodside","Woodside Road","Wren Close","Yew Tree Close","York Road","York Street"],AVu=["{{person.first_name}} {{location.street_suffix}}","{{person.last_name}} {{location.street_suffix}}","{{location.street_name}}"],_Vu=["Alley","Avenue","Branch","Bridge","Brook","Brooks","Burg","Burgs","Bypass","Camp","Canyon","Cape","Causeway","Center","Centers","Circle","Circles","Cliff","Cliffs","Club","Common","Corner","Corners","Course","Court","Courts","Cove","Coves","Creek","Crescent","Crest","Crossing","Crossroad","Curve","Dale","Dam","Divide","Drive","Drives","Estate","Estates","Expressway","Extension","Extensions","Fall","Falls","Ferry","Field","Fields","Flat","Flats","Ford","Fords","Forest","Forge","Forges","Fork","Forks","Fort","Freeway","Garden","Gardens","Gateway","Glen","Glens","Green","Greens","Grove","Groves","Harbor","Harbors","Haven","Heights","Highway","Hill","Hills","Hollow","Inlet","Island","Islands","Isle","Junction","Junctions","Key","Keys","Knoll","Knolls","Lake","Lakes","Land","Landing","Lane","Light","Lights","Loaf","Lock","Locks","Lodge","Loop","Mall","Manor","Manors","Meadow","Meadows","Mews","Mill","Mills","Mission","Motorway","Mount","Mountain","Mountains","Neck","Orchard","Oval","Overpass","Park","Parks","Parkway","Parkways","Pass","Passage","Path","Pike","Pine","Pines","Place","Plain","Plains","Plaza","Point","Points","Port","Ports","Prairie","Radial","Ramp","Ranch","Rapid","Rapids","Rest","Ridge","Ridges","River","Road","Roads","Route","Row","Rue","Run","Shoal","Shoals","Shore","Shores","Skyway","Spring","Springs","Spur","Spurs","Square","Squares","Station","Stravenue","Stream","Street","Streets","Summit","Terrace","Throughway","Trace","Track","Trafficway","Trail","Tunnel","Turnpike","Underpass","Union","Unions","Valley","Valleys","Via","Viaduct","View","Views","Village","Villages","Ville","Vista","Walk","Walks","Wall","Way","Ways","Well","Wells"],SVu={building_number:cVu,city_name:dVu,city_pattern:hVu,city_prefix:EVu,city_suffix:mVu,country:gVu,county:fVu,default_country:pVu,direction:DVu,direction_abbr:xVu,postcode:vVu,secondary_address:CVu,state:bVu,state_abbr:kVu,street_address:FVu,street_name:yVu,street_pattern:AVu,street_suffix:_Vu},BVu=SVu,wVu=["a","ab","abbas","abduco","abeo","abscido","absconditus","absens","absorbeo","absque","abstergo","absum","abundans","abutor","accedo","accendo","acceptus","accommodo","accusamus","accusantium","accusator","acer","acerbitas","acervus","acidus","acies","acquiro","acsi","ad","adamo","adaugeo","addo","adduco","ademptio","adeo","adeptio","adfectus","adfero","adficio","adflicto","adhaero","adhuc","adicio","adimpleo","adinventitias","adipisci","adipiscor","adiuvo","administratio","admiratio","admitto","admoneo","admoveo","adnuo","adopto","adsidue","adstringo","adsuesco","adsum","adulatio","adulescens","aduro","advenio","adversus","advoco","aedificium","aeger","aegre","aegrotatio","aegrus","aeneus","aequitas","aequus","aer","aestas","aestivus","aestus","aetas","aeternus","ager","aggero","aggredior","agnitio","agnosco","ago","ait","aiunt","alias","alienus","alii","alioqui","aliqua","aliquam","aliquid","alius","allatus","alo","alter","altus","alveus","amaritudo","ambitus","ambulo","amet","amicitia","amiculum","amissio","amita","amitto","amo","amor","amoveo","amplexus","amplitudo","amplus","ancilla","angelus","angulus","angustus","animadverto","animi","animus","annus","anser","ante","antea","antepono","antiquus","aperiam","aperio","aperte","apostolus","apparatus","appello","appono","appositus","approbo","apto","aptus","apud","aqua","ara","aranea","arbitro","arbor","arbustum","arca","arceo","arcesso","architecto","arcus","argentum","argumentum","arguo","arma","armarium","aro","ars","articulus","artificiose","arto","arx","ascisco","ascit","asper","asperiores","aspernatur","aspicio","asporto","assentator","assumenda","astrum","at","atavus","ater","atque","atqui","atrocitas","atrox","attero","attollo","attonbitus","auctor","auctus","audacia","audax","audentia","audeo","audio","auditor","aufero","aureus","aurum","aut","autem","autus","auxilium","avaritia","avarus","aveho","averto","baiulus","balbus","barba","bardus","basium","beatae","beatus","bellicus","bellum","bene","beneficium","benevolentia","benigne","bestia","bibo","bis","blandior","blanditiis","bonus","bos","brevis","cado","caecus","caelestis","caelum","calamitas","calcar","calco","calculus","callide","campana","candidus","canis","canonicus","canto","capillus","capio","capitulus","capto","caput","carbo","carcer","careo","caries","cariosus","caritas","carmen","carpo","carus","casso","caste","casus","catena","caterva","cattus","cauda","causa","caute","caveo","cavus","cedo","celebrer","celer","celo","cena","cenaculum","ceno","censura","centum","cerno","cernuus","certe","certus","cervus","cetera","charisma","chirographum","cibo","cibus","cicuta","cilicium","cimentarius","ciminatio","cinis","circumvenio","cito","civis","civitas","clam","clamo","claro","clarus","claudeo","claustrum","clementia","clibanus","coadunatio","coaegresco","coepi","coerceo","cogito","cognatus","cognomen","cogo","cohaero","cohibeo","cohors","colligo","collum","colo","color","coma","combibo","comburo","comedo","comes","cometes","comis","comitatus","commemoro","comminor","commodi","commodo","communis","comparo","compello","complectus","compono","comprehendo","comptus","conatus","concedo","concido","conculco","condico","conduco","confero","confido","conforto","confugo","congregatio","conicio","coniecto","conitor","coniuratio","conor","conqueror","conscendo","consectetur","consequatur","consequuntur","conservo","considero","conspergo","constans","consuasor","contabesco","contego","contigo","contra","conturbo","conventus","convoco","copia","copiose","cornu","corona","corporis","corpus","correptius","corrigo","corroboro","corrumpo","corrupti","coruscus","cotidie","crapula","cras","crastinus","creator","creber","crebro","credo","creo","creptio","crepusculum","cresco","creta","cribro","crinis","cruciamentum","crudelis","cruentus","crur","crustulum","crux","cubicularis","cubitum","cubo","cui","cuius","culpa","culpo","cultellus","cultura","cum","cumque","cunabula","cunae","cunctatio","cupiditas","cupiditate","cupio","cuppedia","cupressus","cur","cura","curatio","curia","curiositas","curis","curo","curriculum","currus","cursim","curso","cursus","curto","curtus","curvo","custodia","damnatio","damno","dapifer","debeo","debilito","debitis","decens","decerno","decet","decimus","decipio","decor","decretum","decumbo","dedecor","dedico","deduco","defaeco","defendo","defero","defessus","defetiscor","deficio","defleo","defluo","defungo","degenero","degero","degusto","deinde","delectatio","delectus","delego","deleniti","deleo","delibero","delicate","delinquo","deludo","demens","demergo","demitto","demo","demonstro","demoror","demulceo","demum","denego","denique","dens","denuncio","denuo","deorsum","depereo","depono","depopulo","deporto","depraedor","deprecator","deprimo","depromo","depulso","deputo","derelinquo","derideo","deripio","deserunt","desidero","desino","desipio","desolo","desparatus","despecto","dicta","dignissimos","distinctio","dolor","dolore","dolorem","doloremque","dolores","doloribus","dolorum","ducimus","ea","eaque","earum","eius","eligendi","enim","eos","error","esse","est","et","eum","eveniet","ex","excepturi","exercitationem","expedita","explicabo","facere","facilis","fuga","fugiat","fugit","harum","hic","id","illo","illum","impedit","in","incidunt","infit","inflammatio","inventore","ipsa","ipsam","ipsum","iste","itaque","iure","iusto","labore","laboriosam","laborum","laudantium","libero","magnam","magni","maiores","maxime","minima","minus","modi","molestiae","molestias","mollitia","nam","natus","necessitatibus","nemo","neque","nesciunt","nihil","nisi","nobis","non","nostrum","nulla","numquam","occaecati","ocer","odio","odit","officia","officiis","omnis","optio","paens","pariatur","patior","patria","patrocinor","patruus","pauci","paulatim","pauper","pax","peccatus","pecco","pecto","pectus","pecus","peior","pel","perferendis","perspiciatis","placeat","porro","possimus","praesentium","provident","quae","quaerat","quam","quas","quasi","qui","quia","quibusdam","quidem","quis","quisquam","quo","quod","quos","ratione","recusandae","reiciendis","rem","repellat","repellendus","reprehenderit","repudiandae","rerum","saepe","sapiente","sed","sequi","similique","sint","sit","socius","sodalitas","sol","soleo","solio","solitudo","solium","sollers","sollicito","solum","solus","soluta","solutio","solvo","somniculosus","somnus","sonitus","sono","sophismata","sopor","sordeo","sortitus","spargo","speciosus","spectaculum","speculum","sperno","spero","spes","spiculum","spiritus","spoliatio","sponte","stabilis","statim","statua","stella","stillicidium","stipes","stips","sto","strenuus","strues","studio","stultus","suadeo","suasoria","sub","subito","subiungo","sublime","subnecto","subseco","substantia","subvenio","succedo","succurro","sufficio","suffoco","suffragium","suggero","sui","sulum","sum","summa","summisse","summopere","sumo","sumptus","sunt","supellex","super","suppellex","supplanto","suppono","supra","surculus","surgo","sursum","suscipio","suscipit","suspendo","sustineo","suus","synagoga","tabella","tabernus","tabesco","tabgo","tabula","taceo","tactus","taedium","talio","talis","talus","tam","tamdiu","tamen","tametsi","tamisium","tamquam","tandem","tantillus","tantum","tardus","tego","temeritas","temperantia","templum","tempora","tempore","temporibus","temptatio","tempus","tenax","tendo","teneo","tener","tenetur","tenuis","tenus","tepesco","tepidus","ter","terebro","teres","terga","tergeo","tergiversatio","tergo","tergum","termes","terminatio","tero","terra","terreo","territo","terror","tersus","tertius","testimonium","texo","textilis","textor","textus","thalassinus","theatrum","theca","thema","theologus","thermae","thesaurus","thesis","thorax","thymbra","thymum","tibi","timidus","timor","titulus","tolero","tollo","tondeo","tonsor","torqueo","torrens","tot","totam","totidem","toties","totus","tracto","trado","traho","trans","tredecim","tremo","trepide","tres","tribuo","tricesimus","triduana","tripudio","tristis","triumphus","trucido","truculenter","tubineus","tui","tum","tumultus","tunc","turba","turbo","turpis","tutamen","tutis","tyrannus","uberrime","ubi","ulciscor","ullam","ullus","ulterius","ultio","ultra","umbra","umerus","umquam","una","unde","undique","universe","unus","urbanus","urbs","uredo","usitas","usque","ustilo","ustulo","usus","ut","uter","uterque","utilis","utique","utor","utpote","utrimque","utroque","utrum","uxor","vaco","vacuus","vado","vae","valde","valens","valeo","valetudo","validus","vallum","vapulus","varietas","varius","vehemens","vel","velit","velociter","velum","velut","venia","veniam","venio","ventito","ventosus","ventus","venustas","ver","verbera","verbum","vere","verecundia","vereor","vergo","veritas","veritatis","vero","versus","verto","verumtamen","verus","vesco","vesica","vesper","vespillo","vester","vestigium","vestrum","vetus","via","vicinus","vicissitudo","victoria","victus","videlicet","video","viduo","vigilo","vigor","vilicus","vilis","vilitas","villa","vinco","vinculum","vindico","vinitor","vinum","vir","virga","virgo","viridis","viriliter","virtus","vis","viscus","vita","vitae","vitiosus","vitium","vito","vivo","vix","vobis","vociferor","voco","volaticus","volo","volubilis","voluntarius","volup","voluptas","voluptate","voluptatem","voluptates","voluptatibus","voluptatum","volutabrum","volva","vomer","vomica","vomito","vorago","vorax","voro","vos","votum","voveo","vox","vulariter","vulgaris","vulgivagus","vulgo","vulgus","vulnero","vulnus","vulpes","vulticulus","xiphias"],LVu={words:wVu},zVu=LVu,MVu={title:"English",code:"en",language:"en",endonym:"English",dir:"ltr",script:"Latn"},TVu=MVu,NVu=["Rock","Metal","Pop","Electronic","Folk","World","Country","Jazz","Funk","Soul","Hip Hop","Classical","Latin","Reggae","Stage And Screen","Blues","Non Music","Rap"],PVu=["White Christmas","Hey Jude","Every Breath You Take","Mack the Knife","Rock Around the Clock","I Want to Hold Your Hand","(I Can't Get No) Satisfaction","The Twist","(Everything I Do) I Do it For You","Bridge Over Troubled Water","When Doves Cry","Call Me","Bette Davis Eyes","I Will Always Love You","Over the Rainbow","American Pie","Flashdance. What a Feeling","The Way We Were","I Heard it Through the Grapevine","You've Lost That Lovin' Feelin'","Nothing Compares 2 U","Endless Love","Yeah!","Let's Get it On","That's What Friends Are For","You Light Up My Life","(Sittin' On) the Dock of the Bay","Joy to the World","Heartbreak Hotel","Theme From 'A Summer Place'","Aquarius/Let The Sunshine In","I Will Survive","It's Too Late","Respect","Sugar Sugar","Stayin' Alive","Maggie May","My Heart Will Go On","Eye of the Tiger","End of the Road","Another One Bites the Dust","Billie Jean","Let's Stay Together","Battle of New Orleans","Oh","Hound Dog","I Love Rock 'n' Roll","Smooth","Good Vibrations","Physical","Light My Fire","Low","Hey Ya!","Let it Be","Don't Be Cruel","Hotel California","We Belong Together","Le Freak","Raindrops Keep Falling On My Head","How High the Moon","My Girl","I Can't Stop Loving You","Killing Me Softly With His Song","Mona Lisa","In the Mood","She Loves You","The Letter","Mister Sandman","Careless Whisper","What's Love Got to Do With It?","I'm a Believer","Wooly Bully","Theme From 'Shaft'","Hot Stuff","Centerfold","Honky Tonk Woman","I'll Be There","Gangsta's Paradise","Yesterday","My Sharona","Tennessee Waltz","Reach Out (I'll Be There)","California Dreamin'","Jailhouse Rock","Irreplaceable","Dancing in the Street","Rolling In The Deep","Tie a Yellow Ribbon 'round the Old Oak Tree","Stand By Me","Sentimental Journey","The First Time Ever I Saw Your Face","Louie Louie","Another Brick in the Wall (part 2)","(Just Like) Starting Over","Night Fever","To Sir","You're So Vain","Be My Baby","Celebration","(They Long to Be) Close to You","Begin the Beguine","I Still Haven't Found What I'm Looking For","I Want You Back","Arthur's Theme (Best That You Can Do)","Boulevard of Broken Dreams","With Or Without You","Tonight's the Night (Gonna Be Alright)","Are You Lonesome Tonight?","Upside Down","Dancing Queen","Sweet Child O' Mine","Where Did Our Love Go","Unchained Melody","Rudolph","Take My Breath Away","I'll Make Love to You","Love Will Keep Us Together","When a Man Loves a Woman","Walk Like an Egyptian","Crazy in Love","Strangers in the Night","You Belong to Me","In Da Club","Say You","We Are the World","Johnny B Goode","Love Theme From 'A Star is Born' (Evergreen)","Shadow Dancing","Superstition","Beat It","Night & Day","Waterfalls","House of the Rising Sun","Paper Doll","Downtown","I Can't Help Myself (Sugar Pie","Kiss From a Rose","Believe","Ballad of the Green Berets","Proud Mary","Too Young","Umbrella","Swanee","Need You Tonight","Like a Rolling Stone","Lady","One Sweet Day","Lean On Me","Tik-Toc","Monday Monday","What'd I Say","How You Remind Me","Silly Love Songs","My Guy","Macarena","Goodnight","Just My Imagination (Running Away With Me)","The Sounds of Silence","Imagine","Me & Bobby McGee","Near You","What's Going On?","Suspicious Minds","Ode To Billie Joe","Wind Beneath My Wings","The Boy is Mine","Mr Tambourine Man","Faith","Green Onions","Mrs Robinson","How Deep is Your Love?","Hey There","Heart of Glass","Pennies From Heaven","Like a Virgin","Midnight Train to Georgia","Help!","Tossing & Turning","The Sign","Born to Be Wild","Layla","I Just Wanna Be Your Everything","War","96 Tears","I Get Around","Because You Loved Me","Summer in the City","Get Back","Secret Love","9 to 5","(Ghost) Riders in the Sky","The Loco-Motion","Play That Funky Music","Bohemian Rhapsody","Little Things Mean a Lot","Cry","All Shook Up","Up Where We Belong","Sledgehammer","Fire & Rain","Stop! in the Name of Love","Sweet Home Alabama","Another Day in Paradise","Bleeding Love","Lady Marmalade (Voulez-Vous Coucher Aver Moi Ce Soir?)","Whispering","Vogue","Under the Bridge","Sixteen Tons","Sugar Shack","Baby Love","What a Fool Believes","Lose Yourself","Hello Dolly","Brown Eyed Girl","Without You","Build Me Up Buttercup","We Found Love","Tears in Heaven","Family Affair","All I Wanna Do","Soul Man","Tequila","Rock With You","Livin' La Vida Loca","Best of My Love","Runaway","Alone Again (Naturally)","Can't Help Falling in Love","My Sweet Lord","Runaround Sue","Swinging On a Star","Gold Digger","Happy Together","Losing My Religion","Heart of Gold","Stardust","Will You Love Me Tomorrow","You Are the Sunshine of My Life","You Were Meant for Me","Take On Me","Hollaback Girl","God Bless America","I Swear","Sunshine of Your Love","Firework","Groovin'","Smells Like Teen Spirit","Big Girls Don't Cry","Jack & Diane","Addicted to Love","The Last Dance","Georgia On My Mind","Money For Nothing","Jump","Vaya Con Dios (may God Be With You)","You'll Never Know","That'll Be the Day","Girls Just Wanna Have Fun","Wheel of Fortune","When You Wish Upon a Star","Don't Fence Me In","Turn! Turn! Turn! (To Everything There is a Season)","Volare","Sweet Dreams (Are Made of This)","Whole Lotta Love","You've Got a Friend","Penny Lane","People Got to Be Free","Nature Boy","Sexyback","Crying","Single Ladies (Put A Ring On It)","Bad Girls","Too Close","I Got You Babe","We've Only Just Begun","Sh-Boom (Life Could Be a Dream)","Shining Star","Kansas City","Like a Prayer","Cheek to Cheek","Papa Was a Rolling Stone","Promiscuous","Love Shack","Funkytown","Crazy","Philadelphia Freedom","Temperature","Somebody That I Used to Know","All I Have to Do is Dream","Jessie's Girl","Rhinestone Cowboy","Blue Suede Shoes","Ebony & Ivory","I'll Never Smile Again","Keep On Loving You","Since U Been Gone","The Way You Look Tonight","Crazy Little Thing Called Love","The Great Pretender","Brown Sugar","Que sera sera (Whatever will be will be)","No One","Bad Day","Boom Boom Pow","Party Rock Anthem","Because of You","Chattanooga Choo Choo","A Whiter Shade of Pale","Love Me Tender","Higher Love","Footloose","Blurred Lines","I Just Called to Say I Love You","Come Together","It's Now Or Never","Under the Boardwalk","Don't You Want Me","You Can't Hurry Love","Fame","Fallin'","Poker Face","Bad Romance","Ruby Tuesday","All Night Long (All Night)","Baby Got Back","Whole Lotta Shakin' Goin' On","Frenesi","December 1963 (Oh What a Night)","Bad Moon Rising","Abracadabra","I Gotta Feeling","The Song From Moulin Rouge (Where Is Your Heart)","Waiting For a Girl Like You","Everybody Loves Somebody","I Can't Go For That (No Can Do)","Buttons & Bows","It's All in the Game","Love Train","Dance to the Music","Candle in the Wind '97","Honey","Kiss","I'll Take You There","Paint it Black","Band of Gold","Just the Way You Are","Spirit in the Sky","Vision of Love","Hips don't lie","Till The End of Time","Duke of Earl","YMCA","Oh My Papa (O Mein Papa)","Pistol Packin' Mama","Gonna Make You Sweat (Everybody Dance Now)","Dilemma","I Need You Now","Wanted","Jumpin' Jack Flash","Against All Odds (Take a Look At Me Now)","Tom Dooley","Goodbye Yellow Brick Road","Rhapsody in Blue","Bennie & the Jets","Call Me Maybe","You Really Got Me","God Bless the Child","I'm Sorry","Bad","I Can't Get Next to You","The Power of Love","Dreamlover","Only The Lonely (Know The Way I Feel)","We Are Family","At Last","Brand New Key","I've Heard That Song Before","Stay (I Missed You)","Do Ya Think I'm Sexy?","Tutti Frutti","This Ole House","Please Mr Postman","Good Times","Something","(I've Had) the Time of My Life","I Don't Want to Miss a Thing","Down Hearted Blues","Rag Doll","Blueberry Hill","Ain't No Sunshine","Wild Thing","Blaze of Glory","Ray of Light","The Hustle","Grenade","Cathy's Clown","Minnie the Moocher","Love Is Blue (L'Amour Est Bleu)","Iris","The Boys of Summer","The Tide is High","She Drives Me Crazy","Save the Best For Last","These Boots Are Made For Walking","I Feel Love","A Woman in Love","We Can Work it Out","The Reason","Locked Out Of Heaven","Do That to Me One More Time","That's the Way Love Goes","A Hard Day's Night","I Believe I Can Fly","Karma Chameleon","One O'Clock Jump","Mule Train","Car Wash","Rapture","Creep","Streets of Philadelphia","West End Girls","Leader of the Pack","T For Texas (Blue Yodel No 1)","Mama Told Me Not to Come","Just Dance","Mercy Mercy Me (The Ecology)","Livin' On a Prayer","Good Lovin'","50 Ways to Leave Your Lover","Stronger","I Can See Clearly Now","We Are the Champions","(I've Got a Gal In) Kalamazoo","No Scrubs","How Do You Mend a Broken Heart","I Got You (I Feel Good)","Don't Let the Stars Get in Your Eyes","The Girl From Ipanema","(Sexual) Healing","Tears of a Clown","We Will Rock You","Hold On","Bye Bye Love","Chapel of Love","White Rabbit","Rock the Boat","The Gypsy","Take The 'A' Train","Crimson & Clover","Crocodile Rock","Make Love to Me","Nothing's Gonna Stop Us Now","Say Say Say","The Christmas Song (Chestnuts Roasting On An Open Fire)","Un-Break My Heart","Cherish","I'll Be Missing You","Drops of Jupiter (Tell Me)","There goes my baby","You Send Me","If (They Made Me a King)","The Prisoner's Song","ABC","Do Wah Diddy Diddy","He's So Fine","A Boy Named Sue","Roll Over Beethoven","Sweet Georgia Brown","Earth Angel","Rehab","(You Keep Me) Hangin' On","This Diamond Ring","Be My Love","Rush Rush","You're Beautiful","Roll With It","Moonlight Serenade","Unbelievable","Peg o' My Heart","This Land is Your Land","Stranger On the Shore","Rum & Coca-Cola","Hit the Road","Without Me","Crazy For You","I Want to Know What Love Is","Bye Bye","Down Under","At the Hop","One Bad Apple","Kiss & Say Goodbye","For What It's Worth (Stop","The Long & Winding Road","Baby One More Time","Stairway to Heaven","How Do I Live?","Hello","Truly Madly Deeply","Great Balls of Fire","King of the Road","I Wanna Dance With Somebody (Who Loves Me)","Reunited","Help Me","Rags to Riches","(It's No) Sin","Say My Name","Nobody Does it Better","Paperback Writer","Don't Worry Be Happy","I Fall to Pieces","Body & Soul","You're Still the One","Stormy Weather (Keeps Rainin' All the Time)","Horse With No Name","American Woman","Chattanoogie Shoe-Shine Boy","Pick Up the Pieces","Everybody Wants to Rule the World","Blue Tango","Hurt So Good","Apologize","Let's Dance","(You're My) Soul & Inspiration","I Only Have Eyes For You","Wichita Lineman","Hanging by a Moment","Spinning Wheel","Look Away","Ironic","Don't Stop 'Til You Get Enough","Empire State Of Mind","Do You Love Me?","Jive Talkin'","You're the One That I Want","Sweet Soul Music","Hey There Delilah","A Whole New World (Aladdin's Theme)","Somethin' Stupid","Knock Three Times","Mickey","The Wanderer","Dancing in the Dark","It's Still Rock 'n' Roll to Me","Boogie Oogie Oogie","Can You Feel the Love Tonight","Harper Valley PTA","Seasons in the Sun","Come On-a My House","Viva La Vida","Walk On By","Drop it Like It's Hot","Private Eyes","Maniac","All My Lovin' (You're Never Gonna Get It)","Take a Bow","Ring of Fire","Save the Last Dance For Me","Make it With You","Don't Speak","I Shot the Sheriff","Say It Right","Sing","Twist & Shout","Walk This Way","A-Tisket A-Tasket","Let Me Love You","I Can Dream","Toxic","The Joker","Hero","In the Year 2525 (Exordium & Terminus)","Your Song","Oh Happy Day","Grease","Love In This Club","Angie","How Much is That Doggy in the Window?","Daydream Believer","Whip It","Boogie Woogie Bugle Boy","Down","Hanky Panky","Total Eclipse of the Heart","Cat's in the Cradle","Strange Fruit","Breathe","On My Own","Dizzy","Ticket to Ride","We Got The Beat","On the Atchison","Always On My Mind","Unforgettable","In the End","Music","Can't Buy Me Love","Chain of Fools","Won't Get Fooled Again","Happy Days Are Here Again","Third Man Theme","Your Cheatin' Heart","Thriller","Venus","Time After Time","That Lucky Old Sun (Just Rolls Around Heaven All Day)","E.T.","Three Coins in the Fountain","Touch Me","You Ain't Seen Nothin' Yet","Gives You Hell","Knock On Wood","One of These Nights","Again","Doo Wop (That Thing)","Whoomp! (There it Is)","Magic","I'm Walking Behind You","We Didn't Start the Fire","Lola","Ghostbusters","Winchester Cathedral","Greatest Love of All","My Love","Wannabe","Miss You","I Feel Fine","Baby Baby","TSOP (The Sound of Philadelphia)","Loving You","This Guy's in Love With You","Till I Waltz Again With You","Why Do Fools Fall in Love?","Nights in White Satin","That's the Way (I Like It)","My Prayer","(Put Another Nickel In) Music! Music! Music!","Colors of the Wind","Morning Train (Nine to Five)","I Went to Your Wedding","Kiss Me","Gypsies","Cracklin' Rosie","Maybellene","Born in the USA","Here Without You","Mony Mony","Mmmbop","You Always Hurt the One You Love","Eight Days a Week","What Goes Around Comes Around","Kung Fu Fighting","Fantasy","Sir Duke","Ain't Misbehavin'","Need You Now","Last Train to Clarksville","Yakety Yak","I'll be seeing you","Hard to Say I'm Sorry","It's My Party","Love to Love You Baby","Miss You Much","Born to Run","Instant Karma","The Rose","Purple Rain","One","Groove is in the Heart","Gimme Some Lovin'","Beautiful Day","Escape (The Pina Colada Song)","Use Somebody","Fortunate Son","Afternoon Delight","Love's Theme","Sailing","Cherry Pink & Apple Blossom White","Georgy Girl","How to Save a Life","I Walk the Line","All You Need is Love","U Can't Touch This","All Out of Love","Where is the Love?","Revolution","The Love You Save","Black Or White","This Used to Be My Playground","Living For the City","School's Out","Disturbia","Riders On the Storm","Some Enchanted Evening","Weak","Maneater","More Than Words","Time of the Season","Mrs Brown You've Got a Lovely Daughter","If You Leave Me Now","Can't Get Enough of Your Love","Na Na Hey Hey (Kiss Him Goodbye)","Mr Brightside","Black Velvet","I'm Yours","My Blue Heaven","It Had to Be You","Tha Crossroads","Ac-cent-tchu-ate the Positive","Everyday People","We Are Young","Take Me Home","Smoke! Smoke! Smoke! (That Cigarette)","In the Summertime","The Tracks of My Tears","Fly Robin Fly","Love is a Many Splendoured Thing","Another Night","Long Tall Sally","You Sexy Thing","The Morning After","Get Off of My Cloud","Roses Are Red","Thank You (Falettinme be Mice Elf Again)","Slow Poke","You Belong With Me","Ain't No Mountain High Enough","Auf Wiederseh'n Sweetheart","Beauty & the Beast","St Louis Blues","Peggy Sue","U Got it Bad","Sweet Caroline (Good Times Never Seemed So Good)","Wedding Bell Blues","Freebird","Wipe Out","California Girls","Being With You","Makin' Whoopee","Shop Around","Smoke On the Water","Hungry Heart","That's Amore","My Life","Brandy (You're A Fine Girl)","Walk Don't Run","Surfin' USA","Ball of Confusion (That's What the World is Today)","Sunshine Superman","Frankenstein","Kiss You All Over","Wishing Well","Piano Man","Ben","In the Ghetto","Hang On Sloopy","Singing The Blues","Cry Like a Baby","I Honestly Love You","Brother","Lookin' Out My Back Door","Candy Man","Burn","Stagger Lee","Moonlight Cocktail","Coming Up","Pop Muzik","As Time Goes By","My Eyes Adored You","Strawberry Fields Forever","Some of These Days","I Think I Love You","Judy in Disguise (With Glasses)","All Along the Watchtower","A Thousand Miles","Fast Car","Red Red Wine","Live & Let Die","Come On Eileen","Right Back Where We Started From","Brother Louie","Ol' Man River","Band On the Run","Rich Girl","Green River","Got to Give it Up","Behind Closed Doors","Don't Go Breaking My Heart","I'm Looking Over a Four Leaf Clover","Mr Big Stuff","Tiger Rag","Kryptonite","Hey Paula","Go Your Own Way","Big Bad John","Wake Me Up Before You Go Go","Tangerine","Wayward Wind","Disco Lady","Spanish Harlem","Wicked Game","Rosanna","Papa Don't Preach","Somebody to Love","Kokomo","Manana (Is Soon Enough For Me)","Puttin' on the Ritz","One More Try","I'll Walk Alone","Shout","Woman","Ballerina","We Built This City","19th Nervous Breakdown","Working My Way Back to You","Superstar","Foolish Games","Get Down Tonight","On Bended Knee","Magic Carpet Ride","Only You (And You Alone)","A String of Pearls","A Tree in the Meadow","So Much in Love","Every Little Thing She Does is Magic","La Bamba","Tighten Up","Three Times a Lady","Airplanes","Don't Leave Me This Way","Rock the Casbah","Feel Good Inc","Love Me Do","Kiss On My List","Give Me Everything","Have You Ever Really Loved a Woman?","Love Letters in the Sand","Ring My Bell","Love Child","I Feel For You","Bye","(Let Me Be Your) Teddy Bear","Soldier Boy","Papa's Got a Brand New Bag","Love Hangover","Spill the Wine","Royals","April Showers","Don't You (Forget About Me)","Travellin' Man","The Thing","You Make Me Feel Brand New","The Glow-Worm","You Don't Bring Me Flowers","Summertime Blues","Straight Up","Sunday","Wake Up Little Susie","She's a Lady","Over There","Little Darlin'","Rag Mop","Shake Down","Up Around the Bend","Harbour Lights","Chances Are","Mood Indigo","Pony Time","After You've Gone","I Wanna Love You","Da Doo Ron Ron (When He Walked Me Home)","If You Don't Know Me By Now","Green Tambourine","My Man","If I Didn't Care","St George & the Dragonette","Why Don't You Believe Me?","How Will I Know","Disco Duck","Lonely Boy","Never Gonna Give You Up","Before The Next Teardrop Falls","Running Scared","Let's Hear it For the Boy","Sleep Walk","Walk On the Wild Side","Memories Are Made of This","Open Arms","Stuck On You","Personality","Feel Like Making Love","Stars & Stripes Forever","Besame Mucho","Let Me Call You Sweetheart","Indian Reservation (The Lament Of The Cherokee Reservation Indian)","Cars","You Make Me Feel Like Dancing","Whatcha Say","Me & Mrs Jones","Bitter Sweet Symphony","Uncle Albert (Admiral Halsey)","More Than a Feeling","My Boyfriend's Back","People","He'll Have to Go","I Can Help","The Streak","Dreams","Hair","Cold","Nothin' on You","The End of the World","Caldonia Boogie (What Makes Your Big Head So Hard)","I Kissed A Girl","Incense & Peppermints","12th Street Rag","West End Blues","The Way You Move","Smoke Gets in Your Eyes","Want Ads","Long Cool Woman in a Black Dress","Hey Baby","(Your Love Keeps Lifting Me) Higher & Higher","He's a Rebel","Alone","Thrift Shop","Don't Let the Sun Go Down On Me","The Sweet Escape","Return to Sender","Here in My Heart","Wabash Cannonball","Ain't That a Shame","Travellin' Band","I'm Your Boogie Man","I Write the Songs","This Love","Lights","Will It Go Round In Circles","Purple Haze","Rock Your Baby","Delicado","Tammy","Check On It","Breaking Up is Hard to Do","1999","Prisoner of Love","Wild Wild West","Walk Like a Man","I Will Follow Him","Glamorous","Yellow Rose of Texas","That Old Black Magic","I'm So Lonesome I Could Cry","Up Up & Away","Baby Come Back","Let it Snow! Let it Snow! Let it Snow!","Pon De Replay","Because I Love You (The Postman Song)","Sleepy Lagoon","Baker Street","Dardanella","You Don't Have to Be a Star (To Be in My Show)","Leaving","Glory of Love","Theme From 'Greatest American Hero' (Believe It Or Not)","Shake You Down","Ole Buttermilk Sky","I Can't Get Started","Freak Me","Hot Child In The City","Man in the Mirror","Queen of Hearts","Let's Groove","Change the World","You make Me Wanna","Someday","Eve of Destruction","One of Us","Honky Tonk","Be Bop a Lula","Two Hearts","Paper Planes"],RVu={genre:NVu,song_name:PVu},IVu=RVu,OVu=["activist","artist","author","blogger","business owner","coach","creator","designer","developer","dreamer","educator","engineer","entrepreneur","environmentalist","film lover","filmmaker","foodie","founder","friend","gamer","geek","grad","inventor","leader","model","musician","nerd","parent","patriot","person","philosopher","photographer","public speaker","scientist","singer","streamer","student","teacher","traveler","veteran","writer"],jVu=["{{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}, {{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}, {{person.bio_part}} {{internet.emoji}}","{{word.noun}} {{person.bio_supporter}}","{{word.noun}} {{person.bio_supporter}} {{internet.emoji}}","{{word.noun}} {{person.bio_supporter}}, {{person.bio_part}}","{{word.noun}} {{person.bio_supporter}}, {{person.bio_part}} {{internet.emoji}}"],HVu=["advocate","devotee","enthusiast","fan","junkie","lover","supporter"],VVu=["Mary","Patricia","Linda","Barbara","Elizabeth","Jennifer","Maria","Susan","Margaret","Dorothy","Lisa","Nancy","Karen","Betty","Helen","Sandra","Donna","Carol","Ruth","Sharon","Michelle","Laura","Sarah","Kimberly","Deborah","Jessica","Shirley","Cynthia","Angela","Melissa","Brenda","Amy","Anna","Rebecca","Virginia","Kathleen","Pamela","Martha","Debra","Amanda","Stephanie","Carolyn","Christine","Marie","Janet","Catherine","Frances","Ann","Joyce","Diane","Alice","Julie","Heather","Teresa","Doris","Gloria","Evelyn","Jean","Cheryl","Mildred","Katherine","Joan","Ashley","Judith","Rose","Janice","Kelly","Nicole","Judy","Christina","Kathy","Theresa","Beverly","Denise","Tammy","Irene","Jane","Lori","Rachel","Marilyn","Andrea","Kathryn","Louise","Sara","Anne","Jacqueline","Wanda","Bonnie","Julia","Ruby","Lois","Tina","Phyllis","Norma","Paula","Diana","Annie","Lillian","Emily","Robin","Peggy","Crystal","Gladys","Rita","Dawn","Connie","Florence","Tracy","Edna","Tiffany","Carmen","Rosa","Cindy","Grace","Wendy","Victoria","Edith","Kim","Sherry","Sylvia","Josephine","Thelma","Shannon","Sheila","Ethel","Ellen","Elaine","Marjorie","Carrie","Charlotte","Monica","Esther","Pauline","Emma","Juanita","Anita","Rhonda","Hazel","Amber","Eva","Debbie","April","Leslie","Clara","Lucille","Jamie","Joanne","Eleanor","Valerie","Danielle","Megan","Alicia","Suzanne","Michele","Gail","Bertha","Darlene","Veronica","Jill","Erin","Geraldine","Lauren","Cathy","Joann","Lorraine","Lynn","Sally","Regina","Erica","Beatrice","Dolores","Bernice","Audrey","Yvonne","Annette","June","Samantha","Marion","Dana","Stacy","Ana","Renee","Ida","Vivian","Roberta","Holly","Brittany","Melanie","Loretta","Yolanda","Jeanette","Laurie","Katie","Kristen","Vanessa","Alma","Sue","Elsie","Beth","Jeanne","Vicki","Carla","Tara","Rosemary","Eileen","Terri","Gertrude","Lucy","Tonya","Ella","Stacey","Wilma","Gina","Kristin","Jessie","Natalie","Agnes","Vera","Willie","Charlene","Bessie","Delores","Melinda","Pearl","Arlene","Maureen","Colleen","Allison","Tamara","Joy","Georgia","Constance","Lillie","Claudia","Jackie","Marcia","Tanya","Nellie","Minnie","Marlene","Heidi","Glenda","Lydia","Viola","Courtney","Marian","Stella","Caroline","Dora","Jo","Vickie","Mattie","Terry","Maxine","Irma","Mabel","Marsha","Myrtle","Lena","Christy","Deanna","Patsy","Hilda","Gwendolyn","Jennie","Nora","Margie","Nina","Cassandra","Leah","Penny","Kay","Priscilla","Naomi","Carole","Brandy","Olga","Billie","Dianne","Tracey","Leona","Jenny","Felicia","Sonia","Miriam","Velma","Becky","Bobbie","Violet","Kristina","Toni","Misty","Mae","Shelly","Daisy","Ramona","Sherri","Erika","Katrina","Claire","Lindsey","Lindsay","Geneva","Guadalupe","Belinda","Margarita","Sheryl","Cora","Faye","Ada","Natasha","Sabrina","Isabel","Marguerite","Hattie","Harriet","Molly","Cecilia","Kristi","Brandi","Blanche","Sandy","Rosie","Joanna","Iris","Eunice","Angie","Inez","Lynda","Madeline","Amelia","Alberta","Genevieve","Monique","Jodi","Janie","Maggie","Kayla","Sonya","Jan","Lee","Kristine","Candace","Fannie","Maryann","Opal","Alison","Yvette","Melody","Luz","Susie","Olivia","Flora","Shelley","Kristy","Mamie","Lula","Lola","Verna","Beulah","Antoinette","Candice","Juana","Jeannette","Pam","Kelli","Hannah","Whitney","Bridget","Karla","Celia","Latoya","Patty","Shelia","Gayle","Della","Vicky","Lynne","Sheri","Marianne","Kara","Jacquelyn","Erma","Blanca","Myra","Leticia","Pat","Krista","Roxanne","Angelica","Johnnie","Robyn","Francis","Adrienne","Rosalie","Alexandra","Brooke","Bethany","Sadie","Bernadette","Traci","Jody","Kendra","Jasmine","Nichole","Rachael","Chelsea","Mable","Ernestine","Muriel","Marcella","Elena","Krystal","Angelina","Nadine","Kari","Estelle","Dianna","Paulette","Lora","Mona","Doreen","Rosemarie","Angel","Desiree","Antonia","Hope","Ginger","Janis","Betsy","Christie","Freda","Mercedes","Meredith","Lynette","Teri","Cristina","Eula","Leigh","Meghan","Sophia","Eloise","Rochelle","Gretchen","Cecelia","Raquel","Henrietta","Alyssa","Jana","Kelley","Gwen","Kerry","Jenna","Tricia","Laverne","Olive","Alexis","Tasha","Silvia","Elvira","Casey","Delia","Sophie","Kate","Patti","Lorena","Kellie","Sonja","Lila","Lana","Darla","May","Mindy","Essie","Mandy","Lorene","Elsa","Josefina","Jeannie","Miranda","Dixie","Lucia","Marta","Faith","Lela","Johanna","Shari","Camille","Tami","Shawna","Elisa","Ebony","Melba","Ora","Nettie","Tabitha","Ollie","Jaime","Winifred","Kristie"],$Vu=["Abigail","Adele","Alex","Alice","Alisha","Amber","Amelia","Amora","Anaïs","Angelou","Anika","Anise","Annabel","Anne","Aphrodite","Aretha","Arya","Ashton","Aster","Audrey","Avery","Bailee","Bay","Belle","Beth","Billie","Blair","Blaise","Blake","Blanche","Blue","Bree","Brielle","Brienne","Brooke","Caleen","Candice","Caprice","Carelyn","Caylen","Celine","Cerise","Cia","Claire","Claudia","Clementine","Coral","Coraline","Dahlia","Dakota","Dawn","Della","Demi","Denise","Denver","Devine","Devon","Diana","Dylan","Ebony","Eden","Eleanor","Elein","Elizabeth","Ellen","Elodie","Eloise","Ember","Emma","Erin","Eyre","Faith","Farrah","Fawn","Fayre","Fern","France","Francis","Frida","Genisis","Georgia","Grace","Gwen","Harley","Harper","Hazel","Helen","Hippolyta","Holly","Hope","Imani","Iowa","Ireland","Irene","Iris","Isa","Isla","Ivy","Jade","Jane","Jazz","Jean","Jess","Jett","Jo","Joan","Jolie","Jordan","Josie","Journey","Joy","Jules","Julien","Juliet","Juniper","Justice","Kali","Karma","Kat","Kate","Kennedy","Keva","Kylie","Lake","Lane","Lark","Layla","Lee","Leigh","Leona","Lexi","London","Lou","Louise","Love","Luna","Lux","Lynn","Lyric","Maddie","Mae","Marie","Matilda","Maude","Maybel","Meadow","Medusa","Mercy","Michelle","Mirabel","Monroe","Morgan","Nalia","Naomi","Nova","Olive","Paige","Parker","Pax","Pearl","Penelope","Phoenix","Quinn","Rae","Rain","Raven","Ray","Raye","Rebel","Reese","Reeve","Regan","Riley","River","Robin","Rory","Rose","Royal","Ruth","Rylie","Sage","Sam","Saturn","Scout","Serena","Sky","Skylar","Sofia","Sophia","Storm","Sue","Suzanne","Sydney","Taylen","Taylor","Teagan","Tempest","Tenley","Thea","Trinity","Valerie","Venus","Vera","Violet","Willow","Winter","Xena","Zaylee","Zion","Zoe"],_Oe=["Mrs.","Ms.","Miss","Dr."],KVu=["Aaliyah","Aaron","Abagail","Abbey","Abbie","Abbigail","Abby","Abdiel","Abdul","Abdullah","Abe","Abel","Abelardo","Abigail","Abigale","Abigayle","Abner","Abraham","Ada","Adah","Adalberto","Adaline","Adam","Adan","Addie","Addison","Adela","Adelbert","Adele","Adelia","Adeline","Adell","Adella","Adelle","Aditya","Adolf","Adolfo","Adolph","Adolphus","Adonis","Adrain","Adrian","Adriana","Adrianna","Adriel","Adrien","Adrienne","Afton","Aglae","Agnes","Agustin","Agustina","Ahmad","Ahmed","Aida","Aidan","Aiden","Aileen","Aimee","Aisha","Aiyana","Akeem","Al","Alaina","Alan","Alana","Alanis","Alanna","Alayna","Alba","Albert","Alberta","Albertha","Alberto","Albin","Albina","Alda","Alden","Alec","Aleen","Alejandra","Alejandrin","Alek","Alena","Alene","Alessandra","Alessandro","Alessia","Aletha","Alex","Alexa","Alexander","Alexandra","Alexandre","Alexandrea","Alexandria","Alexandrine","Alexandro","Alexane","Alexanne","Alexie","Alexis","Alexys","Alexzander","Alf","Alfonso","Alfonzo","Alford","Alfred","Alfreda","Alfredo","Ali","Alia","Alice","Alicia","Alisa","Alisha","Alison","Alivia","Aliya","Aliyah","Aliza","Alize","Allan","Allen","Allene","Allie","Allison","Ally","Alphonso","Alta","Althea","Alva","Alvah","Alvena","Alvera","Alverta","Alvina","Alvis","Alyce","Alycia","Alysa","Alysha","Alyson","Alysson","Amalia","Amanda","Amani","Amara","Amari","Amaya","Amber","Ambrose","Amelia","Amelie","Amely","America","Americo","Amie","Amina","Amir","Amira","Amiya","Amos","Amparo","Amy","Amya","Ana","Anabel","Anabelle","Anahi","Anais","Anastacio","Anastasia","Anderson","Andre","Andreane","Andreanne","Andres","Andrew","Andy","Angel","Angela","Angelica","Angelina","Angeline","Angelita","Angelo","Angie","Angus","Anibal","Anika","Anissa","Anita","Aniya","Aniyah","Anjali","Anna","Annabel","Annabell","Annabelle","Annalise","Annamae","Annamarie","Anne","Annetta","Annette","Annie","Ansel","Ansley","Anthony","Antoinette","Antone","Antonetta","Antonette","Antonia","Antonietta","Antonina","Antonio","Antwan","Antwon","Anya","April","Ara","Araceli","Aracely","Arch","Archibald","Ardella","Arden","Ardith","Arely","Ari","Ariane","Arianna","Aric","Ariel","Arielle","Arjun","Arlene","Arlie","Arlo","Armand","Armando","Armani","Arnaldo","Arne","Arno","Arnold","Arnoldo","Arnulfo","Aron","Art","Arthur","Arturo","Arvel","Arvid","Arvilla","Aryanna","Asa","Asha","Ashlee","Ashleigh","Ashley","Ashly","Ashlynn","Ashton","Ashtyn","Asia","Assunta","Astrid","Athena","Aubree","Aubrey","Audie","Audra","Audreanne","Audrey","August","Augusta","Augustine","Augustus","Aurelia","Aurelie","Aurelio","Aurore","Austen","Austin","Austyn","Autumn","Ava","Avery","Avis","Axel","Ayana","Ayden","Ayla","Aylin","Baby","Bailee","Bailey","Barbara","Barney","Baron","Barrett","Barry","Bart","Bartholome","Barton","Baylee","Beatrice","Beau","Beaulah","Bell","Bella","Belle","Ben","Benedict","Benjamin","Bennett","Bennie","Benny","Benton","Berenice","Bernadette","Bernadine","Bernard","Bernardo","Berneice","Bernhard","Bernice","Bernie","Berniece","Bernita","Berry","Bert","Berta","Bertha","Bertram","Bertrand","Beryl","Bessie","Beth","Bethany","Bethel","Betsy","Bette","Bettie","Betty","Bettye","Beulah","Beverly","Bianka","Bill","Billie","Billy","Birdie","Blair","Blaise","Blake","Blanca","Blanche","Blaze","Bo","Bobbie","Bobby","Bonita","Bonnie","Boris","Boyd","Brad","Braden","Bradford","Bradley","Bradly","Brady","Braeden","Brain","Brandi","Brando","Brandon","Brandt","Brandy","Brandyn","Brannon","Branson","Brant","Braulio","Braxton","Brayan","Breana","Breanna","Breanne","Brenda","Brendan","Brenden","Brendon","Brenna","Brennan","Brennon","Brent","Bret","Brett","Bria","Brian","Briana","Brianne","Brice","Bridget","Bridgette","Bridie","Brielle","Brigitte","Brionna","Brisa","Britney","Brittany","Brock","Broderick","Brody","Brook","Brooke","Brooklyn","Brooks","Brown","Bruce","Bryana","Bryce","Brycen","Bryon","Buck","Bud","Buddy","Buford","Bulah","Burdette","Burley","Burnice","Buster","Cade","Caden","Caesar","Caitlyn","Cale","Caleb","Caleigh","Cali","Calista","Callie","Camden","Cameron","Camila","Camilla","Camille","Camren","Camron","Camryn","Camylle","Candace","Candelario","Candice","Candida","Candido","Cara","Carey","Carissa","Carlee","Carleton","Carley","Carli","Carlie","Carlo","Carlos","Carlotta","Carmel","Carmela","Carmella","Carmelo","Carmen","Carmine","Carol","Carolanne","Carole","Carolina","Caroline","Carolyn","Carolyne","Carrie","Carroll","Carson","Carter","Cary","Casandra","Casey","Casimer","Casimir","Casper","Cassandra","Cassandre","Cassidy","Cassie","Catalina","Caterina","Catharine","Catherine","Cathrine","Cathryn","Cathy","Cayla","Ceasar","Cecelia","Cecil","Cecile","Cecilia","Cedrick","Celestine","Celestino","Celia","Celine","Cesar","Chad","Chadd","Chadrick","Chaim","Chance","Chandler","Chanel","Chanelle","Charity","Charlene","Charles","Charley","Charlie","Charlotte","Chase","Chasity","Chauncey","Chaya","Chaz","Chelsea","Chelsey","Chelsie","Chesley","Chester","Chet","Cheyanne","Cheyenne","Chloe","Chris","Christ","Christa","Christelle","Christian","Christiana","Christina","Christine","Christop","Christophe","Christopher","Christy","Chyna","Ciara","Cicero","Cielo","Cierra","Cindy","Citlalli","Clair","Claire","Clara","Clarabelle","Clare","Clarissa","Clark","Claud","Claude","Claudia","Claudie","Claudine","Clay","Clemens","Clement","Clementina","Clementine","Clemmie","Cleo","Cleora","Cleta","Cletus","Cleve","Cleveland","Clifford","Clifton","Clint","Clinton","Clotilde","Clovis","Cloyd","Clyde","Coby","Cody","Colby","Cole","Coleman","Colin","Colleen","Collin","Colt","Colten","Colton","Columbus","Concepcion","Conner","Connie","Connor","Conor","Conrad","Constance","Constantin","Consuelo","Cooper","Cora","Coralie","Corbin","Cordelia","Cordell","Cordia","Cordie","Corene","Corine","Cornelius","Cornell","Corrine","Cortez","Cortney","Cory","Coty","Courtney","Coy","Craig","Crawford","Creola","Cristal","Cristian","Cristina","Cristobal","Cristopher","Cruz","Crystal","Crystel","Cullen","Curt","Curtis","Cydney","Cynthia","Cyril","Cyrus","Dagmar","Dahlia","Daija","Daisha","Daisy","Dakota","Dale","Dallas","Dallin","Dalton","Damaris","Dameon","Damian","Damien","Damion","Damon","Dan","Dana","Dandre","Dane","D'angelo","Dangelo","Danial","Daniela","Daniella","Danielle","Danika","Dannie","Danny","Dante","Danyka","Daphne","Daphnee","Daphney","Darby","Daren","Darian","Dariana","Darien","Dario","Darion","Darius","Darlene","Daron","Darrel","Darrell","Darren","Darrick","Darrin","Darrion","Darron","Darryl","Darwin","Daryl","Dashawn","Dasia","Dave","David","Davin","Davion","Davon","Davonte","Dawn","Dawson","Dax","Dayana","Dayna","Dayne","Dayton","Dean","Deangelo","Deanna","Deborah","Declan","Dedric","Dedrick","Dee","Deion","Deja","Dejah","Dejon","Dejuan","Delaney","Delbert","Delfina","Delia","Delilah","Dell","Della","Delmer","Delores","Delpha","Delphia","Delphine","Delta","Demarco","Demarcus","Demario","Demetris","Demetrius","Demond","Dena","Denis","Dennis","Deon","Deondre","Deontae","Deonte","Dereck","Derek","Derick","Deron","Derrick","Deshaun","Deshawn","Desiree","Desmond","Dessie","Destany","Destin","Destinee","Destiney","Destini","Destiny","Devan","Devante","Deven","Devin","Devon","Devonte","Devyn","Dewayne","Dewitt","Dexter","Diamond","Diana","Dianna","Diego","Dillan","Dillon","Dimitri","Dina","Dino","Dion","Dixie","Dock","Dolly","Dolores","Domenic","Domenica","Domenick","Domenico","Domingo","Dominic","Dominique","Don","Donald","Donato","Donavon","Donna","Donnell","Donnie","Donny","Dora","Dorcas","Dorian","Doris","Dorothea","Dorothy","Dorris","Dortha","Dorthy","Doug","Douglas","Dovie","Doyle","Drake","Drew","Duane","Dudley","Dulce","Duncan","Durward","Dustin","Dusty","Dwight","Dylan","Earl","Earlene","Earline","Earnest","Earnestine","Easter","Easton","Ebba","Ebony","Ed","Eda","Edd","Eddie","Eden","Edgar","Edgardo","Edison","Edmond","Edmund","Edna","Eduardo","Edward","Edwardo","Edwin","Edwina","Edyth","Edythe","Effie","Efrain","Efren","Eileen","Einar","Eino","Eladio","Elaina","Elbert","Elda","Eldon","Eldora","Eldred","Eldridge","Eleanora","Eleanore","Eleazar","Electa","Elena","Elenor","Elenora","Eleonore","Elfrieda","Eli","Elian","Eliane","Elias","Eliezer","Elijah","Elinor","Elinore","Elisa","Elisabeth","Elise","Eliseo","Elisha","Elissa","Eliza","Elizabeth","Ella","Ellen","Ellie","Elliot","Elliott","Ellis","Ellsworth","Elmer","Elmira","Elmo","Elmore","Elna","Elnora","Elody","Eloisa","Eloise","Elouise","Eloy","Elroy","Elsa","Else","Elsie","Elta","Elton","Elva","Elvera","Elvie","Elvis","Elwin","Elwyn","Elyse","Elyssa","Elza","Emanuel","Emelia","Emelie","Emely","Emerald","Emerson","Emery","Emie","Emil","Emile","Emilia","Emiliano","Emilie","Emilio","Emily","Emma","Emmalee","Emmanuel","Emmanuelle","Emmet","Emmett","Emmie","Emmitt","Emmy","Emory","Ena","Enid","Enoch","Enola","Enos","Enrico","Enrique","Ephraim","Era","Eriberto","Eric","Erica","Erich","Erick","Ericka","Erik","Erika","Erin","Erling","Erna","Ernest","Ernestina","Ernestine","Ernesto","Ernie","Ervin","Erwin","Eryn","Esmeralda","Esperanza","Esta","Esteban","Estefania","Estel","Estell","Estella","Estelle","Estevan","Esther","Estrella","Etha","Ethan","Ethel","Ethelyn","Ethyl","Ettie","Eudora","Eugene","Eugenia","Eula","Eulah","Eulalia","Euna","Eunice","Eusebio","Eva","Evalyn","Evan","Evangeline","Evans","Eve","Eveline","Evelyn","Everardo","Everett","Everette","Evert","Evie","Ewald","Ewell","Ezekiel","Ezequiel","Ezra","Fabian","Fabiola","Fae","Fannie","Fanny","Fatima","Faustino","Fausto","Favian","Fay","Faye","Federico","Felicia","Felicita","Felicity","Felipa","Felipe","Felix","Felton","Fermin","Fern","Fernando","Ferne","Fidel","Filiberto","Filomena","Finn","Fiona","Flavie","Flavio","Fleta","Fletcher","Flo","Florence","Florencio","Florian","Florida","Florine","Flossie","Floy","Floyd","Ford","Forest","Forrest","Foster","Frances","Francesca","Francesco","Francis","Francisca","Francisco","Franco","Frank","Frankie","Franz","Fred","Freda","Freddie","Freddy","Frederic","Frederick","Frederik","Frederique","Fredrick","Fredy","Freeda","Freeman","Freida","Frida","Frieda","Friedrich","Fritz","Furman","Gabe","Gabriel","Gabriella","Gabrielle","Gaetano","Gage","Gail","Gardner","Garett","Garfield","Garland","Garnet","Garnett","Garret","Garrett","Garrick","Garrison","Garry","Garth","Gaston","Gavin","Gayle","Gene","General","Genesis","Genevieve","Gennaro","Genoveva","Geo","Geoffrey","George","Georgette","Georgiana","Georgianna","Geovanni","Geovanny","Geovany","Gerald","Geraldine","Gerard","Gerardo","Gerda","Gerhard","Germaine","German","Gerry","Gerson","Gertrude","Gia","Gianni","Gideon","Gilbert","Gilberto","Gilda","Giles","Gillian","Gina","Gino","Giovani","Giovanna","Giovanni","Giovanny","Gisselle","Giuseppe","Gladyce","Gladys","Glen","Glenda","Glenna","Glennie","Gloria","Godfrey","Golda","Golden","Gonzalo","Gordon","Grace","Gracie","Graciela","Grady","Graham","Grant","Granville","Grayce","Grayson","Green","Greg","Gregg","Gregoria","Gregorio","Gregory","Greta","Gretchen","Greyson","Griffin","Grover","Guadalupe","Gudrun","Guido","Guillermo","Guiseppe","Gunnar","Gunner","Gus","Gussie","Gust","Gustave","Guy","Gwen","Gwendolyn","Hadley","Hailee","Hailey","Hailie","Hal","Haleigh","Haley","Halie","Halle","Hallie","Hank","Hanna","Hannah","Hans","Hardy","Harley","Harmon","Harmony","Harold","Harrison","Harry","Harvey","Haskell","Hassan","Hassie","Hattie","Haven","Hayden","Haylee","Hayley","Haylie","Hazel","Hazle","Heath","Heather","Heaven","Heber","Hector","Heidi","Helen","Helena","Helene","Helga","Hellen","Helmer","Heloise","Henderson","Henri","Henriette","Henry","Herbert","Herman","Hermann","Hermina","Herminia","Herminio","Hershel","Herta","Hertha","Hester","Hettie","Hilario","Hilbert","Hilda","Hildegard","Hillard","Hillary","Hilma","Hilton","Hipolito","Hiram","Hobart","Holden","Hollie","Hollis","Holly","Hope","Horace","Horacio","Hortense","Hosea","Houston","Howard","Howell","Hoyt","Hubert","Hudson","Hugh","Hulda","Humberto","Hunter","Hyman","Ian","Ibrahim","Icie","Ida","Idell","Idella","Ignacio","Ignatius","Ike","Ila","Ilene","Iliana","Ima","Imani","Imelda","Immanuel","Imogene","Ines","Irma","Irving","Irwin","Isaac","Isabel","Isabell","Isabella","Isabelle","Isac","Isadore","Isai","Isaiah","Isaias","Isidro","Ismael","Isobel","Isom","Israel","Issac","Itzel","Iva","Ivah","Ivory","Ivy","Izabella","Izaiah","Jabari","Jace","Jacey","Jacinthe","Jacinto","Jack","Jackeline","Jackie","Jacklyn","Jackson","Jacky","Jaclyn","Jacquelyn","Jacques","Jacynthe","Jada","Jade","Jaden","Jadon","Jadyn","Jaeden","Jaida","Jaiden","Jailyn","Jaime","Jairo","Jakayla","Jake","Jakob","Jaleel","Jalen","Jalon","Jalyn","Jamaal","Jamal","Jamar","Jamarcus","Jamel","Jameson","Jamey","Jamie","Jamil","Jamir","Jamison","Jammie","Jan","Jana","Janae","Jane","Janelle","Janessa","Janet","Janice","Janick","Janie","Janis","Janiya","Jannie","Jany","Jaquan","Jaquelin","Jaqueline","Jared","Jaren","Jarod","Jaron","Jarred","Jarrell","Jarret","Jarrett","Jarrod","Jarvis","Jasen","Jasmin","Jason","Jasper","Jaunita","Javier","Javon","Javonte","Jay","Jayce","Jaycee","Jayda","Jayde","Jayden","Jaydon","Jaylan","Jaylen","Jaylin","Jaylon","Jayme","Jayne","Jayson","Jazlyn","Jazmin","Jazmyn","Jazmyne","Jean","Jeanette","Jeanie","Jeanne","Jed","Jedediah","Jedidiah","Jeff","Jefferey","Jeffery","Jeffrey","Jeffry","Jena","Jenifer","Jennie","Jennifer","Jennings","Jennyfer","Jensen","Jerad","Jerald","Jeramie","Jeramy","Jerel","Jeremie","Jeremy","Jermain","Jermaine","Jermey","Jerod","Jerome","Jeromy","Jerrell","Jerrod","Jerrold","Jerry","Jess","Jesse","Jessica","Jessie","Jessika","Jessy","Jessyca","Jesus","Jett","Jettie","Jevon","Jewel","Jewell","Jillian","Jimmie","Jimmy","Jo","Joan","Joana","Joanie","Joanne","Joannie","Joanny","Joany","Joaquin","Jocelyn","Jodie","Jody","Joe","Joel","Joelle","Joesph","Joey","Johan","Johann","Johanna","Johathan","John","Johnathan","Johnathon","Johnnie","Johnny","Johnpaul","Johnson","Jolie","Jon","Jonas","Jonatan","Jonathan","Jonathon","Jordan","Jordane","Jordi","Jordon","Jordy","Jordyn","Jorge","Jose","Josefa","Josefina","Joseph","Josephine","Josh","Joshua","Joshuah","Josiah","Josiane","Josianne","Josie","Josue","Jovan","Jovani","Jovanny","Jovany","Joy","Joyce","Juana","Juanita","Judah","Judd","Jude","Judge","Judson","Judy","Jules","Julia","Julian","Juliana","Julianne","Julie","Julien","Juliet","Julio","Julius","June","Junior","Junius","Justen","Justice","Justina","Justine","Juston","Justus","Justyn","Juvenal","Juwan","Kacey","Kaci","Kacie","Kade","Kaden","Kadin","Kaela","Kaelyn","Kaia","Kailee","Kailey","Kailyn","Kaitlin","Kaitlyn","Kale","Kaleb","Kaleigh","Kaley","Kali","Kallie","Kameron","Kamille","Kamren","Kamron","Kamryn","Kane","Kara","Kareem","Karelle","Karen","Kari","Kariane","Karianne","Karina","Karine","Karl","Karlee","Karley","Karli","Karlie","Karolann","Karson","Kasandra","Kasey","Kassandra","Katarina","Katelin","Katelyn","Katelynn","Katharina","Katherine","Katheryn","Kathleen","Kathlyn","Kathryn","Kathryne","Katlyn","Katlynn","Katrina","Katrine","Kattie","Kavon","Kay","Kaya","Kaycee","Kayden","Kayla","Kaylah","Kaylee","Kayleigh","Kayley","Kayli","Kaylie","Kaylin","Keagan","Keanu","Keara","Keaton","Keegan","Keeley","Keely","Keenan","Keira","Keith","Kellen","Kelley","Kelli","Kellie","Kelly","Kelsi","Kelsie","Kelton","Kelvin","Ken","Kendall","Kendra","Kendrick","Kenna","Kennedi","Kennedy","Kenneth","Kennith","Kenny","Kenton","Kenya","Kenyatta","Kenyon","Keon","Keshaun","Keshawn","Keven","Kevin","Kevon","Keyon","Keyshawn","Khalid","Khalil","Kian","Kiana","Kianna","Kiara","Kiarra","Kiel","Kiera","Kieran","Kiley","Kim","Kimberly","King","Kip","Kira","Kirk","Kirsten","Kirstin","Kitty","Kobe","Koby","Kody","Kolby","Kole","Korbin","Korey","Kory","Kraig","Kris","Krista","Kristian","Kristin","Kristina","Kristofer","Kristoffer","Kristopher","Kristy","Krystal","Krystel","Krystina","Kurt","Kurtis","Kyla","Kyle","Kylee","Kyleigh","Kyler","Kylie","Kyra","Lacey","Lacy","Ladarius","Lafayette","Laila","Laisha","Lamar","Lambert","Lamont","Lance","Landen","Lane","Laney","Larissa","Laron","Larry","Larue","Laura","Laurel","Lauren","Laurence","Lauretta","Lauriane","Laurianne","Laurie","Laurine","Laury","Lauryn","Lavada","Lavern","Laverna","Laverne","Lavina","Lavinia","Lavon","Lavonne","Lawrence","Lawson","Layla","Layne","Lazaro","Lea","Leann","Leanna","Leanne","Leatha","Leda","Lee","Leif","Leila","Leilani","Lela","Lelah","Leland","Lelia","Lempi","Lemuel","Lenna","Lennie","Lenny","Lenora","Lenore","Leo","Leola","Leon","Leonard","Leonardo","Leone","Leonel","Leonie","Leonor","Leonora","Leopold","Leopoldo","Leora","Lera","Lesley","Leslie","Lesly","Lessie","Lester","Leta","Letha","Letitia","Levi","Lew","Lewis","Lexi","Lexie","Lexus","Lia","Liam","Liana","Libbie","Libby","Lila","Lilian","Liliana","Liliane","Lilla","Lillian","Lilliana","Lillie","Lilly","Lily","Lilyan","Lina","Lincoln","Linda","Lindsay","Lindsey","Linnea","Linnie","Linwood","Lionel","Lisa","Lisandro","Lisette","Litzy","Liza","Lizeth","Lizzie","Llewellyn","Lloyd","Logan","Lois","Lola","Lolita","Loma","Lon","London","Lonie","Lonnie","Lonny","Lonzo","Lora","Loraine","Loren","Lorena","Lorenz","Lorenza","Lorenzo","Lori","Lorine","Lorna","Lottie","Lou","Louie","Louisa","Lourdes","Louvenia","Lowell","Loy","Loyal","Loyce","Lucas","Luciano","Lucie","Lucienne","Lucile","Lucinda","Lucio","Lucious","Lucius","Lucy","Ludie","Ludwig","Lue","Luella","Luigi","Luis","Luisa","Lukas","Lula","Lulu","Luna","Lupe","Lura","Lurline","Luther","Luz","Lyda","Lydia","Lyla","Lynn","Lyric","Lysanne","Mabel","Mabelle","Mable","Mac","Macey","Maci","Macie","Mack","Mackenzie","Macy","Madaline","Madalyn","Maddison","Madeline","Madelyn","Madelynn","Madge","Madie","Madilyn","Madisen","Madison","Madisyn","Madonna","Madyson","Mae","Maegan","Maeve","Mafalda","Magali","Magdalen","Magdalena","Maggie","Magnolia","Magnus","Maia","Maida","Maiya","Major","Makayla","Makenna","Makenzie","Malachi","Malcolm","Malika","Malinda","Mallie","Mallory","Malvina","Mandy","Manley","Manuel","Manuela","Mara","Marc","Marcel","Marcelina","Marcelino","Marcella","Marcelle","Marcellus","Marcelo","Marcia","Marco","Marcos","Marcus","Margaret","Margarete","Margarett","Margaretta","Margarette","Margarita","Marge","Margie","Margot","Margret","Marguerite","Maria","Mariah","Mariam","Marian","Mariana","Mariane","Marianna","Marianne","Mariano","Maribel","Marie","Mariela","Marielle","Marietta","Marilie","Marilou","Marilyne","Marina","Mario","Marion","Marisa","Marisol","Maritza","Marjolaine","Marjorie","Marjory","Mark","Markus","Marlee","Marlen","Marlene","Marley","Marlin","Marlon","Marques","Marquis","Marquise","Marshall","Marta","Martin","Martina","Martine","Marty","Marvin","Mary","Maryam","Maryjane","Maryse","Mason","Mateo","Mathew","Mathias","Mathilde","Matilda","Matilde","Matt","Matteo","Mattie","Maud","Maude","Maudie","Maureen","Maurice","Mauricio","Maurine","Maverick","Mavis","Max","Maxie","Maxime","Maximilian","Maximillia","Maximillian","Maximo","Maximus","Maxine","Maxwell","May","Maya","Maybell","Maybelle","Maye","Maymie","Maynard","Mayra","Mazie","Mckayla","Mckenna","Mckenzie","Meagan","Meaghan","Meda","Megane","Meggie","Meghan","Mekhi","Melany","Melba","Melisa","Melissa","Mellie","Melody","Melvin","Melvina","Melyna","Melyssa","Mercedes","Meredith","Merl","Merle","Merlin","Merritt","Mertie","Mervin","Meta","Mia","Micaela","Micah","Michael","Michaela","Michale","Micheal","Michel","Michele","Michelle","Miguel","Mikayla","Mike","Mikel","Milan","Miles","Milford","Miller","Millie","Milo","Milton","Mina","Minerva","Minnie","Miracle","Mireille","Mireya","Misael","Missouri","Misty","Mitchel","Mitchell","Mittie","Modesta","Modesto","Mohamed","Mohammad","Mohammed","Moises","Mollie","Molly","Mona","Monica","Monique","Monroe","Monserrat","Monserrate","Montana","Monte","Monty","Morgan","Moriah","Morris","Mortimer","Morton","Mose","Moses","Moshe","Mossie","Mozell","Mozelle","Muhammad","Muriel","Murl","Murphy","Murray","Mustafa","Mya","Myah","Mylene","Myles","Myra","Myriam","Myrl","Myrna","Myron","Myrtice","Myrtie","Myrtis","Myrtle","Nadia","Nakia","Name","Nannie","Naomi","Naomie","Napoleon","Narciso","Nash","Nasir","Nat","Natalia","Natalie","Natasha","Nathan","Nathanael","Nathanial","Nathaniel","Nathen","Nayeli","Neal","Ned","Nedra","Neha","Neil","Nelda","Nella","Nelle","Nellie","Nels","Nelson","Neoma","Nestor","Nettie","Neva","Newell","Newton","Nia","Nicholas","Nicholaus","Nichole","Nick","Nicklaus","Nickolas","Nico","Nicola","Nicolas","Nicole","Nicolette","Nigel","Nikita","Nikki","Nikko","Niko","Nikolas","Nils","Nina","Noah","Noble","Noe","Noel","Noelia","Noemi","Noemie","Noemy","Nola","Nolan","Nona","Nora","Norbert","Norberto","Norene","Norma","Norris","Norval","Norwood","Nova","Novella","Nya","Nyah","Nyasia","Obie","Oceane","Ocie","Octavia","Oda","Odell","Odessa","Odie","Ofelia","Okey","Ola","Olaf","Ole","Olen","Oleta","Olga","Olin","Oliver","Ollie","Oma","Omari","Omer","Ona","Onie","Opal","Ophelia","Ora","Oral","Oran","Oren","Orie","Orin","Orion","Orland","Orlando","Orlo","Orpha","Orrin","Orval","Orville","Osbaldo","Osborne","Oscar","Osvaldo","Oswald","Oswaldo","Otha","Otho","Otilia","Otis","Ottilie","Ottis","Otto","Ova","Owen","Ozella","Pablo","Paige","Palma","Pamela","Pansy","Paolo","Paris","Parker","Pascale","Pasquale","Pat","Patience","Patricia","Patrick","Patsy","Pattie","Paul","Paula","Pauline","Paxton","Payton","Pearl","Pearlie","Pearline","Pedro","Peggie","Penelope","Percival","Percy","Perry","Pete","Peter","Petra","Peyton","Philip","Phoebe","Phyllis","Pierce","Pierre","Pietro","Pink","Pinkie","Piper","Polly","Porter","Precious","Presley","Preston","Price","Prince","Princess","Priscilla","Providenci","Prudence","Queen","Queenie","Quentin","Quincy","Quinn","Quinten","Quinton","Rachael","Rachel","Rachelle","Rae","Raegan","Rafael","Rafaela","Raheem","Rahsaan","Rahul","Raina","Raleigh","Ralph","Ramiro","Ramon","Ramona","Randal","Randall","Randi","Randy","Ransom","Raoul","Raphael","Raphaelle","Raquel","Rashad","Rashawn","Rasheed","Raul","Raven","Ray","Raymond","Raymundo","Reagan","Reanna","Reba","Rebeca","Rebecca","Rebeka","Rebekah","Reece","Reed","Reese","Regan","Reggie","Reginald","Reid","Reilly","Reina","Reinhold","Remington","Rene","Renee","Ressie","Reta","Retha","Retta","Reuben","Reva","Rex","Rey","Reyes","Reymundo","Reyna","Reynold","Rhea","Rhett","Rhianna","Rhiannon","Rhoda","Ricardo","Richard","Richie","Richmond","Rick","Rickey","Rickie","Ricky","Rico","Rigoberto","Riley","Rita","River","Robb","Robbie","Robert","Roberta","Roberto","Robin","Robyn","Rocio","Rocky","Rod","Roderick","Rodger","Rodolfo","Rodrick","Rodrigo","Roel","Rogelio","Roger","Rogers","Rolando","Rollin","Roma","Romaine","Roman","Ron","Ronaldo","Ronny","Roosevelt","Rory","Rosa","Rosalee","Rosalia","Rosalind","Rosalinda","Rosalyn","Rosamond","Rosanna","Rosario","Roscoe","Rose","Rosella","Roselyn","Rosemarie","Rosemary","Rosendo","Rosetta","Rosie","Rosina","Roslyn","Ross","Rossie","Rowan","Rowena","Rowland","Roxane","Roxanne","Roy","Royal","Royce","Rozella","Ruben","Rubie","Ruby","Rubye","Rudolph","Rudy","Rupert","Russ","Russel","Russell","Rusty","Ruth","Ruthe","Ruthie","Ryan","Ryann","Ryder","Rylan","Rylee","Ryleigh","Ryley","Sabina","Sabrina","Sabryna","Sadie","Sadye","Sage","Saige","Sallie","Sally","Salma","Salvador","Salvatore","Sam","Samanta","Samantha","Samara","Samir","Sammie","Sammy","Samson","Sandra","Sandrine","Sandy","Sanford","Santa","Santiago","Santina","Santino","Santos","Sarah","Sarai","Sarina","Sasha","Saul","Savanah","Savanna","Savannah","Savion","Scarlett","Schuyler","Scot","Scottie","Scotty","Seamus","Sean","Sebastian","Sedrick","Selena","Selina","Selmer","Serena","Serenity","Seth","Shad","Shaina","Shakira","Shana","Shane","Shanel","Shanelle","Shania","Shanie","Shaniya","Shanna","Shannon","Shanny","Shanon","Shany","Sharon","Shaun","Shawn","Shawna","Shaylee","Shayna","Shayne","Shea","Sheila","Sheldon","Shemar","Sheridan","Sherman","Sherwood","Shirley","Shyann","Shyanne","Sibyl","Sid","Sidney","Sienna","Sierra","Sigmund","Sigrid","Sigurd","Silas","Sim","Simeon","Simone","Sincere","Sister","Skye","Skyla","Skylar","Sofia","Soledad","Solon","Sonia","Sonny","Sonya","Sophia","Sophie","Spencer","Stacey","Stacy","Stan","Stanford","Stanley","Stanton","Stefan","Stefanie","Stella","Stephan","Stephania","Stephanie","Stephany","Stephen","Stephon","Sterling","Steve","Stevie","Stewart","Stone","Stuart","Summer","Sunny","Susan","Susana","Susanna","Susie","Suzanne","Sven","Syble","Sydnee","Sydney","Sydni","Sydnie","Sylvan","Sylvester","Sylvia","Tabitha","Tad","Talia","Talon","Tamara","Tamia","Tania","Tanner","Tanya","Tara","Taryn","Tate","Tatum","Tatyana","Taurean","Tavares","Taya","Taylor","Teagan","Ted","Telly","Terence","Teresa","Terrance","Terrell","Terrence","Terrill","Terry","Tess","Tessie","Tevin","Thad","Thaddeus","Thalia","Thea","Thelma","Theo","Theodora","Theodore","Theresa","Therese","Theresia","Theron","Thomas","Thora","Thurman","Tia","Tiana","Tianna","Tiara","Tierra","Tiffany","Tillman","Timmothy","Timmy","Timothy","Tina","Tito","Titus","Tobin","Toby","Tod","Tom","Tomas","Tomasa","Tommie","Toney","Toni","Tony","Torey","Torrance","Torrey","Toy","Trace","Tracey","Tracy","Travis","Travon","Tre","Tremaine","Tremayne","Trent","Trenton","Tressa","Tressie","Treva","Trever","Trevion","Trevor","Trey","Trinity","Trisha","Tristian","Tristin","Triston","Troy","Trudie","Trycia","Trystan","Turner","Twila","Tyler","Tyra","Tyree","Tyreek","Tyrel","Tyrell","Tyrese","Tyrique","Tyshawn","Tyson","Ubaldo","Ulices","Ulises","Una","Unique","Urban","Uriah","Uriel","Ursula","Vada","Valentin","Valentina","Valentine","Valerie","Vallie","Van","Vance","Vanessa","Vaughn","Veda","Velda","Vella","Velma","Velva","Vena","Verda","Verdie","Vergie","Verla","Verlie","Vern","Verna","Verner","Vernice","Vernie","Vernon","Verona","Veronica","Vesta","Vicenta","Vicente","Vickie","Vicky","Victor","Victoria","Vida","Vidal","Vilma","Vince","Vincent","Vincenza","Vincenzo","Vinnie","Viola","Violet","Violette","Virgie","Virgil","Virginia","Virginie","Vita","Vito","Viva","Vivian","Viviane","Vivianne","Vivien","Vivienne","Vladimir","Wade","Waino","Waldo","Walker","Wallace","Walter","Walton","Wanda","Ward","Warren","Watson","Wava","Waylon","Wayne","Webster","Weldon","Wellington","Wendell","Wendy","Werner","Westley","Weston","Whitney","Wilber","Wilbert","Wilburn","Wiley","Wilford","Wilfred","Wilfredo","Wilfrid","Wilhelm","Wilhelmine","Will","Willa","Willard","William","Willie","Willis","Willow","Willy","Wilma","Wilmer","Wilson","Wilton","Winfield","Winifred","Winnifred","Winona","Winston","Woodrow","Wyatt","Wyman","Xander","Xavier","Xzavier","Yadira","Yasmeen","Yasmin","Yasmine","Yazmin","Yesenia","Yessenia","Yolanda","Yoshiko","Yvette","Yvonne","Zachariah","Zachary","Zachery","Zack","Zackary","Zackery","Zakary","Zander","Zane","Zaria","Zechariah","Zelda","Zella","Zelma","Zena","Zetta","Zion","Zita","Zoe","Zoey","Zoie","Zoila","Zola","Zora","Zula"],WVu=["Agender","Androgyne","Androgynous","Bigender","Cis female","Cis male","Cis man","Cis woman","Cis","Cisgender female","Cisgender male","Cisgender man","Cisgender woman","Cisgender","Demi-boy","Demi-girl","Demi-man","Demi-woman","Demiflux","Demigender","F2M","FTM","Female to male trans man","Female to male transgender man","Female to male transsexual man","Female to male","Gender fluid","Gender neutral","Gender nonconforming","Gender questioning","Gender variant","Genderflux","Genderqueer","Hermaphrodite","Intersex man","Intersex person","Intersex woman","Intersex","M2F","MTF","Male to female trans woman","Male to female transgender woman","Male to female transsexual woman","Male to female","Man","Multigender","Neither","Neutrois","Non-binary","Omnigender","Other","Pangender","Polygender","T* man","T* woman","Trans female","Trans male","Trans man","Trans person","Trans woman","Trans","Transexual female","Transexual male","Transexual man","Transexual person","Transexual woman","Transexual","Transgender female","Transgender person","Transmasculine","Trigender","Two* person","Two-spirit person","Two-spirit","Woman","Xenogender"],GVu=["Abbott","Abernathy","Abshire","Adams","Altenwerth","Anderson","Ankunding","Armstrong","Auer","Aufderhar","Bahringer","Bailey","Balistreri","Barrows","Bartell","Bartoletti","Barton","Bashirian","Batz","Bauch","Baumbach","Bayer","Beahan","Beatty","Bechtelar","Becker","Bednar","Beer","Beier","Berge","Bergnaum","Bergstrom","Bernhard","Bernier","Bins","Blanda","Blick","Block","Bode","Boehm","Bogan","Bogisich","Borer","Bosco","Botsford","Boyer","Boyle","Bradtke","Brakus","Braun","Breitenberg","Brekke","Brown","Bruen","Buckridge","Carroll","Carter","Cartwright","Casper","Cassin","Champlin","Christiansen","Cole","Collier","Collins","Conn","Connelly","Conroy","Considine","Corkery","Cormier","Corwin","Cremin","Crist","Crona","Cronin","Crooks","Cruickshank","Cummerata","Cummings","Dach","D'Amore","Daniel","Dare","Daugherty","Davis","Deckow","Denesik","Dibbert","Dickens","Dicki","Dickinson","Dietrich","Donnelly","Dooley","Douglas","Doyle","DuBuque","Durgan","Ebert","Effertz","Emard","Emmerich","Erdman","Ernser","Fadel","Fahey","Farrell","Fay","Feeney","Feest","Feil","Ferry","Fisher","Flatley","Frami","Franecki","Franey","Friesen","Fritsch","Funk","Gerhold","Gerlach","Gibson","Gislason","Gleason","Gleichner","Glover","Goldner","Goodwin","Gorczany","Gottlieb","Goyette","Grady","Graham","Grant","Green","Greenfelder","Greenholt","Grimes","Gulgowski","Gusikowski","Gutkowski","Gutmann","Haag","Hackett","Hagenes","Hahn","Haley","Halvorson","Hamill","Hammes","Hand","Hane","Hansen","Harber","Harris","Hartmann","Harvey","Hauck","Hayes","Heaney","Heathcote","Hegmann","Heidenreich","Heller","Herman","Hermann","Hermiston","Herzog","Hessel","Hettinger","Hickle","Hilll","Hills","Hilpert","Hintz","Hirthe","Hodkiewicz","Hoeger","Homenick","Hoppe","Howe","Howell","Hudson","Huel","Huels","Hyatt","Jacobi","Jacobs","Jacobson","Jakubowski","Jaskolski","Jast","Jenkins","Jerde","Johns","Johnson","Johnston","Jones","Kassulke","Kautzer","Keebler","Keeling","Kemmer","Kerluke","Kertzmann","Kessler","Kiehn","Kihn","Kilback","King","Kirlin","Klein","Kling","Klocko","Koch","Koelpin","Koepp","Kohler","Konopelski","Koss","Kovacek","Kozey","Krajcik","Kreiger","Kris","Kshlerin","Kub","Kuhic","Kuhlman","Kuhn","Kulas","Kunde","Kunze","Kuphal","Kutch","Kuvalis","Labadie","Lakin","Lang","Langosh","Langworth","Larkin","Larson","Leannon","Lebsack","Ledner","Leffler","Legros","Lehner","Lemke","Lesch","Leuschke","Lind","Lindgren","Littel","Little","Lockman","Lowe","Lubowitz","Lueilwitz","Luettgen","Lynch","Macejkovic","MacGyver","Maggio","Mann","Mante","Marks","Marquardt","Marvin","Mayer","Mayert","McClure","McCullough","McDermott","McGlynn","McKenzie","McLaughlin","Medhurst","Mertz","Metz","Miller","Mills","Mitchell","Moen","Mohr","Monahan","Moore","Morar","Morissette","Mosciski","Mraz","Mueller","Muller","Murazik","Murphy","Murray","Nader","Nicolas","Nienow","Nikolaus","Nitzsche","Nolan","Oberbrunner","O'Connell","O'Conner","O'Hara","O'Keefe","O'Kon","Okuneva","Olson","Ondricka","O'Reilly","Orn","Ortiz","Osinski","Pacocha","Padberg","Pagac","Parisian","Parker","Paucek","Pfannerstill","Pfeffer","Pollich","Pouros","Powlowski","Predovic","Price","Prohaska","Prosacco","Purdy","Quigley","Quitzon","Rath","Ratke","Rau","Raynor","Reichel","Reichert","Reilly","Reinger","Rempel","Renner","Reynolds","Rice","Rippin","Ritchie","Robel","Roberts","Rodriguez","Rogahn","Rohan","Rolfson","Romaguera","Roob","Rosenbaum","Rowe","Ruecker","Runolfsdottir","Runolfsson","Runte","Russel","Rutherford","Ryan","Sanford","Satterfield","Sauer","Sawayn","Schaden","Schaefer","Schamberger","Schiller","Schimmel","Schinner","Schmeler","Schmidt","Schmitt","Schneider","Schoen","Schowalter","Schroeder","Schulist","Schultz","Schumm","Schuppe","Schuster","Senger","Shanahan","Shields","Simonis","Sipes","Skiles","Smith","Smitham","Spencer","Spinka","Sporer","Stamm","Stanton","Stark","Stehr","Steuber","Stiedemann","Stokes","Stoltenberg","Stracke","Streich","Stroman","Strosin","Swaniawski","Swift","Terry","Thiel","Thompson","Tillman","Torp","Torphy","Towne","Toy","Trantow","Tremblay","Treutel","Tromp","Turcotte","Turner","Ullrich","Upton","Vandervort","Veum","Volkman","Von","VonRueden","Waelchi","Walker","Walsh","Walter","Ward","Waters","Watsica","Weber","Wehner","Weimann","Weissnat","Welch","West","White","Wiegand","Wilderman","Wilkinson","Will","Williamson","Willms","Windler","Wintheiser","Wisoky","Wisozk","Witting","Wiza","Wolf","Wolff","Wuckert","Wunsch","Wyman","Yost","Yundt","Zboncak","Zemlak","Ziemann","Zieme","Zulauf"],UVu=[{value:"{{person.last_name}}",weight:95},{value:"{{person.last_name}}-{{person.last_name}}",weight:5}],qVu=["James","John","Robert","Michael","William","David","Richard","Charles","Joseph","Thomas","Christopher","Daniel","Paul","Mark","Donald","George","Kenneth","Steven","Edward","Brian","Ronald","Anthony","Kevin","Jason","Matthew","Gary","Timothy","Jose","Larry","Jeffrey","Frank","Scott","Eric","Stephen","Andrew","Raymond","Gregory","Joshua","Jerry","Dennis","Walter","Patrick","Peter","Harold","Douglas","Henry","Carl","Arthur","Ryan","Roger","Joe","Juan","Jack","Albert","Jonathan","Justin","Terry","Gerald","Keith","Samuel","Willie","Ralph","Lawrence","Nicholas","Roy","Benjamin","Bruce","Brandon","Adam","Harry","Fred","Wayne","Billy","Steve","Louis","Jeremy","Aaron","Randy","Howard","Eugene","Carlos","Russell","Bobby","Victor","Martin","Ernest","Phillip","Todd","Jesse","Craig","Alan","Shawn","Clarence","Sean","Philip","Chris","Johnny","Earl","Jimmy","Antonio","Danny","Bryan","Tony","Luis","Mike","Stanley","Leonard","Nathan","Dale","Manuel","Rodney","Curtis","Norman","Allen","Marvin","Vincent","Glenn","Jeffery","Travis","Jeff","Chad","Jacob","Lee","Melvin","Alfred","Kyle","Francis","Bradley","Jesus","Herbert","Frederick","Ray","Joel","Edwin","Don","Eddie","Ricky","Troy","Randall","Barry","Alexander","Bernard","Mario","Leroy","Francisco","Marcus","Micheal","Theodore","Clifford","Miguel","Oscar","Jay","Jim","Tom","Calvin","Alex","Jon","Ronnie","Bill","Lloyd","Tommy","Leon","Derek","Warren","Darrell","Jerome","Floyd","Leo","Alvin","Tim","Wesley","Gordon","Dean","Greg","Jorge","Dustin","Pedro","Derrick","Dan","Lewis","Zachary","Corey","Herman","Maurice","Vernon","Roberto","Clyde","Glen","Hector","Shane","Ricardo","Sam","Rick","Lester","Brent","Ramon","Charlie","Tyler","Gilbert","Gene","Marc","Reginald","Ruben","Brett","Angel","Nathaniel","Rafael","Leslie","Edgar","Milton","Raul","Ben","Chester","Cecil","Duane","Franklin","Andre","Elmer","Brad","Gabriel","Ron","Mitchell","Roland","Arnold","Harvey","Jared","Adrian","Karl","Cory","Claude","Erik","Darryl","Jamie","Neil","Jessie","Christian","Javier","Fernando","Clinton","Ted","Mathew","Tyrone","Darren","Lonnie","Lance","Cody","Julio","Kelly","Kurt","Allan","Nelson","Guy","Clayton","Hugh","Max","Dwayne","Dwight","Armando","Felix","Jimmie","Everett","Jordan","Ian","Wallace","Ken","Bob","Jaime","Casey","Alfredo","Alberto","Dave","Ivan","Johnnie","Sidney","Byron","Julian","Isaac","Morris","Clifton","Willard","Daryl","Ross","Virgil","Andy","Marshall","Salvador","Perry","Kirk","Sergio","Marion","Tracy","Seth","Kent","Terrance","Rene","Eduardo","Terrence","Enrique","Freddie","Wade","Austin","Stuart","Fredrick","Arturo","Alejandro","Jackie","Joey","Nick","Luther","Wendell","Jeremiah","Evan","Julius","Dana","Donnie","Otis","Shannon","Trevor","Oliver","Luke","Homer","Gerard","Doug","Kenny","Hubert","Angelo","Shaun","Lyle","Matt","Lynn","Alfonso","Orlando","Rex","Carlton","Ernesto","Cameron","Neal","Pablo","Lorenzo","Omar","Wilbur","Blake","Grant","Horace","Roderick","Kerry","Abraham","Willis","Rickey","Jean","Ira","Andres","Cesar","Johnathan","Malcolm","Rudolph","Damon","Kelvin","Rudy","Preston","Alton","Archie","Marco","Wm","Pete","Randolph","Garry","Geoffrey","Jonathon","Felipe","Bennie","Gerardo","Ed","Dominic","Robin","Loren","Delbert","Colin","Guillermo","Earnest","Lucas","Benny","Noel","Spencer","Rodolfo","Myron","Edmund","Garrett","Salvatore","Cedric","Lowell","Gregg","Sherman","Wilson","Devin","Sylvester","Kim","Roosevelt","Israel","Jermaine","Forrest","Wilbert","Leland","Simon","Guadalupe","Clark","Irving","Carroll","Bryant","Owen","Rufus","Woodrow","Sammy","Kristopher","Mack","Levi","Marcos","Gustavo","Jake","Lionel","Marty","Taylor","Ellis","Dallas","Gilberto","Clint","Nicolas","Laurence","Ismael","Orville","Drew","Jody","Ervin","Dewey","Al","Wilfred","Josh","Hugo","Ignacio","Caleb","Tomas","Sheldon","Erick","Frankie","Stewart","Doyle","Darrel","Rogelio","Terence","Santiago","Alonzo","Elias","Bert","Elbert","Ramiro","Conrad","Pat","Noah","Grady","Phil","Cornelius","Lamar","Rolando","Clay","Percy","Dexter","Bradford","Merle","Darin","Amos","Terrell","Moses","Irvin","Saul","Roman","Darnell","Randal","Tommie","Timmy","Darrin","Winston","Brendan","Toby","Van","Abel","Dominick","Boyd","Courtney","Jan","Emilio","Elijah","Cary","Domingo","Santos","Aubrey","Emmett","Marlon","Emanuel","Jerald","Edmond"],JVu=["Ace","Aiden","Alexander","Ander","Anthony","Asher","August","Aziel","Bear","Beckham","Benjamin","Buddy","Calvin","Carter","Charles","Christopher","Clyde","Cooper","Daniel","David","Dior","Dylan","Elijah","Ellis","Emerson","Ethan","Ezra","Fletcher","Flynn","Gabriel","Grayson","Gus","Hank","Harrison","Hendrix","Henry","Houston","Hudson","Hugh","Isaac","Jack","Jackson","Jacob","Jakobe","James","Jaxon","Jaxtyn","Jayden","John","Joseph","Josiah","Jude","Julian","Karsyn","Kenji","Kobe","Kylo","Lennon","Leo","Levi","Liam","Lincoln","Logan","Louis","Lucas","Lucky","Luke","Mason","Mateo","Matthew","Maverick","Michael","Monroe","Nixon","Ocean","Oliver","Otis","Otto","Owen","Ozzy","Parker","Rocky","Samuel","Sebastian","Sonny","Teddy","Theo","Theodore","Thomas","Truett","Walter","Warren","Watson","William","Wison","Wyatt","Ziggy","Zyair"],SOe=["Mr.","Dr."],ZVu=["Addison","Alex","Anderson","Angel","Arden","August","Austin","Avery","Bailey","Billie","Blake","Bowie","Brooklyn","Cameron","Charlie","Corey","Dakota","Drew","Elliott","Ellis","Emerson","Finley","Gray","Greer","Harper","Hayden","Jaden","James","Jamie","Jordan","Jules","Kai","Kendall","Kennedy","Kyle","Leslie","Logan","London","Marlowe","Micah","Nico","Noah","North","Parker","Phoenix","Quinn","Reagan","Reese","Reign","Riley","River","Robin","Rory","Rowan","Ryan","Sage","Sasha","Sawyer","Shawn","Shiloh","Skyler","Taylor"],YVu=[{value:"{{person.firstName}} {{person.lastName}}",weight:49},{value:"{{person.prefix}} {{person.firstName}} {{person.lastName}}",weight:7},{value:"{{person.firstName}} {{person.lastName}} {{person.suffix}}",weight:7},{value:"{{person.prefix}} {{person.firstName}} {{person.lastName}} {{person.suffix}}",weight:1}];function Dt(...u){return Array.from(new Set(u.flat())).sort()}var QVu=Dt(_Oe,SOe),XVu=["female","male"],e$u=["Jr.","Sr.","I","II","III","IV","V","MD","DDS","PhD","DVM"],t$u={descriptor:["Lead","Senior","Direct","Corporate","Dynamic","Future","Product","National","Regional","District","Central","Global","Customer","Investor","International","Legacy","Forward","Internal","Human","Chief","Principal"],level:["Solutions","Program","Brand","Security","Research","Marketing","Directives","Implementation","Integration","Functionality","Response","Paradigm","Tactics","Identity","Markets","Group","Division","Applications","Optimization","Operations","Infrastructure","Intranet","Communications","Web","Branding","Quality","Assurance","Mobility","Accounts","Data","Creative","Configuration","Accountability","Interactions","Factors","Usability","Metrics"],job:["Supervisor","Associate","Executive","Liaison","Officer","Manager","Engineer","Specialist","Director","Coordinator","Administrator","Architect","Analyst","Designer","Planner","Orchestrator","Technician","Developer","Producer","Consultant","Assistant","Facilitator","Agent","Representative","Strategist"]},u$u=["Aquarius","Pisces","Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn"],n$u={bio_part:OVu,bio_pattern:jVu,bio_supporter:HVu,female_first_name:VVu,female_middle_name:$Vu,female_prefix:_Oe,first_name:KVu,gender:WVu,last_name:GVu,last_name_pattern:UVu,male_first_name:qVu,male_middle_name:JVu,male_prefix:SOe,middle_name:ZVu,name:YVu,prefix:QVu,sex:XVu,suffix:e$u,title:t$u,western_zodiac_sign:u$u},i$u=n$u,r$u=["!##-!##-####","(!##) !##-####","1-!##-!##-####","!##.!##.####","!##-!##-#### x###","(!##) !##-#### x###","1-!##-!##-#### x###","!##.!##.#### x###","!##-!##-#### x####","(!##) !##-#### x####","1-!##-!##-#### x####","!##.!##.#### x####","!##-!##-#### x#####","(!##) !##-#### x#####","1-!##-!##-#### x#####","!##.!##.#### x#####"],a$u={formats:r$u},o$u=a$u,s$u=Object.freeze([{symbol:"H",name:"Hydrogen",atomicNumber:1},{symbol:"He",name:"Helium",atomicNumber:2},{symbol:"Li",name:"Lithium",atomicNumber:3},{symbol:"Be",name:"Beryllium",atomicNumber:4},{symbol:"B",name:"Boron",atomicNumber:5},{symbol:"C",name:"Carbon",atomicNumber:6},{symbol:"N",name:"Nitrogen",atomicNumber:7},{symbol:"O",name:"Oxygen",atomicNumber:8},{symbol:"F",name:"Fluorine",atomicNumber:9},{symbol:"Ne",name:"Neon",atomicNumber:10},{symbol:"Na",name:"Sodium",atomicNumber:11},{symbol:"Mg",name:"Magnesium",atomicNumber:12},{symbol:"Al",name:"Aluminium",atomicNumber:13},{symbol:"Si",name:"Silicon",atomicNumber:14},{symbol:"P",name:"Phosphorus",atomicNumber:15},{symbol:"S",name:"Sulfur",atomicNumber:16},{symbol:"Cl",name:"Chlorine",atomicNumber:17},{symbol:"Ar",name:"Argon",atomicNumber:18},{symbol:"K",name:"Potassium",atomicNumber:19},{symbol:"Ca",name:"Calcium",atomicNumber:20},{symbol:"Sc",name:"Scandium",atomicNumber:21},{symbol:"Ti",name:"Titanium",atomicNumber:22},{symbol:"V",name:"Vanadium",atomicNumber:23},{symbol:"Cr",name:"Chromium",atomicNumber:24},{symbol:"Mn",name:"Manganese",atomicNumber:25},{symbol:"Fe",name:"Iron",atomicNumber:26},{symbol:"Co",name:"Cobalt",atomicNumber:27},{symbol:"Ni",name:"Nickel",atomicNumber:28},{symbol:"Cu",name:"Copper",atomicNumber:29},{symbol:"Zn",name:"Zinc",atomicNumber:30},{symbol:"Ga",name:"Gallium",atomicNumber:31},{symbol:"Ge",name:"Germanium",atomicNumber:32},{symbol:"As",name:"Arsenic",atomicNumber:33},{symbol:"Se",name:"Selenium",atomicNumber:34},{symbol:"Br",name:"Bromine",atomicNumber:35},{symbol:"Kr",name:"Krypton",atomicNumber:36},{symbol:"Rb",name:"Rubidium",atomicNumber:37},{symbol:"Sr",name:"Strontium",atomicNumber:38},{symbol:"Y",name:"Yttrium",atomicNumber:39},{symbol:"Zr",name:"Zirconium",atomicNumber:40},{symbol:"Nb",name:"Niobium",atomicNumber:41},{symbol:"Mo",name:"Molybdenum",atomicNumber:42},{symbol:"Tc",name:"Technetium",atomicNumber:43},{symbol:"Ru",name:"Ruthenium",atomicNumber:44},{symbol:"Rh",name:"Rhodium",atomicNumber:45},{symbol:"Pd",name:"Palladium",atomicNumber:46},{symbol:"Ag",name:"Silver",atomicNumber:47},{symbol:"Cd",name:"Cadmium",atomicNumber:48},{symbol:"In",name:"Indium",atomicNumber:49},{symbol:"Sn",name:"Tin",atomicNumber:50},{symbol:"Sb",name:"Antimony",atomicNumber:51},{symbol:"Te",name:"Tellurium",atomicNumber:52},{symbol:"I",name:"Iodine",atomicNumber:53},{symbol:"Xe",name:"Xenon",atomicNumber:54},{symbol:"Cs",name:"Caesium",atomicNumber:55},{symbol:"Ba",name:"Barium",atomicNumber:56},{symbol:"La",name:"Lanthanum",atomicNumber:57},{symbol:"Ce",name:"Cerium",atomicNumber:58},{symbol:"Pr",name:"Praseodymium",atomicNumber:59},{symbol:"Nd",name:"Neodymium",atomicNumber:60},{symbol:"Pm",name:"Promethium",atomicNumber:61},{symbol:"Sm",name:"Samarium",atomicNumber:62},{symbol:"Eu",name:"Europium",atomicNumber:63},{symbol:"Gd",name:"Gadolinium",atomicNumber:64},{symbol:"Tb",name:"Terbium",atomicNumber:65},{symbol:"Dy",name:"Dysprosium",atomicNumber:66},{symbol:"Ho",name:"Holmium",atomicNumber:67},{symbol:"Er",name:"Erbium",atomicNumber:68},{symbol:"Tm",name:"Thulium",atomicNumber:69},{symbol:"Yb",name:"Ytterbium",atomicNumber:70},{symbol:"Lu",name:"Lutetium",atomicNumber:71},{symbol:"Hf",name:"Hafnium",atomicNumber:72},{symbol:"Ta",name:"Tantalum",atomicNumber:73},{symbol:"W",name:"Tungsten",atomicNumber:74},{symbol:"Re",name:"Rhenium",atomicNumber:75},{symbol:"Os",name:"Osmium",atomicNumber:76},{symbol:"Ir",name:"Iridium",atomicNumber:77},{symbol:"Pt",name:"Platinum",atomicNumber:78},{symbol:"Au",name:"Gold",atomicNumber:79},{symbol:"Hg",name:"Mercury",atomicNumber:80},{symbol:"Tl",name:"Thallium",atomicNumber:81},{symbol:"Pb",name:"Lead",atomicNumber:82},{symbol:"Bi",name:"Bismuth",atomicNumber:83},{symbol:"Po",name:"Polonium",atomicNumber:84},{symbol:"At",name:"Astatine",atomicNumber:85},{symbol:"Rn",name:"Radon",atomicNumber:86},{symbol:"Fr",name:"Francium",atomicNumber:87},{symbol:"Ra",name:"Radium",atomicNumber:88},{symbol:"Ac",name:"Actinium",atomicNumber:89},{symbol:"Th",name:"Thorium",atomicNumber:90},{symbol:"Pa",name:"Protactinium",atomicNumber:91},{symbol:"U",name:"Uranium",atomicNumber:92},{symbol:"Np",name:"Neptunium",atomicNumber:93},{symbol:"Pu",name:"Plutonium",atomicNumber:94},{symbol:"Am",name:"Americium",atomicNumber:95},{symbol:"Cm",name:"Curium",atomicNumber:96},{symbol:"Bk",name:"Berkelium",atomicNumber:97},{symbol:"Cf",name:"Californium",atomicNumber:98},{symbol:"Es",name:"Einsteinium",atomicNumber:99},{symbol:"Fm",name:"Fermium",atomicNumber:100},{symbol:"Md",name:"Mendelevium",atomicNumber:101},{symbol:"No",name:"Nobelium",atomicNumber:102},{symbol:"Lr",name:"Lawrencium",atomicNumber:103},{symbol:"Rf",name:"Rutherfordium",atomicNumber:104},{symbol:"Db",name:"Dubnium",atomicNumber:105},{symbol:"Sg",name:"Seaborgium",atomicNumber:106},{symbol:"Bh",name:"Bohrium",atomicNumber:107},{symbol:"Hs",name:"Hassium",atomicNumber:108},{symbol:"Mt",name:"Meitnerium",atomicNumber:109},{symbol:"Ds",name:"Darmstadtium",atomicNumber:110},{symbol:"Rg",name:"Roentgenium",atomicNumber:111},{symbol:"Cn",name:"Copernicium",atomicNumber:112},{symbol:"Nh",name:"Nihonium",atomicNumber:113},{symbol:"Fl",name:"Flerovium",atomicNumber:114},{symbol:"Mc",name:"Moscovium",atomicNumber:115},{symbol:"Lv",name:"Livermorium",atomicNumber:116},{symbol:"Ts",name:"Tennessine",atomicNumber:117},{symbol:"Og",name:"Oganesson",atomicNumber:118}]),l$u=Object.freeze([{name:"meter",symbol:"m"},{name:"second",symbol:"s"},{name:"mole",symbol:"mol"},{name:"ampere",symbol:"A"},{name:"kelvin",symbol:"K"},{name:"candela",symbol:"cd"},{name:"kilogram",symbol:"kg"},{name:"radian",symbol:"rad"},{name:"hertz",symbol:"Hz"},{name:"newton",symbol:"N"},{name:"pascal",symbol:"Pa"},{name:"joule",symbol:"J"},{name:"watt",symbol:"W"},{name:"coulomb",symbol:"C"},{name:"volt",symbol:"V"},{name:"ohm",symbol:"Ω"},{name:"tesla",symbol:"T"},{name:"degree Celsius",symbol:"°C"},{name:"lumen",symbol:"lm"},{name:"becquerel",symbol:"Bq"},{name:"gray",symbol:"Gy"},{name:"sievert",symbol:"Sv"},{name:"steradian",symbol:"sr"},{name:"farad",symbol:"F"},{name:"siemens",symbol:"S"},{name:"weber",symbol:"Wb"},{name:"henry",symbol:"H"},{name:"lux",symbol:"lx"},{name:"katal",symbol:"kat"}]),c$u={chemicalElement:s$u,unit:l$u},d$u=c$u,h$u=["ants","bats","bears","bees","birds","buffalo","cats","chickens","cattle","dogs","dolphins","ducks","elephants","fishes","foxes","frogs","geese","goats","horses","kangaroos","lions","monkeys","owls","oxen","penguins","people","pigs","rabbits","sheep","tigers","whales","wolves","zebras","banshees","crows","black cats","chimeras","ghosts","conspirators","dragons","dwarves","elves","enchanters","exorcists","sons","foes","giants","gnomes","goblins","gooses","griffins","lycanthropes","nemesis","ogres","oracles","prophets","sorcerors","spiders","spirits","vampires","warlocks","vixens","werewolves","witches","worshipers","zombies","druids"],E$u=["{{location.state}} {{team.creature}}"],m$u={creature:h$u,name:E$u},g$u=m$u,f$u=["Adventure Road Bicycle","BMX Bicycle","City Bicycle","Cruiser Bicycle","Cyclocross Bicycle","Dual-Sport Bicycle","Fitness Bicycle","Flat-Foot Comfort Bicycle","Folding Bicycle","Hybrid Bicycle","Mountain Bicycle","Recumbent Bicycle","Road Bicycle","Tandem Bicycle","Touring Bicycle","Track/Fixed-Gear Bicycle","Triathlon/Time Trial Bicycle","Tricycle"],p$u=["Diesel","Electric","Gasoline","Hybrid"],D$u=["Aston Martin","Audi","Bentley","BMW","Bugatti","Cadillac","Chevrolet","Chrysler","Dodge","Ferrari","Fiat","Ford","Honda","Hyundai","Jaguar","Jeep","Kia","Lamborghini","Land Rover","Maserati","Mazda","Mercedes Benz","Mini","Nissan","Polestar","Porsche","Rolls Royce","Smart","Tesla","Toyota","Volkswagen","Volvo"],x$u=["Fiesta","Focus","Taurus","Mustang","Explorer","Expedition","F-150","Model T","Ranchero","Volt","Cruze","Malibu","Impala","Camaro","Corvette","Colorado","Silverado","El Camino","CTS","XTS","ATS","Escalade","Alpine","Charger","LeBaron","PT Cruiser","Challenger","Durango","Grand Caravan","Wrangler","Grand Cherokee","Roadster","Model S","Model 3","Model X","Model Y","Camry","Prius","Land Cruiser","Accord","Civic","Element","Sentra","Altima","A8","A4","Beetle","Jetta","Golf","911","Spyder","Countach","Mercielago","Aventador","1","2","Fortwo","V90","XC90","CX-9"],v$u=["Cargo Van","Convertible","Coupe","Crew Cab Pickup","Extended Cab Pickup","Hatchback","Minivan","Passenger Van","SUV","Sedan","Wagon"],C$u={bicycle_type:f$u,fuel:p$u,manufacturer:D$u,model:x$u,type:v$u},b$u=C$u,k$u=["abandoned","able","absolute","adorable","adventurous","academic","acceptable","acclaimed","accomplished","accurate","aching","acidic","acrobatic","active","actual","adept","admirable","admired","adolescent","adored","advanced","afraid","affectionate","aged","aggravating","aggressive","agile","agitated","agonizing","agreeable","ajar","alarmed","alarming","alert","alienated","alive","all","altruistic","amazing","ambitious","ample","amused","amusing","anchored","ancient","angelic","angry","anguished","animated","annual","another","antique","anxious","any","apprehensive","appropriate","apt","arctic","arid","aromatic","artistic","ashamed","assured","astonishing","athletic","attached","attentive","attractive","austere","authentic","authorized","automatic","avaricious","average","aware","awesome","awful","awkward","babyish","bad","back","baggy","bare","barren","basic","beautiful","belated","beloved","beneficial","better","best","bewitched","big","big-hearted","biodegradable","bite-sized","bitter","black","black-and-white","bland","blank","blaring","bleak","blind","blissful","blond","blue","blushing","bogus","boiling","bold","bony","boring","bossy","both","bouncy","bountiful","bowed","brave","breakable","brief","bright","brilliant","brisk","broken","bronze","brown","bruised","bubbly","bulky","bumpy","buoyant","burdensome","burly","bustling","busy","buttery","buzzing","calculating","calm","candid","canine","capital","carefree","careful","careless","caring","cautious","cavernous","celebrated","charming","cheap","cheerful","cheery","chief","chilly","chubby","circular","classic","clean","clear","clear-cut","clever","close","closed","cloudy","clueless","clumsy","cluttered","coarse","cold","colorful","colorless","colossal","comfortable","common","compassionate","competent","complete","complex","complicated","composed","concerned","concrete","confused","conscious","considerate","constant","content","conventional","cooked","cool","cooperative","coordinated","corny","corrupt","costly","courageous","courteous","crafty","crazy","creamy","creative","creepy","criminal","crisp","critical","crooked","crowded","cruel","crushing","cuddly","cultivated","cultured","cumbersome","curly","curvy","cute","cylindrical","damaged","damp","dangerous","dapper","daring","darling","dark","dazzling","dead","deadly","deafening","dear","dearest","decent","decimal","decisive","deep","defenseless","defensive","defiant","deficient","definite","definitive","delayed","delectable","delicious","delightful","delirious","demanding","dense","dental","dependable","dependent","descriptive","deserted","detailed","determined","devoted","different","difficult","digital","diligent","dim","dimpled","direct","disastrous","discrete","disgusting","disloyal","dismal","distant","downright","dreary","dirty","disguised","dishonest","distinct","distorted","dizzy","doting","double","drab","drafty","dramatic","droopy","dry","dual","dull","dutiful","each","eager","earnest","early","easy","easy-going","ecstatic","edible","educated","elaborate","elastic","elated","elderly","electric","elegant","elementary","elliptical","embarrassed","embellished","eminent","emotional","empty","enchanted","enchanting","energetic","enlightened","enormous","enraged","entire","envious","equal","equatorial","essential","esteemed","ethical","euphoric","even","evergreen","everlasting","every","evil","exalted","excellent","exemplary","exhausted","excitable","excited","exciting","exotic","expensive","experienced","expert","extraneous","extroverted","extra-large","extra-small","fabulous","failing","faint","fair","faithful","fake","false","familiar","famous","fancy","fantastic","far","faraway","far-flung","far-off","fast","fat","fatal","fatherly","favorable","favorite","fearful","fearless","feisty","feline","female","feminine","few","fickle","filthy","fine","finished","firm","first","firsthand","fitting","fixed","flaky","flamboyant","flashy","flat","flawed","flawless","flickering","flimsy","flippant","flowery","fluffy","fluid","flustered","focused","fond","foolhardy","foolish","forceful","forked","formal","forsaken","forthright","fortunate","fragrant","frail","frank","frayed","free","french","fresh","frequent","friendly","frightened","frightening","frigid","frilly","frizzy","frivolous","front","frosty","frozen","frugal","fruitful","full","fumbling","functional","funny","fussy","fuzzy","gargantuan","gaseous","general","generous","gentle","genuine","giant","giddy","gigantic","gifted","giving","glamorous","glaring","glass","gleaming","gleeful","glistening","glittering","gloomy","glorious","glossy","glum","golden","good","good-natured","gorgeous","graceful","gracious","grand","grandiose","granular","grateful","grave","gray","great","greedy","green","gregarious","grim","grimy","gripping","grizzled","grotesque","grouchy","grounded","growing","growling","grown","grubby","gruesome","grumpy","guilty","gullible","gummy","hairy","half","handmade","handsome","handy","happy","happy-go-lucky","hard","hard-to-find","harmful","harmless","harmonious","harsh","hasty","hateful","haunting","healthy","heartfelt","hearty","heavenly","heavy","hefty","helpful","helpless","hidden","hideous","high","high-level","hilarious","hoarse","hollow","homely","honest","honorable","honored","hopeful","horrible","hospitable","hot","huge","humble","humiliating","humming","humongous","hungry","hurtful","husky","icky","icy","ideal","idealistic","identical","idle","idolized","ignorant","ill","ill-fated","ill-informed","illiterate","illustrious","imaginary","imaginative","immaculate","immaterial","immediate","immense","impassioned","impeccable","impartial","imperfect","imperturbable","impish","impolite","important","impossible","impractical","impressionable","impressive","improbable","impure","inborn","incomparable","incompatible","incomplete","inconsequential","incredible","indelible","inexperienced","indolent","infamous","infantile","infatuated","inferior","infinite","informal","innocent","insecure","insidious","insignificant","insistent","instructive","insubstantial","intelligent","intent","intentional","interesting","internal","international","intrepid","ironclad","irresponsible","irritating","itchy","jaded","jagged","jam-packed","jaunty","jealous","jittery","joint","jolly","jovial","joyful","joyous","jubilant","judicious","juicy","jumbo","junior","jumpy","juvenile","kaleidoscopic","keen","key","kind","kindhearted","kindly","klutzy","knobby","knotty","knowledgeable","knowing","known","kooky","kosher","lanky","large","last","lasting","late","lavish","lawful","lazy","leading","lean","leafy","left","legal","legitimate","light","lighthearted","likable","likely","limited","limp","limping","linear","lined","liquid","little","live","lively","livid","loathsome","lone","lonely","long","long-term","loose","lopsided","lost","loud","lovable","lovely","loving","low","loyal","lucky","lumbering","luminous","lumpy","lustrous","luxurious","mad","made-up","magnificent","majestic","major","male","mammoth","married","marvelous","masculine","massive","mature","meager","mealy","mean","measly","meaty","medical","mediocre","medium","meek","mellow","melodic","memorable","menacing","merry","messy","metallic","mild","milky","mindless","miniature","minor","minty","miserable","miserly","misguided","misty","mixed","modern","modest","moist","monstrous","monthly","monumental","moral","mortified","motherly","motionless","mountainous","muddy","muffled","multicolored","mundane","murky","mushy","musty","muted","mysterious","naive","narrow","natural","naughty","nautical","near","neat","necessary","needy","negative","neglected","negligible","neighboring","nervous","new","next","nice","nifty","nimble","nippy","nocturnal","noisy","nonstop","normal","notable","noted","noteworthy","novel","noxious","numb","nutritious","nutty","obedient","oblong","oily","obvious","occasional","odd","oddball","offbeat","offensive","official","old","old-fashioned","only","open","optimal","optimistic","opulent","orange","orderly","organic","ornate","ornery","ordinary","original","other","our","outlying","outgoing","outlandish","outrageous","outstanding","oval","overcooked","overdue","overjoyed","overlooked","palatable","pale","paltry","parallel","parched","partial","passionate","past","pastel","peaceful","peppery","perfect","perfumed","periodic","perky","personal","pertinent","pesky","pessimistic","petty","phony","physical","piercing","pink","pitiful","plain","plaintive","plastic","playful","pleasant","pleased","pleasing","plump","plush","polished","polite","political","pointed","pointless","poised","poor","popular","portly","posh","positive","possible","potable","powerful","powerless","practical","precious","present","prestigious","pretty","previous","pricey","prickly","primary","prime","pristine","private","prize","probable","productive","profitable","profuse","proper","proud","prudent","punctual","pungent","puny","pure","purple","pushy","putrid","puzzled","puzzling","quaint","qualified","quarrelsome","quarterly","queasy","querulous","questionable","quick","quick-witted","quiet","quintessential","quirky","quixotic","quizzical","radiant","ragged","rapid","rare","rash","raw","recent","reckless","rectangular","ready","real","realistic","reasonable","red","reflecting","regal","regular","reliable","relieved","remarkable","remorseful","remote","repentant","required","respectful","responsible","repulsive","revolving","rewarding","rich","rigid","right","ringed","ripe","roasted","robust","rosy","rotating","rotten","rough","round","rowdy","royal","rubbery","rundown","ruddy","rude","runny","rural","rusty","sad","safe","salty","same","sandy","sane","sarcastic","sardonic","satisfied","scaly","scarce","scared","scary","scented","scholarly","scientific","scornful","scratchy","scrawny","second","secondary","second-hand","secret","self-assured","self-reliant","selfish","sentimental","separate","serene","serious","serpentine","several","severe","shabby","shadowy","shady","shallow","shameful","shameless","sharp","shimmering","shiny","shocked","shocking","shoddy","short","short-term","showy","shrill","shy","sick","silent","silky","silly","silver","similar","simple","simplistic","sinful","single","sizzling","skeletal","skinny","sleepy","slight","slim","slimy","slippery","slow","slushy","small","smart","smoggy","smooth","smug","snappy","snarling","sneaky","sniveling","snoopy","sociable","soft","soggy","solid","somber","some","spherical","sophisticated","sore","sorrowful","soulful","soupy","sour","spanish","sparkling","sparse","specific","spectacular","speedy","spicy","spiffy","spirited","spiteful","splendid","spotless","spotted","spry","square","squeaky","squiggly","stable","staid","stained","stale","standard","starchy","stark","starry","steep","sticky","stiff","stimulating","stingy","stormy","straight","strange","steel","strict","strident","striking","striped","strong","studious","stunning","stupendous","sturdy","stylish","subdued","submissive","substantial","subtle","suburban","sudden","sugary","sunny","super","superb","superficial","superior","supportive","sure-footed","surprised","suspicious","svelte","sweaty","sweet","sweltering","swift","sympathetic","tall","talkative","tame","tan","tangible","tart","tasty","tattered","taut","tedious","teeming","tempting","tender","tense","tepid","terrible","terrific","testy","thankful","that","these","thick","thin","third","thirsty","this","thorough","thorny","those","thoughtful","threadbare","thrifty","thunderous","tidy","tight","timely","tinted","tiny","tired","torn","total","tough","traumatic","treasured","tremendous","tragic","trained","triangular","tricky","trifling","trim","trivial","troubled","true","trusting","trustworthy","trusty","truthful","turbulent","twin","ugly","ultimate","unacceptable","unaware","uncomfortable","uncommon","unconscious","understated","unequaled","uneven","unfinished","unfit","unfolded","unfortunate","unhappy","unhealthy","uniform","unimportant","unique","united","unkempt","unknown","unlawful","unlined","unlucky","unnatural","unpleasant","unrealistic","unripe","unruly","unselfish","unsightly","unsteady","unsung","untidy","untimely","untried","untrue","unused","unusual","unwelcome","unwieldy","unwilling","unwitting","unwritten","upbeat","upright","upset","urban","usable","used","useful","useless","utilized","utter","vacant","vague","vain","valid","valuable","vapid","variable","vast","velvety","venerated","vengeful","verifiable","vibrant","vicious","victorious","vigilant","vigorous","villainous","violet","violent","virtual","virtuous","visible","vital","vivacious","vivid","voluminous","wan","warlike","warm","warmhearted","warped","wary","wasteful","watchful","waterlogged","watery","wavy","wealthy","weak","weary","webbed","wee","weekly","weepy","weighty","weird","welcome","well-documented","well-groomed","well-informed","well-lit","well-made","well-off","well-to-do","well-worn","wet","which","whimsical","whirlwind","whispered","white","whole","whopping","wicked","wide","wide-eyed","wiggly","wild","willing","wilted","winding","windy","winged","wiry","wise","witty","wobbly","woeful","wonderful","wooden","woozy","wordy","worldly","worn","worried","worrisome","worse","worst","worthless","worthwhile","worthy","wrathful","wretched","writhing","wrong","wry","yawning","yearly","yellow","yellowish","young","youthful","yummy","zany","zealous","zesty","zigzag"],F$u=["abnormally","absentmindedly","accidentally","acidly","actually","adventurously","afterwards","almost","always","angrily","annually","anxiously","arrogantly","awkwardly","badly","bashfully","beautifully","bitterly","bleakly","blindly","blissfully","boastfully","boldly","bravely","briefly","brightly","briskly","broadly","busily","calmly","carefully","carelessly","cautiously","certainly","cheerfully","clearly","cleverly","closely","coaxingly","colorfully","commonly","continually","coolly","correctly","courageously","crossly","cruelly","curiously","daily","daintily","dearly","deceivingly","deeply","defiantly","deliberately","delightfully","diligently","dimly","doubtfully","dreamily","easily","elegantly","energetically","enormously","enthusiastically","equally","especially","even","evenly","eventually","exactly","excitedly","extremely","fairly","faithfully","famously","far","fast","fatally","ferociously","fervently","fiercely","fondly","foolishly","fortunately","frankly","frantically","freely","frenetically","frightfully","fully","furiously","generally","generously","gently","gladly","gleefully","gracefully","gratefully","greatly","greedily","happily","hastily","healthily","heavily","helpfully","helplessly","highly","honestly","hopelessly","hourly","hungrily","immediately","innocently","inquisitively","instantly","intensely","intently","interestingly","inwardly","irritably","jaggedly","jealously","joshingly","jovially","joyfully","joyously","jubilantly","judgementally","justly","keenly","kiddingly","kindheartedly","kindly","kissingly","knavishly","knottily","knowingly","knowledgeably","kookily","lazily","less","lightly","likely","limply","lively","loftily","longingly","loosely","loudly","lovingly","loyally","madly","majestically","meaningfully","mechanically","merrily","miserably","mockingly","monthly","more","mortally","mostly","mysteriously","naturally","nearly","neatly","needily","nervously","never","nicely","noisily","not","obediently","obnoxiously","oddly","offensively","officially","often","only","openly","optimistically","overconfidently","owlishly","painfully","partially","patiently","perfectly","physically","playfully","politely","poorly","positively","potentially","powerfully","promptly","properly","punctually","quaintly","quarrelsomely","queasily","questionably","questioningly","quicker","quickly","quietly","quirkily","quizzically","rapidly","rarely","readily","really","reassuringly","recklessly","regularly","reluctantly","repeatedly","reproachfully","restfully","righteously","rightfully","rigidly","roughly","rudely","sadly","safely","scarcely","scarily","searchingly","sedately","seemingly","seldom","selfishly","separately","seriously","shakily","sharply","sheepishly","shrilly","shyly","silently","sleepily","slowly","smoothly","softly","solemnly","solidly","sometimes","soon","speedily","stealthily","sternly","strictly","successfully","suddenly","surprisingly","suspiciously","sweetly","swiftly","sympathetically","tenderly","tensely","terribly","thankfully","thoroughly","thoughtfully","tightly","tomorrow","too","tremendously","triumphantly","truly","truthfully","ultimately","unabashedly","unaccountably","unbearably","unethically","unexpectedly","unfortunately","unimpressively","unnaturally","unnecessarily","upbeat","upliftingly","upright","upside-down","upward","upwardly","urgently","usefully","uselessly","usually","utterly","vacantly","vaguely","vainly","valiantly","vastly","verbally","very","viciously","victoriously","violently","vivaciously","voluntarily","warmly","weakly","wearily","well","wetly","wholly","wildly","willfully","wisely","woefully","wonderfully","worriedly","wrongly","yawningly","yearly","yearningly","yesterday","yieldingly","youthfully"],y$u=["after","although","and","as","because","before","but","consequently","even","finally","for","furthermore","hence","how","however","if","inasmuch","incidentally","indeed","instead","lest","likewise","meanwhile","nor","now","once","or","provided","since","so","supposing","than","that","though","till","unless","until","what","when","whenever","where","whereas","wherever","whether","which","while","who","whoever","whose","why","yet"],A$u=["yuck","oh","phooey","blah","boo","whoa","yowza","huzzah","boohoo","fooey","geez","pfft","ew","ah","yum","brr","hm","yahoo","aha","woot","drat","gah","meh","psst","aw","ugh","yippee","eek","gee","bah","gadzooks","duh","ha","mmm","ouch","phew","ack","uh-huh","gosh","hmph","pish","zowie","er","ick","oof","um"],_$u=["ATM","CD","SUV","TV","aardvark","abacus","abbey","abbreviation","abdomen","ability","abnormality","abolishment","abrogation","absence","abundance","academics","academy","accelerant","accelerator","accent","acceptance","access","accessory","accident","accommodation","accompanist","accomplishment","accord","accordance","accordion","account","accountability","accountant","accounting","accuracy","accusation","acetate","achievement","achiever","acid","acknowledgment","acorn","acoustics","acquaintance","acquisition","acre","acrylic","act","action","activation","activist","activity","actor","actress","acupuncture","ad","adaptation","adapter","addiction","addition","address","adjective","adjustment","admin","administration","administrator","admire","admission","adobe","adoption","adrenalin","adrenaline","adult","adulthood","advance","advancement","advantage","advent","adverb","advertisement","advertising","advice","adviser","advocacy","advocate","affair","affect","affidavit","affiliate","affinity","afoul","afterlife","aftermath","afternoon","aftershave","aftershock","afterthought","age","agency","agenda","agent","aggradation","aggression","aglet","agony","agreement","agriculture","aid","aide","aim","air","airbag","airbus","aircraft","airfare","airfield","airforce","airline","airmail","airman","airplane","airport","airship","airspace","alarm","alb","albatross","album","alcohol","alcove","alder","ale","alert","alfalfa","algebra","algorithm","alias","alibi","alien","allegation","allergist","alley","alliance","alligator","allocation","allowance","alloy","alluvium","almanac","almighty","almond","alpaca","alpenglow","alpenhorn","alpha","alphabet","altar","alteration","alternative","altitude","alto","aluminium","aluminum","amazement","amazon","ambassador","amber","ambience","ambiguity","ambition","ambulance","amendment","amenity","ammunition","amnesty","amount","amusement","anagram","analgesia","analog","analogue","analogy","analysis","analyst","analytics","anarchist","anarchy","anatomy","ancestor","anchovy","android","anesthesiologist","anesthesiology","angel","anger","angina","angle","angora","angstrom","anguish","animal","anime","anise","ankle","anklet","anniversary","announcement","annual","anorak","answer","ant","anteater","antecedent","antechamber","antelope","antennae","anterior","anthropology","antibody","anticipation","anticodon","antigen","antique","antiquity","antler","antling","anxiety","anybody","anyone","anything","anywhere","apartment","ape","aperitif","apology","app","apparatus","apparel","appeal","appearance","appellation","appendix","appetiser","appetite","appetizer","applause","apple","applewood","appliance","application","appointment","appreciation","apprehension","approach","appropriation","approval","apricot","apron","apse","aquarium","aquifer","arcade","arch","arch-rival","archaeologist","archaeology","archeology","archer","architect","architecture","archives","area","arena","argument","arithmetic","ark","arm","arm-rest","armadillo","armament","armchair","armoire","armor","armour","armpit","armrest","army","arrangement","array","arrest","arrival","arrogance","arrow","art","artery","arthur","artichoke","article","artifact","artificer","artist","ascend","ascent","ascot","ash","ashram","ashtray","aside","asparagus","aspect","asphalt","aspic","assassination","assault","assembly","assertion","assessment","asset","assignment","assist","assistance","assistant","associate","association","assumption","assurance","asterisk","astrakhan","astrolabe","astrologer","astrology","astronomy","asymmetry","atelier","atheist","athlete","athletics","atmosphere","atom","atrium","attachment","attack","attacker","attainment","attempt","attendance","attendant","attention","attenuation","attic","attitude","attorney","attraction","attribute","auction","audience","audit","auditorium","aunt","authentication","authenticity","author","authorisation","authority","authorization","auto","autoimmunity","automation","automaton","autumn","availability","avalanche","avenue","average","avocado","award","awareness","awe","axis","azimuth","baboon","babushka","baby","bachelor","back","back-up","backbone","backburn","backdrop","background","backpack","backup","backyard","bacon","bacterium","badge","badger","bafflement","bag","bagel","baggage","baggie","baggy","bagpipe","bail","bait","bake","baker","bakery","bakeware","balaclava","balalaika","balance","balcony","ball","ballet","balloon","balloonist","ballot","ballpark","bamboo","ban","banana","band","bandana","bandanna","bandolier","bandwidth","bangle","banjo","bank","bankbook","banker","banking","bankruptcy","banner","banquette","banyan","baobab","bar","barbecue","barbeque","barber","bargain","barge","baritone","barium","bark","barley","barn","barometer","barracks","barrage","barrel","barrier","barstool","bartender","base","baseball","baseboard","baseline","basement","basics","basil","basin","basis","basket","basketball","bass","bassinet","bassoon","bat","bath","bather","bathhouse","bathrobe","bathroom","bathtub","battalion","batter","battery","batting","battle","battleship","bay","bayou","beach","bead","beak","beam","bean","beancurd","beanie","beanstalk","bear","beard","beast","beastie","beat","beating","beauty","beck","bed","bedrock","bedroom","bee","beech","beef","beet","beetle","beggar","beginner","beginning","begonia","behalf","behavior","behaviour","behest","behold","being","belfry","belief","believer","bell","belligerency","bellows","belly","belt","bench","bend","beneficiary","benefit","beret","berry","best-seller","bestseller","bet","beverage","beyond","bias","bibliography","bicycle","bid","bidder","bidding","bidet","bifocals","bijou","bike","bikini","bill","billboard","billing","billion","bin","binoculars","biology","biopsy","biosphere","biplane","birch","bird","bird-watcher","birdbath","birdcage","birdhouse","birth","birthday","biscuit","bit","bite","bitten","bitter","blackberry","blackbird","blackboard","blackfish","blackness","bladder","blade","blame","blank","blanket","blast","blazer","blend","blessing","blight","blind","blinker","blister","blizzard","block","blocker","blog","blogger","blood","bloodflow","bloom","bloomer","blossom","blouse","blow","blowgun","blowhole","blueberry","blush","boar","board","boat","boatload","boatyard","bob","bobcat","body","bog","bolero","bolt","bond","bonding","bondsman","bone","bonfire","bongo","bonnet","bonsai","bonus","boogeyman","book","bookcase","bookend","booking","booklet","bookmark","boolean","boom","boon","boost","booster","boot","bootie","border","bore","borrower","borrowing","boss","botany","bother","bottle","bottling","bottom","bottom-line","boudoir","bough","boulder","boulevard","boundary","bouquet","bourgeoisie","bout","boutique","bow","bower","bowl","bowler","bowling","bowtie","box","boxer","boxspring","boy","boycott","boyfriend","boyhood","boysenberry","brace","bracelet","bracket","brain","brake","bran","branch","brand","brass","bratwurst","bread","breadcrumb","breadfruit","break","breakdown","breakfast","breakpoint","breakthrough","breastplate","breath","breeze","brewer","bribery","brick","bricklaying","bride","bridge","brief","briefing","briefly","brilliant","brink","brisket","broad","broadcast","broccoli","brochure","brocolli","broiler","broker","bronchitis","bronco","bronze","brooch","brood","brook","broom","brother","brother-in-law","brow","brownie","browser","browsing","brunch","brush","brushfire","brushing","bubble","buck","bucket","buckle","buckwheat","bud","buddy","budget","buffalo","buffer","buffet","bug","buggy","bugle","builder","building","bulb","bulk","bull","bull-fighter","bulldozer","bullet","bump","bumper","bun","bunch","bungalow","bunkhouse","burden","bureau","burglar","burial","burn","burn-out","burning","burrito","burro","burrow","burst","bus","bush","business","businessman","bust","bustle","butane","butcher","butler","butter","butterfly","button","buy","buyer","buying","buzz","buzzard","c-clamp","cabana","cabbage","cabin","cabinet","cable","caboose","cacao","cactus","caddy","cadet","cafe","caffeine","caftan","cage","cake","calcification","calculation","calculator","calculus","calendar","calf","caliber","calibre","calico","call","calm","calorie","camel","cameo","camera","camp","campaign","campaigning","campanile","camper","campus","can","canal","candelabra","candidacy","candidate","candle","candy","cane","cannibal","cannon","canoe","canon","canopy","cantaloupe","canteen","canvas","cap","capability","capacity","cape","caper","capital","capitalism","capitulation","capon","cappelletti","cappuccino","captain","caption","captor","car","carabao","caramel","caravan","carbohydrate","carbon","carboxyl","card","cardboard","cardigan","care","career","cargo","caribou","carload","carnation","carnival","carol","carotene","carp","carpenter","carpet","carpeting","carport","carriage","carrier","carrot","carry","cart","cartel","carter","cartilage","cartload","cartoon","cartridge","carving","cascade","case","casement","cash","cashew","cashier","casino","casket","cassava","casserole","cassock","cast","castanet","castle","casualty","cat","catacomb","catalogue","catalysis","catalyst","catamaran","catastrophe","catch","catcher","category","caterpillar","cathedral","cation","catsup","cattle","cauliflower","causal","cause","causeway","caution","cave","caviar","cayenne","ceiling","celebration","celebrity","celeriac","celery","cell","cellar","cello","celsius","cement","cemetery","cenotaph","census","cent","center","centimeter","centre","centurion","century","cephalopod","ceramic","ceramics","cereal","ceremony","certainty","certificate","certification","cesspool","chafe","chain","chainstay","chair","chairlift","chairman","chairperson","chaise","chalet","chalice","chalk","challenge","chamber","champagne","champion","championship","chance","chandelier","change","channel","chaos","chap","chapel","chaplain","chapter","character","characteristic","characterization","chard","charge","charger","charity","charlatan","charm","charset","chart","charter","chasm","chassis","chastity","chasuble","chateau","chatter","chauffeur","chauvinist","check","checkbook","checking","checkout","checkroom","cheddar","cheek","cheer","cheese","cheesecake","cheetah","chef","chem","chemical","chemistry","chemotaxis","cheque","cherry","chess","chest","chestnut","chick","chicken","chicory","chief","chiffonier","child","childbirth","childhood","chili","chill","chime","chimpanzee","chin","chinchilla","chino","chip","chipmunk","chit-chat","chivalry","chive","chives","chocolate","choice","choir","choker","cholesterol","choosing","chop","chops","chopstick","chopsticks","chord","chorus","chow","chowder","chrome","chromolithograph","chronicle","chronograph","chronometer","chrysalis","chub","chuck","church","churn","chutney","cicada","cigarette","cilantro","cinder","cinema","cinnamon","circadian","circle","circuit","circulation","circumference","circumstance","cirrus","citizen","citizenship","citron","citrus","city","civilian","civilisation","civilization","claim","clam","clamp","clan","clank","clapboard","clarification","clarinet","clarity","clasp","class","classic","classification","classmate","classroom","clause","clave","clavicle","clavier","claw","clay","cleaner","clearance","clearing","cleat","clef","cleft","clergyman","cleric","clerk","click","client","cliff","climate","climb","clinic","clip","clipboard","clipper","cloak","cloakroom","clock","clockwork","clogs","cloister","clone","close","closet","closing","closure","cloth","clothes","clothing","cloud","cloudburst","clove","clover","cloves","club","clue","cluster","clutch","co-producer","coach","coal","coalition","coast","coaster","coat","cob","cobbler","cobweb","cockpit","cockroach","cocktail","cocoa","coconut","cod","code","codepage","codling","codon","coevolution","cofactor","coffee","coffin","cohesion","cohort","coil","coin","coincidence","coinsurance","coke","cold","coleslaw","coliseum","collaboration","collagen","collapse","collar","collard","collateral","colleague","collection","collectivisation","collectivization","collector","college","collision","colloquy","colon","colonial","colonialism","colonisation","colonization","colony","color","colorlessness","colt","column","columnist","comb","combat","combination","combine","comeback","comedy","comestible","comfort","comfortable","comic","comics","comma","command","commander","commandment","comment","commerce","commercial","commission","commitment","committee","commodity","common","commonsense","commotion","communicant","communication","communion","communist","community","commuter","company","comparison","compass","compassion","compassionate","compensation","competence","competition","competitor","complaint","complement","completion","complex","complexity","compliance","complication","complicity","compliment","component","comportment","composer","composite","composition","compost","comprehension","compress","compromise","comptroller","compulsion","computer","comradeship","con","concentrate","concentration","concept","conception","concern","concert","conclusion","concrete","condition","conditioner","condominium","condor","conduct","conductor","cone","confectionery","conference","confidence","confidentiality","configuration","confirmation","conflict","conformation","confusion","conga","congo","congregation","congress","congressman","congressperson","conifer","connection","connotation","conscience","consciousness","consensus","consent","consequence","conservation","conservative","consideration","consignment","consist","consistency","console","consonant","conspiracy","conspirator","constant","constellation","constitution","constraint","construction","consul","consulate","consulting","consumer","consumption","contact","contagion","container","content","contention","contest","context","continent","contingency","continuity","contour","contract","contractor","contrail","contrary","contrast","contribution","contributor","control","controller","controversy","convection","convenience","convention","conversation","conversion","convert","convertible","conviction","cook","cookbook","cookie","cooking","cooperation","coordination","coordinator","cop","cop-out","cope","copper","copy","copying","copyright","copywriter","coral","cord","corduroy","core","cork","cormorant","corn","corner","cornerstone","cornet","cornflakes","cornmeal","corporal","corporation","corporatism","corps","corral","correspondence","correspondent","corridor","corruption","corsage","cosset","cost","costume","cot","cottage","cotton","couch","cougar","cough","council","councilman","councilor","councilperson","counsel","counseling","counselling","counsellor","counselor","count","counter","counter-force","counterpart","countess","country","countryside","county","couple","coupon","courage","course","court","courthouse","courtroom","cousin","covariate","cover","coverage","coverall","cow","cowbell","cowboy","coyote","crab","cradle","craft","craftsman","cranberry","crane","cranky","crate","cravat","craw","crawdad","crayfish","crayon","crazy","cream","creation","creative","creativity","creator","creature","creche","credential","credenza","credibility","credit","creditor","creek","crepe","crest","crew","crewman","crewmate","crewmember","crewmen","cria","crib","cribbage","cricket","cricketer","crime","criminal","crinoline","crisis","crisp","criteria","criterion","critic","criticism","crocodile","crocus","croissant","crook","crop","cross","cross-contamination","cross-stitch","croup","crow","crowd","crown","crude","cruelty","cruise","crumb","crunch","crusader","crush","crust","cry","crystal","crystallography","cub","cube","cuckoo","cucumber","cue","cuff-link","cuisine","cultivar","cultivator","culture","culvert","cummerbund","cup","cupboard","cupcake","cupola","curd","cure","curio","curiosity","curl","curler","currant","currency","current","curriculum","curry","curse","cursor","curtailment","curtain","curve","cushion","custard","custody","custom","customer","cut","cuticle","cutlet","cutover","cutting","cyclamen","cycle","cyclone","cyclooxygenase","cygnet","cylinder","cymbal","cynic","cyst","cytokine","cytoplasm","dad","daddy","daffodil","dagger","dahlia","daikon","daily","dairy","daisy","dam","damage","dame","dance","dancer","dancing","dandelion","danger","dare","dark","darkness","darn","dart","dash","dashboard","data","database","date","daughter","dawn","day","daybed","daylight","dead","deadline","deal","dealer","dealing","dearest","death","deathwatch","debate","debris","debt","debtor","decade","decadence","decency","decimal","decision","decision-making","deck","declaration","declination","decline","decoder","decongestant","decoration","decrease","decryption","dedication","deduce","deduction","deed","deep","deer","default","defeat","defendant","defender","defense","deficit","definition","deformation","degradation","degree","delay","deliberation","delight","delivery","demand","democracy","democrat","demur","den","denim","denominator","density","dentist","deodorant","department","departure","dependency","dependent","deployment","deposit","deposition","depot","depression","depressive","depth","deputy","derby","derivation","derivative","derrick","descendant","descent","description","desert","design","designation","designer","desire","desk","desktop","dessert","destination","destiny","destroyer","destruction","detail","detainee","detainment","detection","detective","detector","detention","determination","detour","devastation","developer","developing","development","developmental","deviance","deviation","device","devil","dew","dhow","diabetes","diadem","diagnosis","diagram","dial","dialect","dialogue","diam","diamond","diaper","diaphragm","diarist","diary","dibble","dickey","dictaphone","dictator","diction","dictionary","die","diesel","diet","difference","differential","difficulty","diffuse","dig","digestion","digestive","digger","digging","digit","dignity","dilapidation","dill","dilution","dime","dimension","dimple","diner","dinghy","dining","dinner","dinosaur","dioxide","dip","diploma","diplomacy","direction","directive","director","directory","dirndl","dirt","disability","disadvantage","disagreement","disappointment","disarmament","disaster","discharge","discipline","disclaimer","disclosure","disco","disconnection","discount","discourse","discovery","discrepancy","discretion","discrimination","discussion","disdain","disease","disembodiment","disengagement","disguise","disgust","dish","dishwasher","disk","disparity","dispatch","displacement","display","disposal","disposer","disposition","dispute","disregard","disruption","dissemination","dissonance","distance","distinction","distortion","distribution","distributor","district","divalent","divan","diver","diversity","divide","dividend","divider","divine","diving","division","divorce","doc","dock","doctor","doctorate","doctrine","document","documentary","documentation","doe","dog","dogsled","dogwood","doing","doll","dollar","dollop","dolman","dolor","dolphin","domain","dome","donation","donkey","donor","donut","door","doorbell","doorknob","doorpost","doorway","dory","dose","dot","double","doubling","doubt","doubter","dough","doughnut","down","downfall","downforce","downgrade","download","downstairs","downtown","downturn","dozen","draft","drag","dragon","dragonfly","dragonfruit","dragster","drain","drainage","drake","drama","dramaturge","drapes","draw","drawbridge","drawer","drawing","dream","dreamer","dredger","dress","dresser","dressing","drill","drink","drinking","drive","driver","driveway","driving","drizzle","dromedary","drop","drudgery","drug","drum","drummer","dryer","duck","duckling","dud","dude","due","duel","dueling","duffel","dugout","dulcimer","dumbwaiter","dump","dune","dungarees","dungeon","duplexer","duration","durian","dusk","dust","duster","duty","dwell","dwelling","dynamics","dynamite","dynamo","dynasty","dysfunction","e-book","e-mail","e-reader","eagle","eaglet","ear","eardrum","earmuffs","earnings","earplug","earring","earrings","earth","earthquake","earthworm","ease","easel","east","eating","eaves","eavesdropper","ecclesia","echidna","eclipse","ecliptic","ecology","economics","economy","ecosystem","ectoderm","ectodermal","ecumenist","eddy","edge","edger","edible","editing","edition","editor","editorial","education","eel","effacement","effect","effective","effectiveness","effector","efficacy","efficiency","effort","egg","egghead","eggnog","eggplant","ego","eicosanoid","ejector","elbow","elderberry","election","electricity","electrocardiogram","electronics","element","elephant","elevation","elevator","eleventh","elf","elicit","eligibility","elimination","elite","elixir","elk","ellipse","elm","elongation","elver","email","emanate","embarrassment","embassy","embellishment","embossing","embryo","emerald","emergence","emergency","emergent","emery","emission","emitter","emotion","emphasis","empire","employ","employee","employer","employment","empowerment","emu","enactment","encirclement","enclave","enclosure","encounter","encouragement","encyclopedia","end","endive","endoderm","endorsement","endothelium","endpoint","enemy","energy","enforcement","engagement","engine","engineer","engineering","enigma","enjoyment","enquiry","enrollment","enterprise","entertainment","enthusiasm","entirety","entity","entrance","entree","entrepreneur","entry","envelope","environment","envy","enzyme","epauliere","epee","ephemera","ephemeris","ephyra","epic","episode","epithelium","epoch","eponym","epoxy","equal","equality","equation","equinox","equipment","equity","equivalent","era","eraser","erosion","error","escalator","escape","espadrille","espalier","essay","essence","essential","establishment","estate","estimate","estrogen","estuary","eternity","ethernet","ethics","ethnicity","ethyl","euphonium","eurocentrism","evaluation","evaluator","evaporation","eve","evening","evening-wear","event","everybody","everyone","everything","eviction","evidence","evil","evocation","evolution","ex-husband","ex-wife","exaggeration","exam","examination","examiner","example","exasperation","excellence","exception","excerpt","excess","exchange","excitement","exclamation","excursion","excuse","execution","executive","executor","exercise","exhaust","exhaustion","exhibit","exhibition","exile","existence","exit","exocrine","expansion","expansionism","expectancy","expectation","expedition","expense","experience","experiment","experimentation","expert","expertise","explanation","exploration","explorer","export","expose","exposition","exposure","expression","extension","extent","exterior","external","extinction","extreme","extremist","eye","eyeball","eyebrow","eyebrows","eyeglasses","eyelash","eyelashes","eyelid","eyelids","eyeliner","eyestrain","eyrie","fabric","face","facelift","facet","facility","facsimile","fact","factor","factory","faculty","fahrenheit","fail","failure","fairness","fairy","faith","faithful","fall","fallacy","falling-out","fame","familiar","familiarity","family","fan","fang","fanlight","fanny-pack","fantasy","farm","farmer","farming","farmland","farrow","fascia","fashion","fat","fate","father","father-in-law","fatigue","fatigues","faucet","fault","fav","fava","favor","favorite","fawn","fax","fear","feast","feather","feature","fedelini","federation","fedora","fee","feed","feedback","feeding","feel","feeling","fellow","felony","female","fen","fence","fencing","fender","feng","fennel","ferret","ferry","ferryboat","fertilizer","festival","fetus","few","fiber","fiberglass","fibre","fibroblast","fibrosis","ficlet","fiction","fiddle","field","fiery","fiesta","fifth","fig","fight","fighter","figure","figurine","file","filing","fill","fillet","filly","film","filter","filth","final","finance","financing","finding","fine","finer","finger","fingerling","fingernail","finish","finisher","fir","fire","fireman","fireplace","firewall","firm","first","fish","fishbone","fisherman","fishery","fishing","fishmonger","fishnet","fit","fitness","fix","fixture","flag","flair","flame","flan","flanker","flare","flash","flat","flatboat","flavor","flax","fleck","fledgling","fleece","flesh","flexibility","flick","flicker","flight","flint","flintlock","flip-flops","flock","flood","floodplain","floor","floozie","flour","flow","flower","flu","flugelhorn","fluke","flume","flung","flute","fly","flytrap","foal","foam","fob","focus","fog","fold","folder","folk","folklore","follower","following","fondue","font","food","foodstuffs","fool","foot","footage","football","footnote","footprint","footrest","footstep","footstool","footwear","forage","forager","foray","force","ford","forearm","forebear","forecast","forehead","foreigner","forelimb","forest","forestry","forever","forgery","fork","form","formal","formamide","format","formation","former","formicarium","formula","fort","forte","fortnight","fortress","fortune","forum","foundation","founder","founding","fountain","fourths","fowl","fox","foxglove","fraction","fragrance","frame","framework","fratricide","fraud","fraudster","freak","freckle","freedom","freelance","freezer","freezing","freight","freighter","frenzy","freon","frequency","fresco","friction","fridge","friend","friendship","fries","frigate","fright","fringe","fritter","frock","frog","front","frontier","frost","frosting","frown","fruit","frustration","fry","fuel","fugato","fulfillment","full","fun","function","functionality","fund","funding","fundraising","fur","furnace","furniture","fusarium","futon","future","gadget","gaffe","gaffer","gain","gaiters","gale","gall-bladder","gallery","galley","gallon","galoshes","gambling","game","gamebird","gaming","gamma-ray","gander","gang","gap","garage","garb","garbage","garden","garlic","garment","garter","gas","gasket","gasoline","gasp","gastronomy","gastropod","gate","gateway","gather","gathering","gator","gauge","gauntlet","gavel","gazebo","gazelle","gear","gearshift","geek","gel","gelatin","gelding","gem","gemsbok","gender","gene","general","generation","generator","generosity","genetics","genie","genius","genre","gentleman","geography","geology","geometry","geranium","gerbil","gesture","geyser","gherkin","ghost","giant","gift","gig","gigantism","giggle","ginger","gingerbread","ginseng","giraffe","girdle","girl","girlfriend","glacier","gladiolus","glance","gland","glass","glasses","glee","glen","glider","gliding","glimpse","globe","glockenspiel","gloom","glory","glove","glow","glucose","glue","glut","glutamate","gnat","gnu","go-kart","goal","goat","gobbler","god","goddess","godfather","godmother","godparent","goggles","going","gold","goldfish","golf","gondola","gong","good","good-bye","goodbye","goodie","goodness","goodnight","goodwill","goose","gopher","gorilla","gosling","gossip","governance","government","governor","gown","grab-bag","grace","grade","gradient","graduate","graduation","graffiti","graft","grain","gram","grammar","gran","grand","grandchild","granddaughter","grandfather","grandma","grandmom","grandmother","grandpa","grandparent","grandson","granny","granola","grant","grape","grapefruit","graph","graphic","grasp","grass","grasshopper","grassland","gratitude","gravel","gravitas","gravity","gravy","gray","grease","great-grandfather","great-grandmother","greatness","greed","green","greenhouse","greens","grenade","grey","grid","grief","grill","grin","grip","gripper","grit","grocery","ground","group","grouper","grouse","grove","growth","grub","guacamole","guarantee","guard","guava","guerrilla","guess","guest","guestbook","guidance","guide","guideline","guilder","guilt","guilty","guinea","guitar","guitarist","gum","gumshoe","gun","gunpowder","gutter","guy","gym","gymnast","gymnastics","gynaecology","gyro","habit","habitat","hacienda","hacksaw","hackwork","hail","hair","haircut","hake","half","half-brother","half-sister","halibut","hall","halloween","hallway","halt","ham","hamburger","hammer","hammock","hamster","hand","hand-holding","handball","handful","handgun","handicap","handle","handlebar","handmaiden","handover","handrail","handsaw","hanger","happening","happiness","harald","harbor","harbour","hard-hat","hardboard","hardcover","hardening","hardhat","hardship","hardware","hare","harm","harmonica","harmonise","harmonize","harmony","harp","harpooner","harpsichord","harvest","harvester","hash","hashtag","hassock","haste","hat","hatbox","hatchet","hatchling","hate","hatred","haunt","haven","haversack","havoc","hawk","hay","haze","hazel","hazelnut","head","headache","headlight","headline","headphones","headquarters","headrest","health","health-care","hearing","hearsay","heart","heart-throb","heartache","heartbeat","hearth","hearthside","heartwood","heat","heater","heating","heaven","heavy","hectare","hedge","hedgehog","heel","heifer","height","heir","heirloom","helicopter","helium","hellcat","hello","helmet","helo","help","hemisphere","hemp","hen","hepatitis","herb","herbs","heritage","hermit","hero","heroine","heron","herring","hesitation","hexagon","heyday","hiccups","hide","hierarchy","high","high-rise","highland","highlight","highway","hike","hiking","hill","hint","hip","hippodrome","hippopotamus","hire","hiring","historian","history","hit","hive","hobbit","hobby","hockey","hog","hold","holder","hole","holiday","home","homeland","homeownership","hometown","homework","homogenate","homonym","honesty","honey","honeybee","honeydew","honor","honoree","hood","hoof","hook","hop","hope","hops","horde","horizon","hormone","horn","hornet","horror","horse","horseradish","horst","hose","hosiery","hospice","hospital","hospitalisation","hospitality","hospitalization","host","hostel","hostess","hotdog","hotel","hound","hour","hourglass","house","houseboat","household","housewife","housework","housing","hovel","hovercraft","howard","howitzer","hub","hubcap","hubris","hug","hugger","hull","human","humanity","humidity","hummus","humor","humour","hundred","hunger","hunt","hunter","hunting","hurdle","hurdler","hurricane","hurry","hurt","husband","hut","hutch","hyacinth","hybridisation","hybridization","hydrant","hydraulics","hydrocarb","hydrocarbon","hydrofoil","hydrogen","hydrolyse","hydrolysis","hydrolyze","hydroxyl","hyena","hygienic","hype","hyphenation","hypochondria","hypothermia","hypothesis","ice","ice-cream","iceberg","icebreaker","icecream","icicle","icing","icon","icy","id","idea","ideal","identification","identity","ideology","idiom","igloo","ignorance","ignorant","ikebana","illiteracy","illness","illusion","illustration","image","imagination","imbalance","imitation","immigrant","immigration","immortal","impact","impairment","impala","impediment","implement","implementation","implication","import","importance","impostor","impress","impression","imprisonment","impropriety","improvement","impudence","impulse","in-joke","in-laws","inability","inauguration","inbox","incandescence","incarnation","incense","incentive","inch","incidence","incident","incision","inclusion","income","incompetence","inconvenience","increase","incubation","independence","independent","index","indication","indicator","indigence","individual","industrialisation","industrialization","industry","inequality","inevitable","infancy","infant","infarction","infection","infiltration","infinite","infix","inflammation","inflation","influence","influx","info","information","infrastructure","infusion","inglenook","ingrate","ingredient","inhabitant","inheritance","inhibition","inhibitor","initial","initialise","initialize","initiative","injunction","injury","injustice","ink","inlay","inn","innervation","innocence","innocent","innovation","input","inquiry","inscription","insect","insectarium","insert","inside","insight","insolence","insomnia","inspection","inspector","inspiration","installation","instance","instant","instinct","institute","institution","instruction","instructor","instrument","instrumentalist","instrumentation","insulation","insurance","insurgence","insurrection","integer","integral","integration","integrity","intellect","intelligence","intensity","intent","intention","intentionality","interaction","interchange","interconnection","interest","interface","interferometer","interior","interject","interloper","internet","interpretation","interpreter","interval","intervenor","intervention","interview","interviewer","intestine","introduction","intuition","invader","invasion","invention","inventor","inventory","inverse","inversion","investigation","investigator","investment","investor","invitation","invite","invoice","involvement","iridescence","iris","iron","ironclad","irony","irrigation","ischemia","island","isogloss","isolation","issue","item","itinerary","ivory","jack","jackal","jacket","jackfruit","jade","jaguar","jail","jailhouse","jalapeño","jam","jar","jasmine","jaw","jazz","jealousy","jeans","jeep","jelly","jellybeans","jellyfish","jet","jewel","jeweller","jewellery","jewelry","jicama","jiffy","job","jockey","jodhpurs","joey","jogging","joint","joke","jot","journal","journalism","journalist","journey","joy","judge","judgment","judo","jug","juggernaut","juice","julienne","jumbo","jump","jumper","jumpsuit","jungle","junior","junk","junker","junket","jury","justice","justification","jute","kale","kangaroo","karate","kayak","kazoo","kebab","keep","keeper","kendo","kennel","ketch","ketchup","kettle","kettledrum","key","keyboard","keyboarding","keystone","kick","kick-off","kid","kidney","kielbasa","kill","killer","killing","kilogram","kilometer","kilt","kimono","kinase","kind","kindness","king","kingdom","kingfish","kiosk","kiss","kit","kitchen","kite","kitsch","kitten","kitty","kiwi","knee","kneejerk","knickers","knife","knife-edge","knight","knitting","knock","knot","know-how","knowledge","knuckle","koala","kohlrabi","lab","label","labor","laboratory","laborer","labour","labourer","lace","lack","lacquerware","lad","ladder","ladle","lady","ladybug","lag","lake","lamb","lambkin","lament","lamp","lanai","land","landform","landing","landmine","landscape","lane","language","lantern","lap","laparoscope","lapdog","laptop","larch","lard","larder","lark","larva","laryngitis","lasagna","lashes","last","latency","latex","lathe","latitude","latte","latter","laugh","laughter","laundry","lava","law","lawmaker","lawn","lawsuit","lawyer","lay","layer","layout","lead","leader","leadership","leading","leaf","league","leaker","leap","learning","leash","leather","leave","leaver","lecture","leek","leeway","left","leg","legacy","legal","legend","legging","legislation","legislator","legislature","legitimacy","legume","leisure","lemon","lemonade","lemur","lender","lending","length","lens","lentil","leopard","leprosy","leptocephalus","lesson","letter","lettuce","level","lever","leverage","leveret","liability","liar","liberty","library","licence","license","licensing","licorice","lid","lie","lieu","lieutenant","life","lifestyle","lifetime","lift","ligand","light","lighting","lightning","lightscreen","ligula","likelihood","likeness","lilac","lily","limb","lime","limestone","limit","limitation","limo","line","linen","liner","linguist","linguistics","lining","link","linkage","linseed","lion","lip","lipid","lipoprotein","lipstick","liquid","liquidity","liquor","list","listening","listing","literate","literature","litigation","litmus","litter","littleneck","liver","livestock","living","lizard","llama","load","loading","loaf","loafer","loan","lobby","lobotomy","lobster","local","locality","location","lock","locker","locket","locomotive","locust","lode","loft","log","loggia","logic","login","logistics","logo","loincloth","lollipop","loneliness","longboat","longitude","look","lookout","loop","loophole","loquat","lord","loss","lot","lotion","lottery","lounge","louse","lout","love","lover","lox","loyalty","luck","luggage","lumber","lumberman","lunch","luncheonette","lunchmeat","lunchroom","lung","lunge","lute","luxury","lychee","lycra","lye","lymphocyte","lynx","lyocell","lyre","lyrics","lysine","mRNA","macadamia","macaroni","macaroon","macaw","machine","machinery","macrame","macro","macrofauna","madam","maelstrom","maestro","magazine","maggot","magic","magnet","magnitude","maid","maiden","mail","mailbox","mailer","mailing","mailman","main","mainland","mainstream","maintainer","maintenance","maize","major","major-league","majority","makeover","maker","makeup","making","male","malice","mall","mallard","mallet","malnutrition","mama","mambo","mammoth","man","manacle","management","manager","manatee","mandarin","mandate","mandolin","mangle","mango","mangrove","manhunt","maniac","manicure","manifestation","manipulation","mankind","manner","manor","mansard","manservant","mansion","mantel","mantle","mantua","manufacturer","manufacturing","many","map","maple","mapping","maracas","marathon","marble","march","mare","margarine","margin","mariachi","marimba","marines","marionberry","mark","marker","market","marketer","marketing","marketplace","marksman","markup","marmalade","marriage","marsh","marshland","marshmallow","marten","marxism","mascara","mask","masonry","mass","massage","mast","masterpiece","mastication","mastoid","mat","match","matchmaker","mate","material","maternity","math","mathematics","matrix","matter","mattock","mattress","max","maximum","maybe","mayonnaise","mayor","meadow","meal","mean","meander","meaning","means","meantime","measles","measure","measurement","meat","meatball","meatloaf","mecca","mechanic","mechanism","med","medal","media","median","medication","medicine","medium","meet","meeting","melatonin","melody","melon","member","membership","membrane","meme","memo","memorial","memory","men","menopause","menorah","mention","mentor","menu","merchandise","merchant","mercury","meridian","meringue","merit","mesenchyme","mess","message","messenger","messy","metabolite","metal","metallurgist","metaphor","meteor","meteorology","meter","methane","method","methodology","metric","metro","metronome","mezzanine","microlending","micronutrient","microphone","microwave","mid-course","midden","middle","middleman","midline","midnight","midwife","might","migrant","migration","mile","mileage","milepost","milestone","military","milk","milkshake","mill","millennium","millet","millimeter","million","millisecond","millstone","mime","mimosa","min","mincemeat","mind","mine","mineral","mineshaft","mini","mini-skirt","minibus","minimalism","minimum","mining","minion","minister","mink","minnow","minor","minor-league","minority","mint","minute","miracle","mirror","miscommunication","misfit","misnomer","misplacement","misreading","misrepresentation","miss","missile","mission","mist","mistake","mister","misunderstand","miter","mitten","mix","mixer","mixture","moai","moat","mob","mobile","mobility","mobster","moccasins","mocha","mochi","mode","model","modeling","modem","modernist","modernity","modification","molar","molasses","molding","mole","molecule","mom","moment","monastery","monasticism","money","monger","monitor","monitoring","monk","monkey","monocle","monopoly","monotheism","monsoon","monster","month","monument","mood","moody","moon","moonlight","moonscape","moose","mop","morale","morbid","morbidity","morning","morphology","morsel","mortal","mortality","mortgage","mortise","mosque","mosquito","most","motel","moth","mother","mother-in-law","motion","motivation","motive","motor","motorboat","motorcar","motorcycle","mound","mountain","mouse","mouser","mousse","moustache","mouth","mouton","movement","mover","movie","mower","mozzarella","mud","muffin","mug","mukluk","mule","multimedia","muscat","muscatel","muscle","musculature","museum","mushroom","music","music-box","music-making","musician","muskrat","mussel","mustache","mustard","mutation","mutt","mutton","mycoplasma","mystery","myth","mythology","nail","name","naming","nanoparticle","napkin","narrative","nasal","nation","nationality","native","naturalisation","nature","navigation","necessity","neck","necklace","necktie","nectar","nectarine","need","needle","neglect","negligee","negotiation","neighbor","neighborhood","neighbour","neighbourhood","neologism","neon","neonate","nephew","nerve","nest","nestling","nestmate","net","netball","netbook","netsuke","network","networking","neurobiologist","neuron","neuropathologist","neuropsychiatry","news","newsletter","newspaper","newsprint","newsstand","nexus","nibble","nicety","niche","nick","nickel","nickname","niece","night","nightclub","nightgown","nightingale","nightlife","nightlight","nightmare","ninja","nit","nitrogen","nobody","nod","node","noir","noise","nonbeliever","nonconformist","nondisclosure","nonsense","noodle","noodles","noon","norm","normal","normalisation","normalization","north","nose","notation","note","notebook","notepad","nothing","notice","notion","notoriety","nougat","noun","nourishment","novel","nucleotidase","nucleotide","nudge","nuke","number","numeracy","numeric","numismatist","nun","nurse","nursery","nursing","nurture","nut","nutmeg","nutrient","nutrition","nylon","oak","oar","oasis","oat","oatmeal","oats","obedience","obesity","obi","object","objection","objective","obligation","oboe","observation","observatory","obsession","obsidian","obstacle","occasion","occupation","occurrence","ocean","ocelot","octagon","octave","octavo","octet","octopus","odometer","odyssey","oeuvre","off-ramp","offence","offense","offer","offering","office","officer","official","offset","oil","okra","oldie","oleo","olive","omega","omelet","omission","omnivore","oncology","onion","online","onset","opening","opera","operating","operation","operator","ophthalmologist","opinion","opossum","opponent","opportunist","opportunity","opposite","opposition","optimal","optimisation","optimist","optimization","option","orange","orangutan","orator","orchard","orchestra","orchid","order","ordinary","ordination","ore","oregano","organ","organisation","organising","organization","organizing","orient","orientation","origin","original","originality","ornament","osmosis","osprey","ostrich","other","otter","ottoman","ounce","outback","outcome","outfielder","outfit","outhouse","outlaw","outlay","outlet","outline","outlook","output","outrage","outrigger","outrun","outset","outside","oval","ovary","oven","overcharge","overclocking","overcoat","overexertion","overflight","overhead","overheard","overload","overnighter","overshoot","oversight","overview","overweight","owl","owner","ownership","ox","oxford","oxygen","oyster","ozone","pace","pacemaker","pack","package","packaging","packet","pad","paddle","paddock","pagan","page","pagoda","pail","pain","paint","painter","painting","paintwork","pair","pajamas","palace","palate","palm","pamphlet","pan","pancake","pancreas","panda","panel","panic","pannier","panpipe","panther","pantologist","pantology","pantry","pants","pantsuit","pantyhose","papa","papaya","paper","paperback","paperwork","parable","parachute","parade","paradise","paragraph","parallelogram","paramecium","paramedic","parameter","paranoia","parcel","parchment","pard","pardon","parent","parenthesis","parenting","park","parka","parking","parliament","parole","parrot","parser","parsley","parsnip","part","participant","participation","particle","particular","partner","partnership","partridge","party","pass","passage","passbook","passenger","passing","passion","passive","passport","password","past","pasta","paste","pastor","pastoralist","pastry","pasture","pat","patch","pate","patent","patentee","path","pathogenesis","pathology","pathway","patience","patient","patina","patio","patriarch","patrimony","patriot","patrol","patroller","patrolling","patron","pattern","patty","pattypan","pause","pavement","pavilion","paw","pawnshop","pay","payee","payment","payoff","pea","peace","peach","peacoat","peacock","peak","peanut","pear","pearl","peasant","pecan","pedal","peek","peen","peer","peer-to-peer","pegboard","pelican","pelt","pen","penalty","pence","pencil","pendant","pendulum","penguin","penicillin","peninsula","pennant","penny","pension","pentagon","peony","people","pepper","pepperoni","percent","percentage","perception","perch","perennial","perfection","performance","perfume","period","periodical","peripheral","permafrost","permission","permit","perp","perpendicular","persimmon","person","personal","personality","personnel","perspective","pest","pet","petal","petition","petitioner","petticoat","pew","pharmacist","pharmacopoeia","phase","pheasant","phenomenon","phenotype","pheromone","philanthropy","philosopher","philosophy","phone","phosphate","photo","photodiode","photograph","photographer","photography","photoreceptor","phrase","phrasing","physical","physics","physiology","pianist","piano","piccolo","pick","pickax","pickaxe","picket","pickle","pickup","picnic","picture","picturesque","pie","piece","pier","piety","pig","pigeon","piglet","pigpen","pigsty","pike","pilaf","pile","pilgrim","pilgrimage","pill","pillar","pillbox","pillow","pilot","pimple","pin","pinafore","pince-nez","pine","pineapple","pinecone","ping","pinkie","pinot","pinstripe","pint","pinto","pinworm","pioneer","pipe","pipeline","piracy","pirate","pit","pita","pitch","pitcher","pitching","pith","pizza","place","placebo","placement","placode","plagiarism","plain","plaintiff","plan","plane","planet","planning","plant","plantation","planter","planula","plaster","plasterboard","plastic","plate","platelet","platform","platinum","platter","platypus","play","player","playground","playroom","playwright","plea","pleasure","pleat","pledge","plenty","plier","pliers","plight","plot","plough","plover","plow","plowman","plug","plugin","plum","plumber","plume","plunger","plywood","pneumonia","pocket","pocket-watch","pocketbook","pod","podcast","poem","poet","poetry","poignance","point","poison","poisoning","poker","polarisation","polarization","pole","polenta","police","policeman","policy","polish","politician","politics","poll","polliwog","pollutant","pollution","polo","polyester","polyp","pomegranate","pomelo","pompom","poncho","pond","pony","pool","poor","pop","popcorn","poppy","popsicle","popularity","population","populist","porcelain","porch","porcupine","pork","porpoise","port","porter","portfolio","porthole","portion","portrait","position","possession","possibility","possible","post","postage","postbox","poster","posterior","postfix","pot","potato","potential","pottery","potty","pouch","poultry","pound","pounding","poverty","powder","power","practice","practitioner","prairie","praise","pray","prayer","precedence","precedent","precipitation","precision","predecessor","preface","preference","prefix","pregnancy","prejudice","prelude","premeditation","premier","premise","premium","preoccupation","preparation","prescription","presence","present","presentation","preservation","preserves","presidency","president","press","pressroom","pressure","pressurisation","pressurization","prestige","presume","pretzel","prevalence","prevention","prey","price","pricing","pride","priest","priesthood","primary","primate","prince","princess","principal","principle","print","printer","printing","prior","priority","prison","prisoner","privacy","private","privilege","prize","prizefight","probability","probation","probe","problem","procedure","proceedings","process","processing","processor","proctor","procurement","produce","producer","product","production","productivity","profession","professional","professor","profile","profit","progenitor","program","programme","programming","progress","progression","prohibition","project","proliferation","promenade","promise","promotion","prompt","pronoun","pronunciation","proof","proof-reader","propane","property","prophet","proponent","proportion","proposal","proposition","proprietor","prose","prosecution","prosecutor","prospect","prosperity","prostacyclin","prostanoid","prostrate","protection","protein","protest","protocol","providence","provider","province","provision","prow","proximal","proximity","prune","pruner","pseudocode","pseudoscience","psychiatrist","psychoanalyst","psychologist","psychology","ptarmigan","pub","public","publication","publicity","publisher","publishing","pudding","puddle","puffin","pug","puggle","pulley","pulse","puma","pump","pumpernickel","pumpkin","pumpkinseed","pun","punch","punctuation","punishment","pup","pupa","pupil","puppet","puppy","purchase","puritan","purity","purpose","purr","purse","pursuit","push","pusher","put","puzzle","pyramid","pyridine","quadrant","quail","qualification","quality","quantity","quart","quarter","quartet","quartz","queen","query","quest","question","questioner","questionnaire","quiche","quicksand","quiet","quill","quilt","quince","quinoa","quit","quiver","quota","quotation","quote","rabbi","rabbit","raccoon","race","racer","racing","rack","radar","radiator","radio","radiosonde","radish","raffle","raft","rag","rage","raid","rail","railing","railroad","railway","raiment","rain","rainbow","raincoat","rainmaker","rainstorm","rainy","raise","raisin","rake","rally","ram","rambler","ramen","ramie","ranch","rancher","randomisation","randomization","range","ranger","rank","rap","raspberry","rat","rate","ratepayer","rating","ratio","rationale","rations","raven","ravioli","rawhide","ray","rayon","razor","reach","reactant","reaction","read","reader","readiness","reading","real","reality","realization","realm","reamer","rear","reason","reasoning","rebel","rebellion","reboot","recall","recapitulation","receipt","receiver","reception","receptor","recess","recession","recipe","recipient","reciprocity","reclamation","recliner","recognition","recollection","recommendation","reconsideration","record","recorder","recording","recovery","recreation","recruit","rectangle","redesign","redhead","redirect","rediscovery","reduction","reef","refectory","reference","referendum","reflection","reform","refreshments","refrigerator","refuge","refund","refusal","refuse","regard","regime","region","regionalism","register","registration","registry","regret","regulation","regulator","rehospitalisation","rehospitalization","reindeer","reinscription","reject","relation","relationship","relative","relaxation","relay","release","reliability","relief","religion","relish","reluctance","remains","remark","reminder","remnant","remote","removal","renaissance","rent","reorganisation","reorganization","repair","reparation","repayment","repeat","replacement","replica","replication","reply","report","reporter","reporting","repository","representation","representative","reprocessing","republic","republican","reputation","request","requirement","resale","rescue","research","researcher","resemblance","reservation","reserve","reservoir","reset","residence","resident","residue","resist","resistance","resolution","resolve","resort","resource","respect","respite","response","responsibility","rest","restaurant","restoration","restriction","restroom","restructuring","result","resume","retailer","retention","rethinking","retina","retirement","retouching","retreat","retrospect","retrospective","retrospectivity","return","reunion","revascularisation","revascularization","reveal","revelation","revenant","revenge","revenue","reversal","reverse","review","revitalisation","revitalization","revival","revolution","revolver","reward","rhetoric","rheumatism","rhinoceros","rhubarb","rhyme","rhythm","rib","ribbon","rice","riddle","ride","rider","ridge","riding","rifle","right","rim","ring","ringworm","riot","rip","ripple","rise","riser","risk","rite","ritual","river","riverbed","rivulet","road","roadway","roar","roast","robe","robin","robot","robotics","rock","rocker","rocket","rocket-ship","rod","role","roll","roller","romaine","romance","roof","room","roommate","rooster","root","rope","rose","rosemary","roster","rostrum","rotation","round","roundabout","route","router","routine","row","rowboat","rowing","rubber","rubbish","rubric","ruby","ruckus","rudiment","ruffle","rug","rugby","ruin","rule","ruler","ruling","rumor","run","runaway","runner","running","runway","rush","rust","rutabaga","rye","sabre","sack","saddle","sadness","safari","safe","safeguard","safety","saffron","sage","sail","sailboat","sailing","sailor","saint","sake","salad","salami","salary","sale","salesman","salmon","salon","saloon","salsa","salt","salute","samovar","sampan","sample","samurai","sanction","sanctity","sanctuary","sand","sandal","sandbar","sandpaper","sandwich","sanity","sardine","sari","sarong","sash","satellite","satin","satire","satisfaction","sauce","saucer","sauerkraut","sausage","savage","savannah","saving","savings","savior","saviour","savory","saw","saxophone","scaffold","scale","scallion","scallops","scalp","scam","scanner","scarecrow","scarf","scarification","scenario","scene","scenery","scent","schedule","scheduling","schema","scheme","schnitzel","scholar","scholarship","school","schoolhouse","schooner","science","scientist","scimitar","scissors","scooter","scope","score","scorn","scorpion","scotch","scout","scow","scrambled","scrap","scraper","scratch","screamer","screen","screening","screenwriting","screw","screw-up","screwdriver","scrim","scrip","script","scripture","scrutiny","sculpting","sculptural","sculpture","sea","seabass","seafood","seagull","seal","seaplane","search","seashore","seaside","season","seat","seaweed","second","secrecy","secret","secretariat","secretary","secretion","section","sectional","sector","security","sediment","seed","seeder","seeker","seep","segment","seizure","selection","self","self-confidence","self-control","self-esteem","seller","selling","semantics","semester","semicircle","semicolon","semiconductor","seminar","senate","senator","sender","senior","sense","sensibility","sensitive","sensitivity","sensor","sentence","sentencing","sentiment","sepal","separation","septicaemia","sequel","sequence","serial","series","sermon","serum","serval","servant","server","service","servitude","sesame","session","set","setback","setting","settlement","settler","severity","sewer","shack","shackle","shade","shadow","shadowbox","shakedown","shaker","shallot","shallows","shame","shampoo","shanty","shape","share","shareholder","shark","shaw","shawl","shear","shearling","sheath","shed","sheep","sheet","shelf","shell","shelter","sherbet","sherry","shield","shift","shin","shine","shingle","ship","shipper","shipping","shipyard","shirt","shirtdress","shoat","shock","shoe","shoe-horn","shoehorn","shoelace","shoemaker","shoes","shoestring","shofar","shoot","shootdown","shop","shopper","shopping","shore","shoreline","short","shortage","shorts","shortwave","shot","shoulder","shout","shovel","show","show-stopper","shower","shred","shrimp","shrine","shutdown","sibling","sick","sickness","side","sideboard","sideburns","sidecar","sidestream","sidewalk","siding","siege","sigh","sight","sightseeing","sign","signal","signature","signet","significance","signify","signup","silence","silica","silicon","silk","silkworm","sill","silly","silo","silver","similarity","simple","simplicity","simplification","simvastatin","sin","singer","singing","singular","sink","sinuosity","sip","sir","sister","sister-in-law","sitar","site","situation","size","skate","skating","skean","skeleton","ski","skiing","skill","skin","skirt","skull","skullcap","skullduggery","skunk","sky","skylight","skyline","skyscraper","skywalk","slang","slapstick","slash","slate","slaw","sled","sledge","sleep","sleepiness","sleeping","sleet","sleuth","slice","slide","slider","slime","slip","slipper","slippers","slope","slot","sloth","slump","smell","smelting","smile","smith","smock","smog","smoke","smoking","smolt","smuggling","snack","snail","snake","snakebite","snap","snarl","sneaker","sneakers","sneeze","sniffle","snob","snorer","snow","snowboarding","snowflake","snowman","snowmobiling","snowplow","snowstorm","snowsuit","snuck","snug","snuggle","soap","soccer","socialism","socialist","society","sociology","sock","socks","soda","sofa","softball","softdrink","softening","software","soil","soldier","sole","solicitation","solicitor","solidarity","solidity","soliloquy","solitaire","solution","solvency","sombrero","somebody","someone","someplace","somersault","something","somewhere","son","sonar","sonata","song","songbird","sonnet","soot","sophomore","soprano","sorbet","sorghum","sorrel","sorrow","sort","soul","soulmate","sound","soundness","soup","source","sourwood","sousaphone","south","southeast","souvenir","sovereignty","sow","soy","soybean","space","spacing","spaghetti","span","spandex","sparerib","spark","sparrow","spasm","spat","spatula","spawn","speaker","speakerphone","speaking","spear","spec","special","specialist","specialty","species","specification","spectacle","spectacles","spectrograph","spectrum","speculation","speech","speed","speedboat","spell","spelling","spelt","spending","sphere","sphynx","spice","spider","spiderling","spike","spill","spinach","spine","spiral","spirit","spiritual","spirituality","spit","spite","spleen","splendor","split","spokesman","spokeswoman","sponge","sponsor","sponsorship","spool","spoon","spork","sport","sportsman","spot","spotlight","spouse","sprag","sprat","spray","spread","spreadsheet","spree","spring","sprinkles","sprinter","sprout","spruce","spud","spume","spur","spy","spyglass","square","squash","squatter","squeegee","squid","squirrel","stab","stability","stable","stack","stacking","stadium","staff","stag","stage","stain","stair","staircase","stake","stalk","stall","stallion","stamen","stamina","stamp","stance","stand","standard","standardisation","standardization","standing","standoff","standpoint","star","starboard","start","starter","state","statement","statin","station","station-wagon","statistic","statistics","statue","status","statute","stay","steak","stealth","steam","steamroller","steel","steeple","stem","stench","stencil","step","step-aunt","step-brother","step-daughter","step-father","step-grandfather","step-grandmother","step-mother","step-sister","step-son","step-uncle","stepdaughter","stepmother","stepping-stone","stepson","stereo","stew","steward","stick","sticker","stiletto","still","stimulation","stimulus","sting","stinger","stir-fry","stitch","stitcher","stock","stock-in-trade","stockings","stole","stomach","stone","stonework","stool","stop","stopsign","stopwatch","storage","store","storey","storm","story","story-telling","storyboard","stot","stove","strait","strand","stranger","strap","strategy","straw","strawberry","strawman","stream","street","streetcar","strength","stress","stretch","strife","strike","string","strip","stripe","strobe","structure","strudel","struggle","stucco","stud","student","studio","study","stuff","stumbling","stump","stupidity","sturgeon","sty","style","styling","stylus","sub","subcomponent","subconscious","subcontractor","subexpression","subgroup","subject","submarine","submitter","subprime","subroutine","subscription","subsection","subset","subsidence","subsidiary","subsidy","substance","substitution","subtitle","suburb","subway","success","succotash","suede","suet","suffocation","sugar","suggestion","suit","suitcase","suite","sulfur","sultan","sum","summary","summer","summit","sun","sunbeam","sunbonnet","sundae","sunday","sundial","sunflower","sunglasses","sunlamp","sunlight","sunrise","sunroom","sunset","sunshine","superiority","supermarket","supernatural","supervision","supervisor","supper","supplement","supplier","supply","support","supporter","suppression","supreme","surface","surfboard","surge","surgeon","surgery","surname","surplus","surprise","surround","surroundings","surrounds","survey","survival","survivor","sushi","suspect","suspenders","suspension","sustainment","sustenance","swamp","swan","swanling","swath","sweat","sweater","sweatshirt","sweatshop","sweatsuit","sweets","swell","swim","swimming","swimsuit","swine","swing","switch","switchboard","switching","swivel","sword","swordfight","swordfish","sycamore","symbol","symmetry","sympathy","symptom","syndicate","syndrome","synergy","synod","synonym","synthesis","syrup","system","t-shirt","tab","tabby","tabernacle","table","tablecloth","tablet","tabletop","tachometer","tackle","taco","tactics","tactile","tadpole","tag","tail","tailbud","tailor","tailspin","take-out","takeover","tale","talent","talk","talking","tam-o'-shanter","tamale","tambour","tambourine","tan","tandem","tangerine","tank","tank-top","tanker","tankful","tap","tape","tapioca","target","taro","tarragon","tart","task","tassel","taste","tatami","tattler","tattoo","tavern","tax","taxi","taxicab","taxpayer","tea","teacher","teaching","team","teammate","teapot","tear","tech","technician","technique","technologist","technology","tectonics","teen","teenager","teepee","telephone","telescreen","teletype","television","tell","teller","temp","temper","temperature","temple","tempo","temporariness","temporary","temptation","temptress","tenant","tendency","tender","tenement","tenet","tennis","tenor","tension","tensor","tent","tentacle","tenth","tepee","teriyaki","term","terminal","termination","terminology","termite","terrace","terracotta","terrapin","terrarium","territory","test","testament","testimonial","testimony","testing","text","textbook","textual","texture","thanks","thaw","theater","theft","theism","theme","theology","theory","therapist","therapy","thermals","thermometer","thermostat","thesis","thickness","thief","thigh","thing","thinking","thirst","thistle","thong","thongs","thorn","thought","thousand","thread","threat","threshold","thrift","thrill","throne","thrush","thumb","thump","thunder","thunderbolt","thunderhead","thunderstorm","thyme","tiara","tic","tick","ticket","tide","tie","tiger","tights","tile","till","tilt","timbale","timber","time","timeline","timeout","timer","timetable","timing","timpani","tin","tinderbox","tintype","tip","tire","tissue","titanium","title","toad","toast","toaster","tobacco","today","toe","toenail","toffee","tofu","tog","toga","toilet","tolerance","tolerant","toll","tom-tom","tomatillo","tomato","tomb","tomography","tomorrow","ton","tonality","tone","tongue","tonic","tonight","tool","toot","tooth","toothbrush","toothpaste","toothpick","top","top-hat","topic","topsail","toque","toreador","tornado","torso","torte","tortellini","tortilla","tortoise","total","tote","touch","tough-guy","tour","tourism","tourist","tournament","tow-truck","towel","tower","town","townhouse","township","toy","trace","trachoma","track","tracking","tracksuit","tract","tractor","trade","trader","trading","tradition","traditionalism","traffic","trafficker","tragedy","trail","trailer","trailpatrol","train","trainer","training","trait","tram","trance","transaction","transcript","transfer","transformation","transit","transition","translation","transmission","transom","transparency","transplantation","transport","transportation","trap","trapdoor","trapezium","trapezoid","trash","travel","traveler","tray","treasure","treasury","treat","treatment","treaty","tree","trek","trellis","tremor","trench","trend","triad","trial","triangle","tribe","tributary","trick","trigger","trigonometry","trillion","trim","trinket","trip","tripod","tritone","triumph","trolley","troop","trooper","trophy","trouble","trousers","trout","trove","trowel","truck","trumpet","trunk","trust","trustee","truth","try","tsunami","tub","tuba","tube","tuber","tug","tugboat","tuition","tulip","tumbler","tummy","tuna","tune","tune-up","tunic","tunnel","turban","turf","turkey","turmeric","turn","turning","turnip","turnover","turnstile","turret","turtle","tusk","tussle","tutu","tuxedo","tweet","tweezers","twig","twilight","twine","twins","twist","twister","twitter","type","typeface","typewriter","typhoon","ukulele","ultimatum","umbrella","unblinking","uncertainty","uncle","underclothes","underestimate","underground","underneath","underpants","underpass","undershirt","understanding","understatement","undertaker","underwear","underweight","underwire","underwriting","unemployment","unibody","uniform","uniformity","union","unique","unit","unity","universe","university","update","upgrade","uplift","upper","upstairs","upward","urge","urgency","urn","usage","use","user","usher","usual","utensil","utilisation","utility","utilization","vacation","vaccine","vacuum","vagrant","valance","valentine","validate","validity","valley","valuable","value","vampire","van","vanadyl","vane","vanilla","vanity","variability","variable","variant","variation","variety","vascular","vase","vault","vaulting","veal","vector","vegetable","vegetarian","vegetarianism","vegetation","vehicle","veil","vein","veldt","vellum","velocity","velodrome","velvet","vendor","veneer","vengeance","venison","venom","venti","venture","venue","veranda","verb","verdict","verification","vermicelli","vernacular","verse","version","vertigo","verve","vessel","vest","vestment","vet","veteran","veterinarian","veto","viability","vibraphone","vibration","vibrissae","vice","vicinity","victim","victory","video","view","viewer","vignette","villa","village","vine","vinegar","vineyard","vintage","vintner","vinyl","viola","violation","violence","violet","violin","virtue","virus","visa","viscose","vise","vision","visit","visitor","visor","vista","visual","vitality","vitamin","vitro","vivo","vogue","voice","void","vol","volatility","volcano","volleyball","volume","volunteer","volunteering","vote","voter","voting","voyage","vulture","wafer","waffle","wage","wagon","waist","waistband","wait","waiter","waiting","waitress","waiver","wake","walk","walker","walking","walkway","wall","wallaby","wallet","walnut","walrus","wampum","wannabe","want","war","warden","wardrobe","warfare","warlock","warlord","warm-up","warming","warmth","warning","warrant","warren","warrior","wasabi","wash","washbasin","washcloth","washer","washtub","wasp","waste","wastebasket","wasting","watch","watcher","watchmaker","water","waterbed","watercress","waterfall","waterfront","watermelon","waterskiing","waterspout","waterwheel","wave","waveform","wax","way","weakness","wealth","weapon","wear","weasel","weather","web","webinar","webmail","webpage","website","wedding","wedge","weeder","weedkiller","week","weekend","weekender","weight","weird","welcome","welfare","well","well-being","west","western","wet-bar","wetland","wetsuit","whack","whale","wharf","wheat","wheel","whelp","whey","whip","whirlpool","whirlwind","whisker","whisper","whistle","whole","wholesale","wholesaler","whorl","wick","widget","widow","width","wife","wifi","wild","wildebeest","wilderness","wildlife","will","willingness","willow","win","wind","wind-chime","windage","window","windscreen","windshield","winery","wing","wingman","wingtip","wink","winner","winter","wire","wiretap","wiring","wisdom","wiseguy","wish","wisteria","wit","witch","witch-hunt","withdrawal","witness","wok","wolf","woman","wombat","wonder","wont","wood","woodchuck","woodland","woodshed","woodwind","wool","woolens","word","wording","work","workbench","worker","workforce","workhorse","working","workout","workplace","workshop","world","worm","worry","worship","worshiper","worth","wound","wrap","wraparound","wrapper","wrapping","wreck","wrecker","wren","wrench","wrestler","wriggler","wrinkle","wrist","writer","writing","wrong","xylophone","yacht","yahoo","yak","yam","yang","yard","yarmulke","yarn","yawl","year","yeast","yellowjacket","yesterday","yew","yin","yoga","yogurt","yoke","yolk","young","youngster","yourself","youth","yoyo","yurt","zampone","zebra","zebrafish","zen","zephyr","zero","ziggurat","zinc","zipper","zither","zombie","zone","zoo","zoologist","zoology","zoot-suit","zucchini"],S$u=["a","abaft","aboard","about","above","absent","across","afore","after","against","along","alongside","amid","amidst","among","amongst","an","anenst","anti","apropos","apud","around","as","aside","astride","at","athwart","atop","barring","before","behind","below","beneath","beside","besides","between","beyond","but","by","circa","concerning","considering","despite","down","during","except","excepting","excluding","failing","following","for","forenenst","from","given","in","including","inside","into","lest","like","mid","midst","minus","modulo","near","next","notwithstanding","of","off","on","onto","opposite","out","outside","over","pace","past","per","plus","pro","qua","regarding","round","sans","save","since","than","the","through","throughout","till","times","to","toward","towards","under","underneath","unlike","until","unto","up","upon","versus","via","vice","with","within","without","worth"],B$u=["abandon","abase","abate","abbreviate","abdicate","abduct","abet","abhor","abide","abjure","abnegate","abolish","abominate","abort","abound","abrade","abridge","abrogate","abscond","abseil","absent","absolve","absorb","abstain","abstract","abut","accede","accelerate","accent","accentuate","accept","access","accessorise","accessorize","acclaim","acclimate","acclimatise","acclimatize","accommodate","accompany","accomplish","accord","accost","account","accouter","accoutre","accredit","accrue","acculturate","accumulate","accuse","accustom","ace","ache","achieve","acidify","acknowledge","acquaint","acquiesce","acquire","acquit","act","action","activate","actualise","actualize","actuate","adapt","add","addle","address","adduce","adhere","adjoin","adjourn","adjudge","adjudicate","adjure","adjust","administer","admire","admit","admonish","adopt","adore","adorn","adsorb","adulterate","adumbrate","advance","advantage","advertise","advise","advocate","aerate","affect","affiliate","affirm","affix","afflict","afford","afforest","affront","age","agglomerate","aggravate","aggregate","agitate","agonise","agonize","agree","aid","ail","aim","air","airbrush","airdrop","airfreight","airlift","alarm","alert","alienate","alight","align","allay","allege","alleviate","allocate","allot","allow","alloy","allude","ally","alphabetise","alphabetize","alter","alternate","amalgamate","amass","amaze","amble","ambush","ameliorate","amend","amortise","amortize","amount","amplify","amputate","amuse","anaesthetise","anaesthetize","analyse","anchor","anesthetize","anger","angle","anglicise","anglicize","animate","anneal","annex","annihilate","annotate","announce","annoy","annul","anodise","anodize","anoint","anonymise","anonymize","answer","antagonise","antagonize","antedate","anthologise","anthologize","anticipate","ape","apologise","apologize","apostrophise","apostrophize","appal","appall","appeal","appear","appease","append","appertain","applaud","apply","appoint","apportion","appraise","appreciate","apprehend","apprentice","apprise","approach","appropriate","approve","approximate","aquaplane","arbitrate","arc","arch","archive","argue","arise","arm","arraign","arrange","array","arrest","arrive","arrogate","art","articulate","ascend","ascertain","ascribe","ask","asphyxiate","aspirate","aspire","assail","assassinate","assault","assay","assemble","assent","assert","assess","assign","assimilate","assist","associate","assuage","assume","assure","asterisk","astonish","astound","atomise","atomize","atone","atrophy","attach","attack","attain","attempt","attend","attenuate","attest","attract","attribute","auction","audit","audition","augment","augur","authenticate","author","authorise","authorize","autograph","automate","autosave","autowind","avail","avenge","aver","average","avert","avoid","avow","await","awake","awaken","award","awe","ax","axe","baa","babble","baby","babysit","back","backcomb","backdate","backfill","backfire","backlight","backpack","backspace","backtrack","badger","baffle","bag","bail","bait","bake","balance","bale","ball","balloon","ballot","balls","bamboozle","ban","band","bandage","bandy","banish","bank","bankroll","bankrupt","banter","baptise","baptize","bar","barbecue","bare","bargain","barge","bark","barnstorm","barrack","barrel","barricade","barter","base","bash","bask","baste","bat","batch","bath","bathe","batten","batter","battle","baulk","bawl","bay","bayonet","be","beach","beam","bean","bear","beard","beat","beatbox","beatboxer","beatify","beautify","beckon","become","bedazzle","bedeck","bedevil","beef","beep","beetle","befall","befit","befog","befriend","beg","beget","beggar","begin","begrudge","beguile","behave","behold","behoove","behove","belabor","belabour","belay","belch","belie","believe","belittle","bellow","belly","bellyache","belong","belt","bemoan","bemuse","benchmark","bend","benefit","bequeath","berate","bereave","berth","beseech","beset","besiege","besmirch","bespatter","bespeak","best","bestir","bestow","bestride","bet","betake","betide","betoken","betray","better","bewail","beware","bewilder","bewitch","bias","bicker","bicycle","bid","bide","biff","bifurcate","big","bike","bilk","bill","billet","billow","bin","bind","binge","biodegrade","bird","bisect","bite","bitmap","bivouac","bivvy","blab","blabber","blacken","blackmail","blag","blame","blanch","blank","blanket","blare","blaspheme","blast","blather","blaze","blazon","bleach","bleat","bleed","bleep","blemish","blench","blend","bless","blight","blind","blindfold","blindfolded","blindside","blink","bliss","blister","blitz","bloat","block","blockade","blog","blood","bloom","bloop","blossom","blot","blow","blub","blubber","bludge","bludgeon","bluff","blunder","blunt","blur","blurt","blush","bluster","board","boast","bob","bobble","bode","bodge","bog","boggle","boil","bolster","bolt","bomb","bombard","bond","bonk","boo","boogie","book","bookmark","boom","boomerang","boost","boot","bootleg","bop","border","bore","born","borrow","boss","botch","bother","bottle","bottleful","bottom","bounce","bound","bow","bowdlerise","bowdlerize","bowl","bowlful","box","boycott","braai","brace","braces","bracket","brag","braid","brain","brainstorm","brainwash","braise","brake","branch","brand","brandish","brave","brawl","bray","brazen","breach","break","breakfast","breathalyse","breathalyze","breathe","breed","breeze","brew","bribe","brick","bridge","bridle","brief","brighten","brim","bring","bristle","broach","broadcast","broaden","broadside","broil","broker","brood","brook","browbeat","browse","bruise","bruit","brush","brutalise","brutalize","bubble","buck","bucket","bucketful","buckle","bud","buddy","budge","budget","buff","buffer","buffet","bug","build","bulge","bulk","bulldoze","bully","bum","bumble","bump","bunch","bundle","bungle","bunk","bunker","bunt","buoy","burble","burden","burgeon","burglarize","burgle","burn","burnish","burp","burrow","burst","bury","bus","bushwhack","busk","bust","bustle","busy","butcher","butt","butter","button","buttonhole","buttress","buy","buzz","buzzing","bypass","cable","cache","cackle","caddie","cadge","cage","cajole","cake","calcify","calculate","calibrate","call","calm","calve","camouflage","camp","campaign","can","canalise","canalize","cancel","cane","cannibalise","cannibalize","cannon","cannulate","canoe","canonise","canonize","canst","cant","canter","canvass","cap","caper","capitalise","capitalize","capitulate","capsize","captain","caption","captivate","capture","caramelise","caramelize","carbonise","carbonize","carburise","carburize","card","care","careen","career","caress","caricature","carjack","carol","carom","carouse","carp","carpet","carpool","carry","cart","cartwheel","carve","cascade","case","cash","cashier","casserole","cast","castigate","catalog","catalogue","catalyse","catalyze","catapult","catch","categorise","categorize","cater","caterwaul","catnap","caucus","caulk","cause","cauterise","cauterize","caution","cave","cavil","cavort","caw","cc","cease","cede","celebrate","cement","censor","censure","centralise","centralize","centre","certificate","certify","chafe","chaff","chain","chair","chalk","challenge","champ","champion","chance","change","channel","chant","chaperon","chaperone","char","characterise","characterize","charbroil","charge","chargesheet","chargrill","charm","chart","charter","chase","chasten","chastise","chat","chatter","chauffeur","cheapen","cheat","cheater","check","checkmate","cheek","cheep","cheer","cherish","chew","chicken","chide","chill","chillax","chime","chip","chirp","chisel","chivvy","chlorinate","choke","chomp","choose","chop","choreograph","chortle","chorus","christen","chromakey","chronicle","chuck","chuckle","chunder","chunter","churn","cinch","circle","circulate","circumnavigate","circumscribe","circumvent","cite","civilise","civilize","clack","claim","clam","clamber","clamor","clamour","clamp","clang","clank","clap","clarify","clash","clasp","class","classify","clatter","claw","clean","cleanse","clear","cleave","clench","clerk","click","climb","clinch","cling","clink","clinking","clip","cloak","clobber","clock","clog","clone","clonk","close","closet","clot","clothe","cloud","clout","clown","club","cluck","clue","clump","clunk","cluster","clutch","clutter","coach","coagulate","coalesce","coarsen","coast","coat","coax","cobble","cocoon","coddle","code","codify","coerce","coexist","cogitate","cohabit","cohere","coil","coin","coincide","collaborate","collapse","collar","collate","collect","collectivise","collectivize","collide","colligate","collocate","collude","colonise","colonize","colorize","colour","comb","combat","combine","combust","come","comfort","command","commandeer","commemorate","commence","commend","comment","commentate","commercialise","commercialize","commingle","commiserate","commission","commit","commune","communicate","commute","compact","compare","compartmentalise","compartmentalize","compel","compensate","compete","compile","complain","complement","complete","complicate","compliment","comply","comport","compose","compost","compound","comprehend","compress","comprise","compromise","compute","computerise","computerize","con","conceal","concede","conceive","concentrate","conceptualise","conceptualize","concern","concertina","conciliate","conclude","concoct","concrete","concur","concuss","condemn","condense","condescend","condition","condone","conduct","cone","confer","confess","confide","configure","confine","confirm","confiscate","conflate","conflict","conform","confound","confront","confuse","confute","congeal","congratulate","congregate","conjecture","conjoin","conjugate","conjure","conk","connect","connive","connote","conquer","conscientise","conscientize","conscript","consecrate","consent","conserve","consider","consign","consist","console","consolidate","consort","conspire","constitute","constrain","constrict","construct","construe","consult","consume","consummate","contact","contain","contaminate","contemplate","contend","content","contest","contextualise","contextualize","continue","contort","contract","contradict","contraindicate","contrast","contravene","contribute","contrive","control","controvert","convalesce","convene","converge","converse","convert","convey","convict","convince","convoke","convulse","coo","cook","cool","coop","cooperate","coordinate","cop","cope","coppice","copy","copyright","cordon","core","cork","corkscrew","corner","corral","correct","correlate","correspond","corrode","corrupt","coruscate","cosh","cosset","cost","cosy","cotton","couch","cough","counsel","count","countenance","counter","counteract","counterbalance","counterfeit","countermand","counterpoint","countersign","couple","courier","course","court","covenant","cover","covet","cow","cower","cozy","crackle","cradle","craft","cram","cramp","crane","crank","crate","crave","crawl","crayon","creak","creaking","cream","crease","create","credential","credit","creep","cremate","creolise","creolize","creosote","crest","crew","crib","crick","criminalise","criminalize","crimp","cringe","crinkle","cripple","crisp","criticise","criticize","critique","croak","crochet","crook","croon","crop","cross","crouch","crow","crowd","crown","cruise","crumble","crumple","crunch","crusade","crush","cry","crystallise","crystallize","cube","cuddle","cudgel","cue","cuff","cull","culminate","cultivate","culture","cup","curate","curb","curdle","cure","curl","curry","curse","curtail","curtain","curtsy","curve","cushion","cuss","customise","customize","cut","cwtch","cycle","dab","dabble","dally","dam","damage","damp","dampen","dance","dandle","dangle","dare","darken","darn","dart","dash","date","daub","daunt","dawdle","dawn","daydream","dazzle","deactivate","deaden","deadhead","deafen","deal","debar","debase","debate","debilitate","debit","debrief","debug","debunk","debut","decamp","decant","decay","deceive","decelerate","decentralise","decentralize","decide","decimalise","decimalize","decimate","decipher","deck","declaim","declare","declassify","decline","declutter","decode","decommission","decompose","decompress","deconsecrate","deconstruct","decontaminate","decontrol","decorate","decouple","decoy","decrease","decree","decriminalise","decriminalize","decry","decrypt","dedicate","deduce","deduct","deejay","deem","deepen","deface","defame","default","defeat","defect","defend","defer","defile","define","deflate","deflect","defog","defoliate","deforest","deform","defrag","defragment","defraud","defray","defrock","defrost","defuse","defy","degenerate","deglaze","degrade","degrease","dehumanise","dehumanize","dehydrate","deify","deign","delay","delegate","delete","deliberate","delight","delimit","delineate","deliquesce","deliver","delouse","delude","deluge","delve","demand","demarcate","demean","demerge","demilitarise","demilitarize","demineralise","demineralize","demist","demo","demob","demobilise","demobilize","democratise","democratize","demolish","demonise","demonize","demonstrate","demoralise","demoralize","demote","demotivate","demur","demystify","denationalise","denationalize","denigrate","denitrify","denominate","denote","denounce","dent","denude","deny","depart","depend","depersonalise","depersonalize","depict","deplane","deplete","deplore","deploy","depopulate","deport","depose","deposit","deprave","deprecate","depreciate","depress","depressurise","depressurize","deprive","depute","deputise","deputize","deracinate","derail","dereference","deregulate","deride","derive","derogate","descale","descend","describe","descry","desecrate","desegregate","deselect","desensitise","desensitize","desert","deserve","design","designate","desire","desist","deskill","desolate","despair","despise","despoil","destabilise","destabilize","destock","destroy","detach","detail","detain","detect","deter","deteriorate","determine","detest","dethrone","detonate","detour","detoxify","detract","detrain","devalue","devastate","develop","deviate","devise","devoice","devolve","devote","devour","diagnose","dial","dice","dicker","dictate","die","diet","differ","differentiate","diffract","diffuse","dig","digest","digitalise","digitalize","digitise","digitize","dignify","digress","dilate","dilute","diluted","dim","diminish","dimple","dine","ding","dip","diphthongise","diphthongize","direct","dirty","dis","disable","disabuse","disadvantage","disaffiliate","disafforest","disagree","disallow","disambiguate","disappear","disappoint","disapprove","disarm","disarrange","disassemble","disassociate","disavow","disband","disbar","disbelieve","disburse","discard","discern","discharge","discipline","disclaim","disclose","discolor","discolour","discomfit","discomfort","discompose","disconcert","disconnect","discontinue","discount","discourage","discourse","discover","discredit","discriminate","discuss","disdain","disembark","disembowel","disenfranchise","disengage","disentangle","disestablish","disgorge","disgrace","disguise","disgust","dish","dishearten","dishonor","dishonour","disillusion","disincentivise","disincentivize","disinfect","disinherit","disinhibit","disintegrate","disinter","disinvest","dislike","dislocate","dislodge","dismantle","dismay","dismember","dismiss","dismount","disobey","disorient","disorientate","disown","disparage","dispatch","dispel","dispense","disperse","displace","display","displease","disport","dispose","dispossess","disprove","dispute","disqualify","disregard","disrespect","disrobe","disrupt","dissect","dissemble","disseminate","dissent","dissimulate","dissipate","dissociate","dissolve","dissuade","distance","distend","distil","distill","distinguish","distort","distract","distress","distribute","distrust","disturb","disunite","ditch","dither","dive","diverge","diversify","divert","divest","divide","divine","divorce","divulge","divvy","do","dob","dock","doctor","document","dodge","doff","dog","dole","doll","dollarise","dollarize","domesticate","dominate","don","donate","doodle","doom","doorstep","dop","dope","dose","doss","dot","dote","double","doubt","douse","dovetail","down","downchange","downgrade","downlink","download","downplay","downshift","downsize","dowse","doze","draft","drag","dragoon","drain","dramatise","dramatize","drape","draught","draw","drawl","dread","dream","dredge","drench","dress","dribble","drift","drill","drink","drip","drive","drivel","drizzle","drone","drool","droop","drop","drown","drowse","drug","drum","dry","dub","duck","duckie","ducks","duel","duff","dull","dumb","dumbfound","dump","dunk","dunt","dupe","duplicate","dust","dwarf","dwell","dwindle","dye","dynamite","earmark","earn","earth","ease","eat","eavesdrop","ebb","echo","eclipse","economise","economize","eddy","edge","edify","edit","editorialise","editorialize","educate","efface","effect","effectuate","egg","eject","eke","elaborate","elapse","elbow","elect","electrify","electrocute","electroplate","elevate","elicit","elide","eliminate","elongate","elope","elucidate","elude","email","emanate","emancipate","embalm","embargo","embark","embarrass","embed","embellish","embezzle","embitter","emblazon","embody","embolden","emboss","embrace","embroider","embroil","emcee","emend","emerge","emigrate","emit","emote","empathise","empathize","emphasise","emphasize","employ","empower","empty","emulate","emulsify","enable","enact","encamp","encapsulate","encase","encash","enchant","encircle","enclose","encode","encompass","encounter","encourage","encroach","encrypt","encumber","end","endanger","endear","endeavor","endeavour","endorse","endow","endure","energise","energize","enervate","enfeeble","enfold","enforce","enfranchise","engage","engender","engineer","engorge","engrave","engross","engulf","enhance","enjoin","enjoy","enlarge","enlighten","enlist","enliven","enmesh","ennoble","enquire","enrage","enrapture","enrich","enrol","enroll","ensconce","enshrine","enshroud","ensnare","ensue","ensure","entail","entangle","enter","entertain","enthral","enthrall","enthrone","enthuse","entice","entitle","entomb","entrance","entrap","entreat","entrench","entrust","entwine","enumerate","enunciate","envelop","envisage","envision","envy","epitomise","epitomize","equal","equalise","equalize","equate","equip","equivocate","eradicate","erase","erode","err","erupt","escalate","escape","eschew","espouse","espy","essay","establish","esteem","estimate","etch","eulogise","eulogize","euthanise","euthanize","evacuate","evade","evaluate","evangelise","evangelize","evaporate","even","eventuate","evict","evidence","evince","eviscerate","evoke","evolve","exacerbate","exact","exaggerate","exalt","examine","exasperate","excavate","exceed","excel","except","excerpt","exchange","excise","excite","exclaim","exclude","excommunicate","excoriate","excrete","exculpate","excuse","execute","exemplify","exempt","exercise","exert","exeunt","exfoliate","exhale","exhaust","exhibit","exhilarate","exhort","exhume","exile","exist","exit","exonerate","exorcise","exorcize","expand","expatiate","expect","expectorate","expedite","expel","expend","experience","experiment","expiate","expire","explain","explicate","explode","exploit","explore","export","expose","expostulate","expound","express","expropriate","expunge","expurgate","extemporise","extemporize","extend","exterminate","externalise","externalize","extinguish","extirpate","extol","extort","extract","extradite","extrapolate","extricate","extrude","exude","exult","eye","eyeball","eyeglasses","fabricate","face","facilitate","factor","factorise","factorize","fade","faff","fail","faint","fake","fall","falsify","falter","familiarise","familiarize","fan","fancy","fantasise","fantasize","fare","farewell","farm","farrow","fascinate","fashion","fast","fasten","father","fathom","fatten","fault","favor","favour","fawn","fax","faze","fear","feast","feather","feature","federate","feed","feel","feign","feint","fell","feminise","feminize","fence","fend","ferment","ferret","ferry","fertilise","fertilize","fess","fester","festoon","fetch","fete","fetter","feud","fib","fictionalise","fictionalize","fiddle","fidget","field","fight","figure","filch","file","filibuster","fill","fillet","film","filter","finagle","finalise","finalize","finance","find","fine","finesse","fingerprint","finish","fire","firebomb","firm","fish","fishtail","fit","fix","fizz","fizzle","flag","flagellate","flail","flake","flame","flank","flap","flare","flash","flat","flatline","flatten","flatter","flaunt","flavour","flay","fleck","flee","fleece","flesh","flex","flick","flicker","flight","flinch","fling","flip","flirt","flit","float","flock","flog","flood","floodlight","floor","flop","floss","flounce","flounder","flour","flourish","flout","flow","flower","flub","fluctuate","fluff","flummox","flunk","flush","fluster","flutter","fly","foal","foam","fob","focalise","focalize","focus","fog","foil","foist","fold","follow","foment","fool","foot","forage","forbear","forbid","force","ford","forearm","forecast","foreclose","foregather","foreground","foresee","foreshadow","foreshorten","forestall","foretell","forewarn","forfeit","forfend","forgather","forge","forget","forgive","forgo","fork","form","formalise","formalize","format","formulate","forsake","forswear","fortify","forward","forwards","fossick","fossilise","fossilize","foster","foul","found","founder","fox","fracture","fragment","frame","franchise","frank","fraternise","fraternize","fray","freak","free","freelance","freeload","freestyle","freewheel","freeze","freight","frequent","freshen","fret","frighten","fringe","frisk","fritter","frizz","frizzle","frogmarch","frolic","front","frost","froth","frown","fruit","frustrate","fry","fudge","fuel","fulfil","fulfill","fulminate","fumble","fume","fumigate","function","fund","funk","funnel","furl","furlough","furnish","furrow","further","fuse","fuss","gab","gabble","gad","gag","gain","gainsay","gall","gallivant","gallop","galumph","galvanise","galvanize","gamble","gambol","gang","gape","garage","garden","gargle","garland","garner","garnish","garrison","garrote","garrotte","gas","gash","gasp","gatecrash","gather","gauge","gawk","gawp","gaze","gazump","gazunder","gear","gee","gel","geld","gen","generalise","generalize","generate","gentrify","genuflect","germinate","gerrymander","gestate","gesticulate","gesture","get","ghost","ghostwrite","gibber","gift","giggle","gild","ginger","gird","girdle","give","gladden","glamorise","glamorize","glance","glare","glass","glaze","gleam","glean","glide","glimmer","glimmering","glimpse","glint","glisten","glister","glitter","gloat","globalise","globalize","glom","glorify","glory","gloss","glow","glower","glue","glug","glut","gnash","gnaw","go","goad","gobble","goggle","goldbrick","goof","google","goose","gore","gorge","gossip","gouge","govern","grab","grace","grade","graduate","graft","grant","grapple","grasp","grass","grate","gratify","gravitate","graze","grease","green","greet","grey","grieve","grill","grimace","grin","grind","grip","gripe","grit","grizzle","groan","grok","groom","grouch","ground","group","grouse","grout","grovel","grow","growl","grub","grudge","grumble","grunt","guarantee","guard","guess","guest","guffaw","guide","guillotine","guilt","gulp","gum","gun","gurgle","gurn","gush","gussy","gust","gut","gutter","guzzle","gybe","gyrate","hack","haemorrhage","haggle","hail","hallmark","halloo","hallucinate","halt","halve","ham","hammer","hamper","hamstring","hand","handcuff","handicap","handle","hang","hanker","happen","harangue","harass","harbor","harbour","harden","hare","hark","harm","harmonise","harmonize","harness","harp","harpoon","harrow","harrumph","harry","harvest","hash","hassle","hasten","hatch","hate","haul","haunt","have","haw","hawk","hazard","haze","head","headbutt","headhunt","headline","heal","heap","hear","hearken","hearten","heat","heave","heckle","hector","hedge","heed","heel","heft","heighten","heist","help","hem","hemorrhage","herald","herd","hesitate","hew","hex","hibernate","hiccough","hiccup","hide","hie","highball","highlight","hightail","hijack","hike","hinder","hinge","hint","hire","hiss","hit","hitch","hitchhike","hive","hoard","hoax","hobble","hobnob","hock","hog","hoick","hoist","hold","hole","holiday","holler","hollow","holster","home","homeschool","homestead","hone","honeymoon","honk","honour","hoodwink","hoof","hook","hoon","hoot","hoover","hop","hope","horn","horrify","horse","horsewhip","hose","hosepipe","hospitalise","hospitalize","host","hot","hotfoot","hound","house","hover","howl","huddle","huff","hug","hull","hum","humanise","humanize","humble","humiliate","humour","hunch","hunger","hunker","hunt","hurdle","hurl","hurry","hurt","hurtle","husband","hush","husk","hustle","hybridise","hybridize","hydrate","hydroplane","hype","hyperventilate","hyphenate","hypnotise","hypnotize","hypothesise","hypothesize","ice","iconify","idealise","idealize","ideate","identify","idle","idolise","idolize","ignite","ignore","illuminate","illumine","illustrate","imagine","imagineer","imbibe","imbue","imitate","immerse","immigrate","immobilise","immobilize","immolate","immortalise","immortalize","immunise","immunize","immure","impact","impair","impale","impanel","impart","impeach","impede","impel","imperil","impersonate","impinge","implant","implement","implicate","implode","implore","imply","import","importune","impose","impound","impoverish","impress","imprint","imprison","improve","improvise","impugn","inactivate","inaugurate","incapacitate","incarcerate","incarnate","incense","incentivise","incentivize","inch","incinerate","incise","incite","incline","include","incommode","inconvenience","incorporate","increase","incriminate","incubate","inculcate","incur","indemnify","indent","index","indicate","indict","individualise","individualize","individuate","indoctrinate","induce","induct","indulge","industrialise","industrialize","infantilise","infantilize","infect","infer","infest","infill","infiltrate","inflame","inflate","inflect","inflict","influence","inform","infringe","infuriate","infuse","ingest","ingratiate","inhabit","inhale","inhere","inherit","inhibit","initial","initialise","initialize","initiate","inject","injure","ink","inlay","innovate","inoculate","input","inscribe","insert","inset","insinuate","insist","inspect","inspire","install","instance","instigate","instil","instill","institute","institutionalise","institutionalize","instruct","insulate","insult","insure","integrate","intend","intensify","inter","interact","intercede","intercept","interchange","interconnect","intercut","interest","interface","interfere","interject","interlace","interleave","interlink","interlock","intermarry","intermesh","intermingle","intermix","intern","internalise","internalize","internationalise","internationalize","interpenetrate","interpolate","interpose","interpret","interrelate","interrogate","interrupt","intersect","intersperse","intertwine","intervene","interview","interweave","interwork","intimate","intimidate","intone","intoxicate","intrigue","introduce","intrude","intubate","intuit","inundate","inure","invade","invalid","invalidate","inveigh","inveigle","invent","inventory","invert","invest","investigate","invigilate","invigorate","invite","invoice","invoke","involve","ionise","ionize","irk","iron","irradiate","irrigate","irritate","irrupt","isolate","issue","italicise","italicize","itch","itemise","itemize","iterate","jab","jabber","jack","jackknife","jail","jam","jangle","jar","jaw","jaywalk","jazz","jeer","jell","jeopardise","jeopardize","jest","jet","jettison","jib","jibe","jiggle","jilt","jingle","jink","jinx","jive","jockey","jog","joggle","join","joint","joke","jol","jolly","jolt","josh","jostle","jot","journey","joust","judder","judge","juggle","juice","jumble","jump","junk","justify","jut","juxtapose","keel","keelhaul","keen","keep","ken","key","keyboard","kibitz","kick","kid","kindle","kip","kiss","kit","kite","klap","kludge","knacker","knead","knee","kneecap","kneel","knife","knight","knit","knock","knot","know","knuckle","kowtow","kvetch","label","labour","lace","lacerate","lack","lacquer","ladder","ladle","lag","lam","lamb","lambast","lambaste","lament","lamp","lampoon","lance","land","lands","landscape","languish","lap","lapse","lard","large","lark","lash","lasso","last","latch","lather","laud","laugh","launch","launder","lavish","lay","layer","laze","leach","lead","leaf","leaflet","leak","lean","leap","leapfrog","learn","lease","leash","leave","leaven","lecture","leer","leg","legalise","legalize","legislate","legitimise","legitimize","lend","lengthen","lessen","let","letter","letterbox","level","lever","leverage","levitate","levy","liaise","libel","liberalise","liberalize","liberate","license","lick","lie","lift","ligate","light","lighten","like","liken","limber","lime","limit","limp","line","linger","link","lionise","lionize","liquefy","liquidate","liquidise","liquidize","lisp","list","listen","litigate","litter","live","liven","load","loads","loaf","loan","loathe","lob","lobby","lobotomise","lobotomize","localise","localize","locate","lock","lodge","loft","log","loiter","loll","lollop","long","look","looks","loom","loop","loose","loosen","loot","lop","lope","lord","lose","lounge","lour","louse","love","low","lowball","lower","lubricate","luck","lug","lull","lumber","lump","lunch","lunge","lurch","lure","lurk","luxuriate","macerate","machine","madden","magic","magnetise","magnetize","magnify","mail","maim","mainline","mainstream","maintain","major","make","malfunction","malign","malinger","maltreat","man","manacle","manage","mandate","mangle","manhandle","manicure","manifest","manipulate","manoeuvre","mantle","manufacture","manure","map","mar","march","marginalise","marginalize","marinate","mark","market","maroon","marry","marshal","martyr","marvel","masculinise","masculinize","mash","mask","masquerade","mass","massacre","massage","master","mastermind","masticate","match","materialise","materialize","matriculate","matter","mature","maul","maunder","max","maximise","maximize","mean","meander","measure","mechanise","mechanize","medal","meddle","mediate","medicate","meditate","meet","meld","mellow","melt","memorialise","memorialize","memorise","memorize","menace","mend","mention","meow","mercerise","mercerize","merchandise","merge","merit","mesh","mesmerise","mesmerize","mess","message","metabolise","metabolize","metamorphose","mete","meter","methinks","mew","mewl","miaow","microblog","microchip","micromanage","microwave","micturate","migrate","militarise","militarize","militate","milk","mill","mime","mimic","mince","mind","mine","mingle","miniaturise","miniaturize","minimise","minimize","minister","minor","mint","minute","mirror","misapply","misappropriate","misbehave","miscalculate","miscast","misconceive","misconstrue","miscount","misdiagnose","misdial","misdirect","misfile","misfire","misgovern","mishandle","mishear","mishit","misinform","misinterpret","misjudge","miskey","mislay","mislead","mismanage","mismatch","misname","misplace","misplay","mispronounce","misquote","misread","misreport","misrepresent","miss","mission","misspell","misspend","mist","mistake","mistime","mistreat","mistrust","misunderstand","misuse","mitigate","mitre","mix","moan","mob","mobilise","mobilize","mock","mod","model","moderate","modernise","modernize","modify","modulate","moisten","moisturise","moisturize","mold","molder","mollify","mollycoddle","molt","monitor","monopolise","monopolize","moo","mooch","moon","moonlight","moonwalk","moor","moot","mop","mope","moralise","moralize","morph","mortar","mortgage","mortify","mosey","mosh","mothball","mother","motion","motivate","motor","mould","moulder","moult","mount","mourn","mouse","mouth","move","movies","mow","muck","muddle","muddy","muffle","mug","mulch","mull","multicast","multiply","multitask","mumble","mumbling","mummify","munch","murmur","murmuring","murmurings","muscle","muse","mushroom","muss","muster","mutate","mute","mutilate","mutiny","mutter","muzzle","mystify","nab","nag","nail","name","namecheck","nap","narrate","narrow","narrowcast","nasalise","nasalize","nationalise","nationalize","natter","naturalise","naturalize","nauseate","navigate","near","nearer","nearest","neaten","necessitate","neck","necklace","need","needle","negate","negative","neglect","negotiate","neigh","nerve","nest","nestle","net","nettle","network","neuter","neutralise","neutralize","nibble","nick","nickname","nitrify","nix","nobble","nod","nominalize","nominate","norm","normalise","normalize","nose","nosedive","nosh","notarise","notarize","notch","note","notice","notify","nourish","nudge","nuke","nullify","numb","number","nurse","nurture","nut","nuzzle","obey","obfuscate","object","objectify","oblige","obliterate","obscure","observe","obsess","obstruct","obtain","obtrude","obviate","occasion","occlude","occupy","occur","off","offend","offer","officiate","offload","offset","offshore","ogle","oil","okay","omit","ooze","open","operate","opine","oppose","oppress","opt","optimise","optimize","option","orbit","orchestrate","ordain","order","organise","organize","orient","orientate","originate","ornament","orphan","oscillate","ossify","ostracise","ostracize","oust","out","outbid","outclass","outdistance","outdo","outface","outfit","outflank","outfox","outgrow","outgun","outlast","outlaw","outline","outlive","outmaneuver","outmanoeuvre","outnumber","outpace","outperform","outplay","outpoint","output","outrage","outrank","outrun","outsell","outshine","outsmart","outsource","outstay","outstrip","outvote","outweigh","outwit","overachieve","overact","overawe","overbalance","overbook","overburden","overcharge","overcome","overcompensate","overcook","overdevelop","overdo","overdose","overdraw","overdub","overeat","overemphasize","overestimate","overexpose","overextend","overfeed","overflow","overfly","overgeneralise","overgeneralize","overgraze","overhang","overhaul","overhear","overheat","overindulge","overlap","overlay","overlie","overload","overlook","overpay","overplay","overpower","overprint","overproduce","overrate","overreach","overreact","override","overrule","overrun","oversee","oversell","overshadow","overshoot","oversimplify","oversleep","overspend","overstate","overstay","overstep","overstock","overstretch","overtake","overtax","overthrow","overtrain","overturn","overuse","overvalue","overwhelm","overwinter","overwork","overwrite","owe","own","oxidise","oxidize","oxygenate","pace","pacify","pack","package","packetise","packetize","pad","paddle","padlock","page","paginate","pailful","pain","paint","pair","pal","palatalise","palatalize","pale","pall","palliate","palm","palpate","palpitate","pamper","pan","pander","panel","panhandle","panic","pant","paper","parachute","parade","parallel","paralyse","paralyze","paraphrase","parboil","parcel","parch","pardon","pare","park","parlay","parley","parody","parole","parrot","parry","parse","part","partake","participate","particularise","particularize","partition","partner","party","pass","passivise","passivize","paste","pasteurise","pasteurize","pasture","pat","patch","patent","patrol","patronise","patronize","patter","pattern","pause","pave","paw","pawn","pay","peak","peal","pedal","peddle","pedestrianise","pedestrianize","peek","peel","peep","peer","peg","pelt","pen","penalise","penalize","pencil","pension","people","pep","pepper","perambulate","perceive","perch","percolate","perfect","perforate","perform","perfume","perish","perjure","perk","perm","permeate","permit","perpetrate","perpetuate","perplex","persecute","persevere","persist","personalise","personalize","personify","perspire","persuade","pertain","perturb","peruse","pervade","pervert","pester","pet","peter","petition","petrify","phase","philosophise","philosophize","phone","photocopy","photograph","photoshop","photosynthesise","photosynthesize","phrase","pick","picket","pickle","picnic","picture","picturise","picturize","piddle","piece","pierce","pig","pigeonhole","piggyback","pike","pile","pilfer","pill","pillage","pillory","pillow","pilot","pin","pinch","pine","ping","pinion","pink","pinpoint","pioneer","pip","pipe","pique","pirate","pirouette","pit","pitch","pity","pivot","pixelate","pixellate","placate","place","plagiarise","plagiarize","plague","plait","plan","plane","plant","plaster","plasticise","plasticize","plate","plateau","play","plead","please","pledge","plight","plod","plonk","plop","plot","plough","pluck","plug","plumb","plummet","plump","plunder","plunge","plunk","pluralise","pluralize","ply","poach","pocket","point","poise","poison","poke","polarise","polarize","pole","poleax","poleaxe","police","polish","politicise","politicize","poll","pollard","pollinate","pollute","polymerise","polymerize","ponce","ponder","pong","pontificate","pony","pooh","pool","pootle","pop","popularise","popularize","populate","pore","port","portend","portion","portray","pose","posit","position","possess","posset","post","postmark","postpone","postulate","posture","pot","potter","pounce","pound","pour","pout","powder","power","practice","practise","praise","praises","prance","prang","prate","prattle","pray","preach","precede","precipitate","precis","preclude","predate","predecease","predetermine","predicate","predict","predispose","predominate","preen","preface","prefer","prefigure","prefix","preheat","prejudge","prejudice","preload","premaster","premiere","preoccupy","prep","prepare","prepone","preregister","presage","prescind","prescribe","preselect","presell","present","preserve","preset","preside","press","pressure","pressurise","pressurize","presume","presuppose","pretend","pretest","prettify","prevail","prevaricate","prevent","preview","prey","price","prickle","pride","prime","primp","print","prioritise","prioritize","prise","privatise","privatize","privilege","prize","probate","probe","proceed","process","proclaim","procrastinate","procreate","proctor","procure","prod","produce","profane","profess","professionalise","professionalize","proffer","profile","profit","program","programme","progress","prohibit","project","proliferate","prolong","promenade","promise","promote","prompt","promulgate","pronounce","proof","proofread","prop","propagandise","propagandize","propagate","propel","prophesy","propitiate","propose","proposition","propound","proscribe","prosecute","proselytise","proselytize","prospect","prosper","prostrate","protect","protest","protrude","prove","provide","provision","provoke","prowl","prune","pry","psych","psychoanalyse","publicise","publicize","publish","pucker","puff","pull","pullulate","pulp","pulsate","pulse","pulverise","pulverize","pummel","pump","pun","punch","punctuate","puncture","punish","punt","pupate","purchase","purge","purify","purl","purloin","purport","purr","purse","pursue","purvey","push","pussyfoot","put","putrefy","putt","putter","puzzle","quack","quadruple","quaff","quail","quake","qualify","quantify","quarantine","quarrel","quarry","quarter","quarterback","quash","quaver","quell","quench","query","quest","question","queue","quibble","quicken","quiet","quieten","quintuple","quip","quirk","quit","quiver","quiz","quote","quoth","rabbit","race","rack","radiate","radicalise","radicalize","radio","raffle","rag","rage","raid","rail","railroad","rain","raise","rake","rally","ram","ramble","ramp","rampage","randomise","randomize","range","rank","rankle","ransack","ransom","rant","rap","rappel","rasp","rasterise","rasterize","rat","ratchet","rate","ratify","ration","rationalise","rationalize","rattle","ravage","rave","ravel","ravish","raze","razz","reach","reacquaint","react","reactivate","read","readdress","readies","readjust","readmit","ready","reaffirm","realign","realise","realize","reallocate","ream","reanimate","reap","reappear","reapply","reappoint","reappraise","rear","rearm","rearrange","reason","reassemble","reassert","reassess","reassign","reassure","reawaken","rebel","reboot","reborn","rebound","rebrand","rebuff","rebuild","rebuke","rebut","recall","recant","recap","recapitulate","recapture","recast","recede","receive","recess","recharge","reciprocate","recite","reckon","reclaim","reclassify","recline","recognise","recognize","recoil","recollect","recommence","recommend","recompense","reconcile","recondition","reconfigure","reconfirm","reconnect","reconnoitre","reconquer","reconsider","reconstitute","reconstruct","reconvene","record","recount","recoup","recover","recreate","recrudesce","recruit","rectify","recuperate","recur","recycle","redact","redden","redecorate","redeem","redefine","redeploy","redesign","redevelop","redial","redirect","rediscover","redistribute","redistrict","redo","redouble","redound","redraft","redraw","redress","reduce","reduplicate","reef","reek","reel","ref","refer","referee","reference","refill","refinance","refine","refit","reflate","reflect","refloat","refocus","reform","reformat","reformulate","refract","refrain","refresh","refrigerate","refuel","refund","refurbish","refuse","refute","regain","regale","regard","regenerate","register","regress","regret","regroup","regularise","regularize","regulate","regurgitate","rehabilitate","rehash","rehear","rehearse","reheat","rehome","rehouse","reign","reignite","reimburse","rein","reincarnate","reinforce","reinstate","reinterpret","reintroduce","reinvent","reinvest","reinvigorate","reissue","reiterate","reject","rejig","rejigger","rejoice","rejoin","rejuvenate","rekindle","relapse","relate","relaunch","relax","relay","release","relegate","relent","relieve","relinquish","relish","relive","reload","relocate","rely","remain","remainder","remake","remand","remap","remark","remarry","remaster","remediate","remedy","remember","remind","reminisce","remit","remix","remodel","remonstrate","remortgage","remould","remount","remove","remunerate","rename","rend","render","rendezvous","renege","renew","renounce","renovate","rent","reoccur","reoffend","reopen","reorder","reorganise","reorganize","reorient","repackage","repair","repatriate","repay","repeal","repeat","repel","repent","rephrase","replace","replay","replenish","replicate","reply","report","repose","repossess","represent","repress","reprieve","reprimand","reprint","reproach","reprocess","reproduce","reprove","repudiate","repulse","repurpose","request","require","requisition","requite","rerun","reschedule","rescind","rescue","research","researches","resect","resell","resemble","resent","reserve","reset","resettle","reshape","reshuffle","reside","resign","resist","resit","resize","reskill","resolve","resonate","resort","resound","resource","respect","respire","respond","respray","rest","restart","restate","restock","restore","restrain","restrict","restring","restructure","result","resume","resupply","resurface","resurrect","resuscitate","retail","retain","retake","retaliate","retch","retell","retest","rethink","retire","retool","retort","retouch","retrace","retract","retrain","retreat","retrench","retrieve","retrofit","retry","return","reunify","reunite","reuse","rev","revalue","revamp","reveal","revel","revenge","reverberate","revere","reverse","revert","review","revile","revise","revisit","revitalise","revitalize","revive","revivify","revoke","revolt","revolutionise","revolutionize","revolve","reward","rewind","rewire","reword","rework","rewrite","rhapsodise","rhapsodize","rhyme","rib","rick","ricochet","rid","riddle","ride","ridge","ridicule","riffle","rifle","rig","right","rightsize","rile","rim","ring","rinse","riot","rip","ripen","riposte","ripple","rise","risk","ritualise","ritualize","rival","rivet","roam","roar","roast","rob","robe","rock","rocket","roger","roll","romance","romanticise","romanticize","romp","roof","room","roost","root","rope","rosin","roster","rot","rotate","rouge","rough","roughen","roughhouse","round","rouse","roust","rout","route","rove","row","rub","rubberneck","rubbish","ruck","rue","ruffle","ruin","ruins","rule","rumble","ruminate","rummage","rumor","rumour","rumple","run","rupture","rush","rust","rustle","sabotage","sack","sacrifice","sadden","saddle","safeguard","sag","sail","salaam","salivate","sally","salt","salute","salvage","salve","sample","sanctify","sanction","sand","sandbag","sandblast","sandpaper","sandwich","sanitise","sanitize","sap","sashay","sass","sate","satiate","satirise","satirize","satisfy","saturate","saunter","savage","save","savor","savour","saw","say","scald","scale","scallop","scalp","scamper","scan","scandalise","scandalize","scapegoat","scar","scare","scarf","scarify","scarper","scatter","scattering","scavenge","scent","schedule","schematise","schematize","scheme","schlep","schlepp","schmooze","school","schtup","schuss","scoff","scold","scoop","scoot","scope","scorch","score","scorn","scotch","scour","scourge","scout","scowl","scrabble","scram","scramble","scrap","scrape","scratch","scrawl","scream","screech","screen","screw","scribble","scrimp","script","scroll","scrounge","scrub","scrummage","scrunch","scruple","scrutinise","scrutinize","scud","scuff","scuffle","scull","sculpt","scupper","scurry","scuttle","scythe","seal","sealift","sear","search","season","seat","secede","seclude","second","secrete","section","secularise","secularize","secure","sedate","see","seed","seek","seep","seethe","segment","segregate","segue","seize","select","sell","sellotape","semaphore","send","sensationalise","sensationalize","sense","sensitise","sensitize","sentence","sentimentalise","sentimentalize","separate","sequence","sequester","sequestrate","serenade","serialise","serialize","sermonise","sermonize","serve","service","set","settle","sever","sew","shack","shackle","shade","shadow","shaft","shake","shalt","sham","shamble","shame","shampoo","shanghai","shape","share","sharpen","shatter","shave","shear","sheathe","shed","sheer","shell","shellac","shelter","shelve","shepherd","shield","shift","shimmer","shimmy","shin","shine","shinny","ship","shipwreck","shirk","shiver","shock","shoe","shoehorn","shoo","shoot","shop","shoplift","shore","short","shorten","shortlist","shoulder","shout","shove","shovel","show","showboat","showcase","shower","shred","shriek","shrill","shrink","shrivel","shroom","shroud","shrug","shuck","shudder","shuffle","shun","shunt","shush","shut","shuttle","shy","sic","sick","sicken","side","sideline","sidestep","sideswipe","sidetrack","sidle","sieve","sift","sigh","sight","sightsee","sign","signal","signify","signpost","silence","silhouette","silt","silver","simmer","simper","simplify","simulate","simulcast","sin","sing","singe","single","sink","sip","siphon","sire","sit","site","situate","size","sizzle","skate","skateboard","skedaddle","sketch","skew","skewer","ski","skid","skim","skimp","skin","skip","skipper","skirmish","skirt","skitter","skive","skivvy","skulk","sky","skyjack","skyrocket","slack","slacken","slake","slam","slander","slap","slash","slate","slather","sledge","sleek","sleep","sleepwalk","sleet","slew","slice","slick","slide","slight","slim","sling","slink","slip","slit","slither","slob","slobber","slog","slop","slope","slosh","slot","slouch","slough","slow","slug","sluice","slum","slumber","slump","slur","slurp","smart","smarten","smash","smear","smell","smelt","smile","smirk","smite","smoke","smooch","smoodge","smooth","smother","smoulder","smudge","smuggle","snack","snaffle","snag","snaggle","snake","snap","snare","snarf","snarl","sneak","sneer","sneeze","snicker","sniff","sniffle","snip","snipe","snitch","snivel","snooker","snoop","snooper","snooze","snore","snorkel","snort","snow","snowball","snowplough","snowplow","snub","snuffle","snuffling","snuggle","soak","soap","soar","sober","socialise","socialize","sock","sod","soften","soil","sojourn","solace","solder","soldier","sole","solemnise","solemnize","solicit","solidify","soliloquize","solve","somersault","soothe","sorrow","sort","sough","sound","soundproof","soup","sour","source","sow","space","span","spangle","spar","spare","spark","sparkle","spatter","spattering","spawn","spay","speak","spear","spearhead","spec","specialise","specialize","specify","spectacles","spectate","speculate","speed","spell","spellcheck","spend","spew","spice","spiff","spike","spill","spin","spiral","spirit","spit","spite","splash","splatter","splay","splice","splinter","split","splosh","splurge","splutter","spoil","sponge","sponsor","spoof","spook","spool","spoon","sport","sports","spot","spotlight","spout","sprain","sprawl","spray","spread","spring","springboard","sprinkle","sprint","spritz","sprout","spruce","spur","spurn","spurt","sputter","spy","squabble","squall","squander","square","squash","squat","squawk","squeak","squeal","squeeze","squelch","squint","squirm","squirrel","squirt","squish","stab","stabilise","stabilize","stable","stables","stack","staff","stage","stagger","stagnate","stain","stake","stalk","stall","stammer","stamp","stampede","stanch","stand","standardise","standardize","staple","star","starch","stare","start","startle","starve","stash","state","statement","station","staunch","stave","stay","steady","steal","steam","steamroller","steel","steep","steepen","steer","stem","stencil","step","stereotype","sterilise","sterilize","stew","stick","stickybeak","stiff","stiffen","stifle","stigmatise","stigmatize","still","stimulate","sting","stinger","stink","stint","stipple","stipulate","stir","stitch","stock","stockpile","stoke","stomach","stomp","stone","stonewall","stoop","stop","stopper","store","storm","storyboard","stow","straddle","strafe","straggle","straighten","strain","strand","strangle","strap","stratify","stravage","stravaig","stray","streak","stream","streamline","strengthen","stress","stretch","stretcher","strew","stride","strike","string","strip","strive","stroll","structure","struggle","strum","strut","stub","stud","study","stuff","stultify","stumble","stump","stun","stunt","stupefy","stutter","style","stymie","sub","subcontract","subdivide","subdue","subedit","subject","sublet","sublimate","submerge","submit","subordinate","suborn","subpoena","subscribe","subside","subsidise","subsidize","subsist","substantiate","substitute","subsume","subtend","subtitle","subtract","subvert","succeed","succor","succour","succumb","suckle","suction","sue","suffer","suffice","suffocate","suffuse","sugar","suggest","suit","sulk","sulks","sully","sum","summarise","summarize","summon","summons","sun","sunbathe","sunder","sunset","sup","superimpose","superintend","superpose","supersede","supersize","supersized","supervene","supervise","supplant","supplement","supply","support","suppose","suppress","suppurate","surcharge","surf","surface","surge","surmise","surmount","surpass","surprise","surrender","surround","survey","survive","suspect","suspend","suspenders","suss","sustain","suture","swab","swaddle","swagger","swamp","swan","swank","swap","swarm","swat","swath","swathe","sway","swear","sweat","sweep","sweeps","sweeten","swell","swelter","swerve","swig","swill","swim","swindle","swing","swipe","swirl","swish","switch","swivel","swoon","swoop","swoosh","swot","symbolise","symbolize","sympathise","sympathize","symptomize","synchronise","synchronize","syndicate","synthesise","synthesize","syringe","systematise","systematize","tab","table","tabulate","tack","tackle","tag","tail","tailgate","tailor","taint","take","talk","tally","tame","tamp","tamper","tan","tangle","tango","tank","tankful","tantalise","tantalize","tap","tape","taper","tar","target","tarmac","tarnish","tarry","tart","task","taste","tattle","tattoo","taunt","tauten","tax","taxi","taxicab","teach","team","tear","tease","tee","teem","teeter","teethe","telecast","telecommute","teleconference","telegraph","telemeter","teleoperate","telephone","teleport","telescope","televise","telex","tell","telnet","temp","temper","temporise","temporize","tempt","tenant","tend","tender","tenderise","tenderize","tense","tension","tergiversate","term","terminate","terraform","terrify","terrorise","terrorize","test","testify","tether","text","thank","thatch","thaw","theorise","theorize","thicken","thin","think","thirst","thrash","thread","threaten","thresh","thrill","thrive","throb","throbbing","throng","throttle","throw","thud","thumb","thump","thunder","thwack","thwart","tick","ticket","tickle","tide","tidy","tie","tighten","tile","till","tilt","time","timetable","tinge","tingle","tingling","tinker","tinkling","tint","tip","tippex","tipple","tiptoe","tire","titillate","titivate","title","titrate","titter","toady","toast","toboggan","toddle","toe","tog","toggle","toil","tolerate","toll","tone","tongue","tonify","tool","toot","tootle","top","topple","torch","torment","torpedo","toss","tot","total","tote","totter","touch","tough","toughen","tour","tousle","tout","tow","towel","tower","toy","trace","track","trade","traduce","traffic","trail","train","traipse","trammel","trample","trampoline","tranquilize","tranquillize","transact","transcend","transcribe","transfer","transfigure","transfix","transform","transfuse","transgress","transit","translate","transliterate","transmit","transmogrify","transmute","transpire","transplant","transport","transpose","trap","trash","traumatise","traumatize","travel","traverse","trawl","tread","treasure","treat","treble","trek","tremble","trembling","trepan","trespass","trial","trick","trickle","trifle","trigger","trill","trim","trip","triple","triumph","trivialise","trivialize","troll","tromp","troop","trot","trouble","troubleshoot","trounce","trouser","truant","truck","trudge","trump","trumpet","truncate","trundle","truss","trust","try","tuck","tug","tugboat","tumble","tune","tunnel","turbocharge","turf","turn","tussle","tut","tutor","twang","tweak","tweet","twiddle","twig","twin","twine","twinkle","twirl","twist","twitch","twitter","twittering","type","typecast","typeset","typify","tyrannise","tyrannize","ulcerate","ululate","ump","umpire","unbalance","unban","unbend","unblock","unbuckle","unburden","unbutton","uncoil","uncork","uncouple","uncover","uncurl","undelete","underachieve","underbid","undercharge","undercook","undercut","underestimate","underestimation","underexpose","undergo","underlie","underline","undermine","underpay","underperform","underpin","underplay","underrate","underscore","undersell","undershoot","underspend","understand","understate","understudy","undertake","undervalue","underwrite","undo","undock","undress","undulate","unearth","unfasten","unfold","unfreeze","unfurl","unhand","unhinge","unhitch","unhook","unify","uninstall","unionise","unionize","unite","unlace","unlearn","unleash","unload","unlock","unloose","unloosen","unmask","unnerve","unpack","unpick","unplug","unravel","unroll","unsaddle","unscramble","unscrew","unseat","unsettle","unsubscribe","untangle","untie","unveil","unwind","unwrap","unzip","up","upbraid","upchange","upchuck","update","upend","upgrade","uphold","upholster","uplift","upload","uproot","upsell","upset","upshift","upskill","upstage","urge","use","usher","usurp","utilise","utilize","utter","vacate","vacation","vaccinate","vacillate","vacuum","valet","validate","value","vamoose","vandalise","vandalize","vanish","vanquish","vaporise","vaporize","varnish","vary","vault","veer","veg","vegetate","veil","vend","veneer","venerate","vent","ventilate","venture","verbalise","verbalize","verge","verify","versify","vest","vet","veto","vex","vibrate","victimise","victimize","vide","video","videotape","vie","view","viewing","vilify","vindicate","violate","visit","visualise","visualize","vitiate","vitrify","vocalize","voice","void","volley","volumise","volumize","volunteer","vote","vouch","vouchsafe","vow","voyage","vulgarise","vulgarize","waddle","wade","waffle","waft","wag","wage","wager","waggle","wail","wait","waive","wake","wakeboard","waken","walk","wall","wallop","wallow","wallpaper","waltz","wander","wane","wangle","want","warble","ward","warm","warn","warp","warrant","wash","wassail","waste","watch","water","waterproof","waterski","wave","waver","wax","waylay","weaken","wean","weaponise","weaponize","wear","weary","weasel","weather","weatherise","weatherize","weave","wed","wedge","weekend","weep","weigh","weight","weird","welch","welcome","weld","well","welly","wend","westernise","westernize","wet","whack","wheedle","wheel","wheeze","whelp","whet","whiff","while","whilst","whimper","whine","whinge","whinny","whip","whirl","whirr","whirring","whisk","whisper","whispering","whistle","whiten","whitewash","whittle","whoop","whoosh","whup","wick","widen","widow","wield","wig","wiggle","wildcat","will","wilt","wimp","win","wince","winch","wind","winds","windsurf","wine","wing","wink","winkle","winnow","winter","wipe","wire","wiretap","wise","wisecrack","wish","withdraw","wither","withhold","withstand","witness","witter","wobble","wolf","wonder","woo","woof","word","work","worm","worry","worsen","worship","worst","wound","wow","wowee","wrangle","wrap","wreak","wreathe","wreck","wrench","wrest","wrestle","wriggle","wring","wrinkle","writ","write","writhe","wrong","wrought","xerox","yack","yak","yap","yaw","yawn","yearn","yell","yellow","yelp","yield","yodel","yoke","yomp","yowl","yuppify","zap","zero","zigzag","zing","zip","zone","zoom"],w$u={adjective:k$u,adverb:F$u,conjunction:y$u,interjection:A$u,noun:_$u,preposition:S$u,verb:B$u},L$u=w$u,z$u={airline:Hju,animal:iHu,app:lHu,cell_phone:hHu,color:gHu,commerce:vHu,company:wHu,database:MHu,date:RHu,finance:YHu,hacker:iVu,internet:lVu,location:BVu,lorem:zVu,metadata:TVu,music:IVu,person:i$u,phone_number:o$u,science:d$u,team:g$u,vehicle:b$u,word:L$u},At=z$u,BOe=Object.defineProperty,M$u=(u,e,t)=>e in u?BOe(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,T$u=(u,e)=>{for(var t in e)BOe(u,t,{get:e[t],enumerable:!0})},bu=(u,e,t)=>(M$u(u,typeof e!="symbol"?e+"":e,t),t),Pu=class extends Error{};function Ti(u){let e=Object.getPrototypeOf(u);do{for(let t of Object.getOwnPropertyNames(e))typeof u[t]=="function"&&t!=="constructor"&&(u[t]=u[t].bind(u));e=Object.getPrototypeOf(e)}while(e!==Object.prototype)}var wOe=(u=>(u.Narrowbody="narrowbody",u.Regional="regional",u.Widebody="widebody",u))(wOe||{}),N$u=["0","1","2","3","4","5","6","7","8","9"],P$u=["0","O","1","I","L"],R$u={regional:20,narrowbody:35,widebody:60},I$u={regional:["A","B","C","D"],narrowbody:["A","B","C","D","E","F"],widebody:["A","B","C","D","E","F","G","H","J","K"]},O$u=class{constructor(e){this.faker=e,Ti(this)}airport(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airport)}airline(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airline)}airplane(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airplane)}recordLocator(e={}){let{allowNumerics:t=!1,allowVisuallySimilarCharacters:n=!1}=e,i=[];return t||i.push(...N$u),n||i.push(...P$u),this.faker.string.alphanumeric({length:6,casing:"upper",exclude:i})}seat(e={}){let{aircraftType:t="narrowbody"}=e,n=R$u[t],i=I$u[t],r=this.faker.number.int({min:1,max:n}),a=this.faker.helpers.arrayElement(i);return`${r}${a}`}aircraftType(){return this.faker.helpers.enumValue(wOe)}flightNumber(e={}){let{length:t={min:1,max:4},addLeadingZeros:n=!1}=e,i=this.faker.string.numeric({length:t,allowLeadingZeros:!1});return n?i.padStart(4,"0"):i}},LOe=(u=>(u.SRGB="sRGB",u.DisplayP3="display-p3",u.REC2020="rec2020",u.A98RGB="a98-rgb",u.ProphotoRGB="prophoto-rgb",u))(LOe||{}),zOe=(u=>(u.RGB="rgb",u.RGBA="rgba",u.HSL="hsl",u.HSLA="hsla",u.HWB="hwb",u.CMYK="cmyk",u.LAB="lab",u.LCH="lch",u.COLOR="color",u))(zOe||{});function j$u(u,e){switch(e==null?void 0:e.casing){case"upper":u=u.toUpperCase();break;case"lower":u=u.toLowerCase();break}return e!=null&&e.prefix&&(u=e.prefix+u),u}function MOe(u){return u.map(e=>{if(e%1!==0){let t=new ArrayBuffer(4);new DataView(t).setFloat32(0,e);let n=new Uint8Array(t);return MOe(Array.from(n)).split(" ").join("")}return(e>>>0).toString(2).padStart(8,"0")}).join(" ")}function H$u(u,e="rgb",t="sRGB"){let n=i=>Math.round(i*100);switch(e){case"rgba":return`rgba(${u[0]}, ${u[1]}, ${u[2]}, ${u[3]})`;case"color":return`color(${t} ${u[0]} ${u[1]} ${u[2]})`;case"cmyk":return`cmyk(${n(u[0])}%, ${n(u[1])}%, ${n(u[2])}%, ${n(u[3])}%)`;case"hsl":return`hsl(${u[0]}deg ${n(u[1])}% ${n(u[2])}%)`;case"hsla":return`hsl(${u[0]}deg ${n(u[1])}% ${n(u[2])}% / ${n(u[3])})`;case"hwb":return`hwb(${u[0]} ${n(u[1])}% ${n(u[2])}%)`;case"lab":return`lab(${n(u[0])}% ${u[1]} ${u[2]})`;case"lch":return`lch(${n(u[0])}% ${u[1]} ${u[2]})`;case"rgb":default:return`rgb(${u[0]}, ${u[1]}, ${u[2]})`}}function uf(u,e,t="rgb",n="sRGB"){switch(e){case"css":return H$u(u,t,n);case"binary":return MOe(u);default:return u}}var V$u=class{constructor(e){this.faker=e,Ti(this)}human(){return this.faker.helpers.arrayElement(this.faker.definitions.color.human)}space(){return this.faker.helpers.arrayElement(this.faker.definitions.color.space)}cssSupportedFunction(){return this.faker.helpers.enumValue(zOe)}cssSupportedSpace(){return this.faker.helpers.enumValue(LOe)}rgb(e){let{format:t="hex",includeAlpha:n=!1,prefix:i="#",casing:r="lower"}=e||{};e={format:t,includeAlpha:n,prefix:i,casing:r};let a,o="rgb";return t==="hex"?(a=this.faker.string.hexadecimal({length:n?8:6,prefix:""}),a=j$u(a,e),a):(a=Array.from({length:3},()=>this.faker.number.int(255)),n&&(a.push(this.faker.number.float({precision:.01})),o="rgba"),uf(a,t,o))}cmyk(e){let t=Array.from({length:4},()=>this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal","cmyk")}hsl(e){let t=[this.faker.number.int(360)];for(let n=0;n<(e!=null&&e.includeAlpha?3:2);n++)t.push(this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal",e!=null&&e.includeAlpha?"hsla":"hsl")}hwb(e){let t=[this.faker.number.int(360)];for(let n=0;n<2;n++)t.push(this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal","hwb")}lab(e){let t=[this.faker.number.float({precision:1e-6})];for(let n=0;n<2;n++)t.push(this.faker.number.float({min:-100,max:100,precision:1e-4}));return uf(t,(e==null?void 0:e.format)||"decimal","lab")}lch(e){let t=[this.faker.number.float({precision:1e-6})];for(let n=0;n<2;n++)t.push(this.faker.number.float({max:230,precision:.1}));return uf(t,(e==null?void 0:e.format)||"decimal","lch")}colorByCSSColorSpace(e){(e==null?void 0:e.format)==="css"&&!(e!=null&&e.space)&&(e={...e,space:"sRGB"});let t=Array.from({length:3},()=>this.faker.number.float({precision:1e-4}));return uf(t,(e==null?void 0:e.format)||"decimal","color",e==null?void 0:e.space)}},TOe=(u=>(u.Female="female",u.Male="male",u))(TOe||{});function ub(u,e,t,{generic:n,female:i,male:r}={}){let a;switch(t){case"female":a=i;break;case"male":a=r;break;default:a=n;break}return a==null&&(i!=null&&r!=null?a=u.helpers.arrayElement([i,r]):a=n),e(a)}var $$u=class{constructor(e){this.faker=e,Ti(this)}firstName(e){var t;let{first_name:n,female_first_name:i,male_first_name:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}lastName(e){var t;let{last_name:n,female_last_name:i,male_last_name:r,last_name_pattern:a,male_last_name_pattern:o,female_last_name_pattern:s}=(t=this.faker.rawDefinitions.person)!=null?t:{};if(a!=null||o!=null||s!=null){let l=ub(this.faker,this.faker.helpers.weightedArrayElement,e,{generic:a,female:s,male:o});return this.faker.helpers.fake(l)}return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}middleName(e){var t;let{middle_name:n,female_middle_name:i,male_middle_name:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}fullName(e={}){let{sex:t=this.faker.helpers.arrayElement(["female","male"]),firstName:n=this.firstName(t),lastName:i=this.lastName(t)}=e,r=this.faker.helpers.weightedArrayElement(this.faker.definitions.person.name);return this.faker.helpers.mustache(r,{"person.prefix":()=>this.prefix(t),"person.firstName":()=>n,"person.middleName":()=>this.middleName(t),"person.lastName":()=>i,"person.suffix":()=>this.suffix()})}gender(){return this.faker.helpers.arrayElement(this.faker.definitions.person.gender)}sex(){return this.faker.helpers.arrayElement(this.faker.definitions.person.sex)}sexType(){return this.faker.helpers.enumValue(TOe)}bio(){let{bio_pattern:e}=this.faker.definitions.person;return this.faker.helpers.fake(e)}prefix(e){var t;let{prefix:n,female_prefix:i,male_prefix:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}suffix(){return this.faker.helpers.arrayElement(this.faker.definitions.person.suffix)}jobTitle(){return`${this.jobDescriptor()} ${this.jobArea()} ${this.jobType()}`}jobDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.descriptor)}jobArea(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.level)}jobType(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.job)}zodiacSign(){return this.faker.helpers.arrayElement(this.faker.definitions.person.western_zodiac_sign)}},K$u=class{constructor(){bu(this,"N",624),bu(this,"M",397),bu(this,"MATRIX_A",2567483615),bu(this,"UPPER_MASK",2147483648),bu(this,"LOWER_MASK",2147483647),bu(this,"mt",Array.from({length:this.N})),bu(this,"mti",this.N+1),bu(this,"mag01",[0,this.MATRIX_A])}unsigned32(e){return e<0?(e^this.UPPER_MASK)+this.UPPER_MASK:e}subtraction32(e,t){return e>>i&1&&(n=this.addition32(n,this.unsigned32(t<>>30)),this.mti),this.mt[this.mti]=this.unsigned32(this.mt[this.mti]&4294967295)}initByArray(e,t){this.initGenrand(19650218);let n=1,i=0,r=this.N>t?this.N:t;for(;r;r--)this.mt[n]=this.addition32(this.addition32(this.unsigned32(this.mt[n]^this.multiplication32(this.unsigned32(this.mt[n-1]^this.mt[n-1]>>>30),1664525)),e[i]),i),this.mt[n]=this.unsigned32(this.mt[n]&4294967295),n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0);for(r=this.N-1;r;r--)this.mt[n]=this.subtraction32(this.unsigned32(this.mt[n]^this.multiplication32(this.unsigned32(this.mt[n-1]^this.mt[n-1]>>>30),1566083941)),n),this.mt[n]=this.unsigned32(this.mt[n]&4294967295),n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1);this.mt[0]=2147483648}genrandInt32(){let e;if(this.mti>=this.N){let t;for(this.mti===this.N+1&&this.initGenrand(5489),t=0;t>>1^this.mag01[e&1]);for(;t>>1^this.mag01[e&1]);e=this.unsigned32(this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK),this.mt[this.N-1]=this.unsigned32(this.mt[this.M-1]^e>>>1^this.mag01[e&1]),this.mti=0}return e=this.mt[this.mti++],e=this.unsigned32(e^e>>>11),e=this.unsigned32(e^e<<7&2636928640),e=this.unsigned32(e^e<<15&4022730752),e=this.unsigned32(e^e>>>18),e}genrandInt31(){return this.genrandInt32()>>>1}genrandReal1(){return this.genrandInt32()*(1/4294967295)}genrandReal2(){return this.genrandInt32()*(1/4294967296)}genrandReal3(){return(this.genrandInt32()+.5)*(1/4294967296)}genrandRes53(){let e=this.genrandInt32()>>>5,t=this.genrandInt32()>>>6;return(e*67108864+t)*(1/9007199254740992)}};function W$u(){let u=new K$u;return u.initGenrand(Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)),{next(){return u.genrandReal2()},seed(e){typeof e=="number"?u.initGenrand(e):Array.isArray(e)&&u.initByArray(e,e.length)}}}function lt(u){let e=`[@faker-js/faker]: ${u.deprecated} is deprecated`;u.since&&(e+=` since v${u.since}`),u.until&&(e+=` and will be removed in v${u.until}`),u.proposed&&(e+=`. Please use ${u.proposed} instead`),console.warn(`${e}.`)}var G$u=class{constructor(e){this.faker=e,Ti(this)}number(e=99999){lt({deprecated:"faker.datatype.number()",proposed:"faker.number.int()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={max:e});let{min:t=0,max:n=t+99999,precision:i=1}=e;return this.faker.number.float({min:t,max:n,precision:i})}float(e={}){lt({deprecated:"faker.datatype.float()",proposed:"faker.number.float()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={precision:e});let{min:t=0,max:n=t+99999,precision:i=.01}=e;return this.faker.number.float({min:t,max:n,precision:i})}datetime(e={}){lt({deprecated:"faker.datatype.datetime({ min, max })",proposed:"faker.date.between({ from, to }) or faker.date.anytime()",since:"8.0",until:"9.0"});let t=864e13,n=typeof e=="number"?void 0:e.min,i=typeof e=="number"?e:e.max;return(n==null||nt)&&(i=Date.UTC(2100,0)),this.faker.date.between({from:n,to:i})}string(e={}){lt({deprecated:"faker.datatype.string()",proposed:"faker.string.sample()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={length:e});let{length:t=10}=e;return this.faker.string.sample(t)}uuid(){return lt({deprecated:"faker.datatype.uuid()",proposed:"faker.string.uuid()",since:"8.0",until:"9.0"}),this.faker.string.uuid()}boolean(e={}){typeof e=="number"&&(e={probability:e});let{probability:t=.5}=e;return t<=0?!1:t>=1?!0:this.faker.number.float()this.boolean()?this.faker.string.sample():this.faker.number.int(),{count:e})}bigInt(e){return lt({deprecated:"faker.datatype.bigInt()",proposed:"faker.number.bigInt()",since:"8.0",until:"9.0"}),this.faker.number.bigInt(e)}};function Z4(u,e){return u=new Date(u),isNaN(u.valueOf())&&(u=e()),u}var NOe=class{constructor(e){this.faker=e,Ti(this)}anytime(e={}){let{refDate:t}=e,n=Z4(t,this.faker.defaultRefDate);return this.between({from:new Date(n.getTime()-1e3*60*60*24*365),to:new Date(n.getTime()+1e3*60*60*24*365)})}past(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.past(years, refDate)",proposed:"faker.date.past({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Years must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*365*24*3600*1e3},o=r.getTime();return o-=this.faker.number.int(a),r.setTime(o),r}future(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.future(years, refDate)",proposed:"faker.date.future({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Years must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*365*24*3600*1e3},o=r.getTime();return o+=this.faker.number.int(a),r.setTime(o),r}between(e,t){(typeof e!="object"||e instanceof Date)&&(lt({deprecated:"faker.date.between(from, to)",proposed:"faker.date.between({ from, to })",since:"8.0",until:"9.0"}),e={from:e,to:t});let{from:n,to:i}=e,r=Z4(n,this.faker.defaultRefDate).getTime(),a=Z4(i,this.faker.defaultRefDate).getTime(),o=this.faker.number.int(a-r);return new Date(r+o)}betweens(e,t,n=3){(typeof e!="object"||e instanceof Date)&&(lt({deprecated:"faker.date.betweens(from, to, count)",proposed:"faker.date.betweens({ from, to, count })",since:"8.0",until:"9.0"}),e={from:e,to:t,count:n});let{from:i,to:r,count:a=3}=e;return this.faker.helpers.multiple(()=>this.between({from:i,to:r}),{count:a}).sort((o,s)=>o.getTime()-s.getTime())}recent(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.recent(days, refDate)",proposed:"faker.date.recent({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Days must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*24*3600*1e3},o=r.getTime();return o-=this.faker.number.int(a),r.setTime(o),r}soon(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.soon(days, refDate)",proposed:"faker.date.soon({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Days must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*24*3600*1e3},o=r.getTime();return o+=this.faker.number.int(a),r.setTime(o),r}birthdate(e={}){var t,n,i,r;if(e.max=0;n--){let i=parseInt(u.substring(n,n+1));t&&(i*=2,i>9&&(i=i%10+1)),e+=i,t=!t}return e%10}function Z$u(u,e){return u[e]===void 0?-1:0}function C5e(u,e,t,n,i){throw console.error("Error",t),console.log(`Found ${Object.keys(n).length} unique entries before throwing error. + `},mOu={onDragStart(u){let{active:e}=u;return"Picked up draggable item "+e.id+"."},onDragOver(u){let{active:e,over:t}=u;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(u){let{active:e,over:t}=u;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(u){let{active:e}=u;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function gOu(u){let{announcements:e=mOu,container:t,hiddenTextDescribedById:n,screenReaderInstructions:i=EOu}=u;const{announce:r,announcement:a}=cOu(),o=z7("DndLiveRegion"),[s,l]=C.useState(!1);if(C.useEffect(()=>{l(!0)},[]),dOu(C.useMemo(()=>({onDragStart(d){let{active:h}=d;r(e.onDragStart({active:h}))},onDragMove(d){let{active:h,over:E}=d;e.onDragMove&&r(e.onDragMove({active:h,over:E}))},onDragOver(d){let{active:h,over:E}=d;r(e.onDragOver({active:h,over:E}))},onDragEnd(d){let{active:h,over:E}=d;r(e.onDragEnd({active:h,over:E}))},onDragCancel(d){let{active:h,over:E}=d;r(e.onDragCancel({active:h,over:E}))}}),[r,e])),!s)return null;const c=M.createElement(M.Fragment,null,M.createElement(oOu,{id:n,value:i.draggable}),M.createElement(lOu,{id:o,announcement:a}));return t?is.createPortal(c,t):c}var ha;(function(u){u.DragStart="dragStart",u.DragMove="dragMove",u.DragEnd="dragEnd",u.DragCancel="dragCancel",u.DragOver="dragOver",u.RegisterDroppable="registerDroppable",u.SetDroppableDisabled="setDroppableDisabled",u.UnregisterDroppable="unregisterDroppable"})(ha||(ha={}));function EN(){}const ld=Object.freeze({x:0,y:0});function fOu(u,e){return Math.sqrt(Math.pow(u.x-e.x,2)+Math.pow(u.y-e.y,2))}function pOu(u,e){const t=hN(u);if(!t)return"0 0";const n={x:(t.x-e.left)/e.width*100,y:(t.y-e.top)/e.height*100};return n.x+"% "+n.y+"%"}function DOu(u,e){let{data:{value:t}}=u,{data:{value:n}}=e;return t-n}function xOu(u,e){let{data:{value:t}}=u,{data:{value:n}}=e;return n-t}function vOu(u,e){if(!u||u.length===0)return null;const[t]=u;return e?t[e]:t}function o5e(u,e,t){return e===void 0&&(e=u.left),t===void 0&&(t=u.top),{x:e+u.width*.5,y:t+u.height*.5}}const COu=u=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=u;const i=o5e(e,e.left,e.top),r=[];for(const a of n){const{id:o}=a,s=t.get(o);if(s){const l=fOu(o5e(s),i);r.push({id:o,data:{droppableContainer:a,value:l}})}}return r.sort(DOu)};function bOu(u,e){const t=Math.max(e.top,u.top),n=Math.max(e.left,u.left),i=Math.min(e.left+e.width,u.left+u.width),r=Math.min(e.top+e.height,u.top+u.height),a=i-n,o=r-t;if(n{let{collisionRect:e,droppableRects:t,droppableContainers:n}=u;const i=[];for(const r of n){const{id:a}=r,o=t.get(a);if(o){const s=bOu(o,e);s>0&&i.push({id:a,data:{droppableContainer:r,value:s}})}}return i.sort(xOu)};function FOu(u,e,t){return{...u,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function nOe(u,e){return u&&e?{x:u.left-e.left,y:u.top-e.top}:ld}function yOu(u){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r({...a,top:a.top+u*o.y,bottom:a.bottom+u*o.y,left:a.left+u*o.x,right:a.right+u*o.x}),{...t})}}const AOu=yOu(1);function iOe(u){if(u.startsWith("matrix3d(")){const e=u.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(u.startsWith("matrix(")){const e=u.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function _Ou(u,e,t){const n=iOe(e);if(!n)return u;const{scaleX:i,scaleY:r,x:a,y:o}=n,s=u.left-a-(1-i)*parseFloat(t),l=u.top-o-(1-r)*parseFloat(t.slice(t.indexOf(" ")+1)),c=i?u.width/i:u.width,d=r?u.height/r:u.height;return{width:c,height:d,top:l,right:s+c,bottom:l+d,left:s}}const SOu={ignoreTransform:!1};function M7(u,e){e===void 0&&(e=SOu);let t=u.getBoundingClientRect();if(e.ignoreTransform){const{transform:l,transformOrigin:c}=ks(u).getComputedStyle(u);l&&(t=_Ou(t,l,c))}const{top:n,left:i,width:r,height:a,bottom:o,right:s}=t;return{top:n,left:i,width:r,height:a,bottom:o,right:s}}function s5e(u){return M7(u,{ignoreTransform:!0})}function BOu(u){const e=u.innerWidth,t=u.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function wOu(u,e){return e===void 0&&(e=ks(u).getComputedStyle(u)),e.position==="fixed"}function LOu(u,e){e===void 0&&(e=ks(u).getComputedStyle(u));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const r=e[i];return typeof r=="string"?t.test(r):!1})}function sre(u,e){const t=[];function n(i){if(e!=null&&t.length>=e||!i)return t;if(are(i)&&i.scrollingElement!=null&&!t.includes(i.scrollingElement))return t.push(i.scrollingElement),t;if(!w7(i)||tOu(i)||t.includes(i))return t;const r=ks(u).getComputedStyle(i);return i!==u&&LOu(i,r)&&t.push(i),wOu(i,r)?t:n(i.parentNode)}return u?n(u):t}function rOe(u){const[e]=sre(u,1);return e??null}function Z$(u){return!zO||!u?null:J6(u)?u:rre(u)?are(u)||u===Z6(u).scrollingElement?window:w7(u)?u:null:null}function aOe(u){return J6(u)?u.scrollX:u.scrollLeft}function oOe(u){return J6(u)?u.scrollY:u.scrollTop}function eQ(u){return{x:aOe(u),y:oOe(u)}}var za;(function(u){u[u.Forward=1]="Forward",u[u.Backward=-1]="Backward"})(za||(za={}));function sOe(u){return!zO||!u?!1:u===document.scrollingElement}function lOe(u){const e={x:0,y:0},t=sOe(u)?{height:window.innerHeight,width:window.innerWidth}:{height:u.clientHeight,width:u.clientWidth},n={x:u.scrollWidth-t.width,y:u.scrollHeight-t.height},i=u.scrollTop<=e.y,r=u.scrollLeft<=e.x,a=u.scrollTop>=n.y,o=u.scrollLeft>=n.x;return{isTop:i,isLeft:r,isBottom:a,isRight:o,maxScroll:n,minScroll:e}}const zOu={x:.2,y:.2};function MOu(u,e,t,n,i){let{top:r,left:a,right:o,bottom:s}=t;n===void 0&&(n=10),i===void 0&&(i=zOu);const{isTop:l,isBottom:c,isLeft:d,isRight:h}=lOe(u),E={x:0,y:0},m={x:0,y:0},g={height:e.height*i.y,width:e.width*i.x};return!l&&r<=e.top+g.height?(E.y=za.Backward,m.y=n*Math.abs((e.top+g.height-r)/g.height)):!c&&s>=e.bottom-g.height&&(E.y=za.Forward,m.y=n*Math.abs((e.bottom-g.height-s)/g.height)),!h&&o>=e.right-g.width?(E.x=za.Forward,m.x=n*Math.abs((e.right-g.width-o)/g.width)):!d&&a<=e.left+g.width&&(E.x=za.Backward,m.x=n*Math.abs((e.left+g.width-a)/g.width)),{direction:E,speed:m}}function TOu(u){if(u===document.scrollingElement){const{innerWidth:r,innerHeight:a}=window;return{top:0,left:0,right:r,bottom:a,width:r,height:a}}const{top:e,left:t,right:n,bottom:i}=u.getBoundingClientRect();return{top:e,left:t,right:n,bottom:i,width:u.clientWidth,height:u.clientHeight}}function cOe(u){return u.reduce((e,t)=>Hx(e,eQ(t)),ld)}function NOu(u){return u.reduce((e,t)=>e+aOe(t),0)}function POu(u){return u.reduce((e,t)=>e+oOe(t),0)}function dOe(u,e){if(e===void 0&&(e=M7),!u)return;const{top:t,left:n,bottom:i,right:r}=e(u);rOe(u)&&(i<=0||r<=0||t>=window.innerHeight||n>=window.innerWidth)&&u.scrollIntoView({block:"center",inline:"center"})}const ROu=[["x",["left","right"],NOu],["y",["top","bottom"],POu]];class lre{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=sre(t),i=cOe(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[r,a,o]of ROu)for(const s of a)Object.defineProperty(this,s,{get:()=>{const l=o(n),c=i[r]-l;return this.rect[s]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class J2{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var i;(i=this.target)==null||i.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function IOu(u){const{EventTarget:e}=ks(u);return u instanceof e?u:Z6(u)}function Y$(u,e){const t=Math.abs(u.x),n=Math.abs(u.y);return typeof e=="number"?Math.sqrt(t**2+n**2)>e:"x"in e&&"y"in e?t>e.x&&n>e.y:"x"in e?t>e.x:"y"in e?n>e.y:!1}var ol;(function(u){u.Click="click",u.DragStart="dragstart",u.Keydown="keydown",u.ContextMenu="contextmenu",u.Resize="resize",u.SelectionChange="selectionchange",u.VisibilityChange="visibilitychange"})(ol||(ol={}));function l5e(u){u.preventDefault()}function OOu(u){u.stopPropagation()}var Gn;(function(u){u.Space="Space",u.Down="ArrowDown",u.Right="ArrowRight",u.Left="ArrowLeft",u.Up="ArrowUp",u.Esc="Escape",u.Enter="Enter"})(Gn||(Gn={}));const hOe={start:[Gn.Space,Gn.Enter],cancel:[Gn.Esc],end:[Gn.Space,Gn.Enter]},jOu=(u,e)=>{let{currentCoordinates:t}=e;switch(u.code){case Gn.Right:return{...t,x:t.x+25};case Gn.Left:return{...t,x:t.x-25};case Gn.Down:return{...t,y:t.y+25};case Gn.Up:return{...t,y:t.y-25}}};class EOe{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new J2(Z6(t)),this.windowListeners=new J2(ks(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ol.Resize,this.handleCancel),this.windowListeners.add(ol.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ol.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&dOe(n),t(ld)}handleKeyDown(e){if(ore(e)){const{active:t,context:n,options:i}=this.props,{keyboardCodes:r=hOe,coordinateGetter:a=jOu,scrollBehavior:o="smooth"}=i,{code:s}=e;if(r.end.includes(s)){this.handleEnd(e);return}if(r.cancel.includes(s)){this.handleCancel(e);return}const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:ld;this.referenceCoordinates||(this.referenceCoordinates=c);const d=a(e,{active:t,context:n.current,currentCoordinates:c});if(d){const h=dN(d,c),E={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const f=e.code,{isTop:p,isRight:D,isLeft:x,isBottom:b,maxScroll:k,minScroll:A}=lOe(g),F=TOu(g),S={x:Math.min(f===Gn.Right?F.right-F.width/2:F.right,Math.max(f===Gn.Right?F.left:F.left+F.width/2,d.x)),y:Math.min(f===Gn.Down?F.bottom-F.height/2:F.bottom,Math.max(f===Gn.Down?F.top:F.top+F.height/2,d.y))},w=f===Gn.Right&&!D||f===Gn.Left&&!x,z=f===Gn.Down&&!b||f===Gn.Up&&!p;if(w&&S.x!==d.x){const N=g.scrollLeft+h.x,O=f===Gn.Right&&N<=k.x||f===Gn.Left&&N>=A.x;if(O&&!h.y){g.scrollTo({left:N,behavior:o});return}O?E.x=g.scrollLeft-N:E.x=f===Gn.Right?g.scrollLeft-k.x:g.scrollLeft-A.x,E.x&&g.scrollBy({left:-E.x,behavior:o});break}else if(z&&S.y!==d.y){const N=g.scrollTop+h.y,O=f===Gn.Down&&N<=k.y||f===Gn.Up&&N>=A.y;if(O&&!h.x){g.scrollTo({top:N,behavior:o});return}O?E.y=g.scrollTop-N:E.y=f===Gn.Down?g.scrollTop-k.y:g.scrollTop-A.y,E.y&&g.scrollBy({top:-E.y,behavior:o});break}}this.handleMove(e,Hx(dN(d,this.referenceCoordinates),E))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EOe.activators=[{eventName:"onKeyDown",handler:(u,e,t)=>{let{keyboardCodes:n=hOe,onActivation:i}=e,{active:r}=t;const{code:a}=u.nativeEvent;if(n.start.includes(a)){const o=r.activatorNode.current;return o&&u.target!==o?!1:(u.preventDefault(),i==null||i({event:u.nativeEvent}),!0)}return!1}}];function c5e(u){return!!(u&&"distance"in u)}function d5e(u){return!!(u&&"delay"in u)}class cre{constructor(e,t,n){var i;n===void 0&&(n=IOu(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:a}=r;this.props=e,this.events=t,this.document=Z6(a),this.documentListeners=new J2(this.document),this.listeners=new J2(n),this.windowListeners=new J2(ks(a)),this.initialCoordinates=(i=hN(r))!=null?i:ld,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ol.Resize,this.handleCancel),this.windowListeners.add(ol.DragStart,l5e),this.windowListeners.add(ol.VisibilityChange,this.handleCancel),this.windowListeners.add(ol.ContextMenu,l5e),this.documentListeners.add(ol.Keydown,this.handleKeydown),t){if(c5e(t))return;if(d5e(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ol.Click,OOu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ol.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:i,props:r}=this,{onMove:a,options:{activationConstraint:o}}=r;if(!i)return;const s=(t=hN(e))!=null?t:ld,l=dN(i,s);if(!n&&o){if(d5e(o))return Y$(l,o.tolerance)?this.handleCancel():void 0;if(c5e(o))return o.tolerance!=null&&Y$(l,o.tolerance)?this.handleCancel():Y$(l,o.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Gn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const HOu={move:{name:"pointermove"},end:{name:"pointerup"}};class mOe extends cre{constructor(e){const{event:t}=e,n=Z6(t.target);super(e,HOu,n)}}mOe.activators=[{eventName:"onPointerDown",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;return!t.isPrimary||t.button!==0?!1:(n==null||n({event:t}),!0)}}];const VOu={move:{name:"mousemove"},end:{name:"mouseup"}};var tQ;(function(u){u[u.RightClick=2]="RightClick"})(tQ||(tQ={}));class $Ou extends cre{constructor(e){super(e,VOu,Z6(e.event.target))}}$Ou.activators=[{eventName:"onMouseDown",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;return t.button===tQ.RightClick?!1:(n==null||n({event:t}),!0)}}];const Q$={move:{name:"touchmove"},end:{name:"touchend"}};class KOu extends cre{constructor(e){super(e,Q$)}static setup(){return window.addEventListener(Q$.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Q$.move.name,e)};function e(){}}}KOu.activators=[{eventName:"onTouchStart",handler:(u,e)=>{let{nativeEvent:t}=u,{onActivation:n}=e;const{touches:i}=t;return i.length>1?!1:(n==null||n({event:t}),!0)}}];var Z2;(function(u){u[u.Pointer=0]="Pointer",u[u.DraggableRect=1]="DraggableRect"})(Z2||(Z2={}));var mN;(function(u){u[u.TreeOrder=0]="TreeOrder",u[u.ReversedTreeOrder=1]="ReversedTreeOrder"})(mN||(mN={}));function WOu(u){let{acceleration:e,activator:t=Z2.Pointer,canScroll:n,draggingRect:i,enabled:r,interval:a=5,order:o=mN.TreeOrder,pointerCoordinates:s,scrollableAncestors:l,scrollableAncestorRects:c,delta:d,threshold:h}=u;const E=UOu({delta:d,disabled:!r}),[m,g]=uOu(),f=C.useRef({x:0,y:0}),p=C.useRef({x:0,y:0}),D=C.useMemo(()=>{switch(t){case Z2.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case Z2.DraggableRect:return i}},[t,i,s]),x=C.useRef(null),b=C.useCallback(()=>{const A=x.current;if(!A)return;const F=f.current.x*p.current.x,S=f.current.y*p.current.y;A.scrollBy(F,S)},[]),k=C.useMemo(()=>o===mN.TreeOrder?[...l].reverse():l,[o,l]);C.useEffect(()=>{if(!r||!l.length||!D){g();return}for(const A of k){if((n==null?void 0:n(A))===!1)continue;const F=l.indexOf(A),S=c[F];if(!S)continue;const{direction:w,speed:z}=MOu(A,S,D,e,h);for(const N of["x","y"])E[N][w[N]]||(z[N]=0,w[N]=0);if(z.x>0||z.y>0){g(),x.current=A,m(b,a),f.current=z,p.current=w;return}}f.current={x:0,y:0},p.current={x:0,y:0},g()},[e,b,n,g,r,a,JSON.stringify(D),JSON.stringify(E),m,l,k,c,JSON.stringify(h)])}const GOu={x:{[za.Backward]:!1,[za.Forward]:!1},y:{[za.Backward]:!1,[za.Forward]:!1}};function UOu(u){let{delta:e,disabled:t}=u;const n=cN(e);return L7(i=>{if(t||!n||!i)return GOu;const r={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[za.Backward]:i.x[za.Backward]||r.x===-1,[za.Forward]:i.x[za.Forward]||r.x===1},y:{[za.Backward]:i.y[za.Backward]||r.y===-1,[za.Forward]:i.y[za.Forward]||r.y===1}}},[t,e,n])}function qOu(u,e){const t=e!==null?u.get(e):void 0,n=t?t.node.current:null;return L7(i=>{var r;return e===null?null:(r=n??i)!=null?r:null},[n,e])}function JOu(u,e){return C.useMemo(()=>u.reduce((t,n)=>{const{sensor:i}=n,r=i.activators.map(a=>({eventName:a.eventName,handler:e(a.handler,n)}));return[...t,...r]},[]),[u,e])}var Ky;(function(u){u[u.Always=0]="Always",u[u.BeforeDragging=1]="BeforeDragging",u[u.WhileDragging=2]="WhileDragging"})(Ky||(Ky={}));var uQ;(function(u){u.Optimized="optimized"})(uQ||(uQ={}));const h5e=new Map;function ZOu(u,e){let{dragging:t,dependencies:n,config:i}=e;const[r,a]=C.useState(null),{frequency:o,measure:s,strategy:l}=i,c=C.useRef(u),d=f(),h=Vy(d),E=C.useCallback(function(p){p===void 0&&(p=[]),!h.current&&a(D=>D===null?p:D.concat(p.filter(x=>!D.includes(x))))},[h]),m=C.useRef(null),g=L7(p=>{if(d&&!t)return h5e;if(!p||p===h5e||c.current!==u||r!=null){const D=new Map;for(let x of u){if(!x)continue;if(r&&r.length>0&&!r.includes(x.id)&&x.rect.current){D.set(x.id,x.rect.current);continue}const b=x.node.current,k=b?new lre(s(b),b):null;x.rect.current=k,k&&D.set(x.id,k)}return D}return p},[u,r,t,d,s]);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{d||E()},[t,d]),C.useEffect(()=>{r&&r.length>0&&a(null)},[JSON.stringify(r)]),C.useEffect(()=>{d||typeof o!="number"||m.current!==null||(m.current=setTimeout(()=>{E(),m.current=null},o))},[o,d,E,...n]),{droppableRects:g,measureDroppableContainers:E,measuringScheduled:r!=null};function f(){switch(l){case Ky.Always:return!1;case Ky.BeforeDragging:return t;default:return!t}}}function dre(u,e){return L7(t=>u?t||(typeof e=="function"?e(u):u):null,[e,u])}function YOu(u,e){return dre(u,e)}function QOu(u){let{callback:e,disabled:t}=u;const n=MO(e),i=C.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:r}=window;return new r(n)},[n,t]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function TO(u){let{callback:e,disabled:t}=u;const n=MO(e),i=C.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:r}=window;return new r(n)},[t]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function XOu(u){return new lre(M7(u),u)}function E5e(u,e,t){e===void 0&&(e=XOu);const[n,i]=C.useReducer(o,null),r=QOu({callback(s){if(u)for(const l of s){const{type:c,target:d}=l;if(c==="childList"&&d instanceof HTMLElement&&d.contains(u)){i();break}}}}),a=TO({callback:i});return sd(()=>{i(),u?(a==null||a.observe(u),r==null||r.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),r==null||r.disconnect())},[u]),n;function o(s){if(!u)return null;if(u.isConnected===!1){var l;return(l=s??t)!=null?l:null}const c=e(u);return JSON.stringify(s)===JSON.stringify(c)?s:c}}function eju(u){const e=dre(u);return nOe(u,e)}const m5e=[];function tju(u){const e=C.useRef(u),t=L7(n=>u?n&&n!==m5e&&u&&e.current&&u.parentNode===e.current.parentNode?n:sre(u):m5e,[u]);return C.useEffect(()=>{e.current=u},[u]),t}function uju(u){const[e,t]=C.useState(null),n=C.useRef(u),i=C.useCallback(r=>{const a=Z$(r.target);a&&t(o=>o?(o.set(a,eQ(a)),new Map(o)):null)},[]);return C.useEffect(()=>{const r=n.current;if(u!==r){a(r);const o=u.map(s=>{const l=Z$(s);return l?(l.addEventListener("scroll",i,{passive:!0}),[l,eQ(l)]):null}).filter(s=>s!=null);t(o.length?new Map(o):null),n.current=u}return()=>{a(u),a(r)};function a(o){o.forEach(s=>{const l=Z$(s);l==null||l.removeEventListener("scroll",i)})}},[i,u]),C.useMemo(()=>u.length?e?Array.from(e.values()).reduce((r,a)=>Hx(r,a),ld):cOe(u):ld,[u,e])}function g5e(u,e){e===void 0&&(e=[]);const t=C.useRef(null);return C.useEffect(()=>{t.current=null},e),C.useEffect(()=>{const n=u!==ld;n&&!t.current&&(t.current=u),!n&&t.current&&(t.current=null)},[u]),t.current?dN(u,t.current):ld}function nju(u){C.useEffect(()=>{if(!zO)return;const e=u.map(t=>{let{sensor:n}=t;return n.setup==null?void 0:n.setup()});return()=>{for(const t of e)t==null||t()}},u.map(e=>{let{sensor:t}=e;return t}))}function iju(u,e){return C.useMemo(()=>u.reduce((t,n)=>{let{eventName:i,handler:r}=n;return t[i]=a=>{r(a,e)},t},{}),[u,e])}function gOe(u){return C.useMemo(()=>u?BOu(u):null,[u])}const X$=[];function rju(u,e){e===void 0&&(e=M7);const[t]=u,n=gOe(t?ks(t):null),[i,r]=C.useReducer(o,X$),a=TO({callback:r});return u.length>0&&i===X$&&r(),sd(()=>{u.length?u.forEach(s=>a==null?void 0:a.observe(s)):(a==null||a.disconnect(),r())},[u]),i;function o(){return u.length?u.map(s=>sOe(s)?n:new lre(e(s),s)):X$}}function fOe(u){if(!u)return null;if(u.children.length>1)return u;const e=u.children[0];return w7(e)?e:u}function aju(u){let{measure:e}=u;const[t,n]=C.useState(null),i=C.useCallback(l=>{for(const{target:c}of l)if(w7(c)){n(d=>{const h=e(c);return d?{...d,width:h.width,height:h.height}:h});break}},[e]),r=TO({callback:i}),a=C.useCallback(l=>{const c=fOe(l);r==null||r.disconnect(),c&&(r==null||r.observe(c)),n(c?e(c):null)},[e,r]),[o,s]=lN(a);return C.useMemo(()=>({nodeRef:o,rect:t,setRef:s}),[t,o,s])}const oju=[{sensor:mOe,options:{}},{sensor:EOe,options:{}}],sju={current:{}},nB={draggable:{measure:s5e},droppable:{measure:s5e,strategy:Ky.WhileDragging,frequency:uQ.Optimized},dragOverlay:{measure:M7}};class Y2 extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}}const lju={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Y2,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:EN},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:nB,measureDroppableContainers:EN,windowRect:null,measuringScheduled:!1},pOe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:EN,draggableNodes:new Map,over:null,measureDroppableContainers:EN},T7=C.createContext(pOe),DOe=C.createContext(lju);function cju(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Y2}}}function dju(u,e){switch(e.type){case ha.DragStart:return{...u,draggable:{...u.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case ha.DragMove:return u.draggable.active?{...u,draggable:{...u.draggable,translate:{x:e.coordinates.x-u.draggable.initialCoordinates.x,y:e.coordinates.y-u.draggable.initialCoordinates.y}}}:u;case ha.DragEnd:case ha.DragCancel:return{...u,draggable:{...u.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ha.RegisterDroppable:{const{element:t}=e,{id:n}=t,i=new Y2(u.droppable.containers);return i.set(n,t),{...u,droppable:{...u.droppable,containers:i}}}case ha.SetDroppableDisabled:{const{id:t,key:n,disabled:i}=e,r=u.droppable.containers.get(t);if(!r||n!==r.key)return u;const a=new Y2(u.droppable.containers);return a.set(t,{...r,disabled:i}),{...u,droppable:{...u.droppable,containers:a}}}case ha.UnregisterDroppable:{const{id:t,key:n}=e,i=u.droppable.containers.get(t);if(!i||n!==i.key)return u;const r=new Y2(u.droppable.containers);return r.delete(t),{...u,droppable:{...u.droppable,containers:r}}}default:return u}}function hju(u){let{disabled:e}=u;const{active:t,activatorEvent:n,draggableNodes:i}=C.useContext(T7),r=cN(n),a=cN(t==null?void 0:t.id);return C.useEffect(()=>{if(!e&&!n&&r&&a!=null){if(!ore(r)||document.activeElement===r.target)return;const o=i.get(a);if(!o)return;const{activatorNode:s,node:l}=o;if(!s.current&&!l.current)return;requestAnimationFrame(()=>{for(const c of[s.current,l.current]){if(!c)continue;const d=rOu(c);if(d){d.focus();break}}})}},[n,e,i,a,r]),null}function xOe(u,e){let{transform:t,...n}=e;return u!=null&&u.length?u.reduce((i,r)=>r({transform:i,...n}),t):t}function Eju(u){return C.useMemo(()=>({draggable:{...nB.draggable,...u==null?void 0:u.draggable},droppable:{...nB.droppable,...u==null?void 0:u.droppable},dragOverlay:{...nB.dragOverlay,...u==null?void 0:u.dragOverlay}}),[u==null?void 0:u.draggable,u==null?void 0:u.droppable,u==null?void 0:u.dragOverlay])}function mju(u){let{activeNode:e,measure:t,initialRect:n,config:i=!0}=u;const r=C.useRef(!1),{x:a,y:o}=typeof i=="boolean"?{x:i,y:i}:i;sd(()=>{if(!a&&!o||!e){r.current=!1;return}if(r.current||!n)return;const l=e==null?void 0:e.node.current;if(!l||l.isConnected===!1)return;const c=t(l),d=nOe(c,n);if(a||(d.x=0),o||(d.y=0),r.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=rOe(l);h&&h.scrollBy({top:d.y,left:d.x})}},[e,a,o,n,t])}const NO=C.createContext({...ld,scaleX:1,scaleY:1});var DE;(function(u){u[u.Uninitialized=0]="Uninitialized",u[u.Initializing=1]="Initializing",u[u.Initialized=2]="Initialized"})(DE||(DE={}));const iB=C.memo(function(e){var t,n,i,r;let{id:a,accessibility:o,autoScroll:s=!0,children:l,sensors:c=oju,collisionDetection:d=kOu,measuring:h,modifiers:E,...m}=e;const g=C.useReducer(dju,void 0,cju),[f,p]=g,[D,x]=hOu(),[b,k]=C.useState(DE.Uninitialized),A=b===DE.Initialized,{draggable:{active:F,nodes:S,translate:w},droppable:{containers:z}}=f,N=F?S.get(F):null,O=C.useRef({initial:null,translated:null}),y=C.useMemo(()=>{var Vu;return F!=null?{id:F,data:(Vu=N==null?void 0:N.data)!=null?Vu:sju,rect:O}:null},[F,N]),_=C.useRef(null),[L,T]=C.useState(null),[R,I]=C.useState(null),H=Vy(m,Object.values(m)),V=z7("DndDescribedBy",a),U=C.useMemo(()=>z.getEnabled(),[z]),J=Eju(h),{droppableRects:Y,measureDroppableContainers:X,measuringScheduled:re}=ZOu(U,{dragging:A,dependencies:[w.x,w.y],config:J.droppable}),ge=qOu(S,F),_e=C.useMemo(()=>R?hN(R):null,[R]),Ve=Ln(),Ue=YOu(ge,J.draggable.measure);mju({activeNode:F?S.get(F):null,config:Ve.layoutShiftCompensation,initialRect:Ue,measure:J.draggable.measure});const qe=E5e(ge,J.draggable.measure,Ue),Se=E5e(ge?ge.parentElement:null),de=C.useRef({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=z.getNodeFor((t=de.current.over)==null?void 0:t.id),Be=aju({measure:J.dragOverlay.measure}),je=(n=Be.nodeRef.current)!=null?n:ge,bt=A?(i=Be.rect)!=null?i:qe:null,qt=!!(Be.nodeRef.current&&Be.rect),ou=eju(qt?null:qe),Vt=gOe(je?ks(je):null),oe=tju(A?he??ge:null),se=rju(oe),ie=xOe(E,{transform:{x:w.x-ou.x,y:w.y-ou.y,scaleX:1,scaleY:1},activatorEvent:R,active:y,activeNodeRect:qe,containerNodeRect:Se,draggingNodeRect:bt,over:de.current.over,overlayNodeRect:Be.rect,scrollableAncestors:oe,scrollableAncestorRects:se,windowRect:Vt}),$=_e?Hx(_e,w):null,Z=uju(oe),ue=g5e(Z),te=g5e(Z,[qe]),fe=Hx(ie,ue),Le=bt?AOu(bt,ie):null,Je=y&&Le?d({active:y,collisionRect:Le,droppableRects:Y,droppableContainers:U,pointerCoordinates:$}):null,it=vOu(Je,"id"),[ct,xt]=C.useState(null),Jt=qt?ie:Hx(ie,te),Ze=FOu(Jt,(r=ct==null?void 0:ct.rect)!=null?r:null,qe),Ie=C.useCallback((Vu,un)=>{let{sensor:zn,options:bn}=un;if(_.current==null)return;const $u=S.get(_.current);if(!$u)return;const wu=Vu.nativeEvent,Ou=new zn({active:_.current,activeNode:$u,event:wu,options:bn,context:de,onStart($i){const Vn=_.current;if(Vn==null)return;const Ni=S.get(Vn);if(!Ni)return;const{onDragStart:ka}=H.current,fo={active:{id:Vn,data:Ni.data,rect:O}};is.unstable_batchedUpdates(()=>{ka==null||ka(fo),k(DE.Initializing),p({type:ha.DragStart,initialCoordinates:$i,active:Vn}),D({type:"onDragStart",event:fo})})},onMove($i){p({type:ha.DragMove,coordinates:$i})},onEnd:ki(ha.DragEnd),onCancel:ki(ha.DragCancel)});is.unstable_batchedUpdates(()=>{T(Ou),I(Vu.nativeEvent)});function ki($i){return async function(){const{active:Ni,collisions:ka,over:fo,scrollAdjustedTranslate:eh}=de.current;let Va=null;if(Ni&&eh){const{cancelDrop:Hr}=H.current;Va={activatorEvent:wu,active:Ni,collisions:ka,delta:eh,over:fo},$i===ha.DragEnd&&typeof Hr=="function"&&await Promise.resolve(Hr(Va))&&($i=ha.DragCancel)}_.current=null,is.unstable_batchedUpdates(()=>{p({type:$i}),k(DE.Uninitialized),xt(null),T(null),I(null);const Hr=$i===ha.DragEnd?"onDragEnd":"onDragCancel";if(Va){const Cd=H.current[Hr];Cd==null||Cd(Va),D({type:Hr,event:Va})}})}}},[S]),Tu=C.useCallback((Vu,un)=>(zn,bn)=>{const $u=zn.nativeEvent,wu=S.get(bn);if(_.current!==null||!wu||$u.dndKit||$u.defaultPrevented)return;const Ou={active:wu};Vu(zn,un.options,Ou)===!0&&($u.dndKit={capturedBy:un.sensor},_.current=bn,Ie(zn,un))},[S,Ie]),gu=JOu(c,Tu);nju(c),sd(()=>{qe&&b===DE.Initializing&&k(DE.Initialized)},[qe,b]),C.useEffect(()=>{const{onDragMove:Vu}=H.current,{active:un,activatorEvent:zn,collisions:bn,over:$u}=de.current;if(!un||!zn)return;const wu={active:un,activatorEvent:zn,collisions:bn,delta:{x:fe.x,y:fe.y},over:$u};is.unstable_batchedUpdates(()=>{Vu==null||Vu(wu),D({type:"onDragMove",event:wu})})},[fe.x,fe.y]),C.useEffect(()=>{const{active:Vu,activatorEvent:un,collisions:zn,droppableContainers:bn,scrollAdjustedTranslate:$u}=de.current;if(!Vu||_.current==null||!un||!$u)return;const{onDragOver:wu}=H.current,Ou=bn.get(it),ki=Ou&&Ou.rect.current?{id:Ou.id,rect:Ou.rect.current,data:Ou.data,disabled:Ou.disabled}:null,$i={active:Vu,activatorEvent:un,collisions:zn,delta:{x:$u.x,y:$u.y},over:ki};is.unstable_batchedUpdates(()=>{xt(ki),wu==null||wu($i),D({type:"onDragOver",event:$i})})},[it]),sd(()=>{de.current={activatorEvent:R,active:y,activeNode:ge,collisionRect:Le,collisions:Je,droppableRects:Y,draggableNodes:S,draggingNode:je,draggingNodeRect:bt,droppableContainers:z,over:ct,scrollableAncestors:oe,scrollAdjustedTranslate:fe},O.current={initial:bt,translated:Le}},[y,ge,Je,Le,S,je,bt,Y,z,ct,oe,fe]),WOu({...Ve,delta:w,draggingRect:Le,pointerCoordinates:$,scrollableAncestors:oe,scrollableAncestorRects:se});const fn=C.useMemo(()=>({active:y,activeNode:ge,activeNodeRect:qe,activatorEvent:R,collisions:Je,containerNodeRect:Se,dragOverlay:Be,draggableNodes:S,droppableContainers:z,droppableRects:Y,over:ct,measureDroppableContainers:X,scrollableAncestors:oe,scrollableAncestorRects:se,measuringConfiguration:J,measuringScheduled:re,windowRect:Vt}),[y,ge,qe,R,Je,Se,Be,S,z,Y,ct,X,oe,se,J,re,Vt]),Wt=C.useMemo(()=>({activatorEvent:R,activators:gu,active:y,activeNodeRect:qe,ariaDescribedById:{draggable:V},dispatch:p,draggableNodes:S,over:ct,measureDroppableContainers:X}),[R,gu,y,qe,p,V,S,ct,X]);return M.createElement(uOe.Provider,{value:x},M.createElement(T7.Provider,{value:Wt},M.createElement(DOe.Provider,{value:fn},M.createElement(NO.Provider,{value:Ze},l)),M.createElement(hju,{disabled:(o==null?void 0:o.restoreFocus)===!1})),M.createElement(gOu,{...o,hiddenTextDescribedById:V}));function Ln(){const Vu=(L==null?void 0:L.autoScrollEnabled)===!1,un=typeof s=="object"?s.enabled===!1:s===!1,zn=A&&!Vu&&!un;return typeof s=="object"?{...s,enabled:zn}:{enabled:zn}}}),gju=C.createContext(null),f5e="button",fju="Droppable";function vOe(u){let{id:e,data:t,disabled:n=!1,attributes:i}=u;const r=z7(fju),{activators:a,activatorEvent:o,active:s,activeNodeRect:l,ariaDescribedById:c,draggableNodes:d,over:h}=C.useContext(T7),{role:E=f5e,roleDescription:m="draggable",tabIndex:g=0}=i??{},f=(s==null?void 0:s.id)===e,p=C.useContext(f?NO:gju),[D,x]=lN(),[b,k]=lN(),A=iju(a,e),F=Vy(t);sd(()=>(d.set(e,{id:e,key:r,node:D,activatorNode:b,data:F}),()=>{const w=d.get(e);w&&w.key===r&&d.delete(e)}),[d,e]);const S=C.useMemo(()=>({role:E,tabIndex:g,"aria-disabled":n,"aria-pressed":f&&E===f5e?!0:void 0,"aria-roledescription":m,"aria-describedby":c.draggable}),[n,E,g,f,m,c.draggable]);return{active:s,activatorEvent:o,activeNodeRect:l,attributes:S,isDragging:f,listeners:n?void 0:A,node:D,over:h,setNodeRef:x,setActivatorNodeRef:k,transform:p}}function COe(){return C.useContext(DOe)}const pju="Droppable",Dju={timeout:25};function xju(u){let{data:e,disabled:t=!1,id:n,resizeObserverConfig:i}=u;const r=z7(pju),{active:a,dispatch:o,over:s,measureDroppableContainers:l}=C.useContext(T7),c=C.useRef({disabled:t}),d=C.useRef(!1),h=C.useRef(null),E=C.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:f}={...Dju,...i},p=Vy(g??n),D=C.useCallback(()=>{if(!d.current){d.current=!0;return}E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{l(Array.isArray(p.current)?p.current:[p.current]),E.current=null},f)},[f]),x=TO({callback:D,disabled:m||!a}),b=C.useCallback((S,w)=>{x&&(w&&(x.unobserve(w),d.current=!1),S&&x.observe(S))},[x]),[k,A]=lN(b),F=Vy(e);return C.useEffect(()=>{!x||!k.current||(x.disconnect(),d.current=!1,x.observe(k.current))},[k,x]),sd(()=>(o({type:ha.RegisterDroppable,element:{id:n,key:r,disabled:t,node:k,rect:h,data:F}}),()=>o({type:ha.UnregisterDroppable,key:r,id:n})),[n]),C.useEffect(()=>{t!==c.current.disabled&&(o({type:ha.SetDroppableDisabled,id:n,key:r,disabled:t}),c.current.disabled=t)},[n,r,t,o]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===n,node:k,over:s,setNodeRef:A}}function vju(u){let{animation:e,children:t}=u;const[n,i]=C.useState(null),[r,a]=C.useState(null),o=cN(t);return!t&&!n&&o&&i(o),sd(()=>{if(!r)return;const s=n==null?void 0:n.key,l=n==null?void 0:n.props.id;if(s==null||l==null){i(null);return}Promise.resolve(e(l,r)).then(()=>{i(null)})},[e,n,r]),M.createElement(M.Fragment,null,t,n?C.cloneElement(n,{ref:a}):null)}const Cju={x:0,y:0,scaleX:1,scaleY:1};function bju(u){let{children:e}=u;return M.createElement(T7.Provider,{value:pOe},M.createElement(NO.Provider,{value:Cju},e))}const kju={position:"fixed",touchAction:"none"},Fju=u=>ore(u)?"transform 250ms ease":void 0,yju=C.forwardRef((u,e)=>{let{as:t,activatorEvent:n,adjustScale:i,children:r,className:a,rect:o,style:s,transform:l,transition:c=Fju}=u;if(!o)return null;const d=i?l:{...l,scaleX:1,scaleY:1},h={...kju,width:o.width,height:o.height,top:o.top,left:o.left,transform:$y.Transform.toString(d),transformOrigin:i&&n?pOu(n,o):void 0,transition:typeof c=="function"?c(n):c,...s};return M.createElement(t,{className:a,style:h,ref:e},r)}),Aju=u=>e=>{let{active:t,dragOverlay:n}=e;const i={},{styles:r,className:a}=u;if(r!=null&&r.active)for(const[o,s]of Object.entries(r.active))s!==void 0&&(i[o]=t.node.style.getPropertyValue(o),t.node.style.setProperty(o,s));if(r!=null&&r.dragOverlay)for(const[o,s]of Object.entries(r.dragOverlay))s!==void 0&&n.node.style.setProperty(o,s);return a!=null&&a.active&&t.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,l]of Object.entries(i))t.node.style.setProperty(s,l);a!=null&&a.active&&t.node.classList.remove(a.active)}},_ju=u=>{let{transform:{initial:e,final:t}}=u;return[{transform:$y.Transform.toString(e)},{transform:$y.Transform.toString(t)}]},Sju={duration:250,easing:"ease",keyframes:_ju,sideEffects:Aju({styles:{active:{opacity:"0"}}})};function Bju(u){let{config:e,draggableNodes:t,droppableContainers:n,measuringConfiguration:i}=u;return MO((r,a)=>{if(e===null)return;const o=t.get(r);if(!o)return;const s=o.node.current;if(!s)return;const l=fOe(a);if(!l)return;const{transform:c}=ks(a).getComputedStyle(a),d=iOe(c);if(!d)return;const h=typeof e=="function"?e:wju(e);return dOe(s,i.draggable.measure),h({active:{id:r,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:t,dragOverlay:{node:a,rect:i.dragOverlay.measure(l)},droppableContainers:n,measuringConfiguration:i,transform:d})})}function wju(u){const{duration:e,easing:t,sideEffects:n,keyframes:i}={...Sju,...u};return r=>{let{active:a,dragOverlay:o,transform:s,...l}=r;if(!e)return;const c={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},d={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/o.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/o.rect.height:1},h={x:s.x-c.x,y:s.y-c.y,...d},E=i({...l,active:a,dragOverlay:o,transform:{initial:s,final:h}}),[m]=E,g=E[E.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const f=n==null?void 0:n({active:a,dragOverlay:o,...l}),p=o.node.animate(E,{duration:e,easing:t,fill:"forwards"});return new Promise(D=>{p.onfinish=()=>{f==null||f(),D()}})}}let p5e=0;function Lju(u){return C.useMemo(()=>{if(u!=null)return p5e++,p5e},[u])}const bOe=M.memo(u=>{let{adjustScale:e=!1,children:t,dropAnimation:n,style:i,transition:r,modifiers:a,wrapperElement:o="div",className:s,zIndex:l=999}=u;const{activatorEvent:c,active:d,activeNodeRect:h,containerNodeRect:E,draggableNodes:m,droppableContainers:g,dragOverlay:f,over:p,measuringConfiguration:D,scrollableAncestors:x,scrollableAncestorRects:b,windowRect:k}=COe(),A=C.useContext(NO),F=Lju(d==null?void 0:d.id),S=xOe(a,{activatorEvent:c,active:d,activeNodeRect:h,containerNodeRect:E,draggingNodeRect:f.rect,over:p,overlayNodeRect:f.rect,scrollableAncestors:x,scrollableAncestorRects:b,transform:A,windowRect:k}),w=dre(h),z=Bju({config:n,draggableNodes:m,droppableContainers:g,measuringConfiguration:D}),N=w?f.setRef:void 0;return M.createElement(bju,null,M.createElement(vju,{animation:z},d&&F?M.createElement(yju,{key:F,id:d.id,ref:N,as:o,activatorEvent:c,adjustScale:e,className:s,transition:r,rect:w,style:{zIndex:l,...i},transform:S},t):null))});function kOe(u,e,t){const n={...u};return e.top+u.y<=t.top?n.y=t.top-e.top:e.bottom+u.y>=t.top+t.height&&(n.y=t.top+t.height-e.bottom),e.left+u.x<=t.left?n.x=t.left-e.left:e.right+u.x>=t.left+t.width&&(n.x=t.left+t.width-e.right),n}const D5e=u=>{let{containerNodeRect:e,draggingNodeRect:t,transform:n}=u;return!t||!e?n:kOe(n,t,e)},zju=u=>{let{draggingNodeRect:e,transform:t,scrollableAncestorRects:n}=u;const i=n[0];return!e||!i?t:kOe(t,e,i)};function FOe(u,e,t){const n=u.slice();return n.splice(t<0?n.length+t:t,0,n.splice(e,1)[0]),n}function Mju(u,e){return u.reduce((t,n,i)=>{const r=e.get(n);return r&&(t[i]=r),t},Array(u.length))}function Tju(u,e){if(u===e)return!0;if(u.length!==e.length)return!1;for(let t=0;t{let{rects:e,activeIndex:t,overIndex:n,index:i}=u;const r=FOe(e,n,t),a=e[i],o=r[i];return!o||!a?null:{x:o.left-a.left,y:o.top-a.top,scaleX:o.width/a.width,scaleY:o.height/a.height}},x5e=u=>{let{activeIndex:e,index:t,rects:n,overIndex:i}=u,r,a;return t===e&&(r=n[t],a=n[i]),t===i&&(r=n[t],a=n[e]),!a||!r?null:{x:a.left-r.left,y:a.top-r.top,scaleX:a.width/r.width,scaleY:a.height/r.height}},AOe="Sortable",Pju=M.createContext({activeIndex:-1,containerId:AOe,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yOe,disabled:{draggable:!1,droppable:!1}});function v5e(u){let{children:e,id:t,items:n,strategy:i=yOe,disabled:r=!1}=u;const{active:a,dragOverlay:o,droppableRects:s,over:l,measureDroppableContainers:c}=COe(),d=z7(AOe,t),h=o.rect!==null,E=C.useMemo(()=>n.map(A=>typeof A=="object"&&"id"in A?A.id:A),[n]),m=a!=null,g=a?E.indexOf(a.id):-1,f=l?E.indexOf(l.id):-1,p=C.useRef(E),D=!Tju(E,p.current),x=f!==-1&&g===-1||D,b=Nju(r);sd(()=>{D&&m&&c(E)},[D,E,m,c]),C.useEffect(()=>{p.current=E},[E]);const k=C.useMemo(()=>({activeIndex:g,containerId:d,disabled:b,disableTransforms:x,items:E,overIndex:f,useDragOverlay:h,sortedRects:Mju(E,s),strategy:i}),[g,d,b.draggable,b.droppable,x,E,f,s,h,i]);return M.createElement(Pju.Provider,{value:k},e)}Gn.Down,Gn.Right,Gn.Up,Gn.Left;var Rju=[{name:"Aegean Airlines",iataCode:"A3"},{name:"Aeroflot",iataCode:"SU"},{name:"Aerolineas Argentinas",iataCode:"AR"},{name:"Aeromexico",iataCode:"AM"},{name:"Air Algerie",iataCode:"AH"},{name:"Air Arabia",iataCode:"G9"},{name:"Air Canada",iataCode:"AC"},{name:"Air China",iataCode:"CA"},{name:"Air Europa",iataCode:"UX"},{name:"Air France-KLM",iataCode:"AF"},{name:"Air India",iataCode:"AI"},{name:"Air Mauritius",iataCode:"MK"},{name:"Air New Zealand",iataCode:"NZ"},{name:"Air Niugini",iataCode:"PX"},{name:"Air Tahiti",iataCode:"VT"},{name:"Air Tahiti Nui",iataCode:"TN"},{name:"Air Transat",iataCode:"TS"},{name:"AirAsia X",iataCode:"D7"},{name:"AirAsia",iataCode:"AK"},{name:"Aircalin",iataCode:"SB"},{name:"Alaska Airlines",iataCode:"AS"},{name:"Alitalia",iataCode:"AZ"},{name:"All Nippon Airways",iataCode:"NH"},{name:"Allegiant Air",iataCode:"G4"},{name:"American Airlines",iataCode:"AA"},{name:"Asiana Airlines",iataCode:"OZ"},{name:"Avianca",iataCode:"AV"},{name:"Azul Linhas Aereas Brasileiras",iataCode:"AD"},{name:"Azur Air",iataCode:"ZF"},{name:"Beijing Capital Airlines",iataCode:"JD"},{name:"Boliviana de Aviacion",iataCode:"OB"},{name:"British Airways",iataCode:"BA"},{name:"Cathay Pacific",iataCode:"CX"},{name:"Cebu Pacific Air",iataCode:"5J"},{name:"China Airlines",iataCode:"CI"},{name:"China Eastern Airlines",iataCode:"MU"},{name:"China Southern Airlines",iataCode:"CZ"},{name:"Condor",iataCode:"DE"},{name:"Copa Airlines",iataCode:"CM"},{name:"Delta Air Lines",iataCode:"DL"},{name:"Easyfly",iataCode:"VE"},{name:"EasyJet",iataCode:"U2"},{name:"EcoJet",iataCode:"8J"},{name:"Egyptair",iataCode:"MS"},{name:"El Al",iataCode:"LY"},{name:"Emirates Airlines",iataCode:"EK"},{name:"Ethiopian Airlines",iataCode:"ET"},{name:"Etihad Airways",iataCode:"EY"},{name:"EVA Air",iataCode:"BR"},{name:"Fiji Airways",iataCode:"FJ"},{name:"Finnair",iataCode:"AY"},{name:"Flybondi",iataCode:"FO"},{name:"Flydubai",iataCode:"FZ"},{name:"FlySafair",iataCode:"FA"},{name:"Frontier Airlines",iataCode:"F9"},{name:"Garuda Indonesia",iataCode:"GA"},{name:"Go First",iataCode:"G8"},{name:"Gol Linhas Aereas Inteligentes",iataCode:"G3"},{name:"Hainan Airlines",iataCode:"HU"},{name:"Hawaiian Airlines",iataCode:"HA"},{name:"IndiGo Airlines",iataCode:"6E"},{name:"Japan Airlines",iataCode:"JL"},{name:"Jeju Air",iataCode:"7C"},{name:"Jet2",iataCode:"LS"},{name:"JetBlue Airways",iataCode:"B6"},{name:"JetSMART",iataCode:"JA"},{name:"Juneyao Airlines",iataCode:"HO"},{name:"Kenya Airways",iataCode:"KQ"},{name:"Korean Air",iataCode:"KE"},{name:"Kulula.com",iataCode:"MN"},{name:"LATAM Airlines",iataCode:"LA"},{name:"Lion Air",iataCode:"JT"},{name:"LOT Polish Airlines",iataCode:"LO"},{name:"Lufthansa",iataCode:"LH"},{name:"Libyan Airlines",iataCode:"LN"},{name:"Linea Aerea Amaszonas",iataCode:"Z8"},{name:"Malaysia Airlines",iataCode:"MH"},{name:"Nordwind Airlines",iataCode:"N4"},{name:"Norwegian Air Shuttle",iataCode:"DY"},{name:"Oman Air",iataCode:"WY"},{name:"Pakistan International Airlines",iataCode:"PK"},{name:"Pegasus Airlines",iataCode:"PC"},{name:"Philippine Airlines",iataCode:"PR"},{name:"Qantas Group",iataCode:"QF"},{name:"Qatar Airways",iataCode:"QR"},{name:"Republic Airways",iataCode:"YX"},{name:"Royal Air Maroc",iataCode:"AT"},{name:"Ryanair",iataCode:"FR"},{name:"S7 Airlines",iataCode:"S7"},{name:"SAS",iataCode:"SK"},{name:"Satena",iataCode:"9R"},{name:"Saudia",iataCode:"SV"},{name:"Shandong Airlines",iataCode:"SC"},{name:"Sichuan Airlines",iataCode:"3U"},{name:"Singapore Airlines",iataCode:"SQ"},{name:"Sky Airline",iataCode:"H2"},{name:"SkyWest Airlines",iataCode:"OO"},{name:"South African Airways",iataCode:"SA"},{name:"Southwest Airlines",iataCode:"WN"},{name:"SpiceJet",iataCode:"SG"},{name:"Spirit Airlines",iataCode:"NK"},{name:"Spring Airlines",iataCode:"9S"},{name:"SriLankan Airlines",iataCode:"UL"},{name:"Star Peru",iataCode:"2I"},{name:"Sun Country Airlines",iataCode:"SY"},{name:"SunExpress",iataCode:"XQ"},{name:"TAP Air Portugal",iataCode:"TP"},{name:"Thai AirAsia",iataCode:"FD"},{name:"Thai Airways",iataCode:"TG"},{name:"TUI Airways",iataCode:"BY"},{name:"Tunisair",iataCode:"TU"},{name:"Turkish Airlines",iataCode:"TK"},{name:"Ukraine International",iataCode:"PS"},{name:"United Airlines",iataCode:"UA"},{name:"Ural Airlines",iataCode:"U6"},{name:"VietJet Air",iataCode:"VJ"},{name:"Vietnam Airlines",iataCode:"VN"},{name:"Virgin Atlantic Airways",iataCode:"VS"},{name:"Virgin Australia",iataCode:"VA"},{name:"VivaAerobus",iataCode:"VB"},{name:"VOEPASS Linhas Aereas",iataCode:"2Z"},{name:"Volaris",iataCode:"Y4"},{name:"WestJet",iataCode:"WS"},{name:"Wingo",iataCode:"P5"},{name:"Wizz Air",iataCode:"W6"}],Iju=[{name:"Aerospatiale/BAC Concorde",iataTypeCode:"SSC"},{name:"Airbus A300",iataTypeCode:"AB3"},{name:"Airbus A310",iataTypeCode:"310"},{name:"Airbus A310-200",iataTypeCode:"312"},{name:"Airbus A310-300",iataTypeCode:"313"},{name:"Airbus A318",iataTypeCode:"318"},{name:"Airbus A319",iataTypeCode:"319"},{name:"Airbus A319neo",iataTypeCode:"31N"},{name:"Airbus A320",iataTypeCode:"320"},{name:"Airbus A320neo",iataTypeCode:"32N"},{name:"Airbus A321",iataTypeCode:"321"},{name:"Airbus A321neo",iataTypeCode:"32Q"},{name:"Airbus A330",iataTypeCode:"330"},{name:"Airbus A330-200",iataTypeCode:"332"},{name:"Airbus A330-300",iataTypeCode:"333"},{name:"Airbus A330-800neo",iataTypeCode:"338"},{name:"Airbus A330-900neo",iataTypeCode:"339"},{name:"Airbus A340",iataTypeCode:"340"},{name:"Airbus A340-200",iataTypeCode:"342"},{name:"Airbus A340-300",iataTypeCode:"343"},{name:"Airbus A340-500",iataTypeCode:"345"},{name:"Airbus A340-600",iataTypeCode:"346"},{name:"Airbus A350",iataTypeCode:"350"},{name:"Airbus A350-900",iataTypeCode:"359"},{name:"Airbus A350-1000",iataTypeCode:"351"},{name:"Airbus A380",iataTypeCode:"380"},{name:"Airbus A380-800",iataTypeCode:"388"},{name:"Antonov An-12",iataTypeCode:"ANF"},{name:"Antonov An-24",iataTypeCode:"AN4"},{name:"Antonov An-26",iataTypeCode:"A26"},{name:"Antonov An-28",iataTypeCode:"A28"},{name:"Antonov An-30",iataTypeCode:"A30"},{name:"Antonov An-32",iataTypeCode:"A32"},{name:"Antonov An-72",iataTypeCode:"AN7"},{name:"Antonov An-124 Ruslan",iataTypeCode:"A4F"},{name:"Antonov An-140",iataTypeCode:"A40"},{name:"Antonov An-148",iataTypeCode:"A81"},{name:"Antonov An-158",iataTypeCode:"A58"},{name:"Antonov An-225 Mriya",iataTypeCode:"A5F"},{name:"Boeing 707",iataTypeCode:"703"},{name:"Boeing 717",iataTypeCode:"717"},{name:"Boeing 720B",iataTypeCode:"B72"},{name:"Boeing 727",iataTypeCode:"727"},{name:"Boeing 727-100",iataTypeCode:"721"},{name:"Boeing 727-200",iataTypeCode:"722"},{name:"Boeing 737 MAX 7",iataTypeCode:"7M7"},{name:"Boeing 737 MAX 8",iataTypeCode:"7M8"},{name:"Boeing 737 MAX 9",iataTypeCode:"7M9"},{name:"Boeing 737 MAX 10",iataTypeCode:"7MJ"},{name:"Boeing 737",iataTypeCode:"737"},{name:"Boeing 737-100",iataTypeCode:"731"},{name:"Boeing 737-200",iataTypeCode:"732"},{name:"Boeing 737-300",iataTypeCode:"733"},{name:"Boeing 737-400",iataTypeCode:"734"},{name:"Boeing 737-500",iataTypeCode:"735"},{name:"Boeing 737-600",iataTypeCode:"736"},{name:"Boeing 737-700",iataTypeCode:"73G"},{name:"Boeing 737-800",iataTypeCode:"738"},{name:"Boeing 737-900",iataTypeCode:"739"},{name:"Boeing 747",iataTypeCode:"747"},{name:"Boeing 747-100",iataTypeCode:"741"},{name:"Boeing 747-200",iataTypeCode:"742"},{name:"Boeing 747-300",iataTypeCode:"743"},{name:"Boeing 747-400",iataTypeCode:"744"},{name:"Boeing 747-400D",iataTypeCode:"74J"},{name:"Boeing 747-8",iataTypeCode:"748"},{name:"Boeing 747SP",iataTypeCode:"74L"},{name:"Boeing 747SR",iataTypeCode:"74R"},{name:"Boeing 757",iataTypeCode:"757"},{name:"Boeing 757-200",iataTypeCode:"752"},{name:"Boeing 757-300",iataTypeCode:"753"},{name:"Boeing 767",iataTypeCode:"767"},{name:"Boeing 767-200",iataTypeCode:"762"},{name:"Boeing 767-300",iataTypeCode:"763"},{name:"Boeing 767-400",iataTypeCode:"764"},{name:"Boeing 777",iataTypeCode:"777"},{name:"Boeing 777-200",iataTypeCode:"772"},{name:"Boeing 777-200LR",iataTypeCode:"77L"},{name:"Boeing 777-300",iataTypeCode:"773"},{name:"Boeing 777-300ER",iataTypeCode:"77W"},{name:"Boeing 787",iataTypeCode:"787"},{name:"Boeing 787-8",iataTypeCode:"788"},{name:"Boeing 787-9",iataTypeCode:"789"},{name:"Boeing 787-10",iataTypeCode:"781"},{name:"Canadair Challenger",iataTypeCode:"CCJ"},{name:"Canadair CL-44",iataTypeCode:"CL4"},{name:"Canadair Regional Jet 100",iataTypeCode:"CR1"},{name:"Canadair Regional Jet 200",iataTypeCode:"CR2"},{name:"Canadair Regional Jet 700",iataTypeCode:"CR7"},{name:"Canadair Regional Jet 705",iataTypeCode:"CRA"},{name:"Canadair Regional Jet 900",iataTypeCode:"CR9"},{name:"Canadair Regional Jet 1000",iataTypeCode:"CRK"},{name:"De Havilland Canada DHC-2 Beaver",iataTypeCode:"DHP"},{name:"De Havilland Canada DHC-2 Turbo-Beaver",iataTypeCode:"DHR"},{name:"De Havilland Canada DHC-3 Otter",iataTypeCode:"DHL"},{name:"De Havilland Canada DHC-4 Caribou",iataTypeCode:"DHC"},{name:"De Havilland Canada DHC-6 Twin Otter",iataTypeCode:"DHT"},{name:"De Havilland Canada DHC-7 Dash 7",iataTypeCode:"DH7"},{name:"De Havilland Canada DHC-8-100 Dash 8 / 8Q",iataTypeCode:"DH1"},{name:"De Havilland Canada DHC-8-200 Dash 8 / 8Q",iataTypeCode:"DH2"},{name:"De Havilland Canada DHC-8-300 Dash 8 / 8Q",iataTypeCode:"DH3"},{name:"De Havilland Canada DHC-8-400 Dash 8Q",iataTypeCode:"DH4"},{name:"De Havilland DH.104 Dove",iataTypeCode:"DHD"},{name:"De Havilland DH.114 Heron",iataTypeCode:"DHH"},{name:"Douglas DC-3",iataTypeCode:"D3F"},{name:"Douglas DC-6",iataTypeCode:"D6F"},{name:"Douglas DC-8-50",iataTypeCode:"D8T"},{name:"Douglas DC-8-62",iataTypeCode:"D8L"},{name:"Douglas DC-8-72",iataTypeCode:"D8Q"},{name:"Douglas DC-9-10",iataTypeCode:"D91"},{name:"Douglas DC-9-20",iataTypeCode:"D92"},{name:"Douglas DC-9-30",iataTypeCode:"D93"},{name:"Douglas DC-9-40",iataTypeCode:"D94"},{name:"Douglas DC-9-50",iataTypeCode:"D95"},{name:"Douglas DC-10",iataTypeCode:"D10"},{name:"Douglas DC-10-10",iataTypeCode:"D1X"},{name:"Douglas DC-10-30",iataTypeCode:"D1Y"},{name:"Embraer 170",iataTypeCode:"E70"},{name:"Embraer 175",iataTypeCode:"E75"},{name:"Embraer 190",iataTypeCode:"E90"},{name:"Embraer 195",iataTypeCode:"E95"},{name:"Embraer E190-E2",iataTypeCode:"290"},{name:"Embraer E195-E2",iataTypeCode:"295"},{name:"Embraer EMB.110 Bandeirante",iataTypeCode:"EMB"},{name:"Embraer EMB.120 Brasilia",iataTypeCode:"EM2"},{name:"Embraer Legacy 600",iataTypeCode:"ER3"},{name:"Embraer Phenom 100",iataTypeCode:"EP1"},{name:"Embraer Phenom 300",iataTypeCode:"EP3"},{name:"Embraer RJ135",iataTypeCode:"ER3"},{name:"Embraer RJ140",iataTypeCode:"ERD"},{name:"Embraer RJ145 Amazon",iataTypeCode:"ER4"},{name:"Ilyushin IL18",iataTypeCode:"IL8"},{name:"Ilyushin IL62",iataTypeCode:"IL6"},{name:"Ilyushin IL76",iataTypeCode:"IL7"},{name:"Ilyushin IL86",iataTypeCode:"ILW"},{name:"Ilyushin IL96-300",iataTypeCode:"I93"},{name:"Ilyushin IL114",iataTypeCode:"I14"},{name:"Lockheed L-182 / 282 / 382 (L-100) Hercules",iataTypeCode:"LOH"},{name:"Lockheed L-188 Electra",iataTypeCode:"LOE"},{name:"Lockheed L-1011 Tristar",iataTypeCode:"L10"},{name:"Lockheed L-1049 Super Constellation",iataTypeCode:"L49"},{name:"McDonnell Douglas MD11",iataTypeCode:"M11"},{name:"McDonnell Douglas MD80",iataTypeCode:"M80"},{name:"McDonnell Douglas MD81",iataTypeCode:"M81"},{name:"McDonnell Douglas MD82",iataTypeCode:"M82"},{name:"McDonnell Douglas MD83",iataTypeCode:"M83"},{name:"McDonnell Douglas MD87",iataTypeCode:"M87"},{name:"McDonnell Douglas MD88",iataTypeCode:"M88"},{name:"McDonnell Douglas MD90",iataTypeCode:"M90"},{name:"Sukhoi Superjet 100-95",iataTypeCode:"SU9"},{name:"Tupolev Tu-134",iataTypeCode:"TU3"},{name:"Tupolev Tu-154",iataTypeCode:"TU5"},{name:"Tupolev Tu-204",iataTypeCode:"T20"},{name:"Yakovlev Yak-40",iataTypeCode:"YK4"},{name:"Yakovlev Yak-42",iataTypeCode:"YK2"}],Oju=[{name:"Adelaide International Airport",iataCode:"ADL"},{name:"Adolfo Suarez Madrid-Barajas Airport",iataCode:"MAD"},{name:"Aeroparque Jorge Newbery Airport",iataCode:"AEP"},{name:"Afonso Pena International Airport",iataCode:"CWB"},{name:"Alfonso Bonilla Aragon International Airport",iataCode:"CLO"},{name:"Amsterdam Airport Schiphol",iataCode:"AMS"},{name:"Arturo Merino Benitez International Airport",iataCode:"SCL"},{name:"Auckland International Airport",iataCode:"AKL"},{name:"Beijing Capital International Airport",iataCode:"PEK"},{name:"Belem Val de Cans International Airport",iataCode:"BEL"},{name:"Belo Horizonte Tancredo Neves International Airport",iataCode:"CNF"},{name:"Berlin-Tegel Airport",iataCode:"TXL"},{name:"Bole International Airport",iataCode:"ADD"},{name:"Brasilia-Presidente Juscelino Kubitschek International Airport",iataCode:"BSB"},{name:"Brisbane International Airport",iataCode:"BNE"},{name:"Brussels Airport",iataCode:"BRU"},{name:"Cairns Airport",iataCode:"CNS"},{name:"Cairo International Airport",iataCode:"CAI"},{name:"Canberra Airport",iataCode:"CBR"},{name:"Capetown International Airport",iataCode:"CPT"},{name:"Charles de Gaulle International Airport",iataCode:"CDG"},{name:"Charlotte Douglas International Airport",iataCode:"CLT"},{name:"Chengdu Shuangliu International Airport",iataCode:"CTU"},{name:"Chhatrapati Shivaji International Airport",iataCode:"BOM"},{name:"Chicago O'Hare International Airport",iataCode:"ORD"},{name:"Chongqing Jiangbei International Airport",iataCode:"CKG"},{name:"Christchurch International Airport",iataCode:"CHC"},{name:"Copenhagen Kastrup Airport",iataCode:"CPH"},{name:"Dallas Fort Worth International Airport",iataCode:"DFW"},{name:"Daniel K. Inouye International Airport",iataCode:"HNL"},{name:"Denver International Airport",iataCode:"DEN"},{name:"Don Mueang International Airport",iataCode:"DMK"},{name:"Dubai International Airport",iataCode:"DXB"},{name:"Dublin Airport",iataCode:"DUB"},{name:"Dusseldorf Airport",iataCode:"DUS"},{name:"El Dorado International Airport",iataCode:"BOG"},{name:"Eleftherios Venizelos International Airport",iataCode:"ATH"},{name:"Faa'a International Airport",iataCode:"PPT"},{name:"Fort Lauderdale Hollywood International Airport",iataCode:"FLL"},{name:"Fortaleza Pinto Martins International Airport",iataCode:"FOR"},{name:"Frankfurt am Main Airport",iataCode:"FRA"},{name:"George Bush Intercontinental Houston Airport",iataCode:"IAH"},{name:"Gold Coast Airport",iataCode:"OOL"},{name:"Guarulhos - Governador Andre Franco Montoro International Airport",iataCode:"GRU"},{name:"Hartsfield-Jackson Atlanta International Airport",iataCode:"ATL"},{name:"Helsinki Vantaa Airport",iataCode:"HEL"},{name:"Hobart International Airport",iataCode:"HBA"},{name:"Hong Kong International Airport",iataCode:"HKG"},{name:"Houari Boumediene Airport",iataCode:"ALG"},{name:"Hurgada International Airport",iataCode:"HRG"},{name:"Incheon International Airport",iataCode:"ICN"},{name:"Indira Gandhi International Airport",iataCode:"DEL"},{name:"Istanbul Airport",iataCode:"IST"},{name:"Jacksons International Airport",iataCode:"POM"},{name:"Jeju International Airport",iataCode:"CJU"},{name:"John F Kennedy International Airport",iataCode:"JFK"},{name:"Jorge Chavez International Airport",iataCode:"LIM"},{name:"Jose Maria Cordova International Airport",iataCode:"MDE"},{name:"Josep Tarradellas Barcelona-El Prat Airport",iataCode:"BCN"},{name:"Kahului Airport",iataCode:"OGG"},{name:"King Abdulaziz International Airport",iataCode:"JED"},{name:"Kuala Lumpur International Airport",iataCode:"KUL"},{name:"Kunming Changshui International Airport",iataCode:"KMG"},{name:"La Tontouta International Airport",iataCode:"NOU"},{name:"Leonardo da Vinci-Fiumicino Airport",iataCode:"FCO"},{name:"London Heathrow Airport",iataCode:"LHR"},{name:"Los Angeles International Airport",iataCode:"LAX"},{name:"McCarran International Airport",iataCode:"LAS"},{name:"Melbourne International Airport",iataCode:"MEL"},{name:"Mexico City International Airport",iataCode:"MEX"},{name:"Miami International Airport",iataCode:"MIA"},{name:"Ministro Pistarini International Airport",iataCode:"EZE"},{name:"Minneapolis-St Paul International/Wold-Chamberlain Airport",iataCode:"MSP"},{name:"Mohammed V International Airport",iataCode:"CMN"},{name:"Moscow Domodedovo Airport",iataCode:"DME"},{name:"Munich Airport",iataCode:"MUC"},{name:"Murtala Muhammed International Airport",iataCode:"LOS"},{name:"Nadi International Airport",iataCode:"NAN"},{name:"Nairobi Jomo Kenyatta International Airport",iataCode:"NBO"},{name:"Narita International Airport",iataCode:"NRT"},{name:"Newark Liberty International Airport",iataCode:"EWR"},{name:"Ninoy Aquino International Airport",iataCode:"MNL"},{name:"Noumea Magenta Airport",iataCode:"GEA"},{name:"O. R. Tambo International Airport",iataCode:"JNB"},{name:"Orlando International Airport",iataCode:"MCO"},{name:"Oslo Lufthavn",iataCode:"OSL"},{name:"Perth Airport",iataCode:"PER"},{name:"Phoenix Sky Harbor International Airport",iataCode:"PHX"},{name:"Recife Guararapes-Gilberto Freyre International Airport",iataCode:"REC"},{name:"Rio de Janeiro Galeao International Airport",iataCode:"GIG"},{name:"Salgado Filho International Airport",iataCode:"POA"},{name:"Salvador Deputado Luis Eduardo Magalhaes International Airport",iataCode:"SSA"},{name:"San Francisco International Airport",iataCode:"SFO"},{name:"Santos Dumont Airport",iataCode:"SDU"},{name:"Sao Paulo-Congonhas Airport",iataCode:"CGH"},{name:"Seattle Tacoma International Airport",iataCode:"SEA"},{name:"Shanghai Hongqiao International Airport",iataCode:"SHA"},{name:"Shanghai Pudong International Airport",iataCode:"PVG"},{name:"Shenzhen Bao'an International Airport",iataCode:"SZX"},{name:"Sheremetyevo International Airport",iataCode:"SVO"},{name:"Singapore Changi Airport",iataCode:"SIN"},{name:"Soekarno-Hatta International Airport",iataCode:"CGK"},{name:'Stockholm-Arlanda Airport"',iataCode:"ARN"},{name:"Suvarnabhumi Airport",iataCode:"BKK"},{name:"Sydney Kingsford Smith International Airport",iataCode:"SYD"},{name:"Taiwan Taoyuan International Airport",iataCode:"TPE"},{name:"Tan Son Nhat International Airport",iataCode:"SGN"},{name:"Tokyo Haneda International Airport",iataCode:"HND"},{name:"Toronto Pearson International Airport",iataCode:"YYZ"},{name:"Tunis Carthage International Airport",iataCode:"TUN"},{name:"Vancouver International Airport",iataCode:"YVR"},{name:"Vienna International Airport",iataCode:"VIE"},{name:"Viracopos International Airport",iataCode:"VCP"},{name:"Vnukovo International Airport",iataCode:"VKO"},{name:"Wellington International Airport",iataCode:"WLG"},{name:"Xi'an Xianyang International Airport",iataCode:"XIY"},{name:"Zhukovsky International Airport",iataCode:"ZIA"},{name:"Zurich Airport",iataCode:"ZRH"}],jju={airline:Rju,airplane:Iju,airport:Oju},Hju=jju,Vju=["Giant panda","Spectacled bear","Sun bear","Sloth bear","American black bear","Asian black bear","Brown bear","Polar bear"],$ju=["Red-throated Loon","Arctic Loon","Pacific Loon","Common Loon","Yellow-billed Loon","Least Grebe","Pied-billed Grebe","Horned Grebe","Red-necked Grebe","Eared Grebe","Western Grebe","Clark's Grebe","Yellow-nosed Albatross","Shy Albatross","Black-browed Albatross","Wandering Albatross","Laysan Albatross","Black-footed Albatross","Short-tailed Albatross","Northern Fulmar","Herald Petrel","Murphy's Petrel","Mottled Petrel","Black-capped Petrel","Cook's Petrel","Stejneger's Petrel","White-chinned Petrel","Streaked Shearwater","Cory's Shearwater","Pink-footed Shearwater","Flesh-footed Shearwater","Greater Shearwater","Wedge-tailed Shearwater","Buller's Shearwater","Sooty Shearwater","Short-tailed Shearwater","Manx Shearwater","Black-vented Shearwater","Audubon's Shearwater","Little Shearwater","Wilson's Storm-Petrel","White-faced Storm-Petrel","European Storm-Petrel","Fork-tailed Storm-Petrel","Leach's Storm-Petrel","Ashy Storm-Petrel","Band-rumped Storm-Petrel","Wedge-rumped Storm-Petrel","Black Storm-Petrel","Least Storm-Petrel","White-tailed Tropicbird","Red-billed Tropicbird","Red-tailed Tropicbird","Masked Booby","Blue-footed Booby","Brown Booby","Red-footed Booby","Northern Gannet","American White Pelican","Brown Pelican","Brandt's Cormorant","Neotropic Cormorant","Double-crested Cormorant","Great Cormorant","Red-faced Cormorant","Pelagic Cormorant","Anhinga","Magnificent Frigatebird","Great Frigatebird","Lesser Frigatebird","American Bittern","Yellow Bittern","Least Bittern","Great Blue Heron","Great Egret","Chinese Egret","Little Egret","Western Reef-Heron","Snowy Egret","Little Blue Heron","Tricolored Heron","Reddish Egret","Cattle Egret","Green Heron","Black-crowned Night-Heron","Yellow-crowned Night-Heron","White Ibis","Scarlet Ibis","Glossy Ibis","White-faced Ibis","Roseate Spoonbill","Jabiru","Wood Stork","Black Vulture","Turkey Vulture","California Condor","Greater Flamingo","Black-bellied Whistling-Duck","Fulvous Whistling-Duck","Bean Goose","Pink-footed Goose","Greater White-fronted Goose","Lesser White-fronted Goose","Emperor Goose","Snow Goose","Ross's Goose","Canada Goose","Brant","Barnacle Goose","Mute Swan","Trumpeter Swan","Tundra Swan","Whooper Swan","Muscovy Duck","Wood Duck","Gadwall","Falcated Duck","Eurasian Wigeon","American Wigeon","American Black Duck","Mallard","Mottled Duck","Spot-billed Duck","Blue-winged Teal","Cinnamon Teal","Northern Shoveler","White-cheeked Pintail","Northern Pintail","Garganey","Baikal Teal","Green-winged Teal","Canvasback","Redhead","Common Pochard","Ring-necked Duck","Tufted Duck","Greater Scaup","Lesser Scaup","Steller's Eider","Spectacled Eider","King Eider","Common Eider","Harlequin Duck","Labrador Duck","Surf Scoter","White-winged Scoter","Black Scoter","Oldsquaw","Bufflehead","Common Goldeneye","Barrow's Goldeneye","Smew","Hooded Merganser","Common Merganser","Red-breasted Merganser","Masked Duck","Ruddy Duck","Osprey","Hook-billed Kite","Swallow-tailed Kite","White-tailed Kite","Snail Kite","Mississippi Kite","Bald Eagle","White-tailed Eagle","Steller's Sea-Eagle","Northern Harrier","Sharp-shinned Hawk","Cooper's Hawk","Northern Goshawk","Crane Hawk","Gray Hawk","Common Black-Hawk","Harris's Hawk","Roadside Hawk","Red-shouldered Hawk","Broad-winged Hawk","Short-tailed Hawk","Swainson's Hawk","White-tailed Hawk","Zone-tailed Hawk","Red-tailed Hawk","Ferruginous Hawk","Rough-legged Hawk","Golden Eagle","Collared Forest-Falcon","Crested Caracara","Eurasian Kestrel","American Kestrel","Merlin","Eurasian Hobby","Aplomado Falcon","Gyrfalcon","Peregrine Falcon","Prairie Falcon","Plain Chachalaca","Chukar","Himalayan Snowcock","Gray Partridge","Ring-necked Pheasant","Ruffed Grouse","Sage Grouse","Spruce Grouse","Willow Ptarmigan","Rock Ptarmigan","White-tailed Ptarmigan","Blue Grouse","Sharp-tailed Grouse","Greater Prairie-chicken","Lesser Prairie-chicken","Wild Turkey","Mountain Quail","Scaled Quail","California Quail","Gambel's Quail","Northern Bobwhite","Montezuma Quail","Yellow Rail","Black Rail","Corn Crake","Clapper Rail","King Rail","Virginia Rail","Sora","Paint-billed Crake","Spotted Rail","Purple Gallinule","Azure Gallinule","Common Moorhen","Eurasian Coot","American Coot","Limpkin","Sandhill Crane","Common Crane","Whooping Crane","Double-striped Thick-knee","Northern Lapwing","Black-bellied Plover","European Golden-Plover","American Golden-Plover","Pacific Golden-Plover","Mongolian Plover","Collared Plover","Snowy Plover","Wilson's Plover","Common Ringed Plover","Semipalmated Plover","Piping Plover","Little Ringed Plover","Killdeer","Mountain Plover","Eurasian Dotterel","Eurasian Oystercatcher","American Oystercatcher","Black Oystercatcher","Black-winged Stilt","Black-necked Stilt","American Avocet","Northern Jacana","Common Greenshank","Greater Yellowlegs","Lesser Yellowlegs","Marsh Sandpiper","Spotted Redshank","Wood Sandpiper","Green Sandpiper","Solitary Sandpiper","Willet","Wandering Tattler","Gray-tailed Tattler","Common Sandpiper","Spotted Sandpiper","Terek Sandpiper","Upland Sandpiper","Little Curlew","Eskimo Curlew","Whimbrel","Bristle-thighed Curlew","Far Eastern Curlew","Slender-billed Curlew","Eurasian Curlew","Long-billed Curlew","Black-tailed Godwit","Hudsonian Godwit","Bar-tailed Godwit","Marbled Godwit","Ruddy Turnstone","Black Turnstone","Surfbird","Great Knot","Red Knot","Sanderling","Semipalmated Sandpiper","Western Sandpiper","Red-necked Stint","Little Stint","Temminck's Stint","Long-toed Stint","Least Sandpiper","White-rumped Sandpiper","Baird's Sandpiper","Pectoral Sandpiper","Sharp-tailed Sandpiper","Purple Sandpiper","Rock Sandpiper","Dunlin","Curlew Sandpiper","Stilt Sandpiper","Spoonbill Sandpiper","Broad-billed Sandpiper","Buff-breasted Sandpiper","Ruff","Short-billed Dowitcher","Long-billed Dowitcher","Jack Snipe","Common Snipe","Pin-tailed Snipe","Eurasian Woodcock","American Woodcock","Wilson's Phalarope","Red-necked Phalarope","Red Phalarope","Oriental Pratincole","Great Skua","South Polar Skua","Pomarine Jaeger","Parasitic Jaeger","Long-tailed Jaeger","Laughing Gull","Franklin's Gull","Little Gull","Black-headed Gull","Bonaparte's Gull","Heermann's Gull","Band-tailed Gull","Black-tailed Gull","Mew Gull","Ring-billed Gull","California Gull","Herring Gull","Yellow-legged Gull","Thayer's Gull","Iceland Gull","Lesser Black-backed Gull","Slaty-backed Gull","Yellow-footed Gull","Western Gull","Glaucous-winged Gull","Glaucous Gull","Great Black-backed Gull","Sabine's Gull","Black-legged Kittiwake","Red-legged Kittiwake","Ross's Gull","Ivory Gull","Gull-billed Tern","Caspian Tern","Royal Tern","Elegant Tern","Sandwich Tern","Roseate Tern","Common Tern","Arctic Tern","Forster's Tern","Least Tern","Aleutian Tern","Bridled Tern","Sooty Tern","Large-billed Tern","White-winged Tern","Whiskered Tern","Black Tern","Brown Noddy","Black Noddy","Black Skimmer","Dovekie","Common Murre","Thick-billed Murre","Razorbill","Great Auk","Black Guillemot","Pigeon Guillemot","Long-billed Murrelet","Marbled Murrelet","Kittlitz's Murrelet","Xantus's Murrelet","Craveri's Murrelet","Ancient Murrelet","Cassin's Auklet","Parakeet Auklet","Least Auklet","Whiskered Auklet","Crested Auklet","Rhinoceros Auklet","Atlantic Puffin","Horned Puffin","Tufted Puffin","Rock Dove","Scaly-naped Pigeon","White-crowned Pigeon","Red-billed Pigeon","Band-tailed Pigeon","Oriental Turtle-Dove","European Turtle-Dove","Eurasian Collared-Dove","Spotted Dove","White-winged Dove","Zenaida Dove","Mourning Dove","Passenger Pigeon","Inca Dove","Common Ground-Dove","Ruddy Ground-Dove","White-tipped Dove","Key West Quail-Dove","Ruddy Quail-Dove","Budgerigar","Monk Parakeet","Carolina Parakeet","Thick-billed Parrot","White-winged Parakeet","Red-crowned Parrot","Common Cuckoo","Oriental Cuckoo","Black-billed Cuckoo","Yellow-billed Cuckoo","Mangrove Cuckoo","Greater Roadrunner","Smooth-billed Ani","Groove-billed Ani","Barn Owl","Flammulated Owl","Oriental Scops-Owl","Western Screech-Owl","Eastern Screech-Owl","Whiskered Screech-Owl","Great Horned Owl","Snowy Owl","Northern Hawk Owl","Northern Pygmy-Owl","Ferruginous Pygmy-Owl","Elf Owl","Burrowing Owl","Mottled Owl","Spotted Owl","Barred Owl","Great Gray Owl","Long-eared Owl","Short-eared Owl","Boreal Owl","Northern Saw-whet Owl","Lesser Nighthawk","Common Nighthawk","Antillean Nighthawk","Common Pauraque","Common Poorwill","Chuck-will's-widow","Buff-collared Nightjar","Whip-poor-will","Jungle Nightjar","Black Swift","White-collared Swift","Chimney Swift","Vaux's Swift","White-throated Needletail","Common Swift","Fork-tailed Swift","White-throated Swift","Antillean Palm Swift","Green Violet-ear","Green-breasted Mango","Broad-billed Hummingbird","White-eared Hummingbird","Xantus's Hummingbird","Berylline Hummingbird","Buff-bellied Hummingbird","Cinnamon Hummingbird","Violet-crowned Hummingbird","Blue-throated Hummingbird","Magnificent Hummingbird","Plain-capped Starthroat","Bahama Woodstar","Lucifer Hummingbird","Ruby-throated Hummingbird","Black-chinned Hummingbird","Anna's Hummingbird","Costa's Hummingbird","Calliope Hummingbird","Bumblebee Hummingbird","Broad-tailed Hummingbird","Rufous Hummingbird","Allen's Hummingbird","Elegant Trogon","Eared Trogon","Hoopoe","Ringed Kingfisher","Belted Kingfisher","Green Kingfisher","Eurasian Wryneck","Lewis's Woodpecker","Red-headed Woodpecker","Acorn Woodpecker","Gila Woodpecker","Golden-fronted Woodpecker","Red-bellied Woodpecker","Williamson's Sapsucker","Yellow-bellied Sapsucker","Red-naped Sapsucker","Red-breasted Sapsucker","Great Spotted Woodpecker","Ladder-backed Woodpecker","Nuttall's Woodpecker","Downy Woodpecker","Hairy Woodpecker","Strickland's Woodpecker","Red-cockaded Woodpecker","White-headed Woodpecker","Three-toed Woodpecker","Black-backed Woodpecker","Northern Flicker","Gilded Flicker","Pileated Woodpecker","Ivory-billed Woodpecker","Northern Beardless-Tyrannulet","Greenish Elaenia","Caribbean Elaenia","Tufted Flycatcher","Olive-sided Flycatcher","Greater Pewee","Western Wood-Pewee","Eastern Wood-Pewee","Yellow-bellied Flycatcher","Acadian Flycatcher","Alder Flycatcher","Willow Flycatcher","Least Flycatcher","Hammond's Flycatcher","Dusky Flycatcher","Gray Flycatcher","Pacific-slope Flycatcher","Cordilleran Flycatcher","Buff-breasted Flycatcher","Black Phoebe","Eastern Phoebe","Say's Phoebe","Vermilion Flycatcher","Dusky-capped Flycatcher","Ash-throated Flycatcher","Nutting's Flycatcher","Great Crested Flycatcher","Brown-crested Flycatcher","La Sagra's Flycatcher","Great Kiskadee","Sulphur-bellied Flycatcher","Variegated Flycatcher","Tropical Kingbird","Couch's Kingbird","Cassin's Kingbird","Thick-billed Kingbird","Western Kingbird","Eastern Kingbird","Gray Kingbird","Loggerhead Kingbird","Scissor-tailed Flycatcher","Fork-tailed Flycatcher","Rose-throated Becard","Masked Tityra","Brown Shrike","Loggerhead Shrike","Northern Shrike","White-eyed Vireo","Thick-billed Vireo","Bell's Vireo","Black-capped Vireo","Gray Vireo","Yellow-throated Vireo","Plumbeous Vireo","Cassin's Vireo","Blue-headed Vireo","Hutton's Vireo","Warbling Vireo","Philadelphia Vireo","Red-eyed Vireo","Yellow-green Vireo","Black-whiskered Vireo","Yucatan Vireo","Gray Jay","Steller's Jay","Blue Jay","Green Jay","Brown Jay","Florida Scrub-Jay","Island Scrub-Jay","Western Scrub-Jay","Mexican Jay","Pinyon Jay","Clark's Nutcracker","Black-billed Magpie","Yellow-billed Magpie","Eurasian Jackdaw","American Crow","Northwestern Crow","Tamaulipas Crow","Fish Crow","Chihuahuan Raven","Common Raven","Sky Lark","Horned Lark","Purple Martin","Cuban Martin","Gray-breasted Martin","Southern Martin","Brown-chested Martin","Tree Swallow","Violet-green Swallow","Bahama Swallow","Northern Rough-winged Swallow","Bank Swallow","Cliff Swallow","Cave Swallow","Barn Swallow","Common House-Martin","Carolina Chickadee","Black-capped Chickadee","Mountain Chickadee","Mexican Chickadee","Chestnut-backed Chickadee","Boreal Chickadee","Gray-headed Chickadee","Bridled Titmouse","Oak Titmouse","Juniper Titmouse","Tufted Titmouse","Verdin","Bushtit","Red-breasted Nuthatch","White-breasted Nuthatch","Pygmy Nuthatch","Brown-headed Nuthatch","Brown Creeper","Cactus Wren","Rock Wren","Canyon Wren","Carolina Wren","Bewick's Wren","House Wren","Winter Wren","Sedge Wren","Marsh Wren","American Dipper","Red-whiskered Bulbul","Golden-crowned Kinglet","Ruby-crowned Kinglet","Middendorff's Grasshopper-Warbler","Lanceolated Warbler","Wood Warbler","Dusky Warbler","Arctic Warbler","Blue-gray Gnatcatcher","California Gnatcatcher","Black-tailed Gnatcatcher","Black-capped Gnatcatcher","Narcissus Flycatcher","Mugimaki Flycatcher","Red-breasted Flycatcher","Siberian Flycatcher","Gray-spotted Flycatcher","Asian Brown Flycatcher","Siberian Rubythroat","Bluethroat","Siberian Blue Robin","Red-flanked Bluetail","Northern Wheatear","Stonechat","Eastern Bluebird","Western Bluebird","Mountain Bluebird","Townsend's Solitaire","Veery","Gray-cheeked Thrush","Bicknell's Thrush","Swainson's Thrush","Hermit Thrush","Wood Thrush","Eurasian Blackbird","Eyebrowed Thrush","Dusky Thrush","Fieldfare","Redwing","Clay-colored Robin","White-throated Robin","Rufous-backed Robin","American Robin","Varied Thrush","Aztec Thrush","Wrentit","Gray Catbird","Black Catbird","Northern Mockingbird","Bahama Mockingbird","Sage Thrasher","Brown Thrasher","Long-billed Thrasher","Bendire's Thrasher","Curve-billed Thrasher","California Thrasher","Crissal Thrasher","Le Conte's Thrasher","Blue Mockingbird","European Starling","Crested Myna","Siberian Accentor","Yellow Wagtail","Citrine Wagtail","Gray Wagtail","White Wagtail","Black-backed Wagtail","Tree Pipit","Olive-backed Pipit","Pechora Pipit","Red-throated Pipit","American Pipit","Sprague's Pipit","Bohemian Waxwing","Cedar Waxwing","Gray Silky-flycatcher","Phainopepla","Olive Warbler","Bachman's Warbler","Blue-winged Warbler","Golden-winged Warbler","Tennessee Warbler","Orange-crowned Warbler","Nashville Warbler","Virginia's Warbler","Colima Warbler","Lucy's Warbler","Crescent-chested Warbler","Northern Parula","Tropical Parula","Yellow Warbler","Chestnut-sided Warbler","Magnolia Warbler","Cape May Warbler","Black-throated Blue Warbler","Yellow-rumped Warbler","Black-throated Gray Warbler","Golden-cheeked Warbler","Black-throated Green Warbler","Townsend's Warbler","Hermit Warbler","Blackburnian Warbler","Yellow-throated Warbler","Grace's Warbler","Pine Warbler","Kirtland's Warbler","Prairie Warbler","Palm Warbler","Bay-breasted Warbler","Blackpoll Warbler","Cerulean Warbler","Black-and-white Warbler","American Redstart","Prothonotary Warbler","Worm-eating Warbler","Swainson's Warbler","Ovenbird","Northern Waterthrush","Louisiana Waterthrush","Kentucky Warbler","Connecticut Warbler","Mourning Warbler","MacGillivray's Warbler","Common Yellowthroat","Gray-crowned Yellowthroat","Hooded Warbler","Wilson's Warbler","Canada Warbler","Red-faced Warbler","Painted Redstart","Slate-throated Redstart","Fan-tailed Warbler","Golden-crowned Warbler","Rufous-capped Warbler","Yellow-breasted Chat","Bananaquit","Hepatic Tanager","Summer Tanager","Scarlet Tanager","Western Tanager","Flame-colored Tanager","Stripe-headed Tanager","White-collared Seedeater","Yellow-faced Grassquit","Black-faced Grassquit","Olive Sparrow","Green-tailed Towhee","Spotted Towhee","Eastern Towhee","Canyon Towhee","California Towhee","Abert's Towhee","Rufous-winged Sparrow","Cassin's Sparrow","Bachman's Sparrow","Botteri's Sparrow","Rufous-crowned Sparrow","Five-striped Sparrow","American Tree Sparrow","Chipping Sparrow","Clay-colored Sparrow","Brewer's Sparrow","Field Sparrow","Worthen's Sparrow","Black-chinned Sparrow","Vesper Sparrow","Lark Sparrow","Black-throated Sparrow","Sage Sparrow","Lark Bunting","Savannah Sparrow","Grasshopper Sparrow","Baird's Sparrow","Henslow's Sparrow","Le Conte's Sparrow","Nelson's Sharp-tailed Sparrow","Saltmarsh Sharp-tailed Sparrow","Seaside Sparrow","Fox Sparrow","Song Sparrow","Lincoln's Sparrow","Swamp Sparrow","White-throated Sparrow","Harris's Sparrow","White-crowned Sparrow","Golden-crowned Sparrow","Dark-eyed Junco","Yellow-eyed Junco","McCown's Longspur","Lapland Longspur","Smith's Longspur","Chestnut-collared Longspur","Pine Bunting","Little Bunting","Rustic Bunting","Yellow-breasted Bunting","Gray Bunting","Pallas's Bunting","Reed Bunting","Snow Bunting","McKay's Bunting","Crimson-collared Grosbeak","Northern Cardinal","Pyrrhuloxia","Yellow Grosbeak","Rose-breasted Grosbeak","Black-headed Grosbeak","Blue Bunting","Blue Grosbeak","Lazuli Bunting","Indigo Bunting","Varied Bunting","Painted Bunting","Dickcissel","Bobolink","Red-winged Blackbird","Tricolored Blackbird","Tawny-shouldered Blackbird","Eastern Meadowlark","Western Meadowlark","Yellow-headed Blackbird","Rusty Blackbird","Brewer's Blackbird","Common Grackle","Boat-tailed Grackle","Great-tailed Grackle","Shiny Cowbird","Bronzed Cowbird","Brown-headed Cowbird","Black-vented Oriole","Orchard Oriole","Hooded Oriole","Streak-backed Oriole","Spot-breasted Oriole","Altamira Oriole","Audubon's Oriole","Baltimore Oriole","Bullock's Oriole","Scott's Oriole","Common Chaffinch","Brambling","Gray-crowned Rosy-Finch","Black Rosy-Finch","Brown-capped Rosy-Finch","Pine Grosbeak","Common Rosefinch","Purple Finch","Cassin's Finch","House Finch","Red Crossbill","White-winged Crossbill","Common Redpoll","Hoary Redpoll","Eurasian Siskin","Pine Siskin","Lesser Goldfinch","Lawrence's Goldfinch","American Goldfinch","Oriental Greenfinch","Eurasian Bullfinch","Evening Grosbeak","Hawfinch","House Sparrow","Eurasian Tree Sparrow"],Kju=["Abyssinian","American Bobtail","American Curl","American Shorthair","American Wirehair","Balinese","Bengal","Birman","Bombay","British Shorthair","Burmese","Chartreux","Chausie","Cornish Rex","Devon Rex","Donskoy","Egyptian Mau","Exotic Shorthair","Havana","Highlander","Himalayan","Japanese Bobtail","Korat","Kurilian Bobtail","LaPerm","Maine Coon","Manx","Minskin","Munchkin","Nebelung","Norwegian Forest Cat","Ocicat","Ojos Azules","Oriental","Persian","Peterbald","Pixiebob","Ragdoll","Russian Blue","Savannah","Scottish Fold","Selkirk Rex","Serengeti","Siberian","Siamese","Singapura","Snowshoe","Sokoke","Somali","Sphynx","Thai","Tonkinese","Toyger","Turkish Angora","Turkish Van"],Wju=["Blue Whale","Fin Whale","Sei Whale","Sperm Whale","Bryde’s whale","Omura’s whale","Humpback whale","Long-Beaked Common Dolphin","Short-Beaked Common Dolphin","Bottlenose Dolphin","Indo-Pacific Bottlenose Dolphin","Northern Rightwhale Dolphin","Southern Rightwhale Dolphin","Tucuxi","Costero","Indo-Pacific Hump-backed Dolphin","Chinese White Dolphin","Atlantic Humpbacked Dolphin","Atlantic Spotted Dolphin","Clymene Dolphin","Pantropical Spotted Dolphin","Spinner Dolphin","Striped Dolphin","Rough-Toothed Dolphin","Chilean Dolphin","Commerson’s Dolphin","Heaviside’s Dolphin","Hector’s Dolphin","Risso’s Dolphin","Fraser’s Dolphin","Atlantic White-Sided Dolphin","Dusky Dolphin","Hourglass Dolphin","Pacific White-Sided Dolphin","Peale’s Dolphin","White-Beaked Dolphin","Australian Snubfin Dolphin","Irrawaddy Dolphin","Melon-headed Whale","Killer Whale (Orca)","Pygmy Killer Whale","False Killer Whale","Long-finned Pilot Whale","Short-finned Pilot Whale","Guiana Dolphin","Burrunan Dolphin","Australian humpback Dolphin","Amazon River Dolphin","Chinese River Dolphin","Ganges River Dolphin","La Plata Dolphin","Southern Bottlenose Whale","Longman's Beaked Whale","Arnoux's Beaked Whale"],Gju=["Aberdeen Angus","Abergele","Abigar","Abondance","Abyssinian Shorthorned Zebu","Aceh","Achham","Adamawa","Adaptaur","Afar","Africangus","Afrikaner","Agerolese","Alambadi","Alatau","Albanian","Albera","Alderney","Alentejana","Aleutian wild cattle","Aliad Dinka","Alistana-Sanabresa","Allmogekor","Alur","American","American Angus","American Beef Friesian","American Brown Swiss","American Milking Devon","American White Park","Amerifax","Amrit Mahal","Amsterdam Island cattle","Anatolian Black","Andalusian Black","Andalusian Blond","Andalusian Grey","Angeln","Angoni","Ankina","Ankole","Ankole-Watusi","Aracena","Arado","Argentine Criollo","Argentine Friesian","Armorican","Arouquesa","Arsi","Asturian Mountain","Asturian Valley","Aubrac","Aulie-Ata","Aure et Saint-Girons","Australian Braford","Australian Brangus","Australian Charbray","Australian Friesian Sahiwal","Australian Lowline","Australian Milking Zebu","Australian Shorthorn","Austrian Simmental","Austrian Yellow","Avétonou","Avileña-Negra Ibérica","Aweil Dinka","Ayrshire","Azaouak","Azebuado","Azerbaijan Zebu","Azores","Bedit","Breed","Bachaur cattle","Baherie cattle","Bakosi cattle","Balancer","Baoule","Bargur cattle","Barrosã","Barzona","Bazadaise","Beef Freisian","Beefalo","Beefmaker","Beefmaster","Begayt","Belgian Blue","Belgian Red","Belgian Red Pied","Belgian White-and-Red","Belmont Red","Belted Galloway","Bernese","Berrenda cattle","Betizu","Bianca Modenese","Blaarkop","Black Angus","Black Baldy","Black Hereford","Blanca Cacereña","Blanco Orejinegro BON","Blonde d'Aquitaine","Blue Albion","Blue Grey","Bohuskulla","Bonsmara","Boran","Boškarin","Braford","Brahman","Brahmousin","Brangus","Braunvieh","Brava","British White","British Friesian","Brown Carpathian","Brown Caucasian","Brown Swiss","Bue Lingo","Burlina","Buša cattle","Butana cattle","Bushuyev","Cedit","Cachena","Caldelana","Camargue","Campbell Island cattle","Canadian Speckle Park","Canadienne","Canaria","Canchim","Caracu","Cárdena Andaluza","Carinthian Blondvieh","Carora","Charbray","Charolais","Chateaubriand","Chiangus","Chianina","Chillingham cattle","Chinese Black Pied","Cholistani","Coloursided White Back","Commercial","Corriente","Corsican cattle","Costeño con Cuernos","Crioulo Lageano","Dedit","Dajal","Dangi cattle","Danish Black-Pied","Danish Jersey","Danish Red","Deep Red cattle","Deoni","Devon","Dexter cattle","Dhanni","Doayo cattle","Doela","Drakensberger","Dølafe","Droughtmaster","Dulong'","Dutch Belted","Dutch Friesian","Dwarf Lulu","Eedit","East Anatolian Red","Eastern Finncattle","Eastern Red Polled","Enderby Island cattle","English Longhorn","Ennstaler Bergscheck","Estonian Holstein","Estonian Native","Estonian Red cattle","Évolène cattle","Fedit","Fēng Cattle","Finnish Ayrshire","Finncattle","Finnish Holstein-Friesian","Fjäll","Fleckvieh","Florida Cracker cattle","Fogera","French Simmental","Fribourgeoise","Friesian Red and White","Fulani Sudanese","Gedit","Galician Blond","Galloway cattle","Gangatiri","Gaolao","Garvonesa","Gascon cattle","Gelbvieh","Georgian Mountain cattle","German Angus","German Black Pied cattle","German Black Pied Dairy","German Red Pied","Gir","Glan cattle","Gloucester","Gobra","Greek Shorthorn","Greek Steppe","Greyman cattle","Gudali","Guernsey cattle","Guzerá","Hedit","Hallikar4","Hanwoo","Hariana cattle","Hartón del Valle","Harzer Rotvieh","Hays Converter","Heck cattle","Hereford","Herens","Hybridmaster","Highland cattle","Hinterwald","Holando-Argentino","Holstein Friesian cattle","Horro","Huáng Cattle","Hungarian Grey","Iedit","Iberian cattle","Icelandic","Illawarra cattle","Improved Red and White","Indo-Brazilian","Irish Moiled","Israeli Holstein","Israeli Red","Istoben cattle","Istrian cattle","Jedit","Jamaica Black","Jamaica Hope","Jamaica Red","Japanese Brown","Jarmelista","Javari cattle","Jersey cattle","Jutland cattle","Kedit","Kabin Buri cattle","Kalmyk cattle","Kangayam","Kankrej","Kamphaeng Saen cattle","Karan Swiss","Kasaragod Dwarf cattle","Kathiawadi","Kazakh Whiteheaded","Kenana cattle","Kenkatha cattle","Kerry cattle","Kherigarh","Khillari cattle","Kholomogory","Korat Wagyu","Kostroma cattle","Krishna Valley cattle","Kuri","Kurgan cattle","Ledit","La Reina cattle","Lakenvelder cattle","Lampurger","Latvian Blue","Latvian Brown","Latvian Danish Red","Lebedyn","Levantina","Limia cattle","Limousin","Limpurger","Lincoln Red","Lineback","Lithuanian Black-and-White","Lithuanian Light Grey","Lithuanian Red","Lithuanian White-Backed","Lohani cattle","Lourdais","Lucerna cattle","Luing","Medit","Madagascar Zebu","Madura","Maine-Anjou","Malnad Gidda","Malvi","Mandalong Special","Mantequera Leonesa","Maramureş Brown","Marchigiana","Maremmana","Marinhoa","Maronesa","Masai","Mashona","Menorquina","Mertolenga","Meuse-Rhine-Issel","Mewati","Milking Shorthorn","Minhota","Mirandesa","Mirkadim","Mocăniţă","Mollie","Monchina","Mongolian","Montbéliarde","Morucha","Muturu","Murboden","Murnau-Werdenfels","Murray Grey","Nedit","Nagori","N'Dama","Negra Andaluza","Nelore","Nguni","Nimari","Normande","North Bengal Grey","Northern Finncattle","Northern Shorthorn","Norwegian Red","Oedit]","Ongole","Original Simmental","Pedit","Pajuna","Palmera","Pantaneiro","Parda Alpina","Parthenaise","Pasiega","Pembroke","Philippine Native","Pie Rouge des Plaines","Piedmontese cattle","Pineywoods","Pinzgauer","Pirenaica","Podolac","Podolica","Polish Black-and-White","Polish Red","Polled Hereford","Poll Shorthorn","Polled Shorthorn","Ponwar","Preta","Punganur","Pulikulam","Pustertaler Sprinzen","Qedit","Qinchaun","Queensland Miniature Boran","Redit","Ramo Grande","Randall","Raramuri Criollo","Rathi","Rätisches Grauvieh","Raya","Red Angus","Red Brangus","Red Chittagong","Red Fulani","Red Gorbatov","Red Holstein","Red Kandhari","Red Mingrelian","Red Poll","Red Polled Østland","Red Sindhi","Retinta","Riggit Galloway","Ringamåla","Rohjan","Romagnola","Romanian Bălţata","Romanian Steppe Gray","Romosinuano","Russian Black Pied","RX3","Sedit","Sahiwal","Salers","Salorn","Sanga","Sanhe","Santa Cruz","Santa Gertrudis","Sayaguesa","Schwyz","Selembu","Senepol","Serbian Pied","Serbian Steppe","Sheko","Shetland","Shorthorn","Siboney de Cuba","Simbrah","Simford","Simmental","Siri","South Devon","Spanish Fighting Bull","Speckle Park","Square Meater","Sussex","Swedish Friesian","Swedish Polled","Swedish Red Pied","Swedish Red Polled","Swedish Red-and-White","Tedit","Tabapuã","Tarentaise","Tasmanian Grey","Tauros","Telemark","Texas Longhorn","Texon","Thai Black","Thai Fighting Bull","Thai Friesian","Thai Milking Zebu","Tharparkar","Tswana","Tudanca","Tuli","Tulim","Turkish Grey Steppe","Tux-Zillertal","Tyrol Grey","Uedit","Umblachery","Ukrainian Grey","Vedit","Valdostana Castana","Valdostana Pezzata Nera","Valdostana Pezzata Rossa","Väneko","Vaynol","Vechur8","Vestland Fjord","Vestland Red Polled","Vianesa","Volinian Beef","Vorderwald","Vosgienne","Wedit","Wagyu","Waguli","Wangus","Welsh Black","Western Finncattle","White Cáceres","White Fulani","White Lamphun","White Park","Whitebred Shorthorn","Xedit","Xingjiang Brown","Yedit","Yakutian","Yanbian","Yanhuang","Yurino","Zedit","Żubroń","Zebu"],Uju=["Alligator mississippiensis","Chinese Alligator","Black Caiman","Broad-snouted Caiman","Spectacled Caiman","Yacare Caiman","Cuvier’s Dwarf Caiman","Schneider’s Smooth-fronted Caiman","African Slender-snouted Crocodile","American Crocodile","Australian Freshwater Crocodile","Cuban Crocodile","Dwarf Crocodile","Morelet’s Crocodile","Mugger Crocodile","New Guinea Freshwater Crocodile","Nile Crocodile","West African Crocodile","Orinoco Crocodile","Philippine Crocodile","Saltwater Crocodile","Siamese Crocodile","Gharial","Tomistoma"],qju=["Affenpinscher","Afghan Hound","Aidi","Airedale Terrier","Akbash","Akita","Alano Español","Alapaha Blue Blood Bulldog","Alaskan Husky","Alaskan Klee Kai","Alaskan Malamute","Alopekis","Alpine Dachsbracke","American Bulldog","American Bully","American Cocker Spaniel","American English Coonhound","American Foxhound","American Hairless Terrier","American Pit Bull Terrier","American Staffordshire Terrier","American Water Spaniel","Andalusian Hound","Anglo-Français de Petite Vénerie","Appenzeller Sennenhund","Ariegeois","Armant","Armenian Gampr dog","Artois Hound","Australian Cattle Dog","Australian Kelpie","Australian Shepherd","Australian Stumpy Tail Cattle Dog","Australian Terrier","Austrian Black and Tan Hound","Austrian Pinscher","Azawakh","Bakharwal dog","Banjara Hound","Barbado da Terceira","Barbet","Basenji","Basque Shepherd Dog","Basset Artésien Normand","Basset Bleu de Gascogne","Basset Fauve de Bretagne","Basset Hound","Bavarian Mountain Hound","Beagle","Beagle-Harrier","Belgian Shepherd","Bearded Collie","Beauceron","Bedlington Terrier","Bergamasco Shepherd","Berger Picard","Bernese Mountain Dog","Bhotia","Bichon Frisé","Billy","Black and Tan Coonhound","Black Norwegian Elkhound","Black Russian Terrier","Black Mouth Cur","Bloodhound","Blue Lacy","Blue Picardy Spaniel","Bluetick Coonhound","Boerboel","Bohemian Shepherd","Bolognese","Border Collie","Border Terrier","Borzoi","Bosnian Coarse-haired Hound","Boston Terrier","Bouvier des Ardennes","Bouvier des Flandres","Boxer","Boykin Spaniel","Bracco Italiano","Braque d'Auvergne","Braque de l'Ariège","Braque du Bourbonnais","Braque Francais","Braque Saint-Germain","Briard","Briquet Griffon Vendéen","Brittany","Broholmer","Bruno Jura Hound","Brussels Griffon","Bucovina Shepherd Dog","Bull Arab","Bull Terrier","Bulldog","Bullmastiff","Bully Kutta","Burgos Pointer","Cairn Terrier","Campeiro Bulldog","Canaan Dog","Canadian Eskimo Dog","Cane Corso","Cane di Oropa","Cane Paratore","Cantabrian Water Dog","Can de Chira","Cão da Serra de Aires","Cão de Castro Laboreiro","Cão de Gado Transmontano","Cão Fila de São Miguel","Cardigan Welsh Corgi","Carea Castellano Manchego","Carolina Dog","Carpathian Shepherd Dog","Catahoula Leopard Dog","Catalan Sheepdog","Caucasian Shepherd Dog","Cavalier King Charles Spaniel","Central Asian Shepherd Dog","Cesky Fousek","Cesky Terrier","Chesapeake Bay Retriever","Chien Français Blanc et Noir","Chien Français Blanc et Orange","Chien Français Tricolore","Chihuahua","Chilean Terrier","Chinese Chongqing Dog","Chinese Crested Dog","Chinook","Chippiparai","Chongqing dog","Chortai","Chow Chow","Cimarrón Uruguayo","Cirneco dell'Etna","Clumber Spaniel","Colombian fino hound","Coton de Tulear","Cretan Hound","Croatian Sheepdog","Curly-Coated Retriever","Cursinu","Czechoslovakian Wolfdog","Dachshund","Dalmatian","Dandie Dinmont Terrier","Danish-Swedish Farmdog","Denmark Feist","Dingo","Doberman Pinscher","Dogo Argentino","Dogo Guatemalteco","Dogo Sardesco","Dogue Brasileiro","Dogue de Bordeaux","Drentse Patrijshond","Drever","Dunker","Dutch Shepherd","Dutch Smoushond","East Siberian Laika","East European Shepherd","English Cocker Spaniel","English Foxhound","English Mastiff","English Setter","English Shepherd","English Springer Spaniel","English Toy Terrier","Entlebucher Mountain Dog","Estonian Hound","Estrela Mountain Dog","Eurasier","Field Spaniel","Fila Brasileiro","Finnish Hound","Finnish Lapphund","Finnish Spitz","Flat-Coated Retriever","French Bulldog","French Spaniel","Galgo Español","Galician Shepherd Dog","Garafian Shepherd","Gascon Saintongeois","Georgian Shepherd","German Hound","German Longhaired Pointer","German Pinscher","German Roughhaired Pointer","German Shepherd Dog","German Shorthaired Pointer","German Spaniel","German Spitz","German Wirehaired Pointer","Giant Schnauzer","Glen of Imaal Terrier","Golden Retriever","Gończy Polski","Gordon Setter","Grand Anglo-Français Blanc et Noir","Grand Anglo-Français Blanc et Orange","Grand Anglo-Français Tricolore","Grand Basset Griffon Vendéen","Grand Bleu de Gascogne","Grand Griffon Vendéen","Great Dane","Greater Swiss Mountain Dog","Greek Harehound","Greek Shepherd","Greenland Dog","Greyhound","Griffon Bleu de Gascogne","Griffon Fauve de Bretagne","Griffon Nivernais","Gull Dong","Gull Terrier","Hällefors Elkhound","Hamiltonstövare","Hanover Hound","Harrier","Havanese","Hierran Wolfdog","Hokkaido","Hovawart","Huntaway","Hygen Hound","Ibizan Hound","Icelandic Sheepdog","Indian pariah dog","Indian Spitz","Irish Red and White Setter","Irish Setter","Irish Terrier","Irish Water Spaniel","Irish Wolfhound","Istrian Coarse-haired Hound","Istrian Shorthaired Hound","Italian Greyhound","Jack Russell Terrier","Jagdterrier","Japanese Chin","Japanese Spitz","Japanese Terrier","Jindo","Jonangi","Kai Ken","Kaikadi","Kangal Shepherd Dog","Kanni","Karakachan dog","Karelian Bear Dog","Kars","Karst Shepherd","Keeshond","Kerry Beagle","Kerry Blue Terrier","King Charles Spaniel","King Shepherd","Kintamani","Kishu","Kokoni","Kombai","Komondor","Kooikerhondje","Koolie","Koyun dog","Kromfohrländer","Kuchi","Kuvasz","Labrador Retriever","Lagotto Romagnolo","Lakeland Terrier","Lancashire Heeler","Landseer","Lapponian Herder","Large Münsterländer","Leonberger","Levriero Sardo","Lhasa Apso","Lithuanian Hound","Löwchen","Lupo Italiano","Mackenzie River Husky","Magyar agár","Mahratta Greyhound","Maltese","Manchester Terrier","Maremmano-Abruzzese Sheepdog","McNab dog","Miniature American Shepherd","Miniature Bull Terrier","Miniature Fox Terrier","Miniature Pinscher","Miniature Schnauzer","Molossus of Epirus","Montenegrin Mountain Hound","Mountain Cur","Mountain Feist","Mucuchies","Mudhol Hound","Mudi","Neapolitan Mastiff","New Guinea Singing Dog","New Zealand Heading Dog","Newfoundland","Norfolk Terrier","Norrbottenspets","Northern Inuit Dog","Norwegian Buhund","Norwegian Elkhound","Norwegian Lundehund","Norwich Terrier","Nova Scotia Duck Tolling Retriever","Old Croatian Sighthound","Old Danish Pointer","Old English Sheepdog","Old English Terrier","Olde English Bulldogge","Otterhound","Pachon Navarro","Pampas Deerhound","Paisley Terrier","Papillon","Parson Russell Terrier","Pastore della Lessinia e del Lagorai","Patagonian Sheepdog","Patterdale Terrier","Pekingese","Pembroke Welsh Corgi","Perro Majorero","Perro de Pastor Mallorquin","Perro de Presa Canario","Perro de Presa Mallorquin","Peruvian Inca Orchid","Petit Basset Griffon Vendéen","Petit Bleu de Gascogne","Phalène","Pharaoh Hound","Phu Quoc Ridgeback","Picardy Spaniel","Plummer Terrier","Plott Hound","Podenco Canario","Podenco Valenciano","Pointer","Poitevin","Polish Greyhound","Polish Hound","Polish Lowland Sheepdog","Polish Tatra Sheepdog","Pomeranian","Pont-Audemer Spaniel","Poodle","Porcelaine","Portuguese Podengo","Portuguese Pointer","Portuguese Water Dog","Posavac Hound","Pražský Krysařík","Pshdar Dog","Pudelpointer","Pug","Puli","Pumi","Pungsan Dog","Pyrenean Mastiff","Pyrenean Mountain Dog","Pyrenean Sheepdog","Rafeiro do Alentejo","Rajapalayam","Rampur Greyhound","Rat Terrier","Ratonero Bodeguero Andaluz","Ratonero Mallorquin","Ratonero Murciano de Huerta","Ratonero Valenciano","Redbone Coonhound","Rhodesian Ridgeback","Romanian Mioritic Shepherd Dog","Romanian Raven Shepherd Dog","Rottweiler","Rough Collie","Russian Spaniel","Russian Toy","Russo-European Laika","Saarloos Wolfdog","Sabueso Español","Saint Bernard","Saint Hubert Jura Hound","Saint-Usuge Spaniel","Saluki","Samoyed","Sapsali","Sarabi dog","Šarplaninac","Schapendoes","Schillerstövare","Schipperke","Schweizer Laufhund","Schweizerischer Niederlaufhund","Scottish Deerhound","Scottish Terrier","Sealyham Terrier","Segugio dell'Appennino","Segugio Italiano","Segugio Maremmano","Seppala Siberian Sleddog","Serbian Hound","Serbian Tricolour Hound","Serrano Bulldog","Shar Pei","Shetland Sheepdog","Shiba Inu","Shih Tzu","Shikoku","Shiloh Shepherd","Siberian Husky","Silken Windhound","Silky Terrier","Sinhala Hound","Skye Terrier","Sloughi","Slovakian Wirehaired Pointer","Slovenský Cuvac","Slovenský Kopov","Smalandstövare","Small Greek domestic dog","Small Münsterländer","Smooth Collie","Smooth Fox Terrier","Soft-Coated Wheaten Terrier","South Russian Ovcharka","Spanish Mastiff","Spanish Water Dog","Spinone Italiano","Sporting Lucas Terrier","Sardinian Shepherd Dog","Stabyhoun","Staffordshire Bull Terrier","Standard Schnauzer","Stephens Stock","Styrian Coarse-haired Hound","Sussex Spaniel","Swedish Elkhound","Swedish Lapphund","Swedish Vallhund","Swedish White Elkhound","Taigan","Taiwan Dog","Tamaskan Dog","Teddy Roosevelt Terrier","Telomian","Tenterfield Terrier","Terrier Brasileiro","Thai Bangkaew Dog","Thai Ridgeback","Tibetan Mastiff","Tibetan Spaniel","Tibetan Terrier","Tornjak","Tosa","Toy Fox Terrier","Toy Manchester Terrier","Transylvanian Hound","Treeing Cur","Treeing Feist","Treeing Tennessee Brindle","Treeing Walker Coonhound","Trigg Hound","Tyrolean Hound","Vikhan","Villano de Las Encartaciones","Villanuco de Las Encartaciones","Vizsla","Volpino Italiano","Weimaraner","Welsh Sheepdog","Welsh Springer Spaniel","Welsh Terrier","West Highland White Terrier","West Siberian Laika","Westphalian Dachsbracke","Wetterhoun","Whippet","White Shepherd","White Swiss Shepherd Dog","Wire Fox Terrier","Wirehaired Pointing Griffon","Wirehaired Vizsla","Xiasi Dog","Xoloitzcuintli","Yakutian Laika","Yorkshire Terrier"],Jju=["Grass carp","Peruvian anchoveta","Silver carp","Common carp","Asari","Japanese littleneck","Filipino Venus","Japanese cockle","Alaska pollock","Nile tilapia","Whiteleg shrimp","Bighead carp","Skipjack tuna","Catla","Crucian carp","Atlantic salmon","Atlantic herring","Chub mackerel","Rohu","Yellowfin tuna","Japanese anchovy","Largehead hairtail","Atlantic cod","European pilchard","Capelin","Jumbo flying squid","Milkfish","Atlantic mackerel","Rainbow trout","Araucanian herring","Wuchang bream","Gulf menhaden","Indian oil sardine","Black carp","European anchovy","Northern snakehead","Pacific cod","Pacific saury","Pacific herring","Bigeye tuna","Chilean jack mackerel","Yellow croaker","Haddock","Gazami crab","Amur catfish","Japanese common catfish","European sprat","Pink salmon","Mrigal carp","Channel catfish","Blood cockle","Blue whiting","Hilsa shad","Daggertooth pike conger","California pilchard","Cape horse mackerel","Pacific anchoveta","Japanese flying squid","Pollock","Chinese softshell turtle","Kawakawa","Indian mackerel","Asian swamp eel","Argentine hake","Short mackerel","Southern rough shrimp","Southern African anchovy","Pond loach","Iridescent shark","Mandarin fish","Chinese perch","Nile perch","Round sardinella","Japanese pilchard","Bombay-duck","Yellowhead catfish","Korean bullhead","Narrow-barred Spanish mackerel","Albacore","Madeiran sardinella","Bonga shad","Silver cyprinid","Longtail tuna","Atlantic menhaden","North Pacific hake","Atlantic horse mackerel","Japanese jack mackerel","Pacific thread herring","Bigeye scad","Yellowstripe scad","Chum salmon","Blue swimming crab","Pacific sand lance","Pacific sandlance","Goldstripe sardinella"],Zju=["American Albino","Abaco Barb","Abtenauer","Abyssinian","Aegidienberger","Akhal-Teke","Albanian Horse","Altai Horse","Altèr Real","American Cream Draft","American Indian Horse","American Paint Horse","American Quarter Horse","American Saddlebred","American Warmblood","Andalusian Horse","Andravida Horse","Anglo-Arabian","Anglo-Arabo-Sardo","Anglo-Kabarda","Appaloosa","AraAppaloosa","Arabian Horse","Ardennes Horse","Arenberg-Nordkirchen","Argentine Criollo","Asian wild Horse","Assateague Horse","Asturcón","Augeron","Australian Brumby","Australian Draught Horse","Australian Stock Horse","Austrian Warmblood","Auvergne Horse","Auxois","Azerbaijan Horse","Azteca Horse","Baise Horse","Bale","Balearic Horse","Balikun Horse","Baluchi Horse","Banker Horse","Barb Horse","Bardigiano","Bashkir Curly","Basque Mountain Horse","Bavarian Warmblood","Belgian Half-blood","Belgian Horse","Belgian Warmblood ","Bhutia Horse","Black Forest Horse","Blazer Horse","Boerperd","Borana","Boulonnais Horse","Brabant","Brandenburger","Brazilian Sport Horse","Breton Horse","Brumby","Budyonny Horse","Burguete Horse","Burmese Horse","Byelorussian Harness Horse","Calabrese Horse","Camargue Horse","Camarillo White Horse","Campeiro","Campolina","Canadian Horse","Canadian Pacer","Carolina Marsh Tacky","Carthusian Horse","Caspian Horse","Castilian Horse","Castillonnais","Catria Horse","Cavallo Romano della Maremma Laziale","Cerbat Mustang","Chickasaw Horse","Chilean Corralero","Choctaw Horse","Cleveland Bay","Clydesdale Horse","Cob","Coldblood Trotter","Colonial Spanish Horse","Colorado Ranger","Comtois Horse","Corsican Horse","Costa Rican Saddle Horse","Cretan Horse","Criollo Horse","Croatian Coldblood","Cuban Criollo","Cumberland Island Horse","Curly Horse","Czech Warmblood","Daliboz","Danish Warmblood","Danube Delta Horse","Dole Gudbrandsdal","Don","Dongola Horse","Draft Trotter","Dutch Harness Horse","Dutch Heavy Draft","Dutch Warmblood","Dzungarian Horse","East Bulgarian","East Friesian Horse","Estonian Draft","Estonian Horse","Falabella","Faroese","Finnhorse","Fjord Horse","Fleuve","Florida Cracker Horse","Foutanké","Frederiksborg Horse","Freiberger","French Trotter","Friesian Cross","Friesian Horse","Friesian Sporthorse","Furioso-North Star","Galiceño","Galician Pony","Gelderland Horse","Georgian Grande Horse","German Warmblood","Giara Horse","Gidran","Groningen Horse","Gypsy Horse","Hackney Horse","Haflinger","Hanoverian Horse","Heck Horse","Heihe Horse","Henson Horse","Hequ Horse","Hirzai","Hispano-Bretón","Holsteiner Horse","Horro","Hungarian Warmblood","Icelandic Horse","Iomud","Irish Draught","Irish Sport Horse sometimes called Irish Hunter","Italian Heavy Draft","Italian Trotter","Jaca Navarra","Jeju Horse","Jutland Horse","Kabarda Horse","Kafa","Kaimanawa Horses","Kalmyk Horse","Karabair","Karabakh Horse","Karachai Horse","Karossier","Kathiawari","Kazakh Horse","Kentucky Mountain Saddle Horse","Kiger Mustang","Kinsky Horse","Kisber Felver","Kiso Horse","Kladruber","Knabstrupper","Konik","Kundudo","Kustanair","Kyrgyz Horse","Latvian Horse","Lipizzan","Lithuanian Heavy Draught","Lokai","Losino Horse","Lusitano","Lyngshest","M'Bayar","M'Par","Mallorquín","Malopolski","Mangalarga","Mangalarga Marchador","Maremmano","Marismeño Horse","Marsh Tacky","Marwari Horse","Mecklenburger","Međimurje Horse","Menorquín","Mérens Horse","Messara Horse","Metis Trotter","Mezőhegyesi Sport Horse","Miniature Horse","Misaki Horse","Missouri Fox Trotter","Monchina","Mongolian Horse","Mongolian Wild Horse","Monterufolino","Morab","Morgan Horse","Mountain Pleasure Horse","Moyle Horse","Murakoz Horse","Murgese","Mustang Horse","Namib Desert Horse","Nangchen Horse","National Show Horse","Nez Perce Horse","Nivernais Horse","Nokota Horse","Noma","Nonius Horse","Nooitgedachter","Nordlandshest","Noriker Horse","Norman Cob","North American Single-Footer Horse","North Swedish Horse","Norwegian Coldblood Trotter","Norwegian Fjord","Novokirghiz","Oberlander Horse","Ogaden","Oldenburg Horse","Orlov trotter","Ostfriesen","Paint","Pampa Horse","Paso Fino","Pentro Horse","Percheron","Persano Horse","Peruvian Paso","Pintabian","Pleven Horse","Poitevin Horse","Posavac Horse","Pottok","Pryor Mountain Mustang","Przewalski's Horse","Pura Raza Española","Purosangue Orientale","Qatgani","Quarab","Quarter Horse","Racking Horse","Retuerta Horse","Rhenish German Coldblood","Rhinelander Horse","Riwoche Horse","Rocky Mountain Horse","Romanian Sporthorse","Rottaler","Russian Don","Russian Heavy Draft","Russian Trotter","Saddlebred","Salerno Horse","Samolaco Horse","San Fratello Horse","Sarcidano Horse","Sardinian Anglo-Arab","Schleswig Coldblood","Schwarzwälder Kaltblut","Selale","Sella Italiano","Selle Français","Shagya Arabian","Shan Horse","Shire Horse","Siciliano Indigeno","Silesian Horse","Sokolsky Horse","Sorraia","South German Coldblood","Soviet Heavy Draft","Spanish Anglo-Arab","Spanish Barb","Spanish Jennet Horse","Spanish Mustang","Spanish Tarpan","Spanish-Norman Horse","Spiti Horse","Spotted Saddle Horse","Standardbred Horse","Suffolk Punch","Swedish Ardennes","Swedish coldblood trotter","Swedish Warmblood","Swiss Warmblood","Taishū Horse","Takhi","Tawleed","Tchernomor","Tennessee Walking Horse","Tersk Horse","Thoroughbred","Tiger Horse","Tinker Horse","Tolfetano","Tori Horse","Trait Du Nord","Trakehner","Tsushima","Tuigpaard","Ukrainian Riding Horse","Unmol Horse","Uzunyayla","Ventasso Horse","Virginia Highlander","Vlaamperd","Vladimir Heavy Draft","Vyatka","Waler","Waler Horse","Walkaloosa","Warlander","Warmblood","Welsh Cob","Westphalian Horse","Wielkopolski","Württemberger","Xilingol Horse","Yakutian Horse","Yili Horse","Yonaguni Horse","Zaniskari","Žemaitukas","Zhemaichu","Zweibrücker"],Yju=["Acacia-ants","Acorn-plum gall","Aerial yellowjacket","Africanized honey bee","Allegheny mound ant","Almond stone wasp","Ant","Arboreal ant","Argentine ant","Asian paper wasp","Baldfaced hornet","Bee","Bigheaded ant","Black and yellow mud dauber","Black carpenter ant","Black imported fire ant","Blue horntail woodwasp","Blue orchard bee","Braconid wasp","Bumble bee","Carpenter ant","Carpenter wasp","Chalcid wasp","Cicada killer","Citrus blackfly parasitoid","Common paper wasp","Crazy ant","Cuckoo wasp","Cynipid gall wasp","Eastern Carpenter bee","Eastern yellowjacket","Elm sawfly","Encyrtid wasp","Erythrina gall wasp","Eulophid wasp","European hornet","European imported fire ant","False honey ant","Fire ant","Forest bachac","Forest yellowjacket","German yellowjacket","Ghost ant","Giant ichneumon wasp","Giant resin bee","Giant wood wasp","Golden northern bumble bee","Golden paper wasp","Gouty oak gall","Grass Carrying Wasp","Great black wasp","Great golden digger wasp","Hackberry nipple gall parasitoid","Honey bee","Horned oak gall","Horse guard wasp","Hunting wasp","Ichneumonid wasp","Keyhole wasp","Knopper gall","Large garden bumble bee","Large oak-apple gall","Leafcutting bee","Little fire ant","Little yellow ant","Long-horned bees","Long-legged ant","Macao paper wasp","Mallow bee","Marble gall","Mossyrose gall wasp","Mud-daubers","Multiflora rose seed chalcid","Oak apple gall wasp","Oak rough bulletgall wasp","Oak saucer gall","Oak shoot sawfly","Odorous house ant","Orange-tailed bumble bee","Orangetailed potter wasp","Oriental chestnut gall wasp","Paper wasp","Pavement ant","Pigeon tremex","Pip gall wasp","Prairie yellowjacket","Pteromalid wasp","Pyramid ant","Raspberry Horntail","Red ant","Red carpenter ant","Red harvester ant","Red imported fire ant","Red wasp","Red wood ant","Red-tailed wasp","Reddish carpenter ant","Rough harvester ant","Sawfly parasitic wasp","Scale parasitoid","Silky ant","Sirex woodwasp","Siricid woodwasp","Smaller yellow ant","Southeastern blueberry bee","Southern fire ant","Southern yellowjacket","Sphecid wasp","Stony gall","Sweat bee","Texas leafcutting ant","Tiphiid wasp","Torymid wasp","Tramp ant","Valentine ant","Velvet ant","Vespid wasp","Weevil parasitoid","Western harvester ant","Western paper wasp","Western thatching ant","Western yellowjacket","White-horned horntail","Willow shoot sawfly","Woodwasp","Wool sower gall maker","Yellow and black potter wasp","Yellow Crazy Ant","Yellow-horned horntail"],Qju=["Asiatic Lion","Barbary Lion","West African Lion","Northeast Congo Lion","Masai Lion","Transvaal lion","Cape lion"],Xju=["American","American Chinchilla","American Fuzzy Lop","American Sable","Argente Brun","Belgian Hare","Beveren","Blanc de Hotot","Britannia Petite","Californian","Champagne D’Argent","Checkered Giant","Cinnamon","Crème D’Argent","Dutch","Dwarf Hotot","English Angora","English Lop","English Spot","Flemish Giant","Florida White","French Angora","French Lop","Giant Angora","Giant Chinchilla","Harlequin","Havana","Himalayan","Holland Lop","Jersey Wooly","Lilac","Lionhead","Mini Lop","Mini Rex","Mini Satin","Netherland Dwarf","New Zealand","Palomino","Polish","Rex","Rhinelander","Satin","Satin Angora","Silver","Silver Fox","Silver Marten","Standard Chinchilla","Tan","Thrianta"],eHu=["Abrocoma","Abrocoma schistacea","Aconaemys","Aconaemys porteri","African brush-tailed porcupine","Andean mountain cavy","Argentine tuco-tuco","Ashy chinchilla rat","Asiatic brush-tailed porcupine","Atherurus","Azara's agouti","Azara's tuco-tuco","Bahia porcupine","Bathyergus","Bathyergus janetta","Bathyergus suillus","Bennett's chinchilla rat","Bicolored-spined porcupine","Black agouti","Black dwarf porcupine","Black-rumped agouti","Black-tailed hairy dwarf porcupine","Bolivian chinchilla rat","Bolivian tuco-tuco","Bonetto's tuco-tuco","Brandt's yellow-toothed cavy","Brazilian guinea pig","Brazilian porcupine","Brazilian tuco-tuco","Bridge's degu","Brown hairy dwarf porcupine","Budin's chinchilla rat, A. budini","Cape porcupine","Catamarca tuco-tuco","Cavia","Central American agouti","Chacoan tuco-tuco","Chilean rock rat","Chinchilla","Coendou","Coiban agouti","Colburn's tuco-tuco","Collared tuco-tuco","Common degu","Common yellow-toothed cavy","Conover's tuco-tuco","Coruro","Crested agouti","Crested porcupine","Cryptomys","Cryptomys bocagei","Cryptomys damarensis","Cryptomys foxi","Cryptomys hottentotus","Cryptomys mechowi","Cryptomys ochraceocinereus","Cryptomys zechi","Ctenomys","Cuniculus","Cuscomys","Cuscomys ashanika","Dactylomys","Dactylomys boliviensis","Dactylomys dactylinus","Dactylomys peruanus","Dasyprocta","Domestic guinea pig","Emily's tuco-tuco","Erethizon","Famatina chinchilla rat","Frosted hairy dwarf porcupine","Fukomys","Fukomys amatus","Fukomys anselli","Fukomys bocagei","Fukomys damarensis","Fukomys darlingi","Fukomys foxi","Fukomys ilariae","Fukomys kafuensis","Fukomys mechowii","Fukomys micklemi","Fukomys occlusus","Fukomys ochraceocinereus","Fukomys whytei","Fukomys zechi","Furtive tuco-tuco","Galea","Georychus","Georychus capensis","Golden viscacha-rat","Goya tuco-tuco","Greater guinea pig","Green acouchi","Haig's tuco-tuco","Heliophobius","Heliophobius argenteocinereus","Heterocephalus","Heterocephalus glaber","Highland tuco-tuco","Hystrix","Indian porcupine","Isla Mocha degu","Kalinowski agouti","Kannabateomys","Kannabateomys amblyonyx","Lagidium","Lagostomus","Lewis' tuco-tuco","Long-tailed chinchilla","Long-tailed porcupine","Los Chalchaleros' viscacha-rat","Lowland paca","Magellanic tuco-tuco","Malayan porcupine","Maule tuco-tuco","Mendoza tuco-tuco","Mexican agouti","Mexican hairy dwarf porcupine","Microcavia","Montane guinea pig","Moon-toothed degu","Mottled tuco-tuco","Mountain degu","Mountain paca","Mountain viscacha-rat","Myoprocta","Natterer's tuco-tuco","North American porcupine","Northern viscacha","Octodon","Octodontomys","Octomys","Olallamys","Olallamys albicauda","Olallamys edax","Orinoco agouti","Paraguaian hairy dwarf porcupine","Pearson's tuco-tuco","Peruvian tuco-tuco","Philippine porcupine","Pipanacoctomys","Plains viscacha","Plains viscacha-rat","Porteous' tuco-tuco","Punta de Vacas chinchilla rat","Red acouchi","Red-rumped agouti","Reddish tuco-tuco","Rio Negro tuco-tuco","Robust tuco-tuco","Roosmalen's dwarf porcupine","Rothschild's porcupine","Ruatan Island agouti","Sage's rock rat","Salinoctomys","Salta tuco-tuco","San Luis tuco-tuco","Santa Catarina's guinea pig","Shiny guinea pig","Shipton's mountain cavy","Short-tailed chinchilla","Silky tuco-tuco","Social tuco-tuco","Southern mountain cavy","Southern tuco-tuco","Southern viscacha","Spalacopus","Spix's yellow-toothed cavy","Steinbach's tuco-tuco","Streaked dwarf porcupine","Strong tuco-tuco","Stump-tailed porcupine","Sumatran porcupine","Sunda porcupine","Talas tuco-tuco","Tawny tuco-tuco","Thick-spined porcupine","Tiny tuco-tuco","Trichys","Tucuman tuco-tuco","Tympanoctomys","Uspallata chinchilla rat","White-toothed tuco-tuco","Wolffsohn's viscacha"],tHu=["Viper Adder","Common adder","Death Adder","Desert death adder","Horned adder","Long-nosed adder","Many-horned adder","Mountain adder","Mud adder","Namaqua dwarf adder","Nightingale adder","Peringuey's adder","Puff adder","African puff adder","Rhombic night adder","Sand adder","Dwarf sand adder","Namib dwarf sand adder","Water adder","Aesculapian snake","Anaconda","Bolivian anaconda","De Schauensee's anaconda","Green anaconda","Yellow anaconda","Arafura file snake","Asp","European asp","Egyptian asp","African beaked snake","Ball Python","Bird snake","Black-headed snake","Mexican black kingsnake","Black rat snake","Black snake","Red-bellied black snake","Blind snake","Brahminy blind snake","Texas blind snake","Western blind snake","Boa","Abaco Island boa","Amazon tree boa","Boa constrictor","Cuban boa","Dumeril's boa","Dwarf boa","Emerald tree boa","Hogg Island boa","Jamaican boa","Madagascar ground boa","Madagascar tree boa","Puerto Rican boa","Rainbow boa","Red-tailed boa","Rosy boa","Rubber boa","Sand boa","Tree boa","Boiga","Boomslang","Brown snake","Eastern brown snake","Bull snake","Bushmaster","Dwarf beaked snake","Rufous beaked snake","Canebrake","Cantil","Cascabel","Cat-eyed snake","Banded cat-eyed snake","Green cat-eyed snake","Cat snake","Andaman cat snake","Beddome's cat snake","Dog-toothed cat snake","Forsten's cat snake","Gold-ringed cat snake","Gray cat snake","Many-spotted cat snake","Tawny cat snake","Chicken snake","Coachwhip snake","Cobra","Andaman cobra","Arabian cobra","Asian cobra","Banded water cobra","Black-necked cobra","Black-necked spitting cobra","Black tree cobra","Burrowing cobra","Cape cobra","Caspian cobra","Congo water cobra","Common cobra","Eastern water cobra","Egyptian cobra","Equatorial spitting cobra","False cobra","False water cobra","Forest cobra","Gold tree cobra","Indian cobra","Indochinese spitting cobra","Javan spitting cobra","King cobra","Mandalay cobra","Mozambique spitting cobra","North Philippine cobra","Nubian spitting cobra","Philippine cobra","Red spitting cobra","Rinkhals cobra","Shield-nosed cobra","Sinai desert cobra","Southern Indonesian spitting cobra","Southern Philippine cobra","Southwestern black spitting cobra","Snouted cobra","Spectacled cobra","Spitting cobra","Storm water cobra","Thai cobra","Taiwan cobra","Zebra spitting cobra","Collett's snake","Congo snake","Copperhead","American copperhead","Australian copperhead","Coral snake","Arizona coral snake","Beddome's coral snake","Brazilian coral snake","Cape coral snake","Harlequin coral snake","High Woods coral snake","Malayan long-glanded coral snake","Texas Coral Snake","Western coral snake","Corn snake","South eastern corn snake","Cottonmouth","Crowned snake","Cuban wood snake","Eastern hognose snake","Egg-eater","Eastern coral snake","Fer-de-lance","Fierce snake","Fishing snake","Flying snake","Golden tree snake","Indian flying snake","Moluccan flying snake","Ornate flying snake","Paradise flying snake","Twin-Barred tree snake","Banded Flying Snake","Fox snake, three species of Pantherophis","Forest flame snake","Garter snake","Checkered garter snake","Common garter snake","San Francisco garter snake","Texas garter snake","Cape gopher snake","Grass snake","Green snake","Rough green snake","Smooth green snake","Ground snake","Common ground snake","Three-lined ground snake","Western ground snake","Habu","Hognose snake","Blonde hognose snake","Dusty hognose snake","Jan's hognose snake","Giant Malagasy hognose snake","Mexican hognose snake","South American hognose snake","Hundred pacer","Ikaheka snake","Indigo snake","Jamaican Tree Snake","Keelback","Asian keelback","Assam keelback","Black-striped keelback","Buff striped keelback","Burmese keelback","Checkered keelback","Common keelback","Hill keelback","Himalayan keelback","Khasi Hills keelback","Modest keelback","Nicobar Island keelback","Nilgiri keelback","Orange-collared keelback","Red-necked keelback","Sikkim keelback","Speckle-bellied keelback","White-lipped keelback","Wynaad keelback","Yunnan keelback","King brown","King snake","California kingsnake","Desert kingsnake","Grey-banded kingsnake","North eastern king snake","Prairie kingsnake","Scarlet kingsnake","Speckled kingsnake","Krait","Banded krait","Blue krait","Black krait","Burmese krait","Ceylon krait","Indian krait","Lesser black krait","Malayan krait","Many-banded krait","Northeastern hill krait","Red-headed krait","Sind krait","Large shield snake","Lancehead","Common lancehead","Lora","Grey Lora","Lyre snake","Baja California lyresnake","Central American lyre snake","Texas lyre snake","Eastern lyre snake","Machete savane","Mamba","Black mamba","Green mamba","Eastern green mamba","Western green mamba","Mamushi","Mangrove snake","Milk snake","Moccasin snake","Montpellier snake","Mud snake","Eastern mud snake","Western mud snake","Mussurana","Night snake","Cat-eyed night snake","Texas night snake","Nichell snake","Narrowhead Garter Snake","Nose-horned viper","Rhinoceros viper","Vipera ammodytes","Parrot snake","Mexican parrot snake","Patchnose snake","Perrotet's shieldtail snake","Pine snake","Pipe snake","Asian pipe snake","Dwarf pipe snake","Red-tailed pipe snake","Python","African rock python","Amethystine python","Angolan python","Australian scrub python","Ball python","Bismarck ringed python","Black headed python","Blood python","Boelen python","Borneo short-tailed python","Bredl's python","Brown water python","Burmese python","Calabar python","Western carpet python","Centralian carpet python","Coastal carpet python","Inland carpet python","Jungle carpet python","New Guinea carpet python","Northwestern carpet python","Southwestern carpet python","Children's python","Dauan Island water python","Desert woma python","Diamond python","Flinders python","Green tree python","Halmahera python","Indian python","Indonesian water python","Macklot's python","Mollucan python","Oenpelli python","Olive python","Papuan python","Pygmy python","Red blood python","Reticulated python","Kayaudi dwarf reticulated python","Selayer reticulated python","Rough-scaled python","Royal python","Savu python","Spotted python","Stimson's python","Sumatran short-tailed python","Tanimbar python","Timor python","Wetar Island python","White-lipped python","Brown white-lipped python","Northern white-lipped python","Southern white-lipped python","Woma python","Western woma python","Queen snake","Racer","Bimini racer","Buttermilk racer","Eastern racer","Eastern yellowbelly sad racer","Mexican racer","Southern black racer","Tan racer","West Indian racer","Raddysnake","Southwestern blackhead snake","Rat snake","Baird's rat snake","Beauty rat snake","Great Plains rat snake","Green rat snake","Japanese forest rat snake","Japanese rat snake","King rat snake","Mandarin rat snake","Persian rat snake","Red-backed rat snake","Twin-spotted rat snake","Yellow-striped rat snake","Manchurian Black Water Snake","Rattlesnake","Arizona black rattlesnake","Aruba rattlesnake","Chihuahuan ridge-nosed rattlesnake","Coronado Island rattlesnake","Durango rock rattlesnake","Dusky pigmy rattlesnake","Eastern diamondback rattlesnake","Grand Canyon rattlesnake","Great Basin rattlesnake","Hopi rattlesnake","Lance-headed rattlesnake","Long-tailed rattlesnake","Massasauga rattlesnake","Mexican green rattlesnake","Mexican west coast rattlesnake","Midget faded rattlesnake","Mojave rattlesnake","Northern black-tailed rattlesnake","Oaxacan small-headed rattlesnake","Rattler","Red diamond rattlesnake","Southern Pacific rattlesnake","Southwestern speckled rattlesnake","Tancitaran dusky rattlesnake","Tiger rattlesnake","Timber rattlesnake","Tropical rattlesnake","Twin-spotted rattlesnake","Uracoan rattlesnake","Western diamondback rattlesnake","Ribbon snake","Rinkhals","River jack","Sea snake","Annulated sea snake","Beaked sea snake","Dubois's sea snake","Hardwicke's sea snake","Hook Nosed Sea Snake","Olive sea snake","Pelagic sea snake","Stoke's sea snake","Yellow-banded sea snake","Yellow-bellied sea snake","Yellow-lipped sea snake","Shield-tailed snake","Sidewinder","Colorado desert sidewinder","Mojave desert sidewinder","Sonoran sidewinder","Small-eyed snake","Smooth snake","Brazilian smooth snake","European smooth snake","Stiletto snake","Striped snake","Japanese striped snake","Sunbeam snake","Taipan","Central ranges taipan","Coastal taipan","Inland taipan","Paupan taipan","Tentacled snake","Tic polonga","Tiger snake","Chappell Island tiger snake","Common tiger snake","Down's tiger snake","Eastern tiger snake","King Island tiger snake","Krefft's tiger snake","Peninsula tiger snake","Tasmanian tiger snake","Western tiger snake","Tigre snake","Tree snake","Blanding's tree snake","Blunt-headed tree snake","Brown tree snake","Long-nosed tree snake","Many-banded tree snake","Northern tree snake","Trinket snake","Black-banded trinket snake","Twig snake","African twig snake","Twin Headed King Snake","Titanboa","Urutu","Vine snake","Asian Vine Snake, Whip Snake","American Vine Snake","Mexican vine snake","Viper","Asp viper","Bamboo viper","Bluntnose viper","Brazilian mud Viper","Burrowing viper","Bush viper","Great Lakes bush viper","Hairy bush viper","Nitsche's bush viper","Rough-scaled bush viper","Spiny bush viper","Carpet viper","Crossed viper","Cyclades blunt-nosed viper","Eyelash viper","False horned viper","Fea's viper","Fifty pacer","Gaboon viper","Hognosed viper","Horned desert viper","Horned viper","Jumping viper","Kaznakov's viper","Leaf-nosed viper","Leaf viper","Levant viper","Long-nosed viper","McMahon's viper","Mole viper","Palestine viper","Pallas' viper","Palm viper","Amazonian palm viper","Black-speckled palm-pitviper","Eyelash palm-pitviper","Green palm viper","Mexican palm-pitviper","Guatemalan palm viper","Honduran palm viper","Siamese palm viper","Side-striped palm-pitviper","Yellow-lined palm viper","Pit viper","Banded pitviper","Bamboo pitviper","Barbour's pit viper","Black-tailed horned pit viper","Bornean pitviper","Brongersma's pitviper","Brown spotted pitviper[4]","Cantor's pitviper","Elegant pitviper","Eyelash pit viper","Fan-Si-Pan horned pitviper","Flat-nosed pitviper","Godman's pit viper","Green tree pit viper","Habu pit viper","Hagen's pitviper","Horseshoe pitviper","Jerdon's pitviper","Kanburian pit viper","Kaulback's lance-headed pitviper","Kham Plateau pitviper","Large-eyed pitviper","Malabar rock pitviper","Malayan pit viper","Mangrove pit viper","Mangshan pitviper","Motuo bamboo pitviper","Nicobar bamboo pitviper","Philippine pitviper","Pointed-scaled pit viper[5]","Red-tailed bamboo pitviper","Schultze's pitviper","Stejneger's bamboo pitviper","Sri Lankan pit viper","Temple pit viper","Tibetan bamboo pitviper","Tiger pit viper","Undulated pit viper","Wagler's pit viper","Wirot's pit viper","Portuguese viper","Saw-scaled viper","Schlegel's viper","Sedge viper","Sharp-nosed viper","Snorkel viper","Temple viper","Tree viper","Chinese tree viper","Guatemalan tree viper","Hutton's tree viper","Indian tree viper","Large-scaled tree viper","Malcolm's tree viper","Nitsche's tree viper","Pope's tree viper","Rough-scaled tree viper","Rungwe tree viper","Sumatran tree viper","White-lipped tree viper","Ursini's viper","Western hog-nosed viper","Wart snake","Water moccasin","Water snake","Bocourt's water snake","Northern water snake","Whip snake","Long-nosed whip snake","Wolf snake","African wolf snake","Barred wolf snake","Worm snake","Common worm snake","Longnosed worm snake","Wutu","Yarara","Zebra snake"],uHu=["dog","cat","snake","bear","lion","cetacean","insect","crocodilia","cow","bird","fish","rabbit","horse"],nHu={bear:Vju,bird:$ju,cat:Kju,cetacean:Wju,cow:Gju,crocodilia:Uju,dog:qju,fish:Jju,horse:Zju,insect:Yju,lion:Qju,rabbit:Xju,rodent:eHu,snake:tHu,type:uHu},iHu=nHu,rHu=["{{person.name}}","{{company.name}}"],aHu=["Redhold","Treeflex","Trippledex","Kanlam","Bigtax","Daltfresh","Toughjoyfax","Mat Lam Tam","Otcom","Tres-Zap","Y-Solowarm","Tresom","Voltsillam","Biodex","Greenlam","Viva","Matsoft","Temp","Zoolab","Subin","Rank","Job","Stringtough","Tin","It","Home Ing","Zamit","Sonsing","Konklab","Alpha","Latlux","Voyatouch","Alphazap","Holdlamis","Zaam-Dox","Sub-Ex","Quo Lux","Bamity","Ventosanzap","Lotstring","Hatity","Tempsoft","Overhold","Fixflex","Konklux","Zontrax","Tampflex","Span","Namfix","Transcof","Stim","Fix San","Sonair","Stronghold","Fintone","Y-find","Opela","Lotlux","Ronstring","Zathin","Duobam","Keylex"],oHu=["0.#.#","0.##","#.##","#.#","#.#.#"],sHu={author:rHu,name:aHu,version:oHu},lHu=sHu,cHu=["###-###-####","(###) ###-####","1-###-###-####","###.###.####"],dHu={formats:cHu},hHu=dHu,EHu=["red","green","blue","yellow","purple","mint green","teal","white","black","orange","pink","grey","maroon","violet","turquoise","tan","sky blue","salmon","plum","orchid","olive","magenta","lime","ivory","indigo","gold","fuchsia","cyan","azure","lavender","silver"],mHu={human:EHu},gHu=mHu,fHu=["Books","Movies","Music","Games","Electronics","Computers","Home","Garden","Tools","Grocery","Health","Beauty","Toys","Kids","Baby","Clothing","Shoes","Jewelery","Sports","Outdoors","Automotive","Industrial"],pHu=["Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support","The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive","New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016","The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality","The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design","The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J","The Football Is Good For Training And Recreational Purposes","Carbonite web goalkeeper gloves are ergonomically designed to give easy fit","Boston's most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles","New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart","The beautiful range of Apple Naturalé that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients","Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals"],DHu={adjective:["Small","Ergonomic","Electronic","Rustic","Intelligent","Gorgeous","Incredible","Elegant","Fantastic","Practical","Modern","Recycled","Sleek","Bespoke","Awesome","Generic","Handcrafted","Handmade","Oriental","Licensed","Luxurious","Refined","Unbranded","Tasty"],material:["Steel","Bronze","Wooden","Concrete","Plastic","Cotton","Granite","Rubber","Metal","Soft","Fresh","Frozen"],product:["Chair","Car","Computer","Keyboard","Mouse","Bike","Ball","Gloves","Pants","Shirt","Table","Shoes","Hat","Towels","Soap","Tuna","Chicken","Fish","Cheese","Bacon","Pizza","Salad","Sausages","Chips"]},xHu={department:fHu,product_description:pHu,product_name:DHu},vHu=xHu,CHu=["Adaptive","Advanced","Ameliorated","Assimilated","Automated","Balanced","Business-focused","Centralized","Cloned","Compatible","Configurable","Cross-group","Cross-platform","Customer-focused","Customizable","Decentralized","De-engineered","Devolved","Digitized","Distributed","Diverse","Down-sized","Enhanced","Enterprise-wide","Ergonomic","Exclusive","Expanded","Extended","Face to face","Focused","Front-line","Fully-configurable","Function-based","Fundamental","Future-proofed","Grass-roots","Horizontal","Implemented","Innovative","Integrated","Intuitive","Inverse","Managed","Mandatory","Monitored","Multi-channelled","Multi-lateral","Multi-layered","Multi-tiered","Networked","Object-based","Open-architected","Open-source","Operative","Optimized","Optional","Organic","Organized","Persevering","Persistent","Phased","Polarised","Pre-emptive","Proactive","Profit-focused","Profound","Programmable","Progressive","Public-key","Quality-focused","Reactive","Realigned","Re-contextualized","Re-engineered","Reduced","Reverse-engineered","Right-sized","Robust","Seamless","Secured","Self-enabling","Sharable","Stand-alone","Streamlined","Switchable","Synchronised","Synergistic","Synergized","Team-oriented","Total","Triple-buffered","Universal","Up-sized","Upgradable","User-centric","User-friendly","Versatile","Virtual","Visionary","Vision-oriented"],bHu=["clicks-and-mortar","value-added","vertical","proactive","robust","revolutionary","scalable","leading-edge","innovative","intuitive","strategic","e-business","mission-critical","sticky","one-to-one","24/7","end-to-end","global","B2B","B2C","granular","frictionless","virtual","viral","dynamic","24/365","best-of-breed","killer","magnetic","bleeding-edge","web-enabled","interactive","dot-com","sexy","back-end","real-time","efficient","front-end","distributed","seamless","extensible","turn-key","world-class","open-source","cross-platform","cross-media","synergistic","bricks-and-clicks","out-of-the-box","enterprise","integrated","impactful","wireless","transparent","next-generation","cutting-edge","user-centric","visionary","customized","ubiquitous","plug-and-play","collaborative","compelling","holistic","rich"],kHu=["synergies","paradigms","markets","partnerships","infrastructures","platforms","initiatives","channels","eyeballs","communities","ROI","solutions","action-items","portals","niches","technologies","content","supply-chains","convergence","relationships","architectures","interfaces","e-markets","e-commerce","systems","bandwidth","models","mindshare","deliverables","users","schemas","networks","applications","metrics","e-business","functionalities","experiences","web services","methodologies","blockchains","lifetime value"],FHu=["implement","utilize","integrate","streamline","optimize","evolve","transform","embrace","enable","orchestrate","leverage","reinvent","aggregate","architect","enhance","incentivize","morph","empower","envisioneer","monetize","harness","facilitate","seize","disintermediate","synergize","strategize","deploy","brand","grow","target","syndicate","synthesize","deliver","mesh","incubate","engage","maximize","benchmark","expedite","reintermediate","whiteboard","visualize","repurpose","innovate","scale","unleash","drive","extend","engineer","revolutionize","generate","exploit","transition","e-enable","iterate","cultivate","matrix","productize","redefine","recontextualize"],yHu=["24 hour","24/7","3rd generation","4th generation","5th generation","6th generation","actuating","analyzing","asymmetric","asynchronous","attitude-oriented","background","bandwidth-monitored","bi-directional","bifurcated","bottom-line","clear-thinking","client-driven","client-server","coherent","cohesive","composite","context-sensitive","contextually-based","content-based","dedicated","demand-driven","didactic","directional","discrete","disintermediate","dynamic","eco-centric","empowering","encompassing","even-keeled","executive","explicit","exuding","fault-tolerant","foreground","fresh-thinking","full-range","global","grid-enabled","heuristic","high-level","holistic","homogeneous","human-resource","hybrid","impactful","incremental","intangible","interactive","intermediate","leading edge","local","logistical","maximized","methodical","mission-critical","mobile","modular","motivating","multimedia","multi-state","multi-tasking","national","needs-based","neutral","next generation","non-volatile","object-oriented","optimal","optimizing","radical","real-time","reciprocal","regional","responsive","scalable","secondary","solution-oriented","stable","static","systematic","systemic","system-worthy","tangible","tertiary","transitional","uniform","upward-trending","user-facing","value-added","web-enabled","well-modulated","zero administration","zero defect","zero tolerance"],AHu=["{{person.last_name}} {{company.suffix}}","{{person.last_name}} - {{person.last_name}}","{{person.last_name}}, {{person.last_name}} and {{person.last_name}}"],_Hu=["ability","access","adapter","algorithm","alliance","analyzer","application","approach","architecture","archive","artificial intelligence","array","attitude","benchmark","budgetary management","capability","capacity","challenge","circuit","collaboration","complexity","concept","conglomeration","contingency","core","customer loyalty","database","data-warehouse","definition","emulation","encoding","encryption","extranet","firmware","flexibility","focus group","forecast","frame","framework","function","functionalities","Graphic Interface","groupware","Graphical User Interface","hardware","help-desk","hierarchy","hub","implementation","info-mediaries","infrastructure","initiative","installation","instruction set","interface","internet solution","intranet","knowledge user","knowledge base","local area network","leverage","matrices","matrix","methodology","middleware","migration","model","moderator","monitoring","moratorium","neural-net","open architecture","open system","orchestration","paradigm","parallelism","policy","portal","pricing structure","process improvement","product","productivity","project","projection","protocol","secured line","service-desk","software","solution","standardization","strategy","structure","success","superstructure","support","synergy","system engine","task-force","throughput","time-frame","toolset","utilisation","website","workforce"],SHu=["Inc","and Sons","LLC","Group"],BHu={adjective:CHu,buzz_adjective:bHu,buzz_noun:kHu,buzz_verb:FHu,descriptor:yHu,name_pattern:AHu,noun:_Hu,suffix:SHu},wHu=BHu,LHu=["id","title","name","email","phone","token","group","category","password","comment","avatar","status","createdAt","updatedAt"],zHu={column:LHu},MHu=zHu,THu={wide:["January","February","March","April","May","June","July","August","September","October","November","December"],abbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},NHu={wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},PHu={month:THu,weekday:NHu},RHu=PHu,IHu=["Checking","Savings","Money Market","Investment","Home Loan","Credit Card","Auto Loan","Personal Loan"],OHu=["34##-######-####L","37##-######-####L"],jHu=["30[0-5]#-######-###L","36##-######-###L","54##-####-####-###L"],HHu=["6011-####-####-###L","65##-####-####-###L","64[4-9]#-####-####-###L","6011-62##-####-####-###L","65##-62##-####-####-###L","64[4-9]#-62##-####-####-###L"],VHu=["3528-####-####-###L","3529-####-####-###L","35[3-8]#-####-####-###L"],$Hu=["5018-#{4}-#{4}-#{3}L","5020-#{4}-#{4}-#{3}L","5038-#{4}-#{4}-#{3}L","5893-#{4}-#{4}-#{3}L","6304-#{4}-#{4}-#{3}L","6759-#{4}-#{4}-#{3}L","676[1-3]-####-####-###L","5018#{11,15}L","5020#{11,15}L","5038#{11,15}L","5893#{11,15}L","6304#{11,15}L","6759#{11,15}L","676[1-3]#{11,15}L"],KHu=["5[1-5]##-####-####-###L","2[221-720]-####-####-###L"],WHu=["4###########L","4###-####-####-###L"],GHu={american_express:OHu,diners_club:jHu,discover:HHu,jcb:VHu,maestro:$Hu,mastercard:KHu,visa:WHu},UHu=GHu,qHu=[{name:"UAE Dirham",code:"AED",symbol:""},{name:"Afghani",code:"AFN",symbol:"؋"},{name:"Lek",code:"ALL",symbol:"Lek"},{name:"Armenian Dram",code:"AMD",symbol:""},{name:"Netherlands Antillian Guilder",code:"ANG",symbol:"ƒ"},{name:"Kwanza",code:"AOA",symbol:""},{name:"Argentine Peso",code:"ARS",symbol:"$"},{name:"Australian Dollar",code:"AUD",symbol:"$"},{name:"Aruban Guilder",code:"AWG",symbol:"ƒ"},{name:"Azerbaijanian Manat",code:"AZN",symbol:"ман"},{name:"Convertible Marks",code:"BAM",symbol:"KM"},{name:"Barbados Dollar",code:"BBD",symbol:"$"},{name:"Taka",code:"BDT",symbol:""},{name:"Bulgarian Lev",code:"BGN",symbol:"лв"},{name:"Bahraini Dinar",code:"BHD",symbol:""},{name:"Burundi Franc",code:"BIF",symbol:""},{name:"Bermudian Dollar (customarily known as Bermuda Dollar)",code:"BMD",symbol:"$"},{name:"Brunei Dollar",code:"BND",symbol:"$"},{name:"Boliviano boliviano",code:"BOB",symbol:"Bs"},{name:"Brazilian Real",code:"BRL",symbol:"R$"},{name:"Bahamian Dollar",code:"BSD",symbol:"$"},{name:"Pula",code:"BWP",symbol:"P"},{name:"Belarusian Ruble",code:"BYN",symbol:"Rbl"},{name:"Belize Dollar",code:"BZD",symbol:"BZ$"},{name:"Canadian Dollar",code:"CAD",symbol:"$"},{name:"Congolese Franc",code:"CDF",symbol:""},{name:"Swiss Franc",code:"CHF",symbol:"CHF"},{name:"Chilean Peso",code:"CLP",symbol:"$"},{name:"Yuan Renminbi",code:"CNY",symbol:"¥"},{name:"Colombian Peso",code:"COP",symbol:"$"},{name:"Costa Rican Colon",code:"CRC",symbol:"₡"},{name:"Cuban Peso",code:"CUP",symbol:"₱"},{name:"Cape Verde Escudo",code:"CVE",symbol:""},{name:"Czech Koruna",code:"CZK",symbol:"Kč"},{name:"Djibouti Franc",code:"DJF",symbol:""},{name:"Danish Krone",code:"DKK",symbol:"kr"},{name:"Dominican Peso",code:"DOP",symbol:"RD$"},{name:"Algerian Dinar",code:"DZD",symbol:""},{name:"Egyptian Pound",code:"EGP",symbol:"£"},{name:"Nakfa",code:"ERN",symbol:""},{name:"Ethiopian Birr",code:"ETB",symbol:""},{name:"Euro",code:"EUR",symbol:"€"},{name:"Fiji Dollar",code:"FJD",symbol:"$"},{name:"Falkland Islands Pound",code:"FKP",symbol:"£"},{name:"Pound Sterling",code:"GBP",symbol:"£"},{name:"Lari",code:"GEL",symbol:""},{name:"Cedi",code:"GHS",symbol:""},{name:"Gibraltar Pound",code:"GIP",symbol:"£"},{name:"Dalasi",code:"GMD",symbol:""},{name:"Guinea Franc",code:"GNF",symbol:""},{name:"Quetzal",code:"GTQ",symbol:"Q"},{name:"Guyana Dollar",code:"GYD",symbol:"$"},{name:"Hong Kong Dollar",code:"HKD",symbol:"$"},{name:"Lempira",code:"HNL",symbol:"L"},{name:"Gourde",code:"HTG",symbol:""},{name:"Forint",code:"HUF",symbol:"Ft"},{name:"Rupiah",code:"IDR",symbol:"Rp"},{name:"New Israeli Sheqel",code:"ILS",symbol:"₪"},{name:"Bhutanese Ngultrum",code:"BTN",symbol:"Nu"},{name:"Indian Rupee",code:"INR",symbol:"₹"},{name:"Iraqi Dinar",code:"IQD",symbol:""},{name:"Iranian Rial",code:"IRR",symbol:"﷼"},{name:"Iceland Krona",code:"ISK",symbol:"kr"},{name:"Jamaican Dollar",code:"JMD",symbol:"J$"},{name:"Jordanian Dinar",code:"JOD",symbol:""},{name:"Yen",code:"JPY",symbol:"¥"},{name:"Kenyan Shilling",code:"KES",symbol:""},{name:"Som",code:"KGS",symbol:"лв"},{name:"Riel",code:"KHR",symbol:"៛"},{name:"Comoro Franc",code:"KMF",symbol:""},{name:"North Korean Won",code:"KPW",symbol:"₩"},{name:"Won",code:"KRW",symbol:"₩"},{name:"Kuwaiti Dinar",code:"KWD",symbol:""},{name:"Cayman Islands Dollar",code:"KYD",symbol:"$"},{name:"Tenge",code:"KZT",symbol:"лв"},{name:"Kip",code:"LAK",symbol:"₭"},{name:"Lebanese Pound",code:"LBP",symbol:"£"},{name:"Sri Lanka Rupee",code:"LKR",symbol:"₨"},{name:"Liberian Dollar",code:"LRD",symbol:"$"},{name:"Libyan Dinar",code:"LYD",symbol:""},{name:"Moroccan Dirham",code:"MAD",symbol:""},{name:"Moldovan Leu",code:"MDL",symbol:""},{name:"Malagasy Ariary",code:"MGA",symbol:""},{name:"Denar",code:"MKD",symbol:"ден"},{name:"Kyat",code:"MMK",symbol:""},{name:"Tugrik",code:"MNT",symbol:"₮"},{name:"Pataca",code:"MOP",symbol:""},{name:"Ouguiya",code:"MRU",symbol:""},{name:"Mauritius Rupee",code:"MUR",symbol:"₨"},{name:"Rufiyaa",code:"MVR",symbol:""},{name:"Kwacha",code:"MWK",symbol:""},{name:"Mexican Peso",code:"MXN",symbol:"$"},{name:"Malaysian Ringgit",code:"MYR",symbol:"RM"},{name:"Metical",code:"MZN",symbol:"MT"},{name:"Naira",code:"NGN",symbol:"₦"},{name:"Cordoba Oro",code:"NIO",symbol:"C$"},{name:"Norwegian Krone",code:"NOK",symbol:"kr"},{name:"Nepalese Rupee",code:"NPR",symbol:"₨"},{name:"New Zealand Dollar",code:"NZD",symbol:"$"},{name:"Rial Omani",code:"OMR",symbol:"﷼"},{name:"Balboa",code:"PAB",symbol:"B/."},{name:"Nuevo Sol",code:"PEN",symbol:"S/."},{name:"Kina",code:"PGK",symbol:""},{name:"Philippine Peso",code:"PHP",symbol:"Php"},{name:"Pakistan Rupee",code:"PKR",symbol:"₨"},{name:"Zloty",code:"PLN",symbol:"zł"},{name:"Guarani",code:"PYG",symbol:"Gs"},{name:"Qatari Rial",code:"QAR",symbol:"﷼"},{name:"New Leu",code:"RON",symbol:"lei"},{name:"Serbian Dinar",code:"RSD",symbol:"Дин."},{name:"Russian Ruble",code:"RUB",symbol:"руб"},{name:"Rwanda Franc",code:"RWF",symbol:""},{name:"Saudi Riyal",code:"SAR",symbol:"﷼"},{name:"Solomon Islands Dollar",code:"SBD",symbol:"$"},{name:"Seychelles Rupee",code:"SCR",symbol:"₨"},{name:"Sudanese Pound",code:"SDG",symbol:""},{name:"Swedish Krona",code:"SEK",symbol:"kr"},{name:"Singapore Dollar",code:"SGD",symbol:"$"},{name:"Saint Helena Pound",code:"SHP",symbol:"£"},{name:"Leone",code:"SLE",symbol:""},{name:"Somali Shilling",code:"SOS",symbol:"S"},{name:"Surinam Dollar",code:"SRD",symbol:"$"},{name:"South Sudanese pound",code:"SSP",symbol:""},{name:"Dobra",code:"STN",symbol:"Db"},{name:"Syrian Pound",code:"SYP",symbol:"£"},{name:"Lilangeni",code:"SZL",symbol:""},{name:"Baht",code:"THB",symbol:"฿"},{name:"Somoni",code:"TJS",symbol:""},{name:"Manat",code:"TMT",symbol:""},{name:"Tunisian Dinar",code:"TND",symbol:""},{name:"Pa'anga",code:"TOP",symbol:""},{name:"Turkish Lira",code:"TRY",symbol:"₺"},{name:"Trinidad and Tobago Dollar",code:"TTD",symbol:"TT$"},{name:"New Taiwan Dollar",code:"TWD",symbol:"NT$"},{name:"Tanzanian Shilling",code:"TZS",symbol:""},{name:"Hryvnia",code:"UAH",symbol:"₴"},{name:"Uganda Shilling",code:"UGX",symbol:""},{name:"US Dollar",code:"USD",symbol:"$"},{name:"Peso Uruguayo",code:"UYU",symbol:"$U"},{name:"Uzbekistan Sum",code:"UZS",symbol:"лв"},{name:"Venezuelan bolívar",code:"VES",symbol:"Bs"},{name:"Dong",code:"VND",symbol:"₫"},{name:"Vatu",code:"VUV",symbol:""},{name:"Tala",code:"WST",symbol:""},{name:"CFA Franc BEAC",code:"XAF",symbol:""},{name:"East Caribbean Dollar",code:"XCD",symbol:"$"},{name:"CFA Franc BCEAO",code:"XOF",symbol:""},{name:"CFP Franc",code:"XPF",symbol:""},{name:"Yemeni Rial",code:"YER",symbol:"﷼"},{name:"Rand",code:"ZAR",symbol:"R"},{name:"Lesotho Loti",code:"LSL",symbol:""},{name:"Namibia Dollar",code:"NAD",symbol:"N$"},{name:"Zambian Kwacha",code:"ZMW",symbol:"K"},{name:"Zimbabwe Dollar",code:"ZWL",symbol:""}],JHu=["deposit","withdrawal","payment","invoice"],ZHu={account_type:IHu,credit_card:UHu,currency:qHu,transaction_type:JHu},YHu=ZHu,QHu=["auxiliary","primary","back-end","digital","open-source","virtual","cross-platform","redundant","online","haptic","multi-byte","bluetooth","wireless","1080p","neural","optical","solid state","mobile"],XHu=["backing up","bypassing","hacking","overriding","compressing","copying","navigating","indexing","connecting","generating","quantifying","calculating","synthesizing","transmitting","programming","parsing"],eVu=["driver","protocol","bandwidth","panel","microchip","program","port","card","array","interface","system","sensor","firewall","hard drive","pixel","alarm","feed","monitor","application","transmitter","bus","circuit","capacitor","matrix"],tVu=["If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!","We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!","Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!","You can't {{verb}} the {{noun}} without {{ingverb}} the {{adjective}} {{abbreviation}} {{noun}}!","Use the {{adjective}} {{abbreviation}} {{noun}}, then you can {{verb}} the {{adjective}} {{noun}}!","The {{abbreviation}} {{noun}} is down, {{verb}} the {{adjective}} {{noun}} so we can {{verb}} the {{abbreviation}} {{noun}}!","{{ingverb}} the {{noun}} won't do anything, we need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!","I'll {{verb}} the {{adjective}} {{abbreviation}} {{noun}}, that should {{noun}} the {{abbreviation}} {{noun}}!"],uVu=["back up","bypass","hack","override","compress","copy","navigate","index","connect","generate","quantify","calculate","synthesize","input","transmit","program","reboot","parse"],nVu={adjective:QHu,ingverb:XHu,noun:eVu,phrase:tVu,verb:uVu},iVu=nVu,rVu=["com","biz","info","name","net","org"],aVu=["example.org","example.com","example.net"],oVu=["gmail.com","yahoo.com","hotmail.com"],sVu={domain_suffix:rVu,example_email:aVu,free_email:oVu},lVu=sVu,cVu=["#####","####","###"],dVu=["Abilene","Akron","Alafaya","Alameda","Albany","Albuquerque","Alexandria","Alhambra","Aliso Viejo","Allen","Allentown","Aloha","Alpharetta","Altadena","Altamonte Springs","Altoona","Amarillo","Ames","Anaheim","Anchorage","Anderson","Ankeny","Ann Arbor","Annandale","Antelope","Antioch","Apex","Apopka","Apple Valley","Appleton","Arcadia","Arden-Arcade","Arecibo","Arlington","Arlington Heights","Arvada","Ashburn","Asheville","Aspen Hill","Atascocita","Athens-Clarke County","Atlanta","Attleboro","Auburn","Augusta-Richmond County","Aurora","Austin","Avondale","Azusa","Bakersfield","Baldwin Park","Baltimore","Barnstable Town","Bartlett","Baton Rouge","Battle Creek","Bayamon","Bayonne","Baytown","Beaumont","Beavercreek","Beaverton","Bedford","Bel Air South","Bell Gardens","Belleville","Bellevue","Bellflower","Bellingham","Bend","Bentonville","Berkeley","Berwyn","Bethesda","Bethlehem","Billings","Biloxi","Binghamton","Birmingham","Bismarck","Blacksburg","Blaine","Bloomington","Blue Springs","Boca Raton","Boise City","Bolingbrook","Bonita Springs","Bossier City","Boston","Bothell","Boulder","Bountiful","Bowie","Bowling Green","Boynton Beach","Bozeman","Bradenton","Brandon","Brentwood","Bridgeport","Bristol","Brockton","Broken Arrow","Brookhaven","Brookline","Brooklyn Park","Broomfield","Brownsville","Bryan","Buckeye","Buena Park","Buffalo","Buffalo Grove","Burbank","Burien","Burke","Burleson","Burlington","Burnsville","Caguas","Caldwell","Camarillo","Cambridge","Camden","Canton","Cape Coral","Carlsbad","Carmel","Carmichael","Carolina","Carrollton","Carson","Carson City","Cary","Casa Grande","Casas Adobes","Casper","Castle Rock","Castro Valley","Catalina Foothills","Cathedral City","Catonsville","Cedar Hill","Cedar Park","Cedar Rapids","Centennial","Centreville","Ceres","Cerritos","Champaign","Chandler","Chapel Hill","Charleston","Charlotte","Charlottesville","Chattanooga","Cheektowaga","Chesapeake","Chesterfield","Cheyenne","Chicago","Chico","Chicopee","Chino","Chino Hills","Chula Vista","Cicero","Cincinnati","Citrus Heights","Clarksville","Clearwater","Cleveland","Cleveland Heights","Clifton","Clovis","Coachella","Coconut Creek","Coeur d'Alene","College Station","Collierville","Colorado Springs","Colton","Columbia","Columbus","Commerce City","Compton","Concord","Conroe","Conway","Coon Rapids","Coral Gables","Coral Springs","Corona","Corpus Christi","Corvallis","Costa Mesa","Council Bluffs","Country Club","Covina","Cranston","Cupertino","Cutler Bay","Cuyahoga Falls","Cypress","Dale City","Dallas","Daly City","Danbury","Danville","Davenport","Davie","Davis","Dayton","Daytona Beach","DeKalb","DeSoto","Dearborn","Dearborn Heights","Decatur","Deerfield Beach","Delano","Delray Beach","Deltona","Denton","Denver","Des Moines","Des Plaines","Detroit","Diamond Bar","Doral","Dothan","Downers Grove","Downey","Draper","Dublin","Dubuque","Duluth","Dundalk","Dunwoody","Durham","Eagan","East Hartford","East Honolulu","East Lansing","East Los Angeles","East Orange","East Providence","Eastvale","Eau Claire","Eden Prairie","Edina","Edinburg","Edmond","El Cajon","El Centro","El Dorado Hills","El Monte","El Paso","Elgin","Elizabeth","Elk Grove","Elkhart","Ellicott City","Elmhurst","Elyria","Encinitas","Enid","Enterprise","Erie","Escondido","Euclid","Eugene","Euless","Evanston","Evansville","Everett","Fairfield","Fall River","Fargo","Farmington","Farmington Hills","Fayetteville","Federal Way","Findlay","Fishers","Flagstaff","Flint","Florence-Graham","Florin","Florissant","Flower Mound","Folsom","Fond du Lac","Fontana","Fort Collins","Fort Lauderdale","Fort Myers","Fort Pierce","Fort Smith","Fort Wayne","Fort Worth","Fountain Valley","Fountainebleau","Framingham","Franklin","Frederick","Freeport","Fremont","Fresno","Frisco","Fullerton","Gainesville","Gaithersburg","Galveston","Garden Grove","Gardena","Garland","Gary","Gastonia","Georgetown","Germantown","Gilbert","Gilroy","Glen Burnie","Glendale","Glendora","Glenview","Goodyear","Grand Forks","Grand Island","Grand Junction","Grand Prairie","Grand Rapids","Grapevine","Great Falls","Greeley","Green Bay","Greensboro","Greenville","Greenwood","Gresham","Guaynabo","Gulfport","Hacienda Heights","Hackensack","Haltom City","Hamilton","Hammond","Hampton","Hanford","Harlingen","Harrisburg","Harrisonburg","Hartford","Hattiesburg","Haverhill","Hawthorne","Hayward","Hemet","Hempstead","Henderson","Hendersonville","Hesperia","Hialeah","Hicksville","High Point","Highland","Highlands Ranch","Hillsboro","Hilo","Hoboken","Hoffman Estates","Hollywood","Homestead","Honolulu","Hoover","Houston","Huntersville","Huntington","Huntington Beach","Huntington Park","Huntsville","Hutchinson","Idaho Falls","Independence","Indianapolis","Indio","Inglewood","Iowa City","Irondequoit","Irvine","Irving","Jackson","Jacksonville","Janesville","Jefferson City","Jeffersonville","Jersey City","Johns Creek","Johnson City","Joliet","Jonesboro","Joplin","Jupiter","Jurupa Valley","Kalamazoo","Kannapolis","Kansas City","Kearny","Keller","Kendale Lakes","Kendall","Kenner","Kennewick","Kenosha","Kent","Kentwood","Kettering","Killeen","Kingsport","Kirkland","Kissimmee","Knoxville","Kokomo","La Crosse","La Habra","La Mesa","La Mirada","Lacey","Lafayette","Laguna Niguel","Lake Charles","Lake Elsinore","Lake Forest","Lake Havasu City","Lake Ridge","Lakeland","Lakeville","Lakewood","Lancaster","Lansing","Laredo","Largo","Las Cruces","Las Vegas","Lauderhill","Lawrence","Lawton","Layton","League City","Lee's Summit","Leesburg","Lehi","Lehigh Acres","Lenexa","Levittown","Lewisville","Lexington-Fayette","Lincoln","Linden","Little Rock","Littleton","Livermore","Livonia","Lodi","Logan","Lombard","Lompoc","Long Beach","Longmont","Longview","Lorain","Los Angeles","Louisville/Jefferson County","Loveland","Lowell","Lubbock","Lynchburg","Lynn","Lynwood","Macon-Bibb County","Madera","Madison","Malden","Manchester","Manhattan","Mansfield","Manteca","Maple Grove","Margate","Maricopa","Marietta","Marysville","Mayaguez","McAllen","McKinney","McLean","Medford","Melbourne","Memphis","Menifee","Mentor","Merced","Meriden","Meridian","Mesa","Mesquite","Metairie","Methuen Town","Miami","Miami Beach","Miami Gardens","Middletown","Midland","Midwest City","Milford","Millcreek","Milpitas","Milwaukee","Minneapolis","Minnetonka","Minot","Miramar","Mishawaka","Mission","Mission Viejo","Missoula","Missouri City","Mobile","Modesto","Moline","Monroe","Montebello","Monterey Park","Montgomery","Moore","Moreno Valley","Morgan Hill","Mount Pleasant","Mount Prospect","Mount Vernon","Mountain View","Muncie","Murfreesboro","Murray","Murrieta","Nampa","Napa","Naperville","Nashua","Nashville-Davidson","National City","New Bedford","New Braunfels","New Britain","New Brunswick","New Haven","New Orleans","New Rochelle","New York","Newark","Newport Beach","Newport News","Newton","Niagara Falls","Noblesville","Norfolk","Normal","Norman","North Bethesda","North Charleston","North Highlands","North Las Vegas","North Lauderdale","North Little Rock","North Miami","North Miami Beach","North Port","North Richland Hills","Norwalk","Novato","Novi","O'Fallon","Oak Lawn","Oak Park","Oakland","Oakland Park","Ocala","Oceanside","Odessa","Ogden","Oklahoma City","Olathe","Olympia","Omaha","Ontario","Orange","Orem","Orland Park","Orlando","Oro Valley","Oshkosh","Overland Park","Owensboro","Oxnard","Palatine","Palm Bay","Palm Beach Gardens","Palm Coast","Palm Desert","Palm Harbor","Palm Springs","Palmdale","Palo Alto","Paradise","Paramount","Parker","Parma","Pasadena","Pasco","Passaic","Paterson","Pawtucket","Peabody","Pearl City","Pearland","Pembroke Pines","Pensacola","Peoria","Perris","Perth Amboy","Petaluma","Pflugerville","Pharr","Philadelphia","Phoenix","Pico Rivera","Pine Bluff","Pine Hills","Pinellas Park","Pittsburg","Pittsburgh","Pittsfield","Placentia","Plainfield","Plano","Plantation","Pleasanton","Plymouth","Pocatello","Poinciana","Pomona","Pompano Beach","Ponce","Pontiac","Port Arthur","Port Charlotte","Port Orange","Port St. Lucie","Portage","Porterville","Portland","Portsmouth","Potomac","Poway","Providence","Provo","Pueblo","Quincy","Racine","Raleigh","Rancho Cordova","Rancho Cucamonga","Rancho Palos Verdes","Rancho Santa Margarita","Rapid City","Reading","Redding","Redlands","Redmond","Redondo Beach","Redwood City","Reno","Renton","Reston","Revere","Rialto","Richardson","Richland","Richmond","Rio Rancho","Riverside","Riverton","Riverview","Roanoke","Rochester","Rochester Hills","Rock Hill","Rockford","Rocklin","Rockville","Rockwall","Rocky Mount","Rogers","Rohnert Park","Rosemead","Roseville","Roswell","Round Rock","Rowland Heights","Rowlett","Royal Oak","Sacramento","Saginaw","Salem","Salina","Salinas","Salt Lake City","Sammamish","San Angelo","San Antonio","San Bernardino","San Bruno","San Buenaventura (Ventura)","San Clemente","San Diego","San Francisco","San Jacinto","San Jose","San Juan","San Leandro","San Luis Obispo","San Marcos","San Mateo","San Rafael","San Ramon","San Tan Valley","Sandy","Sandy Springs","Sanford","Santa Ana","Santa Barbara","Santa Clara","Santa Clarita","Santa Cruz","Santa Fe","Santa Maria","Santa Monica","Santa Rosa","Santee","Sarasota","Savannah","Sayreville","Schaumburg","Schenectady","Scottsdale","Scranton","Seattle","Severn","Shawnee","Sheboygan","Shoreline","Shreveport","Sierra Vista","Silver Spring","Simi Valley","Sioux City","Sioux Falls","Skokie","Smyrna","Somerville","South Bend","South Gate","South Hill","South Jordan","South San Francisco","South Valley","South Whittier","Southaven","Southfield","Sparks","Spokane","Spokane Valley","Spring","Spring Hill","Spring Valley","Springdale","Springfield","St. Charles","St. Clair Shores","St. Cloud","St. George","St. Joseph","St. Louis","St. Louis Park","St. Paul","St. Peters","St. Petersburg","Stamford","State College","Sterling Heights","Stillwater","Stockton","Stratford","Strongsville","Suffolk","Sugar Land","Summerville","Sunnyvale","Sunrise","Sunrise Manor","Surprise","Syracuse","Tacoma","Tallahassee","Tamarac","Tamiami","Tampa","Taunton","Taylor","Taylorsville","Temecula","Tempe","Temple","Terre Haute","Texas City","The Hammocks","The Villages","The Woodlands","Thornton","Thousand Oaks","Tigard","Tinley Park","Titusville","Toledo","Toms River","Tonawanda","Topeka","Torrance","Town 'n' Country","Towson","Tracy","Trenton","Troy","Trujillo Alto","Tuckahoe","Tucson","Tulare","Tulsa","Turlock","Tuscaloosa","Tustin","Twin Falls","Tyler","Union City","University","Upland","Urbana","Urbandale","Utica","Vacaville","Valdosta","Vallejo","Vancouver","Victoria","Victorville","Vineland","Virginia Beach","Visalia","Vista","Waco","Waipahu","Waldorf","Walnut Creek","Waltham","Warner Robins","Warren","Warwick","Washington","Waterbury","Waterloo","Watsonville","Waukegan","Waukesha","Wauwatosa","Wellington","Wesley Chapel","West Allis","West Babylon","West Covina","West Des Moines","West Hartford","West Haven","West Jordan","West Lafayette","West New York","West Palm Beach","West Sacramento","West Seneca","West Valley City","Westfield","Westland","Westminster","Weston","Weymouth Town","Wheaton","White Plains","Whittier","Wichita","Wichita Falls","Wilmington","Wilson","Winston-Salem","Woodbury","Woodland","Worcester","Wylie","Wyoming","Yakima","Yonkers","Yorba Linda","York","Youngstown","Yuba City","Yucaipa","Yuma"],hVu=["{{location.city_prefix}} {{person.first_name}}{{location.city_suffix}}","{{location.city_prefix}} {{person.first_name}}","{{person.first_name}}{{location.city_suffix}}","{{person.last_name}}{{location.city_suffix}}","{{location.city_name}}"],EVu=["North","East","West","South","New","Lake","Port","Fort"],mVu=["town","ton","land","ville","berg","burgh","boro","borough","bury","view","port","mouth","stad","stead","furt","chester","cester","fort","field","haven","side","shire","worth"],gVu=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory (Chagos Archipelago)","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Cook Islands","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Curacao","Cyprus","Czechia","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Faroe Islands","Falkland Islands (Malvinas)","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Democratic People's Republic of Korea","Republic of Korea","Kuwait","Kyrgyz Republic","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Barthelemy","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard & Jan Mayen Islands","Sweden","Switzerland","Syrian Arab Republic","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States of America","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands, British","Virgin Islands, U.S.","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"],fVu=["Adams County","Calhoun County","Carroll County","Clark County","Clay County","Crawford County","Douglas County","Fayette County","Franklin County","Grant County","Greene County","Hamilton County","Hancock County","Henry County","Jackson County","Jefferson County","Johnson County","Lake County","Lawrence County","Lee County","Lincoln County","Logan County","Madison County","Marion County","Marshall County","Monroe County","Montgomery County","Morgan County","Perry County","Pike County","Polk County","Scott County","Union County","Warren County","Washington County","Wayne County","Avon","Bedfordshire","Berkshire","Borders","Buckinghamshire","Cambridgeshire","Central","Cheshire","Cleveland","Clwyd","Cornwall","County Antrim","County Armagh","County Down","County Fermanagh","County Londonderry","County Tyrone","Cumbria","Derbyshire","Devon","Dorset","Dumfries and Galloway","Durham","Dyfed","East Sussex","Essex","Fife","Gloucestershire","Grampian","Greater Manchester","Gwent","Gwynedd County","Hampshire","Herefordshire","Hertfordshire","Highlands and Islands","Humberside","Isle of Wight","Kent","Lancashire","Leicestershire","Lincolnshire","Lothian","Merseyside","Mid Glamorgan","Norfolk","North Yorkshire","Northamptonshire","Northumberland","Nottinghamshire","Oxfordshire","Powys","Rutland","Shropshire","Somerset","South Glamorgan","South Yorkshire","Staffordshire","Strathclyde","Suffolk","Surrey","Tayside","Tyne and Wear","Warwickshire","West Glamorgan","West Midlands","West Sussex","West Yorkshire","Wiltshire","Worcestershire"],pVu=["United States of America"],DVu=["North","East","South","West","Northeast","Northwest","Southeast","Southwest"],xVu=["N","E","S","W","NE","NW","SE","SW"],vVu=["#####","#####-####"],CVu=["Apt. ###","Suite ###"],bVu=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"],kVu=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],FVu={normal:"{{location.buildingNumber}} {{location.street}}",full:"{{location.buildingNumber}} {{location.street}} {{location.secondaryAddress}}"},yVu=["10th Street","11th Street","12th Street","13th Street","14th Street","15th Street","16th Street","1st Avenue","1st Street","2nd Avenue","2nd Street","3rd Avenue","3rd Street","4th Avenue","4th Street","5th Avenue","5th Street","6th Avenue","6th Street","7th Avenue","7th Street","8th Avenue","8th Street","9th Street","A Street","Abbey Road","Adams Avenue","Adams Street","Airport Road","Albany Road","Albert Road","Albion Street","Alexandra Road","Alfred Street","Alma Street","Ash Close","Ash Grove","Ash Road","Ash Street","Aspen Close","Atlantic Avenue","Avenue Road","Back Lane","Baker Street","Balmoral Road","Barn Close","Barton Road","Bath Road","Bath Street","Bay Street","Beach Road","Bedford Road","Beech Close","Beech Drive","Beech Grove","Beech Road","Beechwood Avenue","Bell Lane","Belmont Road","Birch Avenue","Birch Close","Birch Grove","Birch Road","Blind Lane","Bluebell Close","Boundary Road","Bramble Close","Bramley Close","Bridge Road","Bridge Street","Broad Lane","Broad Street","Broadway","Broadway Avenue","Broadway Street","Brook Lane","Brook Road","Brook Street","Brookside","Buckingham Road","Cambridge Street","Canal Street","Castle Close","Castle Lane","Castle Road","Castle Street","Cavendish Road","Cedar Avenue","Cedar Close","Cedar Grove","Cedar Road","Cedar Street","Cemetery Road","Center Avenue","Center Road","Center Street","Central Avenue","Central Street","Chapel Close","Chapel Hill","Chapel Road","Chapel Street","Charles Street","Cherry Close","Cherry Street","Cherry Tree Close","Chester Road","Chestnut Close","Chestnut Drive","Chestnut Grove","Chestnut Street","Church Avenue","Church Close","Church Hill","Church Lane","Church Path","Church Road","Church Street","Church View","Church Walk","Claremont Road","Clarence Road","Clarence Street","Clarendon Road","Clark Street","Clay Lane","Cleveland Street","Cliff Road","Clifton Road","Clinton Street","College Avenue","College Street","Columbia Avenue","Commerce Street","Commercial Road","Commercial Street","Common Lane","Coronation Avenue","Coronation Road","County Line Road","County Road","Court Street","Cow Lane","Crescent Road","Cromwell Road","Cross Lane","Cross Street","Crown Street","Cumberland Street","Dale Street","Dark Lane","Davis Street","Depot Street","Derby Road","Derwent Close","Devonshire Road","Division Street","Douglas Road","Duke Street","E 10th Street","E 11th Street","E 12th Street","E 14th Street","E 1st Street","E 2nd Street","E 3rd Street","E 4th Avenue","E 4th Street","E 5th Street","E 6th Avenue","E 6th Street","E 7th Street","E 8th Street","E 9th Street","E Bridge Street","E Broad Street","E Broadway","E Broadway Street","E Cedar Street","E Center Street","E Central Avenue","E Church Street","E Elm Street","E Franklin Street","E Front Street","E Grand Avenue","E High Street","E Jackson Street","E Jefferson Street","E Main","E Main Street","E Maple Street","E Market Street","E North Street","E Oak Street","E Park Avenue","E Pine Street","E River Road","E South Street","E State Street","E Union Street","E Walnut Street","E Washington Avenue","E Washington Street","E Water Street","East Avenue","East Road","East Street","Edward Street","Elm Close","Elm Grove","Elm Road","Elm Street","Euclid Avenue","Fairfield Road","Farm Close","Ferry Road","Field Close","Field Lane","First Avenue","First Street","Fore Street","Forest Avenue","Forest Road","Fourth Avenue","Franklin Avenue","Franklin Road","Franklin Street","Front Street","Frontage Road","Garden Close","Garden Street","George Street","Gladstone Road","Glebe Close","Gloucester Road","Gordon Road","Gordon Street","Grand Avenue","Grange Avenue","Grange Close","Grange Road","Grant Street","Green Close","Green Lane","Green Street","Greenville Road","Greenway","Greenwood Road","Grove Lane","Grove Road","Grove Street","Hall Lane","Hall Street","Harrison Avenue","Harrison Street","Hawthorn Avenue","Hawthorn Close","Hazel Close","Hazel Grove","Heath Road","Heather Close","Henry Street","Heron Close","Hickory Street","High Road","High Street","Highfield Avenue","Highfield Close","Highfield Road","Highland Avenue","Hill Road","Hill Street","Hillside","Hillside Avenue","Hillside Close","Hillside Road","Holly Close","Honeysuckle Close","Howard Road","Howard Street","Jackson Avenue","Jackson Street","James Street","Jefferson Avenue","Jefferson Street","Johnson Street","Jubilee Close","Juniper Close","Kent Road","Kestrel Close","King Street","King's Road","Kingfisher Close","Kings Highway","Kingsway","Laburnum Grove","Lafayette Street","Lake Avenue","Lake Drive","Lake Road","Lake Street","Lancaster Road","Lansdowne Road","Larch Close","Laurel Close","Lawrence Street","Lee Street","Liberty Street","Lime Grove","Lincoln Avenue","Lincoln Highway","Lincoln Road","Lincoln Street","Locust Street","Lodge Close","Lodge Lane","London Road","Long Lane","Low Road","Madison Avenue","Madison Street","Main","Main Avenue","Main Road","Main Street","Main Street E","Main Street N","Main Street S","Main Street W","Manchester Road","Manor Close","Manor Drive","Manor Gardens","Manor Road","Manor Way","Maple Avenue","Maple Close","Maple Drive","Maple Road","Maple Street","Market Place","Market Square","Market Street","Marlborough Road","Marsh Lane","Martin Luther King Boulevard","Martin Luther King Drive","Martin Luther King Jr Boulevard","Mary Street","Mayfield Road","Meadow Close","Meadow Drive","Meadow Lane","Meadow View","Meadow Way","Memorial Drive","Middle Street","Mill Close","Mill Lane","Mill Road","Mill Street","Milton Road","Milton Street","Monroe Street","Moor Lane","Moss Lane","Mount Pleasant","Mount Street","Mulberry Street","N 1st Street","N 2nd Street","N 3rd Street","N 4th Street","N 5th Street","N 6th Street","N 7th Street","N 8th Street","N 9th Street","N Bridge Street","N Broad Street","N Broadway","N Broadway Street","N Cedar Street","N Center Street","N Central Avenue","N Chestnut Street","N Church Street","N College Street","N Court Street","N Division Street","N East Street","N Elm Street","N Franklin Street","N Front Street","N Harrison Street","N High Street","N Jackson Street","N Jefferson Street","N Lincoln Street","N Locust Street","N Main","N Main Avenue","N Main Street","N Maple Street","N Market Street","N Monroe Street","N Oak Street","N Park Street","N Pearl Street","N Pine Street","N Poplar Street","N Railroad Street","N State Street","N Union Street","N Walnut Street","N Washington Avenue","N Washington Street","N Water Street","Nelson Road","Nelson Street","New Lane","New Road","New Street","Newton Road","Nightingale Close","Norfolk Road","North Avenue","North Lane","North Road","North Street","Northfield Road","Oak Avenue","Oak Drive","Oak Lane","Oak Road","Oak Street","Oakfield Road","Oaklands","Old Lane","Old Military Road","Old Road","Old State Road","Orchard Drive","Orchard Lane","Orchard Road","Orchard Street","Oxford Road","Oxford Street","Park Avenue","Park Crescent","Park Drive","Park Lane","Park Place","Park Road","Park Street","Park View","Parkside","Pearl Street","Pennsylvania Avenue","Pine Close","Pine Grove","Pine Street","Pinfold Lane","Pleasant Street","Poplar Avenue","Poplar Close","Poplar Road","Poplar Street","Post Road","Pound Lane","Princes Street","Princess Street","Priory Close","Priory Road","Prospect Avenue","Prospect Place","Prospect Road","Prospect Street","Quarry Lane","Quarry Road","Queen's Road","Railroad Avenue","Railroad Street","Railway Street","Rectory Close","Rectory Lane","Richmond Close","Richmond Road","Ridge Road","River Road","River Street","Riverside","Riverside Avenue","Riverside Drive","Roman Road","Roman Way","Rowan Close","Russell Street","S 10th Street","S 14th Street","S 1st Avenue","S 1st Street","S 2nd Street","S 3rd Street","S 4th Street","S 5th Street","S 6th Street","S 7th Street","S 8th Street","S 9th Street","S Bridge Street","S Broad Street","S Broadway","S Broadway Street","S Center Street","S Central Avenue","S Chestnut Street","S Church Street","S College Street","S Division Street","S East Street","S Elm Street","S Franklin Street","S Front Street","S Grand Avenue","S High Street","S Jackson Street","S Jefferson Street","S Lincoln Street","S Main","S Main Avenue","S Main Street","S Maple Street","S Market Street","S Mill Street","S Monroe Street","S Oak Street","S Park Street","S Pine Street","S Railroad Street","S State Street","S Union Street","S Walnut Street","S Washington Avenue","S Washington Street","S Water Street","S West Street","Salisbury Road","Sandringham Road","Sandy Lane","School Close","School Lane","School Road","School Street","Second Avenue","Silver Street","Skyline Drive","Smith Street","Somerset Road","South Avenue","South Drive","South Road","South Street","South View","Spring Gardens","Spring Street","Springfield Close","Springfield Road","Spruce Street","St Andrew's Road","St Andrews Close","St George's Road","St John's Road","St Mary's Close","St Mary's Road","Stanley Road","Stanley Street","State Avenue","State Line Road","State Road","State Street","Station Road","Station Street","Stoney Lane","Sycamore Avenue","Sycamore Close","Sycamore Drive","Sycamore Street","Talbot Road","Tennyson Road","The Avenue","The Beeches","The Causeway","The Chase","The Coppice","The Copse","The Crescent","The Croft","The Dell","The Drive","The Fairway","The Glebe","The Grange","The Green","The Grove","The Hawthorns","The Lane","The Laurels","The Limes","The Maltings","The Meadows","The Mews","The Mount","The Oaks","The Orchard","The Oval","The Paddock","The Paddocks","The Poplars","The Ridgeway","The Ridings","The Rise","The Sidings","The Spinney","The Square","The Willows","The Woodlands","Third Avenue","Third Street","Tower Road","Trinity Road","Tudor Close","Union Avenue","Union Street","University Avenue","University Drive","Valley Road","Veterans Memorial Drive","Veterans Memorial Highway","Vicarage Close","Vicarage Lane","Vicarage Road","Victoria Place","Victoria Road","Victoria Street","Vine Street","W 10th Street","W 11th Street","W 12th Street","W 14th Street","W 1st Street","W 2nd Street","W 3rd Street","W 4th Avenue","W 4th Street","W 5th Street","W 6th Avenue","W 6th Street","W 7th Street","W 8th Street","W 9th Street","W Bridge Street","W Broad Street","W Broadway","W Broadway Avenue","W Broadway Street","W Center Street","W Central Avenue","W Chestnut Street","W Church Street","W Division Street","W Elm Street","W Franklin Street","W Front Street","W Grand Avenue","W High Street","W Jackson Street","W Jefferson Street","W Lake Street","W Main","W Main Street","W Maple Street","W Market Street","W Monroe Street","W North Street","W Oak Street","W Park Street","W Pine Street","W River Road","W South Street","W State Street","W Union Street","W Walnut Street","W Washington Avenue","W Washington Street","Walnut Close","Walnut Street","Warren Close","Warren Road","Washington Avenue","Washington Boulevard","Washington Road","Washington Street","Water Lane","Water Street","Waterloo Road","Waterside","Watery Lane","Waverley Road","Well Lane","Wellington Road","Wellington Street","West Avenue","West End","West Lane","West Road","West Street","West View","Western Avenue","Western Road","Westfield Road","Westgate","William Street","Willow Close","Willow Drive","Willow Grove","Willow Road","Willow Street","Windermere Road","Windmill Close","Windmill Lane","Windsor Avenue","Windsor Close","Windsor Drive","Wood Lane","Wood Street","Woodland Close","Woodland Road","Woodlands","Woodlands Avenue","Woodlands Close","Woodlands Road","Woodside","Woodside Road","Wren Close","Yew Tree Close","York Road","York Street"],AVu=["{{person.first_name}} {{location.street_suffix}}","{{person.last_name}} {{location.street_suffix}}","{{location.street_name}}"],_Vu=["Alley","Avenue","Branch","Bridge","Brook","Brooks","Burg","Burgs","Bypass","Camp","Canyon","Cape","Causeway","Center","Centers","Circle","Circles","Cliff","Cliffs","Club","Common","Corner","Corners","Course","Court","Courts","Cove","Coves","Creek","Crescent","Crest","Crossing","Crossroad","Curve","Dale","Dam","Divide","Drive","Drives","Estate","Estates","Expressway","Extension","Extensions","Fall","Falls","Ferry","Field","Fields","Flat","Flats","Ford","Fords","Forest","Forge","Forges","Fork","Forks","Fort","Freeway","Garden","Gardens","Gateway","Glen","Glens","Green","Greens","Grove","Groves","Harbor","Harbors","Haven","Heights","Highway","Hill","Hills","Hollow","Inlet","Island","Islands","Isle","Junction","Junctions","Key","Keys","Knoll","Knolls","Lake","Lakes","Land","Landing","Lane","Light","Lights","Loaf","Lock","Locks","Lodge","Loop","Mall","Manor","Manors","Meadow","Meadows","Mews","Mill","Mills","Mission","Motorway","Mount","Mountain","Mountains","Neck","Orchard","Oval","Overpass","Park","Parks","Parkway","Parkways","Pass","Passage","Path","Pike","Pine","Pines","Place","Plain","Plains","Plaza","Point","Points","Port","Ports","Prairie","Radial","Ramp","Ranch","Rapid","Rapids","Rest","Ridge","Ridges","River","Road","Roads","Route","Row","Rue","Run","Shoal","Shoals","Shore","Shores","Skyway","Spring","Springs","Spur","Spurs","Square","Squares","Station","Stravenue","Stream","Street","Streets","Summit","Terrace","Throughway","Trace","Track","Trafficway","Trail","Tunnel","Turnpike","Underpass","Union","Unions","Valley","Valleys","Via","Viaduct","View","Views","Village","Villages","Ville","Vista","Walk","Walks","Wall","Way","Ways","Well","Wells"],SVu={building_number:cVu,city_name:dVu,city_pattern:hVu,city_prefix:EVu,city_suffix:mVu,country:gVu,county:fVu,default_country:pVu,direction:DVu,direction_abbr:xVu,postcode:vVu,secondary_address:CVu,state:bVu,state_abbr:kVu,street_address:FVu,street_name:yVu,street_pattern:AVu,street_suffix:_Vu},BVu=SVu,wVu=["a","ab","abbas","abduco","abeo","abscido","absconditus","absens","absorbeo","absque","abstergo","absum","abundans","abutor","accedo","accendo","acceptus","accommodo","accusamus","accusantium","accusator","acer","acerbitas","acervus","acidus","acies","acquiro","acsi","ad","adamo","adaugeo","addo","adduco","ademptio","adeo","adeptio","adfectus","adfero","adficio","adflicto","adhaero","adhuc","adicio","adimpleo","adinventitias","adipisci","adipiscor","adiuvo","administratio","admiratio","admitto","admoneo","admoveo","adnuo","adopto","adsidue","adstringo","adsuesco","adsum","adulatio","adulescens","aduro","advenio","adversus","advoco","aedificium","aeger","aegre","aegrotatio","aegrus","aeneus","aequitas","aequus","aer","aestas","aestivus","aestus","aetas","aeternus","ager","aggero","aggredior","agnitio","agnosco","ago","ait","aiunt","alias","alienus","alii","alioqui","aliqua","aliquam","aliquid","alius","allatus","alo","alter","altus","alveus","amaritudo","ambitus","ambulo","amet","amicitia","amiculum","amissio","amita","amitto","amo","amor","amoveo","amplexus","amplitudo","amplus","ancilla","angelus","angulus","angustus","animadverto","animi","animus","annus","anser","ante","antea","antepono","antiquus","aperiam","aperio","aperte","apostolus","apparatus","appello","appono","appositus","approbo","apto","aptus","apud","aqua","ara","aranea","arbitro","arbor","arbustum","arca","arceo","arcesso","architecto","arcus","argentum","argumentum","arguo","arma","armarium","aro","ars","articulus","artificiose","arto","arx","ascisco","ascit","asper","asperiores","aspernatur","aspicio","asporto","assentator","assumenda","astrum","at","atavus","ater","atque","atqui","atrocitas","atrox","attero","attollo","attonbitus","auctor","auctus","audacia","audax","audentia","audeo","audio","auditor","aufero","aureus","aurum","aut","autem","autus","auxilium","avaritia","avarus","aveho","averto","baiulus","balbus","barba","bardus","basium","beatae","beatus","bellicus","bellum","bene","beneficium","benevolentia","benigne","bestia","bibo","bis","blandior","blanditiis","bonus","bos","brevis","cado","caecus","caelestis","caelum","calamitas","calcar","calco","calculus","callide","campana","candidus","canis","canonicus","canto","capillus","capio","capitulus","capto","caput","carbo","carcer","careo","caries","cariosus","caritas","carmen","carpo","carus","casso","caste","casus","catena","caterva","cattus","cauda","causa","caute","caveo","cavus","cedo","celebrer","celer","celo","cena","cenaculum","ceno","censura","centum","cerno","cernuus","certe","certus","cervus","cetera","charisma","chirographum","cibo","cibus","cicuta","cilicium","cimentarius","ciminatio","cinis","circumvenio","cito","civis","civitas","clam","clamo","claro","clarus","claudeo","claustrum","clementia","clibanus","coadunatio","coaegresco","coepi","coerceo","cogito","cognatus","cognomen","cogo","cohaero","cohibeo","cohors","colligo","collum","colo","color","coma","combibo","comburo","comedo","comes","cometes","comis","comitatus","commemoro","comminor","commodi","commodo","communis","comparo","compello","complectus","compono","comprehendo","comptus","conatus","concedo","concido","conculco","condico","conduco","confero","confido","conforto","confugo","congregatio","conicio","coniecto","conitor","coniuratio","conor","conqueror","conscendo","consectetur","consequatur","consequuntur","conservo","considero","conspergo","constans","consuasor","contabesco","contego","contigo","contra","conturbo","conventus","convoco","copia","copiose","cornu","corona","corporis","corpus","correptius","corrigo","corroboro","corrumpo","corrupti","coruscus","cotidie","crapula","cras","crastinus","creator","creber","crebro","credo","creo","creptio","crepusculum","cresco","creta","cribro","crinis","cruciamentum","crudelis","cruentus","crur","crustulum","crux","cubicularis","cubitum","cubo","cui","cuius","culpa","culpo","cultellus","cultura","cum","cumque","cunabula","cunae","cunctatio","cupiditas","cupiditate","cupio","cuppedia","cupressus","cur","cura","curatio","curia","curiositas","curis","curo","curriculum","currus","cursim","curso","cursus","curto","curtus","curvo","custodia","damnatio","damno","dapifer","debeo","debilito","debitis","decens","decerno","decet","decimus","decipio","decor","decretum","decumbo","dedecor","dedico","deduco","defaeco","defendo","defero","defessus","defetiscor","deficio","defleo","defluo","defungo","degenero","degero","degusto","deinde","delectatio","delectus","delego","deleniti","deleo","delibero","delicate","delinquo","deludo","demens","demergo","demitto","demo","demonstro","demoror","demulceo","demum","denego","denique","dens","denuncio","denuo","deorsum","depereo","depono","depopulo","deporto","depraedor","deprecator","deprimo","depromo","depulso","deputo","derelinquo","derideo","deripio","deserunt","desidero","desino","desipio","desolo","desparatus","despecto","dicta","dignissimos","distinctio","dolor","dolore","dolorem","doloremque","dolores","doloribus","dolorum","ducimus","ea","eaque","earum","eius","eligendi","enim","eos","error","esse","est","et","eum","eveniet","ex","excepturi","exercitationem","expedita","explicabo","facere","facilis","fuga","fugiat","fugit","harum","hic","id","illo","illum","impedit","in","incidunt","infit","inflammatio","inventore","ipsa","ipsam","ipsum","iste","itaque","iure","iusto","labore","laboriosam","laborum","laudantium","libero","magnam","magni","maiores","maxime","minima","minus","modi","molestiae","molestias","mollitia","nam","natus","necessitatibus","nemo","neque","nesciunt","nihil","nisi","nobis","non","nostrum","nulla","numquam","occaecati","ocer","odio","odit","officia","officiis","omnis","optio","paens","pariatur","patior","patria","patrocinor","patruus","pauci","paulatim","pauper","pax","peccatus","pecco","pecto","pectus","pecus","peior","pel","perferendis","perspiciatis","placeat","porro","possimus","praesentium","provident","quae","quaerat","quam","quas","quasi","qui","quia","quibusdam","quidem","quis","quisquam","quo","quod","quos","ratione","recusandae","reiciendis","rem","repellat","repellendus","reprehenderit","repudiandae","rerum","saepe","sapiente","sed","sequi","similique","sint","sit","socius","sodalitas","sol","soleo","solio","solitudo","solium","sollers","sollicito","solum","solus","soluta","solutio","solvo","somniculosus","somnus","sonitus","sono","sophismata","sopor","sordeo","sortitus","spargo","speciosus","spectaculum","speculum","sperno","spero","spes","spiculum","spiritus","spoliatio","sponte","stabilis","statim","statua","stella","stillicidium","stipes","stips","sto","strenuus","strues","studio","stultus","suadeo","suasoria","sub","subito","subiungo","sublime","subnecto","subseco","substantia","subvenio","succedo","succurro","sufficio","suffoco","suffragium","suggero","sui","sulum","sum","summa","summisse","summopere","sumo","sumptus","sunt","supellex","super","suppellex","supplanto","suppono","supra","surculus","surgo","sursum","suscipio","suscipit","suspendo","sustineo","suus","synagoga","tabella","tabernus","tabesco","tabgo","tabula","taceo","tactus","taedium","talio","talis","talus","tam","tamdiu","tamen","tametsi","tamisium","tamquam","tandem","tantillus","tantum","tardus","tego","temeritas","temperantia","templum","tempora","tempore","temporibus","temptatio","tempus","tenax","tendo","teneo","tener","tenetur","tenuis","tenus","tepesco","tepidus","ter","terebro","teres","terga","tergeo","tergiversatio","tergo","tergum","termes","terminatio","tero","terra","terreo","territo","terror","tersus","tertius","testimonium","texo","textilis","textor","textus","thalassinus","theatrum","theca","thema","theologus","thermae","thesaurus","thesis","thorax","thymbra","thymum","tibi","timidus","timor","titulus","tolero","tollo","tondeo","tonsor","torqueo","torrens","tot","totam","totidem","toties","totus","tracto","trado","traho","trans","tredecim","tremo","trepide","tres","tribuo","tricesimus","triduana","tripudio","tristis","triumphus","trucido","truculenter","tubineus","tui","tum","tumultus","tunc","turba","turbo","turpis","tutamen","tutis","tyrannus","uberrime","ubi","ulciscor","ullam","ullus","ulterius","ultio","ultra","umbra","umerus","umquam","una","unde","undique","universe","unus","urbanus","urbs","uredo","usitas","usque","ustilo","ustulo","usus","ut","uter","uterque","utilis","utique","utor","utpote","utrimque","utroque","utrum","uxor","vaco","vacuus","vado","vae","valde","valens","valeo","valetudo","validus","vallum","vapulus","varietas","varius","vehemens","vel","velit","velociter","velum","velut","venia","veniam","venio","ventito","ventosus","ventus","venustas","ver","verbera","verbum","vere","verecundia","vereor","vergo","veritas","veritatis","vero","versus","verto","verumtamen","verus","vesco","vesica","vesper","vespillo","vester","vestigium","vestrum","vetus","via","vicinus","vicissitudo","victoria","victus","videlicet","video","viduo","vigilo","vigor","vilicus","vilis","vilitas","villa","vinco","vinculum","vindico","vinitor","vinum","vir","virga","virgo","viridis","viriliter","virtus","vis","viscus","vita","vitae","vitiosus","vitium","vito","vivo","vix","vobis","vociferor","voco","volaticus","volo","volubilis","voluntarius","volup","voluptas","voluptate","voluptatem","voluptates","voluptatibus","voluptatum","volutabrum","volva","vomer","vomica","vomito","vorago","vorax","voro","vos","votum","voveo","vox","vulariter","vulgaris","vulgivagus","vulgo","vulgus","vulnero","vulnus","vulpes","vulticulus","xiphias"],LVu={words:wVu},zVu=LVu,MVu={title:"English",code:"en",language:"en",endonym:"English",dir:"ltr",script:"Latn"},TVu=MVu,NVu=["Rock","Metal","Pop","Electronic","Folk","World","Country","Jazz","Funk","Soul","Hip Hop","Classical","Latin","Reggae","Stage And Screen","Blues","Non Music","Rap"],PVu=["White Christmas","Hey Jude","Every Breath You Take","Mack the Knife","Rock Around the Clock","I Want to Hold Your Hand","(I Can't Get No) Satisfaction","The Twist","(Everything I Do) I Do it For You","Bridge Over Troubled Water","When Doves Cry","Call Me","Bette Davis Eyes","I Will Always Love You","Over the Rainbow","American Pie","Flashdance. What a Feeling","The Way We Were","I Heard it Through the Grapevine","You've Lost That Lovin' Feelin'","Nothing Compares 2 U","Endless Love","Yeah!","Let's Get it On","That's What Friends Are For","You Light Up My Life","(Sittin' On) the Dock of the Bay","Joy to the World","Heartbreak Hotel","Theme From 'A Summer Place'","Aquarius/Let The Sunshine In","I Will Survive","It's Too Late","Respect","Sugar Sugar","Stayin' Alive","Maggie May","My Heart Will Go On","Eye of the Tiger","End of the Road","Another One Bites the Dust","Billie Jean","Let's Stay Together","Battle of New Orleans","Oh","Hound Dog","I Love Rock 'n' Roll","Smooth","Good Vibrations","Physical","Light My Fire","Low","Hey Ya!","Let it Be","Don't Be Cruel","Hotel California","We Belong Together","Le Freak","Raindrops Keep Falling On My Head","How High the Moon","My Girl","I Can't Stop Loving You","Killing Me Softly With His Song","Mona Lisa","In the Mood","She Loves You","The Letter","Mister Sandman","Careless Whisper","What's Love Got to Do With It?","I'm a Believer","Wooly Bully","Theme From 'Shaft'","Hot Stuff","Centerfold","Honky Tonk Woman","I'll Be There","Gangsta's Paradise","Yesterday","My Sharona","Tennessee Waltz","Reach Out (I'll Be There)","California Dreamin'","Jailhouse Rock","Irreplaceable","Dancing in the Street","Rolling In The Deep","Tie a Yellow Ribbon 'round the Old Oak Tree","Stand By Me","Sentimental Journey","The First Time Ever I Saw Your Face","Louie Louie","Another Brick in the Wall (part 2)","(Just Like) Starting Over","Night Fever","To Sir","You're So Vain","Be My Baby","Celebration","(They Long to Be) Close to You","Begin the Beguine","I Still Haven't Found What I'm Looking For","I Want You Back","Arthur's Theme (Best That You Can Do)","Boulevard of Broken Dreams","With Or Without You","Tonight's the Night (Gonna Be Alright)","Are You Lonesome Tonight?","Upside Down","Dancing Queen","Sweet Child O' Mine","Where Did Our Love Go","Unchained Melody","Rudolph","Take My Breath Away","I'll Make Love to You","Love Will Keep Us Together","When a Man Loves a Woman","Walk Like an Egyptian","Crazy in Love","Strangers in the Night","You Belong to Me","In Da Club","Say You","We Are the World","Johnny B Goode","Love Theme From 'A Star is Born' (Evergreen)","Shadow Dancing","Superstition","Beat It","Night & Day","Waterfalls","House of the Rising Sun","Paper Doll","Downtown","I Can't Help Myself (Sugar Pie","Kiss From a Rose","Believe","Ballad of the Green Berets","Proud Mary","Too Young","Umbrella","Swanee","Need You Tonight","Like a Rolling Stone","Lady","One Sweet Day","Lean On Me","Tik-Toc","Monday Monday","What'd I Say","How You Remind Me","Silly Love Songs","My Guy","Macarena","Goodnight","Just My Imagination (Running Away With Me)","The Sounds of Silence","Imagine","Me & Bobby McGee","Near You","What's Going On?","Suspicious Minds","Ode To Billie Joe","Wind Beneath My Wings","The Boy is Mine","Mr Tambourine Man","Faith","Green Onions","Mrs Robinson","How Deep is Your Love?","Hey There","Heart of Glass","Pennies From Heaven","Like a Virgin","Midnight Train to Georgia","Help!","Tossing & Turning","The Sign","Born to Be Wild","Layla","I Just Wanna Be Your Everything","War","96 Tears","I Get Around","Because You Loved Me","Summer in the City","Get Back","Secret Love","9 to 5","(Ghost) Riders in the Sky","The Loco-Motion","Play That Funky Music","Bohemian Rhapsody","Little Things Mean a Lot","Cry","All Shook Up","Up Where We Belong","Sledgehammer","Fire & Rain","Stop! in the Name of Love","Sweet Home Alabama","Another Day in Paradise","Bleeding Love","Lady Marmalade (Voulez-Vous Coucher Aver Moi Ce Soir?)","Whispering","Vogue","Under the Bridge","Sixteen Tons","Sugar Shack","Baby Love","What a Fool Believes","Lose Yourself","Hello Dolly","Brown Eyed Girl","Without You","Build Me Up Buttercup","We Found Love","Tears in Heaven","Family Affair","All I Wanna Do","Soul Man","Tequila","Rock With You","Livin' La Vida Loca","Best of My Love","Runaway","Alone Again (Naturally)","Can't Help Falling in Love","My Sweet Lord","Runaround Sue","Swinging On a Star","Gold Digger","Happy Together","Losing My Religion","Heart of Gold","Stardust","Will You Love Me Tomorrow","You Are the Sunshine of My Life","You Were Meant for Me","Take On Me","Hollaback Girl","God Bless America","I Swear","Sunshine of Your Love","Firework","Groovin'","Smells Like Teen Spirit","Big Girls Don't Cry","Jack & Diane","Addicted to Love","The Last Dance","Georgia On My Mind","Money For Nothing","Jump","Vaya Con Dios (may God Be With You)","You'll Never Know","That'll Be the Day","Girls Just Wanna Have Fun","Wheel of Fortune","When You Wish Upon a Star","Don't Fence Me In","Turn! Turn! Turn! (To Everything There is a Season)","Volare","Sweet Dreams (Are Made of This)","Whole Lotta Love","You've Got a Friend","Penny Lane","People Got to Be Free","Nature Boy","Sexyback","Crying","Single Ladies (Put A Ring On It)","Bad Girls","Too Close","I Got You Babe","We've Only Just Begun","Sh-Boom (Life Could Be a Dream)","Shining Star","Kansas City","Like a Prayer","Cheek to Cheek","Papa Was a Rolling Stone","Promiscuous","Love Shack","Funkytown","Crazy","Philadelphia Freedom","Temperature","Somebody That I Used to Know","All I Have to Do is Dream","Jessie's Girl","Rhinestone Cowboy","Blue Suede Shoes","Ebony & Ivory","I'll Never Smile Again","Keep On Loving You","Since U Been Gone","The Way You Look Tonight","Crazy Little Thing Called Love","The Great Pretender","Brown Sugar","Que sera sera (Whatever will be will be)","No One","Bad Day","Boom Boom Pow","Party Rock Anthem","Because of You","Chattanooga Choo Choo","A Whiter Shade of Pale","Love Me Tender","Higher Love","Footloose","Blurred Lines","I Just Called to Say I Love You","Come Together","It's Now Or Never","Under the Boardwalk","Don't You Want Me","You Can't Hurry Love","Fame","Fallin'","Poker Face","Bad Romance","Ruby Tuesday","All Night Long (All Night)","Baby Got Back","Whole Lotta Shakin' Goin' On","Frenesi","December 1963 (Oh What a Night)","Bad Moon Rising","Abracadabra","I Gotta Feeling","The Song From Moulin Rouge (Where Is Your Heart)","Waiting For a Girl Like You","Everybody Loves Somebody","I Can't Go For That (No Can Do)","Buttons & Bows","It's All in the Game","Love Train","Dance to the Music","Candle in the Wind '97","Honey","Kiss","I'll Take You There","Paint it Black","Band of Gold","Just the Way You Are","Spirit in the Sky","Vision of Love","Hips don't lie","Till The End of Time","Duke of Earl","YMCA","Oh My Papa (O Mein Papa)","Pistol Packin' Mama","Gonna Make You Sweat (Everybody Dance Now)","Dilemma","I Need You Now","Wanted","Jumpin' Jack Flash","Against All Odds (Take a Look At Me Now)","Tom Dooley","Goodbye Yellow Brick Road","Rhapsody in Blue","Bennie & the Jets","Call Me Maybe","You Really Got Me","God Bless the Child","I'm Sorry","Bad","I Can't Get Next to You","The Power of Love","Dreamlover","Only The Lonely (Know The Way I Feel)","We Are Family","At Last","Brand New Key","I've Heard That Song Before","Stay (I Missed You)","Do Ya Think I'm Sexy?","Tutti Frutti","This Ole House","Please Mr Postman","Good Times","Something","(I've Had) the Time of My Life","I Don't Want to Miss a Thing","Down Hearted Blues","Rag Doll","Blueberry Hill","Ain't No Sunshine","Wild Thing","Blaze of Glory","Ray of Light","The Hustle","Grenade","Cathy's Clown","Minnie the Moocher","Love Is Blue (L'Amour Est Bleu)","Iris","The Boys of Summer","The Tide is High","She Drives Me Crazy","Save the Best For Last","These Boots Are Made For Walking","I Feel Love","A Woman in Love","We Can Work it Out","The Reason","Locked Out Of Heaven","Do That to Me One More Time","That's the Way Love Goes","A Hard Day's Night","I Believe I Can Fly","Karma Chameleon","One O'Clock Jump","Mule Train","Car Wash","Rapture","Creep","Streets of Philadelphia","West End Girls","Leader of the Pack","T For Texas (Blue Yodel No 1)","Mama Told Me Not to Come","Just Dance","Mercy Mercy Me (The Ecology)","Livin' On a Prayer","Good Lovin'","50 Ways to Leave Your Lover","Stronger","I Can See Clearly Now","We Are the Champions","(I've Got a Gal In) Kalamazoo","No Scrubs","How Do You Mend a Broken Heart","I Got You (I Feel Good)","Don't Let the Stars Get in Your Eyes","The Girl From Ipanema","(Sexual) Healing","Tears of a Clown","We Will Rock You","Hold On","Bye Bye Love","Chapel of Love","White Rabbit","Rock the Boat","The Gypsy","Take The 'A' Train","Crimson & Clover","Crocodile Rock","Make Love to Me","Nothing's Gonna Stop Us Now","Say Say Say","The Christmas Song (Chestnuts Roasting On An Open Fire)","Un-Break My Heart","Cherish","I'll Be Missing You","Drops of Jupiter (Tell Me)","There goes my baby","You Send Me","If (They Made Me a King)","The Prisoner's Song","ABC","Do Wah Diddy Diddy","He's So Fine","A Boy Named Sue","Roll Over Beethoven","Sweet Georgia Brown","Earth Angel","Rehab","(You Keep Me) Hangin' On","This Diamond Ring","Be My Love","Rush Rush","You're Beautiful","Roll With It","Moonlight Serenade","Unbelievable","Peg o' My Heart","This Land is Your Land","Stranger On the Shore","Rum & Coca-Cola","Hit the Road","Without Me","Crazy For You","I Want to Know What Love Is","Bye Bye","Down Under","At the Hop","One Bad Apple","Kiss & Say Goodbye","For What It's Worth (Stop","The Long & Winding Road","Baby One More Time","Stairway to Heaven","How Do I Live?","Hello","Truly Madly Deeply","Great Balls of Fire","King of the Road","I Wanna Dance With Somebody (Who Loves Me)","Reunited","Help Me","Rags to Riches","(It's No) Sin","Say My Name","Nobody Does it Better","Paperback Writer","Don't Worry Be Happy","I Fall to Pieces","Body & Soul","You're Still the One","Stormy Weather (Keeps Rainin' All the Time)","Horse With No Name","American Woman","Chattanoogie Shoe-Shine Boy","Pick Up the Pieces","Everybody Wants to Rule the World","Blue Tango","Hurt So Good","Apologize","Let's Dance","(You're My) Soul & Inspiration","I Only Have Eyes For You","Wichita Lineman","Hanging by a Moment","Spinning Wheel","Look Away","Ironic","Don't Stop 'Til You Get Enough","Empire State Of Mind","Do You Love Me?","Jive Talkin'","You're the One That I Want","Sweet Soul Music","Hey There Delilah","A Whole New World (Aladdin's Theme)","Somethin' Stupid","Knock Three Times","Mickey","The Wanderer","Dancing in the Dark","It's Still Rock 'n' Roll to Me","Boogie Oogie Oogie","Can You Feel the Love Tonight","Harper Valley PTA","Seasons in the Sun","Come On-a My House","Viva La Vida","Walk On By","Drop it Like It's Hot","Private Eyes","Maniac","All My Lovin' (You're Never Gonna Get It)","Take a Bow","Ring of Fire","Save the Last Dance For Me","Make it With You","Don't Speak","I Shot the Sheriff","Say It Right","Sing","Twist & Shout","Walk This Way","A-Tisket A-Tasket","Let Me Love You","I Can Dream","Toxic","The Joker","Hero","In the Year 2525 (Exordium & Terminus)","Your Song","Oh Happy Day","Grease","Love In This Club","Angie","How Much is That Doggy in the Window?","Daydream Believer","Whip It","Boogie Woogie Bugle Boy","Down","Hanky Panky","Total Eclipse of the Heart","Cat's in the Cradle","Strange Fruit","Breathe","On My Own","Dizzy","Ticket to Ride","We Got The Beat","On the Atchison","Always On My Mind","Unforgettable","In the End","Music","Can't Buy Me Love","Chain of Fools","Won't Get Fooled Again","Happy Days Are Here Again","Third Man Theme","Your Cheatin' Heart","Thriller","Venus","Time After Time","That Lucky Old Sun (Just Rolls Around Heaven All Day)","E.T.","Three Coins in the Fountain","Touch Me","You Ain't Seen Nothin' Yet","Gives You Hell","Knock On Wood","One of These Nights","Again","Doo Wop (That Thing)","Whoomp! (There it Is)","Magic","I'm Walking Behind You","We Didn't Start the Fire","Lola","Ghostbusters","Winchester Cathedral","Greatest Love of All","My Love","Wannabe","Miss You","I Feel Fine","Baby Baby","TSOP (The Sound of Philadelphia)","Loving You","This Guy's in Love With You","Till I Waltz Again With You","Why Do Fools Fall in Love?","Nights in White Satin","That's the Way (I Like It)","My Prayer","(Put Another Nickel In) Music! Music! Music!","Colors of the Wind","Morning Train (Nine to Five)","I Went to Your Wedding","Kiss Me","Gypsies","Cracklin' Rosie","Maybellene","Born in the USA","Here Without You","Mony Mony","Mmmbop","You Always Hurt the One You Love","Eight Days a Week","What Goes Around Comes Around","Kung Fu Fighting","Fantasy","Sir Duke","Ain't Misbehavin'","Need You Now","Last Train to Clarksville","Yakety Yak","I'll be seeing you","Hard to Say I'm Sorry","It's My Party","Love to Love You Baby","Miss You Much","Born to Run","Instant Karma","The Rose","Purple Rain","One","Groove is in the Heart","Gimme Some Lovin'","Beautiful Day","Escape (The Pina Colada Song)","Use Somebody","Fortunate Son","Afternoon Delight","Love's Theme","Sailing","Cherry Pink & Apple Blossom White","Georgy Girl","How to Save a Life","I Walk the Line","All You Need is Love","U Can't Touch This","All Out of Love","Where is the Love?","Revolution","The Love You Save","Black Or White","This Used to Be My Playground","Living For the City","School's Out","Disturbia","Riders On the Storm","Some Enchanted Evening","Weak","Maneater","More Than Words","Time of the Season","Mrs Brown You've Got a Lovely Daughter","If You Leave Me Now","Can't Get Enough of Your Love","Na Na Hey Hey (Kiss Him Goodbye)","Mr Brightside","Black Velvet","I'm Yours","My Blue Heaven","It Had to Be You","Tha Crossroads","Ac-cent-tchu-ate the Positive","Everyday People","We Are Young","Take Me Home","Smoke! Smoke! Smoke! (That Cigarette)","In the Summertime","The Tracks of My Tears","Fly Robin Fly","Love is a Many Splendoured Thing","Another Night","Long Tall Sally","You Sexy Thing","The Morning After","Get Off of My Cloud","Roses Are Red","Thank You (Falettinme be Mice Elf Again)","Slow Poke","You Belong With Me","Ain't No Mountain High Enough","Auf Wiederseh'n Sweetheart","Beauty & the Beast","St Louis Blues","Peggy Sue","U Got it Bad","Sweet Caroline (Good Times Never Seemed So Good)","Wedding Bell Blues","Freebird","Wipe Out","California Girls","Being With You","Makin' Whoopee","Shop Around","Smoke On the Water","Hungry Heart","That's Amore","My Life","Brandy (You're A Fine Girl)","Walk Don't Run","Surfin' USA","Ball of Confusion (That's What the World is Today)","Sunshine Superman","Frankenstein","Kiss You All Over","Wishing Well","Piano Man","Ben","In the Ghetto","Hang On Sloopy","Singing The Blues","Cry Like a Baby","I Honestly Love You","Brother","Lookin' Out My Back Door","Candy Man","Burn","Stagger Lee","Moonlight Cocktail","Coming Up","Pop Muzik","As Time Goes By","My Eyes Adored You","Strawberry Fields Forever","Some of These Days","I Think I Love You","Judy in Disguise (With Glasses)","All Along the Watchtower","A Thousand Miles","Fast Car","Red Red Wine","Live & Let Die","Come On Eileen","Right Back Where We Started From","Brother Louie","Ol' Man River","Band On the Run","Rich Girl","Green River","Got to Give it Up","Behind Closed Doors","Don't Go Breaking My Heart","I'm Looking Over a Four Leaf Clover","Mr Big Stuff","Tiger Rag","Kryptonite","Hey Paula","Go Your Own Way","Big Bad John","Wake Me Up Before You Go Go","Tangerine","Wayward Wind","Disco Lady","Spanish Harlem","Wicked Game","Rosanna","Papa Don't Preach","Somebody to Love","Kokomo","Manana (Is Soon Enough For Me)","Puttin' on the Ritz","One More Try","I'll Walk Alone","Shout","Woman","Ballerina","We Built This City","19th Nervous Breakdown","Working My Way Back to You","Superstar","Foolish Games","Get Down Tonight","On Bended Knee","Magic Carpet Ride","Only You (And You Alone)","A String of Pearls","A Tree in the Meadow","So Much in Love","Every Little Thing She Does is Magic","La Bamba","Tighten Up","Three Times a Lady","Airplanes","Don't Leave Me This Way","Rock the Casbah","Feel Good Inc","Love Me Do","Kiss On My List","Give Me Everything","Have You Ever Really Loved a Woman?","Love Letters in the Sand","Ring My Bell","Love Child","I Feel For You","Bye","(Let Me Be Your) Teddy Bear","Soldier Boy","Papa's Got a Brand New Bag","Love Hangover","Spill the Wine","Royals","April Showers","Don't You (Forget About Me)","Travellin' Man","The Thing","You Make Me Feel Brand New","The Glow-Worm","You Don't Bring Me Flowers","Summertime Blues","Straight Up","Sunday","Wake Up Little Susie","She's a Lady","Over There","Little Darlin'","Rag Mop","Shake Down","Up Around the Bend","Harbour Lights","Chances Are","Mood Indigo","Pony Time","After You've Gone","I Wanna Love You","Da Doo Ron Ron (When He Walked Me Home)","If You Don't Know Me By Now","Green Tambourine","My Man","If I Didn't Care","St George & the Dragonette","Why Don't You Believe Me?","How Will I Know","Disco Duck","Lonely Boy","Never Gonna Give You Up","Before The Next Teardrop Falls","Running Scared","Let's Hear it For the Boy","Sleep Walk","Walk On the Wild Side","Memories Are Made of This","Open Arms","Stuck On You","Personality","Feel Like Making Love","Stars & Stripes Forever","Besame Mucho","Let Me Call You Sweetheart","Indian Reservation (The Lament Of The Cherokee Reservation Indian)","Cars","You Make Me Feel Like Dancing","Whatcha Say","Me & Mrs Jones","Bitter Sweet Symphony","Uncle Albert (Admiral Halsey)","More Than a Feeling","My Boyfriend's Back","People","He'll Have to Go","I Can Help","The Streak","Dreams","Hair","Cold","Nothin' on You","The End of the World","Caldonia Boogie (What Makes Your Big Head So Hard)","I Kissed A Girl","Incense & Peppermints","12th Street Rag","West End Blues","The Way You Move","Smoke Gets in Your Eyes","Want Ads","Long Cool Woman in a Black Dress","Hey Baby","(Your Love Keeps Lifting Me) Higher & Higher","He's a Rebel","Alone","Thrift Shop","Don't Let the Sun Go Down On Me","The Sweet Escape","Return to Sender","Here in My Heart","Wabash Cannonball","Ain't That a Shame","Travellin' Band","I'm Your Boogie Man","I Write the Songs","This Love","Lights","Will It Go Round In Circles","Purple Haze","Rock Your Baby","Delicado","Tammy","Check On It","Breaking Up is Hard to Do","1999","Prisoner of Love","Wild Wild West","Walk Like a Man","I Will Follow Him","Glamorous","Yellow Rose of Texas","That Old Black Magic","I'm So Lonesome I Could Cry","Up Up & Away","Baby Come Back","Let it Snow! Let it Snow! Let it Snow!","Pon De Replay","Because I Love You (The Postman Song)","Sleepy Lagoon","Baker Street","Dardanella","You Don't Have to Be a Star (To Be in My Show)","Leaving","Glory of Love","Theme From 'Greatest American Hero' (Believe It Or Not)","Shake You Down","Ole Buttermilk Sky","I Can't Get Started","Freak Me","Hot Child In The City","Man in the Mirror","Queen of Hearts","Let's Groove","Change the World","You make Me Wanna","Someday","Eve of Destruction","One of Us","Honky Tonk","Be Bop a Lula","Two Hearts","Paper Planes"],RVu={genre:NVu,song_name:PVu},IVu=RVu,OVu=["activist","artist","author","blogger","business owner","coach","creator","designer","developer","dreamer","educator","engineer","entrepreneur","environmentalist","film lover","filmmaker","foodie","founder","friend","gamer","geek","grad","inventor","leader","model","musician","nerd","parent","patriot","person","philosopher","photographer","public speaker","scientist","singer","streamer","student","teacher","traveler","veteran","writer"],jVu=["{{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}, {{person.bio_part}}","{{person.bio_part}}, {{person.bio_part}}, {{person.bio_part}} {{internet.emoji}}","{{word.noun}} {{person.bio_supporter}}","{{word.noun}} {{person.bio_supporter}} {{internet.emoji}}","{{word.noun}} {{person.bio_supporter}}, {{person.bio_part}}","{{word.noun}} {{person.bio_supporter}}, {{person.bio_part}} {{internet.emoji}}"],HVu=["advocate","devotee","enthusiast","fan","junkie","lover","supporter"],VVu=["Mary","Patricia","Linda","Barbara","Elizabeth","Jennifer","Maria","Susan","Margaret","Dorothy","Lisa","Nancy","Karen","Betty","Helen","Sandra","Donna","Carol","Ruth","Sharon","Michelle","Laura","Sarah","Kimberly","Deborah","Jessica","Shirley","Cynthia","Angela","Melissa","Brenda","Amy","Anna","Rebecca","Virginia","Kathleen","Pamela","Martha","Debra","Amanda","Stephanie","Carolyn","Christine","Marie","Janet","Catherine","Frances","Ann","Joyce","Diane","Alice","Julie","Heather","Teresa","Doris","Gloria","Evelyn","Jean","Cheryl","Mildred","Katherine","Joan","Ashley","Judith","Rose","Janice","Kelly","Nicole","Judy","Christina","Kathy","Theresa","Beverly","Denise","Tammy","Irene","Jane","Lori","Rachel","Marilyn","Andrea","Kathryn","Louise","Sara","Anne","Jacqueline","Wanda","Bonnie","Julia","Ruby","Lois","Tina","Phyllis","Norma","Paula","Diana","Annie","Lillian","Emily","Robin","Peggy","Crystal","Gladys","Rita","Dawn","Connie","Florence","Tracy","Edna","Tiffany","Carmen","Rosa","Cindy","Grace","Wendy","Victoria","Edith","Kim","Sherry","Sylvia","Josephine","Thelma","Shannon","Sheila","Ethel","Ellen","Elaine","Marjorie","Carrie","Charlotte","Monica","Esther","Pauline","Emma","Juanita","Anita","Rhonda","Hazel","Amber","Eva","Debbie","April","Leslie","Clara","Lucille","Jamie","Joanne","Eleanor","Valerie","Danielle","Megan","Alicia","Suzanne","Michele","Gail","Bertha","Darlene","Veronica","Jill","Erin","Geraldine","Lauren","Cathy","Joann","Lorraine","Lynn","Sally","Regina","Erica","Beatrice","Dolores","Bernice","Audrey","Yvonne","Annette","June","Samantha","Marion","Dana","Stacy","Ana","Renee","Ida","Vivian","Roberta","Holly","Brittany","Melanie","Loretta","Yolanda","Jeanette","Laurie","Katie","Kristen","Vanessa","Alma","Sue","Elsie","Beth","Jeanne","Vicki","Carla","Tara","Rosemary","Eileen","Terri","Gertrude","Lucy","Tonya","Ella","Stacey","Wilma","Gina","Kristin","Jessie","Natalie","Agnes","Vera","Willie","Charlene","Bessie","Delores","Melinda","Pearl","Arlene","Maureen","Colleen","Allison","Tamara","Joy","Georgia","Constance","Lillie","Claudia","Jackie","Marcia","Tanya","Nellie","Minnie","Marlene","Heidi","Glenda","Lydia","Viola","Courtney","Marian","Stella","Caroline","Dora","Jo","Vickie","Mattie","Terry","Maxine","Irma","Mabel","Marsha","Myrtle","Lena","Christy","Deanna","Patsy","Hilda","Gwendolyn","Jennie","Nora","Margie","Nina","Cassandra","Leah","Penny","Kay","Priscilla","Naomi","Carole","Brandy","Olga","Billie","Dianne","Tracey","Leona","Jenny","Felicia","Sonia","Miriam","Velma","Becky","Bobbie","Violet","Kristina","Toni","Misty","Mae","Shelly","Daisy","Ramona","Sherri","Erika","Katrina","Claire","Lindsey","Lindsay","Geneva","Guadalupe","Belinda","Margarita","Sheryl","Cora","Faye","Ada","Natasha","Sabrina","Isabel","Marguerite","Hattie","Harriet","Molly","Cecilia","Kristi","Brandi","Blanche","Sandy","Rosie","Joanna","Iris","Eunice","Angie","Inez","Lynda","Madeline","Amelia","Alberta","Genevieve","Monique","Jodi","Janie","Maggie","Kayla","Sonya","Jan","Lee","Kristine","Candace","Fannie","Maryann","Opal","Alison","Yvette","Melody","Luz","Susie","Olivia","Flora","Shelley","Kristy","Mamie","Lula","Lola","Verna","Beulah","Antoinette","Candice","Juana","Jeannette","Pam","Kelli","Hannah","Whitney","Bridget","Karla","Celia","Latoya","Patty","Shelia","Gayle","Della","Vicky","Lynne","Sheri","Marianne","Kara","Jacquelyn","Erma","Blanca","Myra","Leticia","Pat","Krista","Roxanne","Angelica","Johnnie","Robyn","Francis","Adrienne","Rosalie","Alexandra","Brooke","Bethany","Sadie","Bernadette","Traci","Jody","Kendra","Jasmine","Nichole","Rachael","Chelsea","Mable","Ernestine","Muriel","Marcella","Elena","Krystal","Angelina","Nadine","Kari","Estelle","Dianna","Paulette","Lora","Mona","Doreen","Rosemarie","Angel","Desiree","Antonia","Hope","Ginger","Janis","Betsy","Christie","Freda","Mercedes","Meredith","Lynette","Teri","Cristina","Eula","Leigh","Meghan","Sophia","Eloise","Rochelle","Gretchen","Cecelia","Raquel","Henrietta","Alyssa","Jana","Kelley","Gwen","Kerry","Jenna","Tricia","Laverne","Olive","Alexis","Tasha","Silvia","Elvira","Casey","Delia","Sophie","Kate","Patti","Lorena","Kellie","Sonja","Lila","Lana","Darla","May","Mindy","Essie","Mandy","Lorene","Elsa","Josefina","Jeannie","Miranda","Dixie","Lucia","Marta","Faith","Lela","Johanna","Shari","Camille","Tami","Shawna","Elisa","Ebony","Melba","Ora","Nettie","Tabitha","Ollie","Jaime","Winifred","Kristie"],$Vu=["Abigail","Adele","Alex","Alice","Alisha","Amber","Amelia","Amora","Anaïs","Angelou","Anika","Anise","Annabel","Anne","Aphrodite","Aretha","Arya","Ashton","Aster","Audrey","Avery","Bailee","Bay","Belle","Beth","Billie","Blair","Blaise","Blake","Blanche","Blue","Bree","Brielle","Brienne","Brooke","Caleen","Candice","Caprice","Carelyn","Caylen","Celine","Cerise","Cia","Claire","Claudia","Clementine","Coral","Coraline","Dahlia","Dakota","Dawn","Della","Demi","Denise","Denver","Devine","Devon","Diana","Dylan","Ebony","Eden","Eleanor","Elein","Elizabeth","Ellen","Elodie","Eloise","Ember","Emma","Erin","Eyre","Faith","Farrah","Fawn","Fayre","Fern","France","Francis","Frida","Genisis","Georgia","Grace","Gwen","Harley","Harper","Hazel","Helen","Hippolyta","Holly","Hope","Imani","Iowa","Ireland","Irene","Iris","Isa","Isla","Ivy","Jade","Jane","Jazz","Jean","Jess","Jett","Jo","Joan","Jolie","Jordan","Josie","Journey","Joy","Jules","Julien","Juliet","Juniper","Justice","Kali","Karma","Kat","Kate","Kennedy","Keva","Kylie","Lake","Lane","Lark","Layla","Lee","Leigh","Leona","Lexi","London","Lou","Louise","Love","Luna","Lux","Lynn","Lyric","Maddie","Mae","Marie","Matilda","Maude","Maybel","Meadow","Medusa","Mercy","Michelle","Mirabel","Monroe","Morgan","Nalia","Naomi","Nova","Olive","Paige","Parker","Pax","Pearl","Penelope","Phoenix","Quinn","Rae","Rain","Raven","Ray","Raye","Rebel","Reese","Reeve","Regan","Riley","River","Robin","Rory","Rose","Royal","Ruth","Rylie","Sage","Sam","Saturn","Scout","Serena","Sky","Skylar","Sofia","Sophia","Storm","Sue","Suzanne","Sydney","Taylen","Taylor","Teagan","Tempest","Tenley","Thea","Trinity","Valerie","Venus","Vera","Violet","Willow","Winter","Xena","Zaylee","Zion","Zoe"],_Oe=["Mrs.","Ms.","Miss","Dr."],KVu=["Aaliyah","Aaron","Abagail","Abbey","Abbie","Abbigail","Abby","Abdiel","Abdul","Abdullah","Abe","Abel","Abelardo","Abigail","Abigale","Abigayle","Abner","Abraham","Ada","Adah","Adalberto","Adaline","Adam","Adan","Addie","Addison","Adela","Adelbert","Adele","Adelia","Adeline","Adell","Adella","Adelle","Aditya","Adolf","Adolfo","Adolph","Adolphus","Adonis","Adrain","Adrian","Adriana","Adrianna","Adriel","Adrien","Adrienne","Afton","Aglae","Agnes","Agustin","Agustina","Ahmad","Ahmed","Aida","Aidan","Aiden","Aileen","Aimee","Aisha","Aiyana","Akeem","Al","Alaina","Alan","Alana","Alanis","Alanna","Alayna","Alba","Albert","Alberta","Albertha","Alberto","Albin","Albina","Alda","Alden","Alec","Aleen","Alejandra","Alejandrin","Alek","Alena","Alene","Alessandra","Alessandro","Alessia","Aletha","Alex","Alexa","Alexander","Alexandra","Alexandre","Alexandrea","Alexandria","Alexandrine","Alexandro","Alexane","Alexanne","Alexie","Alexis","Alexys","Alexzander","Alf","Alfonso","Alfonzo","Alford","Alfred","Alfreda","Alfredo","Ali","Alia","Alice","Alicia","Alisa","Alisha","Alison","Alivia","Aliya","Aliyah","Aliza","Alize","Allan","Allen","Allene","Allie","Allison","Ally","Alphonso","Alta","Althea","Alva","Alvah","Alvena","Alvera","Alverta","Alvina","Alvis","Alyce","Alycia","Alysa","Alysha","Alyson","Alysson","Amalia","Amanda","Amani","Amara","Amari","Amaya","Amber","Ambrose","Amelia","Amelie","Amely","America","Americo","Amie","Amina","Amir","Amira","Amiya","Amos","Amparo","Amy","Amya","Ana","Anabel","Anabelle","Anahi","Anais","Anastacio","Anastasia","Anderson","Andre","Andreane","Andreanne","Andres","Andrew","Andy","Angel","Angela","Angelica","Angelina","Angeline","Angelita","Angelo","Angie","Angus","Anibal","Anika","Anissa","Anita","Aniya","Aniyah","Anjali","Anna","Annabel","Annabell","Annabelle","Annalise","Annamae","Annamarie","Anne","Annetta","Annette","Annie","Ansel","Ansley","Anthony","Antoinette","Antone","Antonetta","Antonette","Antonia","Antonietta","Antonina","Antonio","Antwan","Antwon","Anya","April","Ara","Araceli","Aracely","Arch","Archibald","Ardella","Arden","Ardith","Arely","Ari","Ariane","Arianna","Aric","Ariel","Arielle","Arjun","Arlene","Arlie","Arlo","Armand","Armando","Armani","Arnaldo","Arne","Arno","Arnold","Arnoldo","Arnulfo","Aron","Art","Arthur","Arturo","Arvel","Arvid","Arvilla","Aryanna","Asa","Asha","Ashlee","Ashleigh","Ashley","Ashly","Ashlynn","Ashton","Ashtyn","Asia","Assunta","Astrid","Athena","Aubree","Aubrey","Audie","Audra","Audreanne","Audrey","August","Augusta","Augustine","Augustus","Aurelia","Aurelie","Aurelio","Aurore","Austen","Austin","Austyn","Autumn","Ava","Avery","Avis","Axel","Ayana","Ayden","Ayla","Aylin","Baby","Bailee","Bailey","Barbara","Barney","Baron","Barrett","Barry","Bart","Bartholome","Barton","Baylee","Beatrice","Beau","Beaulah","Bell","Bella","Belle","Ben","Benedict","Benjamin","Bennett","Bennie","Benny","Benton","Berenice","Bernadette","Bernadine","Bernard","Bernardo","Berneice","Bernhard","Bernice","Bernie","Berniece","Bernita","Berry","Bert","Berta","Bertha","Bertram","Bertrand","Beryl","Bessie","Beth","Bethany","Bethel","Betsy","Bette","Bettie","Betty","Bettye","Beulah","Beverly","Bianka","Bill","Billie","Billy","Birdie","Blair","Blaise","Blake","Blanca","Blanche","Blaze","Bo","Bobbie","Bobby","Bonita","Bonnie","Boris","Boyd","Brad","Braden","Bradford","Bradley","Bradly","Brady","Braeden","Brain","Brandi","Brando","Brandon","Brandt","Brandy","Brandyn","Brannon","Branson","Brant","Braulio","Braxton","Brayan","Breana","Breanna","Breanne","Brenda","Brendan","Brenden","Brendon","Brenna","Brennan","Brennon","Brent","Bret","Brett","Bria","Brian","Briana","Brianne","Brice","Bridget","Bridgette","Bridie","Brielle","Brigitte","Brionna","Brisa","Britney","Brittany","Brock","Broderick","Brody","Brook","Brooke","Brooklyn","Brooks","Brown","Bruce","Bryana","Bryce","Brycen","Bryon","Buck","Bud","Buddy","Buford","Bulah","Burdette","Burley","Burnice","Buster","Cade","Caden","Caesar","Caitlyn","Cale","Caleb","Caleigh","Cali","Calista","Callie","Camden","Cameron","Camila","Camilla","Camille","Camren","Camron","Camryn","Camylle","Candace","Candelario","Candice","Candida","Candido","Cara","Carey","Carissa","Carlee","Carleton","Carley","Carli","Carlie","Carlo","Carlos","Carlotta","Carmel","Carmela","Carmella","Carmelo","Carmen","Carmine","Carol","Carolanne","Carole","Carolina","Caroline","Carolyn","Carolyne","Carrie","Carroll","Carson","Carter","Cary","Casandra","Casey","Casimer","Casimir","Casper","Cassandra","Cassandre","Cassidy","Cassie","Catalina","Caterina","Catharine","Catherine","Cathrine","Cathryn","Cathy","Cayla","Ceasar","Cecelia","Cecil","Cecile","Cecilia","Cedrick","Celestine","Celestino","Celia","Celine","Cesar","Chad","Chadd","Chadrick","Chaim","Chance","Chandler","Chanel","Chanelle","Charity","Charlene","Charles","Charley","Charlie","Charlotte","Chase","Chasity","Chauncey","Chaya","Chaz","Chelsea","Chelsey","Chelsie","Chesley","Chester","Chet","Cheyanne","Cheyenne","Chloe","Chris","Christ","Christa","Christelle","Christian","Christiana","Christina","Christine","Christop","Christophe","Christopher","Christy","Chyna","Ciara","Cicero","Cielo","Cierra","Cindy","Citlalli","Clair","Claire","Clara","Clarabelle","Clare","Clarissa","Clark","Claud","Claude","Claudia","Claudie","Claudine","Clay","Clemens","Clement","Clementina","Clementine","Clemmie","Cleo","Cleora","Cleta","Cletus","Cleve","Cleveland","Clifford","Clifton","Clint","Clinton","Clotilde","Clovis","Cloyd","Clyde","Coby","Cody","Colby","Cole","Coleman","Colin","Colleen","Collin","Colt","Colten","Colton","Columbus","Concepcion","Conner","Connie","Connor","Conor","Conrad","Constance","Constantin","Consuelo","Cooper","Cora","Coralie","Corbin","Cordelia","Cordell","Cordia","Cordie","Corene","Corine","Cornelius","Cornell","Corrine","Cortez","Cortney","Cory","Coty","Courtney","Coy","Craig","Crawford","Creola","Cristal","Cristian","Cristina","Cristobal","Cristopher","Cruz","Crystal","Crystel","Cullen","Curt","Curtis","Cydney","Cynthia","Cyril","Cyrus","Dagmar","Dahlia","Daija","Daisha","Daisy","Dakota","Dale","Dallas","Dallin","Dalton","Damaris","Dameon","Damian","Damien","Damion","Damon","Dan","Dana","Dandre","Dane","D'angelo","Dangelo","Danial","Daniela","Daniella","Danielle","Danika","Dannie","Danny","Dante","Danyka","Daphne","Daphnee","Daphney","Darby","Daren","Darian","Dariana","Darien","Dario","Darion","Darius","Darlene","Daron","Darrel","Darrell","Darren","Darrick","Darrin","Darrion","Darron","Darryl","Darwin","Daryl","Dashawn","Dasia","Dave","David","Davin","Davion","Davon","Davonte","Dawn","Dawson","Dax","Dayana","Dayna","Dayne","Dayton","Dean","Deangelo","Deanna","Deborah","Declan","Dedric","Dedrick","Dee","Deion","Deja","Dejah","Dejon","Dejuan","Delaney","Delbert","Delfina","Delia","Delilah","Dell","Della","Delmer","Delores","Delpha","Delphia","Delphine","Delta","Demarco","Demarcus","Demario","Demetris","Demetrius","Demond","Dena","Denis","Dennis","Deon","Deondre","Deontae","Deonte","Dereck","Derek","Derick","Deron","Derrick","Deshaun","Deshawn","Desiree","Desmond","Dessie","Destany","Destin","Destinee","Destiney","Destini","Destiny","Devan","Devante","Deven","Devin","Devon","Devonte","Devyn","Dewayne","Dewitt","Dexter","Diamond","Diana","Dianna","Diego","Dillan","Dillon","Dimitri","Dina","Dino","Dion","Dixie","Dock","Dolly","Dolores","Domenic","Domenica","Domenick","Domenico","Domingo","Dominic","Dominique","Don","Donald","Donato","Donavon","Donna","Donnell","Donnie","Donny","Dora","Dorcas","Dorian","Doris","Dorothea","Dorothy","Dorris","Dortha","Dorthy","Doug","Douglas","Dovie","Doyle","Drake","Drew","Duane","Dudley","Dulce","Duncan","Durward","Dustin","Dusty","Dwight","Dylan","Earl","Earlene","Earline","Earnest","Earnestine","Easter","Easton","Ebba","Ebony","Ed","Eda","Edd","Eddie","Eden","Edgar","Edgardo","Edison","Edmond","Edmund","Edna","Eduardo","Edward","Edwardo","Edwin","Edwina","Edyth","Edythe","Effie","Efrain","Efren","Eileen","Einar","Eino","Eladio","Elaina","Elbert","Elda","Eldon","Eldora","Eldred","Eldridge","Eleanora","Eleanore","Eleazar","Electa","Elena","Elenor","Elenora","Eleonore","Elfrieda","Eli","Elian","Eliane","Elias","Eliezer","Elijah","Elinor","Elinore","Elisa","Elisabeth","Elise","Eliseo","Elisha","Elissa","Eliza","Elizabeth","Ella","Ellen","Ellie","Elliot","Elliott","Ellis","Ellsworth","Elmer","Elmira","Elmo","Elmore","Elna","Elnora","Elody","Eloisa","Eloise","Elouise","Eloy","Elroy","Elsa","Else","Elsie","Elta","Elton","Elva","Elvera","Elvie","Elvis","Elwin","Elwyn","Elyse","Elyssa","Elza","Emanuel","Emelia","Emelie","Emely","Emerald","Emerson","Emery","Emie","Emil","Emile","Emilia","Emiliano","Emilie","Emilio","Emily","Emma","Emmalee","Emmanuel","Emmanuelle","Emmet","Emmett","Emmie","Emmitt","Emmy","Emory","Ena","Enid","Enoch","Enola","Enos","Enrico","Enrique","Ephraim","Era","Eriberto","Eric","Erica","Erich","Erick","Ericka","Erik","Erika","Erin","Erling","Erna","Ernest","Ernestina","Ernestine","Ernesto","Ernie","Ervin","Erwin","Eryn","Esmeralda","Esperanza","Esta","Esteban","Estefania","Estel","Estell","Estella","Estelle","Estevan","Esther","Estrella","Etha","Ethan","Ethel","Ethelyn","Ethyl","Ettie","Eudora","Eugene","Eugenia","Eula","Eulah","Eulalia","Euna","Eunice","Eusebio","Eva","Evalyn","Evan","Evangeline","Evans","Eve","Eveline","Evelyn","Everardo","Everett","Everette","Evert","Evie","Ewald","Ewell","Ezekiel","Ezequiel","Ezra","Fabian","Fabiola","Fae","Fannie","Fanny","Fatima","Faustino","Fausto","Favian","Fay","Faye","Federico","Felicia","Felicita","Felicity","Felipa","Felipe","Felix","Felton","Fermin","Fern","Fernando","Ferne","Fidel","Filiberto","Filomena","Finn","Fiona","Flavie","Flavio","Fleta","Fletcher","Flo","Florence","Florencio","Florian","Florida","Florine","Flossie","Floy","Floyd","Ford","Forest","Forrest","Foster","Frances","Francesca","Francesco","Francis","Francisca","Francisco","Franco","Frank","Frankie","Franz","Fred","Freda","Freddie","Freddy","Frederic","Frederick","Frederik","Frederique","Fredrick","Fredy","Freeda","Freeman","Freida","Frida","Frieda","Friedrich","Fritz","Furman","Gabe","Gabriel","Gabriella","Gabrielle","Gaetano","Gage","Gail","Gardner","Garett","Garfield","Garland","Garnet","Garnett","Garret","Garrett","Garrick","Garrison","Garry","Garth","Gaston","Gavin","Gayle","Gene","General","Genesis","Genevieve","Gennaro","Genoveva","Geo","Geoffrey","George","Georgette","Georgiana","Georgianna","Geovanni","Geovanny","Geovany","Gerald","Geraldine","Gerard","Gerardo","Gerda","Gerhard","Germaine","German","Gerry","Gerson","Gertrude","Gia","Gianni","Gideon","Gilbert","Gilberto","Gilda","Giles","Gillian","Gina","Gino","Giovani","Giovanna","Giovanni","Giovanny","Gisselle","Giuseppe","Gladyce","Gladys","Glen","Glenda","Glenna","Glennie","Gloria","Godfrey","Golda","Golden","Gonzalo","Gordon","Grace","Gracie","Graciela","Grady","Graham","Grant","Granville","Grayce","Grayson","Green","Greg","Gregg","Gregoria","Gregorio","Gregory","Greta","Gretchen","Greyson","Griffin","Grover","Guadalupe","Gudrun","Guido","Guillermo","Guiseppe","Gunnar","Gunner","Gus","Gussie","Gust","Gustave","Guy","Gwen","Gwendolyn","Hadley","Hailee","Hailey","Hailie","Hal","Haleigh","Haley","Halie","Halle","Hallie","Hank","Hanna","Hannah","Hans","Hardy","Harley","Harmon","Harmony","Harold","Harrison","Harry","Harvey","Haskell","Hassan","Hassie","Hattie","Haven","Hayden","Haylee","Hayley","Haylie","Hazel","Hazle","Heath","Heather","Heaven","Heber","Hector","Heidi","Helen","Helena","Helene","Helga","Hellen","Helmer","Heloise","Henderson","Henri","Henriette","Henry","Herbert","Herman","Hermann","Hermina","Herminia","Herminio","Hershel","Herta","Hertha","Hester","Hettie","Hilario","Hilbert","Hilda","Hildegard","Hillard","Hillary","Hilma","Hilton","Hipolito","Hiram","Hobart","Holden","Hollie","Hollis","Holly","Hope","Horace","Horacio","Hortense","Hosea","Houston","Howard","Howell","Hoyt","Hubert","Hudson","Hugh","Hulda","Humberto","Hunter","Hyman","Ian","Ibrahim","Icie","Ida","Idell","Idella","Ignacio","Ignatius","Ike","Ila","Ilene","Iliana","Ima","Imani","Imelda","Immanuel","Imogene","Ines","Irma","Irving","Irwin","Isaac","Isabel","Isabell","Isabella","Isabelle","Isac","Isadore","Isai","Isaiah","Isaias","Isidro","Ismael","Isobel","Isom","Israel","Issac","Itzel","Iva","Ivah","Ivory","Ivy","Izabella","Izaiah","Jabari","Jace","Jacey","Jacinthe","Jacinto","Jack","Jackeline","Jackie","Jacklyn","Jackson","Jacky","Jaclyn","Jacquelyn","Jacques","Jacynthe","Jada","Jade","Jaden","Jadon","Jadyn","Jaeden","Jaida","Jaiden","Jailyn","Jaime","Jairo","Jakayla","Jake","Jakob","Jaleel","Jalen","Jalon","Jalyn","Jamaal","Jamal","Jamar","Jamarcus","Jamel","Jameson","Jamey","Jamie","Jamil","Jamir","Jamison","Jammie","Jan","Jana","Janae","Jane","Janelle","Janessa","Janet","Janice","Janick","Janie","Janis","Janiya","Jannie","Jany","Jaquan","Jaquelin","Jaqueline","Jared","Jaren","Jarod","Jaron","Jarred","Jarrell","Jarret","Jarrett","Jarrod","Jarvis","Jasen","Jasmin","Jason","Jasper","Jaunita","Javier","Javon","Javonte","Jay","Jayce","Jaycee","Jayda","Jayde","Jayden","Jaydon","Jaylan","Jaylen","Jaylin","Jaylon","Jayme","Jayne","Jayson","Jazlyn","Jazmin","Jazmyn","Jazmyne","Jean","Jeanette","Jeanie","Jeanne","Jed","Jedediah","Jedidiah","Jeff","Jefferey","Jeffery","Jeffrey","Jeffry","Jena","Jenifer","Jennie","Jennifer","Jennings","Jennyfer","Jensen","Jerad","Jerald","Jeramie","Jeramy","Jerel","Jeremie","Jeremy","Jermain","Jermaine","Jermey","Jerod","Jerome","Jeromy","Jerrell","Jerrod","Jerrold","Jerry","Jess","Jesse","Jessica","Jessie","Jessika","Jessy","Jessyca","Jesus","Jett","Jettie","Jevon","Jewel","Jewell","Jillian","Jimmie","Jimmy","Jo","Joan","Joana","Joanie","Joanne","Joannie","Joanny","Joany","Joaquin","Jocelyn","Jodie","Jody","Joe","Joel","Joelle","Joesph","Joey","Johan","Johann","Johanna","Johathan","John","Johnathan","Johnathon","Johnnie","Johnny","Johnpaul","Johnson","Jolie","Jon","Jonas","Jonatan","Jonathan","Jonathon","Jordan","Jordane","Jordi","Jordon","Jordy","Jordyn","Jorge","Jose","Josefa","Josefina","Joseph","Josephine","Josh","Joshua","Joshuah","Josiah","Josiane","Josianne","Josie","Josue","Jovan","Jovani","Jovanny","Jovany","Joy","Joyce","Juana","Juanita","Judah","Judd","Jude","Judge","Judson","Judy","Jules","Julia","Julian","Juliana","Julianne","Julie","Julien","Juliet","Julio","Julius","June","Junior","Junius","Justen","Justice","Justina","Justine","Juston","Justus","Justyn","Juvenal","Juwan","Kacey","Kaci","Kacie","Kade","Kaden","Kadin","Kaela","Kaelyn","Kaia","Kailee","Kailey","Kailyn","Kaitlin","Kaitlyn","Kale","Kaleb","Kaleigh","Kaley","Kali","Kallie","Kameron","Kamille","Kamren","Kamron","Kamryn","Kane","Kara","Kareem","Karelle","Karen","Kari","Kariane","Karianne","Karina","Karine","Karl","Karlee","Karley","Karli","Karlie","Karolann","Karson","Kasandra","Kasey","Kassandra","Katarina","Katelin","Katelyn","Katelynn","Katharina","Katherine","Katheryn","Kathleen","Kathlyn","Kathryn","Kathryne","Katlyn","Katlynn","Katrina","Katrine","Kattie","Kavon","Kay","Kaya","Kaycee","Kayden","Kayla","Kaylah","Kaylee","Kayleigh","Kayley","Kayli","Kaylie","Kaylin","Keagan","Keanu","Keara","Keaton","Keegan","Keeley","Keely","Keenan","Keira","Keith","Kellen","Kelley","Kelli","Kellie","Kelly","Kelsi","Kelsie","Kelton","Kelvin","Ken","Kendall","Kendra","Kendrick","Kenna","Kennedi","Kennedy","Kenneth","Kennith","Kenny","Kenton","Kenya","Kenyatta","Kenyon","Keon","Keshaun","Keshawn","Keven","Kevin","Kevon","Keyon","Keyshawn","Khalid","Khalil","Kian","Kiana","Kianna","Kiara","Kiarra","Kiel","Kiera","Kieran","Kiley","Kim","Kimberly","King","Kip","Kira","Kirk","Kirsten","Kirstin","Kitty","Kobe","Koby","Kody","Kolby","Kole","Korbin","Korey","Kory","Kraig","Kris","Krista","Kristian","Kristin","Kristina","Kristofer","Kristoffer","Kristopher","Kristy","Krystal","Krystel","Krystina","Kurt","Kurtis","Kyla","Kyle","Kylee","Kyleigh","Kyler","Kylie","Kyra","Lacey","Lacy","Ladarius","Lafayette","Laila","Laisha","Lamar","Lambert","Lamont","Lance","Landen","Lane","Laney","Larissa","Laron","Larry","Larue","Laura","Laurel","Lauren","Laurence","Lauretta","Lauriane","Laurianne","Laurie","Laurine","Laury","Lauryn","Lavada","Lavern","Laverna","Laverne","Lavina","Lavinia","Lavon","Lavonne","Lawrence","Lawson","Layla","Layne","Lazaro","Lea","Leann","Leanna","Leanne","Leatha","Leda","Lee","Leif","Leila","Leilani","Lela","Lelah","Leland","Lelia","Lempi","Lemuel","Lenna","Lennie","Lenny","Lenora","Lenore","Leo","Leola","Leon","Leonard","Leonardo","Leone","Leonel","Leonie","Leonor","Leonora","Leopold","Leopoldo","Leora","Lera","Lesley","Leslie","Lesly","Lessie","Lester","Leta","Letha","Letitia","Levi","Lew","Lewis","Lexi","Lexie","Lexus","Lia","Liam","Liana","Libbie","Libby","Lila","Lilian","Liliana","Liliane","Lilla","Lillian","Lilliana","Lillie","Lilly","Lily","Lilyan","Lina","Lincoln","Linda","Lindsay","Lindsey","Linnea","Linnie","Linwood","Lionel","Lisa","Lisandro","Lisette","Litzy","Liza","Lizeth","Lizzie","Llewellyn","Lloyd","Logan","Lois","Lola","Lolita","Loma","Lon","London","Lonie","Lonnie","Lonny","Lonzo","Lora","Loraine","Loren","Lorena","Lorenz","Lorenza","Lorenzo","Lori","Lorine","Lorna","Lottie","Lou","Louie","Louisa","Lourdes","Louvenia","Lowell","Loy","Loyal","Loyce","Lucas","Luciano","Lucie","Lucienne","Lucile","Lucinda","Lucio","Lucious","Lucius","Lucy","Ludie","Ludwig","Lue","Luella","Luigi","Luis","Luisa","Lukas","Lula","Lulu","Luna","Lupe","Lura","Lurline","Luther","Luz","Lyda","Lydia","Lyla","Lynn","Lyric","Lysanne","Mabel","Mabelle","Mable","Mac","Macey","Maci","Macie","Mack","Mackenzie","Macy","Madaline","Madalyn","Maddison","Madeline","Madelyn","Madelynn","Madge","Madie","Madilyn","Madisen","Madison","Madisyn","Madonna","Madyson","Mae","Maegan","Maeve","Mafalda","Magali","Magdalen","Magdalena","Maggie","Magnolia","Magnus","Maia","Maida","Maiya","Major","Makayla","Makenna","Makenzie","Malachi","Malcolm","Malika","Malinda","Mallie","Mallory","Malvina","Mandy","Manley","Manuel","Manuela","Mara","Marc","Marcel","Marcelina","Marcelino","Marcella","Marcelle","Marcellus","Marcelo","Marcia","Marco","Marcos","Marcus","Margaret","Margarete","Margarett","Margaretta","Margarette","Margarita","Marge","Margie","Margot","Margret","Marguerite","Maria","Mariah","Mariam","Marian","Mariana","Mariane","Marianna","Marianne","Mariano","Maribel","Marie","Mariela","Marielle","Marietta","Marilie","Marilou","Marilyne","Marina","Mario","Marion","Marisa","Marisol","Maritza","Marjolaine","Marjorie","Marjory","Mark","Markus","Marlee","Marlen","Marlene","Marley","Marlin","Marlon","Marques","Marquis","Marquise","Marshall","Marta","Martin","Martina","Martine","Marty","Marvin","Mary","Maryam","Maryjane","Maryse","Mason","Mateo","Mathew","Mathias","Mathilde","Matilda","Matilde","Matt","Matteo","Mattie","Maud","Maude","Maudie","Maureen","Maurice","Mauricio","Maurine","Maverick","Mavis","Max","Maxie","Maxime","Maximilian","Maximillia","Maximillian","Maximo","Maximus","Maxine","Maxwell","May","Maya","Maybell","Maybelle","Maye","Maymie","Maynard","Mayra","Mazie","Mckayla","Mckenna","Mckenzie","Meagan","Meaghan","Meda","Megane","Meggie","Meghan","Mekhi","Melany","Melba","Melisa","Melissa","Mellie","Melody","Melvin","Melvina","Melyna","Melyssa","Mercedes","Meredith","Merl","Merle","Merlin","Merritt","Mertie","Mervin","Meta","Mia","Micaela","Micah","Michael","Michaela","Michale","Micheal","Michel","Michele","Michelle","Miguel","Mikayla","Mike","Mikel","Milan","Miles","Milford","Miller","Millie","Milo","Milton","Mina","Minerva","Minnie","Miracle","Mireille","Mireya","Misael","Missouri","Misty","Mitchel","Mitchell","Mittie","Modesta","Modesto","Mohamed","Mohammad","Mohammed","Moises","Mollie","Molly","Mona","Monica","Monique","Monroe","Monserrat","Monserrate","Montana","Monte","Monty","Morgan","Moriah","Morris","Mortimer","Morton","Mose","Moses","Moshe","Mossie","Mozell","Mozelle","Muhammad","Muriel","Murl","Murphy","Murray","Mustafa","Mya","Myah","Mylene","Myles","Myra","Myriam","Myrl","Myrna","Myron","Myrtice","Myrtie","Myrtis","Myrtle","Nadia","Nakia","Name","Nannie","Naomi","Naomie","Napoleon","Narciso","Nash","Nasir","Nat","Natalia","Natalie","Natasha","Nathan","Nathanael","Nathanial","Nathaniel","Nathen","Nayeli","Neal","Ned","Nedra","Neha","Neil","Nelda","Nella","Nelle","Nellie","Nels","Nelson","Neoma","Nestor","Nettie","Neva","Newell","Newton","Nia","Nicholas","Nicholaus","Nichole","Nick","Nicklaus","Nickolas","Nico","Nicola","Nicolas","Nicole","Nicolette","Nigel","Nikita","Nikki","Nikko","Niko","Nikolas","Nils","Nina","Noah","Noble","Noe","Noel","Noelia","Noemi","Noemie","Noemy","Nola","Nolan","Nona","Nora","Norbert","Norberto","Norene","Norma","Norris","Norval","Norwood","Nova","Novella","Nya","Nyah","Nyasia","Obie","Oceane","Ocie","Octavia","Oda","Odell","Odessa","Odie","Ofelia","Okey","Ola","Olaf","Ole","Olen","Oleta","Olga","Olin","Oliver","Ollie","Oma","Omari","Omer","Ona","Onie","Opal","Ophelia","Ora","Oral","Oran","Oren","Orie","Orin","Orion","Orland","Orlando","Orlo","Orpha","Orrin","Orval","Orville","Osbaldo","Osborne","Oscar","Osvaldo","Oswald","Oswaldo","Otha","Otho","Otilia","Otis","Ottilie","Ottis","Otto","Ova","Owen","Ozella","Pablo","Paige","Palma","Pamela","Pansy","Paolo","Paris","Parker","Pascale","Pasquale","Pat","Patience","Patricia","Patrick","Patsy","Pattie","Paul","Paula","Pauline","Paxton","Payton","Pearl","Pearlie","Pearline","Pedro","Peggie","Penelope","Percival","Percy","Perry","Pete","Peter","Petra","Peyton","Philip","Phoebe","Phyllis","Pierce","Pierre","Pietro","Pink","Pinkie","Piper","Polly","Porter","Precious","Presley","Preston","Price","Prince","Princess","Priscilla","Providenci","Prudence","Queen","Queenie","Quentin","Quincy","Quinn","Quinten","Quinton","Rachael","Rachel","Rachelle","Rae","Raegan","Rafael","Rafaela","Raheem","Rahsaan","Rahul","Raina","Raleigh","Ralph","Ramiro","Ramon","Ramona","Randal","Randall","Randi","Randy","Ransom","Raoul","Raphael","Raphaelle","Raquel","Rashad","Rashawn","Rasheed","Raul","Raven","Ray","Raymond","Raymundo","Reagan","Reanna","Reba","Rebeca","Rebecca","Rebeka","Rebekah","Reece","Reed","Reese","Regan","Reggie","Reginald","Reid","Reilly","Reina","Reinhold","Remington","Rene","Renee","Ressie","Reta","Retha","Retta","Reuben","Reva","Rex","Rey","Reyes","Reymundo","Reyna","Reynold","Rhea","Rhett","Rhianna","Rhiannon","Rhoda","Ricardo","Richard","Richie","Richmond","Rick","Rickey","Rickie","Ricky","Rico","Rigoberto","Riley","Rita","River","Robb","Robbie","Robert","Roberta","Roberto","Robin","Robyn","Rocio","Rocky","Rod","Roderick","Rodger","Rodolfo","Rodrick","Rodrigo","Roel","Rogelio","Roger","Rogers","Rolando","Rollin","Roma","Romaine","Roman","Ron","Ronaldo","Ronny","Roosevelt","Rory","Rosa","Rosalee","Rosalia","Rosalind","Rosalinda","Rosalyn","Rosamond","Rosanna","Rosario","Roscoe","Rose","Rosella","Roselyn","Rosemarie","Rosemary","Rosendo","Rosetta","Rosie","Rosina","Roslyn","Ross","Rossie","Rowan","Rowena","Rowland","Roxane","Roxanne","Roy","Royal","Royce","Rozella","Ruben","Rubie","Ruby","Rubye","Rudolph","Rudy","Rupert","Russ","Russel","Russell","Rusty","Ruth","Ruthe","Ruthie","Ryan","Ryann","Ryder","Rylan","Rylee","Ryleigh","Ryley","Sabina","Sabrina","Sabryna","Sadie","Sadye","Sage","Saige","Sallie","Sally","Salma","Salvador","Salvatore","Sam","Samanta","Samantha","Samara","Samir","Sammie","Sammy","Samson","Sandra","Sandrine","Sandy","Sanford","Santa","Santiago","Santina","Santino","Santos","Sarah","Sarai","Sarina","Sasha","Saul","Savanah","Savanna","Savannah","Savion","Scarlett","Schuyler","Scot","Scottie","Scotty","Seamus","Sean","Sebastian","Sedrick","Selena","Selina","Selmer","Serena","Serenity","Seth","Shad","Shaina","Shakira","Shana","Shane","Shanel","Shanelle","Shania","Shanie","Shaniya","Shanna","Shannon","Shanny","Shanon","Shany","Sharon","Shaun","Shawn","Shawna","Shaylee","Shayna","Shayne","Shea","Sheila","Sheldon","Shemar","Sheridan","Sherman","Sherwood","Shirley","Shyann","Shyanne","Sibyl","Sid","Sidney","Sienna","Sierra","Sigmund","Sigrid","Sigurd","Silas","Sim","Simeon","Simone","Sincere","Sister","Skye","Skyla","Skylar","Sofia","Soledad","Solon","Sonia","Sonny","Sonya","Sophia","Sophie","Spencer","Stacey","Stacy","Stan","Stanford","Stanley","Stanton","Stefan","Stefanie","Stella","Stephan","Stephania","Stephanie","Stephany","Stephen","Stephon","Sterling","Steve","Stevie","Stewart","Stone","Stuart","Summer","Sunny","Susan","Susana","Susanna","Susie","Suzanne","Sven","Syble","Sydnee","Sydney","Sydni","Sydnie","Sylvan","Sylvester","Sylvia","Tabitha","Tad","Talia","Talon","Tamara","Tamia","Tania","Tanner","Tanya","Tara","Taryn","Tate","Tatum","Tatyana","Taurean","Tavares","Taya","Taylor","Teagan","Ted","Telly","Terence","Teresa","Terrance","Terrell","Terrence","Terrill","Terry","Tess","Tessie","Tevin","Thad","Thaddeus","Thalia","Thea","Thelma","Theo","Theodora","Theodore","Theresa","Therese","Theresia","Theron","Thomas","Thora","Thurman","Tia","Tiana","Tianna","Tiara","Tierra","Tiffany","Tillman","Timmothy","Timmy","Timothy","Tina","Tito","Titus","Tobin","Toby","Tod","Tom","Tomas","Tomasa","Tommie","Toney","Toni","Tony","Torey","Torrance","Torrey","Toy","Trace","Tracey","Tracy","Travis","Travon","Tre","Tremaine","Tremayne","Trent","Trenton","Tressa","Tressie","Treva","Trever","Trevion","Trevor","Trey","Trinity","Trisha","Tristian","Tristin","Triston","Troy","Trudie","Trycia","Trystan","Turner","Twila","Tyler","Tyra","Tyree","Tyreek","Tyrel","Tyrell","Tyrese","Tyrique","Tyshawn","Tyson","Ubaldo","Ulices","Ulises","Una","Unique","Urban","Uriah","Uriel","Ursula","Vada","Valentin","Valentina","Valentine","Valerie","Vallie","Van","Vance","Vanessa","Vaughn","Veda","Velda","Vella","Velma","Velva","Vena","Verda","Verdie","Vergie","Verla","Verlie","Vern","Verna","Verner","Vernice","Vernie","Vernon","Verona","Veronica","Vesta","Vicenta","Vicente","Vickie","Vicky","Victor","Victoria","Vida","Vidal","Vilma","Vince","Vincent","Vincenza","Vincenzo","Vinnie","Viola","Violet","Violette","Virgie","Virgil","Virginia","Virginie","Vita","Vito","Viva","Vivian","Viviane","Vivianne","Vivien","Vivienne","Vladimir","Wade","Waino","Waldo","Walker","Wallace","Walter","Walton","Wanda","Ward","Warren","Watson","Wava","Waylon","Wayne","Webster","Weldon","Wellington","Wendell","Wendy","Werner","Westley","Weston","Whitney","Wilber","Wilbert","Wilburn","Wiley","Wilford","Wilfred","Wilfredo","Wilfrid","Wilhelm","Wilhelmine","Will","Willa","Willard","William","Willie","Willis","Willow","Willy","Wilma","Wilmer","Wilson","Wilton","Winfield","Winifred","Winnifred","Winona","Winston","Woodrow","Wyatt","Wyman","Xander","Xavier","Xzavier","Yadira","Yasmeen","Yasmin","Yasmine","Yazmin","Yesenia","Yessenia","Yolanda","Yoshiko","Yvette","Yvonne","Zachariah","Zachary","Zachery","Zack","Zackary","Zackery","Zakary","Zander","Zane","Zaria","Zechariah","Zelda","Zella","Zelma","Zena","Zetta","Zion","Zita","Zoe","Zoey","Zoie","Zoila","Zola","Zora","Zula"],WVu=["Agender","Androgyne","Androgynous","Bigender","Cis female","Cis male","Cis man","Cis woman","Cis","Cisgender female","Cisgender male","Cisgender man","Cisgender woman","Cisgender","Demi-boy","Demi-girl","Demi-man","Demi-woman","Demiflux","Demigender","F2M","FTM","Female to male trans man","Female to male transgender man","Female to male transsexual man","Female to male","Gender fluid","Gender neutral","Gender nonconforming","Gender questioning","Gender variant","Genderflux","Genderqueer","Hermaphrodite","Intersex man","Intersex person","Intersex woman","Intersex","M2F","MTF","Male to female trans woman","Male to female transgender woman","Male to female transsexual woman","Male to female","Man","Multigender","Neither","Neutrois","Non-binary","Omnigender","Other","Pangender","Polygender","T* man","T* woman","Trans female","Trans male","Trans man","Trans person","Trans woman","Trans","Transexual female","Transexual male","Transexual man","Transexual person","Transexual woman","Transexual","Transgender female","Transgender person","Transmasculine","Trigender","Two* person","Two-spirit person","Two-spirit","Woman","Xenogender"],GVu=["Abbott","Abernathy","Abshire","Adams","Altenwerth","Anderson","Ankunding","Armstrong","Auer","Aufderhar","Bahringer","Bailey","Balistreri","Barrows","Bartell","Bartoletti","Barton","Bashirian","Batz","Bauch","Baumbach","Bayer","Beahan","Beatty","Bechtelar","Becker","Bednar","Beer","Beier","Berge","Bergnaum","Bergstrom","Bernhard","Bernier","Bins","Blanda","Blick","Block","Bode","Boehm","Bogan","Bogisich","Borer","Bosco","Botsford","Boyer","Boyle","Bradtke","Brakus","Braun","Breitenberg","Brekke","Brown","Bruen","Buckridge","Carroll","Carter","Cartwright","Casper","Cassin","Champlin","Christiansen","Cole","Collier","Collins","Conn","Connelly","Conroy","Considine","Corkery","Cormier","Corwin","Cremin","Crist","Crona","Cronin","Crooks","Cruickshank","Cummerata","Cummings","Dach","D'Amore","Daniel","Dare","Daugherty","Davis","Deckow","Denesik","Dibbert","Dickens","Dicki","Dickinson","Dietrich","Donnelly","Dooley","Douglas","Doyle","DuBuque","Durgan","Ebert","Effertz","Emard","Emmerich","Erdman","Ernser","Fadel","Fahey","Farrell","Fay","Feeney","Feest","Feil","Ferry","Fisher","Flatley","Frami","Franecki","Franey","Friesen","Fritsch","Funk","Gerhold","Gerlach","Gibson","Gislason","Gleason","Gleichner","Glover","Goldner","Goodwin","Gorczany","Gottlieb","Goyette","Grady","Graham","Grant","Green","Greenfelder","Greenholt","Grimes","Gulgowski","Gusikowski","Gutkowski","Gutmann","Haag","Hackett","Hagenes","Hahn","Haley","Halvorson","Hamill","Hammes","Hand","Hane","Hansen","Harber","Harris","Hartmann","Harvey","Hauck","Hayes","Heaney","Heathcote","Hegmann","Heidenreich","Heller","Herman","Hermann","Hermiston","Herzog","Hessel","Hettinger","Hickle","Hilll","Hills","Hilpert","Hintz","Hirthe","Hodkiewicz","Hoeger","Homenick","Hoppe","Howe","Howell","Hudson","Huel","Huels","Hyatt","Jacobi","Jacobs","Jacobson","Jakubowski","Jaskolski","Jast","Jenkins","Jerde","Johns","Johnson","Johnston","Jones","Kassulke","Kautzer","Keebler","Keeling","Kemmer","Kerluke","Kertzmann","Kessler","Kiehn","Kihn","Kilback","King","Kirlin","Klein","Kling","Klocko","Koch","Koelpin","Koepp","Kohler","Konopelski","Koss","Kovacek","Kozey","Krajcik","Kreiger","Kris","Kshlerin","Kub","Kuhic","Kuhlman","Kuhn","Kulas","Kunde","Kunze","Kuphal","Kutch","Kuvalis","Labadie","Lakin","Lang","Langosh","Langworth","Larkin","Larson","Leannon","Lebsack","Ledner","Leffler","Legros","Lehner","Lemke","Lesch","Leuschke","Lind","Lindgren","Littel","Little","Lockman","Lowe","Lubowitz","Lueilwitz","Luettgen","Lynch","Macejkovic","MacGyver","Maggio","Mann","Mante","Marks","Marquardt","Marvin","Mayer","Mayert","McClure","McCullough","McDermott","McGlynn","McKenzie","McLaughlin","Medhurst","Mertz","Metz","Miller","Mills","Mitchell","Moen","Mohr","Monahan","Moore","Morar","Morissette","Mosciski","Mraz","Mueller","Muller","Murazik","Murphy","Murray","Nader","Nicolas","Nienow","Nikolaus","Nitzsche","Nolan","Oberbrunner","O'Connell","O'Conner","O'Hara","O'Keefe","O'Kon","Okuneva","Olson","Ondricka","O'Reilly","Orn","Ortiz","Osinski","Pacocha","Padberg","Pagac","Parisian","Parker","Paucek","Pfannerstill","Pfeffer","Pollich","Pouros","Powlowski","Predovic","Price","Prohaska","Prosacco","Purdy","Quigley","Quitzon","Rath","Ratke","Rau","Raynor","Reichel","Reichert","Reilly","Reinger","Rempel","Renner","Reynolds","Rice","Rippin","Ritchie","Robel","Roberts","Rodriguez","Rogahn","Rohan","Rolfson","Romaguera","Roob","Rosenbaum","Rowe","Ruecker","Runolfsdottir","Runolfsson","Runte","Russel","Rutherford","Ryan","Sanford","Satterfield","Sauer","Sawayn","Schaden","Schaefer","Schamberger","Schiller","Schimmel","Schinner","Schmeler","Schmidt","Schmitt","Schneider","Schoen","Schowalter","Schroeder","Schulist","Schultz","Schumm","Schuppe","Schuster","Senger","Shanahan","Shields","Simonis","Sipes","Skiles","Smith","Smitham","Spencer","Spinka","Sporer","Stamm","Stanton","Stark","Stehr","Steuber","Stiedemann","Stokes","Stoltenberg","Stracke","Streich","Stroman","Strosin","Swaniawski","Swift","Terry","Thiel","Thompson","Tillman","Torp","Torphy","Towne","Toy","Trantow","Tremblay","Treutel","Tromp","Turcotte","Turner","Ullrich","Upton","Vandervort","Veum","Volkman","Von","VonRueden","Waelchi","Walker","Walsh","Walter","Ward","Waters","Watsica","Weber","Wehner","Weimann","Weissnat","Welch","West","White","Wiegand","Wilderman","Wilkinson","Will","Williamson","Willms","Windler","Wintheiser","Wisoky","Wisozk","Witting","Wiza","Wolf","Wolff","Wuckert","Wunsch","Wyman","Yost","Yundt","Zboncak","Zemlak","Ziemann","Zieme","Zulauf"],UVu=[{value:"{{person.last_name}}",weight:95},{value:"{{person.last_name}}-{{person.last_name}}",weight:5}],qVu=["James","John","Robert","Michael","William","David","Richard","Charles","Joseph","Thomas","Christopher","Daniel","Paul","Mark","Donald","George","Kenneth","Steven","Edward","Brian","Ronald","Anthony","Kevin","Jason","Matthew","Gary","Timothy","Jose","Larry","Jeffrey","Frank","Scott","Eric","Stephen","Andrew","Raymond","Gregory","Joshua","Jerry","Dennis","Walter","Patrick","Peter","Harold","Douglas","Henry","Carl","Arthur","Ryan","Roger","Joe","Juan","Jack","Albert","Jonathan","Justin","Terry","Gerald","Keith","Samuel","Willie","Ralph","Lawrence","Nicholas","Roy","Benjamin","Bruce","Brandon","Adam","Harry","Fred","Wayne","Billy","Steve","Louis","Jeremy","Aaron","Randy","Howard","Eugene","Carlos","Russell","Bobby","Victor","Martin","Ernest","Phillip","Todd","Jesse","Craig","Alan","Shawn","Clarence","Sean","Philip","Chris","Johnny","Earl","Jimmy","Antonio","Danny","Bryan","Tony","Luis","Mike","Stanley","Leonard","Nathan","Dale","Manuel","Rodney","Curtis","Norman","Allen","Marvin","Vincent","Glenn","Jeffery","Travis","Jeff","Chad","Jacob","Lee","Melvin","Alfred","Kyle","Francis","Bradley","Jesus","Herbert","Frederick","Ray","Joel","Edwin","Don","Eddie","Ricky","Troy","Randall","Barry","Alexander","Bernard","Mario","Leroy","Francisco","Marcus","Micheal","Theodore","Clifford","Miguel","Oscar","Jay","Jim","Tom","Calvin","Alex","Jon","Ronnie","Bill","Lloyd","Tommy","Leon","Derek","Warren","Darrell","Jerome","Floyd","Leo","Alvin","Tim","Wesley","Gordon","Dean","Greg","Jorge","Dustin","Pedro","Derrick","Dan","Lewis","Zachary","Corey","Herman","Maurice","Vernon","Roberto","Clyde","Glen","Hector","Shane","Ricardo","Sam","Rick","Lester","Brent","Ramon","Charlie","Tyler","Gilbert","Gene","Marc","Reginald","Ruben","Brett","Angel","Nathaniel","Rafael","Leslie","Edgar","Milton","Raul","Ben","Chester","Cecil","Duane","Franklin","Andre","Elmer","Brad","Gabriel","Ron","Mitchell","Roland","Arnold","Harvey","Jared","Adrian","Karl","Cory","Claude","Erik","Darryl","Jamie","Neil","Jessie","Christian","Javier","Fernando","Clinton","Ted","Mathew","Tyrone","Darren","Lonnie","Lance","Cody","Julio","Kelly","Kurt","Allan","Nelson","Guy","Clayton","Hugh","Max","Dwayne","Dwight","Armando","Felix","Jimmie","Everett","Jordan","Ian","Wallace","Ken","Bob","Jaime","Casey","Alfredo","Alberto","Dave","Ivan","Johnnie","Sidney","Byron","Julian","Isaac","Morris","Clifton","Willard","Daryl","Ross","Virgil","Andy","Marshall","Salvador","Perry","Kirk","Sergio","Marion","Tracy","Seth","Kent","Terrance","Rene","Eduardo","Terrence","Enrique","Freddie","Wade","Austin","Stuart","Fredrick","Arturo","Alejandro","Jackie","Joey","Nick","Luther","Wendell","Jeremiah","Evan","Julius","Dana","Donnie","Otis","Shannon","Trevor","Oliver","Luke","Homer","Gerard","Doug","Kenny","Hubert","Angelo","Shaun","Lyle","Matt","Lynn","Alfonso","Orlando","Rex","Carlton","Ernesto","Cameron","Neal","Pablo","Lorenzo","Omar","Wilbur","Blake","Grant","Horace","Roderick","Kerry","Abraham","Willis","Rickey","Jean","Ira","Andres","Cesar","Johnathan","Malcolm","Rudolph","Damon","Kelvin","Rudy","Preston","Alton","Archie","Marco","Wm","Pete","Randolph","Garry","Geoffrey","Jonathon","Felipe","Bennie","Gerardo","Ed","Dominic","Robin","Loren","Delbert","Colin","Guillermo","Earnest","Lucas","Benny","Noel","Spencer","Rodolfo","Myron","Edmund","Garrett","Salvatore","Cedric","Lowell","Gregg","Sherman","Wilson","Devin","Sylvester","Kim","Roosevelt","Israel","Jermaine","Forrest","Wilbert","Leland","Simon","Guadalupe","Clark","Irving","Carroll","Bryant","Owen","Rufus","Woodrow","Sammy","Kristopher","Mack","Levi","Marcos","Gustavo","Jake","Lionel","Marty","Taylor","Ellis","Dallas","Gilberto","Clint","Nicolas","Laurence","Ismael","Orville","Drew","Jody","Ervin","Dewey","Al","Wilfred","Josh","Hugo","Ignacio","Caleb","Tomas","Sheldon","Erick","Frankie","Stewart","Doyle","Darrel","Rogelio","Terence","Santiago","Alonzo","Elias","Bert","Elbert","Ramiro","Conrad","Pat","Noah","Grady","Phil","Cornelius","Lamar","Rolando","Clay","Percy","Dexter","Bradford","Merle","Darin","Amos","Terrell","Moses","Irvin","Saul","Roman","Darnell","Randal","Tommie","Timmy","Darrin","Winston","Brendan","Toby","Van","Abel","Dominick","Boyd","Courtney","Jan","Emilio","Elijah","Cary","Domingo","Santos","Aubrey","Emmett","Marlon","Emanuel","Jerald","Edmond"],JVu=["Ace","Aiden","Alexander","Ander","Anthony","Asher","August","Aziel","Bear","Beckham","Benjamin","Buddy","Calvin","Carter","Charles","Christopher","Clyde","Cooper","Daniel","David","Dior","Dylan","Elijah","Ellis","Emerson","Ethan","Ezra","Fletcher","Flynn","Gabriel","Grayson","Gus","Hank","Harrison","Hendrix","Henry","Houston","Hudson","Hugh","Isaac","Jack","Jackson","Jacob","Jakobe","James","Jaxon","Jaxtyn","Jayden","John","Joseph","Josiah","Jude","Julian","Karsyn","Kenji","Kobe","Kylo","Lennon","Leo","Levi","Liam","Lincoln","Logan","Louis","Lucas","Lucky","Luke","Mason","Mateo","Matthew","Maverick","Michael","Monroe","Nixon","Ocean","Oliver","Otis","Otto","Owen","Ozzy","Parker","Rocky","Samuel","Sebastian","Sonny","Teddy","Theo","Theodore","Thomas","Truett","Walter","Warren","Watson","William","Wison","Wyatt","Ziggy","Zyair"],SOe=["Mr.","Dr."],ZVu=["Addison","Alex","Anderson","Angel","Arden","August","Austin","Avery","Bailey","Billie","Blake","Bowie","Brooklyn","Cameron","Charlie","Corey","Dakota","Drew","Elliott","Ellis","Emerson","Finley","Gray","Greer","Harper","Hayden","Jaden","James","Jamie","Jordan","Jules","Kai","Kendall","Kennedy","Kyle","Leslie","Logan","London","Marlowe","Micah","Nico","Noah","North","Parker","Phoenix","Quinn","Reagan","Reese","Reign","Riley","River","Robin","Rory","Rowan","Ryan","Sage","Sasha","Sawyer","Shawn","Shiloh","Skyler","Taylor"],YVu=[{value:"{{person.firstName}} {{person.lastName}}",weight:49},{value:"{{person.prefix}} {{person.firstName}} {{person.lastName}}",weight:7},{value:"{{person.firstName}} {{person.lastName}} {{person.suffix}}",weight:7},{value:"{{person.prefix}} {{person.firstName}} {{person.lastName}} {{person.suffix}}",weight:1}];function Dt(...u){return Array.from(new Set(u.flat())).sort()}var QVu=Dt(_Oe,SOe),XVu=["female","male"],e$u=["Jr.","Sr.","I","II","III","IV","V","MD","DDS","PhD","DVM"],t$u={descriptor:["Lead","Senior","Direct","Corporate","Dynamic","Future","Product","National","Regional","District","Central","Global","Customer","Investor","International","Legacy","Forward","Internal","Human","Chief","Principal"],level:["Solutions","Program","Brand","Security","Research","Marketing","Directives","Implementation","Integration","Functionality","Response","Paradigm","Tactics","Identity","Markets","Group","Division","Applications","Optimization","Operations","Infrastructure","Intranet","Communications","Web","Branding","Quality","Assurance","Mobility","Accounts","Data","Creative","Configuration","Accountability","Interactions","Factors","Usability","Metrics"],job:["Supervisor","Associate","Executive","Liaison","Officer","Manager","Engineer","Specialist","Director","Coordinator","Administrator","Architect","Analyst","Designer","Planner","Orchestrator","Technician","Developer","Producer","Consultant","Assistant","Facilitator","Agent","Representative","Strategist"]},u$u=["Aquarius","Pisces","Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn"],n$u={bio_part:OVu,bio_pattern:jVu,bio_supporter:HVu,female_first_name:VVu,female_middle_name:$Vu,female_prefix:_Oe,first_name:KVu,gender:WVu,last_name:GVu,last_name_pattern:UVu,male_first_name:qVu,male_middle_name:JVu,male_prefix:SOe,middle_name:ZVu,name:YVu,prefix:QVu,sex:XVu,suffix:e$u,title:t$u,western_zodiac_sign:u$u},i$u=n$u,r$u=["!##-!##-####","(!##) !##-####","1-!##-!##-####","!##.!##.####","!##-!##-#### x###","(!##) !##-#### x###","1-!##-!##-#### x###","!##.!##.#### x###","!##-!##-#### x####","(!##) !##-#### x####","1-!##-!##-#### x####","!##.!##.#### x####","!##-!##-#### x#####","(!##) !##-#### x#####","1-!##-!##-#### x#####","!##.!##.#### x#####"],a$u={formats:r$u},o$u=a$u,s$u=Object.freeze([{symbol:"H",name:"Hydrogen",atomicNumber:1},{symbol:"He",name:"Helium",atomicNumber:2},{symbol:"Li",name:"Lithium",atomicNumber:3},{symbol:"Be",name:"Beryllium",atomicNumber:4},{symbol:"B",name:"Boron",atomicNumber:5},{symbol:"C",name:"Carbon",atomicNumber:6},{symbol:"N",name:"Nitrogen",atomicNumber:7},{symbol:"O",name:"Oxygen",atomicNumber:8},{symbol:"F",name:"Fluorine",atomicNumber:9},{symbol:"Ne",name:"Neon",atomicNumber:10},{symbol:"Na",name:"Sodium",atomicNumber:11},{symbol:"Mg",name:"Magnesium",atomicNumber:12},{symbol:"Al",name:"Aluminium",atomicNumber:13},{symbol:"Si",name:"Silicon",atomicNumber:14},{symbol:"P",name:"Phosphorus",atomicNumber:15},{symbol:"S",name:"Sulfur",atomicNumber:16},{symbol:"Cl",name:"Chlorine",atomicNumber:17},{symbol:"Ar",name:"Argon",atomicNumber:18},{symbol:"K",name:"Potassium",atomicNumber:19},{symbol:"Ca",name:"Calcium",atomicNumber:20},{symbol:"Sc",name:"Scandium",atomicNumber:21},{symbol:"Ti",name:"Titanium",atomicNumber:22},{symbol:"V",name:"Vanadium",atomicNumber:23},{symbol:"Cr",name:"Chromium",atomicNumber:24},{symbol:"Mn",name:"Manganese",atomicNumber:25},{symbol:"Fe",name:"Iron",atomicNumber:26},{symbol:"Co",name:"Cobalt",atomicNumber:27},{symbol:"Ni",name:"Nickel",atomicNumber:28},{symbol:"Cu",name:"Copper",atomicNumber:29},{symbol:"Zn",name:"Zinc",atomicNumber:30},{symbol:"Ga",name:"Gallium",atomicNumber:31},{symbol:"Ge",name:"Germanium",atomicNumber:32},{symbol:"As",name:"Arsenic",atomicNumber:33},{symbol:"Se",name:"Selenium",atomicNumber:34},{symbol:"Br",name:"Bromine",atomicNumber:35},{symbol:"Kr",name:"Krypton",atomicNumber:36},{symbol:"Rb",name:"Rubidium",atomicNumber:37},{symbol:"Sr",name:"Strontium",atomicNumber:38},{symbol:"Y",name:"Yttrium",atomicNumber:39},{symbol:"Zr",name:"Zirconium",atomicNumber:40},{symbol:"Nb",name:"Niobium",atomicNumber:41},{symbol:"Mo",name:"Molybdenum",atomicNumber:42},{symbol:"Tc",name:"Technetium",atomicNumber:43},{symbol:"Ru",name:"Ruthenium",atomicNumber:44},{symbol:"Rh",name:"Rhodium",atomicNumber:45},{symbol:"Pd",name:"Palladium",atomicNumber:46},{symbol:"Ag",name:"Silver",atomicNumber:47},{symbol:"Cd",name:"Cadmium",atomicNumber:48},{symbol:"In",name:"Indium",atomicNumber:49},{symbol:"Sn",name:"Tin",atomicNumber:50},{symbol:"Sb",name:"Antimony",atomicNumber:51},{symbol:"Te",name:"Tellurium",atomicNumber:52},{symbol:"I",name:"Iodine",atomicNumber:53},{symbol:"Xe",name:"Xenon",atomicNumber:54},{symbol:"Cs",name:"Caesium",atomicNumber:55},{symbol:"Ba",name:"Barium",atomicNumber:56},{symbol:"La",name:"Lanthanum",atomicNumber:57},{symbol:"Ce",name:"Cerium",atomicNumber:58},{symbol:"Pr",name:"Praseodymium",atomicNumber:59},{symbol:"Nd",name:"Neodymium",atomicNumber:60},{symbol:"Pm",name:"Promethium",atomicNumber:61},{symbol:"Sm",name:"Samarium",atomicNumber:62},{symbol:"Eu",name:"Europium",atomicNumber:63},{symbol:"Gd",name:"Gadolinium",atomicNumber:64},{symbol:"Tb",name:"Terbium",atomicNumber:65},{symbol:"Dy",name:"Dysprosium",atomicNumber:66},{symbol:"Ho",name:"Holmium",atomicNumber:67},{symbol:"Er",name:"Erbium",atomicNumber:68},{symbol:"Tm",name:"Thulium",atomicNumber:69},{symbol:"Yb",name:"Ytterbium",atomicNumber:70},{symbol:"Lu",name:"Lutetium",atomicNumber:71},{symbol:"Hf",name:"Hafnium",atomicNumber:72},{symbol:"Ta",name:"Tantalum",atomicNumber:73},{symbol:"W",name:"Tungsten",atomicNumber:74},{symbol:"Re",name:"Rhenium",atomicNumber:75},{symbol:"Os",name:"Osmium",atomicNumber:76},{symbol:"Ir",name:"Iridium",atomicNumber:77},{symbol:"Pt",name:"Platinum",atomicNumber:78},{symbol:"Au",name:"Gold",atomicNumber:79},{symbol:"Hg",name:"Mercury",atomicNumber:80},{symbol:"Tl",name:"Thallium",atomicNumber:81},{symbol:"Pb",name:"Lead",atomicNumber:82},{symbol:"Bi",name:"Bismuth",atomicNumber:83},{symbol:"Po",name:"Polonium",atomicNumber:84},{symbol:"At",name:"Astatine",atomicNumber:85},{symbol:"Rn",name:"Radon",atomicNumber:86},{symbol:"Fr",name:"Francium",atomicNumber:87},{symbol:"Ra",name:"Radium",atomicNumber:88},{symbol:"Ac",name:"Actinium",atomicNumber:89},{symbol:"Th",name:"Thorium",atomicNumber:90},{symbol:"Pa",name:"Protactinium",atomicNumber:91},{symbol:"U",name:"Uranium",atomicNumber:92},{symbol:"Np",name:"Neptunium",atomicNumber:93},{symbol:"Pu",name:"Plutonium",atomicNumber:94},{symbol:"Am",name:"Americium",atomicNumber:95},{symbol:"Cm",name:"Curium",atomicNumber:96},{symbol:"Bk",name:"Berkelium",atomicNumber:97},{symbol:"Cf",name:"Californium",atomicNumber:98},{symbol:"Es",name:"Einsteinium",atomicNumber:99},{symbol:"Fm",name:"Fermium",atomicNumber:100},{symbol:"Md",name:"Mendelevium",atomicNumber:101},{symbol:"No",name:"Nobelium",atomicNumber:102},{symbol:"Lr",name:"Lawrencium",atomicNumber:103},{symbol:"Rf",name:"Rutherfordium",atomicNumber:104},{symbol:"Db",name:"Dubnium",atomicNumber:105},{symbol:"Sg",name:"Seaborgium",atomicNumber:106},{symbol:"Bh",name:"Bohrium",atomicNumber:107},{symbol:"Hs",name:"Hassium",atomicNumber:108},{symbol:"Mt",name:"Meitnerium",atomicNumber:109},{symbol:"Ds",name:"Darmstadtium",atomicNumber:110},{symbol:"Rg",name:"Roentgenium",atomicNumber:111},{symbol:"Cn",name:"Copernicium",atomicNumber:112},{symbol:"Nh",name:"Nihonium",atomicNumber:113},{symbol:"Fl",name:"Flerovium",atomicNumber:114},{symbol:"Mc",name:"Moscovium",atomicNumber:115},{symbol:"Lv",name:"Livermorium",atomicNumber:116},{symbol:"Ts",name:"Tennessine",atomicNumber:117},{symbol:"Og",name:"Oganesson",atomicNumber:118}]),l$u=Object.freeze([{name:"meter",symbol:"m"},{name:"second",symbol:"s"},{name:"mole",symbol:"mol"},{name:"ampere",symbol:"A"},{name:"kelvin",symbol:"K"},{name:"candela",symbol:"cd"},{name:"kilogram",symbol:"kg"},{name:"radian",symbol:"rad"},{name:"hertz",symbol:"Hz"},{name:"newton",symbol:"N"},{name:"pascal",symbol:"Pa"},{name:"joule",symbol:"J"},{name:"watt",symbol:"W"},{name:"coulomb",symbol:"C"},{name:"volt",symbol:"V"},{name:"ohm",symbol:"Ω"},{name:"tesla",symbol:"T"},{name:"degree Celsius",symbol:"°C"},{name:"lumen",symbol:"lm"},{name:"becquerel",symbol:"Bq"},{name:"gray",symbol:"Gy"},{name:"sievert",symbol:"Sv"},{name:"steradian",symbol:"sr"},{name:"farad",symbol:"F"},{name:"siemens",symbol:"S"},{name:"weber",symbol:"Wb"},{name:"henry",symbol:"H"},{name:"lux",symbol:"lx"},{name:"katal",symbol:"kat"}]),c$u={chemicalElement:s$u,unit:l$u},d$u=c$u,h$u=["ants","bats","bears","bees","birds","buffalo","cats","chickens","cattle","dogs","dolphins","ducks","elephants","fishes","foxes","frogs","geese","goats","horses","kangaroos","lions","monkeys","owls","oxen","penguins","people","pigs","rabbits","sheep","tigers","whales","wolves","zebras","banshees","crows","black cats","chimeras","ghosts","conspirators","dragons","dwarves","elves","enchanters","exorcists","sons","foes","giants","gnomes","goblins","gooses","griffins","lycanthropes","nemesis","ogres","oracles","prophets","sorcerors","spiders","spirits","vampires","warlocks","vixens","werewolves","witches","worshipers","zombies","druids"],E$u=["{{location.state}} {{team.creature}}"],m$u={creature:h$u,name:E$u},g$u=m$u,f$u=["Adventure Road Bicycle","BMX Bicycle","City Bicycle","Cruiser Bicycle","Cyclocross Bicycle","Dual-Sport Bicycle","Fitness Bicycle","Flat-Foot Comfort Bicycle","Folding Bicycle","Hybrid Bicycle","Mountain Bicycle","Recumbent Bicycle","Road Bicycle","Tandem Bicycle","Touring Bicycle","Track/Fixed-Gear Bicycle","Triathlon/Time Trial Bicycle","Tricycle"],p$u=["Diesel","Electric","Gasoline","Hybrid"],D$u=["Aston Martin","Audi","Bentley","BMW","Bugatti","Cadillac","Chevrolet","Chrysler","Dodge","Ferrari","Fiat","Ford","Honda","Hyundai","Jaguar","Jeep","Kia","Lamborghini","Land Rover","Maserati","Mazda","Mercedes Benz","Mini","Nissan","Polestar","Porsche","Rolls Royce","Smart","Tesla","Toyota","Volkswagen","Volvo"],x$u=["Fiesta","Focus","Taurus","Mustang","Explorer","Expedition","F-150","Model T","Ranchero","Volt","Cruze","Malibu","Impala","Camaro","Corvette","Colorado","Silverado","El Camino","CTS","XTS","ATS","Escalade","Alpine","Charger","LeBaron","PT Cruiser","Challenger","Durango","Grand Caravan","Wrangler","Grand Cherokee","Roadster","Model S","Model 3","Model X","Model Y","Camry","Prius","Land Cruiser","Accord","Civic","Element","Sentra","Altima","A8","A4","Beetle","Jetta","Golf","911","Spyder","Countach","Mercielago","Aventador","1","2","Fortwo","V90","XC90","CX-9"],v$u=["Cargo Van","Convertible","Coupe","Crew Cab Pickup","Extended Cab Pickup","Hatchback","Minivan","Passenger Van","SUV","Sedan","Wagon"],C$u={bicycle_type:f$u,fuel:p$u,manufacturer:D$u,model:x$u,type:v$u},b$u=C$u,k$u=["abandoned","able","absolute","adorable","adventurous","academic","acceptable","acclaimed","accomplished","accurate","aching","acidic","acrobatic","active","actual","adept","admirable","admired","adolescent","adored","advanced","afraid","affectionate","aged","aggravating","aggressive","agile","agitated","agonizing","agreeable","ajar","alarmed","alarming","alert","alienated","alive","all","altruistic","amazing","ambitious","ample","amused","amusing","anchored","ancient","angelic","angry","anguished","animated","annual","another","antique","anxious","any","apprehensive","appropriate","apt","arctic","arid","aromatic","artistic","ashamed","assured","astonishing","athletic","attached","attentive","attractive","austere","authentic","authorized","automatic","avaricious","average","aware","awesome","awful","awkward","babyish","bad","back","baggy","bare","barren","basic","beautiful","belated","beloved","beneficial","better","best","bewitched","big","big-hearted","biodegradable","bite-sized","bitter","black","black-and-white","bland","blank","blaring","bleak","blind","blissful","blond","blue","blushing","bogus","boiling","bold","bony","boring","bossy","both","bouncy","bountiful","bowed","brave","breakable","brief","bright","brilliant","brisk","broken","bronze","brown","bruised","bubbly","bulky","bumpy","buoyant","burdensome","burly","bustling","busy","buttery","buzzing","calculating","calm","candid","canine","capital","carefree","careful","careless","caring","cautious","cavernous","celebrated","charming","cheap","cheerful","cheery","chief","chilly","chubby","circular","classic","clean","clear","clear-cut","clever","close","closed","cloudy","clueless","clumsy","cluttered","coarse","cold","colorful","colorless","colossal","comfortable","common","compassionate","competent","complete","complex","complicated","composed","concerned","concrete","confused","conscious","considerate","constant","content","conventional","cooked","cool","cooperative","coordinated","corny","corrupt","costly","courageous","courteous","crafty","crazy","creamy","creative","creepy","criminal","crisp","critical","crooked","crowded","cruel","crushing","cuddly","cultivated","cultured","cumbersome","curly","curvy","cute","cylindrical","damaged","damp","dangerous","dapper","daring","darling","dark","dazzling","dead","deadly","deafening","dear","dearest","decent","decimal","decisive","deep","defenseless","defensive","defiant","deficient","definite","definitive","delayed","delectable","delicious","delightful","delirious","demanding","dense","dental","dependable","dependent","descriptive","deserted","detailed","determined","devoted","different","difficult","digital","diligent","dim","dimpled","direct","disastrous","discrete","disgusting","disloyal","dismal","distant","downright","dreary","dirty","disguised","dishonest","distinct","distorted","dizzy","doting","double","drab","drafty","dramatic","droopy","dry","dual","dull","dutiful","each","eager","earnest","early","easy","easy-going","ecstatic","edible","educated","elaborate","elastic","elated","elderly","electric","elegant","elementary","elliptical","embarrassed","embellished","eminent","emotional","empty","enchanted","enchanting","energetic","enlightened","enormous","enraged","entire","envious","equal","equatorial","essential","esteemed","ethical","euphoric","even","evergreen","everlasting","every","evil","exalted","excellent","exemplary","exhausted","excitable","excited","exciting","exotic","expensive","experienced","expert","extraneous","extroverted","extra-large","extra-small","fabulous","failing","faint","fair","faithful","fake","false","familiar","famous","fancy","fantastic","far","faraway","far-flung","far-off","fast","fat","fatal","fatherly","favorable","favorite","fearful","fearless","feisty","feline","female","feminine","few","fickle","filthy","fine","finished","firm","first","firsthand","fitting","fixed","flaky","flamboyant","flashy","flat","flawed","flawless","flickering","flimsy","flippant","flowery","fluffy","fluid","flustered","focused","fond","foolhardy","foolish","forceful","forked","formal","forsaken","forthright","fortunate","fragrant","frail","frank","frayed","free","french","fresh","frequent","friendly","frightened","frightening","frigid","frilly","frizzy","frivolous","front","frosty","frozen","frugal","fruitful","full","fumbling","functional","funny","fussy","fuzzy","gargantuan","gaseous","general","generous","gentle","genuine","giant","giddy","gigantic","gifted","giving","glamorous","glaring","glass","gleaming","gleeful","glistening","glittering","gloomy","glorious","glossy","glum","golden","good","good-natured","gorgeous","graceful","gracious","grand","grandiose","granular","grateful","grave","gray","great","greedy","green","gregarious","grim","grimy","gripping","grizzled","grotesque","grouchy","grounded","growing","growling","grown","grubby","gruesome","grumpy","guilty","gullible","gummy","hairy","half","handmade","handsome","handy","happy","happy-go-lucky","hard","hard-to-find","harmful","harmless","harmonious","harsh","hasty","hateful","haunting","healthy","heartfelt","hearty","heavenly","heavy","hefty","helpful","helpless","hidden","hideous","high","high-level","hilarious","hoarse","hollow","homely","honest","honorable","honored","hopeful","horrible","hospitable","hot","huge","humble","humiliating","humming","humongous","hungry","hurtful","husky","icky","icy","ideal","idealistic","identical","idle","idolized","ignorant","ill","ill-fated","ill-informed","illiterate","illustrious","imaginary","imaginative","immaculate","immaterial","immediate","immense","impassioned","impeccable","impartial","imperfect","imperturbable","impish","impolite","important","impossible","impractical","impressionable","impressive","improbable","impure","inborn","incomparable","incompatible","incomplete","inconsequential","incredible","indelible","inexperienced","indolent","infamous","infantile","infatuated","inferior","infinite","informal","innocent","insecure","insidious","insignificant","insistent","instructive","insubstantial","intelligent","intent","intentional","interesting","internal","international","intrepid","ironclad","irresponsible","irritating","itchy","jaded","jagged","jam-packed","jaunty","jealous","jittery","joint","jolly","jovial","joyful","joyous","jubilant","judicious","juicy","jumbo","junior","jumpy","juvenile","kaleidoscopic","keen","key","kind","kindhearted","kindly","klutzy","knobby","knotty","knowledgeable","knowing","known","kooky","kosher","lanky","large","last","lasting","late","lavish","lawful","lazy","leading","lean","leafy","left","legal","legitimate","light","lighthearted","likable","likely","limited","limp","limping","linear","lined","liquid","little","live","lively","livid","loathsome","lone","lonely","long","long-term","loose","lopsided","lost","loud","lovable","lovely","loving","low","loyal","lucky","lumbering","luminous","lumpy","lustrous","luxurious","mad","made-up","magnificent","majestic","major","male","mammoth","married","marvelous","masculine","massive","mature","meager","mealy","mean","measly","meaty","medical","mediocre","medium","meek","mellow","melodic","memorable","menacing","merry","messy","metallic","mild","milky","mindless","miniature","minor","minty","miserable","miserly","misguided","misty","mixed","modern","modest","moist","monstrous","monthly","monumental","moral","mortified","motherly","motionless","mountainous","muddy","muffled","multicolored","mundane","murky","mushy","musty","muted","mysterious","naive","narrow","natural","naughty","nautical","near","neat","necessary","needy","negative","neglected","negligible","neighboring","nervous","new","next","nice","nifty","nimble","nippy","nocturnal","noisy","nonstop","normal","notable","noted","noteworthy","novel","noxious","numb","nutritious","nutty","obedient","oblong","oily","obvious","occasional","odd","oddball","offbeat","offensive","official","old","old-fashioned","only","open","optimal","optimistic","opulent","orange","orderly","organic","ornate","ornery","ordinary","original","other","our","outlying","outgoing","outlandish","outrageous","outstanding","oval","overcooked","overdue","overjoyed","overlooked","palatable","pale","paltry","parallel","parched","partial","passionate","past","pastel","peaceful","peppery","perfect","perfumed","periodic","perky","personal","pertinent","pesky","pessimistic","petty","phony","physical","piercing","pink","pitiful","plain","plaintive","plastic","playful","pleasant","pleased","pleasing","plump","plush","polished","polite","political","pointed","pointless","poised","poor","popular","portly","posh","positive","possible","potable","powerful","powerless","practical","precious","present","prestigious","pretty","previous","pricey","prickly","primary","prime","pristine","private","prize","probable","productive","profitable","profuse","proper","proud","prudent","punctual","pungent","puny","pure","purple","pushy","putrid","puzzled","puzzling","quaint","qualified","quarrelsome","quarterly","queasy","querulous","questionable","quick","quick-witted","quiet","quintessential","quirky","quixotic","quizzical","radiant","ragged","rapid","rare","rash","raw","recent","reckless","rectangular","ready","real","realistic","reasonable","red","reflecting","regal","regular","reliable","relieved","remarkable","remorseful","remote","repentant","required","respectful","responsible","repulsive","revolving","rewarding","rich","rigid","right","ringed","ripe","roasted","robust","rosy","rotating","rotten","rough","round","rowdy","royal","rubbery","rundown","ruddy","rude","runny","rural","rusty","sad","safe","salty","same","sandy","sane","sarcastic","sardonic","satisfied","scaly","scarce","scared","scary","scented","scholarly","scientific","scornful","scratchy","scrawny","second","secondary","second-hand","secret","self-assured","self-reliant","selfish","sentimental","separate","serene","serious","serpentine","several","severe","shabby","shadowy","shady","shallow","shameful","shameless","sharp","shimmering","shiny","shocked","shocking","shoddy","short","short-term","showy","shrill","shy","sick","silent","silky","silly","silver","similar","simple","simplistic","sinful","single","sizzling","skeletal","skinny","sleepy","slight","slim","slimy","slippery","slow","slushy","small","smart","smoggy","smooth","smug","snappy","snarling","sneaky","sniveling","snoopy","sociable","soft","soggy","solid","somber","some","spherical","sophisticated","sore","sorrowful","soulful","soupy","sour","spanish","sparkling","sparse","specific","spectacular","speedy","spicy","spiffy","spirited","spiteful","splendid","spotless","spotted","spry","square","squeaky","squiggly","stable","staid","stained","stale","standard","starchy","stark","starry","steep","sticky","stiff","stimulating","stingy","stormy","straight","strange","steel","strict","strident","striking","striped","strong","studious","stunning","stupendous","sturdy","stylish","subdued","submissive","substantial","subtle","suburban","sudden","sugary","sunny","super","superb","superficial","superior","supportive","sure-footed","surprised","suspicious","svelte","sweaty","sweet","sweltering","swift","sympathetic","tall","talkative","tame","tan","tangible","tart","tasty","tattered","taut","tedious","teeming","tempting","tender","tense","tepid","terrible","terrific","testy","thankful","that","these","thick","thin","third","thirsty","this","thorough","thorny","those","thoughtful","threadbare","thrifty","thunderous","tidy","tight","timely","tinted","tiny","tired","torn","total","tough","traumatic","treasured","tremendous","tragic","trained","triangular","tricky","trifling","trim","trivial","troubled","true","trusting","trustworthy","trusty","truthful","turbulent","twin","ugly","ultimate","unacceptable","unaware","uncomfortable","uncommon","unconscious","understated","unequaled","uneven","unfinished","unfit","unfolded","unfortunate","unhappy","unhealthy","uniform","unimportant","unique","united","unkempt","unknown","unlawful","unlined","unlucky","unnatural","unpleasant","unrealistic","unripe","unruly","unselfish","unsightly","unsteady","unsung","untidy","untimely","untried","untrue","unused","unusual","unwelcome","unwieldy","unwilling","unwitting","unwritten","upbeat","upright","upset","urban","usable","used","useful","useless","utilized","utter","vacant","vague","vain","valid","valuable","vapid","variable","vast","velvety","venerated","vengeful","verifiable","vibrant","vicious","victorious","vigilant","vigorous","villainous","violet","violent","virtual","virtuous","visible","vital","vivacious","vivid","voluminous","wan","warlike","warm","warmhearted","warped","wary","wasteful","watchful","waterlogged","watery","wavy","wealthy","weak","weary","webbed","wee","weekly","weepy","weighty","weird","welcome","well-documented","well-groomed","well-informed","well-lit","well-made","well-off","well-to-do","well-worn","wet","which","whimsical","whirlwind","whispered","white","whole","whopping","wicked","wide","wide-eyed","wiggly","wild","willing","wilted","winding","windy","winged","wiry","wise","witty","wobbly","woeful","wonderful","wooden","woozy","wordy","worldly","worn","worried","worrisome","worse","worst","worthless","worthwhile","worthy","wrathful","wretched","writhing","wrong","wry","yawning","yearly","yellow","yellowish","young","youthful","yummy","zany","zealous","zesty","zigzag"],F$u=["abnormally","absentmindedly","accidentally","acidly","actually","adventurously","afterwards","almost","always","angrily","annually","anxiously","arrogantly","awkwardly","badly","bashfully","beautifully","bitterly","bleakly","blindly","blissfully","boastfully","boldly","bravely","briefly","brightly","briskly","broadly","busily","calmly","carefully","carelessly","cautiously","certainly","cheerfully","clearly","cleverly","closely","coaxingly","colorfully","commonly","continually","coolly","correctly","courageously","crossly","cruelly","curiously","daily","daintily","dearly","deceivingly","deeply","defiantly","deliberately","delightfully","diligently","dimly","doubtfully","dreamily","easily","elegantly","energetically","enormously","enthusiastically","equally","especially","even","evenly","eventually","exactly","excitedly","extremely","fairly","faithfully","famously","far","fast","fatally","ferociously","fervently","fiercely","fondly","foolishly","fortunately","frankly","frantically","freely","frenetically","frightfully","fully","furiously","generally","generously","gently","gladly","gleefully","gracefully","gratefully","greatly","greedily","happily","hastily","healthily","heavily","helpfully","helplessly","highly","honestly","hopelessly","hourly","hungrily","immediately","innocently","inquisitively","instantly","intensely","intently","interestingly","inwardly","irritably","jaggedly","jealously","joshingly","jovially","joyfully","joyously","jubilantly","judgementally","justly","keenly","kiddingly","kindheartedly","kindly","kissingly","knavishly","knottily","knowingly","knowledgeably","kookily","lazily","less","lightly","likely","limply","lively","loftily","longingly","loosely","loudly","lovingly","loyally","madly","majestically","meaningfully","mechanically","merrily","miserably","mockingly","monthly","more","mortally","mostly","mysteriously","naturally","nearly","neatly","needily","nervously","never","nicely","noisily","not","obediently","obnoxiously","oddly","offensively","officially","often","only","openly","optimistically","overconfidently","owlishly","painfully","partially","patiently","perfectly","physically","playfully","politely","poorly","positively","potentially","powerfully","promptly","properly","punctually","quaintly","quarrelsomely","queasily","questionably","questioningly","quicker","quickly","quietly","quirkily","quizzically","rapidly","rarely","readily","really","reassuringly","recklessly","regularly","reluctantly","repeatedly","reproachfully","restfully","righteously","rightfully","rigidly","roughly","rudely","sadly","safely","scarcely","scarily","searchingly","sedately","seemingly","seldom","selfishly","separately","seriously","shakily","sharply","sheepishly","shrilly","shyly","silently","sleepily","slowly","smoothly","softly","solemnly","solidly","sometimes","soon","speedily","stealthily","sternly","strictly","successfully","suddenly","surprisingly","suspiciously","sweetly","swiftly","sympathetically","tenderly","tensely","terribly","thankfully","thoroughly","thoughtfully","tightly","tomorrow","too","tremendously","triumphantly","truly","truthfully","ultimately","unabashedly","unaccountably","unbearably","unethically","unexpectedly","unfortunately","unimpressively","unnaturally","unnecessarily","upbeat","upliftingly","upright","upside-down","upward","upwardly","urgently","usefully","uselessly","usually","utterly","vacantly","vaguely","vainly","valiantly","vastly","verbally","very","viciously","victoriously","violently","vivaciously","voluntarily","warmly","weakly","wearily","well","wetly","wholly","wildly","willfully","wisely","woefully","wonderfully","worriedly","wrongly","yawningly","yearly","yearningly","yesterday","yieldingly","youthfully"],y$u=["after","although","and","as","because","before","but","consequently","even","finally","for","furthermore","hence","how","however","if","inasmuch","incidentally","indeed","instead","lest","likewise","meanwhile","nor","now","once","or","provided","since","so","supposing","than","that","though","till","unless","until","what","when","whenever","where","whereas","wherever","whether","which","while","who","whoever","whose","why","yet"],A$u=["yuck","oh","phooey","blah","boo","whoa","yowza","huzzah","boohoo","fooey","geez","pfft","ew","ah","yum","brr","hm","yahoo","aha","woot","drat","gah","meh","psst","aw","ugh","yippee","eek","gee","bah","gadzooks","duh","ha","mmm","ouch","phew","ack","uh-huh","gosh","hmph","pish","zowie","er","ick","oof","um"],_$u=["ATM","CD","SUV","TV","aardvark","abacus","abbey","abbreviation","abdomen","ability","abnormality","abolishment","abrogation","absence","abundance","academics","academy","accelerant","accelerator","accent","acceptance","access","accessory","accident","accommodation","accompanist","accomplishment","accord","accordance","accordion","account","accountability","accountant","accounting","accuracy","accusation","acetate","achievement","achiever","acid","acknowledgment","acorn","acoustics","acquaintance","acquisition","acre","acrylic","act","action","activation","activist","activity","actor","actress","acupuncture","ad","adaptation","adapter","addiction","addition","address","adjective","adjustment","admin","administration","administrator","admire","admission","adobe","adoption","adrenalin","adrenaline","adult","adulthood","advance","advancement","advantage","advent","adverb","advertisement","advertising","advice","adviser","advocacy","advocate","affair","affect","affidavit","affiliate","affinity","afoul","afterlife","aftermath","afternoon","aftershave","aftershock","afterthought","age","agency","agenda","agent","aggradation","aggression","aglet","agony","agreement","agriculture","aid","aide","aim","air","airbag","airbus","aircraft","airfare","airfield","airforce","airline","airmail","airman","airplane","airport","airship","airspace","alarm","alb","albatross","album","alcohol","alcove","alder","ale","alert","alfalfa","algebra","algorithm","alias","alibi","alien","allegation","allergist","alley","alliance","alligator","allocation","allowance","alloy","alluvium","almanac","almighty","almond","alpaca","alpenglow","alpenhorn","alpha","alphabet","altar","alteration","alternative","altitude","alto","aluminium","aluminum","amazement","amazon","ambassador","amber","ambience","ambiguity","ambition","ambulance","amendment","amenity","ammunition","amnesty","amount","amusement","anagram","analgesia","analog","analogue","analogy","analysis","analyst","analytics","anarchist","anarchy","anatomy","ancestor","anchovy","android","anesthesiologist","anesthesiology","angel","anger","angina","angle","angora","angstrom","anguish","animal","anime","anise","ankle","anklet","anniversary","announcement","annual","anorak","answer","ant","anteater","antecedent","antechamber","antelope","antennae","anterior","anthropology","antibody","anticipation","anticodon","antigen","antique","antiquity","antler","antling","anxiety","anybody","anyone","anything","anywhere","apartment","ape","aperitif","apology","app","apparatus","apparel","appeal","appearance","appellation","appendix","appetiser","appetite","appetizer","applause","apple","applewood","appliance","application","appointment","appreciation","apprehension","approach","appropriation","approval","apricot","apron","apse","aquarium","aquifer","arcade","arch","arch-rival","archaeologist","archaeology","archeology","archer","architect","architecture","archives","area","arena","argument","arithmetic","ark","arm","arm-rest","armadillo","armament","armchair","armoire","armor","armour","armpit","armrest","army","arrangement","array","arrest","arrival","arrogance","arrow","art","artery","arthur","artichoke","article","artifact","artificer","artist","ascend","ascent","ascot","ash","ashram","ashtray","aside","asparagus","aspect","asphalt","aspic","assassination","assault","assembly","assertion","assessment","asset","assignment","assist","assistance","assistant","associate","association","assumption","assurance","asterisk","astrakhan","astrolabe","astrologer","astrology","astronomy","asymmetry","atelier","atheist","athlete","athletics","atmosphere","atom","atrium","attachment","attack","attacker","attainment","attempt","attendance","attendant","attention","attenuation","attic","attitude","attorney","attraction","attribute","auction","audience","audit","auditorium","aunt","authentication","authenticity","author","authorisation","authority","authorization","auto","autoimmunity","automation","automaton","autumn","availability","avalanche","avenue","average","avocado","award","awareness","awe","axis","azimuth","baboon","babushka","baby","bachelor","back","back-up","backbone","backburn","backdrop","background","backpack","backup","backyard","bacon","bacterium","badge","badger","bafflement","bag","bagel","baggage","baggie","baggy","bagpipe","bail","bait","bake","baker","bakery","bakeware","balaclava","balalaika","balance","balcony","ball","ballet","balloon","balloonist","ballot","ballpark","bamboo","ban","banana","band","bandana","bandanna","bandolier","bandwidth","bangle","banjo","bank","bankbook","banker","banking","bankruptcy","banner","banquette","banyan","baobab","bar","barbecue","barbeque","barber","bargain","barge","baritone","barium","bark","barley","barn","barometer","barracks","barrage","barrel","barrier","barstool","bartender","base","baseball","baseboard","baseline","basement","basics","basil","basin","basis","basket","basketball","bass","bassinet","bassoon","bat","bath","bather","bathhouse","bathrobe","bathroom","bathtub","battalion","batter","battery","batting","battle","battleship","bay","bayou","beach","bead","beak","beam","bean","beancurd","beanie","beanstalk","bear","beard","beast","beastie","beat","beating","beauty","beck","bed","bedrock","bedroom","bee","beech","beef","beet","beetle","beggar","beginner","beginning","begonia","behalf","behavior","behaviour","behest","behold","being","belfry","belief","believer","bell","belligerency","bellows","belly","belt","bench","bend","beneficiary","benefit","beret","berry","best-seller","bestseller","bet","beverage","beyond","bias","bibliography","bicycle","bid","bidder","bidding","bidet","bifocals","bijou","bike","bikini","bill","billboard","billing","billion","bin","binoculars","biology","biopsy","biosphere","biplane","birch","bird","bird-watcher","birdbath","birdcage","birdhouse","birth","birthday","biscuit","bit","bite","bitten","bitter","blackberry","blackbird","blackboard","blackfish","blackness","bladder","blade","blame","blank","blanket","blast","blazer","blend","blessing","blight","blind","blinker","blister","blizzard","block","blocker","blog","blogger","blood","bloodflow","bloom","bloomer","blossom","blouse","blow","blowgun","blowhole","blueberry","blush","boar","board","boat","boatload","boatyard","bob","bobcat","body","bog","bolero","bolt","bond","bonding","bondsman","bone","bonfire","bongo","bonnet","bonsai","bonus","boogeyman","book","bookcase","bookend","booking","booklet","bookmark","boolean","boom","boon","boost","booster","boot","bootie","border","bore","borrower","borrowing","boss","botany","bother","bottle","bottling","bottom","bottom-line","boudoir","bough","boulder","boulevard","boundary","bouquet","bourgeoisie","bout","boutique","bow","bower","bowl","bowler","bowling","bowtie","box","boxer","boxspring","boy","boycott","boyfriend","boyhood","boysenberry","brace","bracelet","bracket","brain","brake","bran","branch","brand","brass","bratwurst","bread","breadcrumb","breadfruit","break","breakdown","breakfast","breakpoint","breakthrough","breastplate","breath","breeze","brewer","bribery","brick","bricklaying","bride","bridge","brief","briefing","briefly","brilliant","brink","brisket","broad","broadcast","broccoli","brochure","brocolli","broiler","broker","bronchitis","bronco","bronze","brooch","brood","brook","broom","brother","brother-in-law","brow","brownie","browser","browsing","brunch","brush","brushfire","brushing","bubble","buck","bucket","buckle","buckwheat","bud","buddy","budget","buffalo","buffer","buffet","bug","buggy","bugle","builder","building","bulb","bulk","bull","bull-fighter","bulldozer","bullet","bump","bumper","bun","bunch","bungalow","bunkhouse","burden","bureau","burglar","burial","burn","burn-out","burning","burrito","burro","burrow","burst","bus","bush","business","businessman","bust","bustle","butane","butcher","butler","butter","butterfly","button","buy","buyer","buying","buzz","buzzard","c-clamp","cabana","cabbage","cabin","cabinet","cable","caboose","cacao","cactus","caddy","cadet","cafe","caffeine","caftan","cage","cake","calcification","calculation","calculator","calculus","calendar","calf","caliber","calibre","calico","call","calm","calorie","camel","cameo","camera","camp","campaign","campaigning","campanile","camper","campus","can","canal","candelabra","candidacy","candidate","candle","candy","cane","cannibal","cannon","canoe","canon","canopy","cantaloupe","canteen","canvas","cap","capability","capacity","cape","caper","capital","capitalism","capitulation","capon","cappelletti","cappuccino","captain","caption","captor","car","carabao","caramel","caravan","carbohydrate","carbon","carboxyl","card","cardboard","cardigan","care","career","cargo","caribou","carload","carnation","carnival","carol","carotene","carp","carpenter","carpet","carpeting","carport","carriage","carrier","carrot","carry","cart","cartel","carter","cartilage","cartload","cartoon","cartridge","carving","cascade","case","casement","cash","cashew","cashier","casino","casket","cassava","casserole","cassock","cast","castanet","castle","casualty","cat","catacomb","catalogue","catalysis","catalyst","catamaran","catastrophe","catch","catcher","category","caterpillar","cathedral","cation","catsup","cattle","cauliflower","causal","cause","causeway","caution","cave","caviar","cayenne","ceiling","celebration","celebrity","celeriac","celery","cell","cellar","cello","celsius","cement","cemetery","cenotaph","census","cent","center","centimeter","centre","centurion","century","cephalopod","ceramic","ceramics","cereal","ceremony","certainty","certificate","certification","cesspool","chafe","chain","chainstay","chair","chairlift","chairman","chairperson","chaise","chalet","chalice","chalk","challenge","chamber","champagne","champion","championship","chance","chandelier","change","channel","chaos","chap","chapel","chaplain","chapter","character","characteristic","characterization","chard","charge","charger","charity","charlatan","charm","charset","chart","charter","chasm","chassis","chastity","chasuble","chateau","chatter","chauffeur","chauvinist","check","checkbook","checking","checkout","checkroom","cheddar","cheek","cheer","cheese","cheesecake","cheetah","chef","chem","chemical","chemistry","chemotaxis","cheque","cherry","chess","chest","chestnut","chick","chicken","chicory","chief","chiffonier","child","childbirth","childhood","chili","chill","chime","chimpanzee","chin","chinchilla","chino","chip","chipmunk","chit-chat","chivalry","chive","chives","chocolate","choice","choir","choker","cholesterol","choosing","chop","chops","chopstick","chopsticks","chord","chorus","chow","chowder","chrome","chromolithograph","chronicle","chronograph","chronometer","chrysalis","chub","chuck","church","churn","chutney","cicada","cigarette","cilantro","cinder","cinema","cinnamon","circadian","circle","circuit","circulation","circumference","circumstance","cirrus","citizen","citizenship","citron","citrus","city","civilian","civilisation","civilization","claim","clam","clamp","clan","clank","clapboard","clarification","clarinet","clarity","clasp","class","classic","classification","classmate","classroom","clause","clave","clavicle","clavier","claw","clay","cleaner","clearance","clearing","cleat","clef","cleft","clergyman","cleric","clerk","click","client","cliff","climate","climb","clinic","clip","clipboard","clipper","cloak","cloakroom","clock","clockwork","clogs","cloister","clone","close","closet","closing","closure","cloth","clothes","clothing","cloud","cloudburst","clove","clover","cloves","club","clue","cluster","clutch","co-producer","coach","coal","coalition","coast","coaster","coat","cob","cobbler","cobweb","cockpit","cockroach","cocktail","cocoa","coconut","cod","code","codepage","codling","codon","coevolution","cofactor","coffee","coffin","cohesion","cohort","coil","coin","coincidence","coinsurance","coke","cold","coleslaw","coliseum","collaboration","collagen","collapse","collar","collard","collateral","colleague","collection","collectivisation","collectivization","collector","college","collision","colloquy","colon","colonial","colonialism","colonisation","colonization","colony","color","colorlessness","colt","column","columnist","comb","combat","combination","combine","comeback","comedy","comestible","comfort","comfortable","comic","comics","comma","command","commander","commandment","comment","commerce","commercial","commission","commitment","committee","commodity","common","commonsense","commotion","communicant","communication","communion","communist","community","commuter","company","comparison","compass","compassion","compassionate","compensation","competence","competition","competitor","complaint","complement","completion","complex","complexity","compliance","complication","complicity","compliment","component","comportment","composer","composite","composition","compost","comprehension","compress","compromise","comptroller","compulsion","computer","comradeship","con","concentrate","concentration","concept","conception","concern","concert","conclusion","concrete","condition","conditioner","condominium","condor","conduct","conductor","cone","confectionery","conference","confidence","confidentiality","configuration","confirmation","conflict","conformation","confusion","conga","congo","congregation","congress","congressman","congressperson","conifer","connection","connotation","conscience","consciousness","consensus","consent","consequence","conservation","conservative","consideration","consignment","consist","consistency","console","consonant","conspiracy","conspirator","constant","constellation","constitution","constraint","construction","consul","consulate","consulting","consumer","consumption","contact","contagion","container","content","contention","contest","context","continent","contingency","continuity","contour","contract","contractor","contrail","contrary","contrast","contribution","contributor","control","controller","controversy","convection","convenience","convention","conversation","conversion","convert","convertible","conviction","cook","cookbook","cookie","cooking","cooperation","coordination","coordinator","cop","cop-out","cope","copper","copy","copying","copyright","copywriter","coral","cord","corduroy","core","cork","cormorant","corn","corner","cornerstone","cornet","cornflakes","cornmeal","corporal","corporation","corporatism","corps","corral","correspondence","correspondent","corridor","corruption","corsage","cosset","cost","costume","cot","cottage","cotton","couch","cougar","cough","council","councilman","councilor","councilperson","counsel","counseling","counselling","counsellor","counselor","count","counter","counter-force","counterpart","countess","country","countryside","county","couple","coupon","courage","course","court","courthouse","courtroom","cousin","covariate","cover","coverage","coverall","cow","cowbell","cowboy","coyote","crab","cradle","craft","craftsman","cranberry","crane","cranky","crate","cravat","craw","crawdad","crayfish","crayon","crazy","cream","creation","creative","creativity","creator","creature","creche","credential","credenza","credibility","credit","creditor","creek","crepe","crest","crew","crewman","crewmate","crewmember","crewmen","cria","crib","cribbage","cricket","cricketer","crime","criminal","crinoline","crisis","crisp","criteria","criterion","critic","criticism","crocodile","crocus","croissant","crook","crop","cross","cross-contamination","cross-stitch","croup","crow","crowd","crown","crude","cruelty","cruise","crumb","crunch","crusader","crush","crust","cry","crystal","crystallography","cub","cube","cuckoo","cucumber","cue","cuff-link","cuisine","cultivar","cultivator","culture","culvert","cummerbund","cup","cupboard","cupcake","cupola","curd","cure","curio","curiosity","curl","curler","currant","currency","current","curriculum","curry","curse","cursor","curtailment","curtain","curve","cushion","custard","custody","custom","customer","cut","cuticle","cutlet","cutover","cutting","cyclamen","cycle","cyclone","cyclooxygenase","cygnet","cylinder","cymbal","cynic","cyst","cytokine","cytoplasm","dad","daddy","daffodil","dagger","dahlia","daikon","daily","dairy","daisy","dam","damage","dame","dance","dancer","dancing","dandelion","danger","dare","dark","darkness","darn","dart","dash","dashboard","data","database","date","daughter","dawn","day","daybed","daylight","dead","deadline","deal","dealer","dealing","dearest","death","deathwatch","debate","debris","debt","debtor","decade","decadence","decency","decimal","decision","decision-making","deck","declaration","declination","decline","decoder","decongestant","decoration","decrease","decryption","dedication","deduce","deduction","deed","deep","deer","default","defeat","defendant","defender","defense","deficit","definition","deformation","degradation","degree","delay","deliberation","delight","delivery","demand","democracy","democrat","demur","den","denim","denominator","density","dentist","deodorant","department","departure","dependency","dependent","deployment","deposit","deposition","depot","depression","depressive","depth","deputy","derby","derivation","derivative","derrick","descendant","descent","description","desert","design","designation","designer","desire","desk","desktop","dessert","destination","destiny","destroyer","destruction","detail","detainee","detainment","detection","detective","detector","detention","determination","detour","devastation","developer","developing","development","developmental","deviance","deviation","device","devil","dew","dhow","diabetes","diadem","diagnosis","diagram","dial","dialect","dialogue","diam","diamond","diaper","diaphragm","diarist","diary","dibble","dickey","dictaphone","dictator","diction","dictionary","die","diesel","diet","difference","differential","difficulty","diffuse","dig","digestion","digestive","digger","digging","digit","dignity","dilapidation","dill","dilution","dime","dimension","dimple","diner","dinghy","dining","dinner","dinosaur","dioxide","dip","diploma","diplomacy","direction","directive","director","directory","dirndl","dirt","disability","disadvantage","disagreement","disappointment","disarmament","disaster","discharge","discipline","disclaimer","disclosure","disco","disconnection","discount","discourse","discovery","discrepancy","discretion","discrimination","discussion","disdain","disease","disembodiment","disengagement","disguise","disgust","dish","dishwasher","disk","disparity","dispatch","displacement","display","disposal","disposer","disposition","dispute","disregard","disruption","dissemination","dissonance","distance","distinction","distortion","distribution","distributor","district","divalent","divan","diver","diversity","divide","dividend","divider","divine","diving","division","divorce","doc","dock","doctor","doctorate","doctrine","document","documentary","documentation","doe","dog","dogsled","dogwood","doing","doll","dollar","dollop","dolman","dolor","dolphin","domain","dome","donation","donkey","donor","donut","door","doorbell","doorknob","doorpost","doorway","dory","dose","dot","double","doubling","doubt","doubter","dough","doughnut","down","downfall","downforce","downgrade","download","downstairs","downtown","downturn","dozen","draft","drag","dragon","dragonfly","dragonfruit","dragster","drain","drainage","drake","drama","dramaturge","drapes","draw","drawbridge","drawer","drawing","dream","dreamer","dredger","dress","dresser","dressing","drill","drink","drinking","drive","driver","driveway","driving","drizzle","dromedary","drop","drudgery","drug","drum","drummer","dryer","duck","duckling","dud","dude","due","duel","dueling","duffel","dugout","dulcimer","dumbwaiter","dump","dune","dungarees","dungeon","duplexer","duration","durian","dusk","dust","duster","duty","dwell","dwelling","dynamics","dynamite","dynamo","dynasty","dysfunction","e-book","e-mail","e-reader","eagle","eaglet","ear","eardrum","earmuffs","earnings","earplug","earring","earrings","earth","earthquake","earthworm","ease","easel","east","eating","eaves","eavesdropper","ecclesia","echidna","eclipse","ecliptic","ecology","economics","economy","ecosystem","ectoderm","ectodermal","ecumenist","eddy","edge","edger","edible","editing","edition","editor","editorial","education","eel","effacement","effect","effective","effectiveness","effector","efficacy","efficiency","effort","egg","egghead","eggnog","eggplant","ego","eicosanoid","ejector","elbow","elderberry","election","electricity","electrocardiogram","electronics","element","elephant","elevation","elevator","eleventh","elf","elicit","eligibility","elimination","elite","elixir","elk","ellipse","elm","elongation","elver","email","emanate","embarrassment","embassy","embellishment","embossing","embryo","emerald","emergence","emergency","emergent","emery","emission","emitter","emotion","emphasis","empire","employ","employee","employer","employment","empowerment","emu","enactment","encirclement","enclave","enclosure","encounter","encouragement","encyclopedia","end","endive","endoderm","endorsement","endothelium","endpoint","enemy","energy","enforcement","engagement","engine","engineer","engineering","enigma","enjoyment","enquiry","enrollment","enterprise","entertainment","enthusiasm","entirety","entity","entrance","entree","entrepreneur","entry","envelope","environment","envy","enzyme","epauliere","epee","ephemera","ephemeris","ephyra","epic","episode","epithelium","epoch","eponym","epoxy","equal","equality","equation","equinox","equipment","equity","equivalent","era","eraser","erosion","error","escalator","escape","espadrille","espalier","essay","essence","essential","establishment","estate","estimate","estrogen","estuary","eternity","ethernet","ethics","ethnicity","ethyl","euphonium","eurocentrism","evaluation","evaluator","evaporation","eve","evening","evening-wear","event","everybody","everyone","everything","eviction","evidence","evil","evocation","evolution","ex-husband","ex-wife","exaggeration","exam","examination","examiner","example","exasperation","excellence","exception","excerpt","excess","exchange","excitement","exclamation","excursion","excuse","execution","executive","executor","exercise","exhaust","exhaustion","exhibit","exhibition","exile","existence","exit","exocrine","expansion","expansionism","expectancy","expectation","expedition","expense","experience","experiment","experimentation","expert","expertise","explanation","exploration","explorer","export","expose","exposition","exposure","expression","extension","extent","exterior","external","extinction","extreme","extremist","eye","eyeball","eyebrow","eyebrows","eyeglasses","eyelash","eyelashes","eyelid","eyelids","eyeliner","eyestrain","eyrie","fabric","face","facelift","facet","facility","facsimile","fact","factor","factory","faculty","fahrenheit","fail","failure","fairness","fairy","faith","faithful","fall","fallacy","falling-out","fame","familiar","familiarity","family","fan","fang","fanlight","fanny-pack","fantasy","farm","farmer","farming","farmland","farrow","fascia","fashion","fat","fate","father","father-in-law","fatigue","fatigues","faucet","fault","fav","fava","favor","favorite","fawn","fax","fear","feast","feather","feature","fedelini","federation","fedora","fee","feed","feedback","feeding","feel","feeling","fellow","felony","female","fen","fence","fencing","fender","feng","fennel","ferret","ferry","ferryboat","fertilizer","festival","fetus","few","fiber","fiberglass","fibre","fibroblast","fibrosis","ficlet","fiction","fiddle","field","fiery","fiesta","fifth","fig","fight","fighter","figure","figurine","file","filing","fill","fillet","filly","film","filter","filth","final","finance","financing","finding","fine","finer","finger","fingerling","fingernail","finish","finisher","fir","fire","fireman","fireplace","firewall","firm","first","fish","fishbone","fisherman","fishery","fishing","fishmonger","fishnet","fit","fitness","fix","fixture","flag","flair","flame","flan","flanker","flare","flash","flat","flatboat","flavor","flax","fleck","fledgling","fleece","flesh","flexibility","flick","flicker","flight","flint","flintlock","flip-flops","flock","flood","floodplain","floor","floozie","flour","flow","flower","flu","flugelhorn","fluke","flume","flung","flute","fly","flytrap","foal","foam","fob","focus","fog","fold","folder","folk","folklore","follower","following","fondue","font","food","foodstuffs","fool","foot","footage","football","footnote","footprint","footrest","footstep","footstool","footwear","forage","forager","foray","force","ford","forearm","forebear","forecast","forehead","foreigner","forelimb","forest","forestry","forever","forgery","fork","form","formal","formamide","format","formation","former","formicarium","formula","fort","forte","fortnight","fortress","fortune","forum","foundation","founder","founding","fountain","fourths","fowl","fox","foxglove","fraction","fragrance","frame","framework","fratricide","fraud","fraudster","freak","freckle","freedom","freelance","freezer","freezing","freight","freighter","frenzy","freon","frequency","fresco","friction","fridge","friend","friendship","fries","frigate","fright","fringe","fritter","frock","frog","front","frontier","frost","frosting","frown","fruit","frustration","fry","fuel","fugato","fulfillment","full","fun","function","functionality","fund","funding","fundraising","fur","furnace","furniture","fusarium","futon","future","gadget","gaffe","gaffer","gain","gaiters","gale","gall-bladder","gallery","galley","gallon","galoshes","gambling","game","gamebird","gaming","gamma-ray","gander","gang","gap","garage","garb","garbage","garden","garlic","garment","garter","gas","gasket","gasoline","gasp","gastronomy","gastropod","gate","gateway","gather","gathering","gator","gauge","gauntlet","gavel","gazebo","gazelle","gear","gearshift","geek","gel","gelatin","gelding","gem","gemsbok","gender","gene","general","generation","generator","generosity","genetics","genie","genius","genre","gentleman","geography","geology","geometry","geranium","gerbil","gesture","geyser","gherkin","ghost","giant","gift","gig","gigantism","giggle","ginger","gingerbread","ginseng","giraffe","girdle","girl","girlfriend","glacier","gladiolus","glance","gland","glass","glasses","glee","glen","glider","gliding","glimpse","globe","glockenspiel","gloom","glory","glove","glow","glucose","glue","glut","glutamate","gnat","gnu","go-kart","goal","goat","gobbler","god","goddess","godfather","godmother","godparent","goggles","going","gold","goldfish","golf","gondola","gong","good","good-bye","goodbye","goodie","goodness","goodnight","goodwill","goose","gopher","gorilla","gosling","gossip","governance","government","governor","gown","grab-bag","grace","grade","gradient","graduate","graduation","graffiti","graft","grain","gram","grammar","gran","grand","grandchild","granddaughter","grandfather","grandma","grandmom","grandmother","grandpa","grandparent","grandson","granny","granola","grant","grape","grapefruit","graph","graphic","grasp","grass","grasshopper","grassland","gratitude","gravel","gravitas","gravity","gravy","gray","grease","great-grandfather","great-grandmother","greatness","greed","green","greenhouse","greens","grenade","grey","grid","grief","grill","grin","grip","gripper","grit","grocery","ground","group","grouper","grouse","grove","growth","grub","guacamole","guarantee","guard","guava","guerrilla","guess","guest","guestbook","guidance","guide","guideline","guilder","guilt","guilty","guinea","guitar","guitarist","gum","gumshoe","gun","gunpowder","gutter","guy","gym","gymnast","gymnastics","gynaecology","gyro","habit","habitat","hacienda","hacksaw","hackwork","hail","hair","haircut","hake","half","half-brother","half-sister","halibut","hall","halloween","hallway","halt","ham","hamburger","hammer","hammock","hamster","hand","hand-holding","handball","handful","handgun","handicap","handle","handlebar","handmaiden","handover","handrail","handsaw","hanger","happening","happiness","harald","harbor","harbour","hard-hat","hardboard","hardcover","hardening","hardhat","hardship","hardware","hare","harm","harmonica","harmonise","harmonize","harmony","harp","harpooner","harpsichord","harvest","harvester","hash","hashtag","hassock","haste","hat","hatbox","hatchet","hatchling","hate","hatred","haunt","haven","haversack","havoc","hawk","hay","haze","hazel","hazelnut","head","headache","headlight","headline","headphones","headquarters","headrest","health","health-care","hearing","hearsay","heart","heart-throb","heartache","heartbeat","hearth","hearthside","heartwood","heat","heater","heating","heaven","heavy","hectare","hedge","hedgehog","heel","heifer","height","heir","heirloom","helicopter","helium","hellcat","hello","helmet","helo","help","hemisphere","hemp","hen","hepatitis","herb","herbs","heritage","hermit","hero","heroine","heron","herring","hesitation","hexagon","heyday","hiccups","hide","hierarchy","high","high-rise","highland","highlight","highway","hike","hiking","hill","hint","hip","hippodrome","hippopotamus","hire","hiring","historian","history","hit","hive","hobbit","hobby","hockey","hog","hold","holder","hole","holiday","home","homeland","homeownership","hometown","homework","homogenate","homonym","honesty","honey","honeybee","honeydew","honor","honoree","hood","hoof","hook","hop","hope","hops","horde","horizon","hormone","horn","hornet","horror","horse","horseradish","horst","hose","hosiery","hospice","hospital","hospitalisation","hospitality","hospitalization","host","hostel","hostess","hotdog","hotel","hound","hour","hourglass","house","houseboat","household","housewife","housework","housing","hovel","hovercraft","howard","howitzer","hub","hubcap","hubris","hug","hugger","hull","human","humanity","humidity","hummus","humor","humour","hundred","hunger","hunt","hunter","hunting","hurdle","hurdler","hurricane","hurry","hurt","husband","hut","hutch","hyacinth","hybridisation","hybridization","hydrant","hydraulics","hydrocarb","hydrocarbon","hydrofoil","hydrogen","hydrolyse","hydrolysis","hydrolyze","hydroxyl","hyena","hygienic","hype","hyphenation","hypochondria","hypothermia","hypothesis","ice","ice-cream","iceberg","icebreaker","icecream","icicle","icing","icon","icy","id","idea","ideal","identification","identity","ideology","idiom","igloo","ignorance","ignorant","ikebana","illiteracy","illness","illusion","illustration","image","imagination","imbalance","imitation","immigrant","immigration","immortal","impact","impairment","impala","impediment","implement","implementation","implication","import","importance","impostor","impress","impression","imprisonment","impropriety","improvement","impudence","impulse","in-joke","in-laws","inability","inauguration","inbox","incandescence","incarnation","incense","incentive","inch","incidence","incident","incision","inclusion","income","incompetence","inconvenience","increase","incubation","independence","independent","index","indication","indicator","indigence","individual","industrialisation","industrialization","industry","inequality","inevitable","infancy","infant","infarction","infection","infiltration","infinite","infix","inflammation","inflation","influence","influx","info","information","infrastructure","infusion","inglenook","ingrate","ingredient","inhabitant","inheritance","inhibition","inhibitor","initial","initialise","initialize","initiative","injunction","injury","injustice","ink","inlay","inn","innervation","innocence","innocent","innovation","input","inquiry","inscription","insect","insectarium","insert","inside","insight","insolence","insomnia","inspection","inspector","inspiration","installation","instance","instant","instinct","institute","institution","instruction","instructor","instrument","instrumentalist","instrumentation","insulation","insurance","insurgence","insurrection","integer","integral","integration","integrity","intellect","intelligence","intensity","intent","intention","intentionality","interaction","interchange","interconnection","interest","interface","interferometer","interior","interject","interloper","internet","interpretation","interpreter","interval","intervenor","intervention","interview","interviewer","intestine","introduction","intuition","invader","invasion","invention","inventor","inventory","inverse","inversion","investigation","investigator","investment","investor","invitation","invite","invoice","involvement","iridescence","iris","iron","ironclad","irony","irrigation","ischemia","island","isogloss","isolation","issue","item","itinerary","ivory","jack","jackal","jacket","jackfruit","jade","jaguar","jail","jailhouse","jalapeño","jam","jar","jasmine","jaw","jazz","jealousy","jeans","jeep","jelly","jellybeans","jellyfish","jet","jewel","jeweller","jewellery","jewelry","jicama","jiffy","job","jockey","jodhpurs","joey","jogging","joint","joke","jot","journal","journalism","journalist","journey","joy","judge","judgment","judo","jug","juggernaut","juice","julienne","jumbo","jump","jumper","jumpsuit","jungle","junior","junk","junker","junket","jury","justice","justification","jute","kale","kangaroo","karate","kayak","kazoo","kebab","keep","keeper","kendo","kennel","ketch","ketchup","kettle","kettledrum","key","keyboard","keyboarding","keystone","kick","kick-off","kid","kidney","kielbasa","kill","killer","killing","kilogram","kilometer","kilt","kimono","kinase","kind","kindness","king","kingdom","kingfish","kiosk","kiss","kit","kitchen","kite","kitsch","kitten","kitty","kiwi","knee","kneejerk","knickers","knife","knife-edge","knight","knitting","knock","knot","know-how","knowledge","knuckle","koala","kohlrabi","lab","label","labor","laboratory","laborer","labour","labourer","lace","lack","lacquerware","lad","ladder","ladle","lady","ladybug","lag","lake","lamb","lambkin","lament","lamp","lanai","land","landform","landing","landmine","landscape","lane","language","lantern","lap","laparoscope","lapdog","laptop","larch","lard","larder","lark","larva","laryngitis","lasagna","lashes","last","latency","latex","lathe","latitude","latte","latter","laugh","laughter","laundry","lava","law","lawmaker","lawn","lawsuit","lawyer","lay","layer","layout","lead","leader","leadership","leading","leaf","league","leaker","leap","learning","leash","leather","leave","leaver","lecture","leek","leeway","left","leg","legacy","legal","legend","legging","legislation","legislator","legislature","legitimacy","legume","leisure","lemon","lemonade","lemur","lender","lending","length","lens","lentil","leopard","leprosy","leptocephalus","lesson","letter","lettuce","level","lever","leverage","leveret","liability","liar","liberty","library","licence","license","licensing","licorice","lid","lie","lieu","lieutenant","life","lifestyle","lifetime","lift","ligand","light","lighting","lightning","lightscreen","ligula","likelihood","likeness","lilac","lily","limb","lime","limestone","limit","limitation","limo","line","linen","liner","linguist","linguistics","lining","link","linkage","linseed","lion","lip","lipid","lipoprotein","lipstick","liquid","liquidity","liquor","list","listening","listing","literate","literature","litigation","litmus","litter","littleneck","liver","livestock","living","lizard","llama","load","loading","loaf","loafer","loan","lobby","lobotomy","lobster","local","locality","location","lock","locker","locket","locomotive","locust","lode","loft","log","loggia","logic","login","logistics","logo","loincloth","lollipop","loneliness","longboat","longitude","look","lookout","loop","loophole","loquat","lord","loss","lot","lotion","lottery","lounge","louse","lout","love","lover","lox","loyalty","luck","luggage","lumber","lumberman","lunch","luncheonette","lunchmeat","lunchroom","lung","lunge","lute","luxury","lychee","lycra","lye","lymphocyte","lynx","lyocell","lyre","lyrics","lysine","mRNA","macadamia","macaroni","macaroon","macaw","machine","machinery","macrame","macro","macrofauna","madam","maelstrom","maestro","magazine","maggot","magic","magnet","magnitude","maid","maiden","mail","mailbox","mailer","mailing","mailman","main","mainland","mainstream","maintainer","maintenance","maize","major","major-league","majority","makeover","maker","makeup","making","male","malice","mall","mallard","mallet","malnutrition","mama","mambo","mammoth","man","manacle","management","manager","manatee","mandarin","mandate","mandolin","mangle","mango","mangrove","manhunt","maniac","manicure","manifestation","manipulation","mankind","manner","manor","mansard","manservant","mansion","mantel","mantle","mantua","manufacturer","manufacturing","many","map","maple","mapping","maracas","marathon","marble","march","mare","margarine","margin","mariachi","marimba","marines","marionberry","mark","marker","market","marketer","marketing","marketplace","marksman","markup","marmalade","marriage","marsh","marshland","marshmallow","marten","marxism","mascara","mask","masonry","mass","massage","mast","masterpiece","mastication","mastoid","mat","match","matchmaker","mate","material","maternity","math","mathematics","matrix","matter","mattock","mattress","max","maximum","maybe","mayonnaise","mayor","meadow","meal","mean","meander","meaning","means","meantime","measles","measure","measurement","meat","meatball","meatloaf","mecca","mechanic","mechanism","med","medal","media","median","medication","medicine","medium","meet","meeting","melatonin","melody","melon","member","membership","membrane","meme","memo","memorial","memory","men","menopause","menorah","mention","mentor","menu","merchandise","merchant","mercury","meridian","meringue","merit","mesenchyme","mess","message","messenger","messy","metabolite","metal","metallurgist","metaphor","meteor","meteorology","meter","methane","method","methodology","metric","metro","metronome","mezzanine","microlending","micronutrient","microphone","microwave","mid-course","midden","middle","middleman","midline","midnight","midwife","might","migrant","migration","mile","mileage","milepost","milestone","military","milk","milkshake","mill","millennium","millet","millimeter","million","millisecond","millstone","mime","mimosa","min","mincemeat","mind","mine","mineral","mineshaft","mini","mini-skirt","minibus","minimalism","minimum","mining","minion","minister","mink","minnow","minor","minor-league","minority","mint","minute","miracle","mirror","miscommunication","misfit","misnomer","misplacement","misreading","misrepresentation","miss","missile","mission","mist","mistake","mister","misunderstand","miter","mitten","mix","mixer","mixture","moai","moat","mob","mobile","mobility","mobster","moccasins","mocha","mochi","mode","model","modeling","modem","modernist","modernity","modification","molar","molasses","molding","mole","molecule","mom","moment","monastery","monasticism","money","monger","monitor","monitoring","monk","monkey","monocle","monopoly","monotheism","monsoon","monster","month","monument","mood","moody","moon","moonlight","moonscape","moose","mop","morale","morbid","morbidity","morning","morphology","morsel","mortal","mortality","mortgage","mortise","mosque","mosquito","most","motel","moth","mother","mother-in-law","motion","motivation","motive","motor","motorboat","motorcar","motorcycle","mound","mountain","mouse","mouser","mousse","moustache","mouth","mouton","movement","mover","movie","mower","mozzarella","mud","muffin","mug","mukluk","mule","multimedia","muscat","muscatel","muscle","musculature","museum","mushroom","music","music-box","music-making","musician","muskrat","mussel","mustache","mustard","mutation","mutt","mutton","mycoplasma","mystery","myth","mythology","nail","name","naming","nanoparticle","napkin","narrative","nasal","nation","nationality","native","naturalisation","nature","navigation","necessity","neck","necklace","necktie","nectar","nectarine","need","needle","neglect","negligee","negotiation","neighbor","neighborhood","neighbour","neighbourhood","neologism","neon","neonate","nephew","nerve","nest","nestling","nestmate","net","netball","netbook","netsuke","network","networking","neurobiologist","neuron","neuropathologist","neuropsychiatry","news","newsletter","newspaper","newsprint","newsstand","nexus","nibble","nicety","niche","nick","nickel","nickname","niece","night","nightclub","nightgown","nightingale","nightlife","nightlight","nightmare","ninja","nit","nitrogen","nobody","nod","node","noir","noise","nonbeliever","nonconformist","nondisclosure","nonsense","noodle","noodles","noon","norm","normal","normalisation","normalization","north","nose","notation","note","notebook","notepad","nothing","notice","notion","notoriety","nougat","noun","nourishment","novel","nucleotidase","nucleotide","nudge","nuke","number","numeracy","numeric","numismatist","nun","nurse","nursery","nursing","nurture","nut","nutmeg","nutrient","nutrition","nylon","oak","oar","oasis","oat","oatmeal","oats","obedience","obesity","obi","object","objection","objective","obligation","oboe","observation","observatory","obsession","obsidian","obstacle","occasion","occupation","occurrence","ocean","ocelot","octagon","octave","octavo","octet","octopus","odometer","odyssey","oeuvre","off-ramp","offence","offense","offer","offering","office","officer","official","offset","oil","okra","oldie","oleo","olive","omega","omelet","omission","omnivore","oncology","onion","online","onset","opening","opera","operating","operation","operator","ophthalmologist","opinion","opossum","opponent","opportunist","opportunity","opposite","opposition","optimal","optimisation","optimist","optimization","option","orange","orangutan","orator","orchard","orchestra","orchid","order","ordinary","ordination","ore","oregano","organ","organisation","organising","organization","organizing","orient","orientation","origin","original","originality","ornament","osmosis","osprey","ostrich","other","otter","ottoman","ounce","outback","outcome","outfielder","outfit","outhouse","outlaw","outlay","outlet","outline","outlook","output","outrage","outrigger","outrun","outset","outside","oval","ovary","oven","overcharge","overclocking","overcoat","overexertion","overflight","overhead","overheard","overload","overnighter","overshoot","oversight","overview","overweight","owl","owner","ownership","ox","oxford","oxygen","oyster","ozone","pace","pacemaker","pack","package","packaging","packet","pad","paddle","paddock","pagan","page","pagoda","pail","pain","paint","painter","painting","paintwork","pair","pajamas","palace","palate","palm","pamphlet","pan","pancake","pancreas","panda","panel","panic","pannier","panpipe","panther","pantologist","pantology","pantry","pants","pantsuit","pantyhose","papa","papaya","paper","paperback","paperwork","parable","parachute","parade","paradise","paragraph","parallelogram","paramecium","paramedic","parameter","paranoia","parcel","parchment","pard","pardon","parent","parenthesis","parenting","park","parka","parking","parliament","parole","parrot","parser","parsley","parsnip","part","participant","participation","particle","particular","partner","partnership","partridge","party","pass","passage","passbook","passenger","passing","passion","passive","passport","password","past","pasta","paste","pastor","pastoralist","pastry","pasture","pat","patch","pate","patent","patentee","path","pathogenesis","pathology","pathway","patience","patient","patina","patio","patriarch","patrimony","patriot","patrol","patroller","patrolling","patron","pattern","patty","pattypan","pause","pavement","pavilion","paw","pawnshop","pay","payee","payment","payoff","pea","peace","peach","peacoat","peacock","peak","peanut","pear","pearl","peasant","pecan","pedal","peek","peen","peer","peer-to-peer","pegboard","pelican","pelt","pen","penalty","pence","pencil","pendant","pendulum","penguin","penicillin","peninsula","pennant","penny","pension","pentagon","peony","people","pepper","pepperoni","percent","percentage","perception","perch","perennial","perfection","performance","perfume","period","periodical","peripheral","permafrost","permission","permit","perp","perpendicular","persimmon","person","personal","personality","personnel","perspective","pest","pet","petal","petition","petitioner","petticoat","pew","pharmacist","pharmacopoeia","phase","pheasant","phenomenon","phenotype","pheromone","philanthropy","philosopher","philosophy","phone","phosphate","photo","photodiode","photograph","photographer","photography","photoreceptor","phrase","phrasing","physical","physics","physiology","pianist","piano","piccolo","pick","pickax","pickaxe","picket","pickle","pickup","picnic","picture","picturesque","pie","piece","pier","piety","pig","pigeon","piglet","pigpen","pigsty","pike","pilaf","pile","pilgrim","pilgrimage","pill","pillar","pillbox","pillow","pilot","pimple","pin","pinafore","pince-nez","pine","pineapple","pinecone","ping","pinkie","pinot","pinstripe","pint","pinto","pinworm","pioneer","pipe","pipeline","piracy","pirate","pit","pita","pitch","pitcher","pitching","pith","pizza","place","placebo","placement","placode","plagiarism","plain","plaintiff","plan","plane","planet","planning","plant","plantation","planter","planula","plaster","plasterboard","plastic","plate","platelet","platform","platinum","platter","platypus","play","player","playground","playroom","playwright","plea","pleasure","pleat","pledge","plenty","plier","pliers","plight","plot","plough","plover","plow","plowman","plug","plugin","plum","plumber","plume","plunger","plywood","pneumonia","pocket","pocket-watch","pocketbook","pod","podcast","poem","poet","poetry","poignance","point","poison","poisoning","poker","polarisation","polarization","pole","polenta","police","policeman","policy","polish","politician","politics","poll","polliwog","pollutant","pollution","polo","polyester","polyp","pomegranate","pomelo","pompom","poncho","pond","pony","pool","poor","pop","popcorn","poppy","popsicle","popularity","population","populist","porcelain","porch","porcupine","pork","porpoise","port","porter","portfolio","porthole","portion","portrait","position","possession","possibility","possible","post","postage","postbox","poster","posterior","postfix","pot","potato","potential","pottery","potty","pouch","poultry","pound","pounding","poverty","powder","power","practice","practitioner","prairie","praise","pray","prayer","precedence","precedent","precipitation","precision","predecessor","preface","preference","prefix","pregnancy","prejudice","prelude","premeditation","premier","premise","premium","preoccupation","preparation","prescription","presence","present","presentation","preservation","preserves","presidency","president","press","pressroom","pressure","pressurisation","pressurization","prestige","presume","pretzel","prevalence","prevention","prey","price","pricing","pride","priest","priesthood","primary","primate","prince","princess","principal","principle","print","printer","printing","prior","priority","prison","prisoner","privacy","private","privilege","prize","prizefight","probability","probation","probe","problem","procedure","proceedings","process","processing","processor","proctor","procurement","produce","producer","product","production","productivity","profession","professional","professor","profile","profit","progenitor","program","programme","programming","progress","progression","prohibition","project","proliferation","promenade","promise","promotion","prompt","pronoun","pronunciation","proof","proof-reader","propane","property","prophet","proponent","proportion","proposal","proposition","proprietor","prose","prosecution","prosecutor","prospect","prosperity","prostacyclin","prostanoid","prostrate","protection","protein","protest","protocol","providence","provider","province","provision","prow","proximal","proximity","prune","pruner","pseudocode","pseudoscience","psychiatrist","psychoanalyst","psychologist","psychology","ptarmigan","pub","public","publication","publicity","publisher","publishing","pudding","puddle","puffin","pug","puggle","pulley","pulse","puma","pump","pumpernickel","pumpkin","pumpkinseed","pun","punch","punctuation","punishment","pup","pupa","pupil","puppet","puppy","purchase","puritan","purity","purpose","purr","purse","pursuit","push","pusher","put","puzzle","pyramid","pyridine","quadrant","quail","qualification","quality","quantity","quart","quarter","quartet","quartz","queen","query","quest","question","questioner","questionnaire","quiche","quicksand","quiet","quill","quilt","quince","quinoa","quit","quiver","quota","quotation","quote","rabbi","rabbit","raccoon","race","racer","racing","rack","radar","radiator","radio","radiosonde","radish","raffle","raft","rag","rage","raid","rail","railing","railroad","railway","raiment","rain","rainbow","raincoat","rainmaker","rainstorm","rainy","raise","raisin","rake","rally","ram","rambler","ramen","ramie","ranch","rancher","randomisation","randomization","range","ranger","rank","rap","raspberry","rat","rate","ratepayer","rating","ratio","rationale","rations","raven","ravioli","rawhide","ray","rayon","razor","reach","reactant","reaction","read","reader","readiness","reading","real","reality","realization","realm","reamer","rear","reason","reasoning","rebel","rebellion","reboot","recall","recapitulation","receipt","receiver","reception","receptor","recess","recession","recipe","recipient","reciprocity","reclamation","recliner","recognition","recollection","recommendation","reconsideration","record","recorder","recording","recovery","recreation","recruit","rectangle","redesign","redhead","redirect","rediscovery","reduction","reef","refectory","reference","referendum","reflection","reform","refreshments","refrigerator","refuge","refund","refusal","refuse","regard","regime","region","regionalism","register","registration","registry","regret","regulation","regulator","rehospitalisation","rehospitalization","reindeer","reinscription","reject","relation","relationship","relative","relaxation","relay","release","reliability","relief","religion","relish","reluctance","remains","remark","reminder","remnant","remote","removal","renaissance","rent","reorganisation","reorganization","repair","reparation","repayment","repeat","replacement","replica","replication","reply","report","reporter","reporting","repository","representation","representative","reprocessing","republic","republican","reputation","request","requirement","resale","rescue","research","researcher","resemblance","reservation","reserve","reservoir","reset","residence","resident","residue","resist","resistance","resolution","resolve","resort","resource","respect","respite","response","responsibility","rest","restaurant","restoration","restriction","restroom","restructuring","result","resume","retailer","retention","rethinking","retina","retirement","retouching","retreat","retrospect","retrospective","retrospectivity","return","reunion","revascularisation","revascularization","reveal","revelation","revenant","revenge","revenue","reversal","reverse","review","revitalisation","revitalization","revival","revolution","revolver","reward","rhetoric","rheumatism","rhinoceros","rhubarb","rhyme","rhythm","rib","ribbon","rice","riddle","ride","rider","ridge","riding","rifle","right","rim","ring","ringworm","riot","rip","ripple","rise","riser","risk","rite","ritual","river","riverbed","rivulet","road","roadway","roar","roast","robe","robin","robot","robotics","rock","rocker","rocket","rocket-ship","rod","role","roll","roller","romaine","romance","roof","room","roommate","rooster","root","rope","rose","rosemary","roster","rostrum","rotation","round","roundabout","route","router","routine","row","rowboat","rowing","rubber","rubbish","rubric","ruby","ruckus","rudiment","ruffle","rug","rugby","ruin","rule","ruler","ruling","rumor","run","runaway","runner","running","runway","rush","rust","rutabaga","rye","sabre","sack","saddle","sadness","safari","safe","safeguard","safety","saffron","sage","sail","sailboat","sailing","sailor","saint","sake","salad","salami","salary","sale","salesman","salmon","salon","saloon","salsa","salt","salute","samovar","sampan","sample","samurai","sanction","sanctity","sanctuary","sand","sandal","sandbar","sandpaper","sandwich","sanity","sardine","sari","sarong","sash","satellite","satin","satire","satisfaction","sauce","saucer","sauerkraut","sausage","savage","savannah","saving","savings","savior","saviour","savory","saw","saxophone","scaffold","scale","scallion","scallops","scalp","scam","scanner","scarecrow","scarf","scarification","scenario","scene","scenery","scent","schedule","scheduling","schema","scheme","schnitzel","scholar","scholarship","school","schoolhouse","schooner","science","scientist","scimitar","scissors","scooter","scope","score","scorn","scorpion","scotch","scout","scow","scrambled","scrap","scraper","scratch","screamer","screen","screening","screenwriting","screw","screw-up","screwdriver","scrim","scrip","script","scripture","scrutiny","sculpting","sculptural","sculpture","sea","seabass","seafood","seagull","seal","seaplane","search","seashore","seaside","season","seat","seaweed","second","secrecy","secret","secretariat","secretary","secretion","section","sectional","sector","security","sediment","seed","seeder","seeker","seep","segment","seizure","selection","self","self-confidence","self-control","self-esteem","seller","selling","semantics","semester","semicircle","semicolon","semiconductor","seminar","senate","senator","sender","senior","sense","sensibility","sensitive","sensitivity","sensor","sentence","sentencing","sentiment","sepal","separation","septicaemia","sequel","sequence","serial","series","sermon","serum","serval","servant","server","service","servitude","sesame","session","set","setback","setting","settlement","settler","severity","sewer","shack","shackle","shade","shadow","shadowbox","shakedown","shaker","shallot","shallows","shame","shampoo","shanty","shape","share","shareholder","shark","shaw","shawl","shear","shearling","sheath","shed","sheep","sheet","shelf","shell","shelter","sherbet","sherry","shield","shift","shin","shine","shingle","ship","shipper","shipping","shipyard","shirt","shirtdress","shoat","shock","shoe","shoe-horn","shoehorn","shoelace","shoemaker","shoes","shoestring","shofar","shoot","shootdown","shop","shopper","shopping","shore","shoreline","short","shortage","shorts","shortwave","shot","shoulder","shout","shovel","show","show-stopper","shower","shred","shrimp","shrine","shutdown","sibling","sick","sickness","side","sideboard","sideburns","sidecar","sidestream","sidewalk","siding","siege","sigh","sight","sightseeing","sign","signal","signature","signet","significance","signify","signup","silence","silica","silicon","silk","silkworm","sill","silly","silo","silver","similarity","simple","simplicity","simplification","simvastatin","sin","singer","singing","singular","sink","sinuosity","sip","sir","sister","sister-in-law","sitar","site","situation","size","skate","skating","skean","skeleton","ski","skiing","skill","skin","skirt","skull","skullcap","skullduggery","skunk","sky","skylight","skyline","skyscraper","skywalk","slang","slapstick","slash","slate","slaw","sled","sledge","sleep","sleepiness","sleeping","sleet","sleuth","slice","slide","slider","slime","slip","slipper","slippers","slope","slot","sloth","slump","smell","smelting","smile","smith","smock","smog","smoke","smoking","smolt","smuggling","snack","snail","snake","snakebite","snap","snarl","sneaker","sneakers","sneeze","sniffle","snob","snorer","snow","snowboarding","snowflake","snowman","snowmobiling","snowplow","snowstorm","snowsuit","snuck","snug","snuggle","soap","soccer","socialism","socialist","society","sociology","sock","socks","soda","sofa","softball","softdrink","softening","software","soil","soldier","sole","solicitation","solicitor","solidarity","solidity","soliloquy","solitaire","solution","solvency","sombrero","somebody","someone","someplace","somersault","something","somewhere","son","sonar","sonata","song","songbird","sonnet","soot","sophomore","soprano","sorbet","sorghum","sorrel","sorrow","sort","soul","soulmate","sound","soundness","soup","source","sourwood","sousaphone","south","southeast","souvenir","sovereignty","sow","soy","soybean","space","spacing","spaghetti","span","spandex","sparerib","spark","sparrow","spasm","spat","spatula","spawn","speaker","speakerphone","speaking","spear","spec","special","specialist","specialty","species","specification","spectacle","spectacles","spectrograph","spectrum","speculation","speech","speed","speedboat","spell","spelling","spelt","spending","sphere","sphynx","spice","spider","spiderling","spike","spill","spinach","spine","spiral","spirit","spiritual","spirituality","spit","spite","spleen","splendor","split","spokesman","spokeswoman","sponge","sponsor","sponsorship","spool","spoon","spork","sport","sportsman","spot","spotlight","spouse","sprag","sprat","spray","spread","spreadsheet","spree","spring","sprinkles","sprinter","sprout","spruce","spud","spume","spur","spy","spyglass","square","squash","squatter","squeegee","squid","squirrel","stab","stability","stable","stack","stacking","stadium","staff","stag","stage","stain","stair","staircase","stake","stalk","stall","stallion","stamen","stamina","stamp","stance","stand","standard","standardisation","standardization","standing","standoff","standpoint","star","starboard","start","starter","state","statement","statin","station","station-wagon","statistic","statistics","statue","status","statute","stay","steak","stealth","steam","steamroller","steel","steeple","stem","stench","stencil","step","step-aunt","step-brother","step-daughter","step-father","step-grandfather","step-grandmother","step-mother","step-sister","step-son","step-uncle","stepdaughter","stepmother","stepping-stone","stepson","stereo","stew","steward","stick","sticker","stiletto","still","stimulation","stimulus","sting","stinger","stir-fry","stitch","stitcher","stock","stock-in-trade","stockings","stole","stomach","stone","stonework","stool","stop","stopsign","stopwatch","storage","store","storey","storm","story","story-telling","storyboard","stot","stove","strait","strand","stranger","strap","strategy","straw","strawberry","strawman","stream","street","streetcar","strength","stress","stretch","strife","strike","string","strip","stripe","strobe","structure","strudel","struggle","stucco","stud","student","studio","study","stuff","stumbling","stump","stupidity","sturgeon","sty","style","styling","stylus","sub","subcomponent","subconscious","subcontractor","subexpression","subgroup","subject","submarine","submitter","subprime","subroutine","subscription","subsection","subset","subsidence","subsidiary","subsidy","substance","substitution","subtitle","suburb","subway","success","succotash","suede","suet","suffocation","sugar","suggestion","suit","suitcase","suite","sulfur","sultan","sum","summary","summer","summit","sun","sunbeam","sunbonnet","sundae","sunday","sundial","sunflower","sunglasses","sunlamp","sunlight","sunrise","sunroom","sunset","sunshine","superiority","supermarket","supernatural","supervision","supervisor","supper","supplement","supplier","supply","support","supporter","suppression","supreme","surface","surfboard","surge","surgeon","surgery","surname","surplus","surprise","surround","surroundings","surrounds","survey","survival","survivor","sushi","suspect","suspenders","suspension","sustainment","sustenance","swamp","swan","swanling","swath","sweat","sweater","sweatshirt","sweatshop","sweatsuit","sweets","swell","swim","swimming","swimsuit","swine","swing","switch","switchboard","switching","swivel","sword","swordfight","swordfish","sycamore","symbol","symmetry","sympathy","symptom","syndicate","syndrome","synergy","synod","synonym","synthesis","syrup","system","t-shirt","tab","tabby","tabernacle","table","tablecloth","tablet","tabletop","tachometer","tackle","taco","tactics","tactile","tadpole","tag","tail","tailbud","tailor","tailspin","take-out","takeover","tale","talent","talk","talking","tam-o'-shanter","tamale","tambour","tambourine","tan","tandem","tangerine","tank","tank-top","tanker","tankful","tap","tape","tapioca","target","taro","tarragon","tart","task","tassel","taste","tatami","tattler","tattoo","tavern","tax","taxi","taxicab","taxpayer","tea","teacher","teaching","team","teammate","teapot","tear","tech","technician","technique","technologist","technology","tectonics","teen","teenager","teepee","telephone","telescreen","teletype","television","tell","teller","temp","temper","temperature","temple","tempo","temporariness","temporary","temptation","temptress","tenant","tendency","tender","tenement","tenet","tennis","tenor","tension","tensor","tent","tentacle","tenth","tepee","teriyaki","term","terminal","termination","terminology","termite","terrace","terracotta","terrapin","terrarium","territory","test","testament","testimonial","testimony","testing","text","textbook","textual","texture","thanks","thaw","theater","theft","theism","theme","theology","theory","therapist","therapy","thermals","thermometer","thermostat","thesis","thickness","thief","thigh","thing","thinking","thirst","thistle","thong","thongs","thorn","thought","thousand","thread","threat","threshold","thrift","thrill","throne","thrush","thumb","thump","thunder","thunderbolt","thunderhead","thunderstorm","thyme","tiara","tic","tick","ticket","tide","tie","tiger","tights","tile","till","tilt","timbale","timber","time","timeline","timeout","timer","timetable","timing","timpani","tin","tinderbox","tintype","tip","tire","tissue","titanium","title","toad","toast","toaster","tobacco","today","toe","toenail","toffee","tofu","tog","toga","toilet","tolerance","tolerant","toll","tom-tom","tomatillo","tomato","tomb","tomography","tomorrow","ton","tonality","tone","tongue","tonic","tonight","tool","toot","tooth","toothbrush","toothpaste","toothpick","top","top-hat","topic","topsail","toque","toreador","tornado","torso","torte","tortellini","tortilla","tortoise","total","tote","touch","tough-guy","tour","tourism","tourist","tournament","tow-truck","towel","tower","town","townhouse","township","toy","trace","trachoma","track","tracking","tracksuit","tract","tractor","trade","trader","trading","tradition","traditionalism","traffic","trafficker","tragedy","trail","trailer","trailpatrol","train","trainer","training","trait","tram","trance","transaction","transcript","transfer","transformation","transit","transition","translation","transmission","transom","transparency","transplantation","transport","transportation","trap","trapdoor","trapezium","trapezoid","trash","travel","traveler","tray","treasure","treasury","treat","treatment","treaty","tree","trek","trellis","tremor","trench","trend","triad","trial","triangle","tribe","tributary","trick","trigger","trigonometry","trillion","trim","trinket","trip","tripod","tritone","triumph","trolley","troop","trooper","trophy","trouble","trousers","trout","trove","trowel","truck","trumpet","trunk","trust","trustee","truth","try","tsunami","tub","tuba","tube","tuber","tug","tugboat","tuition","tulip","tumbler","tummy","tuna","tune","tune-up","tunic","tunnel","turban","turf","turkey","turmeric","turn","turning","turnip","turnover","turnstile","turret","turtle","tusk","tussle","tutu","tuxedo","tweet","tweezers","twig","twilight","twine","twins","twist","twister","twitter","type","typeface","typewriter","typhoon","ukulele","ultimatum","umbrella","unblinking","uncertainty","uncle","underclothes","underestimate","underground","underneath","underpants","underpass","undershirt","understanding","understatement","undertaker","underwear","underweight","underwire","underwriting","unemployment","unibody","uniform","uniformity","union","unique","unit","unity","universe","university","update","upgrade","uplift","upper","upstairs","upward","urge","urgency","urn","usage","use","user","usher","usual","utensil","utilisation","utility","utilization","vacation","vaccine","vacuum","vagrant","valance","valentine","validate","validity","valley","valuable","value","vampire","van","vanadyl","vane","vanilla","vanity","variability","variable","variant","variation","variety","vascular","vase","vault","vaulting","veal","vector","vegetable","vegetarian","vegetarianism","vegetation","vehicle","veil","vein","veldt","vellum","velocity","velodrome","velvet","vendor","veneer","vengeance","venison","venom","venti","venture","venue","veranda","verb","verdict","verification","vermicelli","vernacular","verse","version","vertigo","verve","vessel","vest","vestment","vet","veteran","veterinarian","veto","viability","vibraphone","vibration","vibrissae","vice","vicinity","victim","victory","video","view","viewer","vignette","villa","village","vine","vinegar","vineyard","vintage","vintner","vinyl","viola","violation","violence","violet","violin","virtue","virus","visa","viscose","vise","vision","visit","visitor","visor","vista","visual","vitality","vitamin","vitro","vivo","vogue","voice","void","vol","volatility","volcano","volleyball","volume","volunteer","volunteering","vote","voter","voting","voyage","vulture","wafer","waffle","wage","wagon","waist","waistband","wait","waiter","waiting","waitress","waiver","wake","walk","walker","walking","walkway","wall","wallaby","wallet","walnut","walrus","wampum","wannabe","want","war","warden","wardrobe","warfare","warlock","warlord","warm-up","warming","warmth","warning","warrant","warren","warrior","wasabi","wash","washbasin","washcloth","washer","washtub","wasp","waste","wastebasket","wasting","watch","watcher","watchmaker","water","waterbed","watercress","waterfall","waterfront","watermelon","waterskiing","waterspout","waterwheel","wave","waveform","wax","way","weakness","wealth","weapon","wear","weasel","weather","web","webinar","webmail","webpage","website","wedding","wedge","weeder","weedkiller","week","weekend","weekender","weight","weird","welcome","welfare","well","well-being","west","western","wet-bar","wetland","wetsuit","whack","whale","wharf","wheat","wheel","whelp","whey","whip","whirlpool","whirlwind","whisker","whisper","whistle","whole","wholesale","wholesaler","whorl","wick","widget","widow","width","wife","wifi","wild","wildebeest","wilderness","wildlife","will","willingness","willow","win","wind","wind-chime","windage","window","windscreen","windshield","winery","wing","wingman","wingtip","wink","winner","winter","wire","wiretap","wiring","wisdom","wiseguy","wish","wisteria","wit","witch","witch-hunt","withdrawal","witness","wok","wolf","woman","wombat","wonder","wont","wood","woodchuck","woodland","woodshed","woodwind","wool","woolens","word","wording","work","workbench","worker","workforce","workhorse","working","workout","workplace","workshop","world","worm","worry","worship","worshiper","worth","wound","wrap","wraparound","wrapper","wrapping","wreck","wrecker","wren","wrench","wrestler","wriggler","wrinkle","wrist","writer","writing","wrong","xylophone","yacht","yahoo","yak","yam","yang","yard","yarmulke","yarn","yawl","year","yeast","yellowjacket","yesterday","yew","yin","yoga","yogurt","yoke","yolk","young","youngster","yourself","youth","yoyo","yurt","zampone","zebra","zebrafish","zen","zephyr","zero","ziggurat","zinc","zipper","zither","zombie","zone","zoo","zoologist","zoology","zoot-suit","zucchini"],S$u=["a","abaft","aboard","about","above","absent","across","afore","after","against","along","alongside","amid","amidst","among","amongst","an","anenst","anti","apropos","apud","around","as","aside","astride","at","athwart","atop","barring","before","behind","below","beneath","beside","besides","between","beyond","but","by","circa","concerning","considering","despite","down","during","except","excepting","excluding","failing","following","for","forenenst","from","given","in","including","inside","into","lest","like","mid","midst","minus","modulo","near","next","notwithstanding","of","off","on","onto","opposite","out","outside","over","pace","past","per","plus","pro","qua","regarding","round","sans","save","since","than","the","through","throughout","till","times","to","toward","towards","under","underneath","unlike","until","unto","up","upon","versus","via","vice","with","within","without","worth"],B$u=["abandon","abase","abate","abbreviate","abdicate","abduct","abet","abhor","abide","abjure","abnegate","abolish","abominate","abort","abound","abrade","abridge","abrogate","abscond","abseil","absent","absolve","absorb","abstain","abstract","abut","accede","accelerate","accent","accentuate","accept","access","accessorise","accessorize","acclaim","acclimate","acclimatise","acclimatize","accommodate","accompany","accomplish","accord","accost","account","accouter","accoutre","accredit","accrue","acculturate","accumulate","accuse","accustom","ace","ache","achieve","acidify","acknowledge","acquaint","acquiesce","acquire","acquit","act","action","activate","actualise","actualize","actuate","adapt","add","addle","address","adduce","adhere","adjoin","adjourn","adjudge","adjudicate","adjure","adjust","administer","admire","admit","admonish","adopt","adore","adorn","adsorb","adulterate","adumbrate","advance","advantage","advertise","advise","advocate","aerate","affect","affiliate","affirm","affix","afflict","afford","afforest","affront","age","agglomerate","aggravate","aggregate","agitate","agonise","agonize","agree","aid","ail","aim","air","airbrush","airdrop","airfreight","airlift","alarm","alert","alienate","alight","align","allay","allege","alleviate","allocate","allot","allow","alloy","allude","ally","alphabetise","alphabetize","alter","alternate","amalgamate","amass","amaze","amble","ambush","ameliorate","amend","amortise","amortize","amount","amplify","amputate","amuse","anaesthetise","anaesthetize","analyse","anchor","anesthetize","anger","angle","anglicise","anglicize","animate","anneal","annex","annihilate","annotate","announce","annoy","annul","anodise","anodize","anoint","anonymise","anonymize","answer","antagonise","antagonize","antedate","anthologise","anthologize","anticipate","ape","apologise","apologize","apostrophise","apostrophize","appal","appall","appeal","appear","appease","append","appertain","applaud","apply","appoint","apportion","appraise","appreciate","apprehend","apprentice","apprise","approach","appropriate","approve","approximate","aquaplane","arbitrate","arc","arch","archive","argue","arise","arm","arraign","arrange","array","arrest","arrive","arrogate","art","articulate","ascend","ascertain","ascribe","ask","asphyxiate","aspirate","aspire","assail","assassinate","assault","assay","assemble","assent","assert","assess","assign","assimilate","assist","associate","assuage","assume","assure","asterisk","astonish","astound","atomise","atomize","atone","atrophy","attach","attack","attain","attempt","attend","attenuate","attest","attract","attribute","auction","audit","audition","augment","augur","authenticate","author","authorise","authorize","autograph","automate","autosave","autowind","avail","avenge","aver","average","avert","avoid","avow","await","awake","awaken","award","awe","ax","axe","baa","babble","baby","babysit","back","backcomb","backdate","backfill","backfire","backlight","backpack","backspace","backtrack","badger","baffle","bag","bail","bait","bake","balance","bale","ball","balloon","ballot","balls","bamboozle","ban","band","bandage","bandy","banish","bank","bankroll","bankrupt","banter","baptise","baptize","bar","barbecue","bare","bargain","barge","bark","barnstorm","barrack","barrel","barricade","barter","base","bash","bask","baste","bat","batch","bath","bathe","batten","batter","battle","baulk","bawl","bay","bayonet","be","beach","beam","bean","bear","beard","beat","beatbox","beatboxer","beatify","beautify","beckon","become","bedazzle","bedeck","bedevil","beef","beep","beetle","befall","befit","befog","befriend","beg","beget","beggar","begin","begrudge","beguile","behave","behold","behoove","behove","belabor","belabour","belay","belch","belie","believe","belittle","bellow","belly","bellyache","belong","belt","bemoan","bemuse","benchmark","bend","benefit","bequeath","berate","bereave","berth","beseech","beset","besiege","besmirch","bespatter","bespeak","best","bestir","bestow","bestride","bet","betake","betide","betoken","betray","better","bewail","beware","bewilder","bewitch","bias","bicker","bicycle","bid","bide","biff","bifurcate","big","bike","bilk","bill","billet","billow","bin","bind","binge","biodegrade","bird","bisect","bite","bitmap","bivouac","bivvy","blab","blabber","blacken","blackmail","blag","blame","blanch","blank","blanket","blare","blaspheme","blast","blather","blaze","blazon","bleach","bleat","bleed","bleep","blemish","blench","blend","bless","blight","blind","blindfold","blindfolded","blindside","blink","bliss","blister","blitz","bloat","block","blockade","blog","blood","bloom","bloop","blossom","blot","blow","blub","blubber","bludge","bludgeon","bluff","blunder","blunt","blur","blurt","blush","bluster","board","boast","bob","bobble","bode","bodge","bog","boggle","boil","bolster","bolt","bomb","bombard","bond","bonk","boo","boogie","book","bookmark","boom","boomerang","boost","boot","bootleg","bop","border","bore","born","borrow","boss","botch","bother","bottle","bottleful","bottom","bounce","bound","bow","bowdlerise","bowdlerize","bowl","bowlful","box","boycott","braai","brace","braces","bracket","brag","braid","brain","brainstorm","brainwash","braise","brake","branch","brand","brandish","brave","brawl","bray","brazen","breach","break","breakfast","breathalyse","breathalyze","breathe","breed","breeze","brew","bribe","brick","bridge","bridle","brief","brighten","brim","bring","bristle","broach","broadcast","broaden","broadside","broil","broker","brood","brook","browbeat","browse","bruise","bruit","brush","brutalise","brutalize","bubble","buck","bucket","bucketful","buckle","bud","buddy","budge","budget","buff","buffer","buffet","bug","build","bulge","bulk","bulldoze","bully","bum","bumble","bump","bunch","bundle","bungle","bunk","bunker","bunt","buoy","burble","burden","burgeon","burglarize","burgle","burn","burnish","burp","burrow","burst","bury","bus","bushwhack","busk","bust","bustle","busy","butcher","butt","butter","button","buttonhole","buttress","buy","buzz","buzzing","bypass","cable","cache","cackle","caddie","cadge","cage","cajole","cake","calcify","calculate","calibrate","call","calm","calve","camouflage","camp","campaign","can","canalise","canalize","cancel","cane","cannibalise","cannibalize","cannon","cannulate","canoe","canonise","canonize","canst","cant","canter","canvass","cap","caper","capitalise","capitalize","capitulate","capsize","captain","caption","captivate","capture","caramelise","caramelize","carbonise","carbonize","carburise","carburize","card","care","careen","career","caress","caricature","carjack","carol","carom","carouse","carp","carpet","carpool","carry","cart","cartwheel","carve","cascade","case","cash","cashier","casserole","cast","castigate","catalog","catalogue","catalyse","catalyze","catapult","catch","categorise","categorize","cater","caterwaul","catnap","caucus","caulk","cause","cauterise","cauterize","caution","cave","cavil","cavort","caw","cc","cease","cede","celebrate","cement","censor","censure","centralise","centralize","centre","certificate","certify","chafe","chaff","chain","chair","chalk","challenge","champ","champion","chance","change","channel","chant","chaperon","chaperone","char","characterise","characterize","charbroil","charge","chargesheet","chargrill","charm","chart","charter","chase","chasten","chastise","chat","chatter","chauffeur","cheapen","cheat","cheater","check","checkmate","cheek","cheep","cheer","cherish","chew","chicken","chide","chill","chillax","chime","chip","chirp","chisel","chivvy","chlorinate","choke","chomp","choose","chop","choreograph","chortle","chorus","christen","chromakey","chronicle","chuck","chuckle","chunder","chunter","churn","cinch","circle","circulate","circumnavigate","circumscribe","circumvent","cite","civilise","civilize","clack","claim","clam","clamber","clamor","clamour","clamp","clang","clank","clap","clarify","clash","clasp","class","classify","clatter","claw","clean","cleanse","clear","cleave","clench","clerk","click","climb","clinch","cling","clink","clinking","clip","cloak","clobber","clock","clog","clone","clonk","close","closet","clot","clothe","cloud","clout","clown","club","cluck","clue","clump","clunk","cluster","clutch","clutter","coach","coagulate","coalesce","coarsen","coast","coat","coax","cobble","cocoon","coddle","code","codify","coerce","coexist","cogitate","cohabit","cohere","coil","coin","coincide","collaborate","collapse","collar","collate","collect","collectivise","collectivize","collide","colligate","collocate","collude","colonise","colonize","colorize","colour","comb","combat","combine","combust","come","comfort","command","commandeer","commemorate","commence","commend","comment","commentate","commercialise","commercialize","commingle","commiserate","commission","commit","commune","communicate","commute","compact","compare","compartmentalise","compartmentalize","compel","compensate","compete","compile","complain","complement","complete","complicate","compliment","comply","comport","compose","compost","compound","comprehend","compress","comprise","compromise","compute","computerise","computerize","con","conceal","concede","conceive","concentrate","conceptualise","conceptualize","concern","concertina","conciliate","conclude","concoct","concrete","concur","concuss","condemn","condense","condescend","condition","condone","conduct","cone","confer","confess","confide","configure","confine","confirm","confiscate","conflate","conflict","conform","confound","confront","confuse","confute","congeal","congratulate","congregate","conjecture","conjoin","conjugate","conjure","conk","connect","connive","connote","conquer","conscientise","conscientize","conscript","consecrate","consent","conserve","consider","consign","consist","console","consolidate","consort","conspire","constitute","constrain","constrict","construct","construe","consult","consume","consummate","contact","contain","contaminate","contemplate","contend","content","contest","contextualise","contextualize","continue","contort","contract","contradict","contraindicate","contrast","contravene","contribute","contrive","control","controvert","convalesce","convene","converge","converse","convert","convey","convict","convince","convoke","convulse","coo","cook","cool","coop","cooperate","coordinate","cop","cope","coppice","copy","copyright","cordon","core","cork","corkscrew","corner","corral","correct","correlate","correspond","corrode","corrupt","coruscate","cosh","cosset","cost","cosy","cotton","couch","cough","counsel","count","countenance","counter","counteract","counterbalance","counterfeit","countermand","counterpoint","countersign","couple","courier","course","court","covenant","cover","covet","cow","cower","cozy","crackle","cradle","craft","cram","cramp","crane","crank","crate","crave","crawl","crayon","creak","creaking","cream","crease","create","credential","credit","creep","cremate","creolise","creolize","creosote","crest","crew","crib","crick","criminalise","criminalize","crimp","cringe","crinkle","cripple","crisp","criticise","criticize","critique","croak","crochet","crook","croon","crop","cross","crouch","crow","crowd","crown","cruise","crumble","crumple","crunch","crusade","crush","cry","crystallise","crystallize","cube","cuddle","cudgel","cue","cuff","cull","culminate","cultivate","culture","cup","curate","curb","curdle","cure","curl","curry","curse","curtail","curtain","curtsy","curve","cushion","cuss","customise","customize","cut","cwtch","cycle","dab","dabble","dally","dam","damage","damp","dampen","dance","dandle","dangle","dare","darken","darn","dart","dash","date","daub","daunt","dawdle","dawn","daydream","dazzle","deactivate","deaden","deadhead","deafen","deal","debar","debase","debate","debilitate","debit","debrief","debug","debunk","debut","decamp","decant","decay","deceive","decelerate","decentralise","decentralize","decide","decimalise","decimalize","decimate","decipher","deck","declaim","declare","declassify","decline","declutter","decode","decommission","decompose","decompress","deconsecrate","deconstruct","decontaminate","decontrol","decorate","decouple","decoy","decrease","decree","decriminalise","decriminalize","decry","decrypt","dedicate","deduce","deduct","deejay","deem","deepen","deface","defame","default","defeat","defect","defend","defer","defile","define","deflate","deflect","defog","defoliate","deforest","deform","defrag","defragment","defraud","defray","defrock","defrost","defuse","defy","degenerate","deglaze","degrade","degrease","dehumanise","dehumanize","dehydrate","deify","deign","delay","delegate","delete","deliberate","delight","delimit","delineate","deliquesce","deliver","delouse","delude","deluge","delve","demand","demarcate","demean","demerge","demilitarise","demilitarize","demineralise","demineralize","demist","demo","demob","demobilise","demobilize","democratise","democratize","demolish","demonise","demonize","demonstrate","demoralise","demoralize","demote","demotivate","demur","demystify","denationalise","denationalize","denigrate","denitrify","denominate","denote","denounce","dent","denude","deny","depart","depend","depersonalise","depersonalize","depict","deplane","deplete","deplore","deploy","depopulate","deport","depose","deposit","deprave","deprecate","depreciate","depress","depressurise","depressurize","deprive","depute","deputise","deputize","deracinate","derail","dereference","deregulate","deride","derive","derogate","descale","descend","describe","descry","desecrate","desegregate","deselect","desensitise","desensitize","desert","deserve","design","designate","desire","desist","deskill","desolate","despair","despise","despoil","destabilise","destabilize","destock","destroy","detach","detail","detain","detect","deter","deteriorate","determine","detest","dethrone","detonate","detour","detoxify","detract","detrain","devalue","devastate","develop","deviate","devise","devoice","devolve","devote","devour","diagnose","dial","dice","dicker","dictate","die","diet","differ","differentiate","diffract","diffuse","dig","digest","digitalise","digitalize","digitise","digitize","dignify","digress","dilate","dilute","diluted","dim","diminish","dimple","dine","ding","dip","diphthongise","diphthongize","direct","dirty","dis","disable","disabuse","disadvantage","disaffiliate","disafforest","disagree","disallow","disambiguate","disappear","disappoint","disapprove","disarm","disarrange","disassemble","disassociate","disavow","disband","disbar","disbelieve","disburse","discard","discern","discharge","discipline","disclaim","disclose","discolor","discolour","discomfit","discomfort","discompose","disconcert","disconnect","discontinue","discount","discourage","discourse","discover","discredit","discriminate","discuss","disdain","disembark","disembowel","disenfranchise","disengage","disentangle","disestablish","disgorge","disgrace","disguise","disgust","dish","dishearten","dishonor","dishonour","disillusion","disincentivise","disincentivize","disinfect","disinherit","disinhibit","disintegrate","disinter","disinvest","dislike","dislocate","dislodge","dismantle","dismay","dismember","dismiss","dismount","disobey","disorient","disorientate","disown","disparage","dispatch","dispel","dispense","disperse","displace","display","displease","disport","dispose","dispossess","disprove","dispute","disqualify","disregard","disrespect","disrobe","disrupt","dissect","dissemble","disseminate","dissent","dissimulate","dissipate","dissociate","dissolve","dissuade","distance","distend","distil","distill","distinguish","distort","distract","distress","distribute","distrust","disturb","disunite","ditch","dither","dive","diverge","diversify","divert","divest","divide","divine","divorce","divulge","divvy","do","dob","dock","doctor","document","dodge","doff","dog","dole","doll","dollarise","dollarize","domesticate","dominate","don","donate","doodle","doom","doorstep","dop","dope","dose","doss","dot","dote","double","doubt","douse","dovetail","down","downchange","downgrade","downlink","download","downplay","downshift","downsize","dowse","doze","draft","drag","dragoon","drain","dramatise","dramatize","drape","draught","draw","drawl","dread","dream","dredge","drench","dress","dribble","drift","drill","drink","drip","drive","drivel","drizzle","drone","drool","droop","drop","drown","drowse","drug","drum","dry","dub","duck","duckie","ducks","duel","duff","dull","dumb","dumbfound","dump","dunk","dunt","dupe","duplicate","dust","dwarf","dwell","dwindle","dye","dynamite","earmark","earn","earth","ease","eat","eavesdrop","ebb","echo","eclipse","economise","economize","eddy","edge","edify","edit","editorialise","editorialize","educate","efface","effect","effectuate","egg","eject","eke","elaborate","elapse","elbow","elect","electrify","electrocute","electroplate","elevate","elicit","elide","eliminate","elongate","elope","elucidate","elude","email","emanate","emancipate","embalm","embargo","embark","embarrass","embed","embellish","embezzle","embitter","emblazon","embody","embolden","emboss","embrace","embroider","embroil","emcee","emend","emerge","emigrate","emit","emote","empathise","empathize","emphasise","emphasize","employ","empower","empty","emulate","emulsify","enable","enact","encamp","encapsulate","encase","encash","enchant","encircle","enclose","encode","encompass","encounter","encourage","encroach","encrypt","encumber","end","endanger","endear","endeavor","endeavour","endorse","endow","endure","energise","energize","enervate","enfeeble","enfold","enforce","enfranchise","engage","engender","engineer","engorge","engrave","engross","engulf","enhance","enjoin","enjoy","enlarge","enlighten","enlist","enliven","enmesh","ennoble","enquire","enrage","enrapture","enrich","enrol","enroll","ensconce","enshrine","enshroud","ensnare","ensue","ensure","entail","entangle","enter","entertain","enthral","enthrall","enthrone","enthuse","entice","entitle","entomb","entrance","entrap","entreat","entrench","entrust","entwine","enumerate","enunciate","envelop","envisage","envision","envy","epitomise","epitomize","equal","equalise","equalize","equate","equip","equivocate","eradicate","erase","erode","err","erupt","escalate","escape","eschew","espouse","espy","essay","establish","esteem","estimate","etch","eulogise","eulogize","euthanise","euthanize","evacuate","evade","evaluate","evangelise","evangelize","evaporate","even","eventuate","evict","evidence","evince","eviscerate","evoke","evolve","exacerbate","exact","exaggerate","exalt","examine","exasperate","excavate","exceed","excel","except","excerpt","exchange","excise","excite","exclaim","exclude","excommunicate","excoriate","excrete","exculpate","excuse","execute","exemplify","exempt","exercise","exert","exeunt","exfoliate","exhale","exhaust","exhibit","exhilarate","exhort","exhume","exile","exist","exit","exonerate","exorcise","exorcize","expand","expatiate","expect","expectorate","expedite","expel","expend","experience","experiment","expiate","expire","explain","explicate","explode","exploit","explore","export","expose","expostulate","expound","express","expropriate","expunge","expurgate","extemporise","extemporize","extend","exterminate","externalise","externalize","extinguish","extirpate","extol","extort","extract","extradite","extrapolate","extricate","extrude","exude","exult","eye","eyeball","eyeglasses","fabricate","face","facilitate","factor","factorise","factorize","fade","faff","fail","faint","fake","fall","falsify","falter","familiarise","familiarize","fan","fancy","fantasise","fantasize","fare","farewell","farm","farrow","fascinate","fashion","fast","fasten","father","fathom","fatten","fault","favor","favour","fawn","fax","faze","fear","feast","feather","feature","federate","feed","feel","feign","feint","fell","feminise","feminize","fence","fend","ferment","ferret","ferry","fertilise","fertilize","fess","fester","festoon","fetch","fete","fetter","feud","fib","fictionalise","fictionalize","fiddle","fidget","field","fight","figure","filch","file","filibuster","fill","fillet","film","filter","finagle","finalise","finalize","finance","find","fine","finesse","fingerprint","finish","fire","firebomb","firm","fish","fishtail","fit","fix","fizz","fizzle","flag","flagellate","flail","flake","flame","flank","flap","flare","flash","flat","flatline","flatten","flatter","flaunt","flavour","flay","fleck","flee","fleece","flesh","flex","flick","flicker","flight","flinch","fling","flip","flirt","flit","float","flock","flog","flood","floodlight","floor","flop","floss","flounce","flounder","flour","flourish","flout","flow","flower","flub","fluctuate","fluff","flummox","flunk","flush","fluster","flutter","fly","foal","foam","fob","focalise","focalize","focus","fog","foil","foist","fold","follow","foment","fool","foot","forage","forbear","forbid","force","ford","forearm","forecast","foreclose","foregather","foreground","foresee","foreshadow","foreshorten","forestall","foretell","forewarn","forfeit","forfend","forgather","forge","forget","forgive","forgo","fork","form","formalise","formalize","format","formulate","forsake","forswear","fortify","forward","forwards","fossick","fossilise","fossilize","foster","foul","found","founder","fox","fracture","fragment","frame","franchise","frank","fraternise","fraternize","fray","freak","free","freelance","freeload","freestyle","freewheel","freeze","freight","frequent","freshen","fret","frighten","fringe","frisk","fritter","frizz","frizzle","frogmarch","frolic","front","frost","froth","frown","fruit","frustrate","fry","fudge","fuel","fulfil","fulfill","fulminate","fumble","fume","fumigate","function","fund","funk","funnel","furl","furlough","furnish","furrow","further","fuse","fuss","gab","gabble","gad","gag","gain","gainsay","gall","gallivant","gallop","galumph","galvanise","galvanize","gamble","gambol","gang","gape","garage","garden","gargle","garland","garner","garnish","garrison","garrote","garrotte","gas","gash","gasp","gatecrash","gather","gauge","gawk","gawp","gaze","gazump","gazunder","gear","gee","gel","geld","gen","generalise","generalize","generate","gentrify","genuflect","germinate","gerrymander","gestate","gesticulate","gesture","get","ghost","ghostwrite","gibber","gift","giggle","gild","ginger","gird","girdle","give","gladden","glamorise","glamorize","glance","glare","glass","glaze","gleam","glean","glide","glimmer","glimmering","glimpse","glint","glisten","glister","glitter","gloat","globalise","globalize","glom","glorify","glory","gloss","glow","glower","glue","glug","glut","gnash","gnaw","go","goad","gobble","goggle","goldbrick","goof","google","goose","gore","gorge","gossip","gouge","govern","grab","grace","grade","graduate","graft","grant","grapple","grasp","grass","grate","gratify","gravitate","graze","grease","green","greet","grey","grieve","grill","grimace","grin","grind","grip","gripe","grit","grizzle","groan","grok","groom","grouch","ground","group","grouse","grout","grovel","grow","growl","grub","grudge","grumble","grunt","guarantee","guard","guess","guest","guffaw","guide","guillotine","guilt","gulp","gum","gun","gurgle","gurn","gush","gussy","gust","gut","gutter","guzzle","gybe","gyrate","hack","haemorrhage","haggle","hail","hallmark","halloo","hallucinate","halt","halve","ham","hammer","hamper","hamstring","hand","handcuff","handicap","handle","hang","hanker","happen","harangue","harass","harbor","harbour","harden","hare","hark","harm","harmonise","harmonize","harness","harp","harpoon","harrow","harrumph","harry","harvest","hash","hassle","hasten","hatch","hate","haul","haunt","have","haw","hawk","hazard","haze","head","headbutt","headhunt","headline","heal","heap","hear","hearken","hearten","heat","heave","heckle","hector","hedge","heed","heel","heft","heighten","heist","help","hem","hemorrhage","herald","herd","hesitate","hew","hex","hibernate","hiccough","hiccup","hide","hie","highball","highlight","hightail","hijack","hike","hinder","hinge","hint","hire","hiss","hit","hitch","hitchhike","hive","hoard","hoax","hobble","hobnob","hock","hog","hoick","hoist","hold","hole","holiday","holler","hollow","holster","home","homeschool","homestead","hone","honeymoon","honk","honour","hoodwink","hoof","hook","hoon","hoot","hoover","hop","hope","horn","horrify","horse","horsewhip","hose","hosepipe","hospitalise","hospitalize","host","hot","hotfoot","hound","house","hover","howl","huddle","huff","hug","hull","hum","humanise","humanize","humble","humiliate","humour","hunch","hunger","hunker","hunt","hurdle","hurl","hurry","hurt","hurtle","husband","hush","husk","hustle","hybridise","hybridize","hydrate","hydroplane","hype","hyperventilate","hyphenate","hypnotise","hypnotize","hypothesise","hypothesize","ice","iconify","idealise","idealize","ideate","identify","idle","idolise","idolize","ignite","ignore","illuminate","illumine","illustrate","imagine","imagineer","imbibe","imbue","imitate","immerse","immigrate","immobilise","immobilize","immolate","immortalise","immortalize","immunise","immunize","immure","impact","impair","impale","impanel","impart","impeach","impede","impel","imperil","impersonate","impinge","implant","implement","implicate","implode","implore","imply","import","importune","impose","impound","impoverish","impress","imprint","imprison","improve","improvise","impugn","inactivate","inaugurate","incapacitate","incarcerate","incarnate","incense","incentivise","incentivize","inch","incinerate","incise","incite","incline","include","incommode","inconvenience","incorporate","increase","incriminate","incubate","inculcate","incur","indemnify","indent","index","indicate","indict","individualise","individualize","individuate","indoctrinate","induce","induct","indulge","industrialise","industrialize","infantilise","infantilize","infect","infer","infest","infill","infiltrate","inflame","inflate","inflect","inflict","influence","inform","infringe","infuriate","infuse","ingest","ingratiate","inhabit","inhale","inhere","inherit","inhibit","initial","initialise","initialize","initiate","inject","injure","ink","inlay","innovate","inoculate","input","inscribe","insert","inset","insinuate","insist","inspect","inspire","install","instance","instigate","instil","instill","institute","institutionalise","institutionalize","instruct","insulate","insult","insure","integrate","intend","intensify","inter","interact","intercede","intercept","interchange","interconnect","intercut","interest","interface","interfere","interject","interlace","interleave","interlink","interlock","intermarry","intermesh","intermingle","intermix","intern","internalise","internalize","internationalise","internationalize","interpenetrate","interpolate","interpose","interpret","interrelate","interrogate","interrupt","intersect","intersperse","intertwine","intervene","interview","interweave","interwork","intimate","intimidate","intone","intoxicate","intrigue","introduce","intrude","intubate","intuit","inundate","inure","invade","invalid","invalidate","inveigh","inveigle","invent","inventory","invert","invest","investigate","invigilate","invigorate","invite","invoice","invoke","involve","ionise","ionize","irk","iron","irradiate","irrigate","irritate","irrupt","isolate","issue","italicise","italicize","itch","itemise","itemize","iterate","jab","jabber","jack","jackknife","jail","jam","jangle","jar","jaw","jaywalk","jazz","jeer","jell","jeopardise","jeopardize","jest","jet","jettison","jib","jibe","jiggle","jilt","jingle","jink","jinx","jive","jockey","jog","joggle","join","joint","joke","jol","jolly","jolt","josh","jostle","jot","journey","joust","judder","judge","juggle","juice","jumble","jump","junk","justify","jut","juxtapose","keel","keelhaul","keen","keep","ken","key","keyboard","kibitz","kick","kid","kindle","kip","kiss","kit","kite","klap","kludge","knacker","knead","knee","kneecap","kneel","knife","knight","knit","knock","knot","know","knuckle","kowtow","kvetch","label","labour","lace","lacerate","lack","lacquer","ladder","ladle","lag","lam","lamb","lambast","lambaste","lament","lamp","lampoon","lance","land","lands","landscape","languish","lap","lapse","lard","large","lark","lash","lasso","last","latch","lather","laud","laugh","launch","launder","lavish","lay","layer","laze","leach","lead","leaf","leaflet","leak","lean","leap","leapfrog","learn","lease","leash","leave","leaven","lecture","leer","leg","legalise","legalize","legislate","legitimise","legitimize","lend","lengthen","lessen","let","letter","letterbox","level","lever","leverage","levitate","levy","liaise","libel","liberalise","liberalize","liberate","license","lick","lie","lift","ligate","light","lighten","like","liken","limber","lime","limit","limp","line","linger","link","lionise","lionize","liquefy","liquidate","liquidise","liquidize","lisp","list","listen","litigate","litter","live","liven","load","loads","loaf","loan","loathe","lob","lobby","lobotomise","lobotomize","localise","localize","locate","lock","lodge","loft","log","loiter","loll","lollop","long","look","looks","loom","loop","loose","loosen","loot","lop","lope","lord","lose","lounge","lour","louse","love","low","lowball","lower","lubricate","luck","lug","lull","lumber","lump","lunch","lunge","lurch","lure","lurk","luxuriate","macerate","machine","madden","magic","magnetise","magnetize","magnify","mail","maim","mainline","mainstream","maintain","major","make","malfunction","malign","malinger","maltreat","man","manacle","manage","mandate","mangle","manhandle","manicure","manifest","manipulate","manoeuvre","mantle","manufacture","manure","map","mar","march","marginalise","marginalize","marinate","mark","market","maroon","marry","marshal","martyr","marvel","masculinise","masculinize","mash","mask","masquerade","mass","massacre","massage","master","mastermind","masticate","match","materialise","materialize","matriculate","matter","mature","maul","maunder","max","maximise","maximize","mean","meander","measure","mechanise","mechanize","medal","meddle","mediate","medicate","meditate","meet","meld","mellow","melt","memorialise","memorialize","memorise","memorize","menace","mend","mention","meow","mercerise","mercerize","merchandise","merge","merit","mesh","mesmerise","mesmerize","mess","message","metabolise","metabolize","metamorphose","mete","meter","methinks","mew","mewl","miaow","microblog","microchip","micromanage","microwave","micturate","migrate","militarise","militarize","militate","milk","mill","mime","mimic","mince","mind","mine","mingle","miniaturise","miniaturize","minimise","minimize","minister","minor","mint","minute","mirror","misapply","misappropriate","misbehave","miscalculate","miscast","misconceive","misconstrue","miscount","misdiagnose","misdial","misdirect","misfile","misfire","misgovern","mishandle","mishear","mishit","misinform","misinterpret","misjudge","miskey","mislay","mislead","mismanage","mismatch","misname","misplace","misplay","mispronounce","misquote","misread","misreport","misrepresent","miss","mission","misspell","misspend","mist","mistake","mistime","mistreat","mistrust","misunderstand","misuse","mitigate","mitre","mix","moan","mob","mobilise","mobilize","mock","mod","model","moderate","modernise","modernize","modify","modulate","moisten","moisturise","moisturize","mold","molder","mollify","mollycoddle","molt","monitor","monopolise","monopolize","moo","mooch","moon","moonlight","moonwalk","moor","moot","mop","mope","moralise","moralize","morph","mortar","mortgage","mortify","mosey","mosh","mothball","mother","motion","motivate","motor","mould","moulder","moult","mount","mourn","mouse","mouth","move","movies","mow","muck","muddle","muddy","muffle","mug","mulch","mull","multicast","multiply","multitask","mumble","mumbling","mummify","munch","murmur","murmuring","murmurings","muscle","muse","mushroom","muss","muster","mutate","mute","mutilate","mutiny","mutter","muzzle","mystify","nab","nag","nail","name","namecheck","nap","narrate","narrow","narrowcast","nasalise","nasalize","nationalise","nationalize","natter","naturalise","naturalize","nauseate","navigate","near","nearer","nearest","neaten","necessitate","neck","necklace","need","needle","negate","negative","neglect","negotiate","neigh","nerve","nest","nestle","net","nettle","network","neuter","neutralise","neutralize","nibble","nick","nickname","nitrify","nix","nobble","nod","nominalize","nominate","norm","normalise","normalize","nose","nosedive","nosh","notarise","notarize","notch","note","notice","notify","nourish","nudge","nuke","nullify","numb","number","nurse","nurture","nut","nuzzle","obey","obfuscate","object","objectify","oblige","obliterate","obscure","observe","obsess","obstruct","obtain","obtrude","obviate","occasion","occlude","occupy","occur","off","offend","offer","officiate","offload","offset","offshore","ogle","oil","okay","omit","ooze","open","operate","opine","oppose","oppress","opt","optimise","optimize","option","orbit","orchestrate","ordain","order","organise","organize","orient","orientate","originate","ornament","orphan","oscillate","ossify","ostracise","ostracize","oust","out","outbid","outclass","outdistance","outdo","outface","outfit","outflank","outfox","outgrow","outgun","outlast","outlaw","outline","outlive","outmaneuver","outmanoeuvre","outnumber","outpace","outperform","outplay","outpoint","output","outrage","outrank","outrun","outsell","outshine","outsmart","outsource","outstay","outstrip","outvote","outweigh","outwit","overachieve","overact","overawe","overbalance","overbook","overburden","overcharge","overcome","overcompensate","overcook","overdevelop","overdo","overdose","overdraw","overdub","overeat","overemphasize","overestimate","overexpose","overextend","overfeed","overflow","overfly","overgeneralise","overgeneralize","overgraze","overhang","overhaul","overhear","overheat","overindulge","overlap","overlay","overlie","overload","overlook","overpay","overplay","overpower","overprint","overproduce","overrate","overreach","overreact","override","overrule","overrun","oversee","oversell","overshadow","overshoot","oversimplify","oversleep","overspend","overstate","overstay","overstep","overstock","overstretch","overtake","overtax","overthrow","overtrain","overturn","overuse","overvalue","overwhelm","overwinter","overwork","overwrite","owe","own","oxidise","oxidize","oxygenate","pace","pacify","pack","package","packetise","packetize","pad","paddle","padlock","page","paginate","pailful","pain","paint","pair","pal","palatalise","palatalize","pale","pall","palliate","palm","palpate","palpitate","pamper","pan","pander","panel","panhandle","panic","pant","paper","parachute","parade","parallel","paralyse","paralyze","paraphrase","parboil","parcel","parch","pardon","pare","park","parlay","parley","parody","parole","parrot","parry","parse","part","partake","participate","particularise","particularize","partition","partner","party","pass","passivise","passivize","paste","pasteurise","pasteurize","pasture","pat","patch","patent","patrol","patronise","patronize","patter","pattern","pause","pave","paw","pawn","pay","peak","peal","pedal","peddle","pedestrianise","pedestrianize","peek","peel","peep","peer","peg","pelt","pen","penalise","penalize","pencil","pension","people","pep","pepper","perambulate","perceive","perch","percolate","perfect","perforate","perform","perfume","perish","perjure","perk","perm","permeate","permit","perpetrate","perpetuate","perplex","persecute","persevere","persist","personalise","personalize","personify","perspire","persuade","pertain","perturb","peruse","pervade","pervert","pester","pet","peter","petition","petrify","phase","philosophise","philosophize","phone","photocopy","photograph","photoshop","photosynthesise","photosynthesize","phrase","pick","picket","pickle","picnic","picture","picturise","picturize","piddle","piece","pierce","pig","pigeonhole","piggyback","pike","pile","pilfer","pill","pillage","pillory","pillow","pilot","pin","pinch","pine","ping","pinion","pink","pinpoint","pioneer","pip","pipe","pique","pirate","pirouette","pit","pitch","pity","pivot","pixelate","pixellate","placate","place","plagiarise","plagiarize","plague","plait","plan","plane","plant","plaster","plasticise","plasticize","plate","plateau","play","plead","please","pledge","plight","plod","plonk","plop","plot","plough","pluck","plug","plumb","plummet","plump","plunder","plunge","plunk","pluralise","pluralize","ply","poach","pocket","point","poise","poison","poke","polarise","polarize","pole","poleax","poleaxe","police","polish","politicise","politicize","poll","pollard","pollinate","pollute","polymerise","polymerize","ponce","ponder","pong","pontificate","pony","pooh","pool","pootle","pop","popularise","popularize","populate","pore","port","portend","portion","portray","pose","posit","position","possess","posset","post","postmark","postpone","postulate","posture","pot","potter","pounce","pound","pour","pout","powder","power","practice","practise","praise","praises","prance","prang","prate","prattle","pray","preach","precede","precipitate","precis","preclude","predate","predecease","predetermine","predicate","predict","predispose","predominate","preen","preface","prefer","prefigure","prefix","preheat","prejudge","prejudice","preload","premaster","premiere","preoccupy","prep","prepare","prepone","preregister","presage","prescind","prescribe","preselect","presell","present","preserve","preset","preside","press","pressure","pressurise","pressurize","presume","presuppose","pretend","pretest","prettify","prevail","prevaricate","prevent","preview","prey","price","prickle","pride","prime","primp","print","prioritise","prioritize","prise","privatise","privatize","privilege","prize","probate","probe","proceed","process","proclaim","procrastinate","procreate","proctor","procure","prod","produce","profane","profess","professionalise","professionalize","proffer","profile","profit","program","programme","progress","prohibit","project","proliferate","prolong","promenade","promise","promote","prompt","promulgate","pronounce","proof","proofread","prop","propagandise","propagandize","propagate","propel","prophesy","propitiate","propose","proposition","propound","proscribe","prosecute","proselytise","proselytize","prospect","prosper","prostrate","protect","protest","protrude","prove","provide","provision","provoke","prowl","prune","pry","psych","psychoanalyse","publicise","publicize","publish","pucker","puff","pull","pullulate","pulp","pulsate","pulse","pulverise","pulverize","pummel","pump","pun","punch","punctuate","puncture","punish","punt","pupate","purchase","purge","purify","purl","purloin","purport","purr","purse","pursue","purvey","push","pussyfoot","put","putrefy","putt","putter","puzzle","quack","quadruple","quaff","quail","quake","qualify","quantify","quarantine","quarrel","quarry","quarter","quarterback","quash","quaver","quell","quench","query","quest","question","queue","quibble","quicken","quiet","quieten","quintuple","quip","quirk","quit","quiver","quiz","quote","quoth","rabbit","race","rack","radiate","radicalise","radicalize","radio","raffle","rag","rage","raid","rail","railroad","rain","raise","rake","rally","ram","ramble","ramp","rampage","randomise","randomize","range","rank","rankle","ransack","ransom","rant","rap","rappel","rasp","rasterise","rasterize","rat","ratchet","rate","ratify","ration","rationalise","rationalize","rattle","ravage","rave","ravel","ravish","raze","razz","reach","reacquaint","react","reactivate","read","readdress","readies","readjust","readmit","ready","reaffirm","realign","realise","realize","reallocate","ream","reanimate","reap","reappear","reapply","reappoint","reappraise","rear","rearm","rearrange","reason","reassemble","reassert","reassess","reassign","reassure","reawaken","rebel","reboot","reborn","rebound","rebrand","rebuff","rebuild","rebuke","rebut","recall","recant","recap","recapitulate","recapture","recast","recede","receive","recess","recharge","reciprocate","recite","reckon","reclaim","reclassify","recline","recognise","recognize","recoil","recollect","recommence","recommend","recompense","reconcile","recondition","reconfigure","reconfirm","reconnect","reconnoitre","reconquer","reconsider","reconstitute","reconstruct","reconvene","record","recount","recoup","recover","recreate","recrudesce","recruit","rectify","recuperate","recur","recycle","redact","redden","redecorate","redeem","redefine","redeploy","redesign","redevelop","redial","redirect","rediscover","redistribute","redistrict","redo","redouble","redound","redraft","redraw","redress","reduce","reduplicate","reef","reek","reel","ref","refer","referee","reference","refill","refinance","refine","refit","reflate","reflect","refloat","refocus","reform","reformat","reformulate","refract","refrain","refresh","refrigerate","refuel","refund","refurbish","refuse","refute","regain","regale","regard","regenerate","register","regress","regret","regroup","regularise","regularize","regulate","regurgitate","rehabilitate","rehash","rehear","rehearse","reheat","rehome","rehouse","reign","reignite","reimburse","rein","reincarnate","reinforce","reinstate","reinterpret","reintroduce","reinvent","reinvest","reinvigorate","reissue","reiterate","reject","rejig","rejigger","rejoice","rejoin","rejuvenate","rekindle","relapse","relate","relaunch","relax","relay","release","relegate","relent","relieve","relinquish","relish","relive","reload","relocate","rely","remain","remainder","remake","remand","remap","remark","remarry","remaster","remediate","remedy","remember","remind","reminisce","remit","remix","remodel","remonstrate","remortgage","remould","remount","remove","remunerate","rename","rend","render","rendezvous","renege","renew","renounce","renovate","rent","reoccur","reoffend","reopen","reorder","reorganise","reorganize","reorient","repackage","repair","repatriate","repay","repeal","repeat","repel","repent","rephrase","replace","replay","replenish","replicate","reply","report","repose","repossess","represent","repress","reprieve","reprimand","reprint","reproach","reprocess","reproduce","reprove","repudiate","repulse","repurpose","request","require","requisition","requite","rerun","reschedule","rescind","rescue","research","researches","resect","resell","resemble","resent","reserve","reset","resettle","reshape","reshuffle","reside","resign","resist","resit","resize","reskill","resolve","resonate","resort","resound","resource","respect","respire","respond","respray","rest","restart","restate","restock","restore","restrain","restrict","restring","restructure","result","resume","resupply","resurface","resurrect","resuscitate","retail","retain","retake","retaliate","retch","retell","retest","rethink","retire","retool","retort","retouch","retrace","retract","retrain","retreat","retrench","retrieve","retrofit","retry","return","reunify","reunite","reuse","rev","revalue","revamp","reveal","revel","revenge","reverberate","revere","reverse","revert","review","revile","revise","revisit","revitalise","revitalize","revive","revivify","revoke","revolt","revolutionise","revolutionize","revolve","reward","rewind","rewire","reword","rework","rewrite","rhapsodise","rhapsodize","rhyme","rib","rick","ricochet","rid","riddle","ride","ridge","ridicule","riffle","rifle","rig","right","rightsize","rile","rim","ring","rinse","riot","rip","ripen","riposte","ripple","rise","risk","ritualise","ritualize","rival","rivet","roam","roar","roast","rob","robe","rock","rocket","roger","roll","romance","romanticise","romanticize","romp","roof","room","roost","root","rope","rosin","roster","rot","rotate","rouge","rough","roughen","roughhouse","round","rouse","roust","rout","route","rove","row","rub","rubberneck","rubbish","ruck","rue","ruffle","ruin","ruins","rule","rumble","ruminate","rummage","rumor","rumour","rumple","run","rupture","rush","rust","rustle","sabotage","sack","sacrifice","sadden","saddle","safeguard","sag","sail","salaam","salivate","sally","salt","salute","salvage","salve","sample","sanctify","sanction","sand","sandbag","sandblast","sandpaper","sandwich","sanitise","sanitize","sap","sashay","sass","sate","satiate","satirise","satirize","satisfy","saturate","saunter","savage","save","savor","savour","saw","say","scald","scale","scallop","scalp","scamper","scan","scandalise","scandalize","scapegoat","scar","scare","scarf","scarify","scarper","scatter","scattering","scavenge","scent","schedule","schematise","schematize","scheme","schlep","schlepp","schmooze","school","schtup","schuss","scoff","scold","scoop","scoot","scope","scorch","score","scorn","scotch","scour","scourge","scout","scowl","scrabble","scram","scramble","scrap","scrape","scratch","scrawl","scream","screech","screen","screw","scribble","scrimp","script","scroll","scrounge","scrub","scrummage","scrunch","scruple","scrutinise","scrutinize","scud","scuff","scuffle","scull","sculpt","scupper","scurry","scuttle","scythe","seal","sealift","sear","search","season","seat","secede","seclude","second","secrete","section","secularise","secularize","secure","sedate","see","seed","seek","seep","seethe","segment","segregate","segue","seize","select","sell","sellotape","semaphore","send","sensationalise","sensationalize","sense","sensitise","sensitize","sentence","sentimentalise","sentimentalize","separate","sequence","sequester","sequestrate","serenade","serialise","serialize","sermonise","sermonize","serve","service","set","settle","sever","sew","shack","shackle","shade","shadow","shaft","shake","shalt","sham","shamble","shame","shampoo","shanghai","shape","share","sharpen","shatter","shave","shear","sheathe","shed","sheer","shell","shellac","shelter","shelve","shepherd","shield","shift","shimmer","shimmy","shin","shine","shinny","ship","shipwreck","shirk","shiver","shock","shoe","shoehorn","shoo","shoot","shop","shoplift","shore","short","shorten","shortlist","shoulder","shout","shove","shovel","show","showboat","showcase","shower","shred","shriek","shrill","shrink","shrivel","shroom","shroud","shrug","shuck","shudder","shuffle","shun","shunt","shush","shut","shuttle","shy","sic","sick","sicken","side","sideline","sidestep","sideswipe","sidetrack","sidle","sieve","sift","sigh","sight","sightsee","sign","signal","signify","signpost","silence","silhouette","silt","silver","simmer","simper","simplify","simulate","simulcast","sin","sing","singe","single","sink","sip","siphon","sire","sit","site","situate","size","sizzle","skate","skateboard","skedaddle","sketch","skew","skewer","ski","skid","skim","skimp","skin","skip","skipper","skirmish","skirt","skitter","skive","skivvy","skulk","sky","skyjack","skyrocket","slack","slacken","slake","slam","slander","slap","slash","slate","slather","sledge","sleek","sleep","sleepwalk","sleet","slew","slice","slick","slide","slight","slim","sling","slink","slip","slit","slither","slob","slobber","slog","slop","slope","slosh","slot","slouch","slough","slow","slug","sluice","slum","slumber","slump","slur","slurp","smart","smarten","smash","smear","smell","smelt","smile","smirk","smite","smoke","smooch","smoodge","smooth","smother","smoulder","smudge","smuggle","snack","snaffle","snag","snaggle","snake","snap","snare","snarf","snarl","sneak","sneer","sneeze","snicker","sniff","sniffle","snip","snipe","snitch","snivel","snooker","snoop","snooper","snooze","snore","snorkel","snort","snow","snowball","snowplough","snowplow","snub","snuffle","snuffling","snuggle","soak","soap","soar","sober","socialise","socialize","sock","sod","soften","soil","sojourn","solace","solder","soldier","sole","solemnise","solemnize","solicit","solidify","soliloquize","solve","somersault","soothe","sorrow","sort","sough","sound","soundproof","soup","sour","source","sow","space","span","spangle","spar","spare","spark","sparkle","spatter","spattering","spawn","spay","speak","spear","spearhead","spec","specialise","specialize","specify","spectacles","spectate","speculate","speed","spell","spellcheck","spend","spew","spice","spiff","spike","spill","spin","spiral","spirit","spit","spite","splash","splatter","splay","splice","splinter","split","splosh","splurge","splutter","spoil","sponge","sponsor","spoof","spook","spool","spoon","sport","sports","spot","spotlight","spout","sprain","sprawl","spray","spread","spring","springboard","sprinkle","sprint","spritz","sprout","spruce","spur","spurn","spurt","sputter","spy","squabble","squall","squander","square","squash","squat","squawk","squeak","squeal","squeeze","squelch","squint","squirm","squirrel","squirt","squish","stab","stabilise","stabilize","stable","stables","stack","staff","stage","stagger","stagnate","stain","stake","stalk","stall","stammer","stamp","stampede","stanch","stand","standardise","standardize","staple","star","starch","stare","start","startle","starve","stash","state","statement","station","staunch","stave","stay","steady","steal","steam","steamroller","steel","steep","steepen","steer","stem","stencil","step","stereotype","sterilise","sterilize","stew","stick","stickybeak","stiff","stiffen","stifle","stigmatise","stigmatize","still","stimulate","sting","stinger","stink","stint","stipple","stipulate","stir","stitch","stock","stockpile","stoke","stomach","stomp","stone","stonewall","stoop","stop","stopper","store","storm","storyboard","stow","straddle","strafe","straggle","straighten","strain","strand","strangle","strap","stratify","stravage","stravaig","stray","streak","stream","streamline","strengthen","stress","stretch","stretcher","strew","stride","strike","string","strip","strive","stroll","structure","struggle","strum","strut","stub","stud","study","stuff","stultify","stumble","stump","stun","stunt","stupefy","stutter","style","stymie","sub","subcontract","subdivide","subdue","subedit","subject","sublet","sublimate","submerge","submit","subordinate","suborn","subpoena","subscribe","subside","subsidise","subsidize","subsist","substantiate","substitute","subsume","subtend","subtitle","subtract","subvert","succeed","succor","succour","succumb","suckle","suction","sue","suffer","suffice","suffocate","suffuse","sugar","suggest","suit","sulk","sulks","sully","sum","summarise","summarize","summon","summons","sun","sunbathe","sunder","sunset","sup","superimpose","superintend","superpose","supersede","supersize","supersized","supervene","supervise","supplant","supplement","supply","support","suppose","suppress","suppurate","surcharge","surf","surface","surge","surmise","surmount","surpass","surprise","surrender","surround","survey","survive","suspect","suspend","suspenders","suss","sustain","suture","swab","swaddle","swagger","swamp","swan","swank","swap","swarm","swat","swath","swathe","sway","swear","sweat","sweep","sweeps","sweeten","swell","swelter","swerve","swig","swill","swim","swindle","swing","swipe","swirl","swish","switch","swivel","swoon","swoop","swoosh","swot","symbolise","symbolize","sympathise","sympathize","symptomize","synchronise","synchronize","syndicate","synthesise","synthesize","syringe","systematise","systematize","tab","table","tabulate","tack","tackle","tag","tail","tailgate","tailor","taint","take","talk","tally","tame","tamp","tamper","tan","tangle","tango","tank","tankful","tantalise","tantalize","tap","tape","taper","tar","target","tarmac","tarnish","tarry","tart","task","taste","tattle","tattoo","taunt","tauten","tax","taxi","taxicab","teach","team","tear","tease","tee","teem","teeter","teethe","telecast","telecommute","teleconference","telegraph","telemeter","teleoperate","telephone","teleport","telescope","televise","telex","tell","telnet","temp","temper","temporise","temporize","tempt","tenant","tend","tender","tenderise","tenderize","tense","tension","tergiversate","term","terminate","terraform","terrify","terrorise","terrorize","test","testify","tether","text","thank","thatch","thaw","theorise","theorize","thicken","thin","think","thirst","thrash","thread","threaten","thresh","thrill","thrive","throb","throbbing","throng","throttle","throw","thud","thumb","thump","thunder","thwack","thwart","tick","ticket","tickle","tide","tidy","tie","tighten","tile","till","tilt","time","timetable","tinge","tingle","tingling","tinker","tinkling","tint","tip","tippex","tipple","tiptoe","tire","titillate","titivate","title","titrate","titter","toady","toast","toboggan","toddle","toe","tog","toggle","toil","tolerate","toll","tone","tongue","tonify","tool","toot","tootle","top","topple","torch","torment","torpedo","toss","tot","total","tote","totter","touch","tough","toughen","tour","tousle","tout","tow","towel","tower","toy","trace","track","trade","traduce","traffic","trail","train","traipse","trammel","trample","trampoline","tranquilize","tranquillize","transact","transcend","transcribe","transfer","transfigure","transfix","transform","transfuse","transgress","transit","translate","transliterate","transmit","transmogrify","transmute","transpire","transplant","transport","transpose","trap","trash","traumatise","traumatize","travel","traverse","trawl","tread","treasure","treat","treble","trek","tremble","trembling","trepan","trespass","trial","trick","trickle","trifle","trigger","trill","trim","trip","triple","triumph","trivialise","trivialize","troll","tromp","troop","trot","trouble","troubleshoot","trounce","trouser","truant","truck","trudge","trump","trumpet","truncate","trundle","truss","trust","try","tuck","tug","tugboat","tumble","tune","tunnel","turbocharge","turf","turn","tussle","tut","tutor","twang","tweak","tweet","twiddle","twig","twin","twine","twinkle","twirl","twist","twitch","twitter","twittering","type","typecast","typeset","typify","tyrannise","tyrannize","ulcerate","ululate","ump","umpire","unbalance","unban","unbend","unblock","unbuckle","unburden","unbutton","uncoil","uncork","uncouple","uncover","uncurl","undelete","underachieve","underbid","undercharge","undercook","undercut","underestimate","underestimation","underexpose","undergo","underlie","underline","undermine","underpay","underperform","underpin","underplay","underrate","underscore","undersell","undershoot","underspend","understand","understate","understudy","undertake","undervalue","underwrite","undo","undock","undress","undulate","unearth","unfasten","unfold","unfreeze","unfurl","unhand","unhinge","unhitch","unhook","unify","uninstall","unionise","unionize","unite","unlace","unlearn","unleash","unload","unlock","unloose","unloosen","unmask","unnerve","unpack","unpick","unplug","unravel","unroll","unsaddle","unscramble","unscrew","unseat","unsettle","unsubscribe","untangle","untie","unveil","unwind","unwrap","unzip","up","upbraid","upchange","upchuck","update","upend","upgrade","uphold","upholster","uplift","upload","uproot","upsell","upset","upshift","upskill","upstage","urge","use","usher","usurp","utilise","utilize","utter","vacate","vacation","vaccinate","vacillate","vacuum","valet","validate","value","vamoose","vandalise","vandalize","vanish","vanquish","vaporise","vaporize","varnish","vary","vault","veer","veg","vegetate","veil","vend","veneer","venerate","vent","ventilate","venture","verbalise","verbalize","verge","verify","versify","vest","vet","veto","vex","vibrate","victimise","victimize","vide","video","videotape","vie","view","viewing","vilify","vindicate","violate","visit","visualise","visualize","vitiate","vitrify","vocalize","voice","void","volley","volumise","volumize","volunteer","vote","vouch","vouchsafe","vow","voyage","vulgarise","vulgarize","waddle","wade","waffle","waft","wag","wage","wager","waggle","wail","wait","waive","wake","wakeboard","waken","walk","wall","wallop","wallow","wallpaper","waltz","wander","wane","wangle","want","warble","ward","warm","warn","warp","warrant","wash","wassail","waste","watch","water","waterproof","waterski","wave","waver","wax","waylay","weaken","wean","weaponise","weaponize","wear","weary","weasel","weather","weatherise","weatherize","weave","wed","wedge","weekend","weep","weigh","weight","weird","welch","welcome","weld","well","welly","wend","westernise","westernize","wet","whack","wheedle","wheel","wheeze","whelp","whet","whiff","while","whilst","whimper","whine","whinge","whinny","whip","whirl","whirr","whirring","whisk","whisper","whispering","whistle","whiten","whitewash","whittle","whoop","whoosh","whup","wick","widen","widow","wield","wig","wiggle","wildcat","will","wilt","wimp","win","wince","winch","wind","winds","windsurf","wine","wing","wink","winkle","winnow","winter","wipe","wire","wiretap","wise","wisecrack","wish","withdraw","wither","withhold","withstand","witness","witter","wobble","wolf","wonder","woo","woof","word","work","worm","worry","worsen","worship","worst","wound","wow","wowee","wrangle","wrap","wreak","wreathe","wreck","wrench","wrest","wrestle","wriggle","wring","wrinkle","writ","write","writhe","wrong","wrought","xerox","yack","yak","yap","yaw","yawn","yearn","yell","yellow","yelp","yield","yodel","yoke","yomp","yowl","yuppify","zap","zero","zigzag","zing","zip","zone","zoom"],w$u={adjective:k$u,adverb:F$u,conjunction:y$u,interjection:A$u,noun:_$u,preposition:S$u,verb:B$u},L$u=w$u,z$u={airline:Hju,animal:iHu,app:lHu,cell_phone:hHu,color:gHu,commerce:vHu,company:wHu,database:MHu,date:RHu,finance:YHu,hacker:iVu,internet:lVu,location:BVu,lorem:zVu,metadata:TVu,music:IVu,person:i$u,phone_number:o$u,science:d$u,team:g$u,vehicle:b$u,word:L$u},At=z$u,BOe=Object.defineProperty,M$u=(u,e,t)=>e in u?BOe(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,T$u=(u,e)=>{for(var t in e)BOe(u,t,{get:e[t],enumerable:!0})},bu=(u,e,t)=>(M$u(u,typeof e!="symbol"?e+"":e,t),t),Pu=class extends Error{};function Ti(u){let e=Object.getPrototypeOf(u);do{for(let t of Object.getOwnPropertyNames(e))typeof u[t]=="function"&&t!=="constructor"&&(u[t]=u[t].bind(u));e=Object.getPrototypeOf(e)}while(e!==Object.prototype)}var wOe=(u=>(u.Narrowbody="narrowbody",u.Regional="regional",u.Widebody="widebody",u))(wOe||{}),N$u=["0","1","2","3","4","5","6","7","8","9"],P$u=["0","O","1","I","L"],R$u={regional:20,narrowbody:35,widebody:60},I$u={regional:["A","B","C","D"],narrowbody:["A","B","C","D","E","F"],widebody:["A","B","C","D","E","F","G","H","J","K"]},O$u=class{constructor(e){this.faker=e,Ti(this)}airport(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airport)}airline(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airline)}airplane(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airplane)}recordLocator(e={}){let{allowNumerics:t=!1,allowVisuallySimilarCharacters:n=!1}=e,i=[];return t||i.push(...N$u),n||i.push(...P$u),this.faker.string.alphanumeric({length:6,casing:"upper",exclude:i})}seat(e={}){let{aircraftType:t="narrowbody"}=e,n=R$u[t],i=I$u[t],r=this.faker.number.int({min:1,max:n}),a=this.faker.helpers.arrayElement(i);return`${r}${a}`}aircraftType(){return this.faker.helpers.enumValue(wOe)}flightNumber(e={}){let{length:t={min:1,max:4},addLeadingZeros:n=!1}=e,i=this.faker.string.numeric({length:t,allowLeadingZeros:!1});return n?i.padStart(4,"0"):i}},LOe=(u=>(u.SRGB="sRGB",u.DisplayP3="display-p3",u.REC2020="rec2020",u.A98RGB="a98-rgb",u.ProphotoRGB="prophoto-rgb",u))(LOe||{}),zOe=(u=>(u.RGB="rgb",u.RGBA="rgba",u.HSL="hsl",u.HSLA="hsla",u.HWB="hwb",u.CMYK="cmyk",u.LAB="lab",u.LCH="lch",u.COLOR="color",u))(zOe||{});function j$u(u,e){switch(e==null?void 0:e.casing){case"upper":u=u.toUpperCase();break;case"lower":u=u.toLowerCase();break}return e!=null&&e.prefix&&(u=e.prefix+u),u}function MOe(u){return u.map(e=>{if(e%1!==0){let t=new ArrayBuffer(4);new DataView(t).setFloat32(0,e);let n=new Uint8Array(t);return MOe(Array.from(n)).split(" ").join("")}return(e>>>0).toString(2).padStart(8,"0")}).join(" ")}function H$u(u,e="rgb",t="sRGB"){let n=i=>Math.round(i*100);switch(e){case"rgba":return`rgba(${u[0]}, ${u[1]}, ${u[2]}, ${u[3]})`;case"color":return`color(${t} ${u[0]} ${u[1]} ${u[2]})`;case"cmyk":return`cmyk(${n(u[0])}%, ${n(u[1])}%, ${n(u[2])}%, ${n(u[3])}%)`;case"hsl":return`hsl(${u[0]}deg ${n(u[1])}% ${n(u[2])}%)`;case"hsla":return`hsl(${u[0]}deg ${n(u[1])}% ${n(u[2])}% / ${n(u[3])})`;case"hwb":return`hwb(${u[0]} ${n(u[1])}% ${n(u[2])}%)`;case"lab":return`lab(${n(u[0])}% ${u[1]} ${u[2]})`;case"lch":return`lch(${n(u[0])}% ${u[1]} ${u[2]})`;case"rgb":default:return`rgb(${u[0]}, ${u[1]}, ${u[2]})`}}function uf(u,e,t="rgb",n="sRGB"){switch(e){case"css":return H$u(u,t,n);case"binary":return MOe(u);default:return u}}var V$u=class{constructor(e){this.faker=e,Ti(this)}human(){return this.faker.helpers.arrayElement(this.faker.definitions.color.human)}space(){return this.faker.helpers.arrayElement(this.faker.definitions.color.space)}cssSupportedFunction(){return this.faker.helpers.enumValue(zOe)}cssSupportedSpace(){return this.faker.helpers.enumValue(LOe)}rgb(e){let{format:t="hex",includeAlpha:n=!1,prefix:i="#",casing:r="lower"}=e||{};e={format:t,includeAlpha:n,prefix:i,casing:r};let a,o="rgb";return t==="hex"?(a=this.faker.string.hexadecimal({length:n?8:6,prefix:""}),a=j$u(a,e),a):(a=Array.from({length:3},()=>this.faker.number.int(255)),n&&(a.push(this.faker.number.float({precision:.01})),o="rgba"),uf(a,t,o))}cmyk(e){let t=Array.from({length:4},()=>this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal","cmyk")}hsl(e){let t=[this.faker.number.int(360)];for(let n=0;n<(e!=null&&e.includeAlpha?3:2);n++)t.push(this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal",e!=null&&e.includeAlpha?"hsla":"hsl")}hwb(e){let t=[this.faker.number.int(360)];for(let n=0;n<2;n++)t.push(this.faker.number.float({precision:.01}));return uf(t,(e==null?void 0:e.format)||"decimal","hwb")}lab(e){let t=[this.faker.number.float({precision:1e-6})];for(let n=0;n<2;n++)t.push(this.faker.number.float({min:-100,max:100,precision:1e-4}));return uf(t,(e==null?void 0:e.format)||"decimal","lab")}lch(e){let t=[this.faker.number.float({precision:1e-6})];for(let n=0;n<2;n++)t.push(this.faker.number.float({max:230,precision:.1}));return uf(t,(e==null?void 0:e.format)||"decimal","lch")}colorByCSSColorSpace(e){(e==null?void 0:e.format)==="css"&&!(e!=null&&e.space)&&(e={...e,space:"sRGB"});let t=Array.from({length:3},()=>this.faker.number.float({precision:1e-4}));return uf(t,(e==null?void 0:e.format)||"decimal","color",e==null?void 0:e.space)}},TOe=(u=>(u.Female="female",u.Male="male",u))(TOe||{});function ub(u,e,t,{generic:n,female:i,male:r}={}){let a;switch(t){case"female":a=i;break;case"male":a=r;break;default:a=n;break}return a==null&&(i!=null&&r!=null?a=u.helpers.arrayElement([i,r]):a=n),e(a)}var $$u=class{constructor(e){this.faker=e,Ti(this)}firstName(e){var t;let{first_name:n,female_first_name:i,male_first_name:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}lastName(e){var t;let{last_name:n,female_last_name:i,male_last_name:r,last_name_pattern:a,male_last_name_pattern:o,female_last_name_pattern:s}=(t=this.faker.rawDefinitions.person)!=null?t:{};if(a!=null||o!=null||s!=null){let l=ub(this.faker,this.faker.helpers.weightedArrayElement,e,{generic:a,female:s,male:o});return this.faker.helpers.fake(l)}return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}middleName(e){var t;let{middle_name:n,female_middle_name:i,male_middle_name:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}fullName(e={}){let{sex:t=this.faker.helpers.arrayElement(["female","male"]),firstName:n=this.firstName(t),lastName:i=this.lastName(t)}=e,r=this.faker.helpers.weightedArrayElement(this.faker.definitions.person.name);return this.faker.helpers.mustache(r,{"person.prefix":()=>this.prefix(t),"person.firstName":()=>n,"person.middleName":()=>this.middleName(t),"person.lastName":()=>i,"person.suffix":()=>this.suffix()})}gender(){return this.faker.helpers.arrayElement(this.faker.definitions.person.gender)}sex(){return this.faker.helpers.arrayElement(this.faker.definitions.person.sex)}sexType(){return this.faker.helpers.enumValue(TOe)}bio(){let{bio_pattern:e}=this.faker.definitions.person;return this.faker.helpers.fake(e)}prefix(e){var t;let{prefix:n,female_prefix:i,male_prefix:r}=(t=this.faker.rawDefinitions.person)!=null?t:{};return ub(this.faker,this.faker.helpers.arrayElement,e,{generic:n,female:i,male:r})}suffix(){return this.faker.helpers.arrayElement(this.faker.definitions.person.suffix)}jobTitle(){return`${this.jobDescriptor()} ${this.jobArea()} ${this.jobType()}`}jobDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.descriptor)}jobArea(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.level)}jobType(){return this.faker.helpers.arrayElement(this.faker.definitions.person.title.job)}zodiacSign(){return this.faker.helpers.arrayElement(this.faker.definitions.person.western_zodiac_sign)}},K$u=class{constructor(){bu(this,"N",624),bu(this,"M",397),bu(this,"MATRIX_A",2567483615),bu(this,"UPPER_MASK",2147483648),bu(this,"LOWER_MASK",2147483647),bu(this,"mt",Array.from({length:this.N})),bu(this,"mti",this.N+1),bu(this,"mag01",[0,this.MATRIX_A])}unsigned32(e){return e<0?(e^this.UPPER_MASK)+this.UPPER_MASK:e}subtraction32(e,t){return e>>i&1&&(n=this.addition32(n,this.unsigned32(t<>>30)),this.mti),this.mt[this.mti]=this.unsigned32(this.mt[this.mti]&4294967295)}initByArray(e,t){this.initGenrand(19650218);let n=1,i=0,r=this.N>t?this.N:t;for(;r;r--)this.mt[n]=this.addition32(this.addition32(this.unsigned32(this.mt[n]^this.multiplication32(this.unsigned32(this.mt[n-1]^this.mt[n-1]>>>30),1664525)),e[i]),i),this.mt[n]=this.unsigned32(this.mt[n]&4294967295),n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0);for(r=this.N-1;r;r--)this.mt[n]=this.subtraction32(this.unsigned32(this.mt[n]^this.multiplication32(this.unsigned32(this.mt[n-1]^this.mt[n-1]>>>30),1566083941)),n),this.mt[n]=this.unsigned32(this.mt[n]&4294967295),n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1);this.mt[0]=2147483648}genrandInt32(){let e;if(this.mti>=this.N){let t;for(this.mti===this.N+1&&this.initGenrand(5489),t=0;t>>1^this.mag01[e&1]);for(;t>>1^this.mag01[e&1]);e=this.unsigned32(this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK),this.mt[this.N-1]=this.unsigned32(this.mt[this.M-1]^e>>>1^this.mag01[e&1]),this.mti=0}return e=this.mt[this.mti++],e=this.unsigned32(e^e>>>11),e=this.unsigned32(e^e<<7&2636928640),e=this.unsigned32(e^e<<15&4022730752),e=this.unsigned32(e^e>>>18),e}genrandInt31(){return this.genrandInt32()>>>1}genrandReal1(){return this.genrandInt32()*(1/4294967295)}genrandReal2(){return this.genrandInt32()*(1/4294967296)}genrandReal3(){return(this.genrandInt32()+.5)*(1/4294967296)}genrandRes53(){let e=this.genrandInt32()>>>5,t=this.genrandInt32()>>>6;return(e*67108864+t)*(1/9007199254740992)}};function W$u(){let u=new K$u;return u.initGenrand(Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)),{next(){return u.genrandReal2()},seed(e){typeof e=="number"?u.initGenrand(e):Array.isArray(e)&&u.initByArray(e,e.length)}}}function lt(u){let e=`[@faker-js/faker]: ${u.deprecated} is deprecated`;u.since&&(e+=` since v${u.since}`),u.until&&(e+=` and will be removed in v${u.until}`),u.proposed&&(e+=`. Please use ${u.proposed} instead`),console.warn(`${e}.`)}var G$u=class{constructor(e){this.faker=e,Ti(this)}number(e=99999){lt({deprecated:"faker.datatype.number()",proposed:"faker.number.int()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={max:e});let{min:t=0,max:n=t+99999,precision:i=1}=e;return this.faker.number.float({min:t,max:n,precision:i})}float(e={}){lt({deprecated:"faker.datatype.float()",proposed:"faker.number.float()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={precision:e});let{min:t=0,max:n=t+99999,precision:i=.01}=e;return this.faker.number.float({min:t,max:n,precision:i})}datetime(e={}){lt({deprecated:"faker.datatype.datetime({ min, max })",proposed:"faker.date.between({ from, to }) or faker.date.anytime()",since:"8.0",until:"9.0"});let t=864e13,n=typeof e=="number"?void 0:e.min,i=typeof e=="number"?e:e.max;return(n==null||nt)&&(i=Date.UTC(2100,0)),this.faker.date.between({from:n,to:i})}string(e={}){lt({deprecated:"faker.datatype.string()",proposed:"faker.string.sample()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={length:e});let{length:t=10}=e;return this.faker.string.sample(t)}uuid(){return lt({deprecated:"faker.datatype.uuid()",proposed:"faker.string.uuid()",since:"8.0",until:"9.0"}),this.faker.string.uuid()}boolean(e={}){typeof e=="number"&&(e={probability:e});let{probability:t=.5}=e;return t<=0?!1:t>=1?!0:this.faker.number.float()this.boolean()?this.faker.string.sample():this.faker.number.int(),{count:e})}bigInt(e){return lt({deprecated:"faker.datatype.bigInt()",proposed:"faker.number.bigInt()",since:"8.0",until:"9.0"}),this.faker.number.bigInt(e)}};function Z4(u,e){return u=new Date(u),isNaN(u.valueOf())&&(u=e()),u}var NOe=class{constructor(e){this.faker=e,Ti(this)}anytime(e={}){let{refDate:t}=e,n=Z4(t,this.faker.defaultRefDate);return this.between({from:new Date(n.getTime()-1e3*60*60*24*365),to:new Date(n.getTime()+1e3*60*60*24*365)})}past(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.past(years, refDate)",proposed:"faker.date.past({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Years must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*365*24*3600*1e3},o=r.getTime();return o-=this.faker.number.int(a),r.setTime(o),r}future(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.future(years, refDate)",proposed:"faker.date.future({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Years must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*365*24*3600*1e3},o=r.getTime();return o+=this.faker.number.int(a),r.setTime(o),r}between(e,t){(typeof e!="object"||e instanceof Date)&&(lt({deprecated:"faker.date.between(from, to)",proposed:"faker.date.between({ from, to })",since:"8.0",until:"9.0"}),e={from:e,to:t});let{from:n,to:i}=e,r=Z4(n,this.faker.defaultRefDate).getTime(),a=Z4(i,this.faker.defaultRefDate).getTime(),o=this.faker.number.int(a-r);return new Date(r+o)}betweens(e,t,n=3){(typeof e!="object"||e instanceof Date)&&(lt({deprecated:"faker.date.betweens(from, to, count)",proposed:"faker.date.betweens({ from, to, count })",since:"8.0",until:"9.0"}),e={from:e,to:t,count:n});let{from:i,to:r,count:a=3}=e;return this.faker.helpers.multiple(()=>this.between({from:i,to:r}),{count:a}).sort((o,s)=>o.getTime()-s.getTime())}recent(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.recent(days, refDate)",proposed:"faker.date.recent({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Days must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*24*3600*1e3},o=r.getTime();return o-=this.faker.number.int(a),r.setTime(o),r}soon(e={},t){typeof e=="number"&&(lt({deprecated:"faker.date.soon(days, refDate)",proposed:"faker.date.soon({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:n=1,refDate:i=t}=e;if(n<=0)throw new Pu("Days must be greater than 0.");let r=Z4(i,this.faker.defaultRefDate),a={min:1e3,max:n*24*3600*1e3},o=r.getTime();return o+=this.faker.number.int(a),r.setTime(o),r}birthdate(e={}){var t,n,i,r;if(e.max=0;n--){let i=parseInt(u.substring(n,n+1));t&&(i*=2,i>9&&(i=i%10+1)),e+=i,t=!t}return e%10}function Z$u(u,e){return u[e]===void 0?-1:0}function C5e(u,e,t,n,i){throw console.error("Error",t),console.log(`Found ${Object.keys(n).length} unique entries before throwing error. retried: ${i} total time: ${e-u}ms`),new Pu(`${t} for uniqueness check. @@ -1153,7 +1153,7 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}fun `,empty:!0}):u.length===1&&u[0].content===""&&(u[0].content=` `,u[0].empty=!0)},B5e=function(u,e){var t=u.length;return t>0&&u[t-1]===e?u:u.concat(e)},TNn=function(u){for(var e=[[]],t=[u],n=[0],i=[u.length],r=0,a=0,o=[],s=[o];a>-1;){for(;(r=n[a]++)0?c:["plain"],l=h):(c=B5e(c,h.type),h.alias&&(c=B5e(c,h.alias)),l=h.content),typeof l!="string"){a++,e.push(c),t.push(l),n.push(0),i.push(l.length);continue}var E=l.split(MNn),m=E.length;o.push({types:c,content:E[0]});for(var g=1;g({plain:{color:u.colors.gray[4],backgroundColor:u.colors.dark[8]},styles:[{types:["comment"],style:{color:u.colors.gray[6]}},{types:["string","inserted","selector","atrule"],style:{color:u.colors.teal[4]}},{types:["number"],style:{color:u.colors.blue[4]}},{types:["builtin","char","constant","function"],style:{color:u.colors.orange[5]}},{types:["punctuation"],style:{color:u.colors.gray[5]}},{types:["variable"],style:{color:u.colors.gray[5]}},{types:["class-name","attr-name"],style:{color:u.colors.yellow[5]}},{types:["tag","deleted"],style:{color:u.colors.red[6]}},{types:["operator"],style:{color:u.colors.gray[5]}},{types:["boolean"],style:{color:u.colors.red[6]}},{types:["keyword"],style:{color:u.colors.indigo[3]}},{types:["doctype"],style:{color:u.colors.gray[5]}},{types:["url"],style:{color:u.colors.gray[5]}}]}),ONn=u=>({plain:{color:u.colors.gray[9],backgroundColor:u.fn.rgba(u.colors.gray[0],.65)},styles:[{types:["comment"],style:{color:u.colors.gray[6]}},{types:["string","inserted"],style:{color:u.colors.indigo[9]}},{types:["number"],style:{color:u.colors.blue[7]}},{types:["builtin","char","constant","function","selector","atrule"],style:{color:u.colors.lime[9]}},{types:["punctuation"],style:{color:u.colors.gray[7]}},{types:["variable"],style:{color:u.colors.violet[9]}},{types:["attr-name"],style:{color:u.colors.green[9]}},{types:["class-name"],style:{color:u.colors.red[9]}},{types:["tag","deleted"],style:{color:u.colors.violet[9]}},{types:["operator"],style:{color:u.colors.red[9]}},{types:["boolean"],style:{color:u.colors.red[9]}},{types:["keyword"],style:{color:u.colors.red[9]}},{types:["doctype"],style:{color:u.colors.gray[7]}},{types:["url"],style:{color:u.colors.gray[7]}}]}),jNn=(u,e)=>e==="dark"?INn(u):ONn(u);var HNn=at((u,{colorScheme:e,native:t,maxLineSize:n,radius:i})=>({scrollArea:{},root:{position:"relative"},code:{boxSizing:"border-box",position:"relative",fontFamily:u.fontFamilyMonospace,lineHeight:1.7,fontSize:G(13),overflowX:t?"auto":void 0,borderRadius:u.fn.radius(i),padding:`${u.spacing.sm} 0`,"&.mantine-Prism-code":{marginTop:0,marginBottom:0}},copy:{position:"absolute",top:u.spacing.xs,right:u.dir==="ltr"?u.spacing.xs:"unset",left:u.dir==="rtl"?u.spacing.xs:"unset",zIndex:2,"&, &:hover":{backgroundColor:e==="dark"?u.colors.dark[8]:u.colors.gray[0]}},line:{display:"flex",width:"100%",padding:`0 ${u.spacing.md}`},lineNumber:{color:e==="dark"?u.colors.dark[4]:u.colors.gray[4],textAlign:"right",width:`calc(8 * ${G(n)})`,marginRight:u.dir==="ltr"?u.spacing.xs:void 0,marginLeft:u.dir==="rtl"?u.spacing.xs:void 0,userSelect:"none"},lineContent:{width:"100%"}}));const VNn=HNn;var $Nn=Object.defineProperty,KNn=Object.defineProperties,WNn=Object.getOwnPropertyDescriptors,fN=Object.getOwnPropertySymbols,y$e=Object.prototype.hasOwnProperty,A$e=Object.prototype.propertyIsEnumerable,L5e=(u,e,t)=>e in u?$Nn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,$D=(u,e)=>{for(var t in e||(e={}))y$e.call(e,t)&&L5e(u,t,e[t]);if(fN)for(var t of fN(e))A$e.call(e,t)&&L5e(u,t,e[t]);return u},ib=(u,e)=>KNn(u,WNn(e)),GNn=(u,e)=>{var t={};for(var n in u)y$e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&fN)for(var n of fN(u))e.indexOf(n)<0&&A$e.call(u,n)&&(t[n]=u[n]);return t};const UNn={noCopy:!1,copyLabel:"Copy code",copiedLabel:"Copied",withLineNumbers:!1,trim:!0,highlightLines:{},scrollAreaComponent:QF,getPrismTheme:jNn},pre=C.forwardRef((u,e)=>{const t=Qe("Prism",UNn,u),{className:n,children:i,language:r,noCopy:a,classNames:o,styles:s,copyLabel:l,copiedLabel:c,withLineNumbers:d,highlightLines:h,scrollAreaComponent:E,colorScheme:m,trim:g,unstyled:f,radius:p,getPrismTheme:D,variant:x}=t,b=GNn(t,["className","children","language","noCopy","classNames","styles","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","colorScheme","trim","unstyled","radius","getPrismTheme","variant"]),k=g&&typeof i=="string"?i.trim():i,A=k.split(` `).length.toString().length,F=jr(),S=Pkt(),w=m||F.colorScheme,{classes:z,cx:N}=VNn({colorScheme:w,native:E!==QF,maxLineSize:A,radius:p},{name:"Prism",classNames:o,styles:s,unstyled:f,variant:x});return M.createElement(Ct,ib($D({className:N(z.root,n),ref:e},b),{translate:"no"}),!a&&M.createElement(K5,{label:S.copied?c:l,position:"left",withArrow:!0,arrowSize:6,offset:6,color:S.copied?"teal":void 0,unstyled:f},M.createElement(Uu,{className:z.copy,"aria-label":S.copied?c:l,onClick:()=>S.copy(k),unstyled:f},M.createElement(F$e,{copied:S.copied}))),M.createElement(RNn,ib($D({},zNn),{theme:D(F,w),code:k,language:r}),({className:O,style:y,tokens:_,getLineProps:L,getTokenProps:T})=>M.createElement(E,{className:z.scrollArea,dir:"ltr"},M.createElement("pre",{className:N(z.code,O),style:y,dir:"ltr"},_.map((R,I)=>{var H,V,U,J;if(I===_.length-1&&R.length===1&&R[0].content===` -`)return null;const Y=I+1,X=L({line:R,key:I}),re=Y in h,ge=w==="dark"?F.fn.rgba(F.fn.themeColor((H=h[Y])==null?void 0:H.color,9),.25):F.fn.themeColor((V=h[Y])==null?void 0:V.color,0);return M.createElement("div",ib($D({},X),{className:N(z.line,X.className),style:$D({},re?{backgroundColor:ge}:null)}),d&&M.createElement("div",{className:z.lineNumber,style:{color:re?F.fn.themeColor((U=h[Y])==null?void 0:U.color,w==="dark"?5:8):void 0}},((J=h[Y])==null?void 0:J.label)||Y),M.createElement("div",{className:z.lineContent},R.map((_e,Ve)=>{var Ue,qe;const Se=T({token:_e,key:Ve});return M.createElement("span",ib($D({},Se),{style:ib($D({},Se.style),{color:re?F.fn.themeColor((Ue=h[Y])==null?void 0:Ue.color,w==="dark"?5:8):(qe=Se==null?void 0:Se.style)==null?void 0:qe.color})}))})))}).filter(Boolean)))))});pre.displayName="@mantine/prism/Prism";var qNn=at((u,{radius:e})=>({tab:{paddingLeft:u.spacing.sm,paddingRight:u.spacing.sm,height:G(34),border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3]}`,borderBottom:0,fontSize:u.fontSizes.sm,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7],backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,borderRadius:0,"&:first-of-type":{borderTopLeftRadius:u.radius.sm},"&:not(:first-of-type)":{borderLeft:0},"&:last-of-type":{borderTopRightRadius:u.radius.sm},"&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.colors.gray[0]},"&[data-active]":{color:u.colorScheme==="dark"?u.white:u.black,backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.fn.rgba(u.colors.gray[0],.65),"&::before":{backgroundColor:"transparent"}}},prism:{borderRadius:u.fn.radius(e),borderTopRightRadius:0,borderTopLeftRadius:0,border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,borderTop:0,overflow:"hidden"},code:{borderTopRightRadius:0,borderTopLeftRadius:0,border:0}}));const _$e=qNn;var JNn=Object.defineProperty,ZNn=Object.defineProperties,YNn=Object.getOwnPropertyDescriptors,pN=Object.getOwnPropertySymbols,S$e=Object.prototype.hasOwnProperty,B$e=Object.prototype.propertyIsEnumerable,z5e=(u,e,t)=>e in u?JNn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,w$e=(u,e)=>{for(var t in e||(e={}))S$e.call(e,t)&&z5e(u,t,e[t]);if(pN)for(var t of pN(e))B$e.call(e,t)&&z5e(u,t,e[t]);return u},QNn=(u,e)=>ZNn(u,YNn(e)),XNn=(u,e)=>{var t={};for(var n in u)S$e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&pN)for(var n of pN(u))e.indexOf(n)<0&&B$e.call(u,n)&&(t[n]=u[n]);return t};function ePn(u){const{classes:e}=_$e({radius:u.radius});return M.createElement(ri,QNn(w$e({},u),{variant:"outline",classNames:{tab:e.tab},translate:"no"}))}function tPn(u){var e=u,{language:t,children:n,radius:i,noCopy:r,copyLabel:a,copiedLabel:o,withLineNumbers:s,highlightLines:l,scrollAreaComponent:c,trim:d,getPrismTheme:h,colorScheme:E,variant:m}=e,g=XNn(e,["language","children","radius","noCopy","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","trim","getPrismTheme","colorScheme","variant"]);const{classes:f}=_$e({radius:i});return M.createElement(ri.Panel,w$e({},g),M.createElement(pre,{language:t,classNames:{root:f.prism,code:f.code},radius:i,noCopy:r,copyLabel:a,copiedLabel:o,withLineNumbers:s,highlightLines:l,scrollAreaComponent:c,trim:d,getPrismTheme:h,colorScheme:E,variant:m},n))}const Ig=pre;Ig.Tabs=ePn;Ig.Tab=ri.Tab;Ig.TabsList=ri.List;Ig.Panel=tPn;var uPn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},nPn=Object.defineProperty,iPn=Object.defineProperties,rPn=Object.getOwnPropertyDescriptors,DN=Object.getOwnPropertySymbols,L$e=Object.prototype.hasOwnProperty,z$e=Object.prototype.propertyIsEnumerable,M5e=(u,e,t)=>e in u?nPn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,T5e=(u,e)=>{for(var t in e||(e={}))L$e.call(e,t)&&M5e(u,t,e[t]);if(DN)for(var t of DN(e))z$e.call(e,t)&&M5e(u,t,e[t]);return u},aPn=(u,e)=>iPn(u,rPn(e)),oPn=(u,e)=>{var t={};for(var n in u)L$e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&DN)for(var n of DN(u))e.indexOf(n)<0&&z$e.call(u,n)&&(t[n]=u[n]);return t},wn=(u,e,t)=>{const n=C.forwardRef((i,r)=>{var a=i,{color:o="currentColor",size:s=24,stroke:l=2,children:c}=a,d=oPn(a,["color","size","stroke","children"]);return C.createElement("svg",T5e(aPn(T5e({ref:r},uPn),{width:s,height:s,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${u}`}),d),[...t.map(([h,E])=>C.createElement(h,E)),...c||[]])});return n.propTypes={color:Qg.string,size:Qg.oneOfType([Qg.string,Qg.number]),stroke:Qg.oneOfType([Qg.string,Qg.number])},n.displayName=`${e}`,n},sPn=wn("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),lPn=wn("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),cPn=wn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),dPn=wn("cloud-check","IconCloudCheck",[["path",{d:"M11 18.004h-4.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.388 0 2.585 .82 3.138 2.007",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]]),hPn=wn("cloud-computing","IconCloudComputing",[["path",{d:"M6.657 16c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}],["path",{d:"M12 16v5",key:"svg-1"}],["path",{d:"M16 16v4a1 1 0 0 0 1 1h4",key:"svg-2"}],["path",{d:"M8 16v4a1 1 0 0 1 -1 1h-4",key:"svg-3"}]]),EPn=wn("cloud-pause","IconCloudPause",[["path",{d:"M13 18.004h-6.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.406 0 2.617 .843 3.16 2.055",key:"svg-0"}],["path",{d:"M17 17v5",key:"svg-1"}],["path",{d:"M21 17v5",key:"svg-2"}]]),M$e=wn("cloud-plus","IconCloudPlus",[["path",{d:"M12 18.004h-5.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99a3.46 3.46 0 0 1 3.085 1.9",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}]]),mPn=wn("cloud","IconCloud",[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]]),gPn=wn("copy","IconCopy",[["path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2",key:"svg-1"}]]),fPn=wn("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),RO=wn("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Dre=wn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),T$e=wn("file-import","IconFileImport",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3",key:"svg-1"}]]),k3=wn("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),pPn=wn("language","IconLanguage",[["path",{d:"M4 5h7",key:"svg-0"}],["path",{d:"M9 3v2c0 4.418 -2.239 8 -5 8",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.952 3.908 6.7 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}]]),DPn=wn("link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]),xPn=wn("logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]),vPn=wn("map","IconMap",[["path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13",key:"svg-0"}],["path",{d:"M9 4v13",key:"svg-1"}],["path",{d:"M15 7v13",key:"svg-2"}]]),N$e=wn("minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]),CPn=wn("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),N5e=wn("password","IconPassword",[["path",{d:"M12 10v4",key:"svg-0"}],["path",{d:"M10 13l4 -2",key:"svg-1"}],["path",{d:"M10 11l4 2",key:"svg-2"}],["path",{d:"M5 10v4",key:"svg-3"}],["path",{d:"M3 13l4 -2",key:"svg-4"}],["path",{d:"M3 11l4 2",key:"svg-5"}],["path",{d:"M19 10v4",key:"svg-6"}],["path",{d:"M17 13l4 -2",key:"svg-7"}],["path",{d:"M17 11l4 2",key:"svg-8"}]]),xre=wn("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),bPn=wn("refresh-alert","IconRefreshAlert",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 9l0 3",key:"svg-2"}],["path",{d:"M12 15l.01 0",key:"svg-3"}]]),kPn=wn("refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]),FPn=wn("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),yPn=wn("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),APn=wn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),_Pn=wn("table","IconTable",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]]),vre=wn("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),SPn=wn("user-edit","IconUserEdit",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h3.5",key:"svg-1"}],["path",{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z",key:"svg-2"}]]),P5e=wn("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),BPn=wn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),P$e=Symbol.for("immer-nothing"),R5e=Symbol.for("immer-draftable"),K0=Symbol.for("immer-state");function wc(u,...e){throw new Error(`[Immer] minified error nr: ${u}. Full error at: https://bit.ly/3cXEKWf`)}var n6=Object.getPrototypeOf;function i6(u){return!!u&&!!u[K0]}function kp(u){var e;return u?R$e(u)||Array.isArray(u)||!!u[R5e]||!!((e=u.constructor)!=null&&e[R5e])||OO(u)||jO(u):!1}var wPn=Object.prototype.constructor.toString();function R$e(u){if(!u||typeof u!="object")return!1;const e=n6(u);if(e===null)return!0;const t=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===wPn}function Wy(u,e){IO(u)===0?Object.entries(u).forEach(([t,n])=>{e(t,n,u)}):u.forEach((t,n)=>e(n,t,u))}function IO(u){const e=u[K0];return e?e.type_:Array.isArray(u)?1:OO(u)?2:jO(u)?3:0}function iQ(u,e){return IO(u)===2?u.has(e):Object.prototype.hasOwnProperty.call(u,e)}function I$e(u,e,t){const n=IO(u);n===2?u.set(e,t):n===3?u.add(t):u[e]=t}function LPn(u,e){return u===e?u!==0||1/u===1/e:u!==u&&e!==e}function OO(u){return u instanceof Map}function jO(u){return u instanceof Set}function xf(u){return u.copy_||u.base_}function rQ(u,e){if(OO(u))return new Map(u);if(jO(u))return new Set(u);if(Array.isArray(u))return Array.prototype.slice.call(u);if(!e&&R$e(u))return n6(u)?{...u}:Object.assign(Object.create(null),u);const t=Object.getOwnPropertyDescriptors(u);delete t[K0];let n=Reflect.ownKeys(t);for(let i=0;i1&&(u.set=u.add=u.clear=u.delete=zPn),Object.freeze(u),e&&Wy(u,(t,n)=>Cre(n,!0))),u}function zPn(){wc(2)}function HO(u){return Object.isFrozen(u)}var MPn={};function Fp(u){const e=MPn[u];return e||wc(0,u),e}var Gy;function O$e(){return Gy}function TPn(u,e){return{drafts_:[],parent_:u,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function I5e(u,e){e&&(Fp("Patches"),u.patches_=[],u.inversePatches_=[],u.patchListener_=e)}function aQ(u){oQ(u),u.drafts_.forEach(NPn),u.drafts_=null}function oQ(u){u===Gy&&(Gy=u.parent_)}function O5e(u){return Gy=TPn(Gy,u)}function NPn(u){const e=u[K0];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function j5e(u,e){e.unfinalizedDrafts_=e.drafts_.length;const t=e.drafts_[0];return u!==void 0&&u!==t?(t[K0].modified_&&(aQ(e),wc(4)),kp(u)&&(u=xN(e,u),e.parent_||vN(e,u)),e.patches_&&Fp("Patches").generateReplacementPatches_(t[K0].base_,u,e.patches_,e.inversePatches_)):u=xN(e,t,[]),aQ(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),u!==P$e?u:void 0}function xN(u,e,t){if(HO(e))return e;const n=e[K0];if(!n)return Wy(e,(i,r)=>H5e(u,n,e,i,r,t)),e;if(n.scope_!==u)return e;if(!n.modified_)return vN(u,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let r=i,a=!1;n.type_===3&&(r=new Set(i),i.clear(),a=!0),Wy(r,(o,s)=>H5e(u,n,i,o,s,t,a)),vN(u,i,!1),t&&u.patches_&&Fp("Patches").generatePatches_(n,t,u.patches_,u.inversePatches_)}return n.copy_}function H5e(u,e,t,n,i,r,a){if(i6(i)){const o=r&&e&&e.type_!==3&&!iQ(e.assigned_,n)?r.concat(n):void 0,s=xN(u,i,o);if(I$e(t,n,s),i6(s))u.canAutoFreeze_=!1;else return}else a&&t.add(i);if(kp(i)&&!HO(i)){if(!u.immer_.autoFreeze_&&u.unfinalizedDrafts_<1)return;xN(u,i),(!e||!e.scope_.parent_)&&vN(u,i)}}function vN(u,e,t=!1){!u.parent_&&u.immer_.autoFreeze_&&u.canAutoFreeze_&&Cre(e,t)}function PPn(u,e){const t=Array.isArray(u),n={type_:t?1:0,scope_:e?e.scope_:O$e(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:u,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,r=bre;t&&(i=[n],r=Uy);const{revoke:a,proxy:o}=Proxy.revocable(i,r);return n.draft_=o,n.revoke_=a,o}var bre={get(u,e){if(e===K0)return u;const t=xf(u);if(!iQ(t,e))return RPn(u,t,e);const n=t[e];return u.finalized_||!kp(n)?n:n===tK(u.base_,e)?(uK(u),u.copy_[e]=lQ(n,u)):n},has(u,e){return e in xf(u)},ownKeys(u){return Reflect.ownKeys(xf(u))},set(u,e,t){const n=j$e(xf(u),e);if(n!=null&&n.set)return n.set.call(u.draft_,t),!0;if(!u.modified_){const i=tK(xf(u),e),r=i==null?void 0:i[K0];if(r&&r.base_===t)return u.copy_[e]=t,u.assigned_[e]=!1,!0;if(LPn(t,i)&&(t!==void 0||iQ(u.base_,e)))return!0;uK(u),sQ(u)}return u.copy_[e]===t&&(t!==void 0||e in u.copy_)||Number.isNaN(t)&&Number.isNaN(u.copy_[e])||(u.copy_[e]=t,u.assigned_[e]=!0),!0},deleteProperty(u,e){return tK(u.base_,e)!==void 0||e in u.base_?(u.assigned_[e]=!1,uK(u),sQ(u)):delete u.assigned_[e],u.copy_&&delete u.copy_[e],!0},getOwnPropertyDescriptor(u,e){const t=xf(u),n=Reflect.getOwnPropertyDescriptor(t,e);return n&&{writable:!0,configurable:u.type_!==1||e!=="length",enumerable:n.enumerable,value:t[e]}},defineProperty(){wc(11)},getPrototypeOf(u){return n6(u.base_)},setPrototypeOf(){wc(12)}},Uy={};Wy(bre,(u,e)=>{Uy[u]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});Uy.deleteProperty=function(u,e){return Uy.set.call(this,u,e,void 0)};Uy.set=function(u,e,t){return bre.set.call(this,u[0],e,t,u[0])};function tK(u,e){const t=u[K0];return(t?xf(t):u)[e]}function RPn(u,e,t){var i;const n=j$e(e,t);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(u.draft_):void 0}function j$e(u,e){if(!(e in u))return;let t=n6(u);for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n;t=n6(t)}}function sQ(u){u.modified_||(u.modified_=!0,u.parent_&&sQ(u.parent_))}function uK(u){u.copy_||(u.copy_=rQ(u.base_,u.scope_.immer_.useStrictShallowCopy_))}var IPn=class{constructor(u){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if(typeof e=="function"&&typeof t!="function"){const r=t;t=e;const a=this;return function(s=r,...l){return a.produce(s,c=>t.call(this,c,...l))}}typeof t!="function"&&wc(6),n!==void 0&&typeof n!="function"&&wc(7);let i;if(kp(e)){const r=O5e(this),a=lQ(e,void 0);let o=!0;try{i=t(a),o=!1}finally{o?aQ(r):oQ(r)}return I5e(r,n),j5e(i,r)}else if(!e||typeof e!="object"){if(i=t(e),i===void 0&&(i=e),i===P$e&&(i=void 0),this.autoFreeze_&&Cre(i,!0),n){const r=[],a=[];Fp("Patches").generateReplacementPatches_(e,i,r,a),n(r,a)}return i}else wc(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e=="function")return(a,...o)=>this.produceWithPatches(a,s=>e(s,...o));let n,i;return[this.produce(e,t,(a,o)=>{n=a,i=o}),n,i]},typeof(u==null?void 0:u.autoFreeze)=="boolean"&&this.setAutoFreeze(u.autoFreeze),typeof(u==null?void 0:u.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(u.useStrictShallowCopy)}createDraft(u){kp(u)||wc(8),i6(u)&&(u=OPn(u));const e=O5e(this),t=lQ(u,void 0);return t[K0].isManual_=!0,oQ(e),t}finishDraft(u,e){const t=u&&u[K0];(!t||!t.isManual_)&&wc(9);const{scope_:n}=t;return I5e(n,e),j5e(void 0,n)}setAutoFreeze(u){this.autoFreeze_=u}setUseStrictShallowCopy(u){this.useStrictShallowCopy_=u}applyPatches(u,e){let t;for(t=e.length-1;t>=0;t--){const i=e[t];if(i.path.length===0&&i.op==="replace"){u=i.value;break}}t>-1&&(e=e.slice(t+1));const n=Fp("Patches").applyPatches_;return i6(u)?n(u,e):this.produce(u,i=>n(i,e))}};function lQ(u,e){const t=OO(u)?Fp("MapSet").proxyMap_(u,e):jO(u)?Fp("MapSet").proxySet_(u,e):PPn(u,e);return(e?e.scope_:O$e()).drafts_.push(t),t}function OPn(u){return i6(u)||wc(10,u),H$e(u)}function H$e(u){if(!kp(u)||HO(u))return u;const e=u[K0];let t;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,t=rQ(u,e.scope_.immer_.useStrictShallowCopy_)}else t=rQ(u,!0);return Wy(t,(n,i)=>{I$e(t,n,H$e(i))}),e&&(e.finalized_=!1),t}var W0=new IPn,rb=W0.produce;W0.produceWithPatches.bind(W0);W0.setAutoFreeze.bind(W0);W0.setUseStrictShallowCopy.bind(W0);W0.applyPatches.bind(W0);W0.createDraft.bind(W0);W0.finishDraft.bind(W0);function jPn(){if(console&&console.warn){for(var u=arguments.length,e=new Array(u),t=0;t()=>{if(u.isInitialized)e();else{const t=()=>{setTimeout(()=>{u.off("initialized",t)},0),e()};u.on("initialized",t)}};function $5e(u,e,t){u.loadNamespaces(e,V$e(u,t))}function K5e(u,e,t,n){typeof t=="string"&&(t=[t]),t.forEach(i=>{u.options.ns.indexOf(i)<0&&u.options.ns.push(i)}),u.loadLanguages(e,V$e(u,n))}function HPn(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],i=e.options?e.options.fallbackLng:!1,r=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(o,s)=>{const l=e.services.backendConnector.state[`${o}|${s}`];return l===-1||l===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,u)?!1:!!(e.hasResourceBundle(n,u)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(n,u)&&(!i||a(r,u)))}function VPn(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(cQ("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(u,{lng:t.lng,precheck:(i,r)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,u))return!1}}):HPn(u,e,t)}const $Pn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,KPn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},WPn=u=>KPn[u],GPn=u=>u.replace($Pn,WPn);let dQ={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:GPn};function UPn(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dQ={...dQ,...u}}function qPn(){return dQ}let $$e;function JPn(u){$$e=u}function ZPn(){return $$e}const YPn={type:"3rdParty",init(u){UPn(u.options.react),JPn(u)}},QPn=C.createContext();class XPn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const eRn=(u,e)=>{const t=C.useRef();return C.useEffect(()=>{t.current=e?t.current:u},[u,e]),t.current};function Ei(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:n,defaultNS:i}=C.useContext(QPn)||{},r=t||n||ZPn();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new XPn),!r){cQ("You will need to pass in an i18next instance by using initReactI18next");const x=(k,A)=>typeof A=="string"?A:A&&typeof A=="object"&&typeof A.defaultValue=="string"?A.defaultValue:Array.isArray(k)?k[k.length-1]:k,b=[x,{},!1];return b.t=x,b.i18n={},b.ready=!1,b}r.options.react&&r.options.react.wait!==void 0&&cQ("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...qPn(),...r.options.react,...e},{useSuspense:o,keyPrefix:s}=a;let l=u||i||r.options&&r.options.defaultNS;l=typeof l=="string"?[l]:l||["translation"],r.reportNamespaces.addUsedNamespaces&&r.reportNamespaces.addUsedNamespaces(l);const c=(r.isInitialized||r.initializedStoreOnce)&&l.every(x=>VPn(x,r,a));function d(){return r.getFixedT(e.lng||null,a.nsMode==="fallback"?l:l[0],s)}const[h,E]=C.useState(d);let m=l.join();e.lng&&(m=`${e.lng}${m}`);const g=eRn(m),f=C.useRef(!0);C.useEffect(()=>{const{bindI18n:x,bindI18nStore:b}=a;f.current=!0,!c&&!o&&(e.lng?K5e(r,e.lng,l,()=>{f.current&&E(d)}):$5e(r,l,()=>{f.current&&E(d)})),c&&g&&g!==m&&f.current&&E(d);function k(){f.current&&E(d)}return x&&r&&r.on(x,k),b&&r&&r.store.on(b,k),()=>{f.current=!1,x&&r&&x.split(" ").forEach(A=>r.off(A,k)),b&&r&&b.split(" ").forEach(A=>r.store.off(A,k))}},[r,m]);const p=C.useRef(!0);C.useEffect(()=>{f.current&&!p.current&&E(d),p.current=!1},[r,s]);const D=[h,r,c];if(D.t=h,D.i18n=r,D.ready=c,c||!c&&!o)return D;throw new Promise(x=>{e.lng?K5e(r,e.lng,l,()=>x()):$5e(r,l,()=>x())})}const tRn={"\n mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n ":VWt,"\n mutation SetMode($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n ":$Wt,"\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n ":KWt,"\n mutation UpdateConfig($id: ID!, $global: globalInput!) {\n updateConfig(id: $id, global: $global) {\n id\n }\n }\n ":WWt,"\n mutation RemoveConfig($id: ID!) {\n removeConfig(id: $id)\n }\n ":GWt,"\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n ":UWt,"\n mutation RenameConfig($id: ID!, $name: String!) {\n renameConfig(id: $id, name: $name)\n }\n ":qWt,"\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n ":JWt,"\n mutation UpdateRouting($id: ID!, $routing: String!) {\n updateRouting(id: $id, routing: $routing) {\n id\n }\n }\n ":ZWt,"\n mutation RemoveRouting($id: ID!) {\n removeRouting(id: $id)\n }\n ":YWt,"\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n ":QWt,"\n mutation RenameRouting($id: ID!, $name: String!) {\n renameRouting(id: $id, name: $name)\n }\n ":XWt,"\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n ":eGt,"\n mutation UpdateDNS($id: ID!, $dns: String!) {\n updateDns(id: $id, dns: $dns) {\n id\n }\n }\n ":tGt,"\n mutation RemoveDNS($id: ID!) {\n removeDns(id: $id)\n }\n ":uGt,"\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n ":nGt,"\n mutation RenameDNS($id: ID!, $name: String!) {\n renameDns(id: $id, name: $name)\n }\n ":iGt,"\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n ":rGt,"\n mutation RemoveGroup($id: ID!) {\n removeGroup(id: $id)\n }\n ":aGt,"\n mutation GroupSetPolicy($id: ID!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n groupSetPolicy(id: $id, policy: $policy, policyParams: $policyParams)\n }\n ":oGt,"\n mutation RenameGroup($id: ID!, $name: String!) {\n renameGroup(id: $id, name: $name)\n }\n ":sGt,"\n mutation GroupAddNodes($id: ID!, $nodeIDs: [ID!]!) {\n groupAddNodes(id: $id, nodeIDs: $nodeIDs)\n }\n ":lGt,"\n mutation GroupDelNodes($id: ID!, $nodeIDs: [ID!]!) {\n groupDelNodes(id: $id, nodeIDs: $nodeIDs)\n }\n ":cGt,"\n mutation GroupAddSubscriptions($id: ID!, $subscriptionIDs: [ID!]!) {\n groupAddSubscriptions(id: $id, subscriptionIDs: $subscriptionIDs)\n }\n ":dGt,"\n mutation GroupDelSubscriptions($id: ID!, $subscriptionIDs: [ID!]!) {\n groupDelSubscriptions(id: $id, subscriptionIDs: $subscriptionIDs)\n }\n ":hGt,"\n mutation ImportNodes($rollbackError: Boolean!, $args: [ImportArgument!]!) {\n importNodes(rollbackError: $rollbackError, args: $args) {\n link\n error\n node {\n id\n }\n }\n }\n ":EGt,"\n mutation RemoveNodes($ids: [ID!]!) {\n removeNodes(ids: $ids)\n }\n ":mGt,"\n mutation ImportSubscription($rollbackError: Boolean!, $arg: ImportArgument!) {\n importSubscription(rollbackError: $rollbackError, arg: $arg) {\n link\n sub {\n id\n }\n nodeImportResult {\n node {\n id\n }\n }\n }\n }\n ":gGt,"\n mutation UpdateSubscription($id: ID!) {\n updateSubscription(id: $id) {\n id\n }\n }\n ":fGt,"\n mutation RemoveSubscriptions($ids: [ID!]!) {\n removeSubscriptions(ids: $ids)\n }\n ":pGt,"\n mutation Run($dry: Boolean!) {\n run(dry: $dry)\n }\n ":DGt,"\n mutation UpdateAvatar($avatar: String) {\n updateAvatar(avatar: $avatar)\n }\n ":xGt,"\n mutation UpdateName($name: String) {\n updateName(name: $name)\n }\n ":vGt,"\n query Mode($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":CGt,"\n query Defaults($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":bGt,"\n query Interfaces($up: Boolean) {\n general {\n interfaces(up: $up) {\n name\n ifindex\n ip\n flag {\n default {\n gateway\n }\n }\n }\n }\n }\n ":kGt,"\n query JsonStorage($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":FGt,"\n query General($up: Boolean) {\n general {\n dae {\n running\n modified\n version\n }\n interfaces(up: $up) {\n name\n ifindex\n ip\n flag {\n default {\n gateway\n }\n }\n }\n }\n }\n ":yGt,"\n query Nodes {\n nodes {\n edges {\n id\n name\n link\n address\n protocol\n tag\n }\n }\n }\n ":AGt,"\n query Subscriptions {\n subscriptions {\n id\n tag\n status\n link\n info\n updatedAt\n nodes {\n edges {\n id\n name\n protocol\n link\n }\n }\n }\n }\n ":_Gt,"\n query Configs {\n configs {\n id\n name\n selected\n global {\n logLevel\n tproxyPort\n allowInsecure\n checkInterval\n checkTolerance\n lanInterface\n wanInterface\n udpCheckDns\n tcpCheckUrl\n dialMode\n tcpCheckHttpMethod\n disableWaitingNetwork\n autoConfigKernelParameter\n sniffingTimeout\n tlsImplementation\n utlsImitate\n tproxyPortProtect\n soMarkFromDae\n }\n }\n }\n ":SGt,"\n query Groups {\n groups {\n id\n name\n nodes {\n id\n link\n name\n address\n protocol\n tag\n subscriptionID\n }\n subscriptions {\n id\n updatedAt\n tag\n link\n status\n info\n\n nodes {\n edges {\n id\n link\n name\n address\n protocol\n tag\n subscriptionID\n }\n }\n }\n policy\n policyParams {\n key\n val\n }\n }\n }\n ":BGt,"\n query Routings {\n routings {\n id\n name\n selected\n routing {\n string\n }\n }\n }\n ":wGt,"\n query DNSs {\n dnss {\n id\n name\n dns {\n string\n\n routing {\n request {\n string\n }\n response {\n string\n }\n }\n }\n selected\n }\n }\n ":LGt,"\n query User {\n user {\n username\n name\n avatar\n }\n }\n ":zGt,"\n query NumberUsers {\n numberUsers\n }\n ":MGt,"\n mutation CreateUser($username: String!, $password: String!) {\n createUser(username: $username, password: $password)\n }\n ":TGt,"\n query Token($username: String!, $password: String!) {\n token(username: $username, password: $password)\n }\n ":NGt};function xu(u){return tRn[u]??{}}const uRn=()=>{const u=Mu();return Sn({mutationFn:e=>{const t=Object.keys(e),n=t.map(i=>e[i]);return u.request(xu(` +`)return null;const Y=I+1,X=L({line:R,key:I}),re=Y in h,ge=w==="dark"?F.fn.rgba(F.fn.themeColor((H=h[Y])==null?void 0:H.color,9),.25):F.fn.themeColor((V=h[Y])==null?void 0:V.color,0);return M.createElement("div",ib($D({},X),{className:N(z.line,X.className),style:$D({},re?{backgroundColor:ge}:null)}),d&&M.createElement("div",{className:z.lineNumber,style:{color:re?F.fn.themeColor((U=h[Y])==null?void 0:U.color,w==="dark"?5:8):void 0}},((J=h[Y])==null?void 0:J.label)||Y),M.createElement("div",{className:z.lineContent},R.map((_e,Ve)=>{var Ue,qe;const Se=T({token:_e,key:Ve});return M.createElement("span",ib($D({},Se),{style:ib($D({},Se.style),{color:re?F.fn.themeColor((Ue=h[Y])==null?void 0:Ue.color,w==="dark"?5:8):(qe=Se==null?void 0:Se.style)==null?void 0:qe.color})}))})))}).filter(Boolean)))))});pre.displayName="@mantine/prism/Prism";var qNn=at((u,{radius:e})=>({tab:{paddingLeft:u.spacing.sm,paddingRight:u.spacing.sm,height:G(34),border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[3]}`,borderBottom:0,fontSize:u.fontSizes.sm,color:u.colorScheme==="dark"?u.colors.dark[1]:u.colors.gray[7],backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.white,borderRadius:0,"&:first-of-type":{borderTopLeftRadius:u.radius.sm},"&:not(:first-of-type)":{borderLeft:0},"&:last-of-type":{borderTopRightRadius:u.radius.sm},"&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.colors.gray[0]},"&[data-active]":{color:u.colorScheme==="dark"?u.white:u.black,backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.fn.rgba(u.colors.gray[0],.65),"&::before":{backgroundColor:"transparent"}}},prism:{borderRadius:u.fn.radius(e),borderTopRightRadius:0,borderTopLeftRadius:0,border:`${G(1)} solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,borderTop:0,overflow:"hidden"},code:{borderTopRightRadius:0,borderTopLeftRadius:0,border:0}}));const _$e=qNn;var JNn=Object.defineProperty,ZNn=Object.defineProperties,YNn=Object.getOwnPropertyDescriptors,pN=Object.getOwnPropertySymbols,S$e=Object.prototype.hasOwnProperty,B$e=Object.prototype.propertyIsEnumerable,z5e=(u,e,t)=>e in u?JNn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,w$e=(u,e)=>{for(var t in e||(e={}))S$e.call(e,t)&&z5e(u,t,e[t]);if(pN)for(var t of pN(e))B$e.call(e,t)&&z5e(u,t,e[t]);return u},QNn=(u,e)=>ZNn(u,YNn(e)),XNn=(u,e)=>{var t={};for(var n in u)S$e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&pN)for(var n of pN(u))e.indexOf(n)<0&&B$e.call(u,n)&&(t[n]=u[n]);return t};function ePn(u){const{classes:e}=_$e({radius:u.radius});return M.createElement(ri,QNn(w$e({},u),{variant:"outline",classNames:{tab:e.tab},translate:"no"}))}function tPn(u){var e=u,{language:t,children:n,radius:i,noCopy:r,copyLabel:a,copiedLabel:o,withLineNumbers:s,highlightLines:l,scrollAreaComponent:c,trim:d,getPrismTheme:h,colorScheme:E,variant:m}=e,g=XNn(e,["language","children","radius","noCopy","copyLabel","copiedLabel","withLineNumbers","highlightLines","scrollAreaComponent","trim","getPrismTheme","colorScheme","variant"]);const{classes:f}=_$e({radius:i});return M.createElement(ri.Panel,w$e({},g),M.createElement(pre,{language:t,classNames:{root:f.prism,code:f.code},radius:i,noCopy:r,copyLabel:a,copiedLabel:o,withLineNumbers:s,highlightLines:l,scrollAreaComponent:c,trim:d,getPrismTheme:h,colorScheme:E,variant:m},n))}const Ig=pre;Ig.Tabs=ePn;Ig.Tab=ri.Tab;Ig.TabsList=ri.List;Ig.Panel=tPn;var uPn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},nPn=Object.defineProperty,iPn=Object.defineProperties,rPn=Object.getOwnPropertyDescriptors,DN=Object.getOwnPropertySymbols,L$e=Object.prototype.hasOwnProperty,z$e=Object.prototype.propertyIsEnumerable,M5e=(u,e,t)=>e in u?nPn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,T5e=(u,e)=>{for(var t in e||(e={}))L$e.call(e,t)&&M5e(u,t,e[t]);if(DN)for(var t of DN(e))z$e.call(e,t)&&M5e(u,t,e[t]);return u},aPn=(u,e)=>iPn(u,rPn(e)),oPn=(u,e)=>{var t={};for(var n in u)L$e.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&DN)for(var n of DN(u))e.indexOf(n)<0&&z$e.call(u,n)&&(t[n]=u[n]);return t},wn=(u,e,t)=>{const n=C.forwardRef((i,r)=>{var a=i,{color:o="currentColor",size:s=24,stroke:l=2,children:c}=a,d=oPn(a,["color","size","stroke","children"]);return C.createElement("svg",T5e(aPn(T5e({ref:r},uPn),{width:s,height:s,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${u}`}),d),[...t.map(([h,E])=>C.createElement(h,E)),...c||[]])});return n.propTypes={color:Qg.string,size:Qg.oneOfType([Qg.string,Qg.number]),stroke:Qg.oneOfType([Qg.string,Qg.number])},n.displayName=`${e}`,n},sPn=wn("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),lPn=wn("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),cPn=wn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),dPn=wn("cloud-check","IconCloudCheck",[["path",{d:"M11 18.004h-4.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.388 0 2.585 .82 3.138 2.007",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]]),hPn=wn("cloud-computing","IconCloudComputing",[["path",{d:"M6.657 16c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}],["path",{d:"M12 16v5",key:"svg-1"}],["path",{d:"M16 16v4a1 1 0 0 0 1 1h4",key:"svg-2"}],["path",{d:"M8 16v4a1 1 0 0 1 -1 1h-4",key:"svg-3"}]]),EPn=wn("cloud-pause","IconCloudPause",[["path",{d:"M13 18.004h-6.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.406 0 2.617 .843 3.16 2.055",key:"svg-0"}],["path",{d:"M17 17v5",key:"svg-1"}],["path",{d:"M21 17v5",key:"svg-2"}]]),M$e=wn("cloud-plus","IconCloudPlus",[["path",{d:"M12 18.004h-5.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99a3.46 3.46 0 0 1 3.085 1.9",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}]]),mPn=wn("cloud","IconCloud",[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]]),gPn=wn("copy","IconCopy",[["path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2",key:"svg-1"}]]),fPn=wn("download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),RO=wn("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Dre=wn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),T$e=wn("file-import","IconFileImport",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3",key:"svg-1"}]]),k3=wn("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),pPn=wn("language","IconLanguage",[["path",{d:"M4 5h7",key:"svg-0"}],["path",{d:"M9 3v2c0 4.418 -2.239 8 -5 8",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.952 3.908 6.7 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}]]),DPn=wn("link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]]),xPn=wn("logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]),vPn=wn("map","IconMap",[["path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13",key:"svg-0"}],["path",{d:"M9 4v13",key:"svg-1"}],["path",{d:"M15 7v13",key:"svg-2"}]]),N$e=wn("minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]),CPn=wn("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),N5e=wn("password","IconPassword",[["path",{d:"M12 10v4",key:"svg-0"}],["path",{d:"M10 13l4 -2",key:"svg-1"}],["path",{d:"M10 11l4 2",key:"svg-2"}],["path",{d:"M5 10v4",key:"svg-3"}],["path",{d:"M3 13l4 -2",key:"svg-4"}],["path",{d:"M3 11l4 2",key:"svg-5"}],["path",{d:"M19 10v4",key:"svg-6"}],["path",{d:"M17 13l4 -2",key:"svg-7"}],["path",{d:"M17 11l4 2",key:"svg-8"}]]),xre=wn("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),bPn=wn("refresh-alert","IconRefreshAlert",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 9l0 3",key:"svg-2"}],["path",{d:"M12 15l.01 0",key:"svg-3"}]]),kPn=wn("refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]),FPn=wn("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),yPn=wn("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),APn=wn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),_Pn=wn("table","IconTable",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]]),vre=wn("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),SPn=wn("user-edit","IconUserEdit",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h3.5",key:"svg-1"}],["path",{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z",key:"svg-2"}]]),P5e=wn("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),BPn=wn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),P$e=Symbol.for("immer-nothing"),R5e=Symbol.for("immer-draftable"),W0=Symbol.for("immer-state");function wc(u,...e){throw new Error(`[Immer] minified error nr: ${u}. Full error at: https://bit.ly/3cXEKWf`)}var n6=Object.getPrototypeOf;function i6(u){return!!u&&!!u[W0]}function kp(u){var e;return u?R$e(u)||Array.isArray(u)||!!u[R5e]||!!((e=u.constructor)!=null&&e[R5e])||OO(u)||jO(u):!1}var wPn=Object.prototype.constructor.toString();function R$e(u){if(!u||typeof u!="object")return!1;const e=n6(u);if(e===null)return!0;const t=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===wPn}function Wy(u,e){IO(u)===0?Object.entries(u).forEach(([t,n])=>{e(t,n,u)}):u.forEach((t,n)=>e(n,t,u))}function IO(u){const e=u[W0];return e?e.type_:Array.isArray(u)?1:OO(u)?2:jO(u)?3:0}function iQ(u,e){return IO(u)===2?u.has(e):Object.prototype.hasOwnProperty.call(u,e)}function I$e(u,e,t){const n=IO(u);n===2?u.set(e,t):n===3?u.add(t):u[e]=t}function LPn(u,e){return u===e?u!==0||1/u===1/e:u!==u&&e!==e}function OO(u){return u instanceof Map}function jO(u){return u instanceof Set}function xf(u){return u.copy_||u.base_}function rQ(u,e){if(OO(u))return new Map(u);if(jO(u))return new Set(u);if(Array.isArray(u))return Array.prototype.slice.call(u);if(!e&&R$e(u))return n6(u)?{...u}:Object.assign(Object.create(null),u);const t=Object.getOwnPropertyDescriptors(u);delete t[W0];let n=Reflect.ownKeys(t);for(let i=0;i1&&(u.set=u.add=u.clear=u.delete=zPn),Object.freeze(u),e&&Wy(u,(t,n)=>Cre(n,!0))),u}function zPn(){wc(2)}function HO(u){return Object.isFrozen(u)}var MPn={};function Fp(u){const e=MPn[u];return e||wc(0,u),e}var Gy;function O$e(){return Gy}function TPn(u,e){return{drafts_:[],parent_:u,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function I5e(u,e){e&&(Fp("Patches"),u.patches_=[],u.inversePatches_=[],u.patchListener_=e)}function aQ(u){oQ(u),u.drafts_.forEach(NPn),u.drafts_=null}function oQ(u){u===Gy&&(Gy=u.parent_)}function O5e(u){return Gy=TPn(Gy,u)}function NPn(u){const e=u[W0];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function j5e(u,e){e.unfinalizedDrafts_=e.drafts_.length;const t=e.drafts_[0];return u!==void 0&&u!==t?(t[W0].modified_&&(aQ(e),wc(4)),kp(u)&&(u=xN(e,u),e.parent_||vN(e,u)),e.patches_&&Fp("Patches").generateReplacementPatches_(t[W0].base_,u,e.patches_,e.inversePatches_)):u=xN(e,t,[]),aQ(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),u!==P$e?u:void 0}function xN(u,e,t){if(HO(e))return e;const n=e[W0];if(!n)return Wy(e,(i,r)=>H5e(u,n,e,i,r,t)),e;if(n.scope_!==u)return e;if(!n.modified_)return vN(u,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let r=i,a=!1;n.type_===3&&(r=new Set(i),i.clear(),a=!0),Wy(r,(o,s)=>H5e(u,n,i,o,s,t,a)),vN(u,i,!1),t&&u.patches_&&Fp("Patches").generatePatches_(n,t,u.patches_,u.inversePatches_)}return n.copy_}function H5e(u,e,t,n,i,r,a){if(i6(i)){const o=r&&e&&e.type_!==3&&!iQ(e.assigned_,n)?r.concat(n):void 0,s=xN(u,i,o);if(I$e(t,n,s),i6(s))u.canAutoFreeze_=!1;else return}else a&&t.add(i);if(kp(i)&&!HO(i)){if(!u.immer_.autoFreeze_&&u.unfinalizedDrafts_<1)return;xN(u,i),(!e||!e.scope_.parent_)&&vN(u,i)}}function vN(u,e,t=!1){!u.parent_&&u.immer_.autoFreeze_&&u.canAutoFreeze_&&Cre(e,t)}function PPn(u,e){const t=Array.isArray(u),n={type_:t?1:0,scope_:e?e.scope_:O$e(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:u,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,r=bre;t&&(i=[n],r=Uy);const{revoke:a,proxy:o}=Proxy.revocable(i,r);return n.draft_=o,n.revoke_=a,o}var bre={get(u,e){if(e===W0)return u;const t=xf(u);if(!iQ(t,e))return RPn(u,t,e);const n=t[e];return u.finalized_||!kp(n)?n:n===tK(u.base_,e)?(uK(u),u.copy_[e]=lQ(n,u)):n},has(u,e){return e in xf(u)},ownKeys(u){return Reflect.ownKeys(xf(u))},set(u,e,t){const n=j$e(xf(u),e);if(n!=null&&n.set)return n.set.call(u.draft_,t),!0;if(!u.modified_){const i=tK(xf(u),e),r=i==null?void 0:i[W0];if(r&&r.base_===t)return u.copy_[e]=t,u.assigned_[e]=!1,!0;if(LPn(t,i)&&(t!==void 0||iQ(u.base_,e)))return!0;uK(u),sQ(u)}return u.copy_[e]===t&&(t!==void 0||e in u.copy_)||Number.isNaN(t)&&Number.isNaN(u.copy_[e])||(u.copy_[e]=t,u.assigned_[e]=!0),!0},deleteProperty(u,e){return tK(u.base_,e)!==void 0||e in u.base_?(u.assigned_[e]=!1,uK(u),sQ(u)):delete u.assigned_[e],u.copy_&&delete u.copy_[e],!0},getOwnPropertyDescriptor(u,e){const t=xf(u),n=Reflect.getOwnPropertyDescriptor(t,e);return n&&{writable:!0,configurable:u.type_!==1||e!=="length",enumerable:n.enumerable,value:t[e]}},defineProperty(){wc(11)},getPrototypeOf(u){return n6(u.base_)},setPrototypeOf(){wc(12)}},Uy={};Wy(bre,(u,e)=>{Uy[u]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});Uy.deleteProperty=function(u,e){return Uy.set.call(this,u,e,void 0)};Uy.set=function(u,e,t){return bre.set.call(this,u[0],e,t,u[0])};function tK(u,e){const t=u[W0];return(t?xf(t):u)[e]}function RPn(u,e,t){var i;const n=j$e(e,t);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(u.draft_):void 0}function j$e(u,e){if(!(e in u))return;let t=n6(u);for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n;t=n6(t)}}function sQ(u){u.modified_||(u.modified_=!0,u.parent_&&sQ(u.parent_))}function uK(u){u.copy_||(u.copy_=rQ(u.base_,u.scope_.immer_.useStrictShallowCopy_))}var IPn=class{constructor(u){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if(typeof e=="function"&&typeof t!="function"){const r=t;t=e;const a=this;return function(s=r,...l){return a.produce(s,c=>t.call(this,c,...l))}}typeof t!="function"&&wc(6),n!==void 0&&typeof n!="function"&&wc(7);let i;if(kp(e)){const r=O5e(this),a=lQ(e,void 0);let o=!0;try{i=t(a),o=!1}finally{o?aQ(r):oQ(r)}return I5e(r,n),j5e(i,r)}else if(!e||typeof e!="object"){if(i=t(e),i===void 0&&(i=e),i===P$e&&(i=void 0),this.autoFreeze_&&Cre(i,!0),n){const r=[],a=[];Fp("Patches").generateReplacementPatches_(e,i,r,a),n(r,a)}return i}else wc(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e=="function")return(a,...o)=>this.produceWithPatches(a,s=>e(s,...o));let n,i;return[this.produce(e,t,(a,o)=>{n=a,i=o}),n,i]},typeof(u==null?void 0:u.autoFreeze)=="boolean"&&this.setAutoFreeze(u.autoFreeze),typeof(u==null?void 0:u.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(u.useStrictShallowCopy)}createDraft(u){kp(u)||wc(8),i6(u)&&(u=OPn(u));const e=O5e(this),t=lQ(u,void 0);return t[W0].isManual_=!0,oQ(e),t}finishDraft(u,e){const t=u&&u[W0];(!t||!t.isManual_)&&wc(9);const{scope_:n}=t;return I5e(n,e),j5e(void 0,n)}setAutoFreeze(u){this.autoFreeze_=u}setUseStrictShallowCopy(u){this.useStrictShallowCopy_=u}applyPatches(u,e){let t;for(t=e.length-1;t>=0;t--){const i=e[t];if(i.path.length===0&&i.op==="replace"){u=i.value;break}}t>-1&&(e=e.slice(t+1));const n=Fp("Patches").applyPatches_;return i6(u)?n(u,e):this.produce(u,i=>n(i,e))}};function lQ(u,e){const t=OO(u)?Fp("MapSet").proxyMap_(u,e):jO(u)?Fp("MapSet").proxySet_(u,e):PPn(u,e);return(e?e.scope_:O$e()).drafts_.push(t),t}function OPn(u){return i6(u)||wc(10,u),H$e(u)}function H$e(u){if(!kp(u)||HO(u))return u;const e=u[W0];let t;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,t=rQ(u,e.scope_.immer_.useStrictShallowCopy_)}else t=rQ(u,!0);return Wy(t,(n,i)=>{I$e(t,n,H$e(i))}),e&&(e.finalized_=!1),t}var G0=new IPn,rb=G0.produce;G0.produceWithPatches.bind(G0);G0.setAutoFreeze.bind(G0);G0.setUseStrictShallowCopy.bind(G0);G0.applyPatches.bind(G0);G0.createDraft.bind(G0);G0.finishDraft.bind(G0);function jPn(){if(console&&console.warn){for(var u=arguments.length,e=new Array(u),t=0;t()=>{if(u.isInitialized)e();else{const t=()=>{setTimeout(()=>{u.off("initialized",t)},0),e()};u.on("initialized",t)}};function $5e(u,e,t){u.loadNamespaces(e,V$e(u,t))}function K5e(u,e,t,n){typeof t=="string"&&(t=[t]),t.forEach(i=>{u.options.ns.indexOf(i)<0&&u.options.ns.push(i)}),u.loadLanguages(e,V$e(u,n))}function HPn(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],i=e.options?e.options.fallbackLng:!1,r=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(o,s)=>{const l=e.services.backendConnector.state[`${o}|${s}`];return l===-1||l===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,u)?!1:!!(e.hasResourceBundle(n,u)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(n,u)&&(!i||a(r,u)))}function VPn(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(cQ("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(u,{lng:t.lng,precheck:(i,r)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,u))return!1}}):HPn(u,e,t)}const $Pn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,KPn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},WPn=u=>KPn[u],GPn=u=>u.replace($Pn,WPn);let dQ={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:GPn};function UPn(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dQ={...dQ,...u}}function qPn(){return dQ}let $$e;function JPn(u){$$e=u}function ZPn(){return $$e}const YPn={type:"3rdParty",init(u){UPn(u.options.react),JPn(u)}},QPn=C.createContext();class XPn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const eRn=(u,e)=>{const t=C.useRef();return C.useEffect(()=>{t.current=e?t.current:u},[u,e]),t.current};function Ei(u){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:n,defaultNS:i}=C.useContext(QPn)||{},r=t||n||ZPn();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new XPn),!r){cQ("You will need to pass in an i18next instance by using initReactI18next");const x=(k,A)=>typeof A=="string"?A:A&&typeof A=="object"&&typeof A.defaultValue=="string"?A.defaultValue:Array.isArray(k)?k[k.length-1]:k,b=[x,{},!1];return b.t=x,b.i18n={},b.ready=!1,b}r.options.react&&r.options.react.wait!==void 0&&cQ("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...qPn(),...r.options.react,...e},{useSuspense:o,keyPrefix:s}=a;let l=u||i||r.options&&r.options.defaultNS;l=typeof l=="string"?[l]:l||["translation"],r.reportNamespaces.addUsedNamespaces&&r.reportNamespaces.addUsedNamespaces(l);const c=(r.isInitialized||r.initializedStoreOnce)&&l.every(x=>VPn(x,r,a));function d(){return r.getFixedT(e.lng||null,a.nsMode==="fallback"?l:l[0],s)}const[h,E]=C.useState(d);let m=l.join();e.lng&&(m=`${e.lng}${m}`);const g=eRn(m),f=C.useRef(!0);C.useEffect(()=>{const{bindI18n:x,bindI18nStore:b}=a;f.current=!0,!c&&!o&&(e.lng?K5e(r,e.lng,l,()=>{f.current&&E(d)}):$5e(r,l,()=>{f.current&&E(d)})),c&&g&&g!==m&&f.current&&E(d);function k(){f.current&&E(d)}return x&&r&&r.on(x,k),b&&r&&r.store.on(b,k),()=>{f.current=!1,x&&r&&x.split(" ").forEach(A=>r.off(A,k)),b&&r&&b.split(" ").forEach(A=>r.store.off(A,k))}},[r,m]);const p=C.useRef(!0);C.useEffect(()=>{f.current&&!p.current&&E(d),p.current=!1},[r,s]);const D=[h,r,c];if(D.t=h,D.i18n=r,D.ready=c,c||!c&&!o)return D;throw new Promise(x=>{e.lng?K5e(r,e.lng,l,()=>x()):$5e(r,l,()=>x())})}const tRn={"\n mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n ":VWt,"\n mutation SetMode($paths: [String!]!, $values: [String!]!) {\n setJsonStorage(paths: $paths, values: $values)\n }\n ":$Wt,"\n mutation CreateConfig($name: String, $global: globalInput) {\n createConfig(name: $name, global: $global) {\n id\n }\n }\n ":KWt,"\n mutation UpdateConfig($id: ID!, $global: globalInput!) {\n updateConfig(id: $id, global: $global) {\n id\n }\n }\n ":WWt,"\n mutation RemoveConfig($id: ID!) {\n removeConfig(id: $id)\n }\n ":GWt,"\n mutation SelectConfig($id: ID!) {\n selectConfig(id: $id)\n }\n ":UWt,"\n mutation RenameConfig($id: ID!, $name: String!) {\n renameConfig(id: $id, name: $name)\n }\n ":qWt,"\n mutation CreateRouting($name: String, $routing: String) {\n createRouting(name: $name, routing: $routing) {\n id\n }\n }\n ":JWt,"\n mutation UpdateRouting($id: ID!, $routing: String!) {\n updateRouting(id: $id, routing: $routing) {\n id\n }\n }\n ":ZWt,"\n mutation RemoveRouting($id: ID!) {\n removeRouting(id: $id)\n }\n ":YWt,"\n mutation SelectRouting($id: ID!) {\n selectRouting(id: $id)\n }\n ":QWt,"\n mutation RenameRouting($id: ID!, $name: String!) {\n renameRouting(id: $id, name: $name)\n }\n ":XWt,"\n mutation CreateDNS($name: String, $dns: String) {\n createDns(name: $name, dns: $dns) {\n id\n }\n }\n ":eGt,"\n mutation UpdateDNS($id: ID!, $dns: String!) {\n updateDns(id: $id, dns: $dns) {\n id\n }\n }\n ":tGt,"\n mutation RemoveDNS($id: ID!) {\n removeDns(id: $id)\n }\n ":uGt,"\n mutation SelectDNS($id: ID!) {\n selectDns(id: $id)\n }\n ":nGt,"\n mutation RenameDNS($id: ID!, $name: String!) {\n renameDns(id: $id, name: $name)\n }\n ":iGt,"\n mutation CreateGroup($name: String!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n createGroup(name: $name, policy: $policy, policyParams: $policyParams) {\n id\n }\n }\n ":rGt,"\n mutation RemoveGroup($id: ID!) {\n removeGroup(id: $id)\n }\n ":aGt,"\n mutation GroupSetPolicy($id: ID!, $policy: Policy!, $policyParams: [PolicyParam!]) {\n groupSetPolicy(id: $id, policy: $policy, policyParams: $policyParams)\n }\n ":oGt,"\n mutation RenameGroup($id: ID!, $name: String!) {\n renameGroup(id: $id, name: $name)\n }\n ":sGt,"\n mutation GroupAddNodes($id: ID!, $nodeIDs: [ID!]!) {\n groupAddNodes(id: $id, nodeIDs: $nodeIDs)\n }\n ":lGt,"\n mutation GroupDelNodes($id: ID!, $nodeIDs: [ID!]!) {\n groupDelNodes(id: $id, nodeIDs: $nodeIDs)\n }\n ":cGt,"\n mutation GroupAddSubscriptions($id: ID!, $subscriptionIDs: [ID!]!) {\n groupAddSubscriptions(id: $id, subscriptionIDs: $subscriptionIDs)\n }\n ":dGt,"\n mutation GroupDelSubscriptions($id: ID!, $subscriptionIDs: [ID!]!) {\n groupDelSubscriptions(id: $id, subscriptionIDs: $subscriptionIDs)\n }\n ":hGt,"\n mutation ImportNodes($rollbackError: Boolean!, $args: [ImportArgument!]!) {\n importNodes(rollbackError: $rollbackError, args: $args) {\n link\n error\n node {\n id\n }\n }\n }\n ":EGt,"\n mutation RemoveNodes($ids: [ID!]!) {\n removeNodes(ids: $ids)\n }\n ":mGt,"\n mutation ImportSubscription($rollbackError: Boolean!, $arg: ImportArgument!) {\n importSubscription(rollbackError: $rollbackError, arg: $arg) {\n link\n sub {\n id\n }\n nodeImportResult {\n node {\n id\n }\n }\n }\n }\n ":gGt,"\n mutation UpdateSubscription($id: ID!) {\n updateSubscription(id: $id) {\n id\n }\n }\n ":fGt,"\n mutation RemoveSubscriptions($ids: [ID!]!) {\n removeSubscriptions(ids: $ids)\n }\n ":pGt,"\n mutation Run($dry: Boolean!) {\n run(dry: $dry)\n }\n ":DGt,"\n mutation UpdateAvatar($avatar: String) {\n updateAvatar(avatar: $avatar)\n }\n ":xGt,"\n mutation UpdateName($name: String) {\n updateName(name: $name)\n }\n ":vGt,"\n query Mode($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":CGt,"\n query Defaults($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":bGt,"\n query Interfaces($up: Boolean) {\n general {\n interfaces(up: $up) {\n name\n ifindex\n ip\n flag {\n default {\n gateway\n }\n }\n }\n }\n }\n ":kGt,"\n query JsonStorage($paths: [String!]) {\n jsonStorage(paths: $paths)\n }\n ":FGt,"\n query General($up: Boolean) {\n general {\n dae {\n running\n modified\n version\n }\n interfaces(up: $up) {\n name\n ifindex\n ip\n flag {\n default {\n gateway\n }\n }\n }\n }\n }\n ":yGt,"\n query Nodes {\n nodes {\n edges {\n id\n name\n link\n address\n protocol\n tag\n }\n }\n }\n ":AGt,"\n query Subscriptions {\n subscriptions {\n id\n tag\n status\n link\n info\n updatedAt\n nodes {\n edges {\n id\n name\n protocol\n link\n }\n }\n }\n }\n ":_Gt,"\n query Configs {\n configs {\n id\n name\n selected\n global {\n logLevel\n tproxyPort\n allowInsecure\n checkInterval\n checkTolerance\n lanInterface\n wanInterface\n udpCheckDns\n tcpCheckUrl\n dialMode\n tcpCheckHttpMethod\n disableWaitingNetwork\n autoConfigKernelParameter\n sniffingTimeout\n tlsImplementation\n utlsImitate\n tproxyPortProtect\n soMarkFromDae\n }\n }\n }\n ":SGt,"\n query Groups {\n groups {\n id\n name\n nodes {\n id\n link\n name\n address\n protocol\n tag\n subscriptionID\n }\n subscriptions {\n id\n updatedAt\n tag\n link\n status\n info\n\n nodes {\n edges {\n id\n link\n name\n address\n protocol\n tag\n subscriptionID\n }\n }\n }\n policy\n policyParams {\n key\n val\n }\n }\n }\n ":BGt,"\n query Routings {\n routings {\n id\n name\n selected\n routing {\n string\n }\n }\n }\n ":wGt,"\n query DNSs {\n dnss {\n id\n name\n dns {\n string\n\n routing {\n request {\n string\n }\n response {\n string\n }\n }\n }\n selected\n }\n }\n ":LGt,"\n query User {\n user {\n username\n name\n avatar\n }\n }\n ":zGt,"\n query NumberUsers {\n numberUsers\n }\n ":MGt,"\n mutation CreateUser($username: String!, $password: String!) {\n createUser(username: $username, password: $password)\n }\n ":TGt,"\n query Token($username: String!, $password: String!) {\n token(username: $username, password: $password)\n }\n ":NGt};function xu(u){return tRn[u]??{}}const uRn=()=>{const u=Mu();return Sn({mutationFn:e=>{const t=Object.keys(e),n=t.map(i=>e[i]);return u.request(xu(` mutation SetJsonStorage($paths: [String!]!, $values: [String!]!) { setJsonStorage(paths: $paths, values: $values) } @@ -1496,7 +1496,7 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}fun avatar } } - `))})};var LRn=function u(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,i,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;i--!==0;)if(!u(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){var a=r[i];if(!u(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const W5e=Hl(LRn);function zRn(u){if(!/^[0-9a-zA-Z-]+$/.test(u))throw new Error(`[@mantine/use-form] Form name "${u}" is invalid, it should contain only letters, numbers and dashes`)}const MRn=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Ka(u,e){MRn(()=>{if(u)return window.addEventListener(u,e),()=>window.removeEventListener(u,e)},[u])}function TRn(u,e){u&&zRn(u),Ka(`mantine-form:${u}:set-field-value`,t=>e.setFieldValue(t.detail.path,t.detail.value)),Ka(`mantine-form:${u}:set-values`,t=>e.setValues(t.detail)),Ka(`mantine-form:${u}:set-initial-values`,t=>e.setInitialValues(t.detail)),Ka(`mantine-form:${u}:set-errors`,t=>e.setErrors(t.detail)),Ka(`mantine-form:${u}:set-field-error`,t=>e.setFieldError(t.detail.path,t.detail.error)),Ka(`mantine-form:${u}:clear-field-error`,t=>e.clearFieldError(t.detail)),Ka(`mantine-form:${u}:clear-errors`,e.clearErrors),Ka(`mantine-form:${u}:reset`,e.reset),Ka(`mantine-form:${u}:validate`,e.validate),Ka(`mantine-form:${u}:validate-field`,t=>e.validateField(t.detail)),Ka(`mantine-form:${u}:reorder-list-item`,t=>e.reorderListItem(t.detail.path,t.detail.payload)),Ka(`mantine-form:${u}:remove-list-item`,t=>e.removeListItem(t.detail.path,t.detail.index)),Ka(`mantine-form:${u}:insert-list-item`,t=>e.insertListItem(t.detail.path,t.detail.item,t.detail.index)),Ka(`mantine-form:${u}:set-dirty`,t=>e.setDirty(t.detail)),Ka(`mantine-form:${u}:set-touched`,t=>e.setTouched(t.detail)),Ka(`mantine-form:${u}:reset-dirty`,t=>e.resetDirty(t.detail)),Ka(`mantine-form:${u}:reset-touched`,e.resetTouched)}function hQ(u){return u===null||typeof u!="object"?{}:Object.keys(u).reduce((e,t)=>{const n=u[t];return n!=null&&n!==!1&&(e[t]=n),e},{})}function NRn(u){return e=>{if(!e)u(e);else if(typeof e=="function")u(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:t}=e;t instanceof HTMLInputElement?t.type==="checkbox"?u(t.checked):u(t.value):(t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&u(t.value)}else u(e)}}function G5e(u,e){const t=Object.keys(u);if(typeof e=="string"){const n=t.filter(i=>i.startsWith(`${e}.`));return u[e]||n.some(i=>u[i])||!1}return t.some(n=>u[n])}function eKe(u,e){if(e===null||typeof e!="object")return{};const t={...e};return Object.keys(e).forEach(n=>{n.includes(`${String(u)}.`)&&delete t[n]}),t}function U5e(u,e){const t=u.substring(e.length+1).split(".")[0];return parseInt(t,10)}function q5e(u,e,t,n){if(e===void 0)return t;const i=`${String(u)}`;let r=t;n===-1&&(r=eKe(`${i}.${e}`,r));const a={...r},o=new Set;return Object.entries(r).filter(([s])=>{if(!s.startsWith(`${i}.`))return!1;const l=U5e(s,i);return Number.isNaN(l)?!1:l>=e}).forEach(([s,l])=>{const c=U5e(s,i),d=s.replace(`${i}.${c}`,`${i}.${c+n}`);a[d]=l,o.add(d),o.has(s)||delete a[s]}),a}function PRn(u,{from:e,to:t},n){const i=`${u}.${e}`,r=`${u}.${t}`,a={...n};return Object.keys(n).every(o=>{let s,l;if(o.startsWith(i)&&(s=o,l=o.replace(i,r)),o.startsWith(r)&&(s=o.replace(r,i),l=o),s&&l){const c=a[s],d=a[l];return d===void 0?delete a[s]:a[s]=d,c===void 0?delete a[l]:a[l]=c,!1}return!0}),a}function tKe(u){return typeof u!="string"?[]:u.split(".")}function Th(u,e){const t=tKe(u);if(t.length===0||typeof e!="object"||e===null)return;let n=e[t[0]];for(let i=1;ir!==e),t):t}function Z5e(u){const e=hQ(u);return{hasErrors:Object.keys(e).length>0,errors:e}}function EQ(u,e,t="",n={}){return typeof u!="object"||u===null?n:Object.keys(u).reduce((i,r)=>{const a=u[r],o=`${t===""?"":`${t}.`}${r}`,s=Th(o,e);let l=!1;return typeof a=="function"&&(i[o]=a(s,e,o)),typeof a=="object"&&Array.isArray(s)&&(l=!0,s.forEach((c,d)=>EQ(a,e,`${o}.${d}`,i))),typeof a=="object"&&typeof s=="object"&&s!==null&&(l||EQ(a,e,o,i)),i},n)}function mQ(u,e){return Z5e(typeof u=="function"?u(e):EQ(u,e))}function SS(u,e,t){if(typeof u!="string")return{hasError:!1,error:null};const n=mQ(e,t),i=Object.keys(n.errors).find(r=>u.split(".").every((a,o)=>a===r.split(".")[o]));return{hasError:!!i,error:i?n.errors[i]:null}}const jRn="__MANTINE_FORM_INDEX__";function Y5e(u,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(u.replace(/[.][0-9]/g,`.${jRn}`)):!1:!1}function Da({name:u,initialValues:e,initialErrors:t={},initialDirty:n={},initialTouched:i={},clearInputErrorOnChange:r=!0,validateInputOnChange:a=!1,validateInputOnBlur:o=!1,onValuesChange:s,transformValues:l=h=>h,enhanceGetInputProps:c,validate:d}={}){const[h,E]=C.useState(i),[m,g]=C.useState(n),[f,p]=C.useState(e||{}),[D,x]=C.useState(hQ(t)),[b,k]=C.useState(!1),A=C.useRef(e||{}),F=de=>{A.current=de},S=C.useCallback(de=>{b||(k(!0),p(de))},[b]),w=C.useCallback(()=>E({}),[]),z=de=>{const he=de?{...f,...de}:f;F(he),g({})},N=C.useCallback(de=>x(he=>hQ(typeof de=="function"?de(he):de)),[]),O=C.useCallback(()=>x({}),[]),y=C.useCallback(()=>{p(A.current),O(),g({}),w()},[]),_=C.useCallback((de,he)=>N(Be=>({...Be,[de]:he})),[]),L=C.useCallback(de=>N(he=>{if(typeof de!="string")return he;const Be={...he};return delete Be[de],Be}),[]),T=C.useCallback(de=>g(he=>{if(typeof de!="string")return he;const Be=eKe(de,he);return delete Be[de],Be}),[]),R=C.useCallback((de,he)=>{const Be=Y5e(de,a);T(de),E(je=>({...je,[de]:!0})),p(je=>{const bt=VO(de,he,je);if(Be){const qt=SS(de,d,bt);qt.hasError?_(de,qt.error):L(de)}return s==null||s(bt),bt}),!Be&&r&&_(de,null)},[]),I=C.useCallback(de=>{p(he=>{const Be=typeof de=="function"?de(he):de,je={...he,...Be};return s==null||s(je),je}),r&&O()},[]),H=C.useCallback((de,he)=>{T(de),p(Be=>{const je=RRn(de,he,Be);return s==null||s(je),je}),x(Be=>PRn(de,he,Be))},[]),V=C.useCallback((de,he)=>{T(de),p(Be=>{const je=ORn(de,he,Be);return s==null||s(je),je}),x(Be=>q5e(de,he,Be,-1))},[]),U=C.useCallback((de,he,Be)=>{T(de),p(je=>{const bt=IRn(de,he,Be,je);return s==null||s(bt),bt}),x(je=>q5e(de,Be,je,1))},[]),J=C.useCallback(()=>{const de=mQ(d,f);return x(de.errors),de},[f,d]),Y=C.useCallback(de=>{const he=SS(de,d,f);return he.hasError?_(de,he.error):L(de),he},[f,d]),X=(de,{type:he="input",withError:Be=!0,withFocus:je=!0,...bt}={})=>{const ou={onChange:NRn(Vt=>R(de,Vt))};return Be&&(ou.error=D[de]),he==="checkbox"?ou.checked=Th(de,f):ou.value=Th(de,f),je&&(ou.onFocus=()=>E(Vt=>({...Vt,[de]:!0})),ou.onBlur=()=>{if(Y5e(de,o)){const Vt=SS(de,d,f);Vt.hasError?_(de,Vt.error):L(de)}}),Object.assign(ou,c==null?void 0:c({inputProps:ou,field:de,options:{type:he,withError:Be,withFocus:je,...bt},form:Se}))},re=(de,he)=>Be=>{Be==null||Be.preventDefault();const je=J();je.hasErrors?he==null||he(je.errors,f,Be):de==null||de(l(f),Be)},ge=de=>l(de||f),_e=C.useCallback(de=>{de.preventDefault(),y()},[]),Ve=de=>{if(de){const Be=Th(de,m);if(typeof Be=="boolean")return Be;const je=Th(de,f),bt=Th(de,A.current);return!W5e(je,bt)}return Object.keys(m).length>0?G5e(m):!W5e(f,A.current)},Ue=C.useCallback(de=>G5e(h,de),[h]),qe=C.useCallback(de=>de?!SS(de,d,f).hasError:!mQ(d,f).hasErrors,[f,d]),Se={initialized:b,values:f,errors:D,initialize:S,setValues:I,setInitialValues:F,setErrors:N,setFieldValue:R,setFieldError:_,clearFieldError:L,clearErrors:O,reset:y,validate:J,validateField:Y,reorderListItem:H,removeListItem:V,insertListItem:U,getInputProps:X,onSubmit:re,onReset:_e,isDirty:Ve,isTouched:Ue,setTouched:E,setDirty:g,resetTouched:w,resetDirty:z,isValid:qe,getTransformedValues:ge};return TRn(u,Se),Se}function xa(u){return e=>{const t=u.safeParse(e);if(t.success)return{};const n={};return t.error.errors.forEach(i=>{n[i.path.join(".")]=i.message}),n}}const ks=({loading:u,reset:e})=>{const{t}=Ei();return B.jsxs(zi,{position:"right",spacing:"xs",children:[B.jsx(xl,{type:"reset",color:"red",onClick:()=>e&&e(),children:t("actions.reset")}),B.jsx(xl,{type:"submit",loading:u,children:t("actions.submit")})]})},gQ=C.forwardRef(({label:u,description:e,...t},n)=>B.jsxs(ju,{ref:n,spacing:4,...t,children:[B.jsx(_u,{children:u}),e&&B.jsx(Ra.Description,{sx:{color:t.selected?"white":void 0},children:e})]})),HRn=ke.object({name:ke.string().nonempty(),logLevelNumber:ke.number().min(0).max(4),tproxyPort:ke.number(),allowInsecure:ke.boolean(),checkIntervalSeconds:ke.number(),checkToleranceMS:ke.number(),sniffingTimeoutMS:ke.number(),lanInterface:ke.array(ke.string().nonempty()),wanInterface:ke.array(ke.string()),udpCheckDns:ke.array(ke.string()).min(1),tcpCheckUrl:ke.array(ke.string()).min(1),dialMode:ke.string(),tcpCheckHttpMethod:ke.string(),disableWaitingNetwork:ke.boolean(),autoConfigKernelParameter:ke.boolean(),tlsImplementation:ke.string(),utlsImitate:ke.string(),tproxyPortProtect:ke.boolean(),soMarkFromDae:ke.number()}),Q5e=({form:u,label:e,description:t,fieldName:n,values:i})=>B.jsxs(Am,{direction:"column",gap:10,children:[B.jsxs(zi,{position:"apart",children:[B.jsx(Ra.Label,{required:!0,children:e}),B.jsx(Uu,{size:20,variant:"filled",color:"green",onClick:()=>{u.insertListItem(n,"")},children:B.jsx(xre,{})})]}),t&&B.jsx(Ra.Description,{children:t}),i.map((r,a)=>B.jsxs(Am,{align:"start",gap:6,children:[B.jsx(wt,{w:"100%",...u.getInputProps(`${n}.${a}`)}),B.jsx(Uu,{variant:"filled",color:"red",mt:8,size:20,onClick:()=>{u.removeListItem(n,a)},children:B.jsx(N$e,{})})]},a))]}),fQ=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState(),[a,o]=C.useState(),s=Da({validate:xa(HRn),initialValues:{name:"",soMarkFromDae:fTe,logLevelNumber:2,tproxyPort:mTe,tproxyPortProtect:gTe,allowInsecure:pTe,checkIntervalSeconds:DTe,checkToleranceMS:xTe,sniffingTimeoutMS:vTe,lanInterface:[],wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,dialMode:kTe,tcpCheckHttpMethod:FTe,disableWaitingNetwork:yTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe}}),l=p=>{s.setValues(p),o(p)};C.useImperativeHandle(t,()=>({form:s,setEditingID:r,initOrigins:l}));const{data:c}=Y$e(),d=C.useMemo(()=>{const p=c==null?void 0:c.general.interfaces;return p?[{label:n("autoDetect"),value:"auto"},...p.filter(({flag:D})=>!!D.default).map(({name:D,ip:x})=>({label:D,value:D,description:B.jsx(ju,{spacing:"xs",children:x.map((b,k)=>B.jsx(_u,{children:b},k))})}))]:[]},[c==null?void 0:c.general.interfaces,n]),h=C.useMemo(()=>{const p=c==null?void 0:c.general.interfaces;return p?p.map(({name:D,ip:x})=>({label:D,value:D,description:B.jsx(ju,{spacing:"xs",children:x.map((b,k)=>B.jsx(_u,{children:b},k))})})):[]},[c==null?void 0:c.general.interfaces]),E=hTe(n),m=C.useMemo(()=>E.map(([p],D)=>({value:D,label:p})),[E]),g=K$e(),f=nRn();return B.jsx(Wi,{title:n("config"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:s.onSubmit(async p=>{const x={logLevel:E[p.logLevelNumber][1],checkInterval:`${p.checkIntervalSeconds}s`,checkTolerance:`${p.checkToleranceMS}ms`,sniffingTimeout:`${p.sniffingTimeoutMS}ms`,...p};i?await f.mutateAsync({id:i,global:x}):await g.mutateAsync({name:p.name,global:x}),e(),s.reset()}),children:B.jsxs(ju,{children:[B.jsx(wt,{label:n("name"),withAsterisk:!0,...s.getInputProps("name"),disabled:!!i}),B.jsxs(nn,{variant:"separated",multiple:!0,defaultValue:["software-options","interface-and-kernel-options","node-connectivity-check","connecting-options"],children:[B.jsxs(nn.Item,{value:"software-options",children:[B.jsx(nn.Control,{children:B.jsx(k0,{order:4,children:n("software options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zo,{label:n("tproxyPort"),description:n("descriptions.config.tproxyPort"),withAsterisk:!0,min:0,max:65535,...s.getInputProps("tproxyPort")}),B.jsx(b0,{label:n("tproxyPortProtect"),description:n("descriptions.config.tproxyPortProtect"),...s.getInputProps("tproxyPortProtect",{type:"checkbox"})}),B.jsx(zo,{label:n("soMarkFromDae"),description:n("descriptions.config.soMarkFromDae"),withAsterisk:!0,min:0,max:Math.pow(2,32)-1,...s.getInputProps("soMarkFromDae")}),B.jsxs(ju,{children:[B.jsx(Ra.Label,{children:n("logLevel")}),B.jsx(Ct,{px:"sm",pb:"lg",children:B.jsx(kze,{min:0,max:4,step:1,label:null,marks:m,...s.getInputProps("logLevelNumber")})})]}),B.jsx(b0,{label:n("disableWaitingNetwork"),description:n("descriptions.config.disableWaitingNetwork"),...s.getInputProps("disableWaitingNetwork",{type:"checkbox"})})]})})]}),B.jsxs(nn.Item,{value:"interface-and-kernel-options",children:[B.jsx(nn.Control,{children:B.jsx(k0,{order:4,children:n("interface and kernel options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zZ,{label:n("lanInterface"),description:n("descriptions.config.lanInterface"),itemComponent:gQ,data:h,...s.getInputProps("lanInterface")}),B.jsx(zZ,{label:n("wanInterface"),description:n("descriptions.config.wanInterface"),itemComponent:gQ,data:d,...s.getInputProps("wanInterface")}),B.jsx(b0,{label:n("autoConfigKernelParameter"),description:n("descriptions.config.autoConfigKernelParameter"),...s.getInputProps("autoConfigKernelParameter",{type:"checkbox"})})]})})]}),B.jsxs(nn.Item,{value:"node-connectivity-check",children:[B.jsx(nn.Control,{children:B.jsx(k0,{order:4,children:n("node connectivity check")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(Q5e,{form:s,label:n("tcpCheckUrl"),description:n("descriptions.config.tcpCheckUrl"),fieldName:"tcpCheckUrl",values:s.values.tcpCheckUrl}),B.jsx(li,{label:n("tcpCheckHttpMethod"),description:n("descriptions.config.tcpCheckHttpMethod"),data:Object.values(Kne).map(p=>({label:p,value:p})),...s.getInputProps("tcpCheckHttpMethod")}),B.jsx(Q5e,{form:s,label:n("udpCheckDns"),description:n("descriptions.config.udpCheckDns"),fieldName:"udpCheckDns",values:s.values.udpCheckDns}),B.jsx(zo,{label:`${n("checkInterval")} (s)`,withAsterisk:!0,...s.getInputProps("checkIntervalSeconds")}),B.jsx(zo,{label:`${n("checkTolerance")} (ms)`,description:n("descriptions.config.checkTolerance"),withAsterisk:!0,step:500,...s.getInputProps("checkToleranceMS")})]})})]}),B.jsxs(nn.Item,{value:"connecting-options",children:[B.jsx(nn.Control,{children:B.jsx(k0,{order:4,children:n("connecting options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zf.Group,{label:n("dialMode"),...s.getInputProps("dialMode"),children:B.jsxs(zi,{mt:"xs",children:[B.jsx(zf,{value:hc.ip,label:hc.ip,description:n("descriptions.config.dialMode.ip")}),B.jsx(zf,{value:hc.domain,label:hc.domain,description:n("descriptions.config.dialMode.domain")}),B.jsx(zf,{value:hc.domainP,label:hc.domainP,description:n("descriptions.config.dialMode.domain+")}),B.jsx(zf,{value:hc.domainPP,label:hc.domainPP,description:n("descriptions.config.dialMode.domain++")})]})}),B.jsx(b0,{label:n("allowInsecure"),description:n("descriptions.config.allowInsecure"),...s.getInputProps("allowInsecure",{type:"checkbox"})}),B.jsx(zo,{label:`${n("sniffingTimeout")} (ms)`,description:n("descriptions.config.sniffingTimeout"),step:500,...s.getInputProps("sniffingTimeoutMS")}),B.jsx(li,{label:n("tlsImplementation"),description:n("descriptions.config.tlsImplementation"),data:Object.values(DT).map(p=>({label:p,value:p})),...s.getInputProps("tlsImplementation")}),s.values.tlsImplementation===DT.utls&&B.jsx(li,{label:n("utlsImitate"),description:n("descriptions.config.utlsImitate"),data:Object.values(Wne).map(p=>({label:p,value:p})),...s.getInputProps("utlsImitate")})]})})]})]}),B.jsx(ks,{reset:()=>{i&&a?s.setValues(a):s.reset()}})]})})})}),VRn=(u,e,t)=>{const n={...u};return e.top+u.y<=t.top?n.y=t.top-e.top:e.bottom+u.y>=t.top+t.height&&(n.y=t.top+t.height-e.bottom),e.left+u.x<=t.left?n.x=t.left-e.left:e.right+u.x>=t.left+t.width&&(n.x=t.left+t.width-e.right),n},$Rn=u=>({draggingNodeRect:e,transform:t})=>{const n=u?u.getBoundingClientRect():null;return!e||!n?t:VRn(t,e,n)};class KRn{constructor(){kn(this,"promise");kn(this,"resolve");kn(this,"reject");this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const WRn=u=>{const e=new FileReader;e.readAsDataURL(u);const t=new KRn;return e.onload=()=>{t.resolve&&t.resolve(e.result)},e.onerror=n=>{t.reject&&t.reject(n)},t.promise},X5e=/([0-9]+)([a-z]+)/,uKe=(u,e={hours:0,milliseconds:0,minutes:0,seconds:0})=>{const t=u.match(X5e);if(!t)return e;const n=Number.parseInt(t[1]);switch(t[2]){case"h":e.hours=n;break;case"m":e.minutes=n;break;case"s":e.seconds=n;break;case"ms":e.milliseconds=n;break}return uKe(u.replace(X5e,""),e)},nK=(u,e)=>MN.duration(uKe(u)).as(e==="ms"?"milliseconds":"seconds");var nKe={exports:{}},Kb={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */Kb.exports;var exe;function GRn(){return exe||(exe=1,function(u,e){(function(t){var n=e&&!e.nodeType&&e,i=u&&!u.nodeType&&u,r=typeof bl=="object"&&bl;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,s=36,l=1,c=26,d=38,h=700,E=72,m=128,g="-",f=/^xn--/,p=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=s-l,k=Math.floor,A=String.fromCharCode,F;function S(V){throw new RangeError(x[V])}function w(V,U){for(var J=V.length,Y=[];J--;)Y[J]=U(V[J]);return Y}function z(V,U){var J=V.split("@"),Y="";J.length>1&&(Y=J[0]+"@",V=J[1]),V=V.replace(D,".");var X=V.split("."),re=w(X,U).join(".");return Y+re}function N(V){for(var U=[],J=0,Y=V.length,X,re;J=55296&&X<=56319&&J65535&&(U-=65536,J+=A(U>>>10&1023|55296),U=56320|U&1023),J+=A(U),J}).join("")}function y(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:s}function _(V,U){return V+22+75*(V<26)-((U!=0)<<5)}function L(V,U,J){var Y=0;for(V=J?k(V/h):V>>1,V+=k(V/U);V>b*c>>1;Y+=s)V=k(V/b);return k(Y+(b+1)*V/(V+d))}function T(V){var U=[],J=V.length,Y,X=0,re=m,ge=E,_e,Ve,Ue,qe,Se,de,he,Be,je;for(_e=V.lastIndexOf(g),_e<0&&(_e=0),Ve=0;Ve<_e;++Ve)V.charCodeAt(Ve)>=128&&S("not-basic"),U.push(V.charCodeAt(Ve));for(Ue=_e>0?_e+1:0;Ue=J&&S("invalid-input"),he=y(V.charCodeAt(Ue++)),(he>=s||he>k((o-X)/Se))&&S("overflow"),X+=he*Se,Be=de<=ge?l:de>=ge+c?c:de-ge,!(hek(o/je)&&S("overflow"),Se*=je;Y=U.length+1,ge=L(X-qe,Y,qe==0),k(X/Y)>o-re&&S("overflow"),re+=k(X/Y),X%=Y,U.splice(X++,0,re)}return O(U)}function R(V){var U,J,Y,X,re,ge,_e,Ve,Ue,qe,Se,de=[],he,Be,je,bt;for(V=N(V),he=V.length,U=m,J=0,re=E,ge=0;ge=U&&Se<_e&&(_e=Se);for(Be=Y+1,_e-U>k((o-J)/Be)&&S("overflow"),J+=(_e-U)*Be,U=_e,ge=0;geo&&S("overflow"),Se==U){for(Ve=J,Ue=s;qe=Ue<=re?l:Ue>=re+c?c:Ue-re,!(Ve{if(u)return window.addEventListener(u,e),()=>window.removeEventListener(u,e)},[u])}function TRn(u,e){u&&zRn(u),Ka(`mantine-form:${u}:set-field-value`,t=>e.setFieldValue(t.detail.path,t.detail.value)),Ka(`mantine-form:${u}:set-values`,t=>e.setValues(t.detail)),Ka(`mantine-form:${u}:set-initial-values`,t=>e.setInitialValues(t.detail)),Ka(`mantine-form:${u}:set-errors`,t=>e.setErrors(t.detail)),Ka(`mantine-form:${u}:set-field-error`,t=>e.setFieldError(t.detail.path,t.detail.error)),Ka(`mantine-form:${u}:clear-field-error`,t=>e.clearFieldError(t.detail)),Ka(`mantine-form:${u}:clear-errors`,e.clearErrors),Ka(`mantine-form:${u}:reset`,e.reset),Ka(`mantine-form:${u}:validate`,e.validate),Ka(`mantine-form:${u}:validate-field`,t=>e.validateField(t.detail)),Ka(`mantine-form:${u}:reorder-list-item`,t=>e.reorderListItem(t.detail.path,t.detail.payload)),Ka(`mantine-form:${u}:remove-list-item`,t=>e.removeListItem(t.detail.path,t.detail.index)),Ka(`mantine-form:${u}:insert-list-item`,t=>e.insertListItem(t.detail.path,t.detail.item,t.detail.index)),Ka(`mantine-form:${u}:set-dirty`,t=>e.setDirty(t.detail)),Ka(`mantine-form:${u}:set-touched`,t=>e.setTouched(t.detail)),Ka(`mantine-form:${u}:reset-dirty`,t=>e.resetDirty(t.detail)),Ka(`mantine-form:${u}:reset-touched`,e.resetTouched)}function hQ(u){return u===null||typeof u!="object"?{}:Object.keys(u).reduce((e,t)=>{const n=u[t];return n!=null&&n!==!1&&(e[t]=n),e},{})}function NRn(u){return e=>{if(!e)u(e);else if(typeof e=="function")u(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:t}=e;t instanceof HTMLInputElement?t.type==="checkbox"?u(t.checked):u(t.value):(t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&u(t.value)}else u(e)}}function G5e(u,e){const t=Object.keys(u);if(typeof e=="string"){const n=t.filter(i=>i.startsWith(`${e}.`));return u[e]||n.some(i=>u[i])||!1}return t.some(n=>u[n])}function eKe(u,e){if(e===null||typeof e!="object")return{};const t={...e};return Object.keys(e).forEach(n=>{n.includes(`${String(u)}.`)&&delete t[n]}),t}function U5e(u,e){const t=u.substring(e.length+1).split(".")[0];return parseInt(t,10)}function q5e(u,e,t,n){if(e===void 0)return t;const i=`${String(u)}`;let r=t;n===-1&&(r=eKe(`${i}.${e}`,r));const a={...r},o=new Set;return Object.entries(r).filter(([s])=>{if(!s.startsWith(`${i}.`))return!1;const l=U5e(s,i);return Number.isNaN(l)?!1:l>=e}).forEach(([s,l])=>{const c=U5e(s,i),d=s.replace(`${i}.${c}`,`${i}.${c+n}`);a[d]=l,o.add(d),o.has(s)||delete a[s]}),a}function PRn(u,{from:e,to:t},n){const i=`${u}.${e}`,r=`${u}.${t}`,a={...n};return Object.keys(n).every(o=>{let s,l;if(o.startsWith(i)&&(s=o,l=o.replace(i,r)),o.startsWith(r)&&(s=o.replace(r,i),l=o),s&&l){const c=a[s],d=a[l];return d===void 0?delete a[s]:a[s]=d,c===void 0?delete a[l]:a[l]=c,!1}return!0}),a}function tKe(u){return typeof u!="string"?[]:u.split(".")}function Th(u,e){const t=tKe(u);if(t.length===0||typeof e!="object"||e===null)return;let n=e[t[0]];for(let i=1;ir!==e),t):t}function Z5e(u){const e=hQ(u);return{hasErrors:Object.keys(e).length>0,errors:e}}function EQ(u,e,t="",n={}){return typeof u!="object"||u===null?n:Object.keys(u).reduce((i,r)=>{const a=u[r],o=`${t===""?"":`${t}.`}${r}`,s=Th(o,e);let l=!1;return typeof a=="function"&&(i[o]=a(s,e,o)),typeof a=="object"&&Array.isArray(s)&&(l=!0,s.forEach((c,d)=>EQ(a,e,`${o}.${d}`,i))),typeof a=="object"&&typeof s=="object"&&s!==null&&(l||EQ(a,e,o,i)),i},n)}function mQ(u,e){return Z5e(typeof u=="function"?u(e):EQ(u,e))}function SS(u,e,t){if(typeof u!="string")return{hasError:!1,error:null};const n=mQ(e,t),i=Object.keys(n.errors).find(r=>u.split(".").every((a,o)=>a===r.split(".")[o]));return{hasError:!!i,error:i?n.errors[i]:null}}const jRn="__MANTINE_FORM_INDEX__";function Y5e(u,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(u.replace(/[.][0-9]/g,`.${jRn}`)):!1:!1}function Da({name:u,initialValues:e,initialErrors:t={},initialDirty:n={},initialTouched:i={},clearInputErrorOnChange:r=!0,validateInputOnChange:a=!1,validateInputOnBlur:o=!1,onValuesChange:s,transformValues:l=h=>h,enhanceGetInputProps:c,validate:d}={}){const[h,E]=C.useState(i),[m,g]=C.useState(n),[f,p]=C.useState(e||{}),[D,x]=C.useState(hQ(t)),[b,k]=C.useState(!1),A=C.useRef(e||{}),F=de=>{A.current=de},S=C.useCallback(de=>{b||(k(!0),p(de))},[b]),w=C.useCallback(()=>E({}),[]),z=de=>{const he=de?{...f,...de}:f;F(he),g({})},N=C.useCallback(de=>x(he=>hQ(typeof de=="function"?de(he):de)),[]),O=C.useCallback(()=>x({}),[]),y=C.useCallback(()=>{p(A.current),O(),g({}),w()},[]),_=C.useCallback((de,he)=>N(Be=>({...Be,[de]:he})),[]),L=C.useCallback(de=>N(he=>{if(typeof de!="string")return he;const Be={...he};return delete Be[de],Be}),[]),T=C.useCallback(de=>g(he=>{if(typeof de!="string")return he;const Be=eKe(de,he);return delete Be[de],Be}),[]),R=C.useCallback((de,he)=>{const Be=Y5e(de,a);T(de),E(je=>({...je,[de]:!0})),p(je=>{const bt=VO(de,he,je);if(Be){const qt=SS(de,d,bt);qt.hasError?_(de,qt.error):L(de)}return s==null||s(bt),bt}),!Be&&r&&_(de,null)},[]),I=C.useCallback(de=>{p(he=>{const Be=typeof de=="function"?de(he):de,je={...he,...Be};return s==null||s(je),je}),r&&O()},[]),H=C.useCallback((de,he)=>{T(de),p(Be=>{const je=RRn(de,he,Be);return s==null||s(je),je}),x(Be=>PRn(de,he,Be))},[]),V=C.useCallback((de,he)=>{T(de),p(Be=>{const je=ORn(de,he,Be);return s==null||s(je),je}),x(Be=>q5e(de,he,Be,-1))},[]),U=C.useCallback((de,he,Be)=>{T(de),p(je=>{const bt=IRn(de,he,Be,je);return s==null||s(bt),bt}),x(je=>q5e(de,Be,je,1))},[]),J=C.useCallback(()=>{const de=mQ(d,f);return x(de.errors),de},[f,d]),Y=C.useCallback(de=>{const he=SS(de,d,f);return he.hasError?_(de,he.error):L(de),he},[f,d]),X=(de,{type:he="input",withError:Be=!0,withFocus:je=!0,...bt}={})=>{const ou={onChange:NRn(Vt=>R(de,Vt))};return Be&&(ou.error=D[de]),he==="checkbox"?ou.checked=Th(de,f):ou.value=Th(de,f),je&&(ou.onFocus=()=>E(Vt=>({...Vt,[de]:!0})),ou.onBlur=()=>{if(Y5e(de,o)){const Vt=SS(de,d,f);Vt.hasError?_(de,Vt.error):L(de)}}),Object.assign(ou,c==null?void 0:c({inputProps:ou,field:de,options:{type:he,withError:Be,withFocus:je,...bt},form:Se}))},re=(de,he)=>Be=>{Be==null||Be.preventDefault();const je=J();je.hasErrors?he==null||he(je.errors,f,Be):de==null||de(l(f),Be)},ge=de=>l(de||f),_e=C.useCallback(de=>{de.preventDefault(),y()},[]),Ve=de=>{if(de){const Be=Th(de,m);if(typeof Be=="boolean")return Be;const je=Th(de,f),bt=Th(de,A.current);return!W5e(je,bt)}return Object.keys(m).length>0?G5e(m):!W5e(f,A.current)},Ue=C.useCallback(de=>G5e(h,de),[h]),qe=C.useCallback(de=>de?!SS(de,d,f).hasError:!mQ(d,f).hasErrors,[f,d]),Se={initialized:b,values:f,errors:D,initialize:S,setValues:I,setInitialValues:F,setErrors:N,setFieldValue:R,setFieldError:_,clearFieldError:L,clearErrors:O,reset:y,validate:J,validateField:Y,reorderListItem:H,removeListItem:V,insertListItem:U,getInputProps:X,onSubmit:re,onReset:_e,isDirty:Ve,isTouched:Ue,setTouched:E,setDirty:g,resetTouched:w,resetDirty:z,isValid:qe,getTransformedValues:ge};return TRn(u,Se),Se}function xa(u){return e=>{const t=u.safeParse(e);if(t.success)return{};const n={};return t.error.errors.forEach(i=>{n[i.path.join(".")]=i.message}),n}}const Fs=({loading:u,reset:e})=>{const{t}=Ei();return B.jsxs(zi,{position:"right",spacing:"xs",children:[B.jsx(xl,{type:"reset",color:"red",onClick:()=>e&&e(),children:t("actions.reset")}),B.jsx(xl,{type:"submit",loading:u,children:t("actions.submit")})]})},gQ=C.forwardRef(({label:u,description:e,...t},n)=>B.jsxs(ju,{ref:n,spacing:4,...t,children:[B.jsx(_u,{children:u}),e&&B.jsx(Ra.Description,{sx:{color:t.selected?"white":void 0},children:e})]})),HRn=ke.object({name:ke.string().nonempty(),logLevelNumber:ke.number().min(0).max(4),tproxyPort:ke.number(),allowInsecure:ke.boolean(),checkIntervalSeconds:ke.number(),checkToleranceMS:ke.number(),sniffingTimeoutMS:ke.number(),lanInterface:ke.array(ke.string().nonempty()),wanInterface:ke.array(ke.string()),udpCheckDns:ke.array(ke.string()).min(1),tcpCheckUrl:ke.array(ke.string()).min(1),dialMode:ke.string(),tcpCheckHttpMethod:ke.string(),disableWaitingNetwork:ke.boolean(),autoConfigKernelParameter:ke.boolean(),tlsImplementation:ke.string(),utlsImitate:ke.string(),tproxyPortProtect:ke.boolean(),soMarkFromDae:ke.number()}),Q5e=({form:u,label:e,description:t,fieldName:n,values:i})=>B.jsxs(Am,{direction:"column",gap:10,children:[B.jsxs(zi,{position:"apart",children:[B.jsx(Ra.Label,{required:!0,children:e}),B.jsx(Uu,{size:20,variant:"filled",color:"green",onClick:()=>{u.insertListItem(n,"")},children:B.jsx(xre,{})})]}),t&&B.jsx(Ra.Description,{children:t}),i.map((r,a)=>B.jsxs(Am,{align:"start",gap:6,children:[B.jsx(wt,{w:"100%",...u.getInputProps(`${n}.${a}`)}),B.jsx(Uu,{variant:"filled",color:"red",mt:8,size:20,onClick:()=>{u.removeListItem(n,a)},children:B.jsx(N$e,{})})]},a))]}),fQ=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState(),[a,o]=C.useState(),s=Da({validate:xa(HRn),initialValues:{name:"",soMarkFromDae:fTe,logLevelNumber:2,tproxyPort:mTe,tproxyPortProtect:gTe,allowInsecure:pTe,checkIntervalSeconds:DTe,checkToleranceMS:xTe,sniffingTimeoutMS:vTe,lanInterface:[],wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,dialMode:kTe,tcpCheckHttpMethod:FTe,disableWaitingNetwork:yTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe}}),l=p=>{s.setValues(p),o(p)};C.useImperativeHandle(t,()=>({form:s,setEditingID:r,initOrigins:l}));const{data:c}=Y$e(),d=C.useMemo(()=>{const p=c==null?void 0:c.general.interfaces;return p?[{label:n("autoDetect"),value:"auto"},...p.filter(({flag:D})=>!!D.default).map(({name:D,ip:x})=>({label:D,value:D,description:B.jsx(ju,{spacing:"xs",children:x.map((b,k)=>B.jsx(_u,{children:b},k))})}))]:[]},[c==null?void 0:c.general.interfaces,n]),h=C.useMemo(()=>{const p=c==null?void 0:c.general.interfaces;return p?p.map(({name:D,ip:x})=>({label:D,value:D,description:B.jsx(ju,{spacing:"xs",children:x.map((b,k)=>B.jsx(_u,{children:b},k))})})):[]},[c==null?void 0:c.general.interfaces]),E=hTe(n),m=C.useMemo(()=>E.map(([p],D)=>({value:D,label:p})),[E]),g=K$e(),f=nRn();return B.jsx(Wi,{title:n("config"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:s.onSubmit(async p=>{const x={logLevel:E[p.logLevelNumber][1],checkInterval:`${p.checkIntervalSeconds}s`,checkTolerance:`${p.checkToleranceMS}ms`,sniffingTimeout:`${p.sniffingTimeoutMS}ms`,...p};i?await f.mutateAsync({id:i,global:x}):await g.mutateAsync({name:p.name,global:x}),e(),s.reset()}),children:B.jsxs(ju,{children:[B.jsx(wt,{label:n("name"),withAsterisk:!0,...s.getInputProps("name"),disabled:!!i}),B.jsxs(nn,{variant:"separated",multiple:!0,defaultValue:["software-options","interface-and-kernel-options","node-connectivity-check","connecting-options"],children:[B.jsxs(nn.Item,{value:"software-options",children:[B.jsx(nn.Control,{children:B.jsx(F0,{order:4,children:n("software options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zo,{label:n("tproxyPort"),description:n("descriptions.config.tproxyPort"),withAsterisk:!0,min:0,max:65535,...s.getInputProps("tproxyPort")}),B.jsx(k0,{label:n("tproxyPortProtect"),description:n("descriptions.config.tproxyPortProtect"),...s.getInputProps("tproxyPortProtect",{type:"checkbox"})}),B.jsx(zo,{label:n("soMarkFromDae"),description:n("descriptions.config.soMarkFromDae"),withAsterisk:!0,min:0,max:Math.pow(2,32)-1,...s.getInputProps("soMarkFromDae")}),B.jsxs(ju,{children:[B.jsx(Ra.Label,{children:n("logLevel")}),B.jsx(Ct,{px:"sm",pb:"lg",children:B.jsx(kze,{min:0,max:4,step:1,label:null,marks:m,...s.getInputProps("logLevelNumber")})})]}),B.jsx(k0,{label:n("disableWaitingNetwork"),description:n("descriptions.config.disableWaitingNetwork"),...s.getInputProps("disableWaitingNetwork",{type:"checkbox"})})]})})]}),B.jsxs(nn.Item,{value:"interface-and-kernel-options",children:[B.jsx(nn.Control,{children:B.jsx(F0,{order:4,children:n("interface and kernel options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zZ,{label:n("lanInterface"),description:n("descriptions.config.lanInterface"),itemComponent:gQ,data:h,...s.getInputProps("lanInterface")}),B.jsx(zZ,{label:n("wanInterface"),description:n("descriptions.config.wanInterface"),itemComponent:gQ,data:d,...s.getInputProps("wanInterface")}),B.jsx(k0,{label:n("autoConfigKernelParameter"),description:n("descriptions.config.autoConfigKernelParameter"),...s.getInputProps("autoConfigKernelParameter",{type:"checkbox"})})]})})]}),B.jsxs(nn.Item,{value:"node-connectivity-check",children:[B.jsx(nn.Control,{children:B.jsx(F0,{order:4,children:n("node connectivity check")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(Q5e,{form:s,label:n("tcpCheckUrl"),description:n("descriptions.config.tcpCheckUrl"),fieldName:"tcpCheckUrl",values:s.values.tcpCheckUrl}),B.jsx(li,{label:n("tcpCheckHttpMethod"),description:n("descriptions.config.tcpCheckHttpMethod"),data:Object.values(Kne).map(p=>({label:p,value:p})),...s.getInputProps("tcpCheckHttpMethod")}),B.jsx(Q5e,{form:s,label:n("udpCheckDns"),description:n("descriptions.config.udpCheckDns"),fieldName:"udpCheckDns",values:s.values.udpCheckDns}),B.jsx(zo,{label:`${n("checkInterval")} (s)`,withAsterisk:!0,...s.getInputProps("checkIntervalSeconds")}),B.jsx(zo,{label:`${n("checkTolerance")} (ms)`,description:n("descriptions.config.checkTolerance"),withAsterisk:!0,step:500,...s.getInputProps("checkToleranceMS")})]})})]}),B.jsxs(nn.Item,{value:"connecting-options",children:[B.jsx(nn.Control,{children:B.jsx(F0,{order:4,children:n("connecting options")})}),B.jsx(nn.Panel,{children:B.jsxs(ju,{children:[B.jsx(zf.Group,{label:n("dialMode"),...s.getInputProps("dialMode"),children:B.jsxs(zi,{mt:"xs",children:[B.jsx(zf,{value:hc.ip,label:hc.ip,description:n("descriptions.config.dialMode.ip")}),B.jsx(zf,{value:hc.domain,label:hc.domain,description:n("descriptions.config.dialMode.domain")}),B.jsx(zf,{value:hc.domainP,label:hc.domainP,description:n("descriptions.config.dialMode.domain+")}),B.jsx(zf,{value:hc.domainPP,label:hc.domainPP,description:n("descriptions.config.dialMode.domain++")})]})}),B.jsx(k0,{label:n("allowInsecure"),description:n("descriptions.config.allowInsecure"),...s.getInputProps("allowInsecure",{type:"checkbox"})}),B.jsx(zo,{label:`${n("sniffingTimeout")} (ms)`,description:n("descriptions.config.sniffingTimeout"),step:500,...s.getInputProps("sniffingTimeoutMS")}),B.jsx(li,{label:n("tlsImplementation"),description:n("descriptions.config.tlsImplementation"),data:Object.values(DT).map(p=>({label:p,value:p})),...s.getInputProps("tlsImplementation")}),s.values.tlsImplementation===DT.utls&&B.jsx(li,{label:n("utlsImitate"),description:n("descriptions.config.utlsImitate"),data:Object.values(Wne).map(p=>({label:p,value:p})),...s.getInputProps("utlsImitate")})]})})]})]}),B.jsx(Fs,{reset:()=>{i&&a?s.setValues(a):s.reset()}})]})})})}),VRn=(u,e,t)=>{const n={...u};return e.top+u.y<=t.top?n.y=t.top-e.top:e.bottom+u.y>=t.top+t.height&&(n.y=t.top+t.height-e.bottom),e.left+u.x<=t.left?n.x=t.left-e.left:e.right+u.x>=t.left+t.width&&(n.x=t.left+t.width-e.right),n},$Rn=u=>({draggingNodeRect:e,transform:t})=>{const n=u?u.getBoundingClientRect():null;return!e||!n?t:VRn(t,e,n)};class KRn{constructor(){kn(this,"promise");kn(this,"resolve");kn(this,"reject");this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const WRn=u=>{const e=new FileReader;e.readAsDataURL(u);const t=new KRn;return e.onload=()=>{t.resolve&&t.resolve(e.result)},e.onerror=n=>{t.reject&&t.reject(n)},t.promise},X5e=/([0-9]+)([a-z]+)/,uKe=(u,e={hours:0,milliseconds:0,minutes:0,seconds:0})=>{const t=u.match(X5e);if(!t)return e;const n=Number.parseInt(t[1]);switch(t[2]){case"h":e.hours=n;break;case"m":e.minutes=n;break;case"s":e.seconds=n;break;case"ms":e.milliseconds=n;break}return uKe(u.replace(X5e,""),e)},nK=(u,e)=>MN.duration(uKe(u)).as(e==="ms"?"milliseconds":"seconds");var nKe={exports:{}},Kb={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */Kb.exports;var exe;function GRn(){return exe||(exe=1,function(u,e){(function(t){var n=e&&!e.nodeType&&e,i=u&&!u.nodeType&&u,r=typeof bl=="object"&&bl;(r.global===r||r.window===r||r.self===r)&&(t=r);var a,o=2147483647,s=36,l=1,c=26,d=38,h=700,E=72,m=128,g="-",f=/^xn--/,p=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=s-l,k=Math.floor,A=String.fromCharCode,F;function S(V){throw new RangeError(x[V])}function w(V,U){for(var J=V.length,Y=[];J--;)Y[J]=U(V[J]);return Y}function z(V,U){var J=V.split("@"),Y="";J.length>1&&(Y=J[0]+"@",V=J[1]),V=V.replace(D,".");var X=V.split("."),re=w(X,U).join(".");return Y+re}function N(V){for(var U=[],J=0,Y=V.length,X,re;J=55296&&X<=56319&&J65535&&(U-=65536,J+=A(U>>>10&1023|55296),U=56320|U&1023),J+=A(U),J}).join("")}function y(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:s}function _(V,U){return V+22+75*(V<26)-((U!=0)<<5)}function L(V,U,J){var Y=0;for(V=J?k(V/h):V>>1,V+=k(V/U);V>b*c>>1;Y+=s)V=k(V/b);return k(Y+(b+1)*V/(V+d))}function T(V){var U=[],J=V.length,Y,X=0,re=m,ge=E,_e,Ve,Ue,qe,Se,de,he,Be,je;for(_e=V.lastIndexOf(g),_e<0&&(_e=0),Ve=0;Ve<_e;++Ve)V.charCodeAt(Ve)>=128&&S("not-basic"),U.push(V.charCodeAt(Ve));for(Ue=_e>0?_e+1:0;Ue=J&&S("invalid-input"),he=y(V.charCodeAt(Ue++)),(he>=s||he>k((o-X)/Se))&&S("overflow"),X+=he*Se,Be=de<=ge?l:de>=ge+c?c:de-ge,!(hek(o/je)&&S("overflow"),Se*=je;Y=U.length+1,ge=L(X-qe,Y,qe==0),k(X/Y)>o-re&&S("overflow"),re+=k(X/Y),X%=Y,U.splice(X++,0,re)}return O(U)}function R(V){var U,J,Y,X,re,ge,_e,Ve,Ue,qe,Se,de=[],he,Be,je,bt;for(V=N(V),he=V.length,U=m,J=0,re=E,ge=0;ge=U&&Se<_e&&(_e=Se);for(Be=Y+1,_e-U>k((o-J)/Be)&&S("overflow"),J+=(_e-U)*Be,U=_e,ge=0;geo&&S("overflow"),Se==U){for(Ve=J,Ue=s;qe=Ue<=re?l:Ue>=re+c?c:Ue-re,!(Ve=1,T=arguments.length>=2;if(!(this instanceof a))return L?T?new a(y,_):new a(y):new a;if(y===void 0){if(L)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?y=location.href+"":y=""}if(y===null&&L)throw new TypeError("null is not a valid argument for URI");return this.href(y),_!==void 0?this.absoluteTo(_):this}function o(y){return/^[0-9]+$/.test(y)}a.version="1.19.11";var s=a.prototype,l=Object.prototype.hasOwnProperty;function c(y){return y.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(y){return y===void 0?"Undefined":String(Object.prototype.toString.call(y)).slice(8,-1)}function h(y){return d(y)==="Array"}function E(y,_){var L={},T,R;if(d(_)==="RegExp")L=null;else if(h(_))for(T=0,R=_.length;T]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(y){if(!(!y||!y.nodeName)){var _=y.nodeName.toLowerCase();if(!(_==="input"&&y.type!=="image"))return a.domAttributes[_]}};function p(y){return escape(y)}function D(y){return encodeURIComponent(y).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}a.encode=D,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=D,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(y,_){var L=a.encode(y+"");return _===void 0&&(_=a.escapeQuerySpace),_?L.replace(/%20/g,"+"):L},a.decodeQuery=function(y,_){y+="",_===void 0&&(_=a.escapeQuerySpace);try{return a.decode(_?y.replace(/\+/g,"%20"):y)}catch{return y}};var x={encode:"encode",decode:"decode"},b,k=function(y,_){return function(L){try{return a[_](L+"").replace(a.characters[y][_].expression,function(T){return a.characters[y][_].map[T]})}catch{return L}}};for(b in x)a[b+"PathSegment"]=k("pathname",x[b]),a[b+"UrnPathSegment"]=k("urnpath",x[b]);var A=function(y,_,L){return function(T){var R;L?R=function(U){return a[_](a[L](U))}:R=a[_];for(var I=(T+"").split(y),H=0,V=I.length;H-1&&(_.fragment=y.substring(L+1)||null,y=y.substring(0,L)),L=y.indexOf("?"),L>-1&&(_.query=y.substring(L+1)||null,y=y.substring(0,L)),y=y.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),y=y.replace(/^[/\\]{2,}/i,"//"),y.substring(0,2)==="//"?(_.protocol=null,y=y.substring(2),y=a.parseAuthority(y,_)):(L=y.indexOf(":"),L>-1&&(_.protocol=y.substring(0,L)||null,_.protocol&&!_.protocol.match(a.protocol_expression)?_.protocol=void 0:y.substring(L+1,L+3).replace(/\\/g,"/")==="//"?(y=y.substring(L+3),y=a.parseAuthority(y,_)):(y=y.substring(L+1),_.urn=!0))),_.path=y,_},a.parseHost=function(y,_){y||(y=""),y=y.replace(/\\/g,"/");var L=y.indexOf("/"),T,R;if(L===-1&&(L=y.length),y.charAt(0)==="[")T=y.indexOf("]"),_.hostname=y.substring(1,T)||null,_.port=y.substring(T+2,L)||null,_.port==="/"&&(_.port=null);else{var I=y.indexOf(":"),H=y.indexOf("/"),V=y.indexOf(":",I+1);V!==-1&&(H===-1||V-1?R:y.length-1),H;return I>-1&&(R===-1||I-1?re=re.slice(0,ge)+re.slice(ge).replace(I,""):re=re.replace(I,""),!(re.length<=U[0].length)&&!(L.ignore&&L.ignore.test(re))){X=J+re.length;var Ue=_(re,J,X,y);if(Ue===void 0){T.lastIndex=X;continue}Ue=String(Ue),y=y.slice(0,J)+Ue+y.slice(X),T.lastIndex=J+Ue.length}}return T.lastIndex=0,y},a.ensureValidHostname=function(y,_){var L=!!y,T=!!_,R=!1;if(T&&(R=m(a.hostProtocols,_)),R&&!L)throw new TypeError("Hostname cannot be empty, if protocol is "+_);if(y&&y.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(y).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(y){if(y){var _=Number(y);if(!(o(_)&&_>0&&_<65536))throw new TypeError('Port "'+y+'" is not a valid port')}},a.noConflict=function(y){if(y){var _={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(_.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(_.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(_.SecondLevelDomains=i.SecondLevelDomains.noConflict()),_}else i.URI===this&&(i.URI=r);return this},s.build=function(y){return y===!0?this._deferred_build=!0:(y===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new a(this)},s.valueOf=s.toString=function(){return this.build(!1)._string};function F(y){return function(_,L){return _===void 0?this._parts[y]||"":(this._parts[y]=_||null,this.build(!L),this)}}function S(y,_){return function(L,T){return L===void 0?this._parts[y]||"":(L!==null&&(L=L+"",L.charAt(0)===_&&(L=L.substring(1))),this._parts[y]=L,this.build(!T),this)}}s.protocol=F("protocol"),s.username=F("username"),s.password=F("password"),s.hostname=F("hostname"),s.port=F("port"),s.query=S("query","?"),s.fragment=S("fragment","#"),s.search=function(y,_){var L=this.query(y,_);return typeof L=="string"&&L.length?"?"+L:L},s.hash=function(y,_){var L=this.fragment(y,_);return typeof L=="string"&&L.length?"#"+L:L},s.pathname=function(y,_){if(y===void 0||y===!0){var L=this._parts.path||(this._parts.hostname?"/":"");return y?(this._parts.urn?a.decodeUrnPath:a.decodePath)(L):L}else return this._parts.urn?this._parts.path=y?a.recodeUrnPath(y):"":this._parts.path=y?a.recodePath(y):"/",this.build(!_),this},s.path=s.pathname,s.href=function(y,_){var L;if(y===void 0)return this.toString();this._string="",this._parts=a._parts();var T=y instanceof a,R=typeof y=="object"&&(y.hostname||y.path||y.pathname);if(y.nodeName){var I=a.getDomAttribute(y);y=y[I]||"",R=!1}if(!T&&R&&y.pathname!==void 0&&(y=y.toString()),typeof y=="string"||y instanceof String)this._parts=a.parse(String(y),this._parts);else if(T||R){var H=T?y._parts:y;for(L in H)L!=="query"&&l.call(this._parts,L)&&(this._parts[L]=H[L]);H.query&&this.query(H.query,!1)}else throw new TypeError("invalid input");return this.build(!_),this},s.is=function(y){var _=!1,L=!1,T=!1,R=!1,I=!1,H=!1,V=!1,U=!this._parts.urn;switch(this._parts.hostname&&(U=!1,L=a.ip4_expression.test(this._parts.hostname),T=a.ip6_expression.test(this._parts.hostname),_=L||T,R=!_,I=R&&n&&n.has(this._parts.hostname),H=R&&a.idn_expression.test(this._parts.hostname),V=R&&a.punycode_expression.test(this._parts.hostname)),y.toLowerCase()){case"relative":return U;case"absolute":return!U;case"domain":case"name":return R;case"sld":return I;case"ip":return _;case"ip4":case"ipv4":case"inet4":return L;case"ip6":case"ipv6":case"inet6":return T;case"idn":return H;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return V}return null};var w=s.protocol,z=s.port,N=s.hostname;s.protocol=function(y,_){if(y&&(y=y.replace(/:(\/\/)?$/,""),!y.match(a.protocol_expression)))throw new TypeError('Protocol "'+y+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return w.call(this,y,_)},s.scheme=s.protocol,s.port=function(y,_){return this._parts.urn?y===void 0?"":this:(y!==void 0&&(y===0&&(y=null),y&&(y+="",y.charAt(0)===":"&&(y=y.substring(1)),a.ensureValidPort(y))),z.call(this,y,_))},s.hostname=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y!==void 0){var L={preventInvalidHostname:this._parts.preventInvalidHostname},T=a.parseHost(y,L);if(T!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');y=L.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(y,this._parts.protocol)}return N.call(this,y,_)},s.origin=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){var L=this.protocol(),T=this.authority();return T?(L?L+"://":"")+this.authority():""}else{var R=a(y);return this.protocol(R.protocol()).authority(R.authority()).build(!_),this}},s.host=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var L=a.parseHost(y,this._parts);if(L!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');return this.build(!_),this},s.authority=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var L=a.parseAuthority(y,this._parts);if(L!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');return this.build(!_),this},s.userinfo=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){var L=a.buildUserinfo(this._parts);return L&&L.substring(0,L.length-1)}else return y[y.length-1]!=="@"&&(y+="@"),a.parseUserinfo(y,this._parts),this.build(!_),this},s.resource=function(y,_){var L;return y===void 0?this.path()+this.search()+this.hash():(L=a.parse(y),this._parts.path=L.path,this._parts.query=L.query,this._parts.fragment=L.fragment,this.build(!_),this)},s.subdomain=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,L)||""}else{var T=this._parts.hostname.length-this.domain().length,R=this._parts.hostname.substring(0,T),I=new RegExp("^"+c(R));if(y&&y.charAt(y.length-1)!=="."&&(y+="."),y.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return y&&a.ensureValidHostname(y,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(I,y),this.build(!_),this}},s.domain=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y=="boolean"&&(_=y,y=void 0),y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.match(/\./g);if(L&&L.length<2)return this._parts.hostname;var T=this._parts.hostname.length-this.tld(_).length-1;return T=this._parts.hostname.lastIndexOf(".",T-1)+1,this._parts.hostname.substring(T)||""}else{if(!y)throw new TypeError("cannot set domain empty");if(y.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(y,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=y;else{var R=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(R,y)}return this.build(!_),this}},s.tld=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y=="boolean"&&(_=y,y=void 0),y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.lastIndexOf("."),T=this._parts.hostname.substring(L+1);return _!==!0&&n&&n.list[T.toLowerCase()]&&n.get(this._parts.hostname)||T}else{var R;if(y)if(y.match(/[^a-zA-Z0-9-]/))if(n&&n.is(y))R=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(R,y);else throw new TypeError('TLD "'+y+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");R=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(R,y)}else throw new TypeError("cannot set TLD empty");return this.build(!_),this}},s.directory=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0||y===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var L=this._parts.path.length-this.filename().length-1,T=this._parts.path.substring(0,L)||(this._parts.hostname?"/":"");return y?a.decodePath(T):T}else{var R=this._parts.path.length-this.filename().length,I=this._parts.path.substring(0,R),H=new RegExp("^"+c(I));return this.is("relative")||(y||(y="/"),y.charAt(0)!=="/"&&(y="/"+y)),y&&y.charAt(y.length-1)!=="/"&&(y+="/"),y=a.recodePath(y),this._parts.path=this._parts.path.replace(H,y),this.build(!_),this}},s.filename=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y!="string"){if(!this._parts.path||this._parts.path==="/")return"";var L=this._parts.path.lastIndexOf("/"),T=this._parts.path.substring(L+1);return y?a.decodePathSegment(T):T}else{var R=!1;y.charAt(0)==="/"&&(y=y.substring(1)),y.match(/\.?\//)&&(R=!0);var I=new RegExp(c(this.filename())+"$");return y=a.recodePath(y),this._parts.path=this._parts.path.replace(I,y),R?this.normalizePath(_):this.build(!_),this}},s.suffix=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0||y===!0){if(!this._parts.path||this._parts.path==="/")return"";var L=this.filename(),T=L.lastIndexOf("."),R,I;return T===-1?"":(R=L.substring(T+1),I=/^[a-z0-9%]+$/i.test(R)?R:"",y?a.decodePathSegment(I):I)}else{y.charAt(0)==="."&&(y=y.substring(1));var H=this.suffix(),V;if(H)y?V=new RegExp(c(H)+"$"):V=new RegExp(c("."+H)+"$");else{if(!y)return this;this._parts.path+="."+a.recodePath(y)}return V&&(y=a.recodePath(y),this._parts.path=this._parts.path.replace(V,y)),this.build(!_),this}},s.segment=function(y,_,L){var T=this._parts.urn?":":"/",R=this.path(),I=R.substring(0,1)==="/",H=R.split(T);if(y!==void 0&&typeof y!="number"&&(L=_,_=y,y=void 0),y!==void 0&&typeof y!="number")throw new Error('Bad segment "'+y+'", must be 0-based integer');if(I&&H.shift(),y<0&&(y=Math.max(H.length+y,0)),_===void 0)return y===void 0?H:H[y];if(y===null||H[y]===void 0)if(h(_)){H=[];for(var V=0,U=_.length;VZRn().protocol(t||"http").username(u||"").password(e||"").host(n||"").port(String(i)||"80").path(o||"").query(r||{}).hash(a||"").toString(),YRn=({protocol:u,auth:e,host:t,port:n,params:i})=>{const r=encodeURIComponent(e),a=new URL(`${u}://${r}@${t}:${n}/`);return Object.entries(i).forEach(([o,s])=>{s!=null&&s!==""&&a.searchParams.append(o,String(s))}),a.toString()},QRn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:{protocol:"http",...YGt},validate:xa(oqt)}),r=t(a=>{const o={protocol:a.protocol,host:a.host,port:a.port,hash:a.name};return a.username&&a.password&&Object.assign(o,{username:a.username,password:a.password}),u(Q6(o))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(li,{label:e("configureNode.protocol"),data:[{label:"HTTP",value:"http"},{label:"HTTPS",value:"https"}],...n("protocol")}),B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("host")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:e("configureNode.username"),...n("username")}),B.jsx(wt,{label:e("configureNode.password"),...n("password")}),B.jsx(ks,{reset:i})]})},XRn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:ZGt,validate:xa(aqt)}),r=t(a=>{const o={obfs:a.obfs,obfsPassword:a.obfsPassword,sni:a.sni,insecure:a.allowInsecure,pinSHA256:a.pinSHA256};return u(YRn({protocol:"hysteria2",auth:a.auth,host:a.server,port:a.port,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"Auth",withAsterisk:!0,...n("auth")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(wt,{label:"Pin SHA256",...n("pinSHA256")}),B.jsx(b0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(ks,{reset:i})]})},eIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:JGt,validate:xa(rqt)}),r=t(a=>{const o={congestion_control:a.congestion_control,pinned_certchain_sha256:a.pinned_certchain_sha256,sni:a.sni,allow_insecure:a.allowInsecure};return u(Q6({protocol:"juicity",username:a.uuid,password:a.password,host:a.server,port:a.port,hash:a.name,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"UUID",withAsterisk:!0,...n("uuid")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...n("password")}),B.jsx(li,{label:e("configureNode.congestionControl"),data:[{label:"bbr",value:"bbr"},{label:"cubic",value:"cubic"},{label:"new_reno",value:"new_reno"}],...n("congestion_control")}),B.jsx(wt,{label:e("configureNode.pinned_certchain_sha256"),...n("pinned_certchain_sha256")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(b0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(ks,{reset:i})]})},iKe="3.7.5",tIn=iKe,uIn=typeof atob=="function",nIn=typeof btoa=="function",X6=typeof Buffer=="function",nxe=typeof TextDecoder=="function"?new TextDecoder:void 0,ixe=typeof TextEncoder=="function"?new TextEncoder:void 0,iIn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wb=Array.prototype.slice.call(iIn),BS=(u=>{let e={};return u.forEach((t,n)=>e[t]=n),e})(Wb),rIn=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,qa=String.fromCharCode.bind(String),rxe=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):u=>new Uint8Array(Array.prototype.slice.call(u,0)),rKe=u=>u.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),aKe=u=>u.replace(/[^A-Za-z0-9\+\/]/g,""),oKe=u=>{let e,t,n,i,r="";const a=u.length%3;for(let o=0;o255||(n=u.charCodeAt(o++))>255||(i=u.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|i,r+=Wb[e>>18&63]+Wb[e>>12&63]+Wb[e>>6&63]+Wb[e&63]}return a?r.slice(0,a-3)+"===".substring(a):r},_re=nIn?u=>btoa(u):X6?u=>Buffer.from(u,"binary").toString("base64"):oKe,pQ=X6?u=>Buffer.from(u).toString("base64"):u=>{let t=[];for(let n=0,i=u.length;ne?rKe(pQ(u)):pQ(u),aIn=u=>{if(u.length<2){var e=u.charCodeAt(0);return e<128?u:e<2048?qa(192|e>>>6)+qa(128|e&63):qa(224|e>>>12&15)+qa(128|e>>>6&63)+qa(128|e&63)}else{var e=65536+(u.charCodeAt(0)-55296)*1024+(u.charCodeAt(1)-56320);return qa(240|e>>>18&7)+qa(128|e>>>12&63)+qa(128|e>>>6&63)+qa(128|e&63)}},oIn=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,sKe=u=>u.replace(oIn,aIn),axe=X6?u=>Buffer.from(u,"utf8").toString("base64"):ixe?u=>pQ(ixe.encode(u)):u=>_re(sKe(u)),Vx=(u,e=!1)=>e?rKe(axe(u)):axe(u),oxe=u=>Vx(u,!0),sIn=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,lIn=u=>{switch(u.length){case 4:var e=(7&u.charCodeAt(0))<<18|(63&u.charCodeAt(1))<<12|(63&u.charCodeAt(2))<<6|63&u.charCodeAt(3),t=e-65536;return qa((t>>>10)+55296)+qa((t&1023)+56320);case 3:return qa((15&u.charCodeAt(0))<<12|(63&u.charCodeAt(1))<<6|63&u.charCodeAt(2));default:return qa((31&u.charCodeAt(0))<<6|63&u.charCodeAt(1))}},lKe=u=>u.replace(sIn,lIn),cKe=u=>{if(u=u.replace(/\s+/g,""),!rIn.test(u))throw new TypeError("malformed base64.");u+="==".slice(2-(u.length&3));let e,t="",n,i;for(let r=0;r>16&255):i===64?qa(e>>16&255,e>>8&255):qa(e>>16&255,e>>8&255,e&255);return t},Sre=uIn?u=>atob(aKe(u)):X6?u=>Buffer.from(u,"base64").toString("binary"):cKe,dKe=X6?u=>rxe(Buffer.from(u,"base64")):u=>rxe(Sre(u).split("").map(e=>e.charCodeAt(0))),hKe=u=>dKe(EKe(u)),cIn=X6?u=>Buffer.from(u,"base64").toString("utf8"):nxe?u=>nxe.decode(dKe(u)):u=>lKe(Sre(u)),EKe=u=>aKe(u.replace(/[-_]/g,e=>e=="-"?"+":"/")),DQ=u=>cIn(EKe(u)),dIn=u=>{if(typeof u!="string")return!1;const e=u.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},mKe=u=>({value:u,enumerable:!1,writable:!0,configurable:!0}),gKe=function(){const u=(e,t)=>Object.defineProperty(String.prototype,e,mKe(t));u("fromBase64",function(){return DQ(this)}),u("toBase64",function(e){return Vx(this,e)}),u("toBase64URI",function(){return Vx(this,!0)}),u("toBase64URL",function(){return Vx(this,!0)}),u("toUint8Array",function(){return hKe(this)})},fKe=function(){const u=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,mKe(t));u("toBase64",function(e){return rB(this,e)}),u("toBase64URI",function(){return rB(this,!0)}),u("toBase64URL",function(){return rB(this,!0)})},hIn=()=>{gKe(),fKe()},Tf={version:iKe,VERSION:tIn,atob:Sre,atobPolyfill:cKe,btoa:_re,btoaPolyfill:oKe,fromBase64:DQ,toBase64:Vx,encode:Vx,encodeURI:oxe,encodeURL:oxe,utob:sKe,btou:lKe,decode:DQ,isValid:dIn,fromUint8Array:rB,toUint8Array:hKe,extendString:gKe,extendUint8Array:fKe,extendBuiltins:hIn},EIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:WGt,validate:xa(tqt)}),a=n(o=>{let s=`ss://${Tf.encode(`${o.method}:${o.password}`)}@${o.server}:${o.port}/`;if(o.plugin){const l=[o.plugin];o.plugin==="v2ray-plugin"?(o.tls&&l.push("tls"),o.mode!=="websocket"&&l.push("mode="+o.mode),o.host&&l.push("host="+o.host),o.path&&(o.path.startsWith("/")||(o.path="/"+o.path),l.push("path="+o.path)),o.impl&&l.push("impl="+o.impl)):(l.push("obfs="+o.obfs),l.push("obfs-host="+o.host),o.obfs==="http"&&l.push("obfs-path="+o.path),o.impl&&l.push("impl="+o.impl)),s+=`?plugin=${encodeURIComponent(l.join(";"))}`}return s+=o.name.length?`#${encodeURIComponent(o.name)}`:"",u(s)});return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:"Method",withAsterisk:!0,data:[{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"aes-256-gcm",value:"aes-256-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"chacha20-ietf-poly1305",value:"chacha20-ietf-poly1305"},{label:"plain",value:"plain"},{label:"none",value:"none"}],...i("method")}),B.jsx(li,{label:"Plugin",data:[{label:"off",value:""},{label:"simple-obfs",value:"simple-obfs"},{label:"v2ray-plugin",value:"v2ray-plugin"}],...i("plugin")}),t.plugin==="simple-obfs"||t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"Impl",data:[{label:"Keep Default",value:""},{label:"chained",value:"chained"},{label:"transport",value:"transport"}],...i("impl")}),t.plugin==="simple-obfs"&&B.jsx(li,{label:"Obfs",data:[{label:"http",value:"http"},{label:"tls",value:"tls"}],...i("obfs")}),t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"Mode",data:[{label:"websocket",value:"websocket"}],...i("mode")}),t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"TLS",data:[{label:"off",value:""},{label:"tls",value:"tls"}],...i("tls")}),(t.plugin==="simple-obfs"&&(t.obfs==="http"||t.obfs==="tls")||t.plugin==="v2ray-plugin")&&B.jsx(wt,{label:"Host",...i("host")}),t.plugin==="simple-obfs"&&t.obfs==="http"||t.plugin==="v2ray-plugin"&&B.jsx(wt,{label:"Path",...i("path")}),B.jsx(ks,{reset:r})]})},mIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:GGt,validate:xa(uqt)}),a=n(o=>u(`ssr://${Tf.encode(`${o.server}:${o.port}:${o.proto}:${o.method}:${o.obfs}:${Tf.encodeURI(o.password)}/?remarks=${Tf.encodeURI(o.name)}&protoparam=${Tf.encodeURI(o.protoParam)}&obfsparam=${Tf.encodeURI(o.obfsParam)}`)}`));return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:"Method",withAsterisk:!0,data:[{label:"aes-128-cfb",value:"aes-128-cfb"},{label:"aes-192-cfb",value:"aes-192-cfb"},{label:"aes-256-cfb",value:"aes-256-cfb"},{label:"aes-128-ctr",value:"aes-128-ctr"},{label:"aes-192-ctr",value:"aes-192-ctr"},{label:"aes-256-ctr",value:"aes-256-ctr"},{label:"aes-128-ofb",value:"aes-128-ofb"},{label:"aes-192-ofb",value:"aes-192-ofb"},{label:"aes-256-ofb",value:"aes-256-ofb"},{label:"dae-cfb",value:"dae-cfb"},{label:"bf-cfb",value:"bf-cfb"},{label:"cast5-cfb",value:"cast5-cfb"},{label:"rc4-md5",value:"rc4-md5"},{label:"chacha20",value:"chacha20"},{label:"chacha20-ietf",value:"chacha20-ietf"},{label:"salsa20",value:"salsa20"},{label:"camellia-128-cfb",value:"camellia-128-cfb"},{label:"camellia-192-cfb",value:"camellia-192-cfb"},{label:"camellia-256-cfb",value:"camellia-256-cfb"},{label:"idea-cfb",value:"idea-cfb"},{label:"rc2-cfb",value:"rc2-cfb"},{label:"seed-cfb",value:"seed-cfb"},{label:"none",value:"none"}],...i("method")}),B.jsx(li,{label:e("configureNode.protocol"),withAsterisk:!0,data:[{label:"origin",value:"origin"},{label:"verify_sha1",value:"verify_sha1"},{label:"auth_sha1_v4",value:"auth_sha1_v4"},{label:"auth_aes128_md5",value:"auth_aes128_md5"},{label:"auth_aes128_sha1",value:"auth_aes128_sha1"},{label:"auth_chain_a",value:"auth_chain_a"},{label:"auth_chain_b",value:"auth_chain_b"}],...i("proto")}),t.proto!=="origin"&&B.jsx(wt,{label:e("configureNode.protocolParam"),...i("protoParam")}),B.jsx(li,{label:e("configureNode.obfs"),withAsterisk:!0,data:[{label:"plain",value:"plain"},{label:"http_simple",value:"http_simple"},{label:"http_post",value:"http_post"},{label:"random_head",value:"random_head"},{label:"tls1.2_ticket_auth",value:"tls1.2_ticket_auth"}],...i("obfs")}),t.obfs!=="plain"&&B.jsx(wt,{label:e("configureNode.obfsParam"),...i("obfsParam")}),B.jsx(ks,{reset:r})]})},gIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:QGt,validate:xa(sqt)}),r=t(a=>{const o={protocol:"socks5",host:a.host,port:a.port,hash:a.name};return a.username&&a.password&&Object.assign(o,{username:a.username,password:a.password}),u(Q6(o))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("host")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:e("configureNode.username"),...n("username")}),B.jsx(wt,{label:e("configureNode.password"),...n("password")}),B.jsx(ks,{reset:i})]})},fIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:UGt,validate:xa(nqt)}),a=n(o=>{const s={allowInsecure:o.allowInsecure};o.peer!==""&&(s.sni=o.peer);let l="trojan";return(o.method!=="origin"||o.obfs!=="none")&&(l="trojan-go",s.type=o.obfs==="none"?"original":"ws",o.method==="shadowsocks"&&(s.encryption=`ss;${o.ssCipher};${o.ssPassword}`),s.type==="ws"&&(s.host=o.host||"",s.path=o.path||"/"),delete s.allowInsecure),u(Q6({protocol:l,username:o.password,host:o.server,port:o.port,hash:o.name,params:s}))});return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:e("configureNode.protocol"),withAsterisk:!0,data:[{label:"origin",value:"origin"},{label:"shadowsocks",value:"shadowsocks"}],...i("method")}),t.method==="shadowsocks"&&B.jsx(li,{label:"Shadowsocks Cipher",withAsterisk:!0,data:[{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"aes-256-gcm",value:"aes-256-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"chacha20-ietf-poly1305",value:"chacha20-ietf-poly1305"}],...i("ssCipher")}),t.method==="shadowsocks"&&B.jsx(wt,{label:"Shadowsocks password",withAsterisk:!0,...i("ssPassword")}),B.jsx(b0,{label:e("allowInsecure"),disabled:t.method!=="origin"||t.obfs!=="none",...i("allowInsecure",{type:"checkbox"})}),B.jsx(wt,{label:"SNI(Peer)",...i("peer")}),B.jsx(li,{label:"Obfs",data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:"websocket",value:"websocket"}],...i("obfs")}),t.obfs==="websocket"&&B.jsx(wt,{label:e("configureNode.websocketHost"),...i("host")}),t.obfs==="websocket"&&B.jsx(wt,{label:e("configureNode.websocketPath"),...i("path")}),B.jsx(ks,{reset:r})]})},pIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:qGt,validate:xa(iqt)}),r=t(a=>{const o={congestion_control:a.congestion_control,alpn:a.alpn,sni:a.sni,allow_insecure:a.allowInsecure,disable_sni:a.disable_sni,udp_relay_mode:a.udp_relay_mode};return u(Q6({protocol:"tuic",username:a.uuid,password:a.password,host:a.server,port:a.port,hash:a.name,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"UUID",withAsterisk:!0,...n("uuid")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...n("password")}),B.jsx(li,{label:e("configureNode.congestionControl"),data:[{label:"bbr",value:"bbr"},{label:"cubic",value:"cubic"}],...n("congestion_control")}),B.jsx(wt,{label:"Alpn",...n("alpn")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(b0,{label:e("configureNode.disableSNI"),...n("disable_sni",{type:"checkbox"})}),B.jsx(li,{label:e("configureNode.udpRelayMode"),data:[{label:"native",value:"native"},{label:"quic",value:"quic"}],...n("udp_relay_mode")}),B.jsx(b0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(ks,{reset:i})]})},DIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:{protocol:"vmess",...KGt},validate:xa(eqt)}),a=n(o=>{const{protocol:s,net:l,tls:c,path:d,host:h,type:E,sni:m,flow:g,allowInsecure:f,alpn:p,id:D,add:x,port:b,ps:k}=o;if(s==="vless"){const A={type:l,security:c,path:d,host:h,headerType:E,sni:m,flow:g,allowInsecure:f};return p!==""&&(A.alpn=p),l==="grpc"&&(A.serviceName=d),l==="kcp"&&(A.seed=d),u(Q6({protocol:s,username:D,host:x,port:b,hash:k,params:A}))}if(s==="vmess"){const A=structuredClone(o);switch(l){case"kcp":case"tcp":default:A.type=""}switch(A.net){case"ws":case"h2":case"grpc":case"kcp":default:if(A.net==="tcp"&&A.type==="http")break;A.path=""}return A.protocol==="vless"&&A.tls==="xtls"||delete A.flow,u("vmess://"+Tf.encode(JSON.stringify(A)))}});return B.jsxs("form",{onSubmit:a,children:[B.jsx(li,{label:e("configureNode.protocol"),data:[{label:"VMESS",value:"vmess"},{label:"VLESS",value:"vless"}],...i("protocol")}),B.jsx(wt,{label:e("configureNode.name"),...i("ps")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("add")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:"ID",withAsterisk:!0,...i("id")}),t.protocol==="vmess"&&B.jsx(zo,{label:"AlterID",min:0,max:65535,...i("aid")}),t.protocol==="vmess"&&B.jsx(li,{label:e("configureNode.security"),data:[{label:"auto",value:"auto"},{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"none",value:"none"},{label:"zero",value:"zero"}],...i("scy")}),t.type!=="dtls"&&B.jsx(li,{label:"TLS",data:[{label:"off",value:"none"},{label:"tls",value:"tls"},{label:"xtls",value:"xtls"}],...i("tls")}),t.tls!=="none"&&B.jsx(wt,{label:"SNI",...i("sni")}),B.jsx(li,{label:"Flow",data:[{label:"none",value:"none"},{label:"xtls-rprx-origin",value:"xtls-rprx-origin"},{label:"xtls-rprx-origin-udp443",value:"xtls-rprx-origin-udp443"},{label:"xtls-rprx-vision",value:"xtls-rprx-vision-udp443"}],...i("flow")}),t.tls!=="none"&&B.jsx(b0,{label:"AllowInsecure",...i("allowInsecure",{type:"checkbox"})}),B.jsx(li,{label:e("configureNode.network"),data:[{label:"TCP",value:"tcp"},{label:"mKCP",value:"kcp"},{label:"WebSocket",value:"ws"},{label:"HTTP/2",value:"h2"},{label:"gRPC",value:"grpc"}],...i("net")}),t.net==="tcp"&&B.jsx(li,{label:e("configureNode.type"),data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:e("configureNode.httpObfuscation"),value:"srtp"}],...i("type")}),t.net==="kcp"&&B.jsx(li,{label:e("configureNode.type"),data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:e("configureNode.srtpObfuscation"),value:"srtp"},{label:e("configureNode.utpObfuscation"),value:"utp"},{label:e("configureNode.wechatVideoObfuscation"),value:"wechat-video"},{label:e("configureNode.dtlsObfuscation"),value:"dtls"},{label:e("configureNode.wireguardObfuscation"),value:"wireguard"}],...i("type")}),(t.net==="ws"||t.net==="h2"||t.tls==="tls"||t.net==="tcp"&&t.type==="http")&&B.jsx(wt,{label:e("configureNode.host"),...i("host")}),t.tls==="tls"&&B.jsx(wt,{label:"Alpn",...i("alpn")}),(t.net==="ws"||t.net==="h2"||t.net==="tcp"&&t.type==="http")&&B.jsx(wt,{label:e("configureNode.path"),...i("path")}),t.net==="kcp"&&B.jsx(wt,{label:"Seed",...i("path")}),t.net==="grpc"&&B.jsx(wt,{label:"ServiceName",...i("path")}),B.jsx(ks,{reset:r})]})},xIn=ke.object({tag:ke.string().nonempty()}),pKe=({opened:u,onClose:e})=>{const{t}=Ei(),n=yre(),i=Da({initialValues:{tag:""},validate:xa(xIn)}),r=async a=>{const{hasErrors:o}=i.validate();o||(await n.mutateAsync([{link:a,tag:i.values.tag}]),e())};return B.jsxs(Wi,{opened:u,onClose:e,title:t("configureNode.title"),size:"auto",children:[B.jsx(wt,{size:"xs",label:t("tag"),withAsterisk:!0,...i.getInputProps("tag")}),B.jsx(que,{theme:{components:{Tabs:{defaultProps:{variant:"outline"}},TabsPanel:{defaultProps:{pt:"xs"}},TextInput:{defaultProps:{size:"xs"}},Select:{defaultProps:{size:"xs"}},NumberInput:{defaultProps:{size:"xs"}},Checkbox:{defaultProps:{size:"xs"}},Stack:{defaultProps:{spacing:"xs"}}}},inherit:!0,children:B.jsxs(ri,{defaultValue:"v2ray",pt:"xs",children:[B.jsxs(ri.List,{position:"center",children:[B.jsx(ri.Tab,{value:"v2ray",children:"V2RAY"}),B.jsx(ri.Tab,{value:"ss",children:"SS"}),B.jsx(ri.Tab,{value:"ssr",children:"SSR"}),B.jsx(ri.Tab,{value:"trojan",children:"Trojan"}),B.jsx(ri.Tab,{value:"juicity",children:"Juicity"}),B.jsx(ri.Tab,{value:"hysteria2",children:"Hysteria2"}),B.jsx(ri.Tab,{value:"tuic",children:"Tuic"}),B.jsx(ri.Tab,{value:"http",children:"HTTP"}),B.jsx(ri.Tab,{value:"socks5",children:"SOCKS5"})]}),B.jsx(ri.Panel,{value:"v2ray",children:B.jsx(ju,{children:B.jsx(DIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"ss",children:B.jsx(ju,{children:B.jsx(EIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"ssr",children:B.jsx(ju,{children:B.jsx(mIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"trojan",children:B.jsx(ju,{children:B.jsx(fIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"juicity",children:B.jsx(ju,{children:B.jsx(eIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"hysteria2",children:B.jsx(ju,{children:B.jsx(XRn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"tuic",children:B.jsx(ju,{children:B.jsx(pIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"http",children:B.jsx(ju,{children:B.jsx(QRn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"socks5",children:B.jsx(ju,{children:B.jsx(gIn,{onLinkGeneration:r})})})]})})]})},qy=({id:u,name:e,type:t,nodeID:n,groupID:i,subscriptionID:r,onRemove:a,dragDisabled:o,children:s})=>{const{attributes:l,listeners:c,setNodeRef:d,isDragging:h}=vOe({id:u,data:{type:t,nodeID:n,groupID:i,subscriptionID:r},disabled:o});return B.jsx(K5,{disabled:!s,label:B.jsx(_u,{fz:"xs",children:s}),children:B.jsx(Uv,{ref:d,pr:a?3:void 0,rightSection:a&&B.jsx(Uu,{color:"blue",size:"xs",radius:"xl",variant:"transparent",onClick:a,children:B.jsx(BPn,{size:12})}),style:{zIndex:h?10:0,cursor:h?"grabbing":"grab"},opacity:h?.5:void 0,children:B.jsx(_u,{...c,...l,truncate:!0,children:e})})})},CN=({id:u,nodeID:e,subscriptionID:t,type:n,name:i,leftSection:r,onRemove:a,actions:o,children:s})=>{const{t:l}=Ei(),{attributes:c,listeners:d,setNodeRef:h,isDragging:E}=vOe({id:u,data:{type:n,nodeID:e,subscriptionID:t}});return B.jsxs(ym,{ref:h,p:"sm",withBorder:!0,shadow:"sm",style:{opacity:E?.5:void 0},children:[B.jsx(ym.Section,{withBorder:!0,p:"sm",children:B.jsxs(zi,{position:"apart",spacing:"xs",children:[r,B.jsx(Uv,{size:"lg",style:{cursor:"grab",flex:1},...d,...c,children:B.jsx(_u,{truncate:!0,children:i})}),B.jsxs(zi,{children:[o,B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:l("actions.remove"),labels:{cancel:l("confirmModal.cancel"),confirm:l("confirmModal.confirm")},children:l("confirmModal.removeConfirmDescription"),onConfirm:a})},children:B.jsx(vre,{})})]})]})}),B.jsx(ym.Section,{p:"sm",children:s})]})},DKe=({id:u,name:e,onRemove:t,actions:n,children:i})=>{const{t:r}=Ei(),{isOver:a,setNodeRef:o}=xju({id:u});return B.jsxs(ym,{ref:o,withBorder:!0,shadow:"sm",p:"sm",style:{opacity:a?.5:void 0},children:[B.jsx(ym.Section,{withBorder:!0,inheritPadding:!0,py:"sm",children:B.jsxs(zi,{position:"apart",children:[B.jsx(k0,{order:5,children:e}),B.jsxs(zi,{children:[n,t&&B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:r("actions.remove"),labels:{cancel:r("confirmModal.cancel"),confirm:r("confirmModal.confirm")},children:r("confirmModal.removeConfirmDescription"),onConfirm:t})},children:B.jsx(vre,{})})]})]})}),i&&B.jsx(ym.Section,{inheritPadding:!0,py:"sm",children:i})]})},vIn=ke.object({name:ke.string().nonempty(),policy:ke.nativeEnum(al)}),xQ=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState(),[a,o]=C.useState(),s=Da({validate:xa(vIn),initialValues:{name:"",policy:wTe}}),l=E=>{s.setValues(E),o(E)};C.useImperativeHandle(t,()=>({form:s,setEditingID:r,initOrigins:l}));const c=q$e(),d=ERn(),h=[{label:al.MinMovingAvg,value:al.MinMovingAvg,description:n("descriptions.group.MinMovingAvg")},{label:al.MinAvg10,value:al.MinAvg10,description:n("descriptions.group.MinAvg10")},{label:al.Min,value:al.Min,description:n("descriptions.group.Min")},{label:al.Random,value:al.Random,description:n("descriptions.group.Random")}];return B.jsx(Wi,{title:n("group"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:s.onSubmit(async E=>{i?await d.mutateAsync({id:i,policy:E.policy,policyParams:[]}):await c.mutateAsync({name:E.name,policy:E.policy,policyParams:[]}),e(),s.reset()}),children:B.jsxs(ju,{children:[B.jsx(wt,{withAsterisk:!0,label:n("name"),...s.getInputProps("name"),disabled:!!i}),B.jsx(li,{label:n("policy"),dropdownPosition:"bottom",itemComponent:gQ,data:h,...s.getInputProps("policy")}),B.jsx(ks,{reset:()=>{i&&a?s.setValues(a):s.reset()}})]})})})}),CIn={type:"logger",log(u){this.output("log",u)},warn(u){this.output("warn",u)},error(u){this.output("error",u)},output(u,e){console&&console[u]&&console[u].apply(console,e)}};class bN{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||CIn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[n]=this.observers[n]||[],this.observers[n].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{a(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(a=>{a.apply(a,[e,...n])})}}function ab(){let u,e;const t=new Promise((n,i)=>{u=n,e=i});return t.resolve=u,t.reject=e,t}function sxe(u){return u==null?"":""+u}function bIn(u,e,t){u.forEach(n=>{e[n]&&(t[n]=e[n])})}function Bre(u,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!u||typeof u=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!u[a]&&t&&(u[a]=new t),Object.prototype.hasOwnProperty.call(u,a)?u=u[a]:u={}}return i()?{}:{obj:u,k:n(r.shift())}}function lxe(u,e,t){const{obj:n,k:i}=Bre(u,e,Object);n[i]=t}function kIn(u,e,t,n){const{obj:i,k:r}=Bre(u,e,Object);i[r]=i[r]||[],n&&(i[r]=i[r].concat(t)),n||i[r].push(t)}function kN(u,e){const{obj:t,k:n}=Bre(u,e);if(t)return t[n]}function FIn(u,e,t){const n=kN(u,t);return n!==void 0?n:kN(e,t)}function xKe(u,e,t){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in u?typeof u[n]=="string"||u[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(u[n]=e[n]):xKe(u[n],e[n],t):u[n]=e[n]);return u}function KD(u){return u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var yIn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function AIn(u){return typeof u=="string"?u.replace(/[&<>"'\/]/g,e=>yIn[e]):u}const _In=[" ",",","?","!",";"];function SIn(u,e,t){e=e||"",t=t||"";const n=_In.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(u);if(!r){const a=u.indexOf(t);a>0&&!i.test(u.substring(0,a))&&(r=!0)}return r}function FN(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!u)return;if(u[e])return u[e];const n=e.split(t);let i=u;for(let r=0;rr+a;)a++,o=n.slice(r,r+a).join(t),s=i[o];if(s===void 0)return;if(s===null)return null;if(e.endsWith(o)){if(typeof s=="string")return s;if(o&&typeof s[o]=="string")return s[o]}const l=n.slice(r+a).join(t);return l?FN(s,l,t):void 0}i=i[n[r]]}return i}function yN(u){return u&&u.indexOf("_")>0?u.replace("_","-"):u}class cxe extends $O{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&typeof n!="string"&&(o=o.concat(n)),n&&typeof n=="string"&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=kN(this.data,o);return s||!a||typeof n!="string"?s:FN(this.data&&this.data[e]&&this.data[e][t],n,r)}addResource(e,t,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),lxe(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=n,n=t,t=o[1]),this.addNamespaces(t);let s=kN(this.data,o)||{};i?xKe(s,n,r):s={...s,...n},lxe(this.data,o,s),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var vKe={processors:{},addPostProcessor(u){this.processors[u.name]=u},handle(u,e,t,n,i){return u.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,n,i))}),e}};const dxe={};class AN extends $O{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),bIn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=d1.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!SIn(e,n,i);if(a&&!o){const s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:r};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(r=l.shift()),e=l.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(c){const b=t.nsSeparator||this.options.nsSeparator;return i?{res:`${s}${b}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${b}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const d=this.resolve(e,t);let h=d&&d.res;const E=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(h),f=["[object Number]","[object Function]","[object RegExp]"],p=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject;if(D&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&f.indexOf(g)<0&&!(typeof p=="string"&&g==="[object Array]")){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,h,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=b,d.usedParams=this.getUsedParamsDetails(t),d):b}if(r){const b=g==="[object Array]",k=b?[]:{},A=b?m:E;for(const F in h)if(Object.prototype.hasOwnProperty.call(h,F)){const S=`${A}${r}${F}`;k[F]=this.translate(S,{...t,joinArrays:!1,ns:o}),k[F]===S&&(k[F]=h[F])}h=k}}else if(D&&typeof p=="string"&&g==="[object Array]")h=h.join(p),h&&(h=this.extendTranslation(h,e,t,n));else{let b=!1,k=!1;const A=t.count!==void 0&&typeof t.count!="string",F=AN.hasDefaultValue(t),S=A?this.pluralResolver.getSuffix(l,t.count,t):"",w=t.ordinal&&A?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",z=t[`defaultValue${S}`]||t[`defaultValue${w}`]||t.defaultValue;!this.isValidLookup(h)&&F&&(b=!0,h=z),this.isValidLookup(h)||(k=!0,h=a);const O=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:h,y=F&&z!==h&&this.options.updateMissing;if(k||b||y){if(this.logger.log(y?"updateKey":"missingKey",l,s,a,y?z:h),r){const R=this.resolve(a,{...t,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let R=0;R{const V=F&&H!==h?H:O;this.options.missingKeyHandler?this.options.missingKeyHandler(R,s,I,V,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,s,I,V,y,t),this.emit("missingKey",R,s,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?_.forEach(R=>{this.pluralResolver.getSuffixes(R,t).forEach(I=>{T([R],a+I,t[`defaultValue${I}`]||z)})}):T(_,a,z))}h=this.extendTranslation(h,e,t,d,n),k&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${s}:${a}`),(k||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,b?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(d.res=h,d.usedParams=this.getUsedParamsDetails(t),d):h}extendTranslation(e,t,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=e.match(this.interpolator.nestingRegexp);c=h&&h.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language,n),l){const h=e.match(this.interpolator.nestingRegexp),E=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,o;return typeof e=="string"&&(e=[e]),e.forEach(s=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(s,t),c=l.key;i=c;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=t.count!==void 0&&typeof t.count!="string",E=h&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(f=>{this.isValidLookup(n)||(o=f,!dxe[`${g[0]}-${f}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(dxe[`${g[0]}-${f}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(p=>{if(this.isValidLookup(n))return;a=p;const D=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(D,c,p,f,t);else{let b;h&&(b=this.pluralResolver.getSuffix(p,t.count,t));const k=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(D.push(c+b),t.ordinal&&b.indexOf(A)===0&&D.push(c+b.replace(A,this.options.pluralSeparator)),E&&D.push(c+k)),m){const F=`${c}${this.options.contextSeparator}${t.context}`;D.push(F),h&&(D.push(F+b),t.ordinal&&b.indexOf(A)===0&&D.push(F+b.replace(A,this.options.pluralSeparator)),E&&D.push(F+k))}}let x;for(;x=D.pop();)this.isValidLookup(n)||(r=x,n=this.getResource(p,f,x,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}function aK(u){return u.charAt(0).toUpperCase()+u.slice(1)}class hxe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d1.create("languageUtils")}getScriptPartFromCode(e){if(e=yN(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=yN(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aK(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aK(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=aK(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let BIn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],wIn={1:function(u){return+(u>1)},2:function(u){return+(u!=1)},3:function(u){return 0},4:function(u){return u%10==1&&u%100!=11?0:u%10>=2&&u%10<=4&&(u%100<10||u%100>=20)?1:2},5:function(u){return u==0?0:u==1?1:u==2?2:u%100>=3&&u%100<=10?3:u%100>=11?4:5},6:function(u){return u==1?0:u>=2&&u<=4?1:2},7:function(u){return u==1?0:u%10>=2&&u%10<=4&&(u%100<10||u%100>=20)?1:2},8:function(u){return u==1?0:u==2?1:u!=8&&u!=11?2:3},9:function(u){return+(u>=2)},10:function(u){return u==1?0:u==2?1:u<7?2:u<11?3:4},11:function(u){return u==1||u==11?0:u==2||u==12?1:u>2&&u<20?2:3},12:function(u){return+(u%10!=1||u%100==11)},13:function(u){return+(u!==0)},14:function(u){return u==1?0:u==2?1:u==3?2:3},15:function(u){return u%10==1&&u%100!=11?0:u%10>=2&&(u%100<10||u%100>=20)?1:2},16:function(u){return u%10==1&&u%100!=11?0:u!==0?1:2},17:function(u){return u==1||u%10==1&&u%100!=11?0:1},18:function(u){return u==0?0:u==1?1:2},19:function(u){return u==1?0:u==0||u%100>1&&u%100<11?1:u%100>10&&u%100<20?2:3},20:function(u){return u==1?0:u==0||u%100>0&&u%100<20?1:2},21:function(u){return u%100==1?1:u%100==2?2:u%100==3||u%100==4?3:0},22:function(u){return u==1?0:u==2?1:(u<0||u>10)&&u%10==0?2:3}};const LIn=["v1","v2","v3"],zIn=["v4"],Exe={zero:0,one:1,two:2,few:3,many:4,other:5};function MIn(){const u={};return BIn.forEach(e=>{e.lngs.forEach(t=>{u[t]={numbers:e.nr,plurals:wIn[e.fc]}})}),u}class TIn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=d1.create("pluralResolver"),(!this.options.compatibilityJSON||zIn.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=MIn()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(yN(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>Exe[i]-Exe[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!LIn.includes(this.options.compatibilityJSON)}}function mxe(u,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=FIn(u,e,t);return!r&&i&&typeof t=="string"&&(r=FN(u,t,n),r===void 0&&(r=FN(e,t,n))),r}class NIn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=d1.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=t.escape!==void 0?t.escape:AIn,this.escapeValue=t.escapeValue!==void 0?t.escapeValue:!0,this.useRawValueToEscape=t.useRawValueToEscape!==void 0?t.useRawValueToEscape:!1,this.prefix=t.prefix?KD(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?KD(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?KD(t.nestingPrefix):t.nestingPrefixEscaped||KD("$t("),this.nestingSuffix=t.nestingSuffix?KD(t.nestingSuffix):t.nestingSuffixEscaped||KD(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0?t.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,i){let r,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(m){return m.replace(/\$/g,"$$$$")}const c=m=>{if(m.indexOf(this.formatSeparator)<0){const D=mxe(t,s,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,n,{...i,...t,interpolationkey:m}):D}const g=m.split(this.formatSeparator),f=g.shift().trim(),p=g.join(this.formatSeparator).trim();return this.format(mxe(t,s,f,this.options.keySeparator,this.options.ignoreJSONStructure),p,n,{...i,...t,interpolationkey:f})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>l(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?l(this.escape(m)):l(m)}].forEach(m=>{for(o=0;r=m.regex.exec(e);){const g=r[1].trim();if(a=c(g),a===void 0)if(typeof d=="function"){const p=d(e,r,i);a=typeof p=="string"?p:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(h){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=sxe(a));const f=m.safeValue(a);if(e=e.replace(r[0],f),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=r[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function o(s,l){const c=this.nestingOptionsSeparator;if(s.indexOf(c)<0)return s;const d=s.split(new RegExp(`${c}[ ]*{`));let h=`{${d[1]}`;s=d[0],h=this.interpolate(h,a);const E=h.match(/'/g),m=h.match(/"/g);(E&&E.length%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,g),`${s}${c}${h}`}return delete a.defaultValue,s}for(;i=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),s=c,l=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=sxe(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),l&&(r=s.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}function PIn(u){let e=u.toLowerCase().trim();const t={};if(u.indexOf("(")>-1){const n=u.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(!a)return;const[o,...s]=a.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");t[o.trim()]||(t[o.trim()]=l),l==="false"&&(t[o.trim()]=!1),l==="true"&&(t[o.trim()]=!0),isNaN(l)||(t[o.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:t}}function WD(u){const e={};return function(n,i,r){const a=i+JSON.stringify(r);let o=e[a];return o||(o=u(yN(i),r),e[a]=o),o(n)}}class RIn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=d1.create("formatter"),this.options=e,this.formats={number:WD((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return r=>i.format(r)}),currency:WD((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return r=>i.format(r)}),datetime:WD((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return r=>i.format(r)}),relativetime:WD((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return r=>i.format(r,n.range||"day")}),list:WD((t,n)=>{const i=new Intl.ListFormat(t,{...n});return r=>i.format(r)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=WD(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((o,s)=>{const{formatName:l,formatOptions:c}=PIn(s);if(this.formats[l]){let d=o;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},E=h.locale||h.lng||i.locale||i.lng||n;d=this.formats[l](o,E,{...c,...i,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}function IIn(u,e){u.pending[e]!==void 0&&(delete u.pending[e],u.pendingCount--)}class OIn extends $O{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=d1.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const r={},a={},o={},s={};return e.forEach(l=>{let c=!0;t.forEach(d=>{const h=`${l}|${d}`;!n.reload&&this.store.hasResourceBundle(l,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),r[h]===void 0&&(r[h]=!0),s[d]===void 0&&(s[d]=!0)))}),c||(o[l]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),n&&this.store.addResourceBundle(r,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach(s=>{kIn(s.loaded,[r],a),IIn(s,e),t&&s.errors.push(t),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(l=>{o[l]||(o[l]={});const c=s.loaded[l];c.length&&c.forEach(d=>{o[l][d]===void 0&&(o[l][d]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(s=>!s.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&c&&i{this.read.call(this,e,t,n,i+1,r*2,a)},r);return}a(l,c)},s=this.backend[n].bind(this.backend);if(s.length===2){try{const l=s(e,t);l&&typeof l.then=="function"?l.then(c=>o(null,c)).catch(o):o(null,l)}catch(l){o(l)}return}return s(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const s={...a,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(e,t,n,i,s):c=l(e,t,n,i),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else l(e,t,n,i,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}function gxe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:(u,e,t,n)=>u,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function fxe(u){return typeof u.ns=="string"&&(u.ns=[u.ns]),typeof u.fallbackLng=="string"&&(u.fallbackLng=[u.fallbackLng]),typeof u.fallbackNS=="string"&&(u.fallbackNS=[u.fallbackNS]),u.supportedLngs&&u.supportedLngs.indexOf("cimode")<0&&(u.supportedLngs=u.supportedLngs.concat(["cimode"])),u}function wS(){}function jIn(u){Object.getOwnPropertyNames(Object.getPrototypeOf(u)).forEach(t=>{typeof u[t]=="function"&&(u[t]=u[t].bind(u))})}class Jy extends $O{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=fxe(e),this.services={},this.logger=d1,this.modules={external:[]},jIn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=gxe();this.options={...i,...this.options,...fxe(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function r(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?d1.init(r(this.modules.logger),this.options):d1.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=RIn);const d=new hxe(this.options);this.store=new cxe(this.options.resources,this.options);const h=this.services;h.logger=d1,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new TIn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=r(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new NIn(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OIn(r(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(E){for(var m=arguments.length,g=new Array(m>1?m-1:0),f=1;f1?m-1:0),f=1;f{E.init&&E.init(this)})}if(this.format=this.options.interpolation.format,n||(n=wS),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const s=ab(),l=()=>{const c=(d,h)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(h),n(d,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wS;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(l=>{l!=="cimode"&&r.indexOf(l)<0&&r.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>a(s)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o)})}else n(null)}reloadResources(e,t,n){const i=ab();return e||(e=this.languages),t||(t=this.options.ns),n||(n=wS),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vKe.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ab();this.emit("languageChanging",e);const r=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(s,function(){return n.t(...arguments)})},o=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=typeof s=="string"?s:this.services.languageUtils.getBestMatchFromCodes(s);l&&(this.language||r(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,c=>{a(c,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,n){var i=this;const r=function(a,o){let s;if(typeof o!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),d=2;d`${s.keyPrefix}${h}${m}`):E=s.keyPrefix?`${s.keyPrefix}${h}${a}`:a,i.t(E,s)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(o,s)=>{const l=this.services.backendConnector.state[`${o}|${s}`];return l===-1||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const n=ab();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ab();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new hxe(gxe());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Jy(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wS;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new Jy(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new cxe(this.store.data,i),r.services.resourceStore=r.store),r.translator=new AN(r.services,i),r.translator.on("*",function(o){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!Dxe.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!Dxe.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var s=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(s){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},xxe={create:function(e,t,n,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=qIn(e,encodeURIComponent(t),r)},read:function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),i=0;i-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),r=i.split("&"),a=0;a0){var s=r[a].substring(0,o);s===e.lookupQuerystring&&(t=r[a].substring(o+1))}}}return t}},ob=null,vxe=function(){if(ob!==null)return ob;try{ob=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{ob=!1}return ob},YIn={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&vxe()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&vxe()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},sb=null,Cxe=function(){if(sb!==null)return sb;try{sb=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{sb=!1}return sb},QIn={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Cxe()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Cxe()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},XIn={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n0?t:void 0}},eOn={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},tOn={name:"path",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof n[e.lookupFromPathIndex]!="string")return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},uOn={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};function nOn(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var bKe=function(){function u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};HIn(this,u),this.type="languageDetector",this.detectors={},this.init(e,t)}return KIn(u,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=UIn(n,this.options||{},nOn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(JIn),this.addDetector(ZIn),this.addDetector(YIn),this.addDetector(QIn),this.addDetector(XIn),this.addDetector(eOn),this.addDetector(tOn),this.addDetector(uOn)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var n=this;t||(t=this.options.order);var i=[];return t.forEach(function(r){if(n.detectors[r]){var a=n.detectors[r].lookup(n.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),i=i.map(function(r){return n.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(t,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(function(r){i.detectors[r]&&i.detectors[r].cacheUserLanguage(t,i.options)}))}}]),u}();bKe.type="languageDetector";const iOn={add:"Add","advanced mode":"Advanced Mode","already have an account, login instead":"Already have an account, login instead",cancel:"Cancel","change endpoint":"Change Endpoint",confirm:"Confirm",continue:"Continue",create:"New","create account":"Create Account",edit:"Edit",hide:"Hide",import:"Import","import resource":"Import {{ name }}",login:"Login",logout:"Logout",refresh:"Refresh",reload:"Reload",remove:"Remove",rename:"Rename",reset:"Reset","save dae":"Save dae","show content":"Show content","simple mode":"Simple Mode",skip:"Skip","start your journey":"Start your journey",submit:"Submit",switchLanguage:"Switch Language",switchRunning:"Switch Running",switchTheme:"Switch Theme"},rOn="address",aOn="Allow Insecure",oOn="Auto Config Kernel Parameter",sOn="Auto Detect",lOn="avatar",cOn="Check Interval",dOn="Check Tolerance",hOn="collapse",EOn="Config",mOn={congestionControl:"Congestion Control",disableSNI:"Disable SNI",dtlsObfuscation:"Obfuscated as DTLS1.2 Packets",forceTLS:"forcibly TLS on",host:"Host",hostObfuscation:"Host",httpObfuscation:"Obfuscated as HTTP",name:"Name",network:"Network",noObfuscation:"No obfuscation",obfs:"Obfuscation",obfsParam:"Obfs Param",obfsPassword:"Obfs Password",origin:"origin",password:"Password",path:"Path",pathObfuscation:"Path",pinned_certchain_sha256:"Pinned Certchain SHA256",port:"Port",protocol:"Protocol",protocolParam:"Protocol Param",security:"Security",seedObfuscation:"Seed",servername:"Servername",srtpObfuscation:"Obfuscated as Video Calls (SRTP)",title:"Configure Node",type:"Type",udpRelayMode:"UDP Relay Mode",username:"Username",utpObfuscation:"Obfuscated as Bittorrent (uTP)",websocketHost:"WebSocket Host",websocketPath:"WebSocket Path",wechatVideoObfuscation:"Obfuscated as Wechat Video Calls",wireguardObfuscation:"Obfuscated as WireGuard Packets"},gOn={cancel:"No, It's a mistake",confirm:"Yes, I'm sure",removeConfirmDescription:"Are you sure you want to remove this?"},fOn="connected",pOn="debug",DOn={config:{allowInsecure:"Allow insecure TLS certificates. It is not recommended to turn it on unless you have to.",autoConfigKernelParameter:"Automatically configure Linux kernel parameters like ip_forward and send_redirects.",checkTolerance:"Group will switch node only when new_latency <= old_latency - tolerance.",dialMode:{domain:"Dial proxy using the domain from sniffing. This will relieve DNS pollution problem to a great extent if have impure DNS environment. Generally, this mode brings faster proxy response time because proxy will re-resolve the domain in remote, thus get better IP result to connect. This policy does not impact routing. That is to say, domain rewrite will be after traffic split of routing and dae will not re-route it.","domain+":"Based on domain mode but do not check the reality of sniffed domain. It is useful for users whose DNS requests do not go through dae but want faster proxy response time. Notice that, if DNS requests do not go through dae, dae cannot split traffic by domain.","domain++":"Based on domain+ mode but force to re-route traffic using sniffed domain to partially recover domain based traffic split ability. It doesn't work for direct traffic and consumes more CPU resources.",ip:"Dial proxy using the IP from DNS directly. This allows your ipv4, ipv6 to choose the optimal path respectively, and makes the IP version requested by the application meet expectations. For example, if you use curl -4 ip.sb, you will request IPv4 via proxy and get a IPv4 echo. And curl -6 ip.sb will request IPv6. This may solve some wierd full-cone problem if your are be your node support that. Sniffing will be disabled in this mode."},disableWaitingNetwork:"Disable waiting for network before pulling subscriptions.",lanInterface:"The LAN interface to bind. Use it if you want to proxy LAN.",sniffingTimeout:"Timeout to waiting for first data sending for sniffing. It is always 0 if dial_mode is ip. Set it higher is useful in high latency LAN network.",soMarkFromDae:"If not zero, traffic sent from dae will be set SO_MARK. It is useful to avoid traffic loop with iptables/nftables tproxy rules.",tcpCheckHttpMethod:"The HTTP request method to TCP Check HTTP Method. Use HEAD by default because some server implementations bypass accounting for this kind of traffic.",tcpCheckUrl:"Host of URL should have both IPv4 and IPv6 if you have double stack in local. First is URL, others are IP addresses if given. Considering traffic consumption, it is recommended to choose a site with anycast IP and less response.",tlsImplementation:"TLS implementation. tls is to use Go's crypto/tls. utls is to use uTLS, which can imitate browser's Client Hello.",tproxyPort:"Transparent Proxy Port to listen on. Valid range is 0 - 65535. It is NOT a HTTP/SOCKS port, and is just used by eBPF program. In normal case, you do not need to use it.",tproxyPortProtect:"Set it true to protect tproxy port from unsolicited traffic. Set it false to allow users to use self-managed iptables tproxy rules.",udpCheckDns:"This DNS will be used to check UDP connectivity of nodes. And if dns_upstream below contains tcp, it also be used to check TCP DNS connectivity of nodes. First is URL, others are IP addresses if given. This DNS should have both IPv4 and IPv6 if you have double stack in local.",utlsImitate:"The Client Hello ID for uTLS to imitate. This takes effect only if tls_implementation is utls.",wanInterface:"The WAN interface to bind. Use it if you want to proxy localhost."},group:{Min:"Select the node with min last latency from the group for every connection",MinAvg10:"Select the node with min average of the last 10 latencies from the group for every connection",MinMovingAvg:"Select the node with min moving average of latencies from the group for every connection",Random:"Randomly select a node from the group for every connection"}},xOn="Dial Mode",vOn="Disable Waiting Network",COn="disconnected",bOn="DNS",kOn="dnsUpstream",FOn="domain",yOn="Endpoint URL",AOn="error",_On="Experiment",SOn="Global",BOn="Group",wOn="info",LOn="ip",zOn="Lan Interface",MOn="lanNatDirect",TOn="link",NOn="Log Level",POn="ms",ROn="Name",IOn="Node",OOn={"login succeeded":"Login Succeeded",success:"Success"},jOn="operations",HOn="Orchestrate",VOn="password",$On="policy",KOn="policyParams",WOn="protocol",GOn="Resource",UOn="Routing",qOn="Rule",JOn="seconds",ZOn="select",YOn="selected",QOn="Settings",XOn="Sniffing Timeout",ejn="Set SO_MARK For dae",tjn="Step",ujn="Subscription",njn="Success",ijn="tag",rjn="TCP Check HTTP Method",ajn="TCP Check URL",ojn="TLS Implementation",sjn="Transparent Proxy Port",ljn="Tproxy Port Protect",cjn="trace",djn="UDP Check DNS",hjn="updatedAt",Ejn="User",mjn="username",gjn="uTLS Imitate",fjn="value",pjn="Wan Interface",Djn="warn",xjn={"account settings":"Account Settings",actions:iOn,address:rOn,allowInsecure:aOn,autoConfigKernelParameter:oOn,autoDetect:sOn,avatar:lOn,checkInterval:cOn,checkTolerance:dOn,collapse:hOn,config:EOn,configureNode:mOn,confirmModal:gOn,connected:fOn,"connecting options":"Connecting Options","create account":"Create a new account","dark mode":"Dark Mode",debug:pOn,descriptions:DOn,dialMode:xOn,disableWaitingNetwork:vOn,disconnected:COn,"display name":"Display Name",dns:bOn,dnsUpstream:kOn,domain:FOn,"domain+":"domain+",endpointURL:yOn,error:AOn,experiment:_On,global:SOn,group:BOn,info:wOn,"interface and kernel options":"Interface and Kernel Options",ip:LOn,lanInterface:zOn,lanNatDirect:MOn,link:TOn,logLevel:NOn,"login account":"Login via username & password",milliseconds:POn,name:ROn,node:IOn,"node connectivity check":"Node Connectivity Check",notifications:OOn,operations:jOn,orchestrate:HOn,password:VOn,"please select a config first":"Please select a config first",policy:$On,policyParams:KOn,protocol:WOn,resource:GOn,routing:UOn,rule:qOn,seconds:JOn,select:ZOn,selected:YOn,settings:QOn,"setup endpoint":"Setup your backend (graphql) endpoint URL",sniffingTimeout:XOn,soMarkFromDae:ejn,"software options":"Software Options",step:tjn,subscription:ujn,success:njn,tag:ijn,tcpCheckHttpMethod:rjn,tcpCheckUrl:ajn,tlsImplementation:ojn,tproxyPort:sjn,tproxyPortProtect:ljn,trace:cjn,udpCheckDns:djn,updatedAt:hjn,user:Ejn,username:mjn,utlsImitate:gjn,value:fjn,wanInterface:pjn,warn:Djn,"welcome back":"Welcome Back!","welcome to":"Welcome to {{ name }}","what for":"A Modern Dashboard For"},vjn={add:"添加","advanced mode":"进阶模式","already have an account, login instead":"已经有一个账户了,直接登录",cancel:"取消","change endpoint":"切换后台",confirm:"确定",continue:"继续",create:"新建","create account":"创建账户",edit:"编辑",hide:"隐藏",import:"导入","import resource":"导入{{ name }}",login:"登录",logout:"登出",refresh:"刷新",reload:"重载",remove:"移除",rename:"重命名",reset:"重置","save dae":"救起大鹅","show content":"显示内容","simple mode":"简单模式",skip:"跳过","start your journey":"开始你的旅程",submit:"提交",switchLanguage:"切换语言",switchRunning:"运行开关",switchTheme:"切换主题"},Cjn="地址",bjn="允许不安全",kjn="自动配置内核参数",Fjn="自动识别",yjn="头像",Ajn="检测间隔",_jn="检测公差",Sjn="折叠",Bjn="配置",wjn={congestionControl:"拥堵控制算法",disableSNI:"关闭 SNI",dtlsObfuscation:"伪装为 DTLS1.2 数据包",forceTLS:"强制开启 TLS",host:"主机地址",hostObfuscation:"域名 (host)",httpObfuscation:"伪装为 HTTP",name:"名字",network:"网络",noObfuscation:"不伪装",obfs:"混淆",obfsParam:"混淆参数",obfsPassword:"混淆密码",origin:"原版",password:"密码",path:"路径",pathObfuscation:"路径 (path)",pinned_certchain_sha256:"固定证书链 SHA256",port:"端口号",protocol:"协议",protocolParam:"协议参数",security:"安全",seedObfuscation:"混淆种子",servername:"节点名称",srtpObfuscation:"伪装视频通话 (SRTP)",title:"配置节点",type:"类型",udpRelayMode:"UDP 中继模式",username:"用户名",utpObfuscation:"伪装为 BT 下载 (uTP)",websocketHost:"WebSocket 地址",websocketPath:"WebSocket 路径",wechatVideoObfuscation:"伪装为微信视频通话",wireguardObfuscation:"伪装为 WireGuard 数据包"},Ljn={cancel:"不, 我点错了",confirm:"是,我确定",removeConfirmDescription:"你确定要移除这个吗?"},zjn="已连接",Mjn="调试",Tjn={config:{allowInsecure:"允许使用不安全的TLS证书。除非迫不得已,否则不建议打开它。",autoConfigKernelParameter:"自动配置 Linux 内核参数,如 ip_forward(路由转发)和 send_redirects(发送重定向)。",checkTolerance:"只有当新的延迟 <= 旧的延迟 - 公差时,群组才会切换节点。",dialMode:{domain:"通过嗅探使用域名拨号代理。如果 DNS 环境不纯净,这将在很大程度上缓解 DNS 污染问题。通常,这种模式会带来更快的代理响应时间,因为代理会在远程重新解析域名,从而获得更好的 IP 连接结果。此策略不影响路由。也就是说,域重写将在流量拆分后进行路由,dae 不会对其进行重新路由。","domain+":"基于 domain 模式但不检查嗅探域名的真实性。对于那些 DNS 请求不通过 dae 但想要更快的代理响应时间的用户来说,这很有用。请注意,如果 DNS 请求不通过 dae,dae 就无法按域划分流量。","domain++":"基于 domain+ 模式,但强制使用嗅探域重新路由流量,以部分恢复基于域的流量拆分能力。它不适用于直接流量,并且会消耗更多的 CPU 资源。",ip:"直接使用来自 DNS 的 IP 拨号代理。这允许您的 ipv4、ipv6 分别选择最佳路径,并使应用程序请求的 IP 版本符合预期。例如,如果您使用 curl -4 ip.sb,您将通过代理请求 IPv4 并获得 IPv4 回显。curl -6 ip.sb 将请求 IPv6。如果你是你的节点支持的话,这可能会解决一些怪异的全锥形问题。在此模式下将禁用嗅探。"},disableWaitingNetwork:"禁用在拉取订阅之前等待网络。",lanInterface:"要绑定的 LAN 接口。如果您想代理局域网,请使用它。",sniffingTimeout:"等待第一次发送数据以进行嗅探时超时。如果拨号模式为 ip,则始终为 0。将其设置得更高在高延迟局域网网络中很有用。",soMarkFromDae:"如果不是 0,则从 dae 发送的流量将被设置套接字标记(SO_MARK)。这对于使用 iptables/nftables 透明代理规则避免流量循环非常有用。",tcpCheckHttpMethod:"对 TCP 检测链接的 HTTP 请求方法。默认情况下使用 HEAD,因为某些服务器实现绕过了对此类流量的核算。",tcpCheckUrl:"如果您在本地有 dual stack(双协议栈),URL 的域名解析应该同时具有 IPv4 和 IPv6。第一个是 URL,其他是 IP 地址(如果给定的话)。考虑到流量消耗,建议选择具有 anycast IP 且响应较少的站点。",tlsImplementation:"TLS 实现。tls 是使用 Go 的 crypto/tls。utls 是使用 utls,它可以模仿浏览器的客户端 Hello。",tproxyPort:"要监听的透明代理端口。合法范围是 0 - 65535。它不是 HTTP/SOCKS 端口,仅由 eBPF 程序使用。在正常情况下,您不需要使用它。",tproxyPortProtect:"将其设置为 true 可保护透明代理端口免受未经请求的流量的影响。将其设置为 false 以允许用户使用自我管理的 iptables 透明代理规则。",udpCheckDns:"此 DNS 将用于检查节点的 UDP 连接。如果下面的 DNS 上游包含 TCP,它也可以用于检查节点的 TCP DNS 连接。第一个是 URL,其他是 IP地址(如果给定的话)。如果您在本地有 dual stack(双协议栈),则此 DNS 应该同时具有 IPv4 和 IPv6。",utlsImitate:"要模仿的 uTLS 的客户端 Hello ID。只有当 TLS 实现 为 utls 时,此操作才会生效。",wanInterface:"要绑定的 WAN 接口。如果您想代理本机,请使用它。"},group:{Min:"从组中为每个连接选择最后延迟最小的节点",MinAvg10:"从组中为每个连接选择最近10个延迟的最小平均值的节点",MinMovingAvg:"从组中为每个连接选择具有最小移动平均延迟的节点",Random:"为每个连接从组中随机选择一个节点"}},Njn="拨号模式",Pjn="禁用网络等待",Rjn="未连接",Ijn="DNS",Ojn="DNS 上游",jjn="域名",Hjn="接口地址",Vjn="错误",$jn="试验",Kjn="全局",Wjn="群组",Gjn="信息",Ujn="IP 地址",qjn="LAN 接口",Jjn="LAN NAT 直连",Zjn="链接",Yjn="日志等级",Qjn="毫秒",Xjn="名字",eHn="节点",tHn={"login succeeded":"登录成功",success:"成功"},uHn="操作",nHn="编排",iHn="密码",rHn="策略",aHn="策略参数",oHn="协议",sHn="资源",lHn="路由",cHn="规则",dHn="秒",hHn="选择",EHn="已选中",mHn="设置",gHn="嗅探超时",fHn="为 dae 设置套接字标记",pHn="步骤",DHn="订阅",xHn="成功",vHn="标签",CHn="TCP 检测 HTTP 方式",bHn="TCP 检测链接",kHn="TLS 实现",FHn="透明代理端口",yHn="透明代理端口保护",AHn="跟踪",_Hn="UDP 检测 DNS",SHn="更新时间",BHn="用户",wHn="用户名",LHn="uTLS 模仿",zHn="值",MHn="WAN 接口",THn="警告",NHn={"account settings":"账户设置",actions:vjn,address:Cjn,allowInsecure:bjn,autoConfigKernelParameter:kjn,autoDetect:Fjn,avatar:yjn,checkInterval:Ajn,checkTolerance:_jn,collapse:Sjn,config:Bjn,configureNode:wjn,confirmModal:Ljn,connected:zjn,"connecting options":"连接选项","create account":"创建一个新的账户","dark mode":"暗黑模式",debug:Mjn,descriptions:Tjn,dialMode:Njn,disableWaitingNetwork:Pjn,disconnected:Rjn,"display name":"展示名",dns:Ijn,dnsUpstream:Ojn,domain:jjn,"domain+":"域名+",endpointURL:Hjn,error:Vjn,experiment:$jn,global:Kjn,group:Wjn,info:Gjn,"interface and kernel options":"接口及内核选项",ip:Ujn,lanInterface:qjn,lanNatDirect:Jjn,link:Zjn,logLevel:Yjn,"login account":"使用帐号密码登录",milliseconds:Qjn,name:Xjn,node:eHn,"node connectivity check":"节点连通性检测",notifications:tHn,operations:uHn,orchestrate:nHn,password:iHn,"please select a config first":"请先选择配置",policy:rHn,policyParams:aHn,protocol:oHn,resource:sHn,routing:lHn,rule:cHn,seconds:dHn,select:hHn,selected:EHn,settings:mHn,"setup endpoint":"设置你的后端(graphql)接口地址",sniffingTimeout:gHn,soMarkFromDae:fHn,"software options":"软件选项",step:pHn,subscription:DHn,success:xHn,tag:vHn,tcpCheckHttpMethod:CHn,tcpCheckUrl:bHn,tlsImplementation:kHn,tproxyPort:FHn,tproxyPortProtect:yHn,trace:AHn,udpCheckDns:_Hn,updatedAt:SHn,user:BHn,username:wHn,utlsImitate:LHn,value:zHn,wanInterface:MHn,warn:THn,"welcome back":"欢迎回来!","welcome to":"欢迎来到 {{ name }}","what for":"现代化控制面板"},vQ="translation",PHn={en:{[vQ]:xjn},"zh-Hans":{[vQ]:NHn}},RHn=()=>fr.use(bKe).use(YPn).init({fallbackLng:{"zh-CN":["zh-Hans"]},defaultNS:vQ,resources:PHn}),IHn=at(u=>({header:{zIndex:200,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],boxShadow:u.shadows.sm,display:"flex",alignItems:"center"},user:{color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,padding:`${u.spacing.xs} ${u.spacing.sm}`,borderRadius:u.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.white},[u.fn.smallerThan("sm")]:{padding:0}},userActive:{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.white},tabsList:{borderBottom:0},tab:{fontWeight:500,height:G(38),backgroundColor:"transparent","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]},"&[data-active]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderColor:u.colorScheme==="dark"?u.colors.dark[7]:u.colors.gray[2]}}})),OHn=ke.object({name:ke.string().nonempty()}),jHn=()=>{const{t:u}=Ei(),e=H0(Qv),{colorScheme:t,toggleColorScheme:n}=Ekt(),{classes:i,theme:r,cx:a}=IHn(),[o,s]=C.useState(!1),[l,{toggle:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),{data:g}=wRn(),{data:f}=Y$e(),p=CRn(),D=kRn(),x=bRn(),[b,k]=C.useState(null),A=C.useRef(null),F=Da({validate:xa(OHn),initialValues:{name:""}}),S=YA(`(max-width: ${r.breakpoints.xs})`);return B.jsxs(dSe,{height:60,className:i.header,children:[B.jsx(RI,{sx:{flex:1},children:B.jsxs(zi,{position:"apart",children:[B.jsxs(zi,{spacing:"sm",children:[B.jsx(f3,{component:XY,to:"/",children:B.jsxs(zi,{spacing:"sm",children:[B.jsx(wZ,{radius:"sm",src:"/logo.webp",width:32,height:32}),B.jsx(k0,{order:S?5:2,color:r.colorScheme==="dark"?r.white:r.black,children:"daed"})]})}),!S&&B.jsx(K5,{label:e,children:B.jsx(Uz,{fz:"xs",fw:700,children:f==null?void 0:f.general.dae.version})})]}),B.jsxs(zi,{spacing:S?"xs":"md",children:[B.jsxs(La,{width:260,position:"bottom-end",transitionProps:{transition:"pop-top-right"},onClose:()=>s(!1),onOpen:()=>s(!0),children:[B.jsx(La.Target,{children:B.jsx(L4,{className:a(i.user,{[i.userActive]:o}),children:B.jsxs(zi,{spacing:7,children:[B.jsx(q4e,{src:(g==null?void 0:g.user.avatar)||"https://avatars.githubusercontent.com/u/126714249?s=200&v=4",alt:"avatar",radius:"xl",size:20}),B.jsx(_u,{weight:500,size:"sm",sx:{lineHeight:1},mr:3,children:(g==null?void 0:g.user.name)||(g==null?void 0:g.user.username)||"unknown"}),B.jsx(cPn,{size:G(12),stroke:1.5})]})})}),B.jsxs(La.Dropdown,{children:[B.jsx(La.Label,{children:u("debug")}),B.jsx(La.Item,{component:XY,target:"_blank",to:"/graphiql",children:"GraphiQL"}),B.jsx(La.Label,{children:u("settings")}),B.jsx(La.Item,{icon:B.jsx(SPn,{size:"0.9rem",stroke:1.5}),onClick:()=>{F.setValues({name:(g==null?void 0:g.user.name)||""}),E()},children:u("account settings")}),B.jsx(La.Item,{icon:B.jsx(xPn,{size:"0.9rem",stroke:1.5}),onClick:()=>{xy.set("")},children:u("actions.logout")})]})]}),S?B.jsx(X8e,{size:"sm",opened:l,onClick:c}):B.jsxs(C.Fragment,{children:[B.jsx(f3,{href:"https://github.com/daeuniverse/daed",target:"_blank",children:B.jsx(Uu,{children:B.jsx(sPn,{})})}),B.jsx(Uu,{onClick:()=>{fr.language.startsWith("zh")?fr.changeLanguage("en"):fr.changeLanguage("zh-Hans")},children:B.jsx(pPn,{})}),B.jsx(Uu,{onClick:()=>n(),children:t==="dark"?B.jsx(APn,{}):B.jsx(CPn,{})})]}),(f==null?void 0:f.general.dae.modified)&&B.jsx(K5,{label:u("actions.reload"),children:B.jsx(Uu,{loading:p.isLoading,onClick:()=>p.mutateAsync(!1),children:B.jsx(bPn,{})})}),S?B.jsx(K5,{label:u("actions.switchRunning"),children:B.jsx(tT,{size:"xs",disabled:!(f!=null&&f.general.dae.running)&&p.isLoading,checked:f==null?void 0:f.general.dae.running,onChange:w=>{p.mutateAsync(!w.target.checked)}})}):B.jsx(K5,{label:u("actions.switchRunning"),children:B.jsx(tT,{size:"md",onLabel:B.jsx(dPn,{}),offLabel:B.jsx(EPn,{}),disabled:!(f!=null&&f.general.dae.running)&&p.isLoading,checked:f==null?void 0:f.general.dae.running,onChange:w=>{p.mutateAsync(!w.target.checked)}})})]})]})}),B.jsx(T4,{opened:l,onClose:d,size:"100%",children:B.jsxs(Tc,{cols:3,children:[B.jsx(f3,{href:"https://github.com/daeuniverse/daed",target:"_blank",children:B.jsx(xl,{fullWidth:!0,children:"Github"})}),B.jsx(xl,{fullWidth:!0,onClick:()=>{fr.language.startsWith("zh")?fr.changeLanguage("en"):fr.changeLanguage("zh-Hans")},children:u("actions.switchLanguage")}),B.jsx(xl,{fullWidth:!0,onClick:()=>n(),children:u("actions.switchTheme")})]})}),B.jsx(Wi,{title:u("account settings"),opened:h,onClose:m,keepMounted:!1,children:B.jsx("form",{onSubmit:F.onSubmit(async({name:w})=>{w!==(g==null?void 0:g.user.name)&&await D.mutateAsync(w),b&&b!==(g==null?void 0:g.user.avatar)&&await x.mutateAsync(b),m()}),children:B.jsxs(ju,{children:[B.jsx(wt,{label:u("display name"),withAsterisk:!0,...F.getInputProps("name")}),B.jsx(lwe,{resetRef:A,accept:"image/png,image/jpeg",onChange:async w=>{if(w){const z=await WRn(w);k(z)}},children:w=>B.jsx(Uu,{mx:"auto",w:100,h:100,...w,children:b?B.jsx(wZ,{h:"100%",w:"100%",radius:"100%",src:b,alt:u("avatar")}):B.jsx(q4e,{h:"100%",w:"100%"})})}),B.jsx(ks,{reset:()=>{var w;k(null),(w=A.current)==null||w.call(A)}})]})})})]})},HHn=ke.object({resources:ke.array(ke.object({id:ke.string(),link:ke.string().url().nonempty(),tag:ke.string().nonempty()})).nonempty()}),_N=({title:u,opened:e,onClose:t,handleSubmit:n})=>{const{t:i}=Ei(),r=Da({validate:xa(HHn),initialValues:{resources:[{id:i4(),link:"",tag:""}]}});return B.jsx(Wi,{title:u,opened:e,onClose:t,children:B.jsxs("form",{onSubmit:r.onSubmit(a=>n(a).then(()=>{t(),r.reset()})),children:[B.jsx(Am,{gap:20,direction:"column",children:r.values.resources.map(({id:a},o)=>B.jsxs(Am,{gap:10,children:[B.jsxs(Am,{w:"100%",align:"start",gap:10,children:[B.jsx(wt,{sx:{flex:1},withAsterisk:!0,label:i("link"),...r.getInputProps(`resources.${o}.link`)}),B.jsx(wt,{w:"6rem",withAsterisk:!0,label:i("tag"),...r.getInputProps(`resources.${o}.tag`)})]}),B.jsx(Uu,{variant:"filled",color:"red",size:"sm",mt:32,onClick:()=>{r.removeListItem("resources",o)},children:B.jsx(N$e,{})})]},a))}),B.jsxs(zi,{position:"apart",mt:20,children:[B.jsx(Uu,{variant:"filled",color:"green",onClick:()=>{r.insertListItem("resources",{id:i4(),link:"",tag:""})},children:B.jsx(xre,{})}),B.jsx(ks,{reset:r.reset})]})]})})},VHn=ke.object({name:ke.string().nonempty(),text:ke.string().nonempty()}),r6=C.forwardRef(({title:u,opened:e,onClose:t,handleSubmit:n},i)=>{const{t:r}=Ei(),a=H0(jTe),[o,s]=C.useState(),[l,c]=C.useState(),d=Da({validate:xa(VHn),initialValues:{name:"",text:""}}),h=E=>{d.setValues(E),c(E)};return C.useImperativeHandle(i,()=>({form:d,editingID:o,setEditingID:s,initOrigins:h})),B.jsxs(Wi.Root,{opened:e,onClose:t,fullScreen:!0,children:[B.jsx(Wi.Overlay,{}),B.jsx(Wi.Content,{children:B.jsxs(Am,{h:"100%",direction:"column",children:[B.jsxs(Wi.Header,{children:[B.jsx(Wi.Title,{children:u}),B.jsx(Wi.CloseButton,{})]}),B.jsx(Wi.Body,{sx:{flex:1},children:B.jsx("form",{onSubmit:d.onSubmit(E=>n(E).then(()=>{t(),d.reset()})),children:B.jsxs(ju,{h:"100%",sx:{display:"flex",flexDirection:"column"},children:[B.jsx(wt,{label:r("name"),withAsterisk:!0,...d.getInputProps("name"),disabled:!!o}),B.jsxs(ju,{sx:{flex:1},spacing:4,children:[B.jsx(Ct,{h:"100%",sx:{overflow:"hidden",borderRadius:4},children:B.jsx(Jxe,{height:"100%",theme:a==="dark"?XGt:eUt,options:LTe,language:"routingA",value:d.values.text,onChange:E=>d.setFieldValue("text",E||"")})}),d.errors.text&&B.jsx(Ra.Error,{children:d.errors.text})]}),B.jsx(ks,{reset:()=>{o&&l?d.setValues(l):d.reset()}})]})})})]})})]})});var $Hn=Object.defineProperty,SN=Object.getOwnPropertySymbols,kKe=Object.prototype.hasOwnProperty,FKe=Object.prototype.propertyIsEnumerable,bxe=(u,e,t)=>e in u?$Hn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kxe=(u,e)=>{for(var t in e||(e={}))kKe.call(e,t)&&bxe(u,t,e[t]);if(SN)for(var t of SN(e))FKe.call(e,t)&&bxe(u,t,e[t]);return u},KHn=(u,e)=>{var t={};for(var n in u)kKe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&SN)for(var n of SN(u))e.indexOf(n)<0&&FKe.call(u,n)&&(t[n]=u[n]);return t};/** + */(function(u){(function(e,t){u.exports?u.exports=t(GRn(),URn(),qRn()):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(bl,function(e,t,n,i){var r=i&&i.URI;function a(y,_){var L=arguments.length>=1,T=arguments.length>=2;if(!(this instanceof a))return L?T?new a(y,_):new a(y):new a;if(y===void 0){if(L)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?y=location.href+"":y=""}if(y===null&&L)throw new TypeError("null is not a valid argument for URI");return this.href(y),_!==void 0?this.absoluteTo(_):this}function o(y){return/^[0-9]+$/.test(y)}a.version="1.19.11";var s=a.prototype,l=Object.prototype.hasOwnProperty;function c(y){return y.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(y){return y===void 0?"Undefined":String(Object.prototype.toString.call(y)).slice(8,-1)}function h(y){return d(y)==="Array"}function E(y,_){var L={},T,R;if(d(_)==="RegExp")L=null;else if(h(_))for(T=0,R=_.length;T]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(y){if(!(!y||!y.nodeName)){var _=y.nodeName.toLowerCase();if(!(_==="input"&&y.type!=="image"))return a.domAttributes[_]}};function p(y){return escape(y)}function D(y){return encodeURIComponent(y).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}a.encode=D,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=D,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(y,_){var L=a.encode(y+"");return _===void 0&&(_=a.escapeQuerySpace),_?L.replace(/%20/g,"+"):L},a.decodeQuery=function(y,_){y+="",_===void 0&&(_=a.escapeQuerySpace);try{return a.decode(_?y.replace(/\+/g,"%20"):y)}catch{return y}};var x={encode:"encode",decode:"decode"},b,k=function(y,_){return function(L){try{return a[_](L+"").replace(a.characters[y][_].expression,function(T){return a.characters[y][_].map[T]})}catch{return L}}};for(b in x)a[b+"PathSegment"]=k("pathname",x[b]),a[b+"UrnPathSegment"]=k("urnpath",x[b]);var A=function(y,_,L){return function(T){var R;L?R=function(U){return a[_](a[L](U))}:R=a[_];for(var I=(T+"").split(y),H=0,V=I.length;H-1&&(_.fragment=y.substring(L+1)||null,y=y.substring(0,L)),L=y.indexOf("?"),L>-1&&(_.query=y.substring(L+1)||null,y=y.substring(0,L)),y=y.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),y=y.replace(/^[/\\]{2,}/i,"//"),y.substring(0,2)==="//"?(_.protocol=null,y=y.substring(2),y=a.parseAuthority(y,_)):(L=y.indexOf(":"),L>-1&&(_.protocol=y.substring(0,L)||null,_.protocol&&!_.protocol.match(a.protocol_expression)?_.protocol=void 0:y.substring(L+1,L+3).replace(/\\/g,"/")==="//"?(y=y.substring(L+3),y=a.parseAuthority(y,_)):(y=y.substring(L+1),_.urn=!0))),_.path=y,_},a.parseHost=function(y,_){y||(y=""),y=y.replace(/\\/g,"/");var L=y.indexOf("/"),T,R;if(L===-1&&(L=y.length),y.charAt(0)==="[")T=y.indexOf("]"),_.hostname=y.substring(1,T)||null,_.port=y.substring(T+2,L)||null,_.port==="/"&&(_.port=null);else{var I=y.indexOf(":"),H=y.indexOf("/"),V=y.indexOf(":",I+1);V!==-1&&(H===-1||V-1?R:y.length-1),H;return I>-1&&(R===-1||I-1?re=re.slice(0,ge)+re.slice(ge).replace(I,""):re=re.replace(I,""),!(re.length<=U[0].length)&&!(L.ignore&&L.ignore.test(re))){X=J+re.length;var Ue=_(re,J,X,y);if(Ue===void 0){T.lastIndex=X;continue}Ue=String(Ue),y=y.slice(0,J)+Ue+y.slice(X),T.lastIndex=J+Ue.length}}return T.lastIndex=0,y},a.ensureValidHostname=function(y,_){var L=!!y,T=!!_,R=!1;if(T&&(R=m(a.hostProtocols,_)),R&&!L)throw new TypeError("Hostname cannot be empty, if protocol is "+_);if(y&&y.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(y).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(y){if(y){var _=Number(y);if(!(o(_)&&_>0&&_<65536))throw new TypeError('Port "'+y+'" is not a valid port')}},a.noConflict=function(y){if(y){var _={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(_.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(_.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(_.SecondLevelDomains=i.SecondLevelDomains.noConflict()),_}else i.URI===this&&(i.URI=r);return this},s.build=function(y){return y===!0?this._deferred_build=!0:(y===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new a(this)},s.valueOf=s.toString=function(){return this.build(!1)._string};function F(y){return function(_,L){return _===void 0?this._parts[y]||"":(this._parts[y]=_||null,this.build(!L),this)}}function S(y,_){return function(L,T){return L===void 0?this._parts[y]||"":(L!==null&&(L=L+"",L.charAt(0)===_&&(L=L.substring(1))),this._parts[y]=L,this.build(!T),this)}}s.protocol=F("protocol"),s.username=F("username"),s.password=F("password"),s.hostname=F("hostname"),s.port=F("port"),s.query=S("query","?"),s.fragment=S("fragment","#"),s.search=function(y,_){var L=this.query(y,_);return typeof L=="string"&&L.length?"?"+L:L},s.hash=function(y,_){var L=this.fragment(y,_);return typeof L=="string"&&L.length?"#"+L:L},s.pathname=function(y,_){if(y===void 0||y===!0){var L=this._parts.path||(this._parts.hostname?"/":"");return y?(this._parts.urn?a.decodeUrnPath:a.decodePath)(L):L}else return this._parts.urn?this._parts.path=y?a.recodeUrnPath(y):"":this._parts.path=y?a.recodePath(y):"/",this.build(!_),this},s.path=s.pathname,s.href=function(y,_){var L;if(y===void 0)return this.toString();this._string="",this._parts=a._parts();var T=y instanceof a,R=typeof y=="object"&&(y.hostname||y.path||y.pathname);if(y.nodeName){var I=a.getDomAttribute(y);y=y[I]||"",R=!1}if(!T&&R&&y.pathname!==void 0&&(y=y.toString()),typeof y=="string"||y instanceof String)this._parts=a.parse(String(y),this._parts);else if(T||R){var H=T?y._parts:y;for(L in H)L!=="query"&&l.call(this._parts,L)&&(this._parts[L]=H[L]);H.query&&this.query(H.query,!1)}else throw new TypeError("invalid input");return this.build(!_),this},s.is=function(y){var _=!1,L=!1,T=!1,R=!1,I=!1,H=!1,V=!1,U=!this._parts.urn;switch(this._parts.hostname&&(U=!1,L=a.ip4_expression.test(this._parts.hostname),T=a.ip6_expression.test(this._parts.hostname),_=L||T,R=!_,I=R&&n&&n.has(this._parts.hostname),H=R&&a.idn_expression.test(this._parts.hostname),V=R&&a.punycode_expression.test(this._parts.hostname)),y.toLowerCase()){case"relative":return U;case"absolute":return!U;case"domain":case"name":return R;case"sld":return I;case"ip":return _;case"ip4":case"ipv4":case"inet4":return L;case"ip6":case"ipv6":case"inet6":return T;case"idn":return H;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return V}return null};var w=s.protocol,z=s.port,N=s.hostname;s.protocol=function(y,_){if(y&&(y=y.replace(/:(\/\/)?$/,""),!y.match(a.protocol_expression)))throw new TypeError('Protocol "'+y+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return w.call(this,y,_)},s.scheme=s.protocol,s.port=function(y,_){return this._parts.urn?y===void 0?"":this:(y!==void 0&&(y===0&&(y=null),y&&(y+="",y.charAt(0)===":"&&(y=y.substring(1)),a.ensureValidPort(y))),z.call(this,y,_))},s.hostname=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y!==void 0){var L={preventInvalidHostname:this._parts.preventInvalidHostname},T=a.parseHost(y,L);if(T!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');y=L.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(y,this._parts.protocol)}return N.call(this,y,_)},s.origin=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){var L=this.protocol(),T=this.authority();return T?(L?L+"://":"")+this.authority():""}else{var R=a(y);return this.protocol(R.protocol()).authority(R.authority()).build(!_),this}},s.host=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var L=a.parseHost(y,this._parts);if(L!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');return this.build(!_),this},s.authority=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var L=a.parseAuthority(y,this._parts);if(L!=="/")throw new TypeError('Hostname "'+y+'" contains characters other than [A-Z0-9.-]');return this.build(!_),this},s.userinfo=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){var L=a.buildUserinfo(this._parts);return L&&L.substring(0,L.length-1)}else return y[y.length-1]!=="@"&&(y+="@"),a.parseUserinfo(y,this._parts),this.build(!_),this},s.resource=function(y,_){var L;return y===void 0?this.path()+this.search()+this.hash():(L=a.parse(y),this._parts.path=L.path,this._parts.query=L.query,this._parts.fragment=L.fragment,this.build(!_),this)},s.subdomain=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,L)||""}else{var T=this._parts.hostname.length-this.domain().length,R=this._parts.hostname.substring(0,T),I=new RegExp("^"+c(R));if(y&&y.charAt(y.length-1)!=="."&&(y+="."),y.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return y&&a.ensureValidHostname(y,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(I,y),this.build(!_),this}},s.domain=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y=="boolean"&&(_=y,y=void 0),y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.match(/\./g);if(L&&L.length<2)return this._parts.hostname;var T=this._parts.hostname.length-this.tld(_).length-1;return T=this._parts.hostname.lastIndexOf(".",T-1)+1,this._parts.hostname.substring(T)||""}else{if(!y)throw new TypeError("cannot set domain empty");if(y.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(y,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=y;else{var R=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(R,y)}return this.build(!_),this}},s.tld=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y=="boolean"&&(_=y,y=void 0),y===void 0){if(!this._parts.hostname||this.is("IP"))return"";var L=this._parts.hostname.lastIndexOf("."),T=this._parts.hostname.substring(L+1);return _!==!0&&n&&n.list[T.toLowerCase()]&&n.get(this._parts.hostname)||T}else{var R;if(y)if(y.match(/[^a-zA-Z0-9-]/))if(n&&n.is(y))R=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(R,y);else throw new TypeError('TLD "'+y+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");R=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(R,y)}else throw new TypeError("cannot set TLD empty");return this.build(!_),this}},s.directory=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0||y===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var L=this._parts.path.length-this.filename().length-1,T=this._parts.path.substring(0,L)||(this._parts.hostname?"/":"");return y?a.decodePath(T):T}else{var R=this._parts.path.length-this.filename().length,I=this._parts.path.substring(0,R),H=new RegExp("^"+c(I));return this.is("relative")||(y||(y="/"),y.charAt(0)!=="/"&&(y="/"+y)),y&&y.charAt(y.length-1)!=="/"&&(y+="/"),y=a.recodePath(y),this._parts.path=this._parts.path.replace(H,y),this.build(!_),this}},s.filename=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(typeof y!="string"){if(!this._parts.path||this._parts.path==="/")return"";var L=this._parts.path.lastIndexOf("/"),T=this._parts.path.substring(L+1);return y?a.decodePathSegment(T):T}else{var R=!1;y.charAt(0)==="/"&&(y=y.substring(1)),y.match(/\.?\//)&&(R=!0);var I=new RegExp(c(this.filename())+"$");return y=a.recodePath(y),this._parts.path=this._parts.path.replace(I,y),R?this.normalizePath(_):this.build(!_),this}},s.suffix=function(y,_){if(this._parts.urn)return y===void 0?"":this;if(y===void 0||y===!0){if(!this._parts.path||this._parts.path==="/")return"";var L=this.filename(),T=L.lastIndexOf("."),R,I;return T===-1?"":(R=L.substring(T+1),I=/^[a-z0-9%]+$/i.test(R)?R:"",y?a.decodePathSegment(I):I)}else{y.charAt(0)==="."&&(y=y.substring(1));var H=this.suffix(),V;if(H)y?V=new RegExp(c(H)+"$"):V=new RegExp(c("."+H)+"$");else{if(!y)return this;this._parts.path+="."+a.recodePath(y)}return V&&(y=a.recodePath(y),this._parts.path=this._parts.path.replace(V,y)),this.build(!_),this}},s.segment=function(y,_,L){var T=this._parts.urn?":":"/",R=this.path(),I=R.substring(0,1)==="/",H=R.split(T);if(y!==void 0&&typeof y!="number"&&(L=_,_=y,y=void 0),y!==void 0&&typeof y!="number")throw new Error('Bad segment "'+y+'", must be 0-based integer');if(I&&H.shift(),y<0&&(y=Math.max(H.length+y,0)),_===void 0)return y===void 0?H:H[y];if(y===null||H[y]===void 0)if(h(_)){H=[];for(var V=0,U=_.length;VZRn().protocol(t||"http").username(u||"").password(e||"").host(n||"").port(String(i)||"80").path(o||"").query(r||{}).hash(a||"").toString(),YRn=({protocol:u,auth:e,host:t,port:n,params:i})=>{const r=encodeURIComponent(e),a=new URL(`${u}://${r}@${t}:${n}/`);return Object.entries(i).forEach(([o,s])=>{s!=null&&s!==""&&a.searchParams.append(o,String(s))}),a.toString()},QRn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:{protocol:"http",...YGt},validate:xa(oqt)}),r=t(a=>{const o={protocol:a.protocol,host:a.host,port:a.port,hash:a.name};return a.username&&a.password&&Object.assign(o,{username:a.username,password:a.password}),u(Q6(o))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(li,{label:e("configureNode.protocol"),data:[{label:"HTTP",value:"http"},{label:"HTTPS",value:"https"}],...n("protocol")}),B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("host")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:e("configureNode.username"),...n("username")}),B.jsx(wt,{label:e("configureNode.password"),...n("password")}),B.jsx(Fs,{reset:i})]})},XRn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:ZGt,validate:xa(aqt)}),r=t(a=>{const o={obfs:a.obfs,obfsPassword:a.obfsPassword,sni:a.sni,insecure:a.allowInsecure,pinSHA256:a.pinSHA256};return u(YRn({protocol:"hysteria2",auth:a.auth,host:a.server,port:a.port,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"Auth",withAsterisk:!0,...n("auth")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(wt,{label:"Pin SHA256",...n("pinSHA256")}),B.jsx(k0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(Fs,{reset:i})]})},eIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:JGt,validate:xa(rqt)}),r=t(a=>{const o={congestion_control:a.congestion_control,pinned_certchain_sha256:a.pinned_certchain_sha256,sni:a.sni,allow_insecure:a.allowInsecure};return u(Q6({protocol:"juicity",username:a.uuid,password:a.password,host:a.server,port:a.port,hash:a.name,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"UUID",withAsterisk:!0,...n("uuid")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...n("password")}),B.jsx(li,{label:e("configureNode.congestionControl"),data:[{label:"bbr",value:"bbr"},{label:"cubic",value:"cubic"},{label:"new_reno",value:"new_reno"}],...n("congestion_control")}),B.jsx(wt,{label:e("configureNode.pinned_certchain_sha256"),...n("pinned_certchain_sha256")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(k0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(Fs,{reset:i})]})},iKe="3.7.5",tIn=iKe,uIn=typeof atob=="function",nIn=typeof btoa=="function",X6=typeof Buffer=="function",nxe=typeof TextDecoder=="function"?new TextDecoder:void 0,ixe=typeof TextEncoder=="function"?new TextEncoder:void 0,iIn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wb=Array.prototype.slice.call(iIn),BS=(u=>{let e={};return u.forEach((t,n)=>e[t]=n),e})(Wb),rIn=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,qa=String.fromCharCode.bind(String),rxe=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):u=>new Uint8Array(Array.prototype.slice.call(u,0)),rKe=u=>u.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),aKe=u=>u.replace(/[^A-Za-z0-9\+\/]/g,""),oKe=u=>{let e,t,n,i,r="";const a=u.length%3;for(let o=0;o255||(n=u.charCodeAt(o++))>255||(i=u.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=t<<16|n<<8|i,r+=Wb[e>>18&63]+Wb[e>>12&63]+Wb[e>>6&63]+Wb[e&63]}return a?r.slice(0,a-3)+"===".substring(a):r},_re=nIn?u=>btoa(u):X6?u=>Buffer.from(u,"binary").toString("base64"):oKe,pQ=X6?u=>Buffer.from(u).toString("base64"):u=>{let t=[];for(let n=0,i=u.length;ne?rKe(pQ(u)):pQ(u),aIn=u=>{if(u.length<2){var e=u.charCodeAt(0);return e<128?u:e<2048?qa(192|e>>>6)+qa(128|e&63):qa(224|e>>>12&15)+qa(128|e>>>6&63)+qa(128|e&63)}else{var e=65536+(u.charCodeAt(0)-55296)*1024+(u.charCodeAt(1)-56320);return qa(240|e>>>18&7)+qa(128|e>>>12&63)+qa(128|e>>>6&63)+qa(128|e&63)}},oIn=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,sKe=u=>u.replace(oIn,aIn),axe=X6?u=>Buffer.from(u,"utf8").toString("base64"):ixe?u=>pQ(ixe.encode(u)):u=>_re(sKe(u)),Vx=(u,e=!1)=>e?rKe(axe(u)):axe(u),oxe=u=>Vx(u,!0),sIn=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,lIn=u=>{switch(u.length){case 4:var e=(7&u.charCodeAt(0))<<18|(63&u.charCodeAt(1))<<12|(63&u.charCodeAt(2))<<6|63&u.charCodeAt(3),t=e-65536;return qa((t>>>10)+55296)+qa((t&1023)+56320);case 3:return qa((15&u.charCodeAt(0))<<12|(63&u.charCodeAt(1))<<6|63&u.charCodeAt(2));default:return qa((31&u.charCodeAt(0))<<6|63&u.charCodeAt(1))}},lKe=u=>u.replace(sIn,lIn),cKe=u=>{if(u=u.replace(/\s+/g,""),!rIn.test(u))throw new TypeError("malformed base64.");u+="==".slice(2-(u.length&3));let e,t="",n,i;for(let r=0;r>16&255):i===64?qa(e>>16&255,e>>8&255):qa(e>>16&255,e>>8&255,e&255);return t},Sre=uIn?u=>atob(aKe(u)):X6?u=>Buffer.from(u,"base64").toString("binary"):cKe,dKe=X6?u=>rxe(Buffer.from(u,"base64")):u=>rxe(Sre(u).split("").map(e=>e.charCodeAt(0))),hKe=u=>dKe(EKe(u)),cIn=X6?u=>Buffer.from(u,"base64").toString("utf8"):nxe?u=>nxe.decode(dKe(u)):u=>lKe(Sre(u)),EKe=u=>aKe(u.replace(/[-_]/g,e=>e=="-"?"+":"/")),DQ=u=>cIn(EKe(u)),dIn=u=>{if(typeof u!="string")return!1;const e=u.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},mKe=u=>({value:u,enumerable:!1,writable:!0,configurable:!0}),gKe=function(){const u=(e,t)=>Object.defineProperty(String.prototype,e,mKe(t));u("fromBase64",function(){return DQ(this)}),u("toBase64",function(e){return Vx(this,e)}),u("toBase64URI",function(){return Vx(this,!0)}),u("toBase64URL",function(){return Vx(this,!0)}),u("toUint8Array",function(){return hKe(this)})},fKe=function(){const u=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,mKe(t));u("toBase64",function(e){return rB(this,e)}),u("toBase64URI",function(){return rB(this,!0)}),u("toBase64URL",function(){return rB(this,!0)})},hIn=()=>{gKe(),fKe()},Tf={version:iKe,VERSION:tIn,atob:Sre,atobPolyfill:cKe,btoa:_re,btoaPolyfill:oKe,fromBase64:DQ,toBase64:Vx,encode:Vx,encodeURI:oxe,encodeURL:oxe,utob:sKe,btou:lKe,decode:DQ,isValid:dIn,fromUint8Array:rB,toUint8Array:hKe,extendString:gKe,extendUint8Array:fKe,extendBuiltins:hIn},EIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:WGt,validate:xa(tqt)}),a=n(o=>{let s=`ss://${Tf.encode(`${o.method}:${o.password}`)}@${o.server}:${o.port}/`;if(o.plugin){const l=[o.plugin];o.plugin==="v2ray-plugin"?(o.tls&&l.push("tls"),o.mode!=="websocket"&&l.push("mode="+o.mode),o.host&&l.push("host="+o.host),o.path&&(o.path.startsWith("/")||(o.path="/"+o.path),l.push("path="+o.path)),o.impl&&l.push("impl="+o.impl)):(l.push("obfs="+o.obfs),l.push("obfs-host="+o.host),o.obfs==="http"&&l.push("obfs-path="+o.path),o.impl&&l.push("impl="+o.impl)),s+=`?plugin=${encodeURIComponent(l.join(";"))}`}return s+=o.name.length?`#${encodeURIComponent(o.name)}`:"",u(s)});return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:"Method",withAsterisk:!0,data:[{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"aes-256-gcm",value:"aes-256-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"chacha20-ietf-poly1305",value:"chacha20-ietf-poly1305"},{label:"plain",value:"plain"},{label:"none",value:"none"}],...i("method")}),B.jsx(li,{label:"Plugin",data:[{label:"off",value:""},{label:"simple-obfs",value:"simple-obfs"},{label:"v2ray-plugin",value:"v2ray-plugin"}],...i("plugin")}),t.plugin==="simple-obfs"||t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"Impl",data:[{label:"Keep Default",value:""},{label:"chained",value:"chained"},{label:"transport",value:"transport"}],...i("impl")}),t.plugin==="simple-obfs"&&B.jsx(li,{label:"Obfs",data:[{label:"http",value:"http"},{label:"tls",value:"tls"}],...i("obfs")}),t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"Mode",data:[{label:"websocket",value:"websocket"}],...i("mode")}),t.plugin==="v2ray-plugin"&&B.jsx(li,{label:"TLS",data:[{label:"off",value:""},{label:"tls",value:"tls"}],...i("tls")}),(t.plugin==="simple-obfs"&&(t.obfs==="http"||t.obfs==="tls")||t.plugin==="v2ray-plugin")&&B.jsx(wt,{label:"Host",...i("host")}),t.plugin==="simple-obfs"&&t.obfs==="http"||t.plugin==="v2ray-plugin"&&B.jsx(wt,{label:"Path",...i("path")}),B.jsx(Fs,{reset:r})]})},mIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:GGt,validate:xa(uqt)}),a=n(o=>u(`ssr://${Tf.encode(`${o.server}:${o.port}:${o.proto}:${o.method}:${o.obfs}:${Tf.encodeURI(o.password)}/?remarks=${Tf.encodeURI(o.name)}&protoparam=${Tf.encodeURI(o.protoParam)}&obfsparam=${Tf.encodeURI(o.obfsParam)}`)}`));return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:"Method",withAsterisk:!0,data:[{label:"aes-128-cfb",value:"aes-128-cfb"},{label:"aes-192-cfb",value:"aes-192-cfb"},{label:"aes-256-cfb",value:"aes-256-cfb"},{label:"aes-128-ctr",value:"aes-128-ctr"},{label:"aes-192-ctr",value:"aes-192-ctr"},{label:"aes-256-ctr",value:"aes-256-ctr"},{label:"aes-128-ofb",value:"aes-128-ofb"},{label:"aes-192-ofb",value:"aes-192-ofb"},{label:"aes-256-ofb",value:"aes-256-ofb"},{label:"dae-cfb",value:"dae-cfb"},{label:"bf-cfb",value:"bf-cfb"},{label:"cast5-cfb",value:"cast5-cfb"},{label:"rc4-md5",value:"rc4-md5"},{label:"chacha20",value:"chacha20"},{label:"chacha20-ietf",value:"chacha20-ietf"},{label:"salsa20",value:"salsa20"},{label:"camellia-128-cfb",value:"camellia-128-cfb"},{label:"camellia-192-cfb",value:"camellia-192-cfb"},{label:"camellia-256-cfb",value:"camellia-256-cfb"},{label:"idea-cfb",value:"idea-cfb"},{label:"rc2-cfb",value:"rc2-cfb"},{label:"seed-cfb",value:"seed-cfb"},{label:"none",value:"none"}],...i("method")}),B.jsx(li,{label:e("configureNode.protocol"),withAsterisk:!0,data:[{label:"origin",value:"origin"},{label:"verify_sha1",value:"verify_sha1"},{label:"auth_sha1_v4",value:"auth_sha1_v4"},{label:"auth_aes128_md5",value:"auth_aes128_md5"},{label:"auth_aes128_sha1",value:"auth_aes128_sha1"},{label:"auth_chain_a",value:"auth_chain_a"},{label:"auth_chain_b",value:"auth_chain_b"}],...i("proto")}),t.proto!=="origin"&&B.jsx(wt,{label:e("configureNode.protocolParam"),...i("protoParam")}),B.jsx(li,{label:e("configureNode.obfs"),withAsterisk:!0,data:[{label:"plain",value:"plain"},{label:"http_simple",value:"http_simple"},{label:"http_post",value:"http_post"},{label:"random_head",value:"random_head"},{label:"tls1.2_ticket_auth",value:"tls1.2_ticket_auth"}],...i("obfs")}),t.obfs!=="plain"&&B.jsx(wt,{label:e("configureNode.obfsParam"),...i("obfsParam")}),B.jsx(Fs,{reset:r})]})},gIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:QGt,validate:xa(sqt)}),r=t(a=>{const o={protocol:"socks5",host:a.host,port:a.port,hash:a.name};return a.username&&a.password&&Object.assign(o,{username:a.username,password:a.password}),u(Q6(o))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("host")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:e("configureNode.username"),...n("username")}),B.jsx(wt,{label:e("configureNode.password"),...n("password")}),B.jsx(Fs,{reset:i})]})},fIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:UGt,validate:xa(nqt)}),a=n(o=>{const s={allowInsecure:o.allowInsecure};o.peer!==""&&(s.sni=o.peer);let l="trojan";return(o.method!=="origin"||o.obfs!=="none")&&(l="trojan-go",s.type=o.obfs==="none"?"original":"ws",o.method==="shadowsocks"&&(s.encryption=`ss;${o.ssCipher};${o.ssPassword}`),s.type==="ws"&&(s.host=o.host||"",s.path=o.path||"/"),delete s.allowInsecure),u(Q6({protocol:l,username:o.password,host:o.server,port:o.port,hash:o.name,params:s}))});return B.jsxs("form",{onSubmit:a,children:[B.jsx(wt,{label:e("configureNode.name"),...i("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...i("password")}),B.jsx(li,{label:e("configureNode.protocol"),withAsterisk:!0,data:[{label:"origin",value:"origin"},{label:"shadowsocks",value:"shadowsocks"}],...i("method")}),t.method==="shadowsocks"&&B.jsx(li,{label:"Shadowsocks Cipher",withAsterisk:!0,data:[{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"aes-256-gcm",value:"aes-256-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"chacha20-ietf-poly1305",value:"chacha20-ietf-poly1305"}],...i("ssCipher")}),t.method==="shadowsocks"&&B.jsx(wt,{label:"Shadowsocks password",withAsterisk:!0,...i("ssPassword")}),B.jsx(k0,{label:e("allowInsecure"),disabled:t.method!=="origin"||t.obfs!=="none",...i("allowInsecure",{type:"checkbox"})}),B.jsx(wt,{label:"SNI(Peer)",...i("peer")}),B.jsx(li,{label:"Obfs",data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:"websocket",value:"websocket"}],...i("obfs")}),t.obfs==="websocket"&&B.jsx(wt,{label:e("configureNode.websocketHost"),...i("host")}),t.obfs==="websocket"&&B.jsx(wt,{label:e("configureNode.websocketPath"),...i("path")}),B.jsx(Fs,{reset:r})]})},pIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{onSubmit:t,getInputProps:n,reset:i}=Da({initialValues:qGt,validate:xa(iqt)}),r=t(a=>{const o={congestion_control:a.congestion_control,alpn:a.alpn,sni:a.sni,allow_insecure:a.allowInsecure,disable_sni:a.disable_sni,udp_relay_mode:a.udp_relay_mode};return u(Q6({protocol:"tuic",username:a.uuid,password:a.password,host:a.server,port:a.port,hash:a.name,params:o}))});return B.jsxs("form",{onSubmit:r,children:[B.jsx(wt,{label:e("configureNode.name"),...n("name")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...n("server")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...n("port")}),B.jsx(wt,{label:"UUID",withAsterisk:!0,...n("uuid")}),B.jsx(wt,{label:e("configureNode.password"),withAsterisk:!0,...n("password")}),B.jsx(li,{label:e("configureNode.congestionControl"),data:[{label:"bbr",value:"bbr"},{label:"cubic",value:"cubic"}],...n("congestion_control")}),B.jsx(wt,{label:"Alpn",...n("alpn")}),B.jsx(wt,{label:"SNI",...n("sni")}),B.jsx(k0,{label:e("configureNode.disableSNI"),...n("disable_sni",{type:"checkbox"})}),B.jsx(li,{label:e("configureNode.udpRelayMode"),data:[{label:"native",value:"native"},{label:"quic",value:"quic"}],...n("udp_relay_mode")}),B.jsx(k0,{label:e("allowInsecure"),...n("allowInsecure",{type:"checkbox"})}),B.jsx(Fs,{reset:i})]})},DIn=({onLinkGeneration:u})=>{const{t:e}=Ei(),{values:t,onSubmit:n,getInputProps:i,reset:r}=Da({initialValues:{protocol:"vmess",...KGt},validate:xa(eqt)}),a=n(o=>{const{protocol:s,net:l,tls:c,path:d,host:h,type:E,sni:m,flow:g,allowInsecure:f,alpn:p,id:D,add:x,port:b,ps:k}=o;if(s==="vless"){const A={type:l,security:c,path:d,host:h,headerType:E,sni:m,flow:g,allowInsecure:f};return p!==""&&(A.alpn=p),l==="grpc"&&(A.serviceName=d),l==="kcp"&&(A.seed=d),u(Q6({protocol:s,username:D,host:x,port:b,hash:k,params:A}))}if(s==="vmess"){const A=structuredClone(o);switch(l){case"kcp":case"tcp":default:A.type=""}switch(A.net){case"ws":case"h2":case"grpc":case"kcp":default:if(A.net==="tcp"&&A.type==="http")break;A.path=""}return A.protocol==="vless"&&A.tls==="xtls"||delete A.flow,u("vmess://"+Tf.encode(JSON.stringify(A)))}});return B.jsxs("form",{onSubmit:a,children:[B.jsx(li,{label:e("configureNode.protocol"),data:[{label:"VMESS",value:"vmess"},{label:"VLESS",value:"vless"}],...i("protocol")}),B.jsx(wt,{label:e("configureNode.name"),...i("ps")}),B.jsx(wt,{label:e("configureNode.host"),withAsterisk:!0,...i("add")}),B.jsx(zo,{label:e("configureNode.port"),withAsterisk:!0,min:0,max:65535,...i("port")}),B.jsx(wt,{label:"ID",withAsterisk:!0,...i("id")}),t.protocol==="vmess"&&B.jsx(zo,{label:"AlterID",min:0,max:65535,...i("aid")}),t.protocol==="vmess"&&B.jsx(li,{label:e("configureNode.security"),data:[{label:"auto",value:"auto"},{label:"aes-128-gcm",value:"aes-128-gcm"},{label:"chacha20-poly1305",value:"chacha20-poly1305"},{label:"none",value:"none"},{label:"zero",value:"zero"}],...i("scy")}),t.type!=="dtls"&&B.jsx(li,{label:"TLS",data:[{label:"off",value:"none"},{label:"tls",value:"tls"},{label:"xtls",value:"xtls"}],...i("tls")}),t.tls!=="none"&&B.jsx(wt,{label:"SNI",...i("sni")}),B.jsx(li,{label:"Flow",data:[{label:"none",value:"none"},{label:"xtls-rprx-origin",value:"xtls-rprx-origin"},{label:"xtls-rprx-origin-udp443",value:"xtls-rprx-origin-udp443"},{label:"xtls-rprx-vision",value:"xtls-rprx-vision-udp443"}],...i("flow")}),t.tls!=="none"&&B.jsx(k0,{label:"AllowInsecure",...i("allowInsecure",{type:"checkbox"})}),B.jsx(li,{label:e("configureNode.network"),data:[{label:"TCP",value:"tcp"},{label:"mKCP",value:"kcp"},{label:"WebSocket",value:"ws"},{label:"HTTP/2",value:"h2"},{label:"gRPC",value:"grpc"}],...i("net")}),t.net==="tcp"&&B.jsx(li,{label:e("configureNode.type"),data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:e("configureNode.httpObfuscation"),value:"srtp"}],...i("type")}),t.net==="kcp"&&B.jsx(li,{label:e("configureNode.type"),data:[{label:e("configureNode.noObfuscation"),value:"none"},{label:e("configureNode.srtpObfuscation"),value:"srtp"},{label:e("configureNode.utpObfuscation"),value:"utp"},{label:e("configureNode.wechatVideoObfuscation"),value:"wechat-video"},{label:e("configureNode.dtlsObfuscation"),value:"dtls"},{label:e("configureNode.wireguardObfuscation"),value:"wireguard"}],...i("type")}),(t.net==="ws"||t.net==="h2"||t.tls==="tls"||t.net==="tcp"&&t.type==="http")&&B.jsx(wt,{label:e("configureNode.host"),...i("host")}),t.tls==="tls"&&B.jsx(wt,{label:"Alpn",...i("alpn")}),(t.net==="ws"||t.net==="h2"||t.net==="tcp"&&t.type==="http")&&B.jsx(wt,{label:e("configureNode.path"),...i("path")}),t.net==="kcp"&&B.jsx(wt,{label:"Seed",...i("path")}),t.net==="grpc"&&B.jsx(wt,{label:"ServiceName",...i("path")}),B.jsx(Fs,{reset:r})]})},xIn=ke.object({tag:ke.string().nonempty()}),pKe=({opened:u,onClose:e})=>{const{t}=Ei(),n=yre(),i=Da({initialValues:{tag:""},validate:xa(xIn)}),r=async a=>{const{hasErrors:o}=i.validate();o||(await n.mutateAsync([{link:a,tag:i.values.tag}]),e())};return B.jsxs(Wi,{opened:u,onClose:e,title:t("configureNode.title"),size:"auto",children:[B.jsx(wt,{size:"xs",label:t("tag"),withAsterisk:!0,...i.getInputProps("tag")}),B.jsx(que,{theme:{components:{Tabs:{defaultProps:{variant:"outline"}},TabsPanel:{defaultProps:{pt:"xs"}},TextInput:{defaultProps:{size:"xs"}},Select:{defaultProps:{size:"xs"}},NumberInput:{defaultProps:{size:"xs"}},Checkbox:{defaultProps:{size:"xs"}},Stack:{defaultProps:{spacing:"xs"}}}},inherit:!0,children:B.jsxs(ri,{defaultValue:"v2ray",pt:"xs",children:[B.jsxs(ri.List,{position:"center",children:[B.jsx(ri.Tab,{value:"v2ray",children:"V2RAY"}),B.jsx(ri.Tab,{value:"ss",children:"SS"}),B.jsx(ri.Tab,{value:"ssr",children:"SSR"}),B.jsx(ri.Tab,{value:"trojan",children:"Trojan"}),B.jsx(ri.Tab,{value:"juicity",children:"Juicity"}),B.jsx(ri.Tab,{value:"hysteria2",children:"Hysteria2"}),B.jsx(ri.Tab,{value:"tuic",children:"Tuic"}),B.jsx(ri.Tab,{value:"http",children:"HTTP"}),B.jsx(ri.Tab,{value:"socks5",children:"SOCKS5"})]}),B.jsx(ri.Panel,{value:"v2ray",children:B.jsx(ju,{children:B.jsx(DIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"ss",children:B.jsx(ju,{children:B.jsx(EIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"ssr",children:B.jsx(ju,{children:B.jsx(mIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"trojan",children:B.jsx(ju,{children:B.jsx(fIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"juicity",children:B.jsx(ju,{children:B.jsx(eIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"hysteria2",children:B.jsx(ju,{children:B.jsx(XRn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"tuic",children:B.jsx(ju,{children:B.jsx(pIn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"http",children:B.jsx(ju,{children:B.jsx(QRn,{onLinkGeneration:r})})}),B.jsx(ri.Panel,{value:"socks5",children:B.jsx(ju,{children:B.jsx(gIn,{onLinkGeneration:r})})})]})})]})},qy=({id:u,name:e,type:t,nodeID:n,groupID:i,subscriptionID:r,onRemove:a,dragDisabled:o,children:s})=>{const{attributes:l,listeners:c,setNodeRef:d,isDragging:h}=vOe({id:u,data:{type:t,nodeID:n,groupID:i,subscriptionID:r},disabled:o});return B.jsx(K5,{disabled:!s,label:B.jsx(_u,{fz:"xs",children:s}),children:B.jsx(Uv,{ref:d,pr:a?3:void 0,rightSection:a&&B.jsx(Uu,{color:"blue",size:"xs",radius:"xl",variant:"transparent",onClick:a,children:B.jsx(BPn,{size:12})}),style:{zIndex:h?10:0,cursor:h?"grabbing":"grab"},opacity:h?.5:void 0,children:B.jsx(_u,{...c,...l,truncate:!0,children:e})})})},CN=({id:u,nodeID:e,subscriptionID:t,type:n,name:i,leftSection:r,onRemove:a,actions:o,children:s})=>{const{t:l}=Ei(),{attributes:c,listeners:d,setNodeRef:h,isDragging:E}=vOe({id:u,data:{type:n,nodeID:e,subscriptionID:t}});return B.jsxs(ym,{ref:h,p:"sm",withBorder:!0,shadow:"sm",style:{opacity:E?.5:void 0},children:[B.jsx(ym.Section,{withBorder:!0,p:"sm",children:B.jsxs(zi,{position:"apart",spacing:"xs",children:[r,B.jsx(Uv,{size:"lg",style:{cursor:"grab",flex:1},...d,...c,children:B.jsx(_u,{truncate:!0,children:i})}),B.jsxs(zi,{children:[o,B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:l("actions.remove"),labels:{cancel:l("confirmModal.cancel"),confirm:l("confirmModal.confirm")},children:l("confirmModal.removeConfirmDescription"),onConfirm:a})},children:B.jsx(vre,{})})]})]})}),B.jsx(ym.Section,{p:"sm",children:s})]})},DKe=({id:u,name:e,onRemove:t,actions:n,children:i})=>{const{t:r}=Ei(),{isOver:a,setNodeRef:o}=xju({id:u});return B.jsxs(ym,{ref:o,withBorder:!0,shadow:"sm",p:"sm",style:{opacity:a?.5:void 0},children:[B.jsx(ym.Section,{withBorder:!0,inheritPadding:!0,py:"sm",children:B.jsxs(zi,{position:"apart",children:[B.jsx(F0,{order:5,children:e}),B.jsxs(zi,{children:[n,t&&B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:r("actions.remove"),labels:{cancel:r("confirmModal.cancel"),confirm:r("confirmModal.confirm")},children:r("confirmModal.removeConfirmDescription"),onConfirm:t})},children:B.jsx(vre,{})})]})]})}),i&&B.jsx(ym.Section,{inheritPadding:!0,py:"sm",children:i})]})},vIn=ke.object({name:ke.string().nonempty(),policy:ke.nativeEnum(qo)}),xQ=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState(),[a,o]=C.useState(),s=Da({validate:xa(vIn),initialValues:{name:"",policy:wTe}}),l=E=>{s.setValues(E),o(E)};C.useImperativeHandle(t,()=>({form:s,setEditingID:r,initOrigins:l}));const c=q$e(),d=ERn(),h=[{label:qo.MinMovingAvg,value:qo.MinMovingAvg,description:n("descriptions.group.MinMovingAvg")},{label:qo.MinAvg10,value:qo.MinAvg10,description:n("descriptions.group.MinAvg10")},{label:qo.Min,value:qo.Min,description:n("descriptions.group.Min")},{label:qo.Random,value:qo.Random,description:n("descriptions.group.Random")},{label:qo.Fixed,value:qo.Fixed,description:n("descriptions.group.Fixed")}];return B.jsx(Wi,{title:n("group"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:s.onSubmit(async E=>{const m=E.policy===qo.Fixed?[{key:"",val:"0"}]:[];i?await d.mutateAsync({id:i,policy:E.policy,policyParams:m}):await c.mutateAsync({name:E.name,policy:E.policy,policyParams:m}),e(),s.reset()}),children:B.jsxs(ju,{children:[B.jsx(wt,{withAsterisk:!0,label:n("name"),...s.getInputProps("name"),disabled:!!i}),B.jsx(li,{label:n("policy"),dropdownPosition:"bottom",itemComponent:gQ,data:h,...s.getInputProps("policy")}),B.jsx(Fs,{reset:()=>{i&&a?s.setValues(a):s.reset()}})]})})})}),CIn={type:"logger",log(u){this.output("log",u)},warn(u){this.output("warn",u)},error(u){this.output("error",u)},output(u,e){console&&console[u]&&console[u].apply(console,e)}};class bN{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||CIn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[n]=this.observers[n]||[],this.observers[n].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{a(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(a=>{a.apply(a,[e,...n])})}}function ab(){let u,e;const t=new Promise((n,i)=>{u=n,e=i});return t.resolve=u,t.reject=e,t}function sxe(u){return u==null?"":""+u}function bIn(u,e,t){u.forEach(n=>{e[n]&&(t[n]=e[n])})}function Bre(u,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!u||typeof u=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!u[a]&&t&&(u[a]=new t),Object.prototype.hasOwnProperty.call(u,a)?u=u[a]:u={}}return i()?{}:{obj:u,k:n(r.shift())}}function lxe(u,e,t){const{obj:n,k:i}=Bre(u,e,Object);n[i]=t}function kIn(u,e,t,n){const{obj:i,k:r}=Bre(u,e,Object);i[r]=i[r]||[],n&&(i[r]=i[r].concat(t)),n||i[r].push(t)}function kN(u,e){const{obj:t,k:n}=Bre(u,e);if(t)return t[n]}function FIn(u,e,t){const n=kN(u,t);return n!==void 0?n:kN(e,t)}function xKe(u,e,t){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in u?typeof u[n]=="string"||u[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(u[n]=e[n]):xKe(u[n],e[n],t):u[n]=e[n]);return u}function KD(u){return u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var yIn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function AIn(u){return typeof u=="string"?u.replace(/[&<>"'\/]/g,e=>yIn[e]):u}const _In=[" ",",","?","!",";"];function SIn(u,e,t){e=e||"",t=t||"";const n=_In.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(u);if(!r){const a=u.indexOf(t);a>0&&!i.test(u.substring(0,a))&&(r=!0)}return r}function FN(u,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!u)return;if(u[e])return u[e];const n=e.split(t);let i=u;for(let r=0;rr+a;)a++,o=n.slice(r,r+a).join(t),s=i[o];if(s===void 0)return;if(s===null)return null;if(e.endsWith(o)){if(typeof s=="string")return s;if(o&&typeof s[o]=="string")return s[o]}const l=n.slice(r+a).join(t);return l?FN(s,l,t):void 0}i=i[n[r]]}return i}function yN(u){return u&&u.indexOf("_")>0?u.replace("_","-"):u}class cxe extends $O{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];n&&typeof n!="string"&&(o=o.concat(n)),n&&typeof n=="string"&&(o=o.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=e.split("."));const s=kN(this.data,o);return s||!a||typeof n!="string"?s:FN(this.data&&this.data[e]&&this.data[e][t],n,r)}addResource(e,t,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),lxe(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=n,n=t,t=o[1]),this.addNamespaces(t);let s=kN(this.data,o)||{};i?xKe(s,n,r):s={...s,...n},lxe(this.data,o,s),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var vKe={processors:{},addPostProcessor(u){this.processors[u.name]=u},handle(u,e,t,n,i){return u.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,n,i))}),e}};const dxe={};class AN extends $O{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),bIn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=d1.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!SIn(e,n,i);if(a&&!o){const s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:r};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(r=l.shift()),e=l.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),s=o[o.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(c){const b=t.nsSeparator||this.options.nsSeparator;return i?{res:`${s}${b}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${b}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:a}const d=this.resolve(e,t);let h=d&&d.res;const E=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(h),f=["[object Number]","[object Function]","[object RegExp]"],p=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject;if(D&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&f.indexOf(g)<0&&!(typeof p=="string"&&g==="[object Array]")){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,h,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=b,d.usedParams=this.getUsedParamsDetails(t),d):b}if(r){const b=g==="[object Array]",k=b?[]:{},A=b?m:E;for(const F in h)if(Object.prototype.hasOwnProperty.call(h,F)){const S=`${A}${r}${F}`;k[F]=this.translate(S,{...t,joinArrays:!1,ns:o}),k[F]===S&&(k[F]=h[F])}h=k}}else if(D&&typeof p=="string"&&g==="[object Array]")h=h.join(p),h&&(h=this.extendTranslation(h,e,t,n));else{let b=!1,k=!1;const A=t.count!==void 0&&typeof t.count!="string",F=AN.hasDefaultValue(t),S=A?this.pluralResolver.getSuffix(l,t.count,t):"",w=t.ordinal&&A?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",z=t[`defaultValue${S}`]||t[`defaultValue${w}`]||t.defaultValue;!this.isValidLookup(h)&&F&&(b=!0,h=z),this.isValidLookup(h)||(k=!0,h=a);const O=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:h,y=F&&z!==h&&this.options.updateMissing;if(k||b||y){if(this.logger.log(y?"updateKey":"missingKey",l,s,a,y?z:h),r){const R=this.resolve(a,{...t,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let R=0;R{const V=F&&H!==h?H:O;this.options.missingKeyHandler?this.options.missingKeyHandler(R,s,I,V,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,s,I,V,y,t),this.emit("missingKey",R,s,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?_.forEach(R=>{this.pluralResolver.getSuffixes(R,t).forEach(I=>{T([R],a+I,t[`defaultValue${I}`]||z)})}):T(_,a,z))}h=this.extendTranslation(h,e,t,d,n),k&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${s}:${a}`),(k||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,b?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(d.res=h,d.usedParams=this.getUsedParamsDetails(t),d):h}extendTranslation(e,t,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=e.match(this.interpolator.nestingRegexp);c=h&&h.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language,n),l){const h=e.match(this.interpolator.nestingRegexp),E=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,o;return typeof e=="string"&&(e=[e]),e.forEach(s=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(s,t),c=l.key;i=c;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=t.count!==void 0&&typeof t.count!="string",E=h&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(f=>{this.isValidLookup(n)||(o=f,!dxe[`${g[0]}-${f}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(dxe[`${g[0]}-${f}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(p=>{if(this.isValidLookup(n))return;a=p;const D=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(D,c,p,f,t);else{let b;h&&(b=this.pluralResolver.getSuffix(p,t.count,t));const k=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(D.push(c+b),t.ordinal&&b.indexOf(A)===0&&D.push(c+b.replace(A,this.options.pluralSeparator)),E&&D.push(c+k)),m){const F=`${c}${this.options.contextSeparator}${t.context}`;D.push(F),h&&(D.push(F+b),t.ordinal&&b.indexOf(A)===0&&D.push(F+b.replace(A,this.options.pluralSeparator)),E&&D.push(F+k))}}let x;for(;x=D.pop();)this.isValidLookup(n)||(r=x,n=this.getResource(p,f,x,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}function aK(u){return u.charAt(0).toUpperCase()+u.slice(1)}class hxe{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d1.create("languageUtils")}getScriptPartFromCode(e){if(e=yN(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=yN(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aK(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aK(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=aK(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let BIn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],wIn={1:function(u){return+(u>1)},2:function(u){return+(u!=1)},3:function(u){return 0},4:function(u){return u%10==1&&u%100!=11?0:u%10>=2&&u%10<=4&&(u%100<10||u%100>=20)?1:2},5:function(u){return u==0?0:u==1?1:u==2?2:u%100>=3&&u%100<=10?3:u%100>=11?4:5},6:function(u){return u==1?0:u>=2&&u<=4?1:2},7:function(u){return u==1?0:u%10>=2&&u%10<=4&&(u%100<10||u%100>=20)?1:2},8:function(u){return u==1?0:u==2?1:u!=8&&u!=11?2:3},9:function(u){return+(u>=2)},10:function(u){return u==1?0:u==2?1:u<7?2:u<11?3:4},11:function(u){return u==1||u==11?0:u==2||u==12?1:u>2&&u<20?2:3},12:function(u){return+(u%10!=1||u%100==11)},13:function(u){return+(u!==0)},14:function(u){return u==1?0:u==2?1:u==3?2:3},15:function(u){return u%10==1&&u%100!=11?0:u%10>=2&&(u%100<10||u%100>=20)?1:2},16:function(u){return u%10==1&&u%100!=11?0:u!==0?1:2},17:function(u){return u==1||u%10==1&&u%100!=11?0:1},18:function(u){return u==0?0:u==1?1:2},19:function(u){return u==1?0:u==0||u%100>1&&u%100<11?1:u%100>10&&u%100<20?2:3},20:function(u){return u==1?0:u==0||u%100>0&&u%100<20?1:2},21:function(u){return u%100==1?1:u%100==2?2:u%100==3||u%100==4?3:0},22:function(u){return u==1?0:u==2?1:(u<0||u>10)&&u%10==0?2:3}};const LIn=["v1","v2","v3"],zIn=["v4"],Exe={zero:0,one:1,two:2,few:3,many:4,other:5};function MIn(){const u={};return BIn.forEach(e=>{e.lngs.forEach(t=>{u[t]={numbers:e.nr,plurals:wIn[e.fc]}})}),u}class TIn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=d1.create("pluralResolver"),(!this.options.compatibilityJSON||zIn.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=MIn()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(yN(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>Exe[i]-Exe[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!LIn.includes(this.options.compatibilityJSON)}}function mxe(u,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=FIn(u,e,t);return!r&&i&&typeof t=="string"&&(r=FN(u,t,n),r===void 0&&(r=FN(e,t,n))),r}class NIn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=d1.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=t.escape!==void 0?t.escape:AIn,this.escapeValue=t.escapeValue!==void 0?t.escapeValue:!0,this.useRawValueToEscape=t.useRawValueToEscape!==void 0?t.useRawValueToEscape:!1,this.prefix=t.prefix?KD(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?KD(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?KD(t.nestingPrefix):t.nestingPrefixEscaped||KD("$t("),this.nestingSuffix=t.nestingSuffix?KD(t.nestingSuffix):t.nestingSuffixEscaped||KD(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0?t.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,t,n,i){let r,a,o;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(m){return m.replace(/\$/g,"$$$$")}const c=m=>{if(m.indexOf(this.formatSeparator)<0){const D=mxe(t,s,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,n,{...i,...t,interpolationkey:m}):D}const g=m.split(this.formatSeparator),f=g.shift().trim(),p=g.join(this.formatSeparator).trim();return this.format(mxe(t,s,f,this.options.keySeparator,this.options.ignoreJSONStructure),p,n,{...i,...t,interpolationkey:f})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>l(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?l(this.escape(m)):l(m)}].forEach(m=>{for(o=0;r=m.regex.exec(e);){const g=r[1].trim();if(a=c(g),a===void 0)if(typeof d=="function"){const p=d(e,r,i);a=typeof p=="string"?p:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(h){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=sxe(a));const f=m.safeValue(a);if(e=e.replace(r[0],f),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=r[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function o(s,l){const c=this.nestingOptionsSeparator;if(s.indexOf(c)<0)return s;const d=s.split(new RegExp(`${c}[ ]*{`));let h=`{${d[1]}`;s=d[0],h=this.interpolate(h,a);const E=h.match(/'/g),m=h.match(/"/g);(E&&E.length%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,g),`${s}${c}${h}`}return delete a.defaultValue,s}for(;i=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),s=c,l=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=sxe(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),l&&(r=s.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}function PIn(u){let e=u.toLowerCase().trim();const t={};if(u.indexOf("(")>-1){const n=u.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(!a)return;const[o,...s]=a.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");t[o.trim()]||(t[o.trim()]=l),l==="false"&&(t[o.trim()]=!1),l==="true"&&(t[o.trim()]=!0),isNaN(l)||(t[o.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:t}}function WD(u){const e={};return function(n,i,r){const a=i+JSON.stringify(r);let o=e[a];return o||(o=u(yN(i),r),e[a]=o),o(n)}}class RIn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=d1.create("formatter"),this.options=e,this.formats={number:WD((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return r=>i.format(r)}),currency:WD((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return r=>i.format(r)}),datetime:WD((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return r=>i.format(r)}),relativetime:WD((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return r=>i.format(r,n.range||"day")}),list:WD((t,n)=>{const i=new Intl.ListFormat(t,{...n});return r=>i.format(r)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=WD(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((o,s)=>{const{formatName:l,formatOptions:c}=PIn(s);if(this.formats[l]){let d=o;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},E=h.locale||h.lng||i.locale||i.lng||n;d=this.formats[l](o,E,{...c,...i,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}function IIn(u,e){u.pending[e]!==void 0&&(delete u.pending[e],u.pendingCount--)}class OIn extends $O{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=d1.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const r={},a={},o={},s={};return e.forEach(l=>{let c=!0;t.forEach(d=>{const h=`${l}|${d}`;!n.reload&&this.store.hasResourceBundle(l,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),r[h]===void 0&&(r[h]=!0),s[d]===void 0&&(s[d]=!0)))}),c||(o[l]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),n&&this.store.addResourceBundle(r,a,n),this.state[e]=t?-1:2;const o={};this.queue.forEach(s=>{kIn(s.loaded,[r],a),IIn(s,e),t&&s.errors.push(t),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(l=>{o[l]||(o[l]={});const c=s.loaded[l];c.length&&c.forEach(d=>{o[l][d]===void 0&&(o[l][d]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(s=>!s.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&c&&i{this.read.call(this,e,t,n,i+1,r*2,a)},r);return}a(l,c)},s=this.backend[n].bind(this.backend);if(s.length===2){try{const l=s(e,t);l&&typeof l.then=="function"?l.then(c=>o(null,c)).catch(o):o(null,l)}catch(l){o(l)}return}return s(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const s={...a,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(e,t,n,i,s):c=l(e,t,n,i),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else l(e,t,n,i,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}function gxe(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:(u,e,t,n)=>u,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function fxe(u){return typeof u.ns=="string"&&(u.ns=[u.ns]),typeof u.fallbackLng=="string"&&(u.fallbackLng=[u.fallbackLng]),typeof u.fallbackNS=="string"&&(u.fallbackNS=[u.fallbackNS]),u.supportedLngs&&u.supportedLngs.indexOf("cimode")<0&&(u.supportedLngs=u.supportedLngs.concat(["cimode"])),u}function wS(){}function jIn(u){Object.getOwnPropertyNames(Object.getPrototypeOf(u)).forEach(t=>{typeof u[t]=="function"&&(u[t]=u[t].bind(u))})}class Jy extends $O{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=fxe(e),this.services={},this.logger=d1,this.modules={external:[]},jIn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=gxe();this.options={...i,...this.options,...fxe(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function r(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?d1.init(r(this.modules.logger),this.options):d1.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=RIn);const d=new hxe(this.options);this.store=new cxe(this.options.resources,this.options);const h=this.services;h.logger=d1,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new TIn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=r(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new NIn(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new OIn(r(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(E){for(var m=arguments.length,g=new Array(m>1?m-1:0),f=1;f1?m-1:0),f=1;f{E.init&&E.init(this)})}if(this.format=this.options.interpolation.format,n||(n=wS),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const s=ab(),l=()=>{const c=(d,h)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(h),n(d,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wS;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(l=>{l!=="cimode"&&r.indexOf(l)<0&&r.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>a(s)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o)})}else n(null)}reloadResources(e,t,n){const i=ab();return e||(e=this.languages),t||(t=this.options.ns),n||(n=wS),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vKe.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ab();this.emit("languageChanging",e);const r=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(s,function(){return n.t(...arguments)})},o=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=typeof s=="string"?s:this.services.languageUtils.getBestMatchFromCodes(s);l&&(this.language||r(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,c=>{a(c,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,n){var i=this;const r=function(a,o){let s;if(typeof o!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),d=2;d`${s.keyPrefix}${h}${m}`):E=s.keyPrefix?`${s.keyPrefix}${h}${a}`:a,i.t(E,s)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(o,s)=>{const l=this.services.backendConnector.state[`${o}|${s}`];return l===-1||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const n=ab();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ab();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new hxe(gxe());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Jy(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wS;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new Jy(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new cxe(this.store.data,i),r.services.resourceStore=r.store),r.translator=new AN(r.services,i),r.translator.on("*",function(o){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!Dxe.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!Dxe.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var s=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(s){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},xxe={create:function(e,t,n,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=qIn(e,encodeURIComponent(t),r)},read:function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),i=0;i-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),r=i.split("&"),a=0;a0){var s=r[a].substring(0,o);s===e.lookupQuerystring&&(t=r[a].substring(o+1))}}}return t}},ob=null,vxe=function(){if(ob!==null)return ob;try{ob=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{ob=!1}return ob},YIn={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&vxe()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&vxe()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},sb=null,Cxe=function(){if(sb!==null)return sb;try{sb=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{sb=!1}return sb},QIn={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Cxe()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Cxe()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},XIn={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n0?t:void 0}},eOn={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},tOn={name:"path",lookup:function(e){var t;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof n[e.lookupFromPathIndex]!="string")return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},uOn={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};function nOn(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var bKe=function(){function u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};HIn(this,u),this.type="languageDetector",this.detectors={},this.init(e,t)}return KIn(u,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=UIn(n,this.options||{},nOn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(JIn),this.addDetector(ZIn),this.addDetector(YIn),this.addDetector(QIn),this.addDetector(XIn),this.addDetector(eOn),this.addDetector(tOn),this.addDetector(uOn)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var n=this;t||(t=this.options.order);var i=[];return t.forEach(function(r){if(n.detectors[r]){var a=n.detectors[r].lookup(n.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),i=i.map(function(r){return n.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(t,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(function(r){i.detectors[r]&&i.detectors[r].cacheUserLanguage(t,i.options)}))}}]),u}();bKe.type="languageDetector";const iOn={add:"Add","advanced mode":"Advanced Mode","already have an account, login instead":"Already have an account, login instead",cancel:"Cancel","change endpoint":"Change Endpoint",confirm:"Confirm",continue:"Continue",create:"New","create account":"Create Account",edit:"Edit",hide:"Hide",import:"Import","import resource":"Import {{ name }}",login:"Login",logout:"Logout",refresh:"Refresh",reload:"Reload",remove:"Remove",rename:"Rename",reset:"Reset","save dae":"Save dae","show content":"Show content","simple mode":"Simple Mode",skip:"Skip","start your journey":"Start your journey",submit:"Submit",switchLanguage:"Switch Language",switchRunning:"Switch Running",switchTheme:"Switch Theme"},rOn="address",aOn="Allow Insecure",oOn="Auto Config Kernel Parameter",sOn="Auto Detect",lOn="avatar",cOn="Check Interval",dOn="Check Tolerance",hOn="collapse",EOn="Config",mOn={congestionControl:"Congestion Control",disableSNI:"Disable SNI",dtlsObfuscation:"Obfuscated as DTLS1.2 Packets",forceTLS:"forcibly TLS on",host:"Host",hostObfuscation:"Host",httpObfuscation:"Obfuscated as HTTP",name:"Name",network:"Network",noObfuscation:"No obfuscation",obfs:"Obfuscation",obfsParam:"Obfs Param",obfsPassword:"Obfs Password",origin:"origin",password:"Password",path:"Path",pathObfuscation:"Path",pinned_certchain_sha256:"Pinned Certchain SHA256",port:"Port",protocol:"Protocol",protocolParam:"Protocol Param",security:"Security",seedObfuscation:"Seed",servername:"Servername",srtpObfuscation:"Obfuscated as Video Calls (SRTP)",title:"Configure Node",type:"Type",udpRelayMode:"UDP Relay Mode",username:"Username",utpObfuscation:"Obfuscated as Bittorrent (uTP)",websocketHost:"WebSocket Host",websocketPath:"WebSocket Path",wechatVideoObfuscation:"Obfuscated as Wechat Video Calls",wireguardObfuscation:"Obfuscated as WireGuard Packets"},gOn={cancel:"No, It's a mistake",confirm:"Yes, I'm sure",removeConfirmDescription:"Are you sure you want to remove this?"},fOn="connected",pOn="debug",DOn={config:{allowInsecure:"Allow insecure TLS certificates. It is not recommended to turn it on unless you have to.",autoConfigKernelParameter:"Automatically configure Linux kernel parameters like ip_forward and send_redirects.",checkTolerance:"Group will switch node only when new_latency <= old_latency - tolerance.",dialMode:{domain:"Dial proxy using the domain from sniffing. This will relieve DNS pollution problem to a great extent if have impure DNS environment. Generally, this mode brings faster proxy response time because proxy will re-resolve the domain in remote, thus get better IP result to connect. This policy does not impact routing. That is to say, domain rewrite will be after traffic split of routing and dae will not re-route it.","domain+":"Based on domain mode but do not check the reality of sniffed domain. It is useful for users whose DNS requests do not go through dae but want faster proxy response time. Notice that, if DNS requests do not go through dae, dae cannot split traffic by domain.","domain++":"Based on domain+ mode but force to re-route traffic using sniffed domain to partially recover domain based traffic split ability. It doesn't work for direct traffic and consumes more CPU resources.",ip:"Dial proxy using the IP from DNS directly. This allows your ipv4, ipv6 to choose the optimal path respectively, and makes the IP version requested by the application meet expectations. For example, if you use curl -4 ip.sb, you will request IPv4 via proxy and get a IPv4 echo. And curl -6 ip.sb will request IPv6. This may solve some wierd full-cone problem if your are be your node support that. Sniffing will be disabled in this mode."},disableWaitingNetwork:"Disable waiting for network before pulling subscriptions.",lanInterface:"The LAN interface to bind. Use it if you want to proxy LAN.",sniffingTimeout:"Timeout to waiting for first data sending for sniffing. It is always 0 if dial_mode is ip. Set it higher is useful in high latency LAN network.",soMarkFromDae:"If not zero, traffic sent from dae will be set SO_MARK. It is useful to avoid traffic loop with iptables/nftables tproxy rules.",tcpCheckHttpMethod:"The HTTP request method to TCP Check HTTP Method. Use HEAD by default because some server implementations bypass accounting for this kind of traffic.",tcpCheckUrl:"Host of URL should have both IPv4 and IPv6 if you have double stack in local. First is URL, others are IP addresses if given. Considering traffic consumption, it is recommended to choose a site with anycast IP and less response.",tlsImplementation:"TLS implementation. tls is to use Go's crypto/tls. utls is to use uTLS, which can imitate browser's Client Hello.",tproxyPort:"Transparent Proxy Port to listen on. Valid range is 0 - 65535. It is NOT a HTTP/SOCKS port, and is just used by eBPF program. In normal case, you do not need to use it.",tproxyPortProtect:"Set it true to protect tproxy port from unsolicited traffic. Set it false to allow users to use self-managed iptables tproxy rules.",udpCheckDns:"This DNS will be used to check UDP connectivity of nodes. And if dns_upstream below contains tcp, it also be used to check TCP DNS connectivity of nodes. First is URL, others are IP addresses if given. This DNS should have both IPv4 and IPv6 if you have double stack in local.",utlsImitate:"The Client Hello ID for uTLS to imitate. This takes effect only if tls_implementation is utls.",wanInterface:"The WAN interface to bind. Use it if you want to proxy localhost."},group:{Min:"Select the node with min last latency from the group for every connection",MinAvg10:"Select the node with min average of the last 10 latencies from the group for every connection",MinMovingAvg:"Select the node with min moving average of latencies from the group for every connection",Random:"Randomly select a node from the group for every connection",Fixed:"Select the node with fixed index from the group for every connection, there should be and only be one node in the group"}},xOn="Dial Mode",vOn="Disable Waiting Network",COn="disconnected",bOn="DNS",kOn="dnsUpstream",FOn="domain",yOn="Endpoint URL",AOn="error",_On="Experiment",SOn="Global",BOn="Group",wOn="info",LOn="ip",zOn="Lan Interface",MOn="lanNatDirect",TOn="link",NOn="Log Level",POn="ms",ROn="Name",IOn="Node",OOn={"login succeeded":"Login Succeeded",success:"Success"},jOn="operations",HOn="Orchestrate",VOn="password",$On="policy",KOn="policyParams",WOn="protocol",GOn="Resource",UOn="Routing",qOn="Rule",JOn="seconds",ZOn="select",YOn="selected",QOn="Settings",XOn="Sniffing Timeout",ejn="Set SO_MARK For dae",tjn="Step",ujn="Subscription",njn="Success",ijn="tag",rjn="TCP Check HTTP Method",ajn="TCP Check URL",ojn="TLS Implementation",sjn="Transparent Proxy Port",ljn="Tproxy Port Protect",cjn="trace",djn="UDP Check DNS",hjn="updatedAt",Ejn="User",mjn="username",gjn="uTLS Imitate",fjn="value",pjn="Wan Interface",Djn="warn",xjn={"account settings":"Account Settings",actions:iOn,address:rOn,allowInsecure:aOn,autoConfigKernelParameter:oOn,autoDetect:sOn,avatar:lOn,checkInterval:cOn,checkTolerance:dOn,collapse:hOn,config:EOn,configureNode:mOn,confirmModal:gOn,connected:fOn,"connecting options":"Connecting Options","create account":"Create a new account","dark mode":"Dark Mode",debug:pOn,descriptions:DOn,dialMode:xOn,disableWaitingNetwork:vOn,disconnected:COn,"display name":"Display Name",dns:bOn,dnsUpstream:kOn,domain:FOn,"domain+":"domain+",endpointURL:yOn,error:AOn,experiment:_On,global:SOn,group:BOn,info:wOn,"interface and kernel options":"Interface and Kernel Options",ip:LOn,lanInterface:zOn,lanNatDirect:MOn,link:TOn,logLevel:NOn,"login account":"Login via username & password",milliseconds:POn,name:ROn,node:IOn,"node connectivity check":"Node Connectivity Check",notifications:OOn,operations:jOn,orchestrate:HOn,password:VOn,"please select a config first":"Please select a config first",policy:$On,policyParams:KOn,protocol:WOn,resource:GOn,routing:UOn,rule:qOn,seconds:JOn,select:ZOn,selected:YOn,settings:QOn,"setup endpoint":"Setup your backend (graphql) endpoint URL",sniffingTimeout:XOn,soMarkFromDae:ejn,"software options":"Software Options",step:tjn,subscription:ujn,success:njn,tag:ijn,tcpCheckHttpMethod:rjn,tcpCheckUrl:ajn,tlsImplementation:ojn,tproxyPort:sjn,tproxyPortProtect:ljn,trace:cjn,udpCheckDns:djn,updatedAt:hjn,user:Ejn,username:mjn,utlsImitate:gjn,value:fjn,wanInterface:pjn,warn:Djn,"welcome back":"Welcome Back!","welcome to":"Welcome to {{ name }}","what for":"A Modern Dashboard For"},vjn={add:"添加","advanced mode":"进阶模式","already have an account, login instead":"已经有一个账户了,直接登录",cancel:"取消","change endpoint":"切换后台",confirm:"确定",continue:"继续",create:"新建","create account":"创建账户",edit:"编辑",hide:"隐藏",import:"导入","import resource":"导入{{ name }}",login:"登录",logout:"登出",refresh:"刷新",reload:"重载",remove:"移除",rename:"重命名",reset:"重置","save dae":"救起大鹅","show content":"显示内容","simple mode":"简单模式",skip:"跳过","start your journey":"开始你的旅程",submit:"提交",switchLanguage:"切换语言",switchRunning:"运行开关",switchTheme:"切换主题"},Cjn="地址",bjn="允许不安全",kjn="自动配置内核参数",Fjn="自动识别",yjn="头像",Ajn="检测间隔",_jn="检测公差",Sjn="折叠",Bjn="配置",wjn={congestionControl:"拥堵控制算法",disableSNI:"关闭 SNI",dtlsObfuscation:"伪装为 DTLS1.2 数据包",forceTLS:"强制开启 TLS",host:"主机地址",hostObfuscation:"域名 (host)",httpObfuscation:"伪装为 HTTP",name:"名字",network:"网络",noObfuscation:"不伪装",obfs:"混淆",obfsParam:"混淆参数",obfsPassword:"混淆密码",origin:"原版",password:"密码",path:"路径",pathObfuscation:"路径 (path)",pinned_certchain_sha256:"固定证书链 SHA256",port:"端口号",protocol:"协议",protocolParam:"协议参数",security:"安全",seedObfuscation:"混淆种子",servername:"节点名称",srtpObfuscation:"伪装视频通话 (SRTP)",title:"配置节点",type:"类型",udpRelayMode:"UDP 中继模式",username:"用户名",utpObfuscation:"伪装为 BT 下载 (uTP)",websocketHost:"WebSocket 地址",websocketPath:"WebSocket 路径",wechatVideoObfuscation:"伪装为微信视频通话",wireguardObfuscation:"伪装为 WireGuard 数据包"},Ljn={cancel:"不, 我点错了",confirm:"是,我确定",removeConfirmDescription:"你确定要移除这个吗?"},zjn="已连接",Mjn="调试",Tjn={config:{allowInsecure:"允许使用不安全的TLS证书。除非迫不得已,否则不建议打开它。",autoConfigKernelParameter:"自动配置 Linux 内核参数,如 ip_forward(路由转发)和 send_redirects(发送重定向)。",checkTolerance:"只有当新的延迟 <= 旧的延迟 - 公差时,群组才会切换节点。",dialMode:{domain:"通过嗅探使用域名拨号代理。如果 DNS 环境不纯净,这将在很大程度上缓解 DNS 污染问题。通常,这种模式会带来更快的代理响应时间,因为代理会在远程重新解析域名,从而获得更好的 IP 连接结果。此策略不影响路由。也就是说,域重写将在流量拆分后进行路由,dae 不会对其进行重新路由。","domain+":"基于 domain 模式但不检查嗅探域名的真实性。对于那些 DNS 请求不通过 dae 但想要更快的代理响应时间的用户来说,这很有用。请注意,如果 DNS 请求不通过 dae,dae 就无法按域划分流量。","domain++":"基于 domain+ 模式,但强制使用嗅探域重新路由流量,以部分恢复基于域的流量拆分能力。它不适用于直接流量,并且会消耗更多的 CPU 资源。",ip:"直接使用来自 DNS 的 IP 拨号代理。这允许您的 ipv4、ipv6 分别选择最佳路径,并使应用程序请求的 IP 版本符合预期。例如,如果您使用 curl -4 ip.sb,您将通过代理请求 IPv4 并获得 IPv4 回显。curl -6 ip.sb 将请求 IPv6。如果你是你的节点支持的话,这可能会解决一些怪异的全锥形问题。在此模式下将禁用嗅探。"},disableWaitingNetwork:"禁用在拉取订阅之前等待网络。",lanInterface:"要绑定的 LAN 接口。如果您想代理局域网,请使用它。",sniffingTimeout:"等待第一次发送数据以进行嗅探时超时。如果拨号模式为 ip,则始终为 0。将其设置得更高在高延迟局域网网络中很有用。",soMarkFromDae:"如果不是 0,则从 dae 发送的流量将被设置套接字标记(SO_MARK)。这对于使用 iptables/nftables 透明代理规则避免流量循环非常有用。",tcpCheckHttpMethod:"对 TCP 检测链接的 HTTP 请求方法。默认情况下使用 HEAD,因为某些服务器实现绕过了对此类流量的核算。",tcpCheckUrl:"如果您在本地有 dual stack(双协议栈),URL 的域名解析应该同时具有 IPv4 和 IPv6。第一个是 URL,其他是 IP 地址(如果给定的话)。考虑到流量消耗,建议选择具有 anycast IP 且响应较少的站点。",tlsImplementation:"TLS 实现。tls 是使用 Go 的 crypto/tls。utls 是使用 utls,它可以模仿浏览器的客户端 Hello。",tproxyPort:"要监听的透明代理端口。合法范围是 0 - 65535。它不是 HTTP/SOCKS 端口,仅由 eBPF 程序使用。在正常情况下,您不需要使用它。",tproxyPortProtect:"将其设置为 true 可保护透明代理端口免受未经请求的流量的影响。将其设置为 false 以允许用户使用自我管理的 iptables 透明代理规则。",udpCheckDns:"此 DNS 将用于检查节点的 UDP 连接。如果下面的 DNS 上游包含 TCP,它也可以用于检查节点的 TCP DNS 连接。第一个是 URL,其他是 IP地址(如果给定的话)。如果您在本地有 dual stack(双协议栈),则此 DNS 应该同时具有 IPv4 和 IPv6。",utlsImitate:"要模仿的 uTLS 的客户端 Hello ID。只有当 TLS 实现 为 utls 时,此操作才会生效。",wanInterface:"要绑定的 WAN 接口。如果您想代理本机,请使用它。"},group:{Min:"从组中为每个连接选择最后延迟最小的节点",MinAvg10:"从组中为每个连接选择最近10个延迟的最小平均值的节点",MinMovingAvg:"从组中为每个连接选择具有最小移动平均延迟的节点",Random:"为每个连接从组中随机选择一个节点",Fixed:"为每个连接从组中选择固定索引的节点, 组里有且只能有一个节点"}},Njn="拨号模式",Pjn="禁用网络等待",Rjn="未连接",Ijn="DNS",Ojn="DNS 上游",jjn="域名",Hjn="接口地址",Vjn="错误",$jn="试验",Kjn="全局",Wjn="群组",Gjn="信息",Ujn="IP 地址",qjn="LAN 接口",Jjn="LAN NAT 直连",Zjn="链接",Yjn="日志等级",Qjn="毫秒",Xjn="名字",eHn="节点",tHn={"login succeeded":"登录成功",success:"成功"},uHn="操作",nHn="编排",iHn="密码",rHn="策略",aHn="策略参数",oHn="协议",sHn="资源",lHn="路由",cHn="规则",dHn="秒",hHn="选择",EHn="已选中",mHn="设置",gHn="嗅探超时",fHn="为 dae 设置套接字标记",pHn="步骤",DHn="订阅",xHn="成功",vHn="标签",CHn="TCP 检测 HTTP 方式",bHn="TCP 检测链接",kHn="TLS 实现",FHn="透明代理端口",yHn="透明代理端口保护",AHn="跟踪",_Hn="UDP 检测 DNS",SHn="更新时间",BHn="用户",wHn="用户名",LHn="uTLS 模仿",zHn="值",MHn="WAN 接口",THn="警告",NHn={"account settings":"账户设置",actions:vjn,address:Cjn,allowInsecure:bjn,autoConfigKernelParameter:kjn,autoDetect:Fjn,avatar:yjn,checkInterval:Ajn,checkTolerance:_jn,collapse:Sjn,config:Bjn,configureNode:wjn,confirmModal:Ljn,connected:zjn,"connecting options":"连接选项","create account":"创建一个新的账户","dark mode":"暗黑模式",debug:Mjn,descriptions:Tjn,dialMode:Njn,disableWaitingNetwork:Pjn,disconnected:Rjn,"display name":"展示名",dns:Ijn,dnsUpstream:Ojn,domain:jjn,"domain+":"域名+",endpointURL:Hjn,error:Vjn,experiment:$jn,global:Kjn,group:Wjn,info:Gjn,"interface and kernel options":"接口及内核选项",ip:Ujn,lanInterface:qjn,lanNatDirect:Jjn,link:Zjn,logLevel:Yjn,"login account":"使用帐号密码登录",milliseconds:Qjn,name:Xjn,node:eHn,"node connectivity check":"节点连通性检测",notifications:tHn,operations:uHn,orchestrate:nHn,password:iHn,"please select a config first":"请先选择配置",policy:rHn,policyParams:aHn,protocol:oHn,resource:sHn,routing:lHn,rule:cHn,seconds:dHn,select:hHn,selected:EHn,settings:mHn,"setup endpoint":"设置你的后端(graphql)接口地址",sniffingTimeout:gHn,soMarkFromDae:fHn,"software options":"软件选项",step:pHn,subscription:DHn,success:xHn,tag:vHn,tcpCheckHttpMethod:CHn,tcpCheckUrl:bHn,tlsImplementation:kHn,tproxyPort:FHn,tproxyPortProtect:yHn,trace:AHn,udpCheckDns:_Hn,updatedAt:SHn,user:BHn,username:wHn,utlsImitate:LHn,value:zHn,wanInterface:MHn,warn:THn,"welcome back":"欢迎回来!","welcome to":"欢迎来到 {{ name }}","what for":"现代化控制面板"},vQ="translation",PHn={en:{[vQ]:xjn},"zh-Hans":{[vQ]:NHn}},RHn=()=>fr.use(bKe).use(YPn).init({fallbackLng:{"zh-CN":["zh-Hans"]},defaultNS:vQ,resources:PHn}),IHn=at(u=>({header:{zIndex:200,backgroundColor:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0],boxShadow:u.shadows.sm,display:"flex",alignItems:"center"},user:{color:u.colorScheme==="dark"?u.colors.dark[0]:u.black,padding:`${u.spacing.xs} ${u.spacing.sm}`,borderRadius:u.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.white},[u.fn.smallerThan("sm")]:{padding:0}},userActive:{backgroundColor:u.colorScheme==="dark"?u.colors.dark[8]:u.white},tabsList:{borderBottom:0},tab:{fontWeight:500,height:G(38),backgroundColor:"transparent","&:hover":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[5]:u.colors.gray[1]},"&[data-active]":{backgroundColor:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderColor:u.colorScheme==="dark"?u.colors.dark[7]:u.colors.gray[2]}}})),OHn=ke.object({name:ke.string().nonempty()}),jHn=()=>{const{t:u}=Ei(),e=V0(Qv),{colorScheme:t,toggleColorScheme:n}=Ekt(),{classes:i,theme:r,cx:a}=IHn(),[o,s]=C.useState(!1),[l,{toggle:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),{data:g}=wRn(),{data:f}=Y$e(),p=CRn(),D=kRn(),x=bRn(),[b,k]=C.useState(null),A=C.useRef(null),F=Da({validate:xa(OHn),initialValues:{name:""}}),S=YA(`(max-width: ${r.breakpoints.xs})`);return B.jsxs(dSe,{height:60,className:i.header,children:[B.jsx(RI,{sx:{flex:1},children:B.jsxs(zi,{position:"apart",children:[B.jsxs(zi,{spacing:"sm",children:[B.jsx(f3,{component:XY,to:"/",children:B.jsxs(zi,{spacing:"sm",children:[B.jsx(wZ,{radius:"sm",src:"/logo.webp",width:32,height:32}),B.jsx(F0,{order:S?5:2,color:r.colorScheme==="dark"?r.white:r.black,children:"daed"})]})}),!S&&B.jsx(K5,{label:e,children:B.jsx(Uz,{fz:"xs",fw:700,children:f==null?void 0:f.general.dae.version})})]}),B.jsxs(zi,{spacing:S?"xs":"md",children:[B.jsxs(La,{width:260,position:"bottom-end",transitionProps:{transition:"pop-top-right"},onClose:()=>s(!1),onOpen:()=>s(!0),children:[B.jsx(La.Target,{children:B.jsx(L4,{className:a(i.user,{[i.userActive]:o}),children:B.jsxs(zi,{spacing:7,children:[B.jsx(q4e,{src:(g==null?void 0:g.user.avatar)||"https://avatars.githubusercontent.com/u/126714249?s=200&v=4",alt:"avatar",radius:"xl",size:20}),B.jsx(_u,{weight:500,size:"sm",sx:{lineHeight:1},mr:3,children:(g==null?void 0:g.user.name)||(g==null?void 0:g.user.username)||"unknown"}),B.jsx(cPn,{size:G(12),stroke:1.5})]})})}),B.jsxs(La.Dropdown,{children:[B.jsx(La.Label,{children:u("debug")}),B.jsx(La.Item,{component:XY,target:"_blank",to:"/graphiql",children:"GraphiQL"}),B.jsx(La.Label,{children:u("settings")}),B.jsx(La.Item,{icon:B.jsx(SPn,{size:"0.9rem",stroke:1.5}),onClick:()=>{F.setValues({name:(g==null?void 0:g.user.name)||""}),E()},children:u("account settings")}),B.jsx(La.Item,{icon:B.jsx(xPn,{size:"0.9rem",stroke:1.5}),onClick:()=>{xy.set("")},children:u("actions.logout")})]})]}),S?B.jsx(X8e,{size:"sm",opened:l,onClick:c}):B.jsxs(C.Fragment,{children:[B.jsx(f3,{href:"https://github.com/daeuniverse/daed",target:"_blank",children:B.jsx(Uu,{children:B.jsx(sPn,{})})}),B.jsx(Uu,{onClick:()=>{fr.language.startsWith("zh")?fr.changeLanguage("en"):fr.changeLanguage("zh-Hans")},children:B.jsx(pPn,{})}),B.jsx(Uu,{onClick:()=>n(),children:t==="dark"?B.jsx(APn,{}):B.jsx(CPn,{})})]}),(f==null?void 0:f.general.dae.modified)&&B.jsx(K5,{label:u("actions.reload"),children:B.jsx(Uu,{loading:p.isLoading,onClick:()=>p.mutateAsync(!1),children:B.jsx(bPn,{})})}),S?B.jsx(K5,{label:u("actions.switchRunning"),children:B.jsx(tT,{size:"xs",disabled:!(f!=null&&f.general.dae.running)&&p.isLoading,checked:f==null?void 0:f.general.dae.running,onChange:w=>{p.mutateAsync(!w.target.checked)}})}):B.jsx(K5,{label:u("actions.switchRunning"),children:B.jsx(tT,{size:"md",onLabel:B.jsx(dPn,{}),offLabel:B.jsx(EPn,{}),disabled:!(f!=null&&f.general.dae.running)&&p.isLoading,checked:f==null?void 0:f.general.dae.running,onChange:w=>{p.mutateAsync(!w.target.checked)}})})]})]})}),B.jsx(T4,{opened:l,onClose:d,size:"100%",children:B.jsxs(Tc,{cols:3,children:[B.jsx(f3,{href:"https://github.com/daeuniverse/daed",target:"_blank",children:B.jsx(xl,{fullWidth:!0,children:"Github"})}),B.jsx(xl,{fullWidth:!0,onClick:()=>{fr.language.startsWith("zh")?fr.changeLanguage("en"):fr.changeLanguage("zh-Hans")},children:u("actions.switchLanguage")}),B.jsx(xl,{fullWidth:!0,onClick:()=>n(),children:u("actions.switchTheme")})]})}),B.jsx(Wi,{title:u("account settings"),opened:h,onClose:m,keepMounted:!1,children:B.jsx("form",{onSubmit:F.onSubmit(async({name:w})=>{w!==(g==null?void 0:g.user.name)&&await D.mutateAsync(w),b&&b!==(g==null?void 0:g.user.avatar)&&await x.mutateAsync(b),m()}),children:B.jsxs(ju,{children:[B.jsx(wt,{label:u("display name"),withAsterisk:!0,...F.getInputProps("name")}),B.jsx(lwe,{resetRef:A,accept:"image/png,image/jpeg",onChange:async w=>{if(w){const z=await WRn(w);k(z)}},children:w=>B.jsx(Uu,{mx:"auto",w:100,h:100,...w,children:b?B.jsx(wZ,{h:"100%",w:"100%",radius:"100%",src:b,alt:u("avatar")}):B.jsx(q4e,{h:"100%",w:"100%"})})}),B.jsx(Fs,{reset:()=>{var w;k(null),(w=A.current)==null||w.call(A)}})]})})})]})},HHn=ke.object({resources:ke.array(ke.object({id:ke.string(),link:ke.string().url().nonempty(),tag:ke.string().nonempty()})).nonempty()}),_N=({title:u,opened:e,onClose:t,handleSubmit:n})=>{const{t:i}=Ei(),r=Da({validate:xa(HHn),initialValues:{resources:[{id:i4(),link:"",tag:""}]}});return B.jsx(Wi,{title:u,opened:e,onClose:t,children:B.jsxs("form",{onSubmit:r.onSubmit(a=>n(a).then(()=>{t(),r.reset()})),children:[B.jsx(Am,{gap:20,direction:"column",children:r.values.resources.map(({id:a},o)=>B.jsxs(Am,{gap:10,children:[B.jsxs(Am,{w:"100%",align:"start",gap:10,children:[B.jsx(wt,{sx:{flex:1},withAsterisk:!0,label:i("link"),...r.getInputProps(`resources.${o}.link`)}),B.jsx(wt,{w:"6rem",withAsterisk:!0,label:i("tag"),...r.getInputProps(`resources.${o}.tag`)})]}),B.jsx(Uu,{variant:"filled",color:"red",size:"sm",mt:32,onClick:()=>{r.removeListItem("resources",o)},children:B.jsx(N$e,{})})]},a))}),B.jsxs(zi,{position:"apart",mt:20,children:[B.jsx(Uu,{variant:"filled",color:"green",onClick:()=>{r.insertListItem("resources",{id:i4(),link:"",tag:""})},children:B.jsx(xre,{})}),B.jsx(Fs,{reset:r.reset})]})]})})},VHn=ke.object({name:ke.string().nonempty(),text:ke.string().nonempty()}),r6=C.forwardRef(({title:u,opened:e,onClose:t,handleSubmit:n},i)=>{const{t:r}=Ei(),a=V0(jTe),[o,s]=C.useState(),[l,c]=C.useState(),d=Da({validate:xa(VHn),initialValues:{name:"",text:""}}),h=E=>{d.setValues(E),c(E)};return C.useImperativeHandle(i,()=>({form:d,editingID:o,setEditingID:s,initOrigins:h})),B.jsxs(Wi.Root,{opened:e,onClose:t,fullScreen:!0,children:[B.jsx(Wi.Overlay,{}),B.jsx(Wi.Content,{children:B.jsxs(Am,{h:"100%",direction:"column",children:[B.jsxs(Wi.Header,{children:[B.jsx(Wi.Title,{children:u}),B.jsx(Wi.CloseButton,{})]}),B.jsx(Wi.Body,{sx:{flex:1},children:B.jsx("form",{onSubmit:d.onSubmit(E=>n(E).then(()=>{t(),d.reset()})),children:B.jsxs(ju,{h:"100%",sx:{display:"flex",flexDirection:"column"},children:[B.jsx(wt,{label:r("name"),withAsterisk:!0,...d.getInputProps("name"),disabled:!!o}),B.jsxs(ju,{sx:{flex:1},spacing:4,children:[B.jsx(Ct,{h:"100%",sx:{overflow:"hidden",borderRadius:4},children:B.jsx(Jxe,{height:"100%",theme:a==="dark"?XGt:eUt,options:LTe,language:"routingA",value:d.values.text,onChange:E=>d.setFieldValue("text",E||"")})}),d.errors.text&&B.jsx(Ra.Error,{children:d.errors.text})]}),B.jsx(Fs,{reset:()=>{o&&l?d.setValues(l):d.reset()}})]})})})]})})]})});var $Hn=Object.defineProperty,SN=Object.getOwnPropertySymbols,kKe=Object.prototype.hasOwnProperty,FKe=Object.prototype.propertyIsEnumerable,bxe=(u,e,t)=>e in u?$Hn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,kxe=(u,e)=>{for(var t in e||(e={}))kKe.call(e,t)&&bxe(u,t,e[t]);if(SN)for(var t of SN(e))FKe.call(e,t)&&bxe(u,t,e[t]);return u},KHn=(u,e)=>{var t={};for(var n in u)kKe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&SN)for(var n of SN(u))e.indexOf(n)<0&&FKe.call(u,n)&&(t[n]=u[n]);return t};/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT @@ -1539,11 +1539,11 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}fun * @license qrcode.react * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC - */var WHn={L:Gb.QrCode.Ecc.LOW,M:Gb.QrCode.Ecc.MEDIUM,Q:Gb.QrCode.Ecc.QUARTILE,H:Gb.QrCode.Ecc.HIGH},GHn=128,UHn="L",qHn="#FFFFFF",JHn="#000000",ZHn=!1,yKe=4,YHn=.1;function QHn(u,e=0){const t=[];return u.forEach(function(n,i){let r=null;n.forEach(function(a,o){if(!a&&r!==null){t.push(`M${r+e} ${i+e}h${o-r}v1H${r+e}z`),r=null;return}if(o===n.length-1){if(!a)return;r===null?t.push(`M${o+e},${i+e} h1v1H${o+e}z`):t.push(`M${r+e},${i+e} h${o+1-r}v1H${r+e}z`);return}a&&r===null&&(r=o)})}),t.join("")}function XHn(u,e){return u.slice().map((t,n)=>n=e.y+e.h?t:t.map((i,r)=>r=e.x+e.w?i:!1))}function eVn(u,e,t,n){if(n==null)return null;const i=t?yKe:0,r=u.length+i*2,a=Math.floor(e*YHn),o=r/e,s=(n.width||a)*o,l=(n.height||a)*o,c=n.x==null?u.length/2-s/2:n.x*o,d=n.y==null?u.length/2-l/2:n.y*o;let h=null;if(n.excavate){let E=Math.floor(c),m=Math.floor(d),g=Math.ceil(s+c-E),f=Math.ceil(l+d-m);h={x:E,y:m,w:g,h:f}}return{x:c,y:d,h:l,w:s,excavation:h}}var tVn=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function uVn(u){const e=u,{value:t,size:n=GHn,level:i=UHn,bgColor:r=qHn,fgColor:a=JHn,includeMargin:o=ZHn,style:s,imageSettings:l}=e,c=KHn(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=l==null?void 0:l.src,h=C.useRef(null),E=C.useRef(null),[m,g]=C.useState(!1);C.useEffect(()=>{if(h.current!=null){const D=h.current,x=D.getContext("2d");if(!x)return;let b=Gb.QrCode.encodeText(t,WHn[i]).getModules();const k=o?yKe:0,A=b.length+k*2,F=eVn(b,n,o,l),S=E.current,w=F!=null&&S!==null&&S.complete&&S.naturalHeight!==0&&S.naturalWidth!==0;w&&F.excavation!=null&&(b=XHn(b,F.excavation));const z=window.devicePixelRatio||1;D.height=D.width=n*z;const N=n/A*z;x.scale(N,N),x.fillStyle=r,x.fillRect(0,0,A,A),x.fillStyle=a,tVn?x.fill(new Path2D(QHn(b,k))):b.forEach(function(O,y){O.forEach(function(_,L){_&&x.fillRect(L+k,y+k,1,1)})}),w&&x.drawImage(S,F.x+k,F.y+k,F.w,F.h)}}),C.useEffect(()=>{g(!1)},[d]);const f=kxe({height:n,width:n},s);let p=null;return d!=null&&(p=M.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{g(!0)},ref:E})),M.createElement(M.Fragment,null,M.createElement("canvas",kxe({style:f,height:n,width:n,ref:h},c)),p)}var KO={};function CQ(u){"@babel/helpers - typeof";return CQ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CQ(u)}Object.defineProperty(KO,"__esModule",{value:!0});KO.CopyToClipboard=void 0;var LS=AKe(C),nVn=AKe(nNe),iVn=["text","onCopy","options","children"];function AKe(u){return u&&u.__esModule?u:{default:u}}function Fxe(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(u,i).enumerable})),t.push.apply(t,n)}return t}function yxe(u){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(u,n)&&(t[n]=u[n])}return t}function aVn(u,e){if(u==null)return{};var t={},n=Object.keys(u),i,r;for(r=0;r=0)&&(t[i]=u[i]);return t}function oVn(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}function Axe(u,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function BN(u){return BN=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},BN(u)}function wre(u,e,t){return e in u?Object.defineProperty(u,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[e]=t,u}var SKe=function(u){lVn(t,u);var e=cVn(t);function t(){var n;oVn(this,t);for(var i=arguments.length,r=new Array(i),a=0;a{const[n,i]=C.useState({name:"",link:""}),[r,a]=C.useState(!1);return C.useEffect(()=>{r&&setTimeout(()=>{a(!1)},500)},[r]),C.useImperativeHandle(t,()=>({props:n,setProps:i})),B.jsx(Wi,{opened:u,onClose:e,title:n.name,keepMounted:!1,children:B.jsxs(Am,{mx:"auto",py:"md",direction:"column",align:"center",justify:"center",gap:"md",children:[B.jsx(uVn,{size:240,value:n.link}),B.jsxs(zi,{position:"apart",spacing:"xs",children:[B.jsx(Uv,{sx:{width:240,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},size:"lg",children:n.link}),B.jsx(mVn.CopyToClipboard,{text:n.link,onCopy:()=>a(!0),children:B.jsx(Uu,{children:r?B.jsx(lPn,{}):B.jsx(gPn,{})})})]})]})})}),gVn=ke.object({name:ke.string().nonempty()}),N7=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState({}),{type:a,id:o}=i,s=C.useMemo(()=>{if(a===es.config)return n("config");if(a===es.dns)return n("dns");if(a===es.routing)return n("routing")},[a,n]);C.useImperativeHandle(t,()=>({props:i,setProps:r}));const l=Da({validate:xa(gVn),initialValues:{name:""}}),c=rRn(),d=dRn(),h=sRn(),E=mRn();return B.jsx(Wi,{title:n("actions.rename"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:l.onSubmit(m=>{const{name:g}=m;!a||!o||(a===es.config&&c.mutate({id:o,name:g}),a===es.dns&&d.mutate({id:o,name:g}),a===es.routing&&h.mutate({id:o,name:g}),a===es.group&&E.mutate({id:o,name:g}),e())}),children:B.jsxs(ju,{children:[B.jsx(k0,{order:4,children:s}),B.jsxs(Tc,{cols:2,children:[B.jsx(wt,{disabled:!0,value:i.oldName}),B.jsx(wt,{...l.getInputProps("name")})]}),B.jsx(ks,{reset:l.reset})]})})})}),fVn=at(u=>({section:{border:`1px solid ${u.colorScheme==="dark"?u.colors.gray[8]:u.colors.gray[2]}`,borderRadius:u.radius.sm,padding:u.spacing.xs,boxShadow:u.shadows.md,transition:"background 300ms ease-in-out"}})),dl=({title:u,icon:e,bordered:t,iconPlus:n,onCreate:i,actions:r,highlight:a,children:o})=>{const{classes:s,theme:l,cx:c}=fVn();return B.jsxs(ju,{className:c({[s.section]:t}),bg:a?l.fn.lighten(l.fn.primaryColor(),.5):void 0,children:[B.jsxs(zi,{position:"apart",children:[B.jsxs(zi,{spacing:"xs",children:[e,B.jsx(k0,{order:4,color:l.primaryColor,children:u})]}),B.jsxs(zi,{children:[r,B.jsx(Uu,{onClick:i,children:n||B.jsx(xre,{})})]})]}),B.jsx(ju,{children:o})]})},$x=({name:u,selected:e,onSelect:t,onRemove:n,actions:i,children:r})=>{const{t:a}=Ei(),[o,{open:s,close:l}]=Un(!1);return B.jsxs(C.Fragment,{children:[B.jsx(zwe,{position:"bottom-center",size:12,disabled:!e,children:B.jsx(ym,{withBorder:!0,shadow:"sm",children:B.jsx(ym.Section,{withBorder:!0,children:B.jsxs(zi,{position:"apart",spacing:0,children:[B.jsx(L4,{p:"sm",sx:{flex:1},onClick:t,children:B.jsx(k0,{order:4,children:u})}),B.jsxs(zi,{spacing:"sm",p:"sm",children:[i,B.jsx(Uu,{size:"xs",onClick:s,children:B.jsx(Dre,{})}),!e&&n&&B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:a("actions.remove"),labels:{cancel:a("confirmModal.cancel"),confirm:a("confirmModal.confirm")},children:a("confirmModal.removeConfirmDescription"),onConfirm:n})},children:B.jsx(vre,{})})]})]})})})}),B.jsx(Wi,{title:u,opened:o,onClose:l,children:r})]})};var pVn=Object.create,wKe=Object.defineProperty,DVn=Object.getOwnPropertyDescriptor,xVn=Object.getOwnPropertyNames,vVn=Object.getPrototypeOf,CVn=Object.prototype.hasOwnProperty,bVn=(u,e)=>()=>(u&&(e=u(u=0)),e),Lre=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),kVn=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xVn(e))!CVn.call(u,i)&&i!==t&&wKe(u,i,{get:()=>e[i],enumerable:!(n=DVn(e,i))||n.enumerable});return u},FVn=(u,e,t)=>(t=u!=null?pVn(vVn(u)):{},kVn(e||!u||!u.__esModule?wKe(t,"default",{value:u,enumerable:!0}):t,u)),Yt=bVn(()=>{}),yVn=Lre((u,e)=>{Yt();var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t}),AVn=Lre((u,e)=>{Yt();var t=yVn();function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function r(s,l,c,d,h,E){if(E!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:n};return o.PropTypes=o,o}}),_Vn=Lre((u,e)=>{Yt(),e.exports=AVn()()});Yt();Yt();Yt();Yt();Yt();Yt();var nf=FVn(_Vn());Yt();var SVn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},BVn=Object.defineProperty,wVn=Object.defineProperties,LVn=Object.getOwnPropertyDescriptors,wN=Object.getOwnPropertySymbols,LKe=Object.prototype.hasOwnProperty,zKe=Object.prototype.propertyIsEnumerable,_xe=(u,e,t)=>e in u?BVn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Sxe=(u,e)=>{for(var t in e||(e={}))LKe.call(e,t)&&_xe(u,t,e[t]);if(wN)for(var t of wN(e))zKe.call(e,t)&&_xe(u,t,e[t]);return u},zVn=(u,e)=>wVn(u,LVn(e)),MVn=(u,e)=>{var t={};for(var n in u)LKe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wN)for(var n of wN(u))e.indexOf(n)<0&&zKe.call(u,n)&&(t[n]=u[n]);return t},WO=(u,e,t)=>{let n=C.forwardRef((i,r)=>{var a=i,{color:o="currentColor",size:s=24,stroke:l=2,children:c}=a,d=MVn(a,["color","size","stroke","children"]);return C.createElement("svg",Sxe(zVn(Sxe({ref:r},SVn),{width:s,height:s,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${u}`}),d),[...t.map(([h,E])=>C.createElement(h,E)),...c||[]])});return n.propTypes={color:nf.default.string,size:nf.default.oneOfType([nf.default.string,nf.default.number]),stroke:nf.default.oneOfType([nf.default.string,nf.default.number])},n.displayName=`${e}`,n};Yt();var TVn=WO("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);Yt();var NVn=WO("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);Yt();WO("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);Yt();var PVn=WO("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);Yt();Yt();Yt();Yt();function RVn(u,e){let t=()=>{e(u.map(i=>i.matches))},n=u.map(i=>{try{return i.addEventListener("change",t),()=>i.removeEventListener("change",t)}catch{return i.addListener(t),()=>i.removeListener(t)}});return()=>{n.forEach(i=>i())}}function IVn(u,e){return e||(typeof window<"u"&&"matchMedia"in window?u.map(t=>window.matchMedia(t).matches):u.map(()=>!1))}function OVn(u,e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[n,i]=C.useState(t?e:IVn(u,e)),r=C.useRef();return C.useEffect(()=>{if("matchMedia"in window)return r.current=u.map(a=>window.matchMedia(a)),i(r.current.map(a=>a.matches)),RVn(r.current,a=>{i(a)})},[u]),n}function MKe(u){let e=jr(),t=typeof u=="function"?u(e):u;return YA(t||"",!0)}function jVn(u){let e=jr(),t=C.useMemo(()=>u.map(i=>(typeof i=="function"?i(e):i)??""),[u,e]),n=C.useMemo(()=>u.map(()=>!0),[u]);return OVn(t,n)}function TKe(u){let e=u.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}var HVn=at({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function VVn({className:u,sx:e,style:t,visibleMediaQuery:n,title:i,noWrap:r,ellipsis:a,textAlignment:o,width:s}){let{cx:l,classes:c}=HVn();return MKe(n)?B.jsx(Ct,{component:"th",className:l({[c.noWrap]:r||a,[c.ellipsis]:a},u),sx:[{"&&":{textAlign:o},width:s,minWidth:s,maxWidth:s},e],style:t,children:i}):null}Yt();var $Vn=at(u=>{let e=u.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-t_e(u.spacing.sm),bottom:0,borderLeft:`1px solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,width:u.spacing.sm,background:`linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)}), linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},shadowVisible:{"&::after":{opacity:1}}}});function KVn({shadowVisible:u}){let{cx:e,classes:t}=$Vn();return B.jsx("th",{className:e(t.root,{[t.shadowVisible]:u})})}var WVn=at((u,{scrollDiff:e,borderColor:t})=>{let n=e<0,i=typeof t=="function"?t(u):t;return{root:{zIndex:2,position:n?"relative":"sticky",bottom:n?e:-1,background:u.colorScheme==="dark"?u.colors.dark[7]:u.white,"&& tr th":{borderTopColor:i}},relative:{position:"relative"},textSelectionDisabled:{userSelect:"none"}}});C.forwardRef(function({className:u,style:e,borderColor:t,columns:n,defaultColumnProps:i,selectionVisible:r,leftShadowVisible:a,scrollDiff:o},s){let{cx:l,classes:c}=WVn({scrollDiff:o,borderColor:t});return B.jsx(Ct,{component:"tfoot",ref:s,className:l(c.root,u),style:e,children:B.jsxs("tr",{children:[r&&B.jsx(KVn,{shadowVisible:a}),n.map(({hidden:d,...h})=>{if(d)return null;let{accessor:E,visibleMediaQuery:m,textAlignment:g,width:f,footer:p,footerClassName:D,footerStyle:x,footerSx:b,noWrap:k,ellipsis:A}={...i,...h};return B.jsx(VVn,{className:D,style:x,sx:b,visibleMediaQuery:m,textAlignment:g,width:f,title:p,noWrap:k,ellipsis:A},E)})]})})});Yt();Yt();function GVn({group:{id:u,columns:e,title:t,className:n,style:i,sx:r}}){let a=C.useMemo(()=>e.map(({visibleMediaQuery:l})=>l),[e]),o=jVn(a),s=C.useMemo(()=>e.filter(({hidden:l},c)=>!l&&(o==null?void 0:o[c])).length,[e,o]);return s>0?B.jsx(Ct,{component:"th",colSpan:s,className:n,sx:r,style:i,children:t??TKe(u)}):null}Yt();Yt();function UVn({children:u,isActive:e}){let[t,{close:n,toggle:i}]=Un(!1);return B.jsxs(hs,{withArrow:!0,withinPortal:!0,shadow:"md",opened:t,onClose:n,trapFocus:!0,children:[B.jsx(hs.Target,{children:B.jsx(Uu,{onClick:r=>{r.preventDefault(),i()},variant:e?"default":"subtle",children:B.jsx(PVn,{size:14})})}),B.jsx(hs.Dropdown,{onClick:r=>r.preventDefault(),children:typeof u=="function"?u({close:n}):u})]})}var qVn=at(u=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover:not(:has(button:hover))":{background:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderUnsortedIcon:{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5],transition:"color .15s ease","th:hover &":{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]}}}));function JVn({className:u,sx:e,style:t,accessor:n,visibleMediaQuery:i,title:r,sortable:a,sortIcons:o,textAlignment:s,width:l,sortStatus:c,onSortStatusChange:d,filter:h,filtering:E}){let{cx:m,classes:g}=qVn();if(!MKe(i))return null;let f=r??TKe(n),p=typeof f=="string"?f:void 0,D=a&&d?x=>{x!=null&&x.defaultPrevented||d({columnAccessor:n,direction:(c==null?void 0:c.columnAccessor)===n?c.direction==="asc"?"desc":"asc":(c==null?void 0:c.direction)??"asc"})}:void 0;return B.jsx(Ct,{component:"th",className:m({[g.sortableColumnHeader]:a},u),sx:[{"&&":{textAlign:s},width:l,minWidth:l,maxWidth:l},e],style:t,role:a?"button":void 0,tabIndex:a?0:void 0,onClick:D,onKeyDown:x=>x.key==="Enter"&&(D==null?void 0:D()),children:B.jsxs(zi,{className:g.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[B.jsx(Ct,{className:m(g.columnHeaderText,g.sortableColumnHeaderText),title:p,children:f}),a||(c==null?void 0:c.columnAccessor)===n?B.jsx(B.Fragment,{children:(c==null?void 0:c.columnAccessor)===n?B.jsx(jz,{className:m(g.sortableColumnHeaderIcon,{[g.sortableColumnHeaderIconRotated]:c.direction==="desc"}),role:"img","aria-label":`Sorted ${c.direction==="desc"?"descending":"ascending"}`,children:(o==null?void 0:o.sorted)||B.jsx(TVn,{size:14})}):B.jsx(jz,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:(o==null?void 0:o.unsorted)||B.jsx(NVn,{size:14})})}):null,h?B.jsx(UVn,{isActive:!!E,children:h}):null]})})}Yt();var ZVn=at(u=>{let e=u.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-t_e(u.spacing.sm),bottom:0,borderLeft:`1px solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,width:u.spacing.sm,background:`linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)}), linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},shadowVisible:{"&::after":{opacity:1}},checkboxInput:{cursor:"pointer"}}});function YVn({shadowVisible:u,checked:e,indeterminate:t,checkboxProps:n,onChange:i,rowSpan:r}){let{cx:a,classes:o}=ZVn();return B.jsx("th",{className:a(o.root,{[o.shadowVisible]:u}),rowSpan:r,children:B.jsx(b0,{classNames:{input:o.checkboxInput},checked:e,indeterminate:t,disabled:!i,onChange:i,...n})})}var QVn=at(u=>({root:{zIndex:2,position:"sticky",top:0,background:u.colorScheme==="dark"?u.colors.dark[7]:u.white},textSelectionDisabled:{userSelect:"none"}}));C.forwardRef(function({className:u,style:e,sortStatus:t,sortIcons:n,onSortStatusChange:i,columns:r,defaultColumnProps:a,groups:o,selectionVisible:s,selectionChecked:l,selectionIndeterminate:c,onSelectionChange:d,selectionCheckboxProps:h,leftShadowVisible:E},m){let{classes:g,cx:f}=QVn(),p=s?B.jsx(YVn,{shadowVisible:E,checked:l,indeterminate:c,checkboxProps:h,onChange:d,rowSpan:o?2:void 0}):null;return B.jsxs("thead",{className:f(g.root,u),style:e,ref:m,children:[o&&B.jsxs("tr",{children:[p,o.map(D=>B.jsx(GVn,{group:D},D.id))]}),B.jsxs("tr",{children:[!o&&p,r.map(({hidden:D,...x})=>{if(D)return null;let{accessor:b,visibleMediaQuery:k,textAlignment:A,width:F,title:S,sortable:w,titleClassName:z,titleStyle:N,titleSx:O,filter:y,filtering:_}={...a,...x};return B.jsx(JVn,{accessor:b,className:z,style:N,sx:O,visibleMediaQuery:k,textAlignment:A,width:F,title:S,sortable:w,sortStatus:t,sortIcons:n,onSortStatusChange:i,filter:y,filtering:_},b)})]})]})});Yt();Yt();Yt();var Bxe={xs:22,sm:26,md:32,lg:38,xl:44};function XVn({size:u,label:e,values:t,value:n,onChange:i,color:r}){return B.jsxs(zi,{spacing:"xs",children:[B.jsx(_u,{size:u,children:e}),B.jsxs(La,{withinPortal:!0,withArrow:!0,children:[B.jsx(La.Target,{children:B.jsx(xl,{size:u,variant:"default",sx:[{fontWeight:"normal"},a=>({height:Bxe[u],paddingLeft:a.spacing[u],paddingRight:a.spacing[u]})],children:n})}),B.jsx(La.Dropdown,{children:t.map(a=>{let o=a===n;return B.jsx(La.Item,{sx:[{height:Bxe[u]},s=>({"&&":{color:o?s.white:void 0},background:o?s.colors[r||s.primaryColor][6]:void 0})],disabled:o,onClick:()=>i(a),children:B.jsx(_u,{size:u,children:a})},a)})})]})]})}var e$n=at((u,{topBorderColor:e,paginationWrapBreakpoint:t})=>({root:{background:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderTop:`1px solid ${typeof e=="function"?e(u):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:u.spacing.xs,[u.fn.largerThan(t)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}}));C.forwardRef(function({className:u,style:e,topBorderColor:t,fetching:n,page:i,onPageChange:r,paginationColor:a,paginationSize:o,loadingText:s,noRecordsText:l,paginationText:c,totalRecords:d,recordsPerPage:h,onRecordsPerPageChange:E,recordsPerPageLabel:m,recordsPerPageOptions:g,recordsLength:f,horizontalSpacing:p,paginationWrapBreakpoint:D,getPaginationControlProps:x},b){let k;if(n)k=s;else if(!d)k=l;else{let S=(i-1)*h+1,w=S+f-1;k=c({from:S,to:w,totalRecords:d})}let{classes:A,cx:F}=e$n({topBorderColor:t,paginationWrapBreakpoint:D});return B.jsxs(Ct,{ref:b,px:p??"xs",py:"xs",className:F(A.root,u),style:e,children:[B.jsx(_u,{className:A.text,size:o,children:k}),g&&B.jsx(XVn,{size:o,label:m,values:g,color:a,value:h,onChange:E}),B.jsx(J1,{color:a,className:F(A.pagination,{[A.paginationFetching]:n||!f}),value:i,onChange:r,size:o,total:Math.ceil(d/h),getControlProps:x})]})});Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();const t$n=({id:u,loading:e})=>{const t=Z$e();return B.jsx(Uu,{loading:e||t.isLoading,size:"xs",onClick:()=>t.mutate([u]),children:B.jsx(kPn,{})})},u$n=()=>{var Se,de;const{t:u}=Ei(),e=jr(),[t,n]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),global:{tproxyPort:Rt.internet.port(),logLevel:Rt.helpers.enumValue($ne),tcpCheckUrl:Rt.helpers.multiple(()=>Rt.internet.url(),{count:{min:1,max:4}}),udpCheckDns:Rt.helpers.multiple(()=>Rt.internet.url(),{count:{min:1,max:4}}),checkInterval:Rt.number.int(),checkTolerence:Rt.number.int(),sniffingTimeout:Rt.number.int(),lanInterface:Rt.helpers.multiple(()=>Rt.system.networkInterface(),{count:{min:1,max:4}}),wanInterface:Rt.helpers.multiple(()=>Rt.system.networkInterface(),{count:{min:1,max:4}}),allowInsecure:Rt.datatype.boolean(),dialMode:Rt.helpers.enumValue(hc),disableWaitingNetwork:Rt.datatype.boolean(),autoConfigKernelParameter:Rt.datatype.boolean()}}),{count:2})),[i,r]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),dns:Rt.lorem.paragraph()}),{count:2})),[a,o]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),routing:{string:Rt.lorem.paragraph(),rules:[]},referenceGroups:[]}),{count:2})),[s,l]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),nodes:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word()}),{count:Rt.number.int({min:5,max:10})}),subscriptions:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word()}),{count:5}),policy:Rt.helpers.enumValue(al)}),{count:2})),[c,d]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),protocol:Rt.helpers.arrayElement(["vmess","vless","shadowsocks","trojan","hysteria","socks5","direct","http"]),tag:Rt.lorem.word(),link:Rt.internet.url()}),{count:3})),[h,E]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),tag:Rt.lorem.word(),link:Rt.internet.url(),updatedAt:MN(Rt.date.recent()).format("YYYY-MM-DD HH:mm:ss"),nodes:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),protocol:Rt.helpers.arrayElement(["vmess","vless","shadowsocks","trojan","hysteria","socks5","direct","http"]),tag:Rt.lorem.word(),link:Rt.internet.url()}),{count:{min:5,max:10}})}),{count:2})),[m,g]=C.useState([]),[f,p]=C.useState(null),[D,{open:x,close:b}]=Un(!1),[k,{open:A,close:F}]=Un(!1),[S,{open:w,close:z}]=Un(!1),[N,{open:O,close:y}]=Un(!1),[_,{open:L,close:T}]=Un(!1),[R,{open:I,close:H}]=Un(!1),[V,{open:U,close:J}]=Un(!1),[Y,{open:X,close:re}]=Un(!1),ge=Fre(),_e=kre(),Ve=yre(),Ue=J$e(),qe=C.useRef(null);return B.jsxs(ju,{children:[B.jsx(EGe,{height:500,defaultValue:"hello world",theme:"vs-dark",options:LTe}),B.jsxs(Tc,{cols:3,children:[B.jsx(dl,{title:u("config"),onCreate:A,children:B.jsx(ju,{children:t.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:es.config,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>n(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Ig,{language:"json",children:JSON.stringify(he,null,2)})},he.id))})}),B.jsx(dl,{title:u("dns"),onCreate:w,children:B.jsx(ju,{children:i.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:es.dns,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>r(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Uz,{block:!0,children:he.dns})},he.id))})}),B.jsx(dl,{title:u("routing"),onCreate:O,children:B.jsx(ju,{children:a.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:es.routing,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>o(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Uz,{children:he.routing.string})},he.id))})})]}),B.jsx(lz,{}),B.jsx(k0,{id:"resource",order:3,children:B.jsx(f3,{href:"#resource",children:u("resource")})}),B.jsx(Tc,{cols:3,children:B.jsxs(iB,{modifiers:[zju],onDragStart:he=>{p({id:he.active.id,type:he.active.data.current.type})},onDragEnd:he=>{const{active:Be,over:je}=he;if((f==null?void 0:f.type)===Xi.node){const bt=c.find(qt=>qt.id===Be.id);if(bt){const qt=rb(s,ou=>{const Vt=ou.find(oe=>oe.id===(je==null?void 0:je.id));Vt!=null&&Vt.nodes.find(oe=>oe.id===Be.id)||Vt==null||Vt.nodes.push(bt)});l(qt)}}if((f==null?void 0:f.type)===Xi.subscription){const bt=h.find(qt=>qt.id===Be.id);if(bt){const qt=rb(s,ou=>{const Vt=ou.find(oe=>oe.id===(je==null?void 0:je.id));Vt!=null&&Vt.subscriptions.find(oe=>oe.id===Be.id)||Vt==null||Vt.subscriptions.push(bt)});l(qt)}}p(null)},children:[B.jsx(dl,{title:u("group"),onCreate:L,bordered:!0,children:B.jsx(ju,{children:s.map(({id:he,name:Be,policy:je,nodes:bt,subscriptions:qt})=>B.jsxs(DKe,{id:he,name:Be,onRemove:()=>{l(ou=>ou.filter(Vt=>Vt.id!==he))},children:[B.jsx(_u,{fw:600,children:je}),B.jsx(qv,{h:10}),B.jsxs(nn,{variant:"filled",value:m,onChange:g,multiple:!0,children:[B.jsxs(nn.Item,{value:"node",children:[B.jsx(nn.Control,{fz:"xs",px:"xs",children:u("node")}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:B.jsx(iB,{modifiers:[D5e],collisionDetection:COu,onDragEnd:({active:ou,over:Vt})=>{if(ou&&Vt&&ou.id!==Vt.id){const oe=rb(s,se=>{const ie=se.find($=>$.id===he);if(ie){const $=ie==null?void 0:ie.nodes.findIndex(ue=>ue.id===ou.id),Z=ie==null?void 0:ie.nodes.findIndex(ue=>ue.id===Vt.id);ie.nodes=FOe(ie.nodes,$,Z)}});l(oe)}},children:B.jsx(v5e,{items:bt,strategy:x5e,children:bt.map(({id:ou,name:Vt})=>B.jsx(qy,{type:Xi.node,id:ou,name:Vt,onRemove:()=>{const oe=rb(s,se=>{const ie=se.find($=>$.id===he);ie&&(ie.nodes=ie.nodes.filter($=>$.id!==ou))});l(oe)}},ou))})})})})]}),B.jsxs(nn.Item,{value:"subscription",children:[B.jsx(nn.Control,{fz:"xs",px:"xs",children:u("subscription")}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:B.jsx(iB,{modifiers:[D5e],children:B.jsx(v5e,{items:qt,strategy:x5e,children:qt.map(({id:ou,name:Vt})=>B.jsx(qy,{type:Xi.subscription,id:ou,name:Vt,onRemove:()=>{const oe=rb(s,se=>{const ie=se.find($=>$.id===he);ie&&(ie.subscriptions=ie.subscriptions.filter($=>$.id!==ou))});l(oe)}},ou))})})})})]})]})]},he))})}),B.jsx(dl,{title:u("node"),onCreate:U,actions:B.jsx(Uu,{onClick:I,children:B.jsx(T$e,{})}),bordered:!0,children:B.jsx(ju,{children:c.map(({id:he,name:Be,tag:je,protocol:bt,link:qt})=>B.jsxs(CN,{id:he,type:Xi.node,name:Be,onRemove:()=>{d(ou=>ou.filter(Vt=>Vt.id!==he))},children:[B.jsx(_u,{fw:600,color:e.primaryColor,children:je}),B.jsx(_u,{fw:600,children:bt}),B.jsxs(Ah,{children:[B.jsx(Ah.Target,{children:B.jsx(_u,{truncate:!0,children:qt})}),B.jsx(Ah.Dropdown,{children:B.jsx(_u,{children:qt})})]})]},he))})}),B.jsx(dl,{title:u("subscription"),onCreate:X,bordered:!0,children:B.jsx(ju,{children:h.map(({id:he,name:Be,tag:je,link:bt,updatedAt:qt,nodes:ou})=>B.jsxs(CN,{id:he,type:Xi.subscription,name:Be,onRemove:()=>{E(Vt=>Vt.filter(oe=>oe.id!==he))},children:[B.jsx(_u,{fw:600,color:e.primaryColor,children:je}),B.jsx(_u,{fw:600,children:qt}),B.jsxs(Ah,{children:[B.jsx(Ah.Target,{children:B.jsx(_u,{truncate:!0,children:bt})}),B.jsx(Ah.Dropdown,{children:B.jsx(_u,{children:bt})})]}),B.jsx(qv,{h:10}),B.jsx(zi,{spacing:"sm",children:ou.map(({id:Vt,name:oe})=>B.jsx(Uv,{children:oe},Vt))})]},he))})}),B.jsx(bOe,{dropAnimation:null,children:f?B.jsx(Uv,{children:(f==null?void 0:f.type)===Xi.node?(Se=c.find(he=>he.id===f.id))==null?void 0:Se.name:(de=h.find(he=>he.id===f.id))==null?void 0:de.name}):null})]})}),B.jsx(fQ,{opened:k,onClose:F}),B.jsx(r6,{title:u("dns"),opened:S,onClose:z,handleSubmit:async he=>{await ge.mutateAsync({name:he.name,dns:he.text})}}),B.jsx(r6,{title:u("routing"),opened:N,onClose:y,handleSubmit:async he=>{await _e.mutateAsync({name:he.name,routing:he.text})}}),B.jsx(xQ,{opened:_,onClose:T}),B.jsx(_N,{title:u("node"),opened:R,onClose:H,handleSubmit:async he=>{await Ve.mutateAsync(he.resources.map(({link:Be,tag:je})=>({link:Be,tag:je}))),H()}}),B.jsx(_N,{title:u("subscription"),opened:Y,onClose:re,handleSubmit:async he=>{await Ue.mutateAsync(he.resources.map(({link:Be,tag:je})=>({link:Be,tag:je}))),H()}}),B.jsx(N7,{ref:qe,opened:D,onClose:b}),B.jsx(pKe,{opened:V,onClose:J})]})},n$n=()=>{const u=K$e(),e=W$e(),t=kre(),n=G$e(),i=Fre(),r=U$e(),a=q$e(),o=uRn(),s=Mu(),l=ARn(s),c=FRn(s),d=yRn(s);return C.useCallback(async()=>{const h=(await l()).general.interfaces.filter(({flag:D})=>!!D.default).map(({name:D})=>D),{defaultConfigID:E,defaultRoutingID:m,defaultDNSID:g,defaultGroupID:f}=await d();if(!E){const{createConfig:{id:D}}=await u.mutateAsync({name:IGt,global:HGt(h)});await e.mutateAsync({id:D}),await o.mutateAsync({defaultConfigID:D})}if(!m){const{createRouting:{id:D}}=await t.mutateAsync({name:jGt,routing:VGt});await n.mutateAsync({id:D}),await o.mutateAsync({defaultRoutingID:D})}if(!g){const{createDns:{id:D}}=await i.mutateAsync({name:OGt,dns:$Gt});await r.mutateAsync({id:D}),await o.mutateAsync({defaultDNSID:D})}if(!f){const{createGroup:{id:D}}=await a.mutateAsync({name:BTe,policy:wTe,policyParams:[]});await o.mutateAsync({defaultGroupID:D})}const p=await c();p?Lfe.set(p):(await o.mutateAsync({mode:ZZ.simple}),Lfe.set(ZZ.simple));{const{defaultConfigID:D,defaultDNSID:x,defaultGroupID:b,defaultRoutingID:k}=await d();h7.set({defaultConfigID:D,defaultDNSID:x,defaultGroupID:b,defaultRoutingID:k})}},[u,i,a,t,d,l,c,e,r,n,o])},i$n=()=>{const u=YIe(),e=H0(xy),t=H0(Qv),n=n$n();return C.useEffect(()=>{n()},[]),C.useEffect(()=>{(!t||!e)&&u("/setup")},[t,u,e]),B.jsx(fSe,{header:B.jsx(jHn,{}),footer:B.jsx(hSe,{height:50,children:B.jsx(jz,{h:"100%",children:B.jsxs(_u,{fw:"lighter",fz:"xs",color:"dimmed",children:["Made with passion 🔥 by"," ",B.jsx(f3,{href:"https://github.com/daeuniverse",target:"_blank",children:"@daeuniverse"})]})})}),children:B.jsx(RI,{size:"lg",p:"sm",children:B.jsx($Iu,{})})})},r$n=()=>{const{t:u}=Ei(),{defaultConfigID:e}=H0(h7),{data:t}=_Rn(),n=W$e(),i=iRn(),r=C.useRef(null),[a,{open:o,close:s}]=Un(!1),l=C.useRef(null),[c,{open:d,close:h}]=Un(!1),[E,{open:m,close:g}]=Un(!1);return B.jsxs(dl,{title:u("config"),icon:B.jsx(yPn,{}),onCreate:d,bordered:!0,children:[t==null?void 0:t.configs.map(f=>B.jsx($x,{name:f.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{l.current&&l.current.setProps({id:f.id,type:es.config,oldName:f.name}),o()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var S,w;(S=r.current)==null||S.setEditingID(f.id);const{checkInterval:p,checkTolerance:D,sniffingTimeout:x,logLevel:b,...k}=f.global,F=hTe(u).findIndex(([,z])=>z===b);(w=r.current)==null||w.initOrigins({name:f.name,logLevelNumber:F,checkIntervalSeconds:nK(p,"s"),checkToleranceMS:nK(D,"ms"),sniffingTimeoutMS:nK(x,"ms"),...k}),m()},children:B.jsx(RO,{})})]}),selected:f.selected,onSelect:()=>n.mutate({id:f.id}),onRemove:f.id!==e?()=>i.mutate(f.id):void 0,children:B.jsx(Ig,{language:"json",children:JSON.stringify(f,null,2)})},f.id)),B.jsx(fQ,{opened:c,onClose:h}),B.jsx(fQ,{ref:r,opened:E,onClose:g}),B.jsx(N7,{ref:l,opened:a,onClose:s})]})},a$n=()=>{const{t:u}=Ei(),{defaultDNSID:e}=H0(h7),{data:t}=BRn(),n=U$e(),i=cRn(),r=Fre(),a=C.useRef(null),o=lRn(),s=C.useRef(null),[l,{open:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),[g,{open:f,close:p}]=Un(!1);return B.jsxs(dl,{title:u("dns"),icon:B.jsx(FPn,{}),onCreate:E,bordered:!0,children:[t==null?void 0:t.dnss.map(D=>B.jsx($x,{name:D.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{s.current&&s.current.setProps({id:D.id,type:es.dns,oldName:D.name}),c()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var x,b;(x=a.current)==null||x.setEditingID(D.id),(b=a.current)==null||b.initOrigins({name:D.name,text:D.dns.string}),f()},children:B.jsx(RO,{})})]}),selected:D.selected,onSelect:()=>n.mutate({id:D.id}),onRemove:D.id!==e?()=>i.mutate(D.id):void 0,children:B.jsx(Ig,{language:"bash",children:D.dns.string})},D.id)),B.jsx(r6,{title:u("dns"),opened:h,onClose:m,handleSubmit:async D=>{await r.mutateAsync({name:D.name,dns:D.text})}}),B.jsx(r6,{ref:a,title:u("dns"),opened:g,onClose:p,handleSubmit:async D=>{a.current&&await o.mutateAsync({id:a.current.editingID,dns:D.text})}}),B.jsx(N7,{ref:s,opened:l,onClose:d})]})},o$n=({highlight:u})=>{const{t:e}=Ei(),{data:t}=X$e(),{defaultGroupID:n}=H0(h7),[i,{open:r,close:a}]=Un(!1),[o,{open:s,close:l}]=Un(!1),[c,{open:d,close:h}]=Un(!1),E=hRn(),m=fRn(),g=DRn(),[f,p]=C.useState([]),D=C.useRef(null),x=C.useRef(null),{data:b}=Are();return B.jsxs(dl,{title:e("group"),icon:B.jsx(_Pn,{}),onCreate:s,highlight:u,bordered:!0,children:[t==null?void 0:t.groups.map(({id:k,name:A,policy:F,nodes:S,subscriptions:w})=>B.jsxs(DKe,{id:k,name:A,onRemove:n!==k?()=>E.mutate(k):void 0,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{D.current&&D.current.setProps({id:k,type:es.group,oldName:A}),r()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var z,N;(z=x.current)==null||z.setEditingID(k),(N=x.current)==null||N.initOrigins({name:A,policy:F}),d()},children:B.jsx(RO,{})})]}),children:[B.jsx(_u,{fz:"sm",fw:600,children:F}),B.jsx(qv,{h:10}),B.jsxs(nn,{variant:"filled",value:f,onChange:p,multiple:!0,children:[S.length>0&&B.jsxs(nn.Item,{value:"node",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[e("node")," (",S.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:S.map(({id:z,tag:N,name:O,subscriptionID:y})=>{var _;return B.jsx(qy,{id:`${k}-${z}`,nodeID:z,groupID:k,type:Xi.groupNode,name:N||O,onRemove:()=>m.mutate({id:k,nodeIDs:[z]}),children:y&&((_=b==null?void 0:b.subscriptions.find(L=>L.id===y))==null?void 0:_.tag)},z)})})})]}),w.length>0&&B.jsxs(nn.Item,{value:"subscription",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[e("subscription")," (",w.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:w.map(({id:z,tag:N,link:O})=>B.jsx(qy,{id:`${k}-${z}`,groupID:k,subscriptionID:z,type:Xi.groupSubscription,name:N||O,onRemove:()=>g.mutate({id:k,subscriptionIDs:[z]})},z))})})]})]})]},k)),B.jsx(xQ,{opened:o,onClose:l}),B.jsx(xQ,{ref:x,opened:c,onClose:h}),B.jsx(N7,{ref:D,opened:i,onClose:a})]})},s$n=()=>{const{t:u}=Ei(),e=jr(),[t,{open:n,close:i}]=Un(!1),[r,{open:a,close:o}]=Un(!1),[s,{open:l,close:c}]=Un(!1),d=C.useRef(null),{data:h}=Q$e(),E=xRn(),m=yre();return B.jsxs(dl,{title:u("node"),icon:B.jsx(mPn,{}),iconPlus:B.jsx(M$e,{}),onCreate:a,actions:B.jsx(Uu,{onClick:l,children:B.jsx(T$e,{})}),bordered:!0,children:[h==null?void 0:h.nodes.edges.map(({id:g,name:f,tag:p,protocol:D,link:x})=>B.jsxs(CN,{id:`node-${g}`,nodeID:g,type:Xi.node,name:p,leftSection:B.jsx(_u,{fz:"xs",fw:600,children:D}),actions:B.jsx(Uu,{size:"xs",onClick:()=>{var b;(b=d.current)==null||b.setProps({name:f||p,link:x}),n()},children:B.jsx(Dre,{})}),onRemove:()=>E.mutate([g]),children:[B.jsx(_u,{fw:600,color:e.primaryColor,sx:{wordBreak:"break-all"},children:f}),B.jsx(kne,{maxHeight:0,showLabel:B.jsx(_u,{fz:"xs",children:u("actions.show content")}),hideLabel:B.jsx(_u,{fz:"xs",children:u("actions.hide")}),children:B.jsx(_u,{fz:"sm",style:{wordBreak:"break-all"},children:x})})]},g)),B.jsx(BKe,{ref:d,opened:t,onClose:i}),B.jsx(_N,{title:u("node"),opened:r,onClose:o,handleSubmit:async g=>{await m.mutateAsync(g.resources.map(({link:f,tag:p})=>({link:f,tag:p})))}}),B.jsx(pKe,{opened:s,onClose:c})]})},l$n=()=>{const{t:u}=Ei(),{defaultRoutingID:e}=H0(h7),{data:t}=SRn(),n=G$e(),i=oRn(),r=kre(),a=C.useRef(null),o=aRn(),s=C.useRef(null),[l,{open:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),[g,{open:f,close:p}]=Un(!1);return B.jsxs(dl,{title:u("routing"),icon:B.jsx(vPn,{}),onCreate:E,bordered:!0,children:[t==null?void 0:t.routings.map(D=>B.jsx($x,{name:D.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{s.current&&s.current.setProps({id:D.id,type:es.routing,oldName:D.name}),c()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var x,b;(x=a.current)==null||x.setEditingID(D.id),(b=a.current)==null||b.initOrigins({name:D.name,text:D.routing.string}),f()},children:B.jsx(RO,{})})]}),selected:D.selected,onSelect:()=>n.mutate({id:D.id}),onRemove:D.id!==e?()=>i.mutate(D.id):void 0,children:B.jsx(Ig,{language:"bash",children:D.routing.string})},D.id)),B.jsx(r6,{title:u("routing"),opened:h,onClose:m,handleSubmit:async D=>{await r.mutateAsync({name:D.name,routing:D.text})}}),B.jsx(r6,{ref:a,title:u("routing"),opened:g,onClose:p,handleSubmit:async D=>{a.current&&await o.mutateAsync({id:a.current.editingID,routing:D.text})}}),B.jsx(N7,{ref:s,opened:l,onClose:d})]})},c$n=()=>{const{t:u}=Ei(),[e,{open:t,close:n}]=Un(!1),[i,{open:r,close:a}]=Un(!1),o=C.useRef(null),{data:s}=Are(),l=vRn(),c=J$e(),d=Z$e();return B.jsxs(dl,{title:u("subscription"),icon:B.jsx(hPn,{}),iconPlus:B.jsx(M$e,{}),onCreate:r,bordered:!0,actions:(s==null?void 0:s.subscriptions)&&s.subscriptions.length>2&&B.jsx(Uu,{onClick:()=>{d.mutate((s==null?void 0:s.subscriptions.map(({id:h})=>h))||[])},loading:d.isLoading,children:B.jsx(fPn,{})}),children:[s==null?void 0:s.subscriptions.map(({id:h,tag:E,link:m,updatedAt:g,nodes:f})=>B.jsxs(CN,{id:`subscription-${h}`,subscriptionID:h,type:Xi.subscription,name:E||m,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{var p;(p=o.current)==null||p.setProps({name:E,link:m}),t()},children:B.jsx(Dre,{})}),B.jsx(t$n,{id:h,loading:d.isLoading})]}),onRemove:()=>l.mutate([h]),children:[B.jsx(_u,{fw:600,children:MN(g).format("YYYY-MM-DD HH:mm:ss")}),B.jsx(kne,{maxHeight:0,showLabel:B.jsx(_u,{fz:"xs",children:u("actions.show content")}),hideLabel:B.jsx(_u,{fz:"xs",children:u("actions.hide")}),children:B.jsx(_u,{fz:"sm",style:{wordBreak:"break-all"},children:m})}),B.jsx(nn,{variant:"filled",children:B.jsxs(nn.Item,{value:"node",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[u("node")," (",f.edges.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(zi,{spacing:"sm",children:f.edges.map(({id:p,name:D})=>B.jsx(qy,{name:D,id:`subscription-node-${p}`,nodeID:p,type:Xi.subscription_node,subscriptionID:h,children:D},p))})})]})})]},h)),B.jsx(BKe,{ref:o,opened:e,onClose:n}),B.jsx(_N,{title:u("subscription"),opened:i,onClose:a,handleSubmit:async h=>{await c.mutateAsync(h.resources.map(({link:E,tag:m})=>({link:E,tag:m})))}})]})},d$n=()=>{const{data:u}=Q$e(),{data:e}=X$e(),{data:t}=Are(),n=gRn(),i=pRn(),[r,a]=C.useState(null),o=C.useMemo(()=>{if(r){const{type:E,nodeID:m,groupID:g,subscriptionID:f}=r;if(E===Xi.node){const p=u==null?void 0:u.nodes.edges.find(D=>D.id===m);return p==null?void 0:p.tag}if(E===Xi.subscription){const p=t==null?void 0:t.subscriptions.find(D=>D.id===f);return(p==null?void 0:p.tag)||(p==null?void 0:p.link)}if(E===Xi.subscription_node){const p=t==null?void 0:t.subscriptions.find(x=>x.id===f),D=p==null?void 0:p.nodes.edges.find(x=>x.id===m);return D==null?void 0:D.name}if(E===Xi.groupNode){const p=e==null?void 0:e.groups.find(x=>x.id===g),D=p==null?void 0:p.nodes.find(x=>x.id===m);return D==null?void 0:D.name}if(E===Xi.groupSubscription){const p=e==null?void 0:e.groups.find(x=>x.id===g),D=p==null?void 0:p.subscriptions.find(x=>x.id===f);return D==null?void 0:D.tag}}},[r,e==null?void 0:e.groups,u==null?void 0:u.nodes.edges,t==null?void 0:t.subscriptions]),s=E=>{a({...E.active.data.current})},l=E=>{const{over:m}=E;if(m!=null&&m.id&&r){const g=e==null?void 0:e.groups.find(f=>f.id===m.id);[Xi.node,Xi.groupNode].includes(r.type)&&(r!=null&&r.nodeID)&&!(g!=null&&g.nodes.find(f=>f.id===r.nodeID))&&n.mutate({id:m.id,nodeIDs:[r.nodeID]}),[Xi.subscription,Xi.groupSubscription].includes(r.type)&&r.subscriptionID&&!(g!=null&&g.subscriptions.find(f=>f.id===r.subscriptionID))&&i.mutate({id:m.id,subscriptionIDs:[r.subscriptionID]}),r.type===Xi.subscription_node&&r.nodeID&&!(g!=null&&g.nodes.find(f=>f.id===r.nodeID))&&n.mutate({id:m.id,nodeIDs:[r.nodeID]})}a(null)},c=C.useRef(null),d=jr(),h=YA(`(max-width: ${d.breakpoints.sm})`);return B.jsxs(ju,{spacing:"lg",children:[B.jsxs(Tc,{cols:h?1:3,children:[B.jsx(r$n,{}),B.jsx(a$n,{}),B.jsx(l$n,{})]}),B.jsx(Tc,{ref:c,cols:h?1:3,children:B.jsxs(iB,{modifiers:[$Rn(c.current)],onDragStart:s,onDragEnd:l,children:[B.jsx(o$n,{highlight:!!r}),B.jsx(s$n,{}),B.jsx(c$n,{}),B.jsx(bOe,{dropAnimation:null,children:r&&B.jsx(Uv,{sx:{cursor:"grabbing"},children:o})})]})})]})},h$n=ke.object({endpointURL:ke.string().url().nonempty()}),E$n=ke.object({username:ke.string().min(4).max(20).nonempty(),password:ke.string().min(6).max(20).nonempty()}),m$n=ke.object({username:ke.string().min(4).max(20).nonempty(),password:ke.string().min(6).max(20).nonempty()}),wxe=async u=>{const{numberUsers:e}=await JZ(u,xu(` + */var WHn={L:Gb.QrCode.Ecc.LOW,M:Gb.QrCode.Ecc.MEDIUM,Q:Gb.QrCode.Ecc.QUARTILE,H:Gb.QrCode.Ecc.HIGH},GHn=128,UHn="L",qHn="#FFFFFF",JHn="#000000",ZHn=!1,yKe=4,YHn=.1;function QHn(u,e=0){const t=[];return u.forEach(function(n,i){let r=null;n.forEach(function(a,o){if(!a&&r!==null){t.push(`M${r+e} ${i+e}h${o-r}v1H${r+e}z`),r=null;return}if(o===n.length-1){if(!a)return;r===null?t.push(`M${o+e},${i+e} h1v1H${o+e}z`):t.push(`M${r+e},${i+e} h${o+1-r}v1H${r+e}z`);return}a&&r===null&&(r=o)})}),t.join("")}function XHn(u,e){return u.slice().map((t,n)=>n=e.y+e.h?t:t.map((i,r)=>r=e.x+e.w?i:!1))}function eVn(u,e,t,n){if(n==null)return null;const i=t?yKe:0,r=u.length+i*2,a=Math.floor(e*YHn),o=r/e,s=(n.width||a)*o,l=(n.height||a)*o,c=n.x==null?u.length/2-s/2:n.x*o,d=n.y==null?u.length/2-l/2:n.y*o;let h=null;if(n.excavate){let E=Math.floor(c),m=Math.floor(d),g=Math.ceil(s+c-E),f=Math.ceil(l+d-m);h={x:E,y:m,w:g,h:f}}return{x:c,y:d,h:l,w:s,excavation:h}}var tVn=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function uVn(u){const e=u,{value:t,size:n=GHn,level:i=UHn,bgColor:r=qHn,fgColor:a=JHn,includeMargin:o=ZHn,style:s,imageSettings:l}=e,c=KHn(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=l==null?void 0:l.src,h=C.useRef(null),E=C.useRef(null),[m,g]=C.useState(!1);C.useEffect(()=>{if(h.current!=null){const D=h.current,x=D.getContext("2d");if(!x)return;let b=Gb.QrCode.encodeText(t,WHn[i]).getModules();const k=o?yKe:0,A=b.length+k*2,F=eVn(b,n,o,l),S=E.current,w=F!=null&&S!==null&&S.complete&&S.naturalHeight!==0&&S.naturalWidth!==0;w&&F.excavation!=null&&(b=XHn(b,F.excavation));const z=window.devicePixelRatio||1;D.height=D.width=n*z;const N=n/A*z;x.scale(N,N),x.fillStyle=r,x.fillRect(0,0,A,A),x.fillStyle=a,tVn?x.fill(new Path2D(QHn(b,k))):b.forEach(function(O,y){O.forEach(function(_,L){_&&x.fillRect(L+k,y+k,1,1)})}),w&&x.drawImage(S,F.x+k,F.y+k,F.w,F.h)}}),C.useEffect(()=>{g(!1)},[d]);const f=kxe({height:n,width:n},s);let p=null;return d!=null&&(p=M.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{g(!0)},ref:E})),M.createElement(M.Fragment,null,M.createElement("canvas",kxe({style:f,height:n,width:n,ref:h},c)),p)}var KO={};function CQ(u){"@babel/helpers - typeof";return CQ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CQ(u)}Object.defineProperty(KO,"__esModule",{value:!0});KO.CopyToClipboard=void 0;var LS=AKe(C),nVn=AKe(nNe),iVn=["text","onCopy","options","children"];function AKe(u){return u&&u.__esModule?u:{default:u}}function Fxe(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(u,i).enumerable})),t.push.apply(t,n)}return t}function yxe(u){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(u,n)&&(t[n]=u[n])}return t}function aVn(u,e){if(u==null)return{};var t={},n=Object.keys(u),i,r;for(r=0;r=0)&&(t[i]=u[i]);return t}function oVn(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}function Axe(u,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function BN(u){return BN=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},BN(u)}function wre(u,e,t){return e in u?Object.defineProperty(u,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[e]=t,u}var SKe=function(u){lVn(t,u);var e=cVn(t);function t(){var n;oVn(this,t);for(var i=arguments.length,r=new Array(i),a=0;a{const[n,i]=C.useState({name:"",link:""}),[r,a]=C.useState(!1);return C.useEffect(()=>{r&&setTimeout(()=>{a(!1)},500)},[r]),C.useImperativeHandle(t,()=>({props:n,setProps:i})),B.jsx(Wi,{opened:u,onClose:e,title:n.name,keepMounted:!1,children:B.jsxs(Am,{mx:"auto",py:"md",direction:"column",align:"center",justify:"center",gap:"md",children:[B.jsx(uVn,{size:240,value:n.link}),B.jsxs(zi,{position:"apart",spacing:"xs",children:[B.jsx(Uv,{sx:{width:240,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},size:"lg",children:n.link}),B.jsx(mVn.CopyToClipboard,{text:n.link,onCopy:()=>a(!0),children:B.jsx(Uu,{children:r?B.jsx(lPn,{}):B.jsx(gPn,{})})})]})]})})}),gVn=ke.object({name:ke.string().nonempty()}),N7=C.forwardRef(({opened:u,onClose:e},t)=>{const{t:n}=Ei(),[i,r]=C.useState({}),{type:a,id:o}=i,s=C.useMemo(()=>{if(a===ts.config)return n("config");if(a===ts.dns)return n("dns");if(a===ts.routing)return n("routing")},[a,n]);C.useImperativeHandle(t,()=>({props:i,setProps:r}));const l=Da({validate:xa(gVn),initialValues:{name:""}}),c=rRn(),d=dRn(),h=sRn(),E=mRn();return B.jsx(Wi,{title:n("actions.rename"),opened:u,onClose:e,children:B.jsx("form",{onSubmit:l.onSubmit(m=>{const{name:g}=m;!a||!o||(a===ts.config&&c.mutate({id:o,name:g}),a===ts.dns&&d.mutate({id:o,name:g}),a===ts.routing&&h.mutate({id:o,name:g}),a===ts.group&&E.mutate({id:o,name:g}),e())}),children:B.jsxs(ju,{children:[B.jsx(F0,{order:4,children:s}),B.jsxs(Tc,{cols:2,children:[B.jsx(wt,{disabled:!0,value:i.oldName}),B.jsx(wt,{...l.getInputProps("name")})]}),B.jsx(Fs,{reset:l.reset})]})})})}),fVn=at(u=>({section:{border:`1px solid ${u.colorScheme==="dark"?u.colors.gray[8]:u.colors.gray[2]}`,borderRadius:u.radius.sm,padding:u.spacing.xs,boxShadow:u.shadows.md,transition:"background 300ms ease-in-out"}})),dl=({title:u,icon:e,bordered:t,iconPlus:n,onCreate:i,actions:r,highlight:a,children:o})=>{const{classes:s,theme:l,cx:c}=fVn();return B.jsxs(ju,{className:c({[s.section]:t}),bg:a?l.fn.lighten(l.fn.primaryColor(),.5):void 0,children:[B.jsxs(zi,{position:"apart",children:[B.jsxs(zi,{spacing:"xs",children:[e,B.jsx(F0,{order:4,color:l.primaryColor,children:u})]}),B.jsxs(zi,{children:[r,B.jsx(Uu,{onClick:i,children:n||B.jsx(xre,{})})]})]}),B.jsx(ju,{children:o})]})},$x=({name:u,selected:e,onSelect:t,onRemove:n,actions:i,children:r})=>{const{t:a}=Ei(),[o,{open:s,close:l}]=Un(!1);return B.jsxs(C.Fragment,{children:[B.jsx(zwe,{position:"bottom-center",size:12,disabled:!e,children:B.jsx(ym,{withBorder:!0,shadow:"sm",children:B.jsx(ym.Section,{withBorder:!0,children:B.jsxs(zi,{position:"apart",spacing:0,children:[B.jsx(L4,{p:"sm",sx:{flex:1},onClick:t,children:B.jsx(F0,{order:4,children:u})}),B.jsxs(zi,{spacing:"sm",p:"sm",children:[i,B.jsx(Uu,{size:"xs",onClick:s,children:B.jsx(Dre,{})}),!e&&n&&B.jsx(Uu,{color:"red",size:"xs",onClick:()=>{Ane.openConfirmModal({title:a("actions.remove"),labels:{cancel:a("confirmModal.cancel"),confirm:a("confirmModal.confirm")},children:a("confirmModal.removeConfirmDescription"),onConfirm:n})},children:B.jsx(vre,{})})]})]})})})}),B.jsx(Wi,{title:u,opened:o,onClose:l,children:r})]})};var pVn=Object.create,wKe=Object.defineProperty,DVn=Object.getOwnPropertyDescriptor,xVn=Object.getOwnPropertyNames,vVn=Object.getPrototypeOf,CVn=Object.prototype.hasOwnProperty,bVn=(u,e)=>()=>(u&&(e=u(u=0)),e),Lre=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),kVn=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xVn(e))!CVn.call(u,i)&&i!==t&&wKe(u,i,{get:()=>e[i],enumerable:!(n=DVn(e,i))||n.enumerable});return u},FVn=(u,e,t)=>(t=u!=null?pVn(vVn(u)):{},kVn(e||!u||!u.__esModule?wKe(t,"default",{value:u,enumerable:!0}):t,u)),Yt=bVn(()=>{}),yVn=Lre((u,e)=>{Yt();var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t}),AVn=Lre((u,e)=>{Yt();var t=yVn();function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function r(s,l,c,d,h,E){if(E!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:n};return o.PropTypes=o,o}}),_Vn=Lre((u,e)=>{Yt(),e.exports=AVn()()});Yt();Yt();Yt();Yt();Yt();Yt();var nf=FVn(_Vn());Yt();var SVn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},BVn=Object.defineProperty,wVn=Object.defineProperties,LVn=Object.getOwnPropertyDescriptors,wN=Object.getOwnPropertySymbols,LKe=Object.prototype.hasOwnProperty,zKe=Object.prototype.propertyIsEnumerable,_xe=(u,e,t)=>e in u?BVn(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,Sxe=(u,e)=>{for(var t in e||(e={}))LKe.call(e,t)&&_xe(u,t,e[t]);if(wN)for(var t of wN(e))zKe.call(e,t)&&_xe(u,t,e[t]);return u},zVn=(u,e)=>wVn(u,LVn(e)),MVn=(u,e)=>{var t={};for(var n in u)LKe.call(u,n)&&e.indexOf(n)<0&&(t[n]=u[n]);if(u!=null&&wN)for(var n of wN(u))e.indexOf(n)<0&&zKe.call(u,n)&&(t[n]=u[n]);return t},WO=(u,e,t)=>{let n=C.forwardRef((i,r)=>{var a=i,{color:o="currentColor",size:s=24,stroke:l=2,children:c}=a,d=MVn(a,["color","size","stroke","children"]);return C.createElement("svg",Sxe(zVn(Sxe({ref:r},SVn),{width:s,height:s,stroke:o,strokeWidth:l,className:`tabler-icon tabler-icon-${u}`}),d),[...t.map(([h,E])=>C.createElement(h,E)),...c||[]])});return n.propTypes={color:nf.default.string,size:nf.default.oneOfType([nf.default.string,nf.default.number]),stroke:nf.default.oneOfType([nf.default.string,nf.default.number])},n.displayName=`${e}`,n};Yt();var TVn=WO("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);Yt();var NVn=WO("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);Yt();WO("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);Yt();var PVn=WO("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);Yt();Yt();Yt();Yt();function RVn(u,e){let t=()=>{e(u.map(i=>i.matches))},n=u.map(i=>{try{return i.addEventListener("change",t),()=>i.removeEventListener("change",t)}catch{return i.addListener(t),()=>i.removeListener(t)}});return()=>{n.forEach(i=>i())}}function IVn(u,e){return e||(typeof window<"u"&&"matchMedia"in window?u.map(t=>window.matchMedia(t).matches):u.map(()=>!1))}function OVn(u,e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[n,i]=C.useState(t?e:IVn(u,e)),r=C.useRef();return C.useEffect(()=>{if("matchMedia"in window)return r.current=u.map(a=>window.matchMedia(a)),i(r.current.map(a=>a.matches)),RVn(r.current,a=>{i(a)})},[u]),n}function MKe(u){let e=jr(),t=typeof u=="function"?u(e):u;return YA(t||"",!0)}function jVn(u){let e=jr(),t=C.useMemo(()=>u.map(i=>(typeof i=="function"?i(e):i)??""),[u,e]),n=C.useMemo(()=>u.map(()=>!0),[u]);return OVn(t,n)}function TKe(u){let e=u.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}var HVn=at({noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function VVn({className:u,sx:e,style:t,visibleMediaQuery:n,title:i,noWrap:r,ellipsis:a,textAlignment:o,width:s}){let{cx:l,classes:c}=HVn();return MKe(n)?B.jsx(Ct,{component:"th",className:l({[c.noWrap]:r||a,[c.ellipsis]:a},u),sx:[{"&&":{textAlign:o},width:s,minWidth:s,maxWidth:s},e],style:t,children:i}):null}Yt();var $Vn=at(u=>{let e=u.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-t_e(u.spacing.sm),bottom:0,borderLeft:`1px solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,width:u.spacing.sm,background:`linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)}), linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},shadowVisible:{"&::after":{opacity:1}}}});function KVn({shadowVisible:u}){let{cx:e,classes:t}=$Vn();return B.jsx("th",{className:e(t.root,{[t.shadowVisible]:u})})}var WVn=at((u,{scrollDiff:e,borderColor:t})=>{let n=e<0,i=typeof t=="function"?t(u):t;return{root:{zIndex:2,position:n?"relative":"sticky",bottom:n?e:-1,background:u.colorScheme==="dark"?u.colors.dark[7]:u.white,"&& tr th":{borderTopColor:i}},relative:{position:"relative"},textSelectionDisabled:{userSelect:"none"}}});C.forwardRef(function({className:u,style:e,borderColor:t,columns:n,defaultColumnProps:i,selectionVisible:r,leftShadowVisible:a,scrollDiff:o},s){let{cx:l,classes:c}=WVn({scrollDiff:o,borderColor:t});return B.jsx(Ct,{component:"tfoot",ref:s,className:l(c.root,u),style:e,children:B.jsxs("tr",{children:[r&&B.jsx(KVn,{shadowVisible:a}),n.map(({hidden:d,...h})=>{if(d)return null;let{accessor:E,visibleMediaQuery:m,textAlignment:g,width:f,footer:p,footerClassName:D,footerStyle:x,footerSx:b,noWrap:k,ellipsis:A}={...i,...h};return B.jsx(VVn,{className:D,style:x,sx:b,visibleMediaQuery:m,textAlignment:g,width:f,title:p,noWrap:k,ellipsis:A},E)})]})})});Yt();Yt();function GVn({group:{id:u,columns:e,title:t,className:n,style:i,sx:r}}){let a=C.useMemo(()=>e.map(({visibleMediaQuery:l})=>l),[e]),o=jVn(a),s=C.useMemo(()=>e.filter(({hidden:l},c)=>!l&&(o==null?void 0:o[c])).length,[e,o]);return s>0?B.jsx(Ct,{component:"th",colSpan:s,className:n,sx:r,style:i,children:t??TKe(u)}):null}Yt();Yt();function UVn({children:u,isActive:e}){let[t,{close:n,toggle:i}]=Un(!1);return B.jsxs(Es,{withArrow:!0,withinPortal:!0,shadow:"md",opened:t,onClose:n,trapFocus:!0,children:[B.jsx(Es.Target,{children:B.jsx(Uu,{onClick:r=>{r.preventDefault(),i()},variant:e?"default":"subtle",children:B.jsx(PVn,{size:14})})}),B.jsx(Es.Dropdown,{onClick:r=>r.preventDefault(),children:typeof u=="function"?u({close:n}):u})]})}var qVn=at(u=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover:not(:has(button:hover))":{background:u.colorScheme==="dark"?u.colors.dark[6]:u.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderUnsortedIcon:{color:u.colorScheme==="dark"?u.colors.dark[3]:u.colors.gray[5],transition:"color .15s ease","th:hover &":{color:u.colorScheme==="dark"?u.colors.dark[2]:u.colors.gray[6]}}}));function JVn({className:u,sx:e,style:t,accessor:n,visibleMediaQuery:i,title:r,sortable:a,sortIcons:o,textAlignment:s,width:l,sortStatus:c,onSortStatusChange:d,filter:h,filtering:E}){let{cx:m,classes:g}=qVn();if(!MKe(i))return null;let f=r??TKe(n),p=typeof f=="string"?f:void 0,D=a&&d?x=>{x!=null&&x.defaultPrevented||d({columnAccessor:n,direction:(c==null?void 0:c.columnAccessor)===n?c.direction==="asc"?"desc":"asc":(c==null?void 0:c.direction)??"asc"})}:void 0;return B.jsx(Ct,{component:"th",className:m({[g.sortableColumnHeader]:a},u),sx:[{"&&":{textAlign:s},width:l,minWidth:l,maxWidth:l},e],style:t,role:a?"button":void 0,tabIndex:a?0:void 0,onClick:D,onKeyDown:x=>x.key==="Enter"&&(D==null?void 0:D()),children:B.jsxs(zi,{className:g.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[B.jsx(Ct,{className:m(g.columnHeaderText,g.sortableColumnHeaderText),title:p,children:f}),a||(c==null?void 0:c.columnAccessor)===n?B.jsx(B.Fragment,{children:(c==null?void 0:c.columnAccessor)===n?B.jsx(jz,{className:m(g.sortableColumnHeaderIcon,{[g.sortableColumnHeaderIconRotated]:c.direction==="desc"}),role:"img","aria-label":`Sorted ${c.direction==="desc"?"descending":"ascending"}`,children:(o==null?void 0:o.sorted)||B.jsx(TVn,{size:14})}):B.jsx(jz,{className:g.sortableColumnHeaderUnsortedIcon,role:"img","aria-label":"Not sorted",children:(o==null?void 0:o.unsorted)||B.jsx(NVn,{size:14})})}):null,h?B.jsx(UVn,{isActive:!!E,children:h}):null]})})}Yt();var ZVn=at(u=>{let e=u.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-t_e(u.spacing.sm),bottom:0,borderLeft:`1px solid ${u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3]}`,width:u.spacing.sm,background:`linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)}), linear-gradient(to right, ${u.fn.rgba(u.black,e)}, ${u.fn.rgba(u.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},shadowVisible:{"&::after":{opacity:1}},checkboxInput:{cursor:"pointer"}}});function YVn({shadowVisible:u,checked:e,indeterminate:t,checkboxProps:n,onChange:i,rowSpan:r}){let{cx:a,classes:o}=ZVn();return B.jsx("th",{className:a(o.root,{[o.shadowVisible]:u}),rowSpan:r,children:B.jsx(k0,{classNames:{input:o.checkboxInput},checked:e,indeterminate:t,disabled:!i,onChange:i,...n})})}var QVn=at(u=>({root:{zIndex:2,position:"sticky",top:0,background:u.colorScheme==="dark"?u.colors.dark[7]:u.white},textSelectionDisabled:{userSelect:"none"}}));C.forwardRef(function({className:u,style:e,sortStatus:t,sortIcons:n,onSortStatusChange:i,columns:r,defaultColumnProps:a,groups:o,selectionVisible:s,selectionChecked:l,selectionIndeterminate:c,onSelectionChange:d,selectionCheckboxProps:h,leftShadowVisible:E},m){let{classes:g,cx:f}=QVn(),p=s?B.jsx(YVn,{shadowVisible:E,checked:l,indeterminate:c,checkboxProps:h,onChange:d,rowSpan:o?2:void 0}):null;return B.jsxs("thead",{className:f(g.root,u),style:e,ref:m,children:[o&&B.jsxs("tr",{children:[p,o.map(D=>B.jsx(GVn,{group:D},D.id))]}),B.jsxs("tr",{children:[!o&&p,r.map(({hidden:D,...x})=>{if(D)return null;let{accessor:b,visibleMediaQuery:k,textAlignment:A,width:F,title:S,sortable:w,titleClassName:z,titleStyle:N,titleSx:O,filter:y,filtering:_}={...a,...x};return B.jsx(JVn,{accessor:b,className:z,style:N,sx:O,visibleMediaQuery:k,textAlignment:A,width:F,title:S,sortable:w,sortStatus:t,sortIcons:n,onSortStatusChange:i,filter:y,filtering:_},b)})]})]})});Yt();Yt();Yt();var Bxe={xs:22,sm:26,md:32,lg:38,xl:44};function XVn({size:u,label:e,values:t,value:n,onChange:i,color:r}){return B.jsxs(zi,{spacing:"xs",children:[B.jsx(_u,{size:u,children:e}),B.jsxs(La,{withinPortal:!0,withArrow:!0,children:[B.jsx(La.Target,{children:B.jsx(xl,{size:u,variant:"default",sx:[{fontWeight:"normal"},a=>({height:Bxe[u],paddingLeft:a.spacing[u],paddingRight:a.spacing[u]})],children:n})}),B.jsx(La.Dropdown,{children:t.map(a=>{let o=a===n;return B.jsx(La.Item,{sx:[{height:Bxe[u]},s=>({"&&":{color:o?s.white:void 0},background:o?s.colors[r||s.primaryColor][6]:void 0})],disabled:o,onClick:()=>i(a),children:B.jsx(_u,{size:u,children:a})},a)})})]})]})}var e$n=at((u,{topBorderColor:e,paginationWrapBreakpoint:t})=>({root:{background:u.colorScheme==="dark"?u.colors.dark[7]:u.white,borderTop:`1px solid ${typeof e=="function"?e(u):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:u.spacing.xs,[u.fn.largerThan(t)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}}));C.forwardRef(function({className:u,style:e,topBorderColor:t,fetching:n,page:i,onPageChange:r,paginationColor:a,paginationSize:o,loadingText:s,noRecordsText:l,paginationText:c,totalRecords:d,recordsPerPage:h,onRecordsPerPageChange:E,recordsPerPageLabel:m,recordsPerPageOptions:g,recordsLength:f,horizontalSpacing:p,paginationWrapBreakpoint:D,getPaginationControlProps:x},b){let k;if(n)k=s;else if(!d)k=l;else{let S=(i-1)*h+1,w=S+f-1;k=c({from:S,to:w,totalRecords:d})}let{classes:A,cx:F}=e$n({topBorderColor:t,paginationWrapBreakpoint:D});return B.jsxs(Ct,{ref:b,px:p??"xs",py:"xs",className:F(A.root,u),style:e,children:[B.jsx(_u,{className:A.text,size:o,children:k}),g&&B.jsx(XVn,{size:o,label:m,values:g,color:a,value:h,onChange:E}),B.jsx(J1,{color:a,className:F(A.pagination,{[A.paginationFetching]:n||!f}),value:i,onChange:r,size:o,total:Math.ceil(d/h),getControlProps:x})]})});Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();Yt();const t$n=({id:u,loading:e})=>{const t=Z$e();return B.jsx(Uu,{loading:e||t.isLoading,size:"xs",onClick:()=>t.mutate([u]),children:B.jsx(kPn,{})})},u$n=()=>{var Se,de;const{t:u}=Ei(),e=jr(),[t,n]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),global:{tproxyPort:Rt.internet.port(),logLevel:Rt.helpers.enumValue($ne),tcpCheckUrl:Rt.helpers.multiple(()=>Rt.internet.url(),{count:{min:1,max:4}}),udpCheckDns:Rt.helpers.multiple(()=>Rt.internet.url(),{count:{min:1,max:4}}),checkInterval:Rt.number.int(),checkTolerence:Rt.number.int(),sniffingTimeout:Rt.number.int(),lanInterface:Rt.helpers.multiple(()=>Rt.system.networkInterface(),{count:{min:1,max:4}}),wanInterface:Rt.helpers.multiple(()=>Rt.system.networkInterface(),{count:{min:1,max:4}}),allowInsecure:Rt.datatype.boolean(),dialMode:Rt.helpers.enumValue(hc),disableWaitingNetwork:Rt.datatype.boolean(),autoConfigKernelParameter:Rt.datatype.boolean()}}),{count:2})),[i,r]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),dns:Rt.lorem.paragraph()}),{count:2})),[a,o]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),selected:Rt.datatype.boolean(),routing:{string:Rt.lorem.paragraph(),rules:[]},referenceGroups:[]}),{count:2})),[s,l]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),nodes:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word()}),{count:Rt.number.int({min:5,max:10})}),subscriptions:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word()}),{count:5}),policy:Rt.helpers.enumValue(qo)}),{count:2})),[c,d]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),protocol:Rt.helpers.arrayElement(["vmess","vless","shadowsocks","trojan","hysteria","socks5","direct","http"]),tag:Rt.lorem.word(),link:Rt.internet.url()}),{count:3})),[h,E]=C.useState(Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),tag:Rt.lorem.word(),link:Rt.internet.url(),updatedAt:MN(Rt.date.recent()).format("YYYY-MM-DD HH:mm:ss"),nodes:Rt.helpers.multiple(()=>({id:Rt.string.uuid(),name:Rt.lorem.word(),protocol:Rt.helpers.arrayElement(["vmess","vless","shadowsocks","trojan","hysteria","socks5","direct","http"]),tag:Rt.lorem.word(),link:Rt.internet.url()}),{count:{min:5,max:10}})}),{count:2})),[m,g]=C.useState([]),[f,p]=C.useState(null),[D,{open:x,close:b}]=Un(!1),[k,{open:A,close:F}]=Un(!1),[S,{open:w,close:z}]=Un(!1),[N,{open:O,close:y}]=Un(!1),[_,{open:L,close:T}]=Un(!1),[R,{open:I,close:H}]=Un(!1),[V,{open:U,close:J}]=Un(!1),[Y,{open:X,close:re}]=Un(!1),ge=Fre(),_e=kre(),Ve=yre(),Ue=J$e(),qe=C.useRef(null);return B.jsxs(ju,{children:[B.jsx(EGe,{height:500,defaultValue:"hello world",theme:"vs-dark",options:LTe}),B.jsxs(Tc,{cols:3,children:[B.jsx(dl,{title:u("config"),onCreate:A,children:B.jsx(ju,{children:t.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:ts.config,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>n(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Ig,{language:"json",children:JSON.stringify(he,null,2)})},he.id))})}),B.jsx(dl,{title:u("dns"),onCreate:w,children:B.jsx(ju,{children:i.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:ts.dns,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>r(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Uz,{block:!0,children:he.dns})},he.id))})}),B.jsx(dl,{title:u("routing"),onCreate:O,children:B.jsx(ju,{children:a.map(he=>B.jsx($x,{name:he.name,selected:!1,actions:B.jsx(Uu,{size:"xs",onClick:()=>{qe.current&&qe.current.setProps({id:he.id,type:ts.routing,oldName:he.name}),x()},children:B.jsx(k3,{})}),onRemove:()=>o(Be=>Be.filter(je=>je.id!==he.id)),children:B.jsx(Uz,{children:he.routing.string})},he.id))})})]}),B.jsx(lz,{}),B.jsx(F0,{id:"resource",order:3,children:B.jsx(f3,{href:"#resource",children:u("resource")})}),B.jsx(Tc,{cols:3,children:B.jsxs(iB,{modifiers:[zju],onDragStart:he=>{p({id:he.active.id,type:he.active.data.current.type})},onDragEnd:he=>{const{active:Be,over:je}=he;if((f==null?void 0:f.type)===Xi.node){const bt=c.find(qt=>qt.id===Be.id);if(bt){const qt=rb(s,ou=>{const Vt=ou.find(oe=>oe.id===(je==null?void 0:je.id));Vt!=null&&Vt.nodes.find(oe=>oe.id===Be.id)||Vt==null||Vt.nodes.push(bt)});l(qt)}}if((f==null?void 0:f.type)===Xi.subscription){const bt=h.find(qt=>qt.id===Be.id);if(bt){const qt=rb(s,ou=>{const Vt=ou.find(oe=>oe.id===(je==null?void 0:je.id));Vt!=null&&Vt.subscriptions.find(oe=>oe.id===Be.id)||Vt==null||Vt.subscriptions.push(bt)});l(qt)}}p(null)},children:[B.jsx(dl,{title:u("group"),onCreate:L,bordered:!0,children:B.jsx(ju,{children:s.map(({id:he,name:Be,policy:je,nodes:bt,subscriptions:qt})=>B.jsxs(DKe,{id:he,name:Be,onRemove:()=>{l(ou=>ou.filter(Vt=>Vt.id!==he))},children:[B.jsx(_u,{fw:600,children:je}),B.jsx(qv,{h:10}),B.jsxs(nn,{variant:"filled",value:m,onChange:g,multiple:!0,children:[B.jsxs(nn.Item,{value:"node",children:[B.jsx(nn.Control,{fz:"xs",px:"xs",children:u("node")}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:B.jsx(iB,{modifiers:[D5e],collisionDetection:COu,onDragEnd:({active:ou,over:Vt})=>{if(ou&&Vt&&ou.id!==Vt.id){const oe=rb(s,se=>{const ie=se.find($=>$.id===he);if(ie){const $=ie==null?void 0:ie.nodes.findIndex(ue=>ue.id===ou.id),Z=ie==null?void 0:ie.nodes.findIndex(ue=>ue.id===Vt.id);ie.nodes=FOe(ie.nodes,$,Z)}});l(oe)}},children:B.jsx(v5e,{items:bt,strategy:x5e,children:bt.map(({id:ou,name:Vt})=>B.jsx(qy,{type:Xi.node,id:ou,name:Vt,onRemove:()=>{const oe=rb(s,se=>{const ie=se.find($=>$.id===he);ie&&(ie.nodes=ie.nodes.filter($=>$.id!==ou))});l(oe)}},ou))})})})})]}),B.jsxs(nn.Item,{value:"subscription",children:[B.jsx(nn.Control,{fz:"xs",px:"xs",children:u("subscription")}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:B.jsx(iB,{modifiers:[D5e],children:B.jsx(v5e,{items:qt,strategy:x5e,children:qt.map(({id:ou,name:Vt})=>B.jsx(qy,{type:Xi.subscription,id:ou,name:Vt,onRemove:()=>{const oe=rb(s,se=>{const ie=se.find($=>$.id===he);ie&&(ie.subscriptions=ie.subscriptions.filter($=>$.id!==ou))});l(oe)}},ou))})})})})]})]})]},he))})}),B.jsx(dl,{title:u("node"),onCreate:U,actions:B.jsx(Uu,{onClick:I,children:B.jsx(T$e,{})}),bordered:!0,children:B.jsx(ju,{children:c.map(({id:he,name:Be,tag:je,protocol:bt,link:qt})=>B.jsxs(CN,{id:he,type:Xi.node,name:Be,onRemove:()=>{d(ou=>ou.filter(Vt=>Vt.id!==he))},children:[B.jsx(_u,{fw:600,color:e.primaryColor,children:je}),B.jsx(_u,{fw:600,children:bt}),B.jsxs(Ah,{children:[B.jsx(Ah.Target,{children:B.jsx(_u,{truncate:!0,children:qt})}),B.jsx(Ah.Dropdown,{children:B.jsx(_u,{children:qt})})]})]},he))})}),B.jsx(dl,{title:u("subscription"),onCreate:X,bordered:!0,children:B.jsx(ju,{children:h.map(({id:he,name:Be,tag:je,link:bt,updatedAt:qt,nodes:ou})=>B.jsxs(CN,{id:he,type:Xi.subscription,name:Be,onRemove:()=>{E(Vt=>Vt.filter(oe=>oe.id!==he))},children:[B.jsx(_u,{fw:600,color:e.primaryColor,children:je}),B.jsx(_u,{fw:600,children:qt}),B.jsxs(Ah,{children:[B.jsx(Ah.Target,{children:B.jsx(_u,{truncate:!0,children:bt})}),B.jsx(Ah.Dropdown,{children:B.jsx(_u,{children:bt})})]}),B.jsx(qv,{h:10}),B.jsx(zi,{spacing:"sm",children:ou.map(({id:Vt,name:oe})=>B.jsx(Uv,{children:oe},Vt))})]},he))})}),B.jsx(bOe,{dropAnimation:null,children:f?B.jsx(Uv,{children:(f==null?void 0:f.type)===Xi.node?(Se=c.find(he=>he.id===f.id))==null?void 0:Se.name:(de=h.find(he=>he.id===f.id))==null?void 0:de.name}):null})]})}),B.jsx(fQ,{opened:k,onClose:F}),B.jsx(r6,{title:u("dns"),opened:S,onClose:z,handleSubmit:async he=>{await ge.mutateAsync({name:he.name,dns:he.text})}}),B.jsx(r6,{title:u("routing"),opened:N,onClose:y,handleSubmit:async he=>{await _e.mutateAsync({name:he.name,routing:he.text})}}),B.jsx(xQ,{opened:_,onClose:T}),B.jsx(_N,{title:u("node"),opened:R,onClose:H,handleSubmit:async he=>{await Ve.mutateAsync(he.resources.map(({link:Be,tag:je})=>({link:Be,tag:je}))),H()}}),B.jsx(_N,{title:u("subscription"),opened:Y,onClose:re,handleSubmit:async he=>{await Ue.mutateAsync(he.resources.map(({link:Be,tag:je})=>({link:Be,tag:je}))),H()}}),B.jsx(N7,{ref:qe,opened:D,onClose:b}),B.jsx(pKe,{opened:V,onClose:J})]})},n$n=()=>{const u=K$e(),e=W$e(),t=kre(),n=G$e(),i=Fre(),r=U$e(),a=q$e(),o=uRn(),s=Mu(),l=ARn(s),c=FRn(s),d=yRn(s);return C.useCallback(async()=>{const h=(await l()).general.interfaces.filter(({flag:D})=>!!D.default).map(({name:D})=>D),{defaultConfigID:E,defaultRoutingID:m,defaultDNSID:g,defaultGroupID:f}=await d();if(!E){const{createConfig:{id:D}}=await u.mutateAsync({name:IGt,global:HGt(h)});await e.mutateAsync({id:D}),await o.mutateAsync({defaultConfigID:D})}if(!m){const{createRouting:{id:D}}=await t.mutateAsync({name:jGt,routing:VGt});await n.mutateAsync({id:D}),await o.mutateAsync({defaultRoutingID:D})}if(!g){const{createDns:{id:D}}=await i.mutateAsync({name:OGt,dns:$Gt});await r.mutateAsync({id:D}),await o.mutateAsync({defaultDNSID:D})}if(!f){const{createGroup:{id:D}}=await a.mutateAsync({name:BTe,policy:wTe,policyParams:[]});await o.mutateAsync({defaultGroupID:D})}const p=await c();p?Lfe.set(p):(await o.mutateAsync({mode:ZZ.simple}),Lfe.set(ZZ.simple));{const{defaultConfigID:D,defaultDNSID:x,defaultGroupID:b,defaultRoutingID:k}=await d();h7.set({defaultConfigID:D,defaultDNSID:x,defaultGroupID:b,defaultRoutingID:k})}},[u,i,a,t,d,l,c,e,r,n,o])},i$n=()=>{const u=YIe(),e=V0(xy),t=V0(Qv),n=n$n();return C.useEffect(()=>{n()},[]),C.useEffect(()=>{(!t||!e)&&u("/setup")},[t,u,e]),B.jsx(fSe,{header:B.jsx(jHn,{}),footer:B.jsx(hSe,{height:50,children:B.jsx(jz,{h:"100%",children:B.jsxs(_u,{fw:"lighter",fz:"xs",color:"dimmed",children:["Made with passion 🔥 by"," ",B.jsx(f3,{href:"https://github.com/daeuniverse",target:"_blank",children:"@daeuniverse"})]})})}),children:B.jsx(RI,{size:"lg",p:"sm",children:B.jsx($Iu,{})})})},r$n=()=>{const{t:u}=Ei(),{defaultConfigID:e}=V0(h7),{data:t}=_Rn(),n=W$e(),i=iRn(),r=C.useRef(null),[a,{open:o,close:s}]=Un(!1),l=C.useRef(null),[c,{open:d,close:h}]=Un(!1),[E,{open:m,close:g}]=Un(!1);return B.jsxs(dl,{title:u("config"),icon:B.jsx(yPn,{}),onCreate:d,bordered:!0,children:[t==null?void 0:t.configs.map(f=>B.jsx($x,{name:f.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{l.current&&l.current.setProps({id:f.id,type:ts.config,oldName:f.name}),o()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var S,w;(S=r.current)==null||S.setEditingID(f.id);const{checkInterval:p,checkTolerance:D,sniffingTimeout:x,logLevel:b,...k}=f.global,F=hTe(u).findIndex(([,z])=>z===b);(w=r.current)==null||w.initOrigins({name:f.name,logLevelNumber:F,checkIntervalSeconds:nK(p,"s"),checkToleranceMS:nK(D,"ms"),sniffingTimeoutMS:nK(x,"ms"),...k}),m()},children:B.jsx(RO,{})})]}),selected:f.selected,onSelect:()=>n.mutate({id:f.id}),onRemove:f.id!==e?()=>i.mutate(f.id):void 0,children:B.jsx(Ig,{language:"json",children:JSON.stringify(f,null,2)})},f.id)),B.jsx(fQ,{opened:c,onClose:h}),B.jsx(fQ,{ref:r,opened:E,onClose:g}),B.jsx(N7,{ref:l,opened:a,onClose:s})]})},a$n=()=>{const{t:u}=Ei(),{defaultDNSID:e}=V0(h7),{data:t}=BRn(),n=U$e(),i=cRn(),r=Fre(),a=C.useRef(null),o=lRn(),s=C.useRef(null),[l,{open:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),[g,{open:f,close:p}]=Un(!1);return B.jsxs(dl,{title:u("dns"),icon:B.jsx(FPn,{}),onCreate:E,bordered:!0,children:[t==null?void 0:t.dnss.map(D=>B.jsx($x,{name:D.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{s.current&&s.current.setProps({id:D.id,type:ts.dns,oldName:D.name}),c()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var x,b;(x=a.current)==null||x.setEditingID(D.id),(b=a.current)==null||b.initOrigins({name:D.name,text:D.dns.string}),f()},children:B.jsx(RO,{})})]}),selected:D.selected,onSelect:()=>n.mutate({id:D.id}),onRemove:D.id!==e?()=>i.mutate(D.id):void 0,children:B.jsx(Ig,{language:"bash",children:D.dns.string})},D.id)),B.jsx(r6,{title:u("dns"),opened:h,onClose:m,handleSubmit:async D=>{await r.mutateAsync({name:D.name,dns:D.text})}}),B.jsx(r6,{ref:a,title:u("dns"),opened:g,onClose:p,handleSubmit:async D=>{a.current&&await o.mutateAsync({id:a.current.editingID,dns:D.text})}}),B.jsx(N7,{ref:s,opened:l,onClose:d})]})},o$n=({highlight:u})=>{const{t:e}=Ei(),{data:t}=X$e(),{defaultGroupID:n}=V0(h7),[i,{open:r,close:a}]=Un(!1),[o,{open:s,close:l}]=Un(!1),[c,{open:d,close:h}]=Un(!1),E=hRn(),m=fRn(),g=DRn(),[f,p]=C.useState([]),D=C.useRef(null),x=C.useRef(null),{data:b}=Are();return B.jsxs(dl,{title:e("group"),icon:B.jsx(_Pn,{}),onCreate:s,highlight:u,bordered:!0,children:[t==null?void 0:t.groups.map(({id:k,name:A,policy:F,nodes:S,subscriptions:w})=>B.jsxs(DKe,{id:k,name:A,onRemove:n!==k?()=>E.mutate(k):void 0,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{D.current&&D.current.setProps({id:k,type:ts.group,oldName:A}),r()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var z,N;(z=x.current)==null||z.setEditingID(k),(N=x.current)==null||N.initOrigins({name:A,policy:F}),d()},children:B.jsx(RO,{})})]}),children:[B.jsx(_u,{fz:"sm",fw:600,children:F}),B.jsx(qv,{h:10}),B.jsxs(nn,{variant:"filled",value:f,onChange:p,multiple:!0,children:[S.length>0&&B.jsxs(nn.Item,{value:"node",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[e("node")," (",S.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:S.map(({id:z,tag:N,name:O,subscriptionID:y})=>{var _;return B.jsx(qy,{id:`${k}-${z}`,nodeID:z,groupID:k,type:Xi.groupNode,name:N||O,onRemove:()=>m.mutate({id:k,nodeIDs:[z]}),children:y&&((_=b==null?void 0:b.subscriptions.find(L=>L.id===y))==null?void 0:_.tag)},z)})})})]}),w.length>0&&B.jsxs(nn.Item,{value:"subscription",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[e("subscription")," (",w.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(Tc,{cols:2,children:w.map(({id:z,tag:N,link:O})=>B.jsx(qy,{id:`${k}-${z}`,groupID:k,subscriptionID:z,type:Xi.groupSubscription,name:N||O,onRemove:()=>g.mutate({id:k,subscriptionIDs:[z]})},z))})})]})]})]},k)),B.jsx(xQ,{opened:o,onClose:l}),B.jsx(xQ,{ref:x,opened:c,onClose:h}),B.jsx(N7,{ref:D,opened:i,onClose:a})]})},s$n=()=>{const{t:u}=Ei(),e=jr(),[t,{open:n,close:i}]=Un(!1),[r,{open:a,close:o}]=Un(!1),[s,{open:l,close:c}]=Un(!1),d=C.useRef(null),{data:h}=Q$e(),E=xRn(),m=yre();return B.jsxs(dl,{title:u("node"),icon:B.jsx(mPn,{}),iconPlus:B.jsx(M$e,{}),onCreate:a,actions:B.jsx(Uu,{onClick:l,children:B.jsx(T$e,{})}),bordered:!0,children:[h==null?void 0:h.nodes.edges.map(({id:g,name:f,tag:p,protocol:D,link:x})=>B.jsxs(CN,{id:`node-${g}`,nodeID:g,type:Xi.node,name:p,leftSection:B.jsx(_u,{fz:"xs",fw:600,children:D}),actions:B.jsx(Uu,{size:"xs",onClick:()=>{var b;(b=d.current)==null||b.setProps({name:f||p,link:x}),n()},children:B.jsx(Dre,{})}),onRemove:()=>E.mutate([g]),children:[B.jsx(_u,{fw:600,color:e.primaryColor,sx:{wordBreak:"break-all"},children:f}),B.jsx(kne,{maxHeight:0,showLabel:B.jsx(_u,{fz:"xs",children:u("actions.show content")}),hideLabel:B.jsx(_u,{fz:"xs",children:u("actions.hide")}),children:B.jsx(_u,{fz:"sm",style:{wordBreak:"break-all"},children:x})})]},g)),B.jsx(BKe,{ref:d,opened:t,onClose:i}),B.jsx(_N,{title:u("node"),opened:r,onClose:o,handleSubmit:async g=>{await m.mutateAsync(g.resources.map(({link:f,tag:p})=>({link:f,tag:p})))}}),B.jsx(pKe,{opened:s,onClose:c})]})},l$n=()=>{const{t:u}=Ei(),{defaultRoutingID:e}=V0(h7),{data:t}=SRn(),n=G$e(),i=oRn(),r=kre(),a=C.useRef(null),o=aRn(),s=C.useRef(null),[l,{open:c,close:d}]=Un(!1),[h,{open:E,close:m}]=Un(!1),[g,{open:f,close:p}]=Un(!1);return B.jsxs(dl,{title:u("routing"),icon:B.jsx(vPn,{}),onCreate:E,bordered:!0,children:[t==null?void 0:t.routings.map(D=>B.jsx($x,{name:D.name,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{s.current&&s.current.setProps({id:D.id,type:ts.routing,oldName:D.name}),c()},children:B.jsx(k3,{})}),B.jsx(Uu,{size:"xs",onClick:()=>{var x,b;(x=a.current)==null||x.setEditingID(D.id),(b=a.current)==null||b.initOrigins({name:D.name,text:D.routing.string}),f()},children:B.jsx(RO,{})})]}),selected:D.selected,onSelect:()=>n.mutate({id:D.id}),onRemove:D.id!==e?()=>i.mutate(D.id):void 0,children:B.jsx(Ig,{language:"bash",children:D.routing.string})},D.id)),B.jsx(r6,{title:u("routing"),opened:h,onClose:m,handleSubmit:async D=>{await r.mutateAsync({name:D.name,routing:D.text})}}),B.jsx(r6,{ref:a,title:u("routing"),opened:g,onClose:p,handleSubmit:async D=>{a.current&&await o.mutateAsync({id:a.current.editingID,routing:D.text})}}),B.jsx(N7,{ref:s,opened:l,onClose:d})]})},c$n=()=>{const{t:u}=Ei(),[e,{open:t,close:n}]=Un(!1),[i,{open:r,close:a}]=Un(!1),o=C.useRef(null),{data:s}=Are(),l=vRn(),c=J$e(),d=Z$e();return B.jsxs(dl,{title:u("subscription"),icon:B.jsx(hPn,{}),iconPlus:B.jsx(M$e,{}),onCreate:r,bordered:!0,actions:(s==null?void 0:s.subscriptions)&&s.subscriptions.length>2&&B.jsx(Uu,{onClick:()=>{d.mutate((s==null?void 0:s.subscriptions.map(({id:h})=>h))||[])},loading:d.isLoading,children:B.jsx(fPn,{})}),children:[s==null?void 0:s.subscriptions.map(({id:h,tag:E,link:m,updatedAt:g,nodes:f})=>B.jsxs(CN,{id:`subscription-${h}`,subscriptionID:h,type:Xi.subscription,name:E||m,actions:B.jsxs(C.Fragment,{children:[B.jsx(Uu,{size:"xs",onClick:()=>{var p;(p=o.current)==null||p.setProps({name:E,link:m}),t()},children:B.jsx(Dre,{})}),B.jsx(t$n,{id:h,loading:d.isLoading})]}),onRemove:()=>l.mutate([h]),children:[B.jsx(_u,{fw:600,children:MN(g).format("YYYY-MM-DD HH:mm:ss")}),B.jsx(kne,{maxHeight:0,showLabel:B.jsx(_u,{fz:"xs",children:u("actions.show content")}),hideLabel:B.jsx(_u,{fz:"xs",children:u("actions.hide")}),children:B.jsx(_u,{fz:"sm",style:{wordBreak:"break-all"},children:m})}),B.jsx(nn,{variant:"filled",children:B.jsxs(nn.Item,{value:"node",children:[B.jsxs(nn.Control,{fz:"xs",px:"xs",children:[u("node")," (",f.edges.length,")"]}),B.jsx(nn.Panel,{children:B.jsx(zi,{spacing:"sm",children:f.edges.map(({id:p,name:D})=>B.jsx(qy,{name:D,id:`subscription-node-${p}`,nodeID:p,type:Xi.subscription_node,subscriptionID:h,children:D},p))})})]})})]},h)),B.jsx(BKe,{ref:o,opened:e,onClose:n}),B.jsx(_N,{title:u("subscription"),opened:i,onClose:a,handleSubmit:async h=>{await c.mutateAsync(h.resources.map(({link:E,tag:m})=>({link:E,tag:m})))}})]})},d$n=()=>{const{data:u}=Q$e(),{data:e}=X$e(),{data:t}=Are(),n=gRn(),i=pRn(),[r,a]=C.useState(null),o=C.useMemo(()=>{if(r){const{type:E,nodeID:m,groupID:g,subscriptionID:f}=r;if(E===Xi.node){const p=u==null?void 0:u.nodes.edges.find(D=>D.id===m);return p==null?void 0:p.tag}if(E===Xi.subscription){const p=t==null?void 0:t.subscriptions.find(D=>D.id===f);return(p==null?void 0:p.tag)||(p==null?void 0:p.link)}if(E===Xi.subscription_node){const p=t==null?void 0:t.subscriptions.find(x=>x.id===f),D=p==null?void 0:p.nodes.edges.find(x=>x.id===m);return D==null?void 0:D.name}if(E===Xi.groupNode){const p=e==null?void 0:e.groups.find(x=>x.id===g),D=p==null?void 0:p.nodes.find(x=>x.id===m);return D==null?void 0:D.name}if(E===Xi.groupSubscription){const p=e==null?void 0:e.groups.find(x=>x.id===g),D=p==null?void 0:p.subscriptions.find(x=>x.id===f);return D==null?void 0:D.tag}}},[r,e==null?void 0:e.groups,u==null?void 0:u.nodes.edges,t==null?void 0:t.subscriptions]),s=E=>{a({...E.active.data.current})},l=E=>{const{over:m}=E;if(m!=null&&m.id&&r){const g=e==null?void 0:e.groups.find(f=>f.id===m.id);[Xi.node,Xi.groupNode].includes(r.type)&&(r!=null&&r.nodeID)&&!(g!=null&&g.nodes.find(f=>f.id===r.nodeID))&&n.mutate({id:m.id,nodeIDs:[r.nodeID]}),[Xi.subscription,Xi.groupSubscription].includes(r.type)&&r.subscriptionID&&!(g!=null&&g.subscriptions.find(f=>f.id===r.subscriptionID))&&i.mutate({id:m.id,subscriptionIDs:[r.subscriptionID]}),r.type===Xi.subscription_node&&r.nodeID&&!(g!=null&&g.nodes.find(f=>f.id===r.nodeID))&&n.mutate({id:m.id,nodeIDs:[r.nodeID]})}a(null)},c=C.useRef(null),d=jr(),h=YA(`(max-width: ${d.breakpoints.sm})`);return B.jsxs(ju,{spacing:"lg",children:[B.jsxs(Tc,{cols:h?1:3,children:[B.jsx(r$n,{}),B.jsx(a$n,{}),B.jsx(l$n,{})]}),B.jsx(Tc,{ref:c,cols:h?1:3,children:B.jsxs(iB,{modifiers:[$Rn(c.current)],onDragStart:s,onDragEnd:l,children:[B.jsx(o$n,{highlight:!!r}),B.jsx(s$n,{}),B.jsx(c$n,{}),B.jsx(bOe,{dropAnimation:null,children:r&&B.jsx(Uv,{sx:{cursor:"grabbing"},children:o})})]})})]})},h$n=ke.object({endpointURL:ke.string().url().nonempty()}),E$n=ke.object({username:ke.string().min(4).max(20).nonempty(),password:ke.string().min(6).max(20).nonempty()}),m$n=ke.object({username:ke.string().min(4).max(20).nonempty(),password:ke.string().min(6).max(20).nonempty()}),wxe=async u=>{const{numberUsers:e}=await JZ(u,xu(` query NumberUsers { numberUsers } - `));return e},g$n=()=>{const{t:u}=Ei(),[e,t]=C.useState(0),n=()=>t(E=>E<3?E+1:E),[i,r]=C.useState(0),a=H0(Qv),o=Da({validate:xa(h$n),initialValues:{endpointURL:a}}),s=async E=>{Qv.set(E.endpointURL);try{const m=await wxe(E.endpointURL);r(m),n()}catch(m){c1.show({color:"red",message:m.message})}},l=Da({validate:xa(E$n),initialValues:{username:"",password:""}}),c=Da({validate:xa(m$n),initialValues:{username:"",password:""}}),d=async E=>{const m=o.values.endpointURL,{username:g,password:f}=E;try{await JZ(m,xu(` + `));return e},g$n=()=>{const{t:u}=Ei(),[e,t]=C.useState(0),n=()=>t(E=>E<3?E+1:E),[i,r]=C.useState(0),a=V0(Qv),o=Da({validate:xa(h$n),initialValues:{endpointURL:a}}),s=async E=>{Qv.set(E.endpointURL);try{const m=await wxe(E.endpointURL);r(m),n()}catch(m){c1.show({color:"red",message:m.message})}},l=Da({validate:xa(E$n),initialValues:{username:"",password:""}}),c=Da({validate:xa(m$n),initialValues:{username:"",password:""}}),d=async E=>{const m=o.values.endpointURL,{username:g,password:f}=E;try{await JZ(m,xu(` mutation CreateUser($username: String!, $password: String!) { createUser(username: $username, password: $password) } @@ -1551,4 +1551,4 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}fun query Token($username: String!, $password: String!) { token(username: $username, password: $password) } - `),{username:g,password:f});c1.show({message:u("notifications.login succeeded")}),xy.set(p),n()}catch(p){c1.show({color:"red",message:p.message})}};return B.jsx(RI,{h:"100%",children:B.jsxs(ju,{pt:"20vh",children:[B.jsxs(k0,{ta:"center",children:[u("welcome to",{name:"daed"})," "]}),B.jsxs(_u,{ta:"center",children:[u("what for")," ",B.jsx(f3,{target:"_blank",href:"https://github.com/daeuniverse/dae",children:"dae"})]}),B.jsx(qv,{h:20}),B.jsxs(Jf,{active:e,onStepClick:t,allowNextStepsSelect:!1,children:[B.jsx(Jf.Step,{label:`${u("step")} 1`,description:u("setup endpoint"),children:B.jsx("form",{onSubmit:o.onSubmit(s),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(DPn,{}),label:u("endpointURL"),placeholder:ETe,withAsterisk:!0,...o.getInputProps("endpointURL")}),B.jsx(xl,{type:"submit",children:u("actions.continue")})]})})}),B.jsx(Jf.Step,{label:`${u("step")} 2`,description:u("login account"),children:i===0?B.jsx("form",{onSubmit:l.onSubmit(d),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(P5e,{}),label:u("username"),placeholder:"admin",withAsterisk:!0,...l.getInputProps("username")}),B.jsx(MZ,{icon:B.jsx(N5e,{}),label:u("password"),placeholder:"password",withAsterisk:!0,...l.getInputProps("password")}),B.jsx(xl,{type:"submit",children:u("actions.create account")})]})}):B.jsx("form",{onSubmit:c.onSubmit(h),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(P5e,{}),label:u("username"),placeholder:"admin",withAsterisk:!0,...c.getInputProps("username")}),B.jsx(MZ,{icon:B.jsx(N5e,{}),label:u("password"),placeholder:"password",withAsterisk:!0,...c.getInputProps("password")}),B.jsx(xl,{type:"submit",children:u("actions.login")})]})})}),B.jsxs(Jf.Completed,{children:[B.jsx(qv,{h:20}),B.jsx(jz,{children:B.jsx(xl,{component:XY,to:"/",children:B.jsx(k0,{order:3,children:u("actions.start your journey")})})})]})]})]})})},f$n=()=>{const u=H0(Qv),e=YIu;return B.jsx(e,{children:B.jsxs(WIu,{children:[B.jsxs(n5,{path:"/",element:B.jsx(i$n,{}),children:[B.jsx(n5,{index:!0,element:B.jsx(d$n,{})}),B.jsx(n5,{path:"experiment",element:B.jsx(u$n,{})})]}),B.jsx(n5,{path:"/setup",element:B.jsx(g$n,{})}),u&&B.jsx(n5,{path:"/graphiql",element:B.jsx(UE,{fetcher:_qt({url:u})})})]})})},p$n=$ue({key:"mantine"}),D$n=()=>{const u=H0(zfe),e=Okt(),[t,n]=C.useState(e),i=C.useCallback(a=>{const o=a||(t==="dark"?"light":"dark");n(o),zfe.setKey("preferredColorScheme",o)},[t]);C.useEffect(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)"),o=s=>i(s.matches?"dark":"light");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[i]),C.useEffect(()=>{n(u.preferredColorScheme||e)},[n,e,u.preferredColorScheme]),C.useEffect(()=>{jTe.set(t)},[t]);const r={colorScheme:t,fontFamily:"Fira Sans, Monaco, Consolas, sans-serif",fontFamilyMonospace:"Source Code Pro, Monaco, Consolas, monospace",primaryColor:"violet",cursorType:"pointer",components:{Stack:{defaultProps:{spacing:"sm"}},Group:{defaultProps:{spacing:"sm"}},Button:{defaultProps:{uppercase:!0}},ActionIcon:{defaultProps:{size:"sm"}},Tooltip:{defaultProps:{withArrow:!0}},HoverCard:{defaultProps:{withArrow:!0}},Modal:{defaultProps:{size:"lg",radius:"md",centered:!0,scrollAreaComponent:QF.Autosize}},ModalHeader:{defaultProps:a=>({bg:t==="dark"?a.colors.dark[4]:a.colors.gray[4]})},ModalTitle:{defaultProps:{color:"white"}},Drawer:{defaultProps:{size:"lg",scrollAreaComponent:QF.Autosize}},Menu:{styles:{label:{textTransform:"uppercase"}}},Select:{defaultProps:{withinPortal:!0,size:"xs"}},MultiSelect:{defaultProps:{size:"xs"}},Switch:{defaultProps:{size:"xs"}},Checkbox:{defaultProps:{size:"xs"}},Radio:{defaultProps:{size:"xs"}},RadioGroup:{defaultProps:{size:"xs"}},TextInput:{defaultProps:{size:"xs"}},NumberInput:{defaultProps:{size:"xs"}}}};return B.jsx(cqt,{children:B.jsx(e_e,{colorScheme:t,toggleColorScheme:i,children:B.jsx(que,{theme:r,emotionCache:p$n,withGlobalStyles:!0,withNormalizeCSS:!0,children:B.jsx(AVt,{children:B.jsxs(Ct,{sx:{height:"100dvh"},children:[B.jsx(Yp,{limit:5}),B.jsx(f$n,{})]})})})})})};MN.extend(fGe);const x$n=async()=>{oB.config({monaco:kvt}),self.MonacoEnvironment={createTrustedTypesPolicy(){},getWorker(n,i){return i==="json"?new _vt:i==="css"||i==="scss"||i==="less"?new yvt:i==="html"||i==="handlebars"||i==="razor"?new Avt:i==="typescript"||i==="javascript"?new Svt:new Fvt}};const u=await oB.init();u.languages.register({id:"routingA",extensions:["dae"]}),u.languages.setMonarchTokensProvider("routingA",tUt);const e=await Te(()=>import("./GitHub-06a37610.js"),[],import.meta.url),t=await Te(()=>import("./GitHub Light-b9e9e7cc.js"),[],import.meta.url);u.editor.defineTheme("github",e),u.editor.defineTheme("githubLight",t)};Promise.all([RHn(),x$n()]).then(()=>{vJ.createRoot(document.getElementById("root")).render(B.jsx(D$n,{}))});export{ny as $,Ine as A,HMe as B,Nne as C,cu as D,Hb as E,EWt as F,Rn as G,hWt as H,$Me as I,sWt as J,De as K,hl as L,W8 as M,ad as N,vl as O,LWt as P,In as Q,nqn as R,uqn as S,cTe as T,Bg as U,M3e as V,Zqt as W,Qu as X,Rs as Y,One as Z,I6 as _,Ji as a,iy as a0,ry as a1,Gqt as a2,Uqt as a3,qqt as a4,Xa as a5,Qp as a6,yu as a7,pn as a8,vr as a9,d$ as aa,qi as b,ay as c,$Kt as d,Cl as e,fWt as f,iqn as g,$I as h,_m as i,Tt as j,dWt as k,oTe as l,BA as m,KKt as n,F0 as o,t0 as p,Es as q,Mr as r,GKt as s,zke as t,UI as u,lWt as v,wg as w,Il as x,V0 as y,jo as z}; + `),{username:g,password:f});c1.show({message:u("notifications.login succeeded")}),xy.set(p),n()}catch(p){c1.show({color:"red",message:p.message})}};return B.jsx(RI,{h:"100%",children:B.jsxs(ju,{pt:"20vh",children:[B.jsxs(F0,{ta:"center",children:[u("welcome to",{name:"daed"})," "]}),B.jsxs(_u,{ta:"center",children:[u("what for")," ",B.jsx(f3,{target:"_blank",href:"https://github.com/daeuniverse/dae",children:"dae"})]}),B.jsx(qv,{h:20}),B.jsxs(Jf,{active:e,onStepClick:t,allowNextStepsSelect:!1,children:[B.jsx(Jf.Step,{label:`${u("step")} 1`,description:u("setup endpoint"),children:B.jsx("form",{onSubmit:o.onSubmit(s),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(DPn,{}),label:u("endpointURL"),placeholder:ETe,withAsterisk:!0,...o.getInputProps("endpointURL")}),B.jsx(xl,{type:"submit",children:u("actions.continue")})]})})}),B.jsx(Jf.Step,{label:`${u("step")} 2`,description:u("login account"),children:i===0?B.jsx("form",{onSubmit:l.onSubmit(d),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(P5e,{}),label:u("username"),placeholder:"admin",withAsterisk:!0,...l.getInputProps("username")}),B.jsx(MZ,{icon:B.jsx(N5e,{}),label:u("password"),placeholder:"password",withAsterisk:!0,...l.getInputProps("password")}),B.jsx(xl,{type:"submit",children:u("actions.create account")})]})}):B.jsx("form",{onSubmit:c.onSubmit(h),children:B.jsxs(ju,{maw:480,mx:"auto",children:[B.jsx(wt,{icon:B.jsx(P5e,{}),label:u("username"),placeholder:"admin",withAsterisk:!0,...c.getInputProps("username")}),B.jsx(MZ,{icon:B.jsx(N5e,{}),label:u("password"),placeholder:"password",withAsterisk:!0,...c.getInputProps("password")}),B.jsx(xl,{type:"submit",children:u("actions.login")})]})})}),B.jsxs(Jf.Completed,{children:[B.jsx(qv,{h:20}),B.jsx(jz,{children:B.jsx(xl,{component:XY,to:"/",children:B.jsx(F0,{order:3,children:u("actions.start your journey")})})})]})]})]})})},f$n=()=>{const u=V0(Qv),e=YIu;return B.jsx(e,{children:B.jsxs(WIu,{children:[B.jsxs(n5,{path:"/",element:B.jsx(i$n,{}),children:[B.jsx(n5,{index:!0,element:B.jsx(d$n,{})}),B.jsx(n5,{path:"experiment",element:B.jsx(u$n,{})})]}),B.jsx(n5,{path:"/setup",element:B.jsx(g$n,{})}),u&&B.jsx(n5,{path:"/graphiql",element:B.jsx(UE,{fetcher:_qt({url:u})})})]})})},p$n=$ue({key:"mantine"}),D$n=()=>{const u=V0(zfe),e=Okt(),[t,n]=C.useState(e),i=C.useCallback(a=>{const o=a||(t==="dark"?"light":"dark");n(o),zfe.setKey("preferredColorScheme",o)},[t]);C.useEffect(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)"),o=s=>i(s.matches?"dark":"light");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[i]),C.useEffect(()=>{n(u.preferredColorScheme||e)},[n,e,u.preferredColorScheme]),C.useEffect(()=>{jTe.set(t)},[t]);const r={colorScheme:t,fontFamily:"Fira Sans, Monaco, Consolas, sans-serif",fontFamilyMonospace:"Source Code Pro, Monaco, Consolas, monospace",primaryColor:"violet",cursorType:"pointer",components:{Stack:{defaultProps:{spacing:"sm"}},Group:{defaultProps:{spacing:"sm"}},Button:{defaultProps:{uppercase:!0}},ActionIcon:{defaultProps:{size:"sm"}},Tooltip:{defaultProps:{withArrow:!0}},HoverCard:{defaultProps:{withArrow:!0}},Modal:{defaultProps:{size:"lg",radius:"md",centered:!0,scrollAreaComponent:QF.Autosize}},ModalHeader:{defaultProps:a=>({bg:t==="dark"?a.colors.dark[4]:a.colors.gray[4]})},ModalTitle:{defaultProps:{color:"white"}},Drawer:{defaultProps:{size:"lg",scrollAreaComponent:QF.Autosize}},Menu:{styles:{label:{textTransform:"uppercase"}}},Select:{defaultProps:{withinPortal:!0,size:"xs"}},MultiSelect:{defaultProps:{size:"xs"}},Switch:{defaultProps:{size:"xs"}},Checkbox:{defaultProps:{size:"xs"}},Radio:{defaultProps:{size:"xs"}},RadioGroup:{defaultProps:{size:"xs"}},TextInput:{defaultProps:{size:"xs"}},NumberInput:{defaultProps:{size:"xs"}}}};return B.jsx(cqt,{children:B.jsx(e_e,{colorScheme:t,toggleColorScheme:i,children:B.jsx(que,{theme:r,emotionCache:p$n,withGlobalStyles:!0,withNormalizeCSS:!0,children:B.jsx(AVt,{children:B.jsxs(Ct,{sx:{height:"100dvh"},children:[B.jsx(Yp,{limit:5}),B.jsx(f$n,{})]})})})})})};MN.extend(fGe);const x$n=async()=>{oB.config({monaco:kvt}),self.MonacoEnvironment={createTrustedTypesPolicy(){},getWorker(n,i){return i==="json"?new _vt:i==="css"||i==="scss"||i==="less"?new yvt:i==="html"||i==="handlebars"||i==="razor"?new Avt:i==="typescript"||i==="javascript"?new Svt:new Fvt}};const u=await oB.init();u.languages.register({id:"routingA",extensions:["dae"]}),u.languages.setMonarchTokensProvider("routingA",tUt);const e=await Te(()=>import("./GitHub-06a37610.js"),[],import.meta.url),t=await Te(()=>import("./GitHub Light-b9e9e7cc.js"),[],import.meta.url);u.editor.defineTheme("github",e),u.editor.defineTheme("githubLight",t)};Promise.all([RHn(),x$n()]).then(()=>{vJ.createRoot(document.getElementById("root")).render(B.jsx(D$n,{}))});export{ny as $,Ine as A,HMe as B,Nne as C,cu as D,Hb as E,EWt as F,Rn as G,hWt as H,$Me as I,sWt as J,De as K,hl as L,W8 as M,ad as N,vl as O,LWt as P,In as Q,nqn as R,uqn as S,cTe as T,Bg as U,M3e as V,Zqt as W,Qu as X,Is as Y,One as Z,I6 as _,Ji as a,iy as a0,ry as a1,Gqt as a2,Uqt as a3,qqt as a4,Xa as a5,Qp as a6,yu as a7,pn as a8,vr as a9,d$ as aa,qi as b,ay as c,$Kt as d,Cl as e,fWt as f,iqn as g,$I as h,_m as i,Tt as j,dWt as k,oTe as l,BA as m,KKt as n,y0 as o,u0 as p,ms as q,Mr as r,GKt as s,zke as t,UI as u,lWt as v,wg as w,Il as x,$0 as y,jo as z}; diff --git a/assets/info.es-3d43dc0b.js b/assets/info.es-4f84d003.js similarity index 94% rename from assets/info.es-3d43dc0b.js rename to assets/info.es-4f84d003.js index 3fae9ab6..b945d4f1 100644 --- a/assets/info.es-3d43dc0b.js +++ b/assets/info.es-4f84d003.js @@ -1 +1 @@ -import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-2d405eca.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-5482a1c3.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); +import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-5f2e28e7.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-f73309ce.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); diff --git a/assets/javascript-edf6de70.js b/assets/javascript-c886ed23.js similarity index 89% rename from assets/javascript-edf6de70.js rename to assets/javascript-c886ed23.js index 590d8242..f5b1ba7e 100644 --- a/assets/javascript-edf6de70.js +++ b/assets/javascript-c886ed23.js @@ -1,4 +1,4 @@ -import{conf as t,language as e}from"./typescript-06b5296a.js";import"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{conf as t,language as e}from"./typescript-7ecfa68d.js";import"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/jsonMode-132600a1.js b/assets/jsonMode-728df4b3.js similarity index 99% rename from assets/jsonMode-132600a1.js rename to assets/jsonMode-728df4b3.js index f34f35d2..b16b6ccb 100644 --- a/assets/jsonMode-132600a1.js +++ b/assets/jsonMode-728df4b3.js @@ -1,4 +1,4 @@ -var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/jump.es-8a00e13d.js b/assets/jump.es-3da96504.js similarity index 95% rename from assets/jump.es-8a00e13d.js rename to assets/jump.es-3da96504.js index 380a1342..7d8582e8 100644 --- a/assets/jump.es-8a00e13d.js +++ b/assets/jump.es-3da96504.js @@ -1 +1 @@ -import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-2d405eca.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-5482a1c3.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); +import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-5f2e28e7.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-f73309ce.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); diff --git a/assets/lint.es2-0fdd8b3c.js b/assets/lint.es2-0a1cb552.js similarity index 99% rename from assets/lint.es2-0fdd8b3c.js rename to assets/lint.es2-0a1cb552.js index 7e2259ee..0833e034 100644 --- a/assets/lint.es2-0fdd8b3c.js +++ b/assets/lint.es2-0a1cb552.js @@ -1,4 +1,4 @@ -import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as X,h as y,j as T,D as E,O as G,k as Ae,l as Pe,o as O,q as P,r as I,u as k,v as te,w as ke,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Xe,L as Be,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-5482a1c3.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||B(e)||e.kind===u.DIRECTIVE_DEFINITION}function B(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(t){for(const n of t.definitions)if(!We(n)){const r=n.kind===u.SCHEMA_DEFINITION||n.kind===u.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function xe(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=_("to use an inline fragment on",en(i,n,s));a===""&&(a=_(nn(n,s))),e.reportError(new p(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function en(e,t,n){if(!ue(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,t){if(w(e)||S(e)){const n=Object.keys(e.getFields());return F(t,n)}return[]}function tn(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=h(e.getSchema(),n);if(r&&!R(r)){const i=v(n);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=h(e.getSchema(),t.typeCondition);if(n&&!R(n)){const r=v(t.typeCondition);e.reportError(new p(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:t}))}}}}function sn(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=t[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const t=e[e.length-1];switch("kind"in t||y(!1),t.kind){case u.OPERATION_DEFINITION:return an(t.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||y(!1),n.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(t.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new p(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function he(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)B(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...Pe].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function un(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const l of o){const c=l.name.value,f=r[c];if(n.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function dn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new p(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Oe(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(t=>({...t,value:z(t.value)})).sort((t,n)=>fe(t.name.value,n.name.value))}function De(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+De(n)).join(" and "):e}function gn(e){const t=new In,n=new Map;return{SelectionSet(r){const i=Tn(e,n,t,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,t,n,r,i){const s=[],[a,o]=M(e,t,r,i);if(Nn(e,s,t,n,a),o.length!==0)for(let l=0;l1)for(let o=0;o[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:se(a)===se(o)})}function se(e){return v(z(e))}function Q(e,t){return P(e)?P(t)?Q(e.ofType,t.ofType):!0:P(t)?!0:I(e)?I(t)?Q(e.ofType,t.ofType):!0:I(t)?!0:k(e)||k(t)?e!==t:!1}function M(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function H(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=h(e.getSchema(),n.typeCondition);return M(e,t,i,n.selectionSet)}function be(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(t)||S(t))&&(o=t.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([t,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):t;be(e,o,s.selectionSet,r,i);break}}}function yn(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class In{constructor(){this._data=new Map}has(t,n,r){var i;const[s,a]=ts.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function Fn(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:X;for(const o of i)n[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=U(l.filter(Rn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=n[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Rn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function $n(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(k(O(n))){if(r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Cn(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(n==null||!An(n,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=n[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,n);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Cn(e,i,n)}function An(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n,r,i){const s=new Map;return K(e,t,n,r,i,s,new Set),s}function K(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(n,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(n,o)||!ae(e,o,r))continue;K(e,t,n,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(n,o))continue;a.add(l);const c=t[l];if(!c||!ae(e,c,r))continue;K(e,t,n,r,c.selectionSet,s,a);break}}}function J(e,t){const n=oe(Le,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=oe(Me,t,e);return(r==null?void 0:r.if)!==!1}function ae(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=h(e,r);return i===n?!0:ue(i)?e.isSubType(i,n):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Un(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=Pn(n,o,s,r,t.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function we(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Vn(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Fe(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(B(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;t[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function jn(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=n[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Mn(n[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mn(e,t){return w(e)||S(e)||$(e)?e.getFields()[t]!=null:!1}function Yn(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Re(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||y(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Xn(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=n[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):n[c]=l}return!1}}function qn(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Gn(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Jn(e){return{ListValue(t){const n=Ye(e.getParentInputType());if(!P(n))return D(e,t),!1},ObjectValue(t){const n=O(e.getInputType());if(!$(n))return D(e,t),!1;const r=U(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xe(i)){const a=T(i.type);e.reportError(new p(`Field "${n.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=O(e.getParentInputType());if(!e.getInputType()&&$(n)){const i=F(t.name.value,Object.keys(n.getFields()));e.reportError(new p(`Field "${t.name.value}" is not defined by type "${n.name}".`+_(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();I(n)&&e.reportError(new p(`Expected value of type "${T(n)}", found ${v(t)}.`,{nodes:t}))},EnumValue:t=>D(e,t),IntValue:t=>D(e,t),FloatValue:t=>D(e,t),StringValue:t=>D(e,t),BooleanValue:t=>D(e,t)}}function D(e,t){const n=e.getInputType();if(!n)return;const r=O(n);if(!k(r)){const i=T(n);e.reportError(new p(`Expected value of type "${i}", found ${v(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=T(n);e.reportError(new p(`Expected value of type "${s}", found ${v(t)}.`,{nodes:t}))}}catch(i){const s=T(n);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qn(e){return{VariableDefinition(t){const n=h(e.getSchema(),t.type);if(n!==void 0&&!Be(n)){const r=t.variable.name.value,i=v(t.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Hn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=t[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Kn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Kn(e,t,n,r,i){if(I(r)&&!I(t)){if(!(n!=null&&n.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,t,o)}return re(e,t,r)}const $e=Object.freeze([ve,Xn,cn,Un,he,tn,Qn,$n,xe,Yn,Ie,Oe,hn,fn,Gn,dn,pn,ye,Fe,rn,we,Jn,wn,Hn,gn,Re]);class Wn{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class zn extends Wn{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new me(this._schema);ge(t,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,t,n=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new zn(e,t,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(n.map(d=>d(c)));try{ge(t,Te(i,f))}catch(d){if(d!==o)throw d}return l}function Zn(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=O(e.getParentInputType());if($(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}const xn=[un,Bn,qn,jn,Ln,Vn,he,ye,Fe,Dn,we,Re];function et(e,t,n,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,xn),Ce(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,t)=>{if(!e)throw new Error(t)};function nt(e,t=null,n,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` +import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as X,h as y,j as T,D as E,O as G,k as Ae,l as Pe,o as O,q as P,r as I,u as k,v as te,w as ke,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Xe,L as Be,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-f73309ce.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||B(e)||e.kind===u.DIRECTIVE_DEFINITION}function B(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(t){for(const n of t.definitions)if(!We(n)){const r=n.kind===u.SCHEMA_DEFINITION||n.kind===u.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function xe(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=_("to use an inline fragment on",en(i,n,s));a===""&&(a=_(nn(n,s))),e.reportError(new p(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function en(e,t,n){if(!ue(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,t){if(w(e)||S(e)){const n=Object.keys(e.getFields());return F(t,n)}return[]}function tn(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=h(e.getSchema(),n);if(r&&!R(r)){const i=v(n);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=h(e.getSchema(),t.typeCondition);if(n&&!R(n)){const r=v(t.typeCondition);e.reportError(new p(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:t}))}}}}function sn(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=t[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const t=e[e.length-1];switch("kind"in t||y(!1),t.kind){case u.OPERATION_DEFINITION:return an(t.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||y(!1),n.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(t.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new p(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function he(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)B(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...Pe].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function un(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const l of o){const c=l.name.value,f=r[c];if(n.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function dn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new p(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Oe(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(t=>({...t,value:z(t.value)})).sort((t,n)=>fe(t.name.value,n.name.value))}function De(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+De(n)).join(" and "):e}function gn(e){const t=new In,n=new Map;return{SelectionSet(r){const i=Tn(e,n,t,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,t,n,r,i){const s=[],[a,o]=M(e,t,r,i);if(Nn(e,s,t,n,a),o.length!==0)for(let l=0;l1)for(let o=0;o[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:se(a)===se(o)})}function se(e){return v(z(e))}function Q(e,t){return P(e)?P(t)?Q(e.ofType,t.ofType):!0:P(t)?!0:I(e)?I(t)?Q(e.ofType,t.ofType):!0:I(t)?!0:k(e)||k(t)?e!==t:!1}function M(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function H(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=h(e.getSchema(),n.typeCondition);return M(e,t,i,n.selectionSet)}function be(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(t)||S(t))&&(o=t.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([t,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):t;be(e,o,s.selectionSet,r,i);break}}}function yn(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class In{constructor(){this._data=new Map}has(t,n,r){var i;const[s,a]=ts.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function Fn(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:X;for(const o of i)n[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=U(l.filter(Rn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=n[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Rn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function $n(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(k(O(n))){if(r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Cn(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(n==null||!An(n,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=n[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,n);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Cn(e,i,n)}function An(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n,r,i){const s=new Map;return K(e,t,n,r,i,s,new Set),s}function K(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(n,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(n,o)||!ae(e,o,r))continue;K(e,t,n,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(n,o))continue;a.add(l);const c=t[l];if(!c||!ae(e,c,r))continue;K(e,t,n,r,c.selectionSet,s,a);break}}}function J(e,t){const n=oe(Le,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=oe(Me,t,e);return(r==null?void 0:r.if)!==!1}function ae(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=h(e,r);return i===n?!0:ue(i)?e.isSubType(i,n):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Un(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=Pn(n,o,s,r,t.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function we(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Vn(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Fe(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(B(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;t[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function jn(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=n[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Mn(n[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mn(e,t){return w(e)||S(e)||$(e)?e.getFields()[t]!=null:!1}function Yn(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Re(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||y(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Xn(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=n[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):n[c]=l}return!1}}function qn(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Gn(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Jn(e){return{ListValue(t){const n=Ye(e.getParentInputType());if(!P(n))return D(e,t),!1},ObjectValue(t){const n=O(e.getInputType());if(!$(n))return D(e,t),!1;const r=U(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xe(i)){const a=T(i.type);e.reportError(new p(`Field "${n.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=O(e.getParentInputType());if(!e.getInputType()&&$(n)){const i=F(t.name.value,Object.keys(n.getFields()));e.reportError(new p(`Field "${t.name.value}" is not defined by type "${n.name}".`+_(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();I(n)&&e.reportError(new p(`Expected value of type "${T(n)}", found ${v(t)}.`,{nodes:t}))},EnumValue:t=>D(e,t),IntValue:t=>D(e,t),FloatValue:t=>D(e,t),StringValue:t=>D(e,t),BooleanValue:t=>D(e,t)}}function D(e,t){const n=e.getInputType();if(!n)return;const r=O(n);if(!k(r)){const i=T(n);e.reportError(new p(`Expected value of type "${i}", found ${v(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=T(n);e.reportError(new p(`Expected value of type "${s}", found ${v(t)}.`,{nodes:t}))}}catch(i){const s=T(n);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qn(e){return{VariableDefinition(t){const n=h(e.getSchema(),t.type);if(n!==void 0&&!Be(n)){const r=t.variable.name.value,i=v(t.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Hn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=t[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Kn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Kn(e,t,n,r,i){if(I(r)&&!I(t)){if(!(n!=null&&n.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,t,o)}return re(e,t,r)}const $e=Object.freeze([ve,Xn,cn,Un,he,tn,Qn,$n,xe,Yn,Ie,Oe,hn,fn,Gn,dn,pn,ye,Fe,rn,we,Jn,wn,Hn,gn,Re]);class Wn{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class zn extends Wn{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new me(this._schema);ge(t,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,t,n=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new zn(e,t,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(n.map(d=>d(c)));try{ge(t,Te(i,f))}catch(d){if(d!==o)throw d}return l}function Zn(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=O(e.getParentInputType());if($(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}const xn=[un,Bn,qn,jn,Ln,Vn,he,ye,Fe,Dn,we,Re];function et(e,t,n,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,xn),Ce(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,t)=>{if(!e)throw new Error(t)};function nt(e,t=null,n,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` `,""));const c=l?`${e} diff --git a/assets/lint.es3-772416c3.js b/assets/lint.es3-437bc8f0.js similarity index 98% rename from assets/lint.es3-772416c3.js rename to assets/lint.es3-437bc8f0.js index 531b0d98..b2d530de 100644 --- a/assets/lint.es3-772416c3.js +++ b/assets/lint.es3-437bc8f0.js @@ -1 +1 @@ -import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-5482a1c3.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); +import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-f73309ce.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); diff --git a/assets/liquid-5f4f03ad.js b/assets/liquid-109c0bcd.js similarity index 98% rename from assets/liquid-5f4f03ad.js rename to assets/liquid-109c0bcd.js index 99990a2a..69d355da 100644 --- a/assets/liquid-5f4f03ad.js +++ b/assets/liquid-109c0bcd.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/mdx-4632e9a4.js b/assets/mdx-73755bf2.js similarity index 98% rename from assets/mdx-4632e9a4.js rename to assets/mdx-73755bf2.js index c09d5945..60a1c243 100644 --- a/assets/mdx-4632e9a4.js +++ b/assets/mdx-73755bf2.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/mode.es-a1c28541.js b/assets/mode.es-8d6b92d4.js similarity index 89% rename from assets/mode.es-a1c28541.js rename to assets/mode.es-8d6b92d4.js index 9cd3e550..7b8c4dc1 100644 --- a/assets/mode.es-a1c28541.js +++ b/assets/mode.es-8d6b92d4.js @@ -1 +1 @@ -import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-5482a1c3.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); +import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-f73309ce.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); diff --git a/assets/mode.es2-69ebd2a9.js b/assets/mode.es2-9a0e7fa4.js similarity index 95% rename from assets/mode.es2-69ebd2a9.js rename to assets/mode.es2-9a0e7fa4.js index f9bdc9f5..b2ef37f8 100644 --- a/assets/mode.es2-69ebd2a9.js +++ b/assets/mode.es2-9a0e7fa4.js @@ -1 +1 @@ -import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-5482a1c3.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); +import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-f73309ce.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); diff --git a/assets/mode.es3-666bdda0.js b/assets/mode.es3-91b27d8c.js similarity index 95% rename from assets/mode.es3-666bdda0.js rename to assets/mode.es3-91b27d8c.js index 8e122ea8..755629ad 100644 --- a/assets/mode.es3-666bdda0.js +++ b/assets/mode.es3-91b27d8c.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-5482a1c3.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; +import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-f73309ce.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; diff --git a/assets/python-1d0103e1.js b/assets/python-de82f2f3.js similarity index 98% rename from assets/python-1d0103e1.js rename to assets/python-de82f2f3.js index f928c3d9..f10dfafc 100644 --- a/assets/python-1d0103e1.js +++ b/assets/python-de82f2f3.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/razor-343a2f14.js b/assets/razor-59d1607c.js similarity index 99% rename from assets/razor-343a2f14.js rename to assets/razor-59d1607c.js index a8146e75..37a512e4 100644 --- a/assets/razor-343a2f14.js +++ b/assets/razor-59d1607c.js @@ -1,4 +1,4 @@ -import{m as s}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/tsMode-7da4817d.js b/assets/tsMode-07ff9492.js similarity index 99% rename from assets/tsMode-7da4817d.js rename to assets/tsMode-07ff9492.js index 6a73e607..28da42ab 100644 --- a/assets/tsMode-7da4817d.js +++ b/assets/tsMode-07ff9492.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/typescript-06b5296a.js b/assets/typescript-7ecfa68d.js similarity index 98% rename from assets/typescript-06b5296a.js rename to assets/typescript-7ecfa68d.js index 48153f58..53e46c00 100644 --- a/assets/typescript-06b5296a.js +++ b/assets/typescript-7ecfa68d.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/xml-dc74cb95.js b/assets/xml-d6213659.js similarity index 97% rename from assets/xml-dc74cb95.js rename to assets/xml-d6213659.js index 878681c7..6684be2a 100644 --- a/assets/xml-dc74cb95.js +++ b/assets/xml-d6213659.js @@ -1,4 +1,4 @@ -import{m}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/yaml-646d4ecb.js b/assets/yaml-2410ac7e.js similarity index 98% rename from assets/yaml-646d4ecb.js rename to assets/yaml-2410ac7e.js index 35936b2a..ca08db2c 100644 --- a/assets/yaml-646d4ecb.js +++ b/assets/yaml-2410ac7e.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-5482a1c3.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-f73309ce.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/index.html b/index.html index e7071327..cc6ef610 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> daed - +